/* ═══════════════════════════════════════════════════════════════
   AI Agent 指挥台 — Design System v6
   ═══════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #f2f4f8;
  --surface:   #ffffff;
  --surface2:  #fafbfd;
  --border:    #e4e7ef;
  --border2:   #d8dbe5;
  --text:      #131722;
  --text2:     #555a6e;
  --text3:     #9095a8;
  --blue:      #4f6ef6;
  --blue2:     #3d56e0;
  --purple:    #7c5cf0;
  --teal:      #0ea88a;
  --green:     #10b981;
  --red:       #ef4444;
  --orange:    #f59e0b;
  --font:      "PingFang SC", "Microsoft YaHei", -apple-system, "Helvetica Neue", sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", "Consolas", monospace;
}

body {
  font-family: var(--font);
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Subtle background texture */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(79,110,246,.04) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 100%, rgba(124,92,240,.04) 0%, transparent 60%),
    radial-gradient(circle, rgba(0,0,0,.025) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 20px 20px;
}

#app { max-width: 1060px; margin: 0 auto; padding: 0 24px 48px; }

/* ═══════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════ */
header.banner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; padding: 0 20px;
  margin: 20px 0 0;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,.03), 0 4px 16px rgba(0,0,0,.04);
  position: sticky; top: 20px; z-index: 100;
}
.banner-bg { display: none; }

.banner-left, .banner-right {
  display: flex; align-items: center; gap: 8px;
  min-width: 120px;
}

.sys-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(16,185,129,.15), 0 0 14px rgba(16,185,129,.25);
  animation: dotPulse 2.5s ease-in-out infinite;
}
@keyframes dotPulse {
  0%,100% { box-shadow: 0 0 0 4px rgba(16,185,129,.15), 0 0 14px rgba(16,185,129,.25); }
  50%     { box-shadow: 0 0 0 7px rgba(16,185,129,.07), 0 0 22px rgba(16,185,129,.35); }
}
.banner-status {
  font-size: 12px; font-weight: 600; color: var(--green);
  letter-spacing: .5px;
}

h1.main-title {
  font-size: 30px; font-weight: 800; letter-spacing: 4px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 8px rgba(79,110,246,.35)) drop-shadow(0 0 20px rgba(124,92,240,.2));
}

.banner-time-group {
  display: flex; flex-direction: column; align-items: flex-end; gap: 0;
}
.banner-date {
  font-family: var(--font-mono); font-size: 11px; color: var(--text3);
}
.banner-time {
  font-family: var(--font-mono); font-size: 16px; font-weight: 600; color: var(--text);
}

.pomodoro {
  font-family: var(--font-mono); font-size: 16px; font-weight: 600;
  cursor: pointer; user-select: none;
  padding: 5px 12px; border-radius: 8px;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text2);
  transition: all .2s;
}
.pomodoro:hover { border-color: var(--border2); color: var(--text); }
.pomodoro.running {
  color: var(--red);
  border-color: rgba(239,68,68,.25);
  background: #fef2f2;
  animation: pomoPulse 2s ease-in-out infinite;
}
@keyframes pomoPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,.12); }
  50%     { box-shadow: 0 0 0 8px rgba(239,68,68,.04); }
}

.banner-user {
  font-size: 12px; font-weight: 600; color: var(--text2);
  max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 5px 10px; border-radius: 8px; background: var(--surface2); border: 1px solid var(--border);
}
.btn-logout {
  padding: 6px 12px; font-size: 12px;
}

/* ═══════════════════════════════════════════════════════════════
   APP STATUS BAR
   ═══════════════════════════════════════════════════════════════ */
.app-status-bar {
  margin: 16px 0;
  padding: 0 4px;
  display: flex; gap: 24px;
}
.status-spacer {
  margin: 16px 0;
}
.status-spacer {
  margin: 16px 0;
}
.app-status-item {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 600; color: var(--text2);
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,.02);
}
.app-status-icon { color: var(--text3); flex-shrink: 0; }
.app-status-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
  background: #d1d5db; transition: all .3s;
}
.app-status-dot.running {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(16,185,129,.2), 0 0 8px rgba(16,185,129,.3);
}
.app-status-item .app-status-text {
  font-size: 11px; font-weight: 600; color: var(--text3);
  margin-left: 2px;
}

/* ═══════════════════════════════════════════════════════════════
   CONSOLE
   ═══════════════════════════════════════════════════════════════ */
main.console { display: grid; gap: 20px; }

/* ═══════════════════════════════════════════════════════════════
   CARDS SECTION
   ═══════════════════════════════════════════════════════════════ */
.section-header {
  text-align: center; margin-bottom: 24px;
}
.section-title {
  font-size: 26px; font-weight: 800; color: var(--text);
  letter-spacing: 1px; margin-bottom: 4px;
}
.section-sub {
  font-size: 14px; color: var(--text3);
}

.cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* 一张卡都没授权时(服务端渲染后为空)的兜底文案 */
.cards-empty {
  grid-column: 1 / -1;
  padding: 32px 20px;
  text-align: center;
  color: var(--text-muted, #6b7280);
  font-size: 14px;
}

/* ═══════════════════════════════════════════════════════════════
   APP CARD — 立体卡片核心
   ═══════════════════════════════════════════════════════════════ */
.app-card {
  position: relative;
  background: var(--surface);
  border-radius: 18px;
  cursor: pointer;
  overflow: hidden;
  transition: all .3s cubic-bezier(.4,0,.2,1);
  box-shadow:
    0 1px 2px rgba(0,0,0,.04),
    0 6px 16px rgba(0,0,0,.06),
    0 12px 32px rgba(0,0,0,.04);
  /* 3D perspective */
  transform: translateY(0);
}

/* Top color accent bar */
.card-accent {
  height: 4px;
  transition: height .3s ease;
}
.card-feishu .card-accent {
  background: linear-gradient(90deg, var(--blue), #6b9af8);
}
.card-opc .card-accent {
  background: linear-gradient(90deg, var(--teal), #34d399);
}
.card-fba .card-accent {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}
.card-fba-new .card-accent {
  background: linear-gradient(90deg, #10b981, #34d399);
}
.card-ad-health .card-accent {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}
.card-fba-feishu .card-accent {
  background: linear-gradient(90deg, #8b5cf6, #a78bfa);
}
.card-opc-apps .card-accent {
  background: linear-gradient(90deg, #6366f1, #818cf8);
}
.card-finance .card-accent {
  background: linear-gradient(90deg, #b8860b, #e6b800);
}
.card-tax-filing .card-accent {
  background: linear-gradient(90deg, #0e7d86, #2a5b80);
}

.app-card:hover .card-accent { height: 6px; }

/* Card body */
.card-body {
  padding: 28px 28px 20px;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  position: relative;
}

.card-icon {
  width: 64px; height: 64px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  transition: transform .3s ease, box-shadow .3s ease;
}
.card-feishu .card-icon {
  background: linear-gradient(135deg, #eff2ff 0%, #dce4fe 100%);
  color: var(--blue);
  box-shadow: 0 4px 12px rgba(79,110,246,.15);
}
.card-opc .card-icon {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  color: var(--teal);
  box-shadow: 0 4px 12px rgba(14,168,138,.15);
}
.card-fba .card-icon {
  background: linear-gradient(135deg, #fffbf0 0%, #fef3c7 100%);
  color: #d97706;
  box-shadow: 0 4px 12px rgba(245,158,11,.15);
}
.card-fba-new .card-icon {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  color: #059669;
  box-shadow: 0 4px 12px rgba(16,185,129,.15);
}
.card-ad-health .card-icon {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  color: #d97706;
  box-shadow: 0 4px 12px rgba(245,158,11,.15);
}
.card-fba-feishu .card-icon {
  background: linear-gradient(135deg, #f7f5ff 0%, #ede9fe 100%);
  color: #7c3aed;
  box-shadow: 0 4px 12px rgba(139,92,246,.15);
}
.card-opc-apps .card-icon {
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
  color: #4f46e5;
  box-shadow: 0 4px 12px rgba(99,102,241,.15);
}

.app-card:hover .card-icon {
  transform: translateY(-4px) scale(1.05);
}
.card-feishu:hover .card-icon {
  box-shadow: 0 8px 24px rgba(79,110,246,.22);
}
.card-opc:hover .card-icon {
  box-shadow: 0 8px 24px rgba(14,168,138,.22);
}
.card-fba:hover .card-icon {
  box-shadow: 0 8px 24px rgba(245,158,11,.22);
}
.card-fba-new:hover .card-icon {
  box-shadow: 0 8px 24px rgba(16,185,129,.22);
}
.card-fba-feishu:hover .card-icon {
  box-shadow: 0 8px 24px rgba(139,92,246,.22);
}

.card-title {
  font-size: 16px; font-weight: 700; color: var(--text);
  margin-bottom: 4px;
  letter-spacing: .5px;
}
.card-desc {
  font-size: 13px; color: var(--text3); margin-bottom: 12px;
}

.annun {
  width: 10px; height: 10px; border-radius: 50%;
  background: #d1d5db;
  transition: all .3s;
}
.annun.on {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(16,185,129,.15), 0 0 12px rgba(16,185,129,.35);
  animation: indPulse 1.5s ease-in-out infinite;
}
@keyframes indPulse {
  0%,100% { box-shadow: 0 0 0 4px rgba(16,185,129,.15), 0 0 12px rgba(16,185,129,.35); }
  50%     { box-shadow: 0 0 0 7px rgba(16,185,129,.07), 0 0 20px rgba(16,185,129,.45); }
}

/* Card footer */
.card-footer {
  padding: 14px 28px;
  background: var(--surface2);
  border-top: 1px solid var(--border);
  text-align: center;
  transition: all .3s ease;
}
.card-action {
  font-size: 13px; font-weight: 600;
  letter-spacing: .5px;
  transition: all .3s ease;
}
.card-feishu .card-action { color: var(--blue); }
.card-opc .card-action { color: var(--teal); }
.card-fba .card-action { color: #d97706; }
.card-fba-new .card-action { color: #059669; }
.card-ad-health .card-action { color: #d97706; }
.card-fba-feishu .card-action { color: #7c3aed; }
.card-opc-apps .card-action { color: #4f46e5; }
.card-finance .card-action { color: #b8860b; }

/* Hover lift */
.app-card:hover {
  transform: translateY(-6px);
  box-shadow:
    0 2px 4px rgba(0,0,0,.05),
    0 12px 28px rgba(0,0,0,.08),
    0 20px 48px rgba(0,0,0,.06);
}
.app-card:active {
  transform: translateY(-2px) scale(.98);
  transition: all .1s ease;
}

.card-feishu:hover {
  box-shadow:
    0 2px 4px rgba(79,110,246,.08),
    0 12px 28px rgba(79,110,246,.15),
    0 20px 48px rgba(79,110,246,.1);
}
.card-opc:hover {
  box-shadow:
    0 2px 4px rgba(14,168,138,.08),
    0 12px 28px rgba(14,168,138,.15),
    0 20px 48px rgba(14,168,138,.1);
}
.card-fba:hover {
  box-shadow:
    0 2px 4px rgba(245,158,11,.08),
    0 12px 28px rgba(245,158,11,.15),
    0 20px 48px rgba(245,158,11,.1);
}
.card-fba-new:hover {
  box-shadow:
    0 2px 4px rgba(16,185,129,.08),
    0 12px 28px rgba(16,185,129,.15),
    0 20px 48px rgba(16,185,129,.1);
}
.card-ad-health:hover {
  box-shadow:
    0 2px 4px rgba(245,158,11,.08),
    0 12px 28px rgba(245,158,11,.15),
    0 20px 48px rgba(245,158,11,.1);
}
.card-fba-feishu:hover {
  box-shadow:
    0 2px 4px rgba(139,92,246,.08),
    0 12px 28px rgba(139,92,246,.15),
    0 20px 48px rgba(139,92,246,.1);
}
.card-opc-apps:hover {
  box-shadow:
    0 2px 4px rgba(99,102,241,.08),
    0 12px 28px rgba(99,102,241,.15),
    0 20px 48px rgba(99,102,241,.1);
}

.card-feishu:hover .card-footer { background: #f8faff; }
.card-opc:hover .card-footer { background: #f7fdfa; }
.card-fba:hover .card-footer { background: #fffdf5; }
.card-fba-new:hover .card-footer { background: #f4fdf9; }
.card-ad-health:hover .card-footer { background: #fffdf5; }
.card-fba-feishu:hover .card-footer { background: #faf9ff; }
.card-opc-apps:hover .card-footer { background: #f3f4ff; }

/* 自动选品 card-star-products */
.card-star-products .card-accent {
  background: linear-gradient(90deg, #8b5cf6, #a78bfa);
}
.card-star-products .card-icon {
  background: linear-gradient(135deg, #f7f5ff 0%, #ede9fe 100%);
  color: #7c3aed;
  box-shadow: 0 4px 12px rgba(139,92,246,.15);
}
.card-star-products:hover .card-icon {
  box-shadow: 0 8px 24px rgba(139,92,246,.22);
}
.card-star-products .card-action { color: #7c3aed; }
.card-star-products:hover {
  box-shadow:
    0 2px 4px rgba(139,92,246,.08),
    0 12px 28px rgba(139,92,246,.15),
    0 20px 48px rgba(139,92,246,.1);
}
.card-star-products:hover .card-footer { background: #faf9ff; }

/* ═══════════════════════════════════════════════════════════════
   PANEL (通用面板)
   ═══════════════════════════════════════════════════════════════ */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,.03), 0 4px 12px rgba(0,0,0,.04);
  overflow: hidden;
}

.panel-label {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 20px;
  font-size: 14px; font-weight: 700; color: var(--text);
  letter-spacing: 1px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}
.panel-label svg { color: var(--text3); flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════ */
.btn {
  font-family: var(--font); font-size: 13px; font-weight: 600;
  padding: 10px 22px; border-radius: 10px; cursor: pointer;
  border: none; outline: none; text-decoration: none;
  transition: all .15s ease;
  position: relative;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(180deg, var(--blue) 0%, var(--blue2) 100%);
  color: #fff;
  box-shadow: 0 2px 0 rgba(61,86,224,.3), 0 4px 12px rgba(79,110,246,.25);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #6b8cf8 0%, var(--blue) 100%);
  box-shadow: 0 2px 0 rgba(61,86,224,.3), 0 6px 20px rgba(79,110,246,.3);
}
.btn-primary:active {
  box-shadow: 0 1px 0 rgba(61,86,224,.2), 0 2px 6px rgba(79,110,246,.2);
}

.btn-ghost {
  background: #fff;
  color: var(--text2);
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.btn-ghost:hover {
  background: #f8fafc;
  border-color: var(--border2);
}

/* ═══════════════════════════════════════════════════════════════
   EMBED PANEL
   ═══════════════════════════════════════════════════════════════ */
.embed-panel {
  min-height: 640px; display: flex; flex-direction: column;
}
.embed-panel .panel-label {
  justify-content: space-between;
}
.embed-panel .panel-label > span {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-align: left; flex: 1 1 auto; min-width: 0;
}
.btn-close-embed {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600;
  padding: 6px 14px;
  background: #fff;
  color: var(--text2);
  border: 1px solid var(--border);
  border-radius: 8px; cursor: pointer;
  font-family: var(--font);
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
  transition: all .15s;
  flex-shrink: 0;
}
.btn-close-embed:hover {
  background: #fef2f2;
  border-color: rgba(239,68,68,.2);
  color: var(--red);
}
.btn-close-embed:active { transform: translateY(1px); }

.embed-container {
  flex: 1; overflow: hidden; min-height: 600px; background: #fff;
}
.embed-container iframe {
  width: 100%; height: 100%; min-height: 600px; border: none;
}

/* ═══════════════════════════════════════════════════════════════
   LOG PANEL
   ═══════════════════════════════════════════════════════════════ */
.log-panel {
  max-height: 300px; display: flex; flex-direction: column;
}
.log-panel .panel-label {
  justify-content: space-between;
}
.log-panel .panel-label .btn-clear {
  font-size: 11px; padding: 5px 12px;
  background: var(--surface);
  color: var(--text3);
  border: 1px solid var(--border);
  border-radius: 7px;
  cursor: pointer; font-family: var(--font); font-weight: 600;
  transition: all .15s;
  margin-left: auto;
}
.log-panel .panel-label .btn-clear:hover {
  color: var(--text); border-color: var(--border2); background: #fff;
}

.log-container {
  flex: 1; overflow-y: auto;
  padding: 10px 16px;
  background: #fafbfd;
  font-family: var(--font-mono); font-size: 11px;
  line-height: 1.7; color: var(--text2);
  min-height: 100px; max-height: 220px;
}
.log-entry { padding: 1px 0; white-space: pre-wrap; word-break: break-all; }
.log-time { color: var(--text3); margin-right: 6px; }
.log-ok { color: var(--green); font-weight: 600; }
.log-fail { color: var(--red); font-weight: 600; }
.log-info { color: var(--text2); }
.log-warn { color: var(--orange); font-weight: 600; }

/* ═══════════════════════════════════════════════════════════════
   ARCHIVE PANEL — 备查（纯文字链接，节省空间）
   ═══════════════════════════════════════════════════════════════ */
.archive-panel .archive-links {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 10px; padding: 12px 20px;
  background: var(--surface2);
}
.archive-link {
  font-size: 13px; font-weight: 600; color: var(--blue);
  text-decoration: none; cursor: pointer;
  transition: color .15s ease;
}
.archive-link:hover { color: var(--blue2); text-decoration: underline; }
.archive-sep { color: var(--text3); font-size: 13px; }

/* ═══════════════════════════════════════════════════════════════
   AUTH MODAL
   ═══════════════════════════════════════════════════════════════ */
.auth-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: rgba(15,23,42,.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.auth-modal {
  background: #fff;
  border-radius: 20px;
  padding: 36px 32px;
  width: 380px; max-width: 90vw;
  box-shadow:
    0 4px 12px rgba(0,0,0,.06),
    0 16px 48px rgba(0,0,0,.1);
  text-align: center;
}
.auth-icon {
  width: 56px; height: 56px; border-radius: 14px;
  background: linear-gradient(135deg, #eff2ff 0%, #dce4fe 100%);
  color: var(--blue);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.auth-modal h2 {
  font-size: 20px; font-weight: 700; color: var(--text);
  margin-bottom: 4px; letter-spacing: 1px;
}
.auth-modal p {
  font-size: 13px; color: var(--text3); margin-bottom: 20px;
}
.auth-modal input {
  display: block; width: 100%;
  padding: 12px 14px; margin-bottom: 12px;
  font-size: 14px; font-family: var(--font);
  border: 1.5px solid var(--border);
  border-radius: 10px; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.auth-modal input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(79,110,246,.08);
}
.auth-error {
  color: var(--red); font-size: 13px; margin-bottom: 10px;
  font-weight: 600;
}
.auth-btns { display: flex; gap: 10px; margin-top: 4px; }
.auth-btns .btn { flex: 1; padding: 10px 0; font-size: 14px; }

/* ═══════════════════════════════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,.08); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,.14); }

.hidden { display: none !important; }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — TABLET (≤900px)
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  #app { padding: 0 14px 36px; }

  header.banner {
    height: 64px; padding: 0 12px; margin: 12px 0 0;
    border-radius: 14px;
  }
  .banner-left { min-width: auto; gap: 5px; }
  .banner-status { font-size: 10px; }
  .banner-center { margin: 0; }
  h1.main-title { font-size: 22px; letter-spacing: 3px; }
  .banner-right { min-width: auto; gap: 5px; }
  .banner-date { font-size: 10px; }
  .banner-time { font-size: 13px; }
  .pomodoro { font-size: 13px; padding: 4px 8px; }

  .app-status-bar { flex-direction: column; gap: 8px; margin: 12px 0; }
  .app-status-item { font-size: 11px; }

  .section-title { font-size: 22px; }
  .cards-grid { gap: 14px; }
  .card-body { padding: 22px 18px 16px; }
  .card-title { font-size: 14px; }
  .card-icon { width: 52px; height: 52px; border-radius: 13px; }
  .card-icon svg { width: 28px; height: 28px; }

  .embed-panel { min-height: 460px; }
  .embed-container { min-height: 430px; }
  .embed-container iframe { min-height: 430px; }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE (≤600px)
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  #app { padding: 0 8px 28px; }

  header.banner {
    height: auto; padding: 10px 12px; margin: 8px 0 0;
    flex-wrap: wrap; gap: 6px; justify-content: center;
    border-radius: 12px;
  }
  .banner-left { order: 1; min-width: auto; }
  .banner-center { order: 0; width: 100%; }
  .banner-right { order: 2; min-width: auto; gap: 5px; }
  h1.main-title { font-size: 18px; letter-spacing: 2px; }
  .banner-date { font-size: 9px; }
  .banner-time { font-size: 12px; }
  .pomodoro { font-size: 12px; padding: 3px 8px; border-radius: 6px; }

  .app-status-bar { gap: 6px; }
  .app-status-item { font-size: 10px; padding: 6px 10px; border-radius: 8px; }

  main.console { gap: 14px; }

  .section-header { margin-bottom: 16px; }
  .section-title { font-size: 19px; }
  .section-sub { font-size: 12px; }

  .cards-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .card-body { padding: 20px 16px 14px; }
  .card-icon { width: 48px; height: 48px; border-radius: 12px; margin-bottom: 12px; }
  .card-icon svg { width: 26px; height: 26px; }
  .card-title { font-size: 14px; }
  .card-desc { font-size: 12px; }
  .card-footer { padding: 12px 16px; }
  .card-action { font-size: 12px; }

  .app-card {
    min-height: 44px;
    border-radius: 14px;
  }

  .embed-panel { min-height: 380px; }
  .embed-container { min-height: 350px; }
  .embed-container iframe { min-height: 350px; }
  .embed-panel .panel-label { font-size: 12px; padding: 10px; }

  .auth-overlay { align-items: flex-start; padding-top: 10vh; }
  .auth-modal {
    padding: 28px 18px; border-radius: 16px;
  }
  .auth-modal h2 { font-size: 17px; }
  .auth-modal input { padding: 12px; font-size: 16px; }
  .auth-btns .btn { font-size: 14px; padding: 10px 0; }

  .log-panel { max-height: 240px; }
  .log-container { font-size: 10px; min-height: 60px; max-height: 150px; }
}

/* ═══════════════════════════════════════════════════════════════
   ADMIN BUTTON (banner top-right)
   ═══════════════════════════════════════════════════════════════ */
.btn-admin {
  color: #f59e0b !important;
  border-color: #f59e0b !important;
  font-weight: 600 !important;
}

/* ═══════════════════════════════════════════════════════════════
   ADMIN PANEL
   ═══════════════════════════════════════════════════════════════ */
.admin-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: rgba(15,23,42,.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.admin-panel {
  background: #fff;
  border-radius: 20px;
  width: 680px;
  max-width: 92vw;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 4px 12px rgba(0,0,0,.06),
    0 16px 48px rgba(0,0,0,.1);
  overflow: hidden;
}
.admin-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}
.admin-panel-header h2 {
  font-size: 18px; font-weight: 700; letter-spacing: 1px;
  margin: 0; color: var(--text);
}
.admin-panel-body {
  flex: 1; overflow-y: auto; padding: 16px 24px 24px;
}
.admin-loading, .admin-empty, .admin-error {
  text-align: center; padding: 40px 0;
  color: var(--text3); font-size: 14px;
}
.admin-error { color: var(--red); }
.admin-search {
  width: 100%; box-sizing: border-box;
  padding: 9px 14px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  transition: border-color .15s;
  /* 长列表滚动时搜索框吸顶,方便连续设置 */
  position: sticky;
  top: 0;
  z-index: 5;
}
.admin-search:focus { border-color: var(--blue); background: #f8faff; }

/* User row */
.admin-user-row {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 16px;
  margin-bottom: 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color .2s, background .2s;
}
.admin-user-row.modified {
  border-color: var(--orange);
  background: #fffbf0;
}
.admin-user-row.is-new {
  border-color: #e5e7eb;
}
.admin-user-info {
  min-width: 140px; max-width: 160px; flex-shrink: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.admin-user-name {
  font-size: 13px; font-weight: 700; color: var(--text);
}
.admin-user-company {
  font-size: 11px; font-weight: 500; color: #6366f1;
}
.admin-user-meta {
  font-size: 11px; color: var(--text3);
  word-break: break-all;
}
.admin-user-tag {
  display: inline-block;
  margin-top: 4px;
  font-size: 10px;
  font-weight: 600;
  color: #92400e;
  background: #fef3c7;
  padding: 1px 8px;
  border-radius: 10px;
  width: fit-content;
}
.admin-user-cards {
  flex: 1;
  display: flex; flex-wrap: wrap; gap: 8px;
  align-items: flex-start;
}
.admin-card-select-all,
.admin-card-select-none {
  font-size: 11px; font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text2);
  cursor: pointer;
  transition: all .15s;
}
.admin-card-select-all:hover { border-color: #10b981; color: #10b981; background: #f0fdf6; }
.admin-card-select-none:hover { border-color: #ef4444; color: #ef4444; background: #fef2f2; }
.admin-checkbox {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; color: var(--text2);
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all .15s;
  user-select: none;
}
.admin-checkbox:hover {
  border-color: var(--blue);
  background: #f8faff;
}
.admin-checkbox input[type="checkbox"] {
  accent-color: var(--blue);
  width: 14px; height: 14px; cursor: pointer;
}
.row-level-select {
  font-size: 12px; font-weight: 600; color: var(--text2);
  padding: 4px 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  margin-left: 2px;
}
.row-level-select:hover { border-color: var(--blue); background: #f8faff; }
.btn-save-user {
  padding: 6px 14px; font-size: 12px;
  flex-shrink: 0;
  margin-top: 2px;
}

@media (max-width: 600px) {
  .admin-panel { max-height: 90vh; border-radius: 14px; }
  .admin-panel-header { padding: 14px 16px; }
  .admin-panel-body { padding: 12px 14px; }
  .admin-user-row { flex-direction: column; gap: 10px; }
  .admin-user-info { max-width: 100%; }
}

/* ── 深圳仓库小帮手 (card-warehouse) ── */
.card-warehouse .card-accent {
  background: linear-gradient(90deg, #0ea5e9, #38bdf8);
}
.card-warehouse .card-icon {
  background: linear-gradient(135deg, #ecfeff 0%, #cffafe 100%);
  color: #0284c7;
  box-shadow: 0 4px 12px rgba(14,165,233,.15);
}
.card-warehouse:hover .card-icon {
  box-shadow: 0 8px 24px rgba(14,165,233,.24);
}
.card-warehouse .card-action { color: #0284c7; }
.card-warehouse:hover {
  border-color: rgba(14,165,233,.5);
  box-shadow: 0 12px 28px rgba(14,165,233,.12);
}

/* ── 量化交易平台 (card-quant) ── */
.card-quant .card-accent {
  background: linear-gradient(90deg, #6d28d9, #a855f7);
}
.card-quant .card-icon {
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
  color: #6d28d9;
  box-shadow: 0 4px 12px rgba(109,40,217,.15);
}
.card-quant:hover .card-icon {
  box-shadow: 0 8px 24px rgba(109,40,217,.24);
}
.card-quant .card-action { color: #6d28d9; }
.card-quant:hover {
  border-color: rgba(109,40,217,.5);
  box-shadow: 0 12px 28px rgba(109,40,217,.12);
}

/* ── 香港赛马数据平台 (card-hk-race) ──
   用赛马平台自己那套石板青(#1f6f78)，跟量化那张的紫分得开。 */
.card-hk-race .card-accent {
  background: linear-gradient(90deg, #1f6f78, #3fa8a0);
}
.card-hk-race .card-icon {
  background: linear-gradient(135deg, #eef7f7 0%, #dcf0ef 100%);
  color: #1f6f78;
  box-shadow: 0 4px 12px rgba(31,111,120,.15);
}
.card-hk-race:hover .card-icon {
  box-shadow: 0 8px 24px rgba(31,111,120,.24);
}
.card-hk-race .card-action { color: #1f6f78; }
.card-hk-race:hover {
  border-color: rgba(31,111,120,.5);
  box-shadow: 0 12px 28px rgba(31,111,120,.12);
}

/* ── 独立站工作台 (card-saas-store) ── */
.card-saas-store .card-accent {
  background: linear-gradient(90deg, #4f46e5, #7c5cf0);
}
.card-saas-store .card-icon {
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
  color: #4f46e5;
  box-shadow: 0 4px 12px rgba(79,70,229,.15);
}
.card-saas-store:hover .card-icon {
  box-shadow: 0 8px 24px rgba(79,70,229,.24);
}
.card-saas-store .card-action { color: #4f46e5; }
.card-saas-store:hover {
  border-color: rgba(79,70,229,.5);
  box-shadow: 0 12px 28px rgba(79,70,229,.12);
}

/* ── 利润表分析报告 (card-profit) ── */
.card-profit .card-accent {
  background: linear-gradient(90deg, #059669, #34d399);
}
.card-profit .card-icon {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  color: #059669;
  box-shadow: 0 4px 12px rgba(5,150,105,.15);
}
.card-profit:hover .card-icon {
  box-shadow: 0 8px 24px rgba(5,150,105,.24);
}
.card-profit .card-action { color: #059669; }
.card-profit:hover {
  border-color: rgba(5,150,105,.5);
  box-shadow: 0 12px 28px rgba(5,150,105,.12);
}

/* ── 亚马逊广告优化升级AI建议 (card-smart-ad) ── */
.card-smart-ad .card-accent {
  background: linear-gradient(90deg, #e11d48, #fb7185);
}
.card-smart-ad .card-icon {
  background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
  color: #e11d48;
  box-shadow: 0 4px 12px rgba(225,29,72,.15);
}
.card-smart-ad:hover .card-icon {
  box-shadow: 0 8px 24px rgba(225,29,72,.24);
}
.card-smart-ad .card-action { color: #e11d48; }
.card-smart-ad:hover {
  border-color: rgba(225,29,72,.5);
  box-shadow: 0 12px 28px rgba(225,29,72,.12);
}
