/* 答应 — 专业工作平台样式 v3 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* 品牌色 — 清新青蓝 */
  --primary: #0891b2;
  --primary-dark: #0e7490;
  --primary-light: #22d3ee;
  --primary-bg: rgba(8,145,178,0.05);
  --primary-bg-strong: rgba(8,145,178,0.10);
  --accent: #06b6d4;
  --gradient-brand: linear-gradient(135deg, #0e7490 0%, #0891b2 100%);
  --gradient-brand-soft: linear-gradient(135deg, rgba(14,116,144,0.08), rgba(8,145,178,0.06));

  /* 浅色模式 — 暖调高级白 */
  --bg: #f9fafb;
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --surface-2: #f5f6f8;
  --text: #18181b;
  --text-secondary: #52525b;
  --text-muted: #a1a1aa;
  --border: #e4e4e7;
  --border-light: #f4f4f5;
  --border-strong: #d4d4d8;

  --shadow-xs: 0 1px 2px rgba(0,0,0,0.03);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.03);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
  --shadow-brand: 0 4px 16px rgba(8,145,178,0.22), 0 1px 4px rgba(8,145,178,0.12);

  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --radius-pill: 999px;
  --transition: 0.2s cubic-bezier(0.4,0,0.2,1);
  --transition-slow: 0.3s cubic-bezier(0.4,0,0.2,1);
}

/* 暗色模式 — 深灰而非纯黑，暖调高级感 */
[data-theme="dark"] {
  --primary-bg: rgba(34,211,238,0.10);
  --primary-bg-strong: rgba(34,211,238,0.18);
  --bg: #161618;
  --bg-elevated: #1e1e22;
  --surface: #1e1e22;
  --surface-2: #26262c;
  --text: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --border: #2a2a30;
  --border-light: #232328;
  --border-strong: #3a3a42;
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.6);
  --shadow-brand: 0 4px 16px rgba(8,145,178,0.35);
}

html { scroll-behavior: smooth; color-scheme: light; }
[data-theme="dark"] { color-scheme: dark; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Segoe UI", "HarmonyOS Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition-slow), color var(--transition-slow);
}

/* 暗色模式 body 背景微光 */
[data-theme="dark"] body {
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(8,145,178,0.08), transparent 60%);
  background-attachment: fixed;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }

/* 主题切换时全局平滑过渡 */
.header, .card, .btn, .form-input, .note-card, .dash-card, .rec-transcript, .modal-card, .toast, .theme-toggle, .user-chip {
  transition: background-color var(--transition-slow), border-color var(--transition-slow), color var(--transition), box-shadow var(--transition-slow);
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 20px 48px;
  min-height: calc(100vh - 112px);
}

/* ========== Header ========== */
.header {
  background: rgba(255,255,255,0.82);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
[data-theme="dark"] .header {
  background: rgba(30,30,34,0.82);
  border-bottom-color: rgba(255,255,255,0.06);
}
.header-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 20px;
  gap: 28px;
}
.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  gap: 10px;
}
.logo-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(8,145,178,0.3));
}
.logo-text {
  font-size: 17px;
  font-weight: 700;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.01em;
}
.nav { display: flex; gap: 2px; }
.nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: var(--radius-xs);
  transition: all var(--transition);
  position: relative;
}
.nav a:hover {
  color: var(--primary);
  background: var(--primary-bg);
}
.nav a.active {
  color: var(--primary);
  background: var(--primary-bg-strong);
  font-weight: 600;
}
.user-area {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
}
.user-area .user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 5px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-weight: 500;
}
.user-area .user-avatar {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}
.user-area a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition);
}
.user-area a:hover { color: var(--text); }

/* ========== Theme Toggle ========== */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--primary-light);
  background: var(--primary-bg);
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
  position: absolute;
  transition: transform var(--transition-slow), opacity var(--transition);
}
.theme-toggle .icon-sun {
  color: #f59e0b;
  opacity: 1;
  transform: scale(1) rotate(0deg);
}
.theme-toggle .icon-moon {
  color: var(--primary-light);
  opacity: 0;
  transform: scale(0.5) rotate(-90deg);
}
[data-theme="dark"] .theme-toggle .icon-sun {
  opacity: 0;
  transform: scale(0.5) rotate(90deg);
}
[data-theme="dark"] .theme-toggle .icon-moon {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

/* ========== Footer ========== */
.footer {
  text-align: center;
  padding: 36px 20px 24px;
  color: var(--text-muted);
  font-size: 13px;
}
.footer a { color: var(--text-muted); text-decoration: none; }
.footer a:hover { color: var(--primary); }

/* ========== Cards ========== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--transition), border-color var(--transition);
}
.card:hover { box-shadow: var(--shadow-sm); }
.card h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.card h4 .icon-svg {
  width: 18px; height: 18px;
  stroke: var(--primary);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
  font-family: inherit;
}
.btn-primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: 0 2px 6px rgba(8,145,178,0.32), inset 0 1px 0 rgba(255,255,255,0.18);
  background-size: 150% 150%;
  background-position: 0% 50%;
}
.btn-primary:hover {
  background-position: 100% 50%;
  box-shadow: var(--shadow-brand), inset 0 1px 0 rgba(255,255,255,0.18);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); box-shadow: 0 1px 2px rgba(8,145,178,0.2); }
.btn-outline, .btn-secondary {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.btn-outline:hover, .btn-secondary:hover {
  border-color: var(--primary-light);
  color: var(--primary);
  background: var(--primary-bg);
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover { background: var(--primary-bg); color: var(--primary); }
.btn-danger, .btn-error {
  background: rgba(239,68,68,0.1);
  color: #ef4444;
  border: 1px solid rgba(239,68,68,0.2);
}
.btn-danger:hover, .btn-error:hover {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
}
[data-theme="dark"] .btn-danger, [data-theme="dark"] .btn-error { color: #fca5a5; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: var(--radius-xs); }
.btn-icon { padding: 7px; width: 32px; height: 32px; }
.btn svg { width: 16px; height: 16px; }

/* ========== Login ========== */
.login-wrap {
  min-height: calc(100vh - 56px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  position: relative;
  overflow: hidden;
}
.login-wrap::before {
  content: '';
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 60%;
  background: var(--gradient-brand);
  filter: blur(80px);
  opacity: 0.18;
  pointer-events: none;
}
[data-theme="dark"] .login-wrap::before { opacity: 0.32; }
.login-card {
  position: relative;
  padding: 40px 32px 32px;
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  width: 100%;
  max-width: 400px;
  text-align: center;
}
.login-card .login-logo {
  width: 60px;
  height: 60px;
  margin: 0 auto 14px;
  display: block;
  filter: drop-shadow(0 6px 14px rgba(8,145,178,0.35));
  object-fit: contain;
}
.login-card h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.login-card .login-subtitle {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 22px;
}
.login-qr-box {
  display: inline-block;
  padding: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-xs);
}
.login-steps {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin: 18px 0 20px;
  font-size: 12px;
  color: var(--text-muted);
}
.login-steps .step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.login-steps .step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary-bg-strong);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.login-tabs {
  display: flex;
  gap: 8px;
  background: var(--surface-2);
  padding: 4px;
  border-radius: var(--radius-pill);
  margin-bottom: 20px;
}
.login-tab {
  flex: 1;
  padding: 10px 12px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}
.login-tab:hover {
  color: var(--text-secondary);
}
.login-tab.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-xs);
}
.login-tab-content {
  display: none;
}
.login-tab-content.active {
  display: block;
}

/* ========== Dashboard ========== */
.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 22px;
  gap: 16px;
}
.dash-header h2 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}
.dash-header p {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 4px;
}

/* 统计条 */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.stat-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-xs);
  position: relative;
  overflow: hidden;
}
.stat-item::after {
  content: '';
  position: absolute;
  top: -20px; right: -20px;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--gradient-brand-soft);
  opacity: 0.6;
}
.stat-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}
.dash-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.dash-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--gradient-brand);
  opacity: 0;
  transition: opacity var(--transition);
}
.dash-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: transparent;
}
.dash-card:hover::before { opacity: 1; }
.dash-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.dash-card .text-muted {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}
.dash-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  font-size: 22px;
  line-height: 1;
}

/* ========== Course Schedule Card ========== */
.schedule-active {
  border-left: 3px solid var(--primary);
  background: linear-gradient(135deg, var(--primary-bg), var(--surface) 60%);
}
.schedule-next {
  border-left: 3px solid #f59e0b;
  background: linear-gradient(135deg, rgba(245,158,11,0.08), var(--surface) 60%);
}
.schedule-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 2px 0;
}
.schedule-meta {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}
.schedule-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.schedule-next .schedule-label { color: #f59e0b; }
.schedule-label .live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: rec-blink 1.4s ease-in-out infinite;
}

/* ========== Forms ========== */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}
.form-input, select.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: all var(--transition);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
}
.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(8,145,178,0.15);
}

/* ========== Table ========== */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}
.table th { font-weight: 600; color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }

/* ========== Tags ========== */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  background: var(--primary-bg);
  color: var(--primary);
}
.tag-success { background: rgba(16,185,129,0.12); color: #059669; }
.tag-warning { background: rgba(245,158,11,0.14); color: #d97706; }
.tag-error { background: rgba(239,68,68,0.12); color: #dc2626; }
.tag-recording {
  background: rgba(239,68,68,0.12);
  color: #dc2626;
  animation: recording-pulse 1.2s ease-in-out infinite;
}
[data-theme="dark"] .tag-success { color: #34d399; }
[data-theme="dark"] .tag-warning { color: #fbbf24; }
[data-theme="dark"] .tag-error, [data-theme="dark"] .tag-recording { color: #fca5a5; }
@keyframes recording-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* ========== Toast ========== */
.toast-container {
  position: fixed;
  top: 70px;
  right: 16px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(360px, calc(100vw - 32px));
}
.toast {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  animation: toast-in 0.2s ease-out;
}
.toast-success { border-left: 3px solid #22c55e; }
.toast-error { border-left: 3px solid #ef4444; }
.toast-warning { border-left: 3px solid #f59e0b; }
.toast-info { border-left: 3px solid var(--primary); }
.toast.hide { opacity: 0; transform: translateY(-8px); transition: all 0.18s ease-in; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== Utilities ========== */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mb-2 { margin-bottom: 16px; }
.text-muted { color: var(--text-muted); font-size: 13px; }
.text-center { text-align: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-2 { gap: 8px; }
.page-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

/* ========== Pagination ========== */
.pagination {
  display: flex; justify-content: center; align-items: center; gap: 12px;
  margin-top: 24px; padding: 12px 0;
}
.pagination .disabled { opacity: 0.35; pointer-events: none; }
.pagination-info { font-size: 14px; color: var(--text-muted); }

/* ========== Responsive ========== */
@media (max-width: 640px) {
  .header-inner { gap: 10px; padding: 0 14px; height: 52px; }
  .logo-text { display: none; }
  .nav { gap: 2px; }
  .nav a { font-size: 13px; padding: 6px 10px; }
  .user-area .user-chip { padding: 4px 10px 4px 4px; font-size: 13px; }
  .container { padding: 18px 14px 36px; }
  .toast-container { top: 64px; left: 12px; right: 12px; max-width: none; }
  .dashboard-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .dash-card { padding: 16px; }
  .dash-header h2 { font-size: 22px; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .login-card { padding: 32px 22px 24px; }
}

/* ========== 设备卡片 ========== */
.device-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}
.device-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
}
.device-card:hover { box-shadow: var(--shadow-md); }
.device-card.online { border-left: 3px solid #22c55e; }
.device-card.offline { border-left: 3px solid var(--border-strong); }

.device-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 16px 0;
}
.device-name-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.device-name {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.device-status-text { font-size: 13px; font-weight: 500; white-space: nowrap; }
.text-online { color: #22c55e; }
.text-offline { color: var(--text-muted); }

.status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-online { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,0.18); }
.dot-offline { background: var(--border-strong); }

.tag-flagship { background: rgba(6,182,212,0.12); color: #06b6d4; }
.tag-standard { background: var(--primary-bg); color: var(--primary); }
[data-theme="dark"] .tag-flagship { color: #67e8f9; }

.device-card-body { padding: 12px 16px; }
.device-info-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 13px; }
.info-label { color: var(--text-muted); }
.info-value { color: var(--text-secondary); }
.mono { font-family: "SF Mono", "JetBrains Mono", "Fira Code", monospace; font-size: 12px; }

.device-card-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: 8px;
}

/* ========== 设备详情页 ========== */
.device-detail-header { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.device-detail-header .status-dot { width: 12px; height: 12px; }
.device-detail-name { font-size: 22px; font-weight: 700; margin: 0; }
.device-detail-sn { font-size: 14px; color: var(--text-muted); font-family: "SF Mono", monospace; }

.device-meta-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.meta-item { display: flex; flex-direction: column; gap: 2px; }
.meta-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 500; }
.meta-value { font-size: 15px; font-weight: 500; color: var(--text-secondary); }

/* ========== 笔记列表 ========== */
.note-list { display: flex; flex-direction: column; gap: 10px; }
.note-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: all var(--transition);
}
.note-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--primary-light);
  transform: translateY(-1px);
}
.note-card-main { flex: 1; min-width: 0; }
.note-card-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.note-card-title a { color: var(--text); text-decoration: none; }
.note-card-title a:hover { color: var(--primary); }
.note-card-meta { display: flex; gap: 12px; font-size: 12px; color: var(--text-muted); flex-wrap: wrap; }
.note-card-side { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.note-empty { text-align: center; padding: 48px 16px; color: var(--text-muted); }

/* ========== 视图切换 ========== */
.view-toggle { display: flex; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.view-toggle-btn { padding: 6px 14px; font-size: 13px; color: var(--text-muted); text-decoration: none; transition: all 0.15s; }
.view-toggle-btn:hover { color: var(--text); background: var(--primary-bg); }
.view-toggle-btn.active { background: var(--primary); color: #fff; }

/* ========== 时间线视图 ========== */
.timeline { display: flex; flex-direction: column; gap: 28px; }
.timeline-day { position: relative; padding-left: 20px; border-left: 2px solid var(--border); margin-left: 8px; }
.timeline-date-header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 14px; margin-left: -29px;
}
.timeline-date-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--primary); border: 3px solid var(--surface); box-shadow: 0 0 0 2px var(--primary); flex-shrink: 0;
}
.timeline-date-label { font-size: 15px; font-weight: 600; color: var(--text); }
.timeline-date-count { font-size: 12px; color: var(--text-muted); background: var(--primary-bg); padding: 2px 8px; border-radius: 10px; }
.timeline-notes { display: flex; flex-direction: column; gap: 8px; }
.timeline-note-card {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
  transition: all var(--transition);
}
.timeline-note-card:hover { box-shadow: var(--shadow-sm); border-color: var(--primary-light); transform: translateX(2px); }
.timeline-note-card.empty { opacity: 0.5; }
.timeline-note-card.recording { border-left: 3px solid #ef4444; }
.timeline-note-card.processing { border-left: 3px solid #f59e0b; }
.timeline-note-card.ready { border-left: 3px solid #10b981; }
.timeline-note-card.failed { border-left: 3px solid #9ca3af; }
.timeline-note-time {
  display: flex; flex-direction: column; align-items: center;
  min-width: 56px; flex-shrink: 0; padding-top: 2px;
}
.timeline-note-time .time { font-size: 15px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.timeline-note-time .duration { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.timeline-note-content { flex: 1; min-width: 0; }
.timeline-note-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; }
.timeline-note-title a { color: var(--text); text-decoration: none; }
.timeline-note-title a:hover { color: var(--primary); }
.timeline-note-preview { font-size: 13px; color: var(--text-muted); margin-top: 4px; line-height: 1.5; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* ========== 课程视图 ========== */
.course-view { display: flex; flex-direction: column; gap: 20px; }
.course-group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.course-header {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; background: var(--primary-bg);
  border-bottom: 1px solid var(--border);
}
.course-icon { font-size: 18px; }
.course-name { font-size: 15px; font-weight: 600; color: var(--text); flex: 1; }
.course-count { font-size: 12px; color: var(--text-muted); background: var(--surface); padding: 2px 10px; border-radius: 10px; }
.course-notes { display: flex; flex-direction: column; }
.course-note-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  text-decoration: none; transition: background 0.15s;
}
.course-note-card:last-child { border-bottom: none; }
.course-note-card:hover { background: var(--primary-bg); }
.cn-time { font-size: 12px; color: var(--text-muted); min-width: 80px; font-variant-numeric: tabular-nums; }
.cn-title { flex: 1; font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.course-note-card:hover .cn-title { color: var(--primary); }

/* ========== 命令面板 ========== */
.cmd-panel { display: flex; flex-wrap: wrap; gap: 8px; }
.cmd-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-secondary);
  font-family: inherit;
}
.cmd-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-bg); }
.cmd-btn:active { transform: scale(0.97); }
.cmd-btn.primary { background: var(--gradient-brand); color: #fff; border-color: transparent; }
.cmd-btn.primary:hover { box-shadow: var(--shadow-brand); }
.cmd-btn.danger { color: #ef4444; }
.cmd-btn.danger:hover { border-color: #ef4444; background: rgba(239,68,68,0.08); }

/* ========== Markdown Body ========== */
.md-body { line-height: 1.8; font-size: 14px; color: var(--text-secondary); }
.md-body h1, .md-body h2, .md-body h3, .md-body h4 { margin: 16px 0 8px; font-weight: 600; color: var(--text); }
.md-body h1 { font-size: 18px; }
.md-body h2 { font-size: 16px; }
.md-body h3 { font-size: 15px; }
.md-body p { margin: 8px 0; }
.md-body ul, .md-body ol { padding-left: 20px; margin: 8px 0; }
.md-body li { margin: 4px 0; }
.md-body code { background: var(--primary-bg); color: var(--primary); padding: 2px 6px; border-radius: 4px; font-size: 13px; font-family: "SF Mono", monospace; }
.md-body pre { background: #1e293b; color: #e2e8f0; padding: 14px; border-radius: var(--radius-sm); overflow-x: auto; margin: 8px 0; }
.md-body pre code { background: none; padding: 0; color: inherit; }
.md-body blockquote { border-left: 3px solid var(--primary-light); padding-left: 14px; color: var(--text-muted); margin: 8px 0; }
.md-body strong { font-weight: 600; color: var(--text); }
.md-body table { border-collapse: collapse; width: 100%; margin: 8px 0; }
.md-body th, .md-body td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; font-size: 13px; }
.md-body th { background: var(--surface-2); font-weight: 600; }

/* ========== 转录文本（带说话人区分）========== */
.transcript-body {
  font-size: 14px;
  line-height: 2;
  max-height: 600px;
  overflow-y: auto;
  padding: 16px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
}
.transcript-line {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-light);
}
.transcript-line:last-child { border-bottom: none; }
.speaker-badge {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  margin-top: 2px;
}
.speaker-1 { background: linear-gradient(135deg, #0e7490, #0891b2); }
.speaker-2 { background: linear-gradient(135deg, #059669, #10b981); }
.transcript-text {
  flex: 1;
  color: var(--text);
}

/* ========== 录音中横幅 ========== */
.recording-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: var(--radius);
  border: 1px solid rgba(239,68,68,0.2);
  background: linear-gradient(135deg, rgba(239,68,68,0.06), var(--surface) 70%);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition);
}
.recording-banner:hover { box-shadow: var(--shadow-sm); }
.recording-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #ef4444;
  flex-shrink: 0;
  animation: rec-blink 1.4s ease-in-out infinite;
}
@keyframes rec-blink {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.5); }
  50% { box-shadow: 0 0 0 8px rgba(239,68,68,0); }
}

/* ========== 筛选条 ========== */
.filter-bar {
  padding: 12px 16px;
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 14px;
}
.filter-bar select {
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 13px;
  background: var(--surface);
  color: var(--text-secondary);
  font-family: inherit;
}
.filter-label {
  color: var(--text-muted);
  font-size: 13px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

/* ========== 录音页 ========== */
.recorder-card { padding: 22px; }
.rec-order-bar {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px; flex-wrap: wrap;
}
.rec-timer {
  font-size: 22px;
  font-family: "SF Mono", "JetBrains Mono", monospace;
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.rec-badge {
  font-size: 12px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  color: #fff;
}
.rec-badge.live { background: #22c55e; }
.rec-badge.chunk { background: #06b6d4; }
.rec-hint {
  margin-bottom: 12px;
  padding: 10px 14px;
  background: var(--primary-bg);
  border: 1px solid rgba(8,145,178,0.15);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
}
.rec-polish-hint {
  margin-bottom: 12px;
  padding: 8px 14px;
  background: rgba(6,182,212,0.1);
  border: 1px solid rgba(6,182,212,0.2);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: #06b6d4;
}
.rec-transcript-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 600;
  display: flex; align-items: center; gap: 6px;
}
.rec-transcript {
  min-height: 240px;
  max-height: 400px;
  overflow-y: auto;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-wrap;
  border: 1px solid var(--border);
  outline: none;
  transition: border-color var(--transition);
}
.rec-transcript:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(8,145,178,0.12); }

/* ========== 笔记详情页 ========== */
.note-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.note-detail-header h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  word-break: break-word;
}
.note-meta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
  align-items: center;
}
.note-meta-row .meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.note-meta-row .meta-pill svg {
  width: 14px; height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.photo-grid img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: transform var(--transition);
}
.photo-grid a:hover img { transform: scale(1.02); }

/* 波形 */
#waveform {
  margin-bottom: 10px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  padding: 6px;
}

/* ========== 分享面板 ========== */
.share-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 4px;
}
@media (max-width: 640px) {
  .share-grid { grid-template-columns: 1fr; }
}
.share-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.share-panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.share-panel-head svg { stroke: var(--primary); flex-shrink: 0; }
.share-panel-body { padding: 12px 14px; }
.share-input-row {
  display: flex;
  gap: 8px;
}
.share-input-row .form-input { flex: 1; }
.share-link-box {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 12px;
  background: var(--primary-bg);
  border: 1px solid rgba(8,145,178,0.15);
  border-radius: var(--radius-xs);
  font-family: "SF Mono", "JetBrains Mono", monospace;
  font-size: 13px;
  word-break: break-all;
}
.existing-shares {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 12px;
}
.share-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
}
.share-item:last-child { border-bottom: none; }
.share-item code {
  background: var(--primary-bg);
  color: var(--primary);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-family: "SF Mono", monospace;
}

/* ========== 分享弹窗 ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.35);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
[data-theme="dark"] .modal-overlay { background: rgba(0,0,0,0.65); }
.modal-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 400px;
  max-width: calc(100vw - 32px);
  overflow: hidden;
  animation: modal-in 0.2s ease-out;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(-12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 16px; font-weight: 600; margin: 0; }
.modal-body { padding: 20px; }
.modal-section { margin-bottom: 16px; }
.modal-section:last-child { margin-bottom: 0; }
.modal-section label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.modal-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--text-muted);
  font-size: 12px;
}
.modal-divider::before,
.modal-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.btn-close {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  line-height: 1;
  transition: all var(--transition);
}
.btn-close:hover { background: var(--primary-bg); color: var(--text); }
.share-pwd {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}
.share-pwd b {
  font-family: "SF Mono", "JetBrains Mono", monospace;
  letter-spacing: 2px;
  background: var(--primary-bg);
  padding: 2px 8px;
  border-radius: 4px;
}

/* ─── 日纪要（今天录到了什么）──────────────────────────── */
.digest-hero { padding: 20px; border-left: 3px solid var(--primary); }
.digest-hero-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.digest-hero-title { font-size: 16px; font-weight: 700; color: var(--text); }
.digest-hero-sub { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.digest-stats { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); margin-top: 10px; }
.digest-summary { font-size: 14px; line-height: 1.7; color: var(--text); margin-top: 12px; }
.digest-points { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.digest-points li { font-size: 13px; line-height: 1.55; display: flex; gap: 8px; }
.digest-points .t { color: var(--primary); font-weight: 600; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.digest-topics { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.digest-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.digest-empty { font-size: 13px; color: var(--text-muted); margin-top: 10px; }
.digest-day-link { font-size: 12px; color: var(--text-muted); text-decoration: none; }
.digest-day-link:hover { color: var(--primary); }
.digest-day-line { font-size: 12px; color: var(--text-muted); margin: 4px 0 8px 0; line-height: 1.5; }
.tag-partial { background: rgba(245, 158, 11, 0.14); color: #b45309; }
.timeline-note-card.partial { border-left: 3px solid #f59e0b; }
.day-back { font-size: 13px; }
.digest-section { margin-top: 12px; }
.digest-section-title { font-size: 12px; font-weight: 600; color: var(--text-muted); letter-spacing: 0.02em; }
.digest-section .digest-points { margin-top: 6px; }

/* 存储空间 */
.storage-bar { height: 10px; background: var(--border-light); border-radius: var(--radius-pill); overflow: hidden; margin-top: 12px; }
.storage-bar-fill { height: 100%; background: var(--primary); border-radius: var(--radius-pill); transition: width 0.3s; }
.storage-bar-fill.warn { background: #ef4444; }
.audio-table { display: flex; flex-direction: column; }
.audio-row { display: grid; grid-template-columns: 28px 1fr auto auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border-light); cursor: pointer; }
.audio-title a { color: var(--text); text-decoration: none; }
.audio-title a:hover { color: var(--primary); }
.audio-date, .audio-size { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.audio-size { min-width: 64px; text-align: right; }

/* 设备状态横幅 */
.device-status-banner { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg-elevated); font-size: 13px; }
.device-status-banner.off { border-color: rgba(239, 68, 68, 0.35); background: rgba(239, 68, 68, 0.06); }
.device-status-banner.off .dot-offline { background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15); }
.device-status-banner.off .text-offline { color: #dc2626; }

