/* =====================================================================
   学科智能体 · 全端原型 共享设计令牌 (Design Tokens)
   ---------------------------------------------------------------------
   两套设计语言：
   1) 移动端 (.theme-mobile)  —— 沿用现有「Claude 暖色纸感」主题（已被广泛认可）
   2) 桌面端 (.theme-desktop) —— 全新「Console 暖纸 + 靛蓝/赤陶」专业语言
      （现桌面端 UI 认可度不高，故重新设计，但仍可由 Element Plus 主题变量落地）

   说明：原型为纯静态 HTML，结构 1:1 对应真实 Vue / Element Plus 页面，
   令牌可直接映射为项目内 CSS 变量 / Element Plus theme-vars / Tailwind 配置。
   ===================================================================== */

/* ---------- 基础重置 ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  color: var(--text-primary);
  background: var(--bg);
}
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

/* =====================================================================
   1) 移动端主题 —— Claude 暖色（与 source/mobile/src/style.css 一致）
   ===================================================================== */
.theme-mobile {
  --bg:            #f5f4ef;
  --surface:       #ffffff;
  --surface-2:     #faf9f5;
  --border:        #e8e5dc;
  --text-primary:  #1a1915;
  --text-secondary:#6b6860;
  --text-muted:    #9a968c;
  --accent:        #d4702a;  /* 赤陶橙 */
  --accent-hover:  #c96b26;
  --accent-light:  #e8a84a;
  --accent-soft:   rgba(212,112,42,0.10);

  --rose:   #e11d48;
  --indigo: #6366f1;
  --blue:   #3b82f6;
  --purple: #8b5cf6;
  --green:  #16a34a;
  --orange: #f97316;
  --yellow: #eab308;

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 18px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(26,25,21,0.05);
  --shadow:    0 2px 12px rgba(26,25,21,0.06);
  --shadow-md: 0 6px 24px rgba(26,25,21,0.10);

  --font-serif: "Noto Serif SC", "Songti SC", serif;

  /* 纸感颗粒背景 */
  background-color: var(--bg);
  background-image: radial-gradient(rgba(26,25,21,0.035) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* =====================================================================
   2) 桌面端主题 —— 全新「暖纸 Console」专业语言
      暖中性纸面 + 深木炭侧栏 + 靛蓝主操作 + 赤陶 AI 高亮（呼应移动端品牌）
   ===================================================================== */
.theme-desktop {
  --bg:            #f4f3ef;  /* 暖中性画布 */
  --surface:       #ffffff;
  --surface-2:     #faf9f6;
  --border:        #e6e3db;
  --border-strong: #d6d2c7;
  --text-primary:  #1f1e1a;
  --text-secondary:#605c54;
  --text-muted:    #9b968b;

  /* 主操作色：精致靛蓝（替代 Element 默认蓝） */
  --primary:       #4f46e5;
  --primary-hover: #4338ca;
  --primary-soft:  rgba(79,70,229,0.10);

  /* AI / 智能体高亮：赤陶（与移动端同源，统一品牌感） */
  --accent:        #d4702a;
  --accent-hover:  #c96b26;
  --accent-soft:   rgba(212,112,42,0.12);

  --success: #15803d;
  --success-soft: rgba(21,128,61,0.10);
  --warning: #b45309;
  --warning-soft: rgba(180,83,9,0.10);
  --danger:  #dc2626;
  --danger-soft: rgba(220,38,38,0.10);
  --info:    #475569;

  /* 深木炭侧栏（暖调，非冷灰） */
  --sidebar-bg:    #21201c;
  --sidebar-bg-2:  #2b2a25;
  --sidebar-text:  #c9c5bc;
  --sidebar-text-muted: #8b877e;
  --sidebar-active-bg:  rgba(212,112,42,0.16);
  --sidebar-active-text:#f0a35c;

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(31,30,26,0.05);
  --shadow:    0 2px 10px rgba(31,30,26,0.06);
  --shadow-md: 0 8px 28px rgba(31,30,26,0.10);

  --font-serif: "Noto Serif SC", "Songti SC", serif;

  background: var(--bg);
}

/* =====================================================================
   通用工具类
   ===================================================================== */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.muted { color: var(--text-secondary); }
.serif { font-family: var(--font-serif); }

/* 原型标注徽标（说明性，落地时移除） */
.proto-note {
  position: fixed; right: 14px; bottom: 14px; z-index: 9999;
  background: rgba(31,30,26,0.86); color: #fff;
  font-size: 12px; padding: 7px 12px; border-radius: 999px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25); letter-spacing: .3px;
}

/* ---------- 桌面端：应用外壳 ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 232px; flex-shrink: 0; background: var(--sidebar-bg);
  color: var(--sidebar-text); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.sidebar .brand {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 20px 18px; color: #fff; font-weight: 700; font-size: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sidebar .brand .logo {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light, #e8a84a));
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 15px;
}
.sidebar .brand .sub { font-size: 11px; color: var(--sidebar-text-muted); font-weight: 400; }
.nav-group-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--sidebar-text-muted); padding: 16px 20px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 20px; color: var(--sidebar-text); font-size: 14px;
  border-left: 3px solid transparent; transition: all .15s;
}
.nav-item i { width: 18px; text-align: center; font-size: 15px; }
.nav-item:hover { background: var(--sidebar-bg-2); color: #fff; }
.nav-item.active {
  background: var(--sidebar-active-bg); color: var(--sidebar-active-text);
  border-left-color: var(--accent); font-weight: 600;
}
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 60px; background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 26px; position: sticky; top: 0; z-index: 20;
}
.topbar .crumb { font-size: 14px; color: var(--text-secondary); }
.topbar .crumb b { color: var(--text-primary); }
.content { padding: 26px; flex: 1; }

/* ---------- 桌面端：组件 ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.card-pad { padding: 20px; }
.btn {
  display: inline-flex; align-items: center; gap: 7px; justify-content: center;
  padding: 9px 16px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500;
  transition: all .15s; border: 1px solid transparent;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-hover); }
.btn-ghost { background: var(--surface); border-color: var(--border-strong); color: var(--text-primary); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 500;
}
.tag-success { background: var(--success-soft); color: var(--success); }
.tag-warning { background: var(--warning-soft); color: var(--warning); }
.tag-accent  { background: var(--accent-soft); color: var(--accent-hover); }
.tag-primary { background: var(--primary-soft); color: var(--primary); }
.tag-muted   { background: #efece5; color: var(--text-secondary); }

table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th {
  text-align: left; padding: 12px 14px; color: var(--text-secondary);
  font-weight: 600; font-size: 13px; border-bottom: 1px solid var(--border); background: var(--surface-2);
}
table.tbl td { padding: 13px 14px; border-bottom: 1px solid var(--border); }
table.tbl tr:hover td { background: var(--surface-2); }
