<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title><%= @page_title || '清巡' %></title>
  <link rel="stylesheet" href="/vendor/element-plus/index.css" />
  <link rel="stylesheet" href="/css/style.css" />
  <style>
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }
    body {
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
      background-color: #f5f7fa;
    }
    .app-wrapper {
      min-height: 100vh;
    }
    .navbar {
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      color: white;
      padding: 0 40px;
      box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
      display: flex;
      align-items: center;
      height: 60px;
    }
    .navbar-brand {
      font-size: 20px;
      font-weight: 600;
      margin-right: 40px;
    }
    .navbar-nav {
      display: flex;
      gap: 8px;
    }
    .navbar-nav a {
      color: white;
      text-decoration: none;
      padding: 8px 16px;
      border-radius: 4px;
      opacity: 0.9;
      transition: all 0.2s;
    }
    .navbar-nav a:hover {
      opacity: 1;
      background: rgba(255, 255, 255, 0.15);
    }
    .navbar-nav a.active {
      background: rgba(255, 255, 255, 0.2);
    }
    .main-content {
      padding: 30px 40px;
    }
    .page-header {
      margin-bottom: 24px;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    .page-header h1 {
      font-size: 24px;
      color: #303133;
    }
    .card {
      background: white;
      border-radius: 12px;
      box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    }
    .card-header {
      padding: 12px 20px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .card-header h2 {
      font-size: 15px;
      font-weight: 600;
      color: #303133;
    }
    .card-body {
      padding: 20px;
    }
    .data-card {
      background: white;
      border-radius: 12px;
      box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
      overflow: hidden;
    }
    .data-card .card-header {
      padding: 12px 20px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .data-card .card-header h3 {
      font-size: 16px;
      font-weight: 600;
      color: #303133;
    }
    .data-card .card-body {
      padding: 24px;
    }
    .empty-state {
      text-align: center;
      padding: 60px 20px;
      color: #909399;
    }
    .empty-state .empty-icon {
      font-size: 64px;
      margin-bottom: 20px;
    }
    .content-card {
      background: white;
      border-radius: 12px;
      box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
      overflow: hidden;
    }
    .content-card .card-header {
      padding: 20px 24px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    /* 去掉 Element Plus 卡片头部的默认边框 */
    .el-card__header {
      border-bottom: none !important;
    }
    .content-card .card-header h3 {
      font-size: 18px;
      font-weight: 600;
      color: #303133;
    }
    .content-card .card-body {
      padding: 24px;
    }
    @keyframes rotating {
      from { transform: rotate(0deg); }
      to { transform: rotate(360deg); }
    }
  </style>
</head>
<body>
  <script src="/vendor/javascripts/vue.global.prod.js"></script>
  <script src="/vendor/element-plus/index.full.js"></script>
  <link rel="stylesheet" href="/vendor/element-plus/index.css" />
  <div id="app">
    <div class="app-wrapper">
      <nav class="navbar">
        <div class="navbar-brand">清巡</div>
        <div class="navbar-nav">
          <a href="/tasks" class="<%= 'active' if @active_page == 'tasks' %>">任务列表</a>
          <a href="/devices-vue" class="<%= 'active' if @active_page == 'devices' %>">设备管理</a>
          <a href="/scripts" class="<%= 'active' if @active_page == 'scripts' %>">我的脚本</a>
          <a href="/custom-integration" class="<%= 'active' if @active_page == 'custom_integration' %>">自定义集成</a>
          <a href="/upgrade" class="<%= 'active' if @active_page == 'upgrade' %>">升级管理</a>
          <a href="/config" class="<%= 'active' if @active_page == 'config' %>">配置</a>
        </div>
      </nav>
      <main class="main-content">
        <%= yield %>
      </main>
    </div>
  </div>
  
  <%= yield_content :xxx %>
</body>
</html>
