/* ==========================================================================
   财务工程师个人工作台 · 全局样式 v3（小清新浅色设计体系）
   设计语言：薄荷白底 + 马卡龙配色 + 白色卡片柔影 + 圆润亲和
   ========================================================================== */

:root {
  /* 色彩体系（小清新马卡龙） */
  --bg-main: #f3f8f6;
  --bg-soft: #eaf4f0;
  --glass-bg: rgba(255, 255, 255, 0.78);
  --glass-bg-strong: rgba(255, 255, 255, 0.94);
  --glass-border: rgba(80, 130, 120, 0.12);
  --glass-border-hover: rgba(80, 130, 120, 0.26);
  --text-primary: #34475c;
  --text-secondary: #7d92a8;
  --text-faint: #a9bcc9;

  --accent: #3ecfa0;
  --accent-2: #4aa8f0;
  --accent-3: #9d8cff;
  --accent-grad: linear-gradient(135deg, #4dd6a8 0%, #4aa8f0 100%);
  --accent-grad-2: linear-gradient(135deg, #4dd6a8 0%, #4aa8f0 55%, #9d8cff 130%);
  --danger: #ff7b8a;
  --orange: #ffb35c;
  --warn: #f3c948;
  --success: #4cd1a0;
  --cyan: #5fd3d3;

  --red-bg: rgba(255, 123, 138, 0.12);
  --orange-bg: rgba(255, 179, 92, 0.13);
  --yellow-bg: rgba(243, 201, 72, 0.14);
  --green-bg: rgba(76, 209, 160, 0.13);
  --blue-bg: rgba(74, 168, 240, 0.13);

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 14px rgba(80, 130, 120, 0.08), 0 12px 36px rgba(80, 130, 120, 0.1);
  --shadow-glow: 0 0 0 1px rgba(61, 207, 160, 0.25), 0 10px 34px rgba(61, 207, 160, 0.14);

  --sidebar-w: 268px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  background: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(80, 130, 120, 0.18); border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(80, 130, 120, 0.32); background-clip: content-box; }

::selection { background: rgba(77, 214, 168, 0.32); color: #1f3d33; }
button { font-family: inherit; }

/* ============================ 背景装饰 ============================ */
.bg-orbs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: linear-gradient(160deg, #eef8f4 0%, #f5faf9 40%, #eef5fb 100%); }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.55; will-change: transform; }
.orb-1 { width: 520px; height: 520px; background: radial-gradient(circle, #b5ecd9, transparent 70%); top: -160px; left: -120px; animation: floatOrb 24s ease-in-out infinite; }
.orb-2 { width: 480px; height: 480px; background: radial-gradient(circle, #c3e2fb, transparent 70%); bottom: -160px; right: -110px; animation: floatOrb 28s ease-in-out infinite reverse; }
.orb-3 { width: 340px; height: 340px; background: radial-gradient(circle, #e8d9ff, transparent 70%); top: 36%; left: 52%; opacity: 0.4; animation: floatOrb 32s ease-in-out infinite; }
.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(90, 140, 130, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(90, 140, 130, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 0%, black 15%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, black 15%, transparent 70%);
}
@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(46px, -34px) scale(1.08); }
  66% { transform: translate(-36px, 32px) scale(0.95); }
}

/* ============================ 布局 ============================ */
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border-right: 1px solid var(--glass-border);
  display: flex; flex-direction: column;
  z-index: 100;
  transition: transform 0.32s var(--ease);
}
.sidebar::after {
  content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 1px;
  background: linear-gradient(180deg, transparent, rgba(77, 214, 168, 0.4), transparent);
}
.sidebar-head { display: flex; align-items: center; gap: 13px; padding: 22px 18px 18px; }
.logo-mark {
  width: 42px; height: 42px; border-radius: 14px;
  background: var(--accent-grad);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(77, 214, 168, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  position: relative;
  animation: logoPulse 3.4s ease-in-out infinite;
  flex-shrink: 0;
}
.logo-mark svg { width: 30px; height: 30px; }
@keyframes logoPulse {
  0%, 100% { box-shadow: 0 6px 18px rgba(77,214,168,.4), inset 0 1px 0 rgba(255,255,255,.5); }
  50% { box-shadow: 0 6px 26px rgba(74,168,240,.55), inset 0 1px 0 rgba(255,255,255,.5); }
}
.logo-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.logo-text strong { font-size: 15.5px; letter-spacing: 0.4px; color: #2f4b57; }
.logo-text span { font-size: 10px; color: var(--text-faint); letter-spacing: 1.6px; text-transform: uppercase; }

.side-nav { flex: 1; overflow-y: auto; padding: 4px 12px 10px; }
.nav-group { font-size: 10px; color: var(--text-faint); letter-spacing: 2.4px; margin: 16px 12px 8px; display: flex; align-items: center; gap: 8px; }
.nav-group::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(80,130,120,.14), transparent); }
.nav-btn {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left;
  padding: 9px 12px; margin: 2.5px 0;
  border-radius: 12px;
  background: transparent; border: 1px solid transparent;
  color: var(--text-secondary); cursor: pointer;
  font-size: 13.5px; font-weight: 500;
  transition: all 0.2s var(--ease);
  position: relative;
}
.nav-btn:hover { background: rgba(77, 214, 168, 0.08); color: var(--text-primary); transform: translateX(3px); }
.nav-btn.active {
  background: linear-gradient(90deg, rgba(77, 214, 168, 0.16), rgba(74, 168, 240, 0.1));
  color: #237a5e;
  border-color: rgba(77, 214, 168, 0.4);
  box-shadow: 0 4px 16px rgba(77, 214, 168, 0.12);
  font-weight: 600;
}
.nav-btn.active::before {
  content: ""; position: absolute; left: -12px; top: 22%; bottom: 22%; width: 3.5px;
  border-radius: 0 4px 4px 0; background: var(--accent-grad); box-shadow: 0 0 10px rgba(77, 214, 168, 0.6);
}
.nav-ic {
  font-size: 16px; width: 30px; height: 30px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px; background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(80, 130, 120, 0.1);
  transition: all 0.2s var(--ease);
}
.nav-btn:hover .nav-ic { background: #fff; transform: scale(1.08); box-shadow: 0 2px 8px rgba(80,130,120,.1); }
.nav-btn.active .nav-ic { background: var(--accent-grad); border-color: transparent; box-shadow: 0 3px 12px rgba(77, 214, 168, 0.4); }
.nav-tx { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sidebar-foot { padding: 14px 16px; border-top: 1px solid var(--glass-border); }
.conn-row { display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--text-secondary); margin-bottom: 8px; }
.conn-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--warn); flex-shrink: 0; position: relative; }
.conn-dot.ok { background: var(--success); box-shadow: 0 0 9px rgba(76, 209, 160, 0.7); }
.conn-dot.ok::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--success); animation: pulseRing 2s ease-out infinite; }
.conn-dot.err { background: var(--danger); box-shadow: 0 0 9px rgba(255, 123, 138, 0.7); }
.conn-dot.warn { background: var(--warn); box-shadow: 0 0 9px rgba(243, 201, 72, 0.6); }
@keyframes pulseRing { 0% { transform: scale(0.6); opacity: 1; } 100% { transform: scale(1.7); opacity: 0; } }
.tip-warning { font-size: 11px; color: #e87a86; line-height: 1.5; }

.main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  padding: 22px 28px 60px;
  transition: margin-left 0.32s var(--ease);
}
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 23px; font-weight: 800; letter-spacing: 0.3px; position: relative; color: #2f4b57; }
.page-head h1::after {
  content: ""; position: absolute; left: 0; bottom: -5px; width: 46px; height: 3px;
  border-radius: 3px; background: var(--accent-grad); box-shadow: 0 2px 8px rgba(77, 214, 168, 0.4);
}
.page-sub { font-size: 12.5px; color: var(--text-secondary); margin-top: 10px; }
.page-head-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.clock-box { text-align: right; line-height: 1.3; padding-right: 4px; }
.clock-box #clockTime { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; color: #2f6d57; }
.clock-box #clockDate { font-size: 11.5px; color: var(--text-secondary); }

/* 全局搜索 */
.global-search { position: relative; }
.global-search .search-box::before { top: 50%; }
.global-search .input { width: 250px; padding-left: 36px; border-radius: 22px; background: rgba(255, 255, 255, 0.85); }
.global-search .input:focus { width: 290px; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(77, 214, 168, 0.18), 0 8px 26px rgba(80, 130, 120, 0.12); }
.search-panel {
  position: absolute; right: 0; top: calc(100% + 8px); width: 380px; max-height: 420px; overflow-y: auto;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border); border-radius: 16px;
  box-shadow: 0 20px 50px rgba(80, 130, 120, 0.18);
  z-index: 300; padding: 8px;
  animation: popIn 0.22s var(--ease);
  display: none;
}
.search-panel.show { display: block; }
.search-panel .sp-title { font-size: 10.5px; color: var(--text-faint); letter-spacing: 1.6px; padding: 8px 10px 4px; }
.search-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 10px; cursor: pointer;
  transition: background 0.15s;
}
.search-item:hover { background: rgba(77, 214, 168, 0.1); }
.search-item .si-ic { font-size: 15px; width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: rgba(77, 214, 168, 0.12); flex-shrink: 0; }
.search-item .si-main { flex: 1; min-width: 0; }
.search-item .si-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-primary); }
.search-item .si-sub { font-size: 11px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-item .si-src { font-size: 10px; color: #237a5e; background: var(--green-bg); padding: 1px 7px; border-radius: 5px; flex-shrink: 0; }
@keyframes popIn { from { opacity: 0; transform: translateY(-8px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

.page-container { position: relative; }

/* 移动端 */
.mobile-topbar {
  display: none; position: sticky; top: 0; z-index: 90;
  align-items: center; gap: 10px;
  padding: 10px 14px;
  background: rgba(250, 252, 251, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
}
.mobile-title { font-weight: 600; font-size: 14px; flex: 1; color: #2f4b57; }
.icon-btn {
  background: rgba(255, 255, 255, 0.85); border: 1px solid var(--glass-border);
  color: var(--text-primary); border-radius: 10px;
  width: 36px; height: 36px; font-size: 15px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.18s var(--ease);
}
.icon-btn:hover { background: #fff; transform: scale(1.05); box-shadow: 0 2px 8px rgba(80,130,120,.12); }
.drawer-mask { display: none; position: fixed; inset: 0; background: rgba(60, 90, 85, 0.3); z-index: 99; opacity: 0; transition: opacity 0.3s; }
.drawer-mask.show { display: block; opacity: 1; }

/* ============================ 卡片 ============================ */
.glass-card {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
  animation: cardIn 0.45s var(--ease) both;
  overflow: hidden;
}
.glass-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent);
  pointer-events: none;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.glass-card.hoverable:hover {
  border-color: var(--glass-border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.card-title { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 9px; letter-spacing: 0.2px; color: #34475c; }
.card-title .bar { width: 4px; height: 16px; border-radius: 4px; background: var(--accent-grad); box-shadow: 0 0 8px rgba(77, 214, 168, 0.5); }
.card-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ============================ KPI ============================ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(196px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.kpi-card {
  position: relative; overflow: hidden;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 17px 17px 15px;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  animation: cardIn 0.45s var(--ease) both;
}
.kpi-card:hover { transform: translateY(-4px); border-color: rgba(77, 214, 168, 0.35); box-shadow: var(--shadow); }
.kpi-card:active { transform: translateY(-1px) scale(0.99); }
.kpi-card::after {
  content: ""; position: absolute; right: -34px; top: -34px;
  width: 100px; height: 100px; border-radius: 50%;
  background: var(--accent-grad-2); opacity: 0.1; filter: blur(24px);
  transition: opacity 0.25s;
}
.kpi-card:hover::after { opacity: 0.2; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.kpi-ic {
  width: 38px; height: 38px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  background: linear-gradient(135deg, rgba(77, 214, 168, 0.22), rgba(74, 168, 240, 0.16));
  border: 1px solid rgba(77, 214, 168, 0.3);
}
.kpi-card.green .kpi-ic { background: linear-gradient(135deg, rgba(76, 209, 160, 0.22), rgba(76, 209, 160, 0.1)); border-color: rgba(76, 209, 160, 0.35); }
.kpi-card.red .kpi-ic { background: linear-gradient(135deg, rgba(255, 123, 138, 0.2), rgba(255, 123, 138, 0.1)); border-color: rgba(255, 123, 138, 0.32); }
.kpi-card.orange .kpi-ic { background: linear-gradient(135deg, rgba(255, 179, 92, 0.22), rgba(255, 179, 92, 0.1)); border-color: rgba(255, 179, 92, 0.34); }
.kpi-card.yellow .kpi-ic { background: linear-gradient(135deg, rgba(243, 201, 72, 0.2), rgba(243, 201, 72, 0.1)); border-color: rgba(243, 201, 72, 0.32); }
.kpi-label { font-size: 12px; color: var(--text-secondary); display: flex; align-items: center; gap: 6px; }
.kpi-go { font-size: 10px; color: var(--text-faint); opacity: 0; transform: translateX(-4px); transition: all 0.2s var(--ease); }
.kpi-card:hover .kpi-go { opacity: 1; transform: translateX(0); }
.kpi-val { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.15; letter-spacing: -0.3px; color: #2f4b57; }
.kpi-val small { font-size: 12px; font-weight: 500; color: var(--text-secondary); margin-left: 2px; }
.kpi-delta { font-size: 11px; margin-top: 6px; color: var(--text-faint); display: flex; align-items: center; gap: 5px; }
.kpi-delta.up { color: #2fa97f; }
.kpi-delta.down { color: #f07888; }

/* ============================ 表单 ============================ */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 13px; margin-bottom: 15px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 12px; color: var(--text-secondary); font-weight: 500; }
.input, .sel, .textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  color: var(--text-primary);
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.input:focus, .sel:focus, .textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(77, 214, 168, 0.16);
  background: #fff;
}
.input::placeholder, .textarea::placeholder { color: var(--text-faint); }
.textarea { min-height: 96px; resize: vertical; line-height: 1.65; }
.sel { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%237d92a8' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; padding-right: 32px; cursor: pointer; }
.sel option { background: #fff; color: var(--text-primary); }

/* ============================ 按钮 ============================ */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 17px;
  border-radius: 12px;
  border: none; cursor: pointer;
  font-size: 13.5px; font-weight: 600;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
  user-select: none;
  letter-spacing: 0.2px;
}
.btn:active { transform: scale(0.96); }
.btn-primary {
  background: var(--accent-grad); color: #fff;
  box-shadow: 0 5px 16px rgba(77, 214, 168, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-primary:hover { box-shadow: 0 8px 24px rgba(77, 214, 168, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.35); filter: brightness(1.04); transform: translateY(-1px); }
.btn-danger { background: linear-gradient(135deg, #ff8fa3, #ff6f85); color: #fff; box-shadow: 0 5px 16px rgba(255, 123, 138, 0.32); }
.btn-danger:hover { filter: brightness(1.04); box-shadow: 0 8px 22px rgba(255, 123, 138, 0.42); transform: translateY(-1px); }
.btn-success { background: linear-gradient(135deg, #4cd1a0, #2fb98a); color: #fff; box-shadow: 0 5px 16px rgba(76, 209, 160, 0.32); }
.btn-success:hover { filter: brightness(1.04); box-shadow: 0 8px 22px rgba(76, 209, 160, 0.45); transform: translateY(-1px); }
.btn-outline { background: rgba(255, 255, 255, 0.9); border: 1px solid var(--glass-border); color: var(--text-primary); }
.btn-outline:hover { border-color: rgba(77, 214, 168, 0.5); background: #fff; color: #237a5e; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(80,130,120,.1); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { color: var(--text-primary); background: rgba(77, 214, 168, 0.08); }
.btn-sm { padding: 6px 11px; font-size: 12px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }
.btn:disabled:hover { filter: none; box-shadow: none; }

/* 波纹 */
.ripple-ink {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: rgba(255, 255, 255, 0.5);
  transform: scale(0); animation: rippleAnim 0.6s var(--ease) forwards;
}
.ripple-ink.dark { background: rgba(45, 120, 95, 0.16); }
@keyframes rippleAnim { to { transform: scale(3.2); opacity: 0; } }

.action-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.action-bar.center { justify-content: center; }

/* ============================ 标签 / 徽章 / 筛选 ============================ */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600;
  padding: 3px 9px; border-radius: 7px;
  margin: 1px 2px 1px 0;
  letter-spacing: 0.2px;
  white-space: nowrap;
  border: 1px solid transparent;
}
.tag-high { background: var(--red-bg); color: #f06a7c; border-color: rgba(255, 123, 138, 0.25); }
.tag-mid { background: var(--orange-bg); color: #e8974a; border-color: rgba(255, 179, 92, 0.3); }
.tag-low { background: var(--green-bg); color: #2fa97f; border-color: rgba(76, 209, 160, 0.3); }
.tag-tax { background: var(--blue-bg); color: #3f8fd8; border-color: rgba(74, 168, 240, 0.3); }
.tag-receivable { background: rgba(95, 211, 211, 0.14); color: #2ea8a8; border-color: rgba(95, 211, 211, 0.32); }
.tag-payable { background: rgba(255, 110, 60, 0.13); color: #e07b3a; border-color: rgba(255, 110, 60, 0.28); }
.tag-cost { background: rgba(157, 140, 255, 0.13); color: #7a6ae0; border-color: rgba(157, 140, 255, 0.3); }
.tag-close { background: rgba(240, 166, 200, 0.15); color: #d76f9d; border-color: rgba(240, 166, 200, 0.32); }
.tag-entry { background: var(--blue-bg); color: #3f8fd8; border-color: rgba(74, 168, 240, 0.3); }
.tag-sys { background: rgba(157, 140, 255, 0.13); color: #7a6ae0; border-color: rgba(157, 140, 255, 0.3); }
.tag-excel { background: var(--green-bg); color: #2fa97f; border-color: rgba(76, 209, 160, 0.3); }
.tag-other { background: rgba(90, 130, 120, 0.1); color: var(--text-secondary); }
.tag-input { background: var(--blue-bg); color: #3f8fd8; border-color: rgba(74, 168, 240, 0.3); }
.tag-output { background: var(--green-bg); color: #2fa97f; border-color: rgba(76, 209, 160, 0.3); }
.tag-expense { background: var(--orange-bg); color: #e8974a; border-color: rgba(255, 179, 92, 0.3); }
.tag-accept { background: rgba(240, 166, 200, 0.15); color: #d76f9d; border-color: rgba(240, 166, 200, 0.32); }
.tag-wait { background: var(--yellow-bg); color: #c79a1f; border-color: rgba(243, 201, 72, 0.32); }
.tag-auth { background: rgba(95, 211, 211, 0.14); color: #2ea8a8; border-color: rgba(95, 211, 211, 0.32); }
.tag-entry2 { background: var(--blue-bg); color: #3f8fd8; border-color: rgba(74, 168, 240, 0.3); }
.tag-archive { background: rgba(90, 130, 120, 0.1); color: var(--text-secondary); }
.tag-pending { background: var(--yellow-bg); color: #c79a1f; border-color: rgba(243, 201, 72, 0.32); }
.tag-processing { background: rgba(95, 211, 211, 0.14); color: #2ea8a8; border-color: rgba(95, 211, 211, 0.32); }
.tag-review { background: rgba(157, 140, 255, 0.13); color: #7a6ae0; border-color: rgba(157, 140, 255, 0.3); }
.tag-done { background: var(--green-bg); color: #2fa97f; border-color: rgba(76, 209, 160, 0.3); }
.tag-open { background: var(--red-bg); color: #f06a7c; border-color: rgba(255, 123, 138, 0.25); }
.tag-cleared { background: var(--green-bg); color: #2fa97f; border-color: rgba(76, 209, 160, 0.3); }
.tag-overdue { background: var(--red-bg); color: #f06a7c; border-color: rgba(255, 123, 138, 0.3); animation: tagBlink 2.2s ease-in-out infinite; }
@keyframes tagBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
.tag-default { background: rgba(90, 130, 120, 0.1); color: var(--text-secondary); }

.filter-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 15px;
}
.filter-bar .input, .filter-bar .sel { width: auto; min-width: 130px; }
.search-box { position: relative; }
.search-box .input { padding-left: 36px; width: 230px; }
.search-box::before {
  content: "🔍"; position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  font-size: 12px; opacity: 0.6; pointer-events: none;
}
.count-pill {
  font-size: 12px; color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.85); border: 1px solid var(--glass-border);
  padding: 3px 11px; border-radius: 20px;
  white-space: nowrap;
}

/* ============================ 列表 ============================ */
.list-wrap { display: flex; flex-direction: column; gap: 10px; }
.list-item {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--glass-border);
  border-radius: 13px;
  padding: 14px 16px;
  transition: all 0.2s var(--ease);
  animation: itemIn 0.35s var(--ease) both;
}
@keyframes itemIn { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
.list-item:hover { background: #fff; border-color: rgba(77, 214, 168, 0.35); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(80,130,120,.08); }
.list-item.overdue { background: linear-gradient(160deg, rgba(255, 123, 138, 0.1), rgba(255, 123, 138, 0.04)); border-color: rgba(255, 123, 138, 0.4); }
.list-item.overdue:hover { border-color: var(--danger); }
.item-main { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.item-title { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--text-primary); }
.item-sub { font-size: 12px; color: var(--text-secondary); margin-top: 3px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.item-meta { font-size: 11.5px; color: var(--text-faint); margin-top: 5px; display: flex; gap: 12px; flex-wrap: wrap; }
.item-body { font-size: 13px; color: var(--text-secondary); margin-top: 7px; white-space: pre-wrap; word-break: break-word; }
.item-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }

.empty-state { text-align: center; padding: 46px 10px; color: var(--text-faint); }
.empty-ic { font-size: 44px; margin-bottom: 12px; opacity: 0.8; }

/* ============================ 表格 ============================ */
.table-wrap { overflow-x: auto; border-radius: 13px; border: 1px solid var(--glass-border); background: rgba(255, 255, 255, 0.7); }
table.table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 560px; }
.table th {
  text-align: left; padding: 11px 15px;
  font-size: 11px; font-weight: 700; color: var(--text-secondary);
  background: rgba(90, 140, 130, 0.07);
  border-bottom: 1px solid var(--glass-border);
  white-space: nowrap;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.table td { padding: 11px 15px; border-bottom: 1px solid rgba(80, 130, 120, 0.08); vertical-align: middle; }
.table tbody tr { transition: background 0.15s; }
.table tbody tr:hover { background: rgba(77, 214, 168, 0.08); }
.table tbody tr:last-child td { border-bottom: none; }
.table .num { font-variant-numeric: tabular-nums; text-align: right; }
.table .row-total td { font-weight: 700; background: rgba(77, 214, 168, 0.1); }

/* ============================ 进度条 / 环形图 ============================ */
.progress-track { height: 7px; border-radius: 6px; background: rgba(80, 130, 120, 0.12); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 6px; background: var(--accent-grad); transition: width 0.7s var(--ease); box-shadow: 0 0 8px rgba(77, 214, 168, 0.35); }
.progress-fill.green { background: linear-gradient(90deg, #4cd1a0, #8de3c4); box-shadow: 0 0 8px rgba(76, 209, 160, 0.35); }
.progress-fill.red { background: linear-gradient(90deg, #ff8fa3, #ffb3bf); box-shadow: 0 0 8px rgba(255, 123, 138, 0.35); }
.progress-fill.orange { background: linear-gradient(90deg, #ffb35c, #ffd19a); box-shadow: 0 0 8px rgba(255, 179, 92, 0.35); }

.ring-wrap { display: flex; align-items: center; gap: 16px; }
.ring { transform: rotate(-90deg); }
.ring .ring-track { stroke: rgba(80, 130, 120, 0.14); }
.ring .ring-fill { stroke: url(#ringGrad); stroke-linecap: round; transition: stroke-dashoffset 0.9s var(--ease); filter: drop-shadow(0 0 4px rgba(77, 214, 168, 0.4)); }
.ring-text { text-anchor: middle; font-size: 15px; font-weight: 800; fill: #2f4b57; }
.ring-sub { text-anchor: middle; font-size: 8.5px; fill: var(--text-secondary); }

/* ============================ 图表 ============================ */
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.chart-box { min-width: 0; }
.chart-wrap { position: relative; height: 260px; }
.chart-wrap.tall { height: 320px; }
.chart-legend-note { font-size: 11px; color: var(--text-faint); margin-top: 6px; }

/* ============================ 事件（今日事务） ============================ */
.event-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 15px; border-radius: 13px; margin-bottom: 9px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.75);
  animation: itemIn 0.35s var(--ease) both;
  transition: transform 0.2s var(--ease), border-color 0.2s;
}
.event-item:hover { transform: translateX(3px); border-color: rgba(77, 214, 168, 0.35); }
.event-item.danger { background: linear-gradient(160deg, rgba(255, 123, 138, 0.11), rgba(255, 123, 138, 0.03)); border-color: rgba(255, 123, 138, 0.4); }
.event-item.orange { background: linear-gradient(160deg, rgba(255, 179, 92, 0.11), rgba(255, 179, 92, 0.03)); border-color: rgba(255, 179, 92, 0.36); }
.event-item.yellow { background: linear-gradient(160deg, rgba(243, 201, 72, 0.1), rgba(243, 201, 72, 0.03)); border-color: rgba(243, 201, 72, 0.34); }
.event-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 7px; flex-shrink: 0; }
.event-item.danger .event-dot { background: var(--danger); box-shadow: 0 0 9px rgba(255, 123, 138, 0.7); }
.event-item.orange .event-dot { background: var(--orange); box-shadow: 0 0 9px rgba(255, 179, 92, 0.6); }
.event-item.yellow .event-dot { background: var(--warn); box-shadow: 0 0 9px rgba(243, 201, 72, 0.55); }
.event-content { flex: 1; min-width: 0; }
.event-title { font-weight: 600; font-size: 13.5px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; color: var(--text-primary); }
.event-src { font-size: 10.5px; font-weight: 500; color: var(--text-secondary); background: rgba(90, 130, 120, 0.1); padding: 1px 8px; border-radius: 6px; }
.event-date { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.event-date .days { color: var(--text-faint); margin-left: 6px; }

/* ============================ 热力图（打卡） ============================ */
.heatmap { display: inline-flex; gap: 3.5px; padding: 10px 4px; overflow-x: auto; max-width: 100%; }
.heat-col { display: flex; flex-direction: column; gap: 3.5px; }
.heat-cell { width: 12.5px; height: 12.5px; border-radius: 3.5px; background: rgba(80, 130, 120, 0.12); }
.heat-cell.l1 { background: rgba(76, 209, 160, 0.35); }
.heat-cell.l2 { background: rgba(76, 209, 160, 0.58); }
.heat-cell.l3 { background: rgba(76, 209, 160, 0.82); }
.heat-cell.l4 { background: #4cd1a0; box-shadow: 0 0 8px rgba(76, 209, 160, 0.5); }
.heat-cell.future { background: transparent; }
.heat-cell.today { outline: 1.5px solid var(--warn); outline-offset: 1.5px; }
.heat-legend { display: flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--text-faint); margin-top: 6px; }
.heat-legend .heat-cell { width: 11px; height: 11px; }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; max-width: 480px; }
.cal-cell {
  aspect-ratio: 1; border-radius: 10px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--glass-border);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 12.5px; color: var(--text-secondary);
  transition: all 0.18s var(--ease);
}
.cal-cell .dot { width: 5px; height: 5px; border-radius: 50%; margin-top: 2px; }
.cal-cell.checked { background: var(--green-bg); border-color: rgba(76, 209, 160, 0.45); color: #2fa97f; font-weight: 700; }
.cal-cell.checked .dot { background: var(--success); box-shadow: 0 0 7px rgba(76, 209, 160, 0.7); }
.cal-cell.blank { background: transparent; border-color: transparent; }
.cal-cell.today { outline: 1.5px solid var(--warn); outline-offset: 1.5px; }

/* ============================ 弹窗 ============================ */
.modal-mask {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(60, 95, 88, 0.28);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 18px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s var(--ease);
}
.modal-mask.show { display: flex !important; opacity: 1; pointer-events: auto; }
.modal {
  width: 100%; max-width: 520px; max-height: 88vh; overflow-y: auto;
  background: #fff;
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(60, 95, 88, 0.2);
  transform: translateY(26px) scale(0.97);
  transition: transform 0.3s var(--ease);
  position: relative;
}
.modal::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; border-radius: 20px 20px 0 0; background: var(--accent-grad); }
.modal-mask.show .modal { transform: translateY(0) scale(1); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 19px 22px 0; }
.modal-head h3 { font-size: 16.5px; font-weight: 700; color: #2f4b57; }
.modal-body { padding: 17px 22px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 4px 22px 20px; }

/* ============================ Toast ============================ */
.toast-wrap { position: fixed; top: 18px; right: 18px; z-index: 500; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 10px;
  min-width: 250px; max-width: 380px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-left: 3px solid var(--accent);
  border-radius: 13px;
  padding: 13px 17px;
  font-size: 13px;
  color: var(--text-primary);
  box-shadow: 0 14px 36px rgba(60, 95, 88, 0.18);
  animation: toastIn 0.35s var(--ease);
}
@keyframes toastIn { from { opacity: 0; transform: translateX(70px); } to { opacity: 1; transform: translateX(0); } }
.toast.out { animation: toastOut 0.3s var(--ease) forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateX(70px); } }
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warn { border-left-color: var(--warn); }
.toast-ic { font-size: 16px; }

/* ============================ 骨架屏 ============================ */
.skeleton-page { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.skeleton-card {
  height: 150px; border-radius: var(--radius);
  background: linear-gradient(100deg, rgba(80, 130, 120, 0.06) 40%, rgba(80, 130, 120, 0.12) 50%, rgba(80, 130, 120, 0.06) 60%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
}
.skeleton-card.tall { height: 280px; }
.skeleton-line { height: 12px; border-radius: 6px; background: rgba(80, 130, 120, 0.1); margin: 8px 0; animation: shimmer 1.4s infinite linear; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ============================ 锁屏 / 初始化 ============================ */
.lock-screen {
  position: fixed; inset: 0; z-index: 400;
  background: linear-gradient(160deg, #e3f4ee 0%, #f4faf8 45%, #e8f1fb 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.lock-screen::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(90, 140, 130, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(90, 140, 130, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 30%, black, transparent 75%);
}
.lock-screen.hidden { display: none; }
.lock-card {
  position: relative;
  width: 100%; max-width: 390px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(22px);
  border: 1px solid rgba(80, 130, 120, 0.16);
  border-radius: 22px;
  padding: 36px 30px;
  text-align: center;
  box-shadow: 0 24px 70px rgba(60, 95, 88, 0.18);
  animation: cardIn 0.5s var(--ease);
}
.lock-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; border-radius: 22px 22px 0 0; background: var(--accent-grad); }
.lock-ic { font-size: 48px; margin-bottom: 14px; animation: logoPulse 3s infinite; display: inline-block; }
.lock-card h2 { font-size: 19px; font-weight: 800; margin-bottom: 6px; color: #2f4b57; }
.lock-card p { font-size: 12.5px; color: var(--text-secondary); margin-bottom: 18px; }
.lock-card .input { margin-bottom: 13px; text-align: center; font-size: 15px; letter-spacing: 2px; }
.lock-err { color: var(--danger); font-size: 12px; min-height: 18px; margin-top: 11px; }
.init-steps { text-align: left; margin: 15px 0 19px; padding-left: 20px; font-size: 12.5px; color: var(--text-secondary); line-height: 2.1; }
.init-steps code { background: rgba(77, 214, 168, 0.14); color: #237a5e; padding: 1px 6px; border-radius: 5px; font-size: 11.5px; }

/* ============================ 工具类 ============================ */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.flex { display: flex; align-items: center; gap: 10px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.center { text-align: center; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }
.hidden { display: none !important; }
.fade-in { animation: fadeIn 0.4s var(--ease); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--glass-border), transparent); margin: 15px 0; }
.num-mono { font-variant-numeric: tabular-nums; }
.text-secondary { color: var(--text-secondary); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warn { color: var(--warn); }
.bold { font-weight: 700; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.chip {
  padding: 5px 13px; border-radius: 22px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.85); color: var(--text-secondary);
  font-size: 12px; cursor: pointer;
  transition: all 0.18s var(--ease);
}
.chip:hover { border-color: rgba(77, 214, 168, 0.5); color: #237a5e; transform: translateY(-1px); }
.chip.active { background: var(--accent-grad); border-color: transparent; color: #fff; font-weight: 600; box-shadow: 0 4px 14px rgba(77, 214, 168, 0.35); }

.footer-note { text-align: center; font-size: 11px; color: var(--text-faint); margin-top: 30px; }
.ring-wrap-center { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.big-number { font-size: 26px; font-weight: 800; color: #2f4b57; }

/* ============================ 响应式 ============================ */
@media (max-width: 1180px) {
  :root { --sidebar-w: 244px; }
  .global-search .input, .global-search .input:focus { width: 190px; }
}
@media (max-width: 900px) {
  .main { padding: 16px 18px 50px; }
  .page-head h1 { font-size: 20px; }
  .search-panel { width: min(380px, calc(100vw - 40px)); }
}
@media (max-width: 768px) {
  .mobile-topbar { display: flex; }
  .main { margin-left: 0; padding: 14px 12px 50px; }
  .sidebar { transform: translateX(-100%); box-shadow: 24px 0 60px rgba(60, 95, 88, 0.25); }
  .sidebar.open { transform: translateX(0); }
  .page-head-right { width: 100%; justify-content: space-between; }
  .clock-box { text-align: left; }
  .global-search { order: 3; width: 100%; }
  .global-search .input, .global-search .input:focus { width: 100%; }
  .search-panel { width: 100%; right: 0; }
  .kpi-grid { grid-template-columns: repeat(auto-fit, minmax(152px, 1fr)); gap: 10px; }
  .chart-grid { grid-template-columns: 1fr; }
  .search-box .input { width: 100%; }
  .filter-bar .input, .filter-bar .sel { width: 100%; min-width: 0; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .chart-wrap { height: 230px; }
}
@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .kpi-val { font-size: 20px; }
  .modal { max-width: 100%; }
  .toast-wrap { left: 12px; right: 12px; }
  .toast { max-width: none; }
  .page-head h1 { font-size: 18px; }
}

/* ============================ AI 财务助手 ============================ */
.ai-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 260;
  width: 58px; height: 58px; border-radius: 50%;
  border: none; cursor: pointer;
  background: var(--accent-grad);
  color: #fff; font-size: 25px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 26px rgba(77, 214, 168, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), opacity 0.25s var(--ease);
  animation: aiFabPulse 3s ease-in-out infinite;
}
.ai-fab.hide { opacity: 0; pointer-events: none; transform: scale(0.6); }
.ai-fab:hover { transform: translateY(-3px) scale(1.06); box-shadow: 0 14px 34px rgba(74, 168, 240, 0.55); }
.ai-fab-ic { line-height: 1; display: flex; align-items: center; justify-content: center; }
.ai-fab-ic svg { width: 30px; height: 30px; display: block; }
@keyframes aiFabPulse {
  0%, 100% { box-shadow: 0 10px 26px rgba(77, 214, 168, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.45); }
  50% { box-shadow: 0 10px 36px rgba(74, 168, 240, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.45); }
}

.ai-panel {
  position: fixed; right: 22px; bottom: 92px; z-index: 260;
  width: min(410px, calc(100vw - 24px));
  height: min(640px, calc(100vh - 130px));
  min-height: 360px;
  display: flex; flex-direction: column;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(60, 95, 88, 0.24);
  overflow: hidden;
  transform-origin: bottom right;
  opacity: 0; transform: translateY(20px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease);
}
.ai-panel.show { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

.ai-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 15px;
  background: linear-gradient(135deg, rgba(77, 214, 168, 0.12), rgba(74, 168, 240, 0.12));
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}
.ai-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ai-logo { display: flex; align-items: center; }
.ai-logo svg { width: 26px; height: 26px; display: block; }
.ai-name { font-weight: 800; font-size: 14.5px; color: #2f4b57; line-height: 1.25; }
.ai-sub { font-size: 10.5px; color: var(--text-faint); letter-spacing: 0.4px; }
.ai-head-actions { display: flex; gap: 4px; flex-shrink: 0; }
.ai-icon-btn {
  width: 30px; height: 30px; border-radius: 9px;
  border: 1px solid transparent; background: rgba(255, 255, 255, 0.7);
  color: var(--text-secondary); cursor: pointer; font-size: 14px;
  transition: all 0.18s var(--ease);
}
.ai-icon-btn:hover { border-color: rgba(77, 214, 168, 0.5); color: #237a5e; background: #fff; }

.ai-msgs {
  flex: 1; overflow-y: auto; padding: 16px 14px 8px;
  display: flex; flex-direction: column; gap: 12px;
}
.ai-welcome { text-align: center; padding: 36px 16px 16px; color: var(--text-secondary); }
.ai-w-ic { margin-bottom: 12px; display: flex; justify-content: center; animation: logoPulse 3.4s ease-in-out infinite; }
.ai-w-ic svg { width: 48px; height: 48px; display: block; filter: drop-shadow(0 6px 16px rgba(77, 214, 168, 0.35)); }
.ai-w-t { font-weight: 800; font-size: 15px; color: #2f4b57; margin-bottom: 6px; }
.ai-w-s { font-size: 12.5px; line-height: 1.8; color: var(--text-faint); }

.ai-msg { display: flex; gap: 8px; max-width: 100%; }
.ai-msg.user { justify-content: flex-end; }
.ai-avatar {
  width: 30px; height: 30px; border-radius: 10px; flex-shrink: 0;
  background: var(--accent-grad);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(77, 214, 168, 0.35);
}
.ai-avatar svg { width: 20px; height: 20px; display: block; }
.ai-bubble {
  padding: 10px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.7;
  word-break: break-word;
  max-width: 82%;
}
.ai-msg.user .ai-bubble {
  background: var(--accent-grad); color: #fff;
  border-bottom-right-radius: 5px;
  box-shadow: 0 5px 16px rgba(77, 214, 168, 0.3);
}
.ai-msg.assistant .ai-bubble {
  background: #fff; color: var(--text-primary);
  border: 1px solid var(--glass-border);
  border-bottom-left-radius: 5px;
  box-shadow: 0 4px 12px rgba(80, 130, 120, 0.08);
}

.ai-md-p { margin: 0 0 7px; }
.ai-md-p:last-child { margin-bottom: 0; }
.ai-md-h { font-size: 14px; font-weight: 700; color: #2f4b57; margin: 9px 0 6px; }
.ai-md-h:first-child { margin-top: 0; }
.ai-md-li { margin: 2px 0; }
.ai-md-num { font-weight: 700; color: #237a5e; margin-right: 2px; }
.ai-md-code {
  background: rgba(77, 214, 168, 0.14); color: #237a5e;
  padding: 1px 6px; border-radius: 5px; font-size: 12px;
  font-family: "Cascadia Code", Consolas, monospace;
}
.ai-md-pre {
  background: #0f2a23; color: #e7f6f0; border-radius: 10px;
  padding: 11px 13px; margin: 8px 0; overflow-x: auto; font-size: 12px;
  line-height: 1.6; font-family: "Cascadia Code", Consolas, monospace;
}
.ai-md-pre code { background: transparent; color: inherit; padding: 0; font-size: inherit; }
.ai-md-quote {
  border-left: 3px solid var(--accent); padding: 2px 10px;
  margin: 7px 0; color: var(--text-secondary); background: rgba(77, 214, 168, 0.06);
  border-radius: 0 8px 8px 0;
}
.ai-md a { color: var(--accent-2); text-decoration: underline; }

.ai-typing { display: inline-flex; gap: 5px; padding: 4px 2px; }
.ai-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); opacity: 0.4; animation: aiTyping 1.1s infinite ease-in-out; }
.ai-typing i:nth-child(2) { animation-delay: 0.15s; }
.ai-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes aiTyping { 0%, 100% { opacity: 0.35; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }

.ai-quick {
  display: flex; flex-wrap: wrap; gap: 7px;
  padding: 4px 14px 10px; flex-shrink: 0;
}
.ai-chip {
  padding: 6px 12px; border-radius: 18px; font-size: 11.5px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.85); color: var(--text-secondary);
  cursor: pointer; transition: all 0.18s var(--ease);
}
.ai-chip:hover { border-color: rgba(77, 214, 168, 0.55); color: #237a5e; transform: translateY(-1px); }

.ai-foot {
  display: flex; align-items: flex-end; gap: 8px;
  padding: 10px 12px; border-top: 1px solid var(--glass-border); flex-shrink: 0;
  background: rgba(255, 255, 255, 0.6);
}
.ai-input {
  flex: 1; resize: none; min-height: 40px; max-height: 140px;
  padding: 10px 13px; font-size: 13.5px; line-height: 1.6;
  border: 1px solid var(--glass-border); border-radius: 12px;
  background: rgba(255, 255, 255, 0.9); color: var(--text-primary); outline: none;
  font-family: inherit;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.ai-input:focus { border-color: rgba(77, 214, 168, 0.6); box-shadow: 0 0 0 3px rgba(77, 214, 168, 0.15); }
.ai-input:disabled { opacity: 0.6; }
.ai-send {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  border: none; cursor: pointer; font-size: 16px; color: #fff;
  background: var(--accent-grad);
  box-shadow: 0 5px 16px rgba(77, 214, 168, 0.35);
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}
.ai-send:hover { transform: translateY(-2px); }
.ai-send:disabled { opacity: 0.5; transform: none; }

.ai-toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%);
  z-index: 520; background: rgba(47, 75, 87, 0.92); color: #fff;
  padding: 9px 18px; border-radius: 12px; font-size: 12.5px;
  box-shadow: 0 10px 30px rgba(60, 95, 88, 0.3);
  animation: toastIn 0.3s var(--ease);
}

@media (max-width: 768px) {
  .ai-fab { right: 16px; bottom: 16px; width: 54px; height: 54px; }
  .ai-panel {
    right: 12px; bottom: 82px; left: 12px;
    width: auto; height: min(600px, calc(100vh - 100px));
  }
}

/* ============================ CPA 备考系统样式 ============================ */

/* 统计面板 */
.cpa-stats-container {
  margin-bottom: 20px;
}

.stats-panel {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.stat-icon {
  font-size: 32px;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-grad);
  border-radius: 12px;
  color: white;
}

.stat-content {
  flex: 1;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
}

/* 统计行 */
.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* 科目进度面板 */
.subject-progress-panel,
.mastery-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 24px;
}

.subject-progress-panel h4,
.mastery-panel h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--glass-border);
}

.subject-progress-item {
  margin-bottom: 16px;
}

.subject-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.subject-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.subject-name {
  flex: 1;
  font-size: 14px;
  color: var(--text-primary);
}

.subject-minutes {
  font-size: 13px;
  color: var(--text-secondary);
}

.progress-bar {
  height: 8px;
  background: rgba(80, 130, 120, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}

/* 掌握程度分布 */
.mastery-chart {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mastery-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mastery-label {
  width: 80px;
  font-size: 14px;
  color: var(--text-primary);
}

.mastery-bar {
  flex: 1;
  height: 10px;
  background: rgba(80, 130, 120, 0.1);
  border-radius: 5px;
  overflow: hidden;
}

.mastery-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.6s ease;
}

.mastery-count {
  width: 100px;
  font-size: 13px;
  color: var(--text-secondary);
  text-align: right;
}

/* 学习记录行样式 */
.study-row-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.study-row-sub {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.subject-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.mastery-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.difficulty {
  font-size: 14px;
  letter-spacing: 2px;
}

.study-note {
  margin-top: 8px;
  padding: 12px;
  background: rgba(80, 130, 120, 0.05);
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  white-space: pre-wrap;
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .stats-panel {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .stats-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .stats-panel {
    grid-template-columns: 1fr;
  }
  
  .stat-card {
    padding: 16px;
  }
  
  .stat-icon {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }
  
  .stat-value {
    font-size: 20px;
  }
  
  .subject-progress-panel,
  .mastery-panel {
    padding: 16px;
  }
  
  .mastery-item {
    flex-wrap: wrap;
  }
  
  .mastery-label {
    width: 100%;
  }
  
  .mastery-count {
    width: 100%;
    text-align: left;
  }
}

/* ============================ Excel 工作簿 ============================ */
.ss-wrap {
  display: flex; flex-direction: column;
  height: min(calc(100vh - 140px), 680px);
  min-height: 420px;
  background: #fff; border-radius: 14px;
  overflow: hidden; font-size: 13px;
  border: 1px solid var(--glass-border);
}
.ss-toolbar {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 8px 12px;
  background: rgba(248, 250, 249, 0.9);
  border-bottom: 1px solid var(--glass-border);
}
.ss-toolbar-group {
  display: flex; align-items: center; gap: 3px;
  padding: 0 6px;
  border-right: 1px solid rgba(80, 130, 120, 0.15);
}
.ss-toolbar-group:last-child { border-right: none; }
.ss-btn {
  padding: 5px 9px; border-radius: 7px;
  border: 1px solid transparent; background: transparent;
  color: var(--text-secondary); cursor: pointer; font-size: 12.5px;
  transition: all 0.15s var(--ease); line-height: 1.3;
}
.ss-btn:hover { background: rgba(77, 214, 168, 0.1); border-color: rgba(77, 214, 168, 0.3); color: #237a5e; }
.ss-btn-primary { background: var(--accent-grad); color: #fff; border: none; }
.ss-btn-primary:hover { filter: brightness(1.06); }
.ss-btn:active { transform: scale(0.95); }
.ss-color-pick {
  position: relative; display: inline-flex; align-items: center;
  padding: 4px 7px; border-radius: 7px; cursor: pointer;
  border: 1px solid var(--glass-border); font-size: 12px; color: var(--text-secondary);
  transition: all 0.15s var(--ease);
}
.ss-color-pick:hover { border-color: var(--accent); }
.ss-color-input {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.ss-tb-bold { font-weight: 900; font-size: 14px; }
.ss-tb-italic { font-style: italic; font-size: 14px; }
.ss-tb-underline { text-decoration: underline; font-size: 13px; }

.ss-formula-bar {
  display: flex; align-items: center;
  padding: 4px 12px;
  background: #fff;
  border-bottom: 1px solid var(--glass-border);
}
.ss-cell-ref {
  min-width: 60px; padding: 4px 8px;
  background: rgba(77, 214, 168, 0.1); border-radius: 6px;
  font-weight: 700; font-size: 12px; color: #237a5e;
  text-align: center; flex-shrink: 0;
}
.ss-fx {
  margin: 0 8px; color: var(--text-faint); font-style: italic; font-size: 13px; font-weight: 600;
}
.ss-formula-input {
  flex: 1; border: none; outline: none; font-size: 13px;
  color: var(--text-primary); background: transparent;
  padding: 4px 0;
}
.ss-formula-input::placeholder { color: var(--text-faint); }

.ss-grid-wrap {
  flex: 1; overflow: auto; position: relative;
  background: #fff;
}
.ss-grid {
  border-collapse: collapse; table-layout: fixed;
  font-size: 13px; user-select: none;
}
.ss-corner {
  width: 48px; min-width: 48px; height: 26px;
  background: #f3f8f6; border: 1px solid var(--glass-border);
  position: sticky; left: 0; top: 0; z-index: 2;
}
.ss-col-h {
  min-width: 80px; width: 80px; height: 26px;
  background: #f3f8f6; border: 1px solid var(--glass-border);
  text-align: center; font-weight: 700; color: var(--text-secondary);
  font-size: 11.5px; position: sticky; top: 0; z-index: 1;
  letter-spacing: 0.5px;
}
.ss-row-h {
  width: 48px; min-width: 48px;
  background: #f3f8f6; border: 1px solid var(--glass-border);
  text-align: center; font-weight: 700; color: var(--text-secondary);
  font-size: 11.5px; position: sticky; left: 0; z-index: 1;
}
.ss-cell {
  min-width: 80px; width: 80px; height: 26px;
  border: 1px solid rgba(80, 130, 120, 0.12);
  padding: 0 6px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; cursor: cell;
  font-size: 13px; color: var(--text-primary);
  transition: none;
}
.ss-cell:focus { outline: 2.5px solid var(--accent); outline-offset: -1px; z-index: 3; }
.ss-cell[contenteditable="true"] { outline: 2.5px solid var(--accent); outline-offset: -1px; z-index: 3; overflow: visible; white-space: pre; }
.ss-sel { background: rgba(77, 214, 168, 0.1); }
.ss-bold { font-weight: 700; }
.ss-italic { font-style: italic; }
.ss-align-left { text-align: left; }
.ss-align-center { text-align: center; }
.ss-align-right { text-align: right; }

.ss-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 10px;
  background: #f3f8f6; border-top: 1px solid var(--glass-border);
}
.ss-tabs {
  display: flex; gap: 3px; overflow-x: auto; flex: 1;
}
.ss-tab {
  padding: 5px 14px; border-radius: 8px; border: none;
  background: transparent; color: var(--text-secondary);
  cursor: pointer; font-size: 12px; font-weight: 500;
  white-space: nowrap; transition: all 0.15s var(--ease);
}
.ss-tab:hover { background: rgba(255, 255, 255, 0.8); color: var(--text-primary); }
.ss-tab.active { background: #fff; color: #237a5e; font-weight: 700; box-shadow: 0 1px 4px rgba(80,130,120,.1); }
.ss-tab-add { font-size: 16px; padding: 4px 10px; color: var(--accent); }
.ss-status {
  font-size: 11px; color: var(--text-faint); padding: 2px 8px;
  white-space: nowrap; max-width: 400px; overflow: hidden; text-overflow: ellipsis;
}

.ss-ctx-menu {
  position: fixed; z-index: 500;
  background: #fff; border: 1px solid var(--glass-border);
  border-radius: 10px; padding: 5px 0;
  box-shadow: 0 12px 36px rgba(60, 95, 88, 0.22);
  min-width: 160px;
}
.ss-ctx-item {
  padding: 8px 14px; cursor: pointer;
  font-size: 12.5px; color: var(--text-primary);
  transition: background 0.12s;
}
.ss-ctx-item:hover { background: rgba(77, 214, 168, 0.12); }
.ss-ctx-sep { height: 1px; background: var(--glass-border); margin: 3px 0; }

@media (max-width: 768px) {
  .ss-wrap { height: min(calc(100vh - 100px), 600px); min-height: 360px; }
  .ss-toolbar { padding: 5px 8px; gap: 4px; }
  .ss-btn { padding: 4px 7px; font-size: 11.5px; }
  .ss-toolbar-group { padding: 0 3px; }
  .ss-col-h, .ss-cell { min-width: 64px; width: 64px; }
}

/* ============================ 在线答题系统 ============================ */
.quiz-progress-bar {
  height: 6px; border-radius: 6px;
  background: rgba(80, 130, 120, 0.12);
  margin-bottom: 16px; overflow: hidden;
}
.quiz-progress-fill {
  height: 100%; border-radius: 6px;
  background: var(--accent-grad);
  transition: width 0.4s ease;
}
.quiz-question-card {
  padding: 20px;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.5);
}
.quiz-q-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.7;
}
.quiz-options { display: flex; flex-direction: column; gap: 10px; }
.quiz-option {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.quiz-option:hover { border-color: rgba(77, 214, 168, 0.4); background: rgba(77, 214, 168, 0.06); transform: translateY(-1px); }
.quiz-option.selected {
  border-color: var(--accent);
  background: rgba(77, 214, 168, 0.12);
  box-shadow: 0 0 0 2px rgba(77, 214, 168, 0.2);
}
.quiz-option input { display: none; }
.quiz-opt-marker {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
  background: rgba(80, 130, 120, 0.1);
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.quiz-option.selected .quiz-opt-marker {
  background: var(--accent-grad);
  color: #fff;
}
.quiz-opt-text { font-size: 14px; color: var(--text-primary); }
.quiz-result-card {
  text-align: center;
  padding: 30px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--glass-border);
  margin-bottom: 16px;
}
.quiz-score-ring {
  width: 100px; height: 100px; margin: 0 auto 12px;
  border-radius: 50%;
  background: conic-gradient(var(--accent) 0deg, var(--accent-2) 360deg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(77, 214, 168, 0.3);
}
.quiz-score-val { font-size: 32px; font-weight: 800; color: #fff; line-height: 1; }
.quiz-score-sub { font-size: 13px; color: rgba(255,255,255,0.8); margin-top: 2px; }
.quiz-score-grade { display: inline-block; padding: 6px 18px; border-radius: 20px; font-weight: 700; margin-bottom: 10px; }
.quiz-score-stats { display: flex; justify-content: center; gap: 16px; font-size: 14px; color: var(--text-secondary); }
.quiz-result-item {
  padding: 16px; margin-bottom: 10px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.5);
}
.quiz-result-item.correct { border-left: 3px solid var(--success); }
.quiz-result-item.wrong { border-left: 3px solid var(--danger); }
.quiz-result-num { font-weight: 700; color: var(--text-secondary); }
.quiz-result-question { font-weight: 600; margin: 6px 0; }
.quiz-result-answers { display: flex; gap: 16px; font-size: 13px; }
.quiz-ua { color: var(--text-primary); }
.quiz-ca { color: var(--success); }
.quiz-result-explain {
  margin-top: 8px; padding: 10px; border-radius: 8px;
  background: rgba(77, 214, 168, 0.08);
  font-size: 13px; color: var(--text-secondary);
}
.quiz-history-item {
  padding: 12px 14px; margin-bottom: 8px;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.5);
}

/* ==================== 答题系统补充样式 ==================== */
.quiz-app { display: flex; flex-direction: column; gap: 20px; }
.quiz-section { background: var(--glass-bg); backdrop-filter: blur(12px); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 20px; }

/* 出题表单选项网格 */
.quiz-opts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quiz-opt-row { display: flex; align-items: center; gap: 10px; }
.quiz-opt-letter {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--green-bg); color: #2fa97f; font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.quiz-judge-opts { display: flex; gap: 12px; }
.quiz-judge-opt {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px;
  border: 1px solid var(--glass-border); background: rgba(255,255,255,0.7);
  cursor: pointer; transition: all 0.18s var(--ease);
}
.quiz-judge-opt:hover { border-color: var(--accent); background: rgba(77,214,168,0.08); }

/* 题库列表 */
.quiz-bank-list { display: flex; flex-direction: column; gap: 10px; }
.quiz-bank-item {
  padding: 14px 16px; border-radius: 12px;
  border: 1px solid var(--glass-border); background: rgba(255,255,255,0.65);
  transition: all 0.18s;
}
.quiz-bank-item:hover { border-color: rgba(77,214,168,0.35); box-shadow: 0 4px 12px rgba(80,130,120,.08); }
.quiz-bank-item.wrong { border-left: 3px solid var(--danger); }
.quiz-bank-meta { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.quiz-bank-q { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; line-height: 1.6; }
.quiz-bank-answer { font-size: 13px; color: var(--text-secondary); display: flex; gap: 16px; flex-wrap: wrap; }
.quiz-bank-explain { font-size: 12.5px; color: var(--text-secondary); margin-top: 6px; padding: 8px 10px; border-radius: 8px; background: rgba(77,214,168,0.08); }
.quiz-bank-actions { display: flex; gap: 6px; margin-top: 8px; }
.quiz-wrong-answer { color: var(--danger); }
.quiz-correct-answer { color: var(--success); }

/* 答题启动配置 */
.quiz-start-config { display: flex; flex-direction: column; align-items: flex-start; }

/* ---- 全屏答题运行器 ---- */
.quiz-runner {
  position: fixed; inset: 0; z-index: 350;
  display: flex; flex-direction: column;
  background: linear-gradient(160deg, #eef8f4 0%, #f5faf9 40%, #eef5fb 100%);
}
.quiz-runner.hidden { display: none; }
.quiz-runner-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; flex-shrink: 0;
  background: rgba(255,255,255,0.85); border-bottom: 1px solid var(--glass-border);
}
.quiz-runner-title { font-weight: 700; font-size: 16px; color: #2f4b57; }
.quiz-runner-meta { display: flex; align-items: center; gap: 12px; }
.quiz-timer {
  font-variant-numeric: tabular-nums; font-weight: 600;
  color: var(--text-secondary); font-size: 14px;
}
.quiz-progress-bar {
  height: 5px; flex-shrink: 0;
  background: rgba(80,130,120,0.1);
}
.quiz-progress-fill {
  height: 100%; background: var(--accent-grad); border-radius: 0 4px 4px 0;
  transition: width 0.35s ease;
}
#quiz-card-area {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 20px; overflow-y: auto;
}

/* ---- 答题卡片 ---- */
.quiz-card {
  width: 100%; max-width: 640px;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border); border-radius: 20px;
  padding: 28px 24px; box-shadow: 0 12px 40px rgba(60,95,88,0.12);
  animation: slideUp 0.3s ease;
}
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.quiz-card-qnum {
  font-size: 12px; font-weight: 600; color: var(--text-faint); letter-spacing: 1px; margin-bottom: 8px;
}
.quiz-card-type { display: flex; gap: 6px; margin-bottom: 12px; }
.quiz-card-question {
  font-size: 17px; font-weight: 700; color: var(--text-primary);
  line-height: 1.65; margin-bottom: 18px;
}
.quiz-card-options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.quiz-card-opt {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: 12px;
  border: 1.5px solid var(--glass-border); background: rgba(255,255,255,0.8);
  cursor: pointer; transition: all 0.18s; font-size: 14px; color: var(--text-primary);
  text-align: left; width: 100%; position: relative;
}
.quiz-card-opt:hover:not(:disabled) { border-color: rgba(77,214,168,0.5); background: rgba(77,214,168,0.06); transform: translateX(3px); }
.quiz-card-opt.selected { border-color: var(--accent); background: rgba(77,214,168,0.1); }
.quiz-card-opt.correct { border-color: var(--success); background: rgba(45,217,154,0.1); }
.quiz-card-opt.wrong { border-color: var(--danger); background: rgba(255,93,110,0.1); }
.quiz-card-opt:disabled { cursor: default; opacity: 0.85; }
.quiz-card-letter {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(80,130,120,0.1); color: var(--text-secondary);
  font-weight: 700; font-size: 13px; transition: all 0.18s;
}
.quiz-card-opt.selected .quiz-card-letter { background: var(--accent); color: #fff; }
.quiz-card-opt.correct .quiz-card-letter { background: var(--success); color: #fff; }
.quiz-card-opt.wrong .quiz-card-letter { background: var(--danger); color: #fff; }
.quiz-card-icon { position: absolute; right: 16px; font-size: 18px; }
.quiz-card-icon.bad { color: var(--danger); }

.quiz-card-feedback {
  padding: 12px 16px; border-radius: 10px; margin-top: 8px;
  font-size: 13.5px; line-height: 1.6;
}
.quiz-card-feedback.correct { background: rgba(45,217,154,0.1); border-left: 3px solid var(--success); }
.quiz-card-feedback.wrong { background: rgba(255,93,110,0.08); border-left: 3px solid var(--danger); }
.quiz-card-feedback-title { font-weight: 700; margin-bottom: 4px; }
.quiz-card-feedback-explain { color: var(--text-secondary); }
.quiz-card-nav { display: flex; justify-content: space-between; margin-top: 12px; }

/* ---- 成绩报告 ---- */
.quiz-report {
  position: fixed; inset: 0; z-index: 360;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5,7,15,0.65); backdrop-filter: blur(10px);
  padding: 20px; overflow-y: auto;
}
.quiz-report.hidden { display: none; }
.quiz-report-card {
  width: 100%; max-width: 640px; max-height: 90vh; overflow-y: auto;
  background: rgba(255,255,255,0.96); border-radius: 20px;
  padding: 32px 24px; box-shadow: 0 24px 80px rgba(0,0,0,0.3);
  animation: popIn 0.35s ease;
}
@keyframes popIn { from { opacity: 0; transform: scale(0.95) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.quiz-report-hero { text-align: center; margin-bottom: 24px; }
.quiz-report-score { display: flex; align-items: baseline; justify-content: center; gap: 2px; margin-bottom: 8px; }
.quiz-report-val { font-size: 56px; font-weight: 900; letter-spacing: -2px; }
.quiz-report-sub { font-size: 18px; color: var(--text-secondary); }
.quiz-report-emoji { font-size: 40px; margin-right: 8px; }
.quiz-report-score.excellent .quiz-report-val { color: var(--success); }
.quiz-report-score.good .quiz-report-val { color: var(--accent); }
.quiz-report-score.pass .quiz-report-val { color: var(--orange); }
.quiz-report-score.fail .quiz-report-val { color: var(--danger); }
.quiz-report-grade { font-size: 18px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.quiz-report-stats { display: flex; justify-content: center; gap: 18px; font-size: 13px; color: var(--text-secondary); }
.quiz-report-details h3 { font-size: 15px; font-weight: 700; margin-bottom: 12px; color: var(--text-primary); }
.quiz-report-item { padding: 14px; border-radius: 12px; margin-bottom: 10px; border: 1px solid var(--glass-border); }
.quiz-report-item.ok { background: rgba(45,217,154,0.06); }
.quiz-report-item.err { background: rgba(255,93,110,0.05); }
.quiz-report-item-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.quiz-report-item-num { font-weight: 700; color: var(--text-faint); }
.quiz-report-item-icon { font-size: 18px; font-weight: 700; }
.quiz-report-item.ok .quiz-report-item-icon { color: var(--success); }
.quiz-report-item.err .quiz-report-item-icon { color: var(--danger); }
.quiz-report-item-q { font-size: 13.5px; font-weight: 600; margin-bottom: 6px; line-height: 1.5; }
.quiz-report-item-a { font-size: 13px; color: var(--text-secondary); }
.quiz-report-item-explain { font-size: 12.5px; color: var(--text-secondary); margin-top: 6px; padding: 8px 10px; border-radius: 8px; background: rgba(77,214,168,0.08); }
.quiz-report-actions { display: flex; justify-content: center; gap: 10px; margin-top: 20px; }

/* 图表容器 */
.chart-wrap-tall { height: 280px; }
.chart-wrap { height: 240px; }
