:root {
  --bg: #f3f5f7;
  --panel: #ffffff;
  --ink: #14202b;
  --ink-2: #33475a;
  --muted: #64788c;
  --faint: #93a3b3;
  --line: #dde5ec;
  --line-soft: #e8eef3;
  --accent: #0a5c74;
  --accent-hover: #084a5e;
  --accent-soft: #e5f1f5;
  --cyan: #2fc4b2;
  --navy: #0b1f33;
  --navy-2: #10314a;
  --warn: #96600f;
  --warn-soft: #fbf3e2;
  --danger: #a1372c;
  --danger-soft: #fbeeec;
  --ok: #22785c;
  --ok-soft: #e7f4ee;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(11, 31, 51, .04), 0 10px 30px rgba(11, 31, 51, .05);
  --font: "HarmonyOS Sans SC", "MiSans", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

[hidden] { display: none !important; }

.only-mobile { display: none; }

html, body { height: 100%; }

body {
  font-family: var(--font);
  background:
    radial-gradient(1100px 480px at 85% -12%, rgba(47, 196, 178, .10), transparent 62%),
    radial-gradient(900px 420px at 0% -10%, rgba(10, 92, 116, .08), transparent 60%),
    var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.app {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ---------- top bar ---------- */
.topbar {
  flex: none;
  height: 60px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(47, 196, 178, .18);
  background:
    linear-gradient(120deg, rgba(47, 196, 178, .10), transparent 45%),
    linear-gradient(100deg, var(--navy), var(--navy-2));
  z-index: 20;
}

.brand { display: flex; align-items: center; gap: 11px; color: #eaf3f8; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(140deg, rgba(47, 196, 178, .22), rgba(47, 196, 178, .06));
  border: 1px solid rgba(47, 196, 178, .4);
  color: var(--cyan);
}
.brand-mark svg { width: 24px; height: 24px; }
.brand-text { display: flex; align-items: baseline; gap: 9px; }
.brand-name { font-weight: 700; font-size: 17px; letter-spacing: .14em; }
.brand-sub { font-size: 11.5px; color: #8fa9bd; letter-spacing: .06em; }

.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar .btn-ghost { color: #b9cddd; }
.topbar .btn-ghost:hover { background: rgba(255, 255, 255, .09); color: #fff; }
.topbar .avatar {
  background: rgba(47, 196, 178, .14);
  border: 1px solid rgba(47, 196, 178, .45);
  color: var(--cyan);
}
.topbar .avatar:hover { background: rgba(47, 196, 178, .26); }

.proto-pill {
  font-size: 11px;
  color: var(--cyan);
  background: rgba(47, 196, 178, .10);
  border: 1px solid rgba(47, 196, 178, .32);
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: .04em;
}

.btn-ghost {
  font-size: 13px;
  color: var(--ink-2);
  padding: 6px 10px;
  border-radius: 8px;
  transition: background .15s ease;
}
.btn-ghost:hover { background: rgba(25, 26, 28, .05); }

.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: #e8e7e1; color: var(--ink-2);
  font-size: 12px; margin-left: 4px;
}
.avatar:hover { background: #dedcd4; }

/* ---------- chat ---------- */
.chat {
  flex: 1 1 auto;
  overflow-y: auto;
  scroll-behavior: smooth;
  padding: 0 20px;
}

.empty {
  max-width: 720px;
  min-height: calc(100dvh - 190px);
  margin: 0 auto;
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.empty-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  letter-spacing: .05em;
  color: var(--accent);
  border: 1px solid rgba(10, 92, 116, .22);
  background: rgba(255, 255, 255, .7);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.empty-badge::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(47, 196, 178, .16);
}

.empty h1 {
  font-size: clamp(30px, 3.6vw, 42px);
  line-height: 1.28;
  letter-spacing: .01em;
  font-weight: 700;
  background: linear-gradient(105deg, #0b1f33 35%, #0a5c74 72%, #1c9c90);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.empty-sub {
  margin-top: 16px;
  max-width: 590px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.8;
}

.chips {
  margin-top: 32px;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.chip {
  text-align: left;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .8);
  border-radius: 13px;
  padding: 14px 16px;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.chip:hover {
  border-color: rgba(10, 92, 116, .45);
  box-shadow: 0 8px 22px rgba(11, 31, 51, .08);
  transform: translateY(-2px);
}
.chip-title { display: block; font-size: 14px; font-weight: 600; color: var(--ink); }
.chip-desc { display: block; margin-top: 3px; font-size: 12px; color: var(--faint); }

.empty-note {
  margin-top: 18px;
  font-size: 12px;
  color: var(--faint);
}

.messages {
  max-width: 780px;
  margin: 0 auto;
  padding: 8px 0 16px;
}
.messages:empty { display: none; }

.chat-spacer { height: 22px; }

/* ---------- messages ---------- */
.msg {
  display: flex;
  gap: 12px;
  padding: 18px 0;
  animation: rise .22s ease both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.msg-avatar {
  flex: none;
  width: 26px; height: 26px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-top: 2px;
}
.msg-avatar svg { width: 14px; height: 14px; }

.msg-body { flex: 1 1 auto; min-width: 0; }

.msg-text { color: var(--ink-2); font-size: 15px; line-height: 1.78; white-space: pre-wrap; word-break: break-word; }
.msg-text strong { color: var(--ink); font-weight: 600; }

.msg-user {
  justify-content: flex-end;
  padding: 10px 0;
}
.msg-user .bubble {
  max-width: 78%;
  background: linear-gradient(135deg, #0e6f87, #0a4f66);
  color: #f2fafc;
  padding: 10px 15px;
  border-radius: 16px 16px 4px 16px;
  font-size: 14.5px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: 0 4px 14px rgba(10, 92, 116, .16);
}

.msg-note {
  margin-top: 10px;
  font-size: 12px;
  color: var(--faint);
  display: flex;
  gap: 6px;
  align-items: baseline;
  flex-wrap: wrap;
}

/* ---------- cards ---------- */
.card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}

.card + .card { margin-top: 10px; }

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.card-title { font-size: 15px; font-weight: 600; color: var(--ink); letter-spacing: -.005em; }
.card-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.tag {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 5px;
  white-space: nowrap;
  letter-spacing: .02em;
}
.tag-demo { color: var(--warn); background: var(--warn-soft); border: 1px solid #f0e0c4; }
.tag-plain { color: var(--muted); background: #f4f3ef; border: 1px solid var(--line-soft); }

/* upload summary */
.upload-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 14px;
}
.upload-stat { background: #fff; padding: 11px 12px; }
.upload-stat dt { font-size: 11.5px; color: var(--muted); }
.upload-stat dd { font-size: 17px; font-weight: 600; letter-spacing: -.01em; margin-top: 1px; }
.upload-stat dd small { font-size: 11.5px; font-weight: 400; color: var(--faint); margin-left: 2px; }

.thumbs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.thumb {
  width: 62px; height: 62px;
  border-radius: 8px;
  overflow: hidden;
  background: #f0efea;
  border: 1px solid var(--line-soft);
  position: relative;
  flex: none;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-ph { width: 100%; height: 100%; display: grid; place-items: center; color: var(--faint); font-size: 10px; text-align: center; padding: 4px; }
.thumb-more {
  display: grid; place-items: center;
  font-size: 12px; color: var(--muted);
  background: #f7f6f2;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.field label { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbf9;
  padding: 6px 9px;
  font-size: 13px;
  color: var(--ink);
  outline: none;
  transition: border-color .15s ease, background .15s ease;
}
.field input:focus { border-color: #b9c9d6; background: #fff; }
.field input::placeholder { color: #b6b7b2; }

.alert-line {
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ink-2);
  background: #f8f8f5;
  border-left: 2px solid #d8d6cd;
  padding: 8px 11px;
  border-radius: 0 6px 6px 0;
  margin-bottom: 14px;
}
.alert-line.warn { background: var(--warn-soft); border-left-color: #d9b878; color: #6d4a12; }

.exif-line {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  margin: -4px 0 12px;
  word-break: break-all;
}

.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.btn-primary {
  background: linear-gradient(135deg, #0e6f87, #0a4f66);
  color: #fff;
  border-radius: 9px;
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 550;
  box-shadow: 0 4px 14px rgba(10, 92, 116, .20);
  transition: box-shadow .15s ease, transform .15s ease, background .15s ease;
}
.btn-primary:hover { background: linear-gradient(135deg, #0c6279, #084458); box-shadow: 0 6px 18px rgba(10, 92, 116, .28); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn-new { padding: 7px 15px; font-size: 13px; }

.btn-secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  border-radius: 9px;
  padding: 7px 13px;
  font-size: 13px;
}
.btn-secondary:hover { background: #fafaf7; border-color: #d8d6ce; }

.btn-text { font-size: 12.5px; color: var(--muted); padding: 6px 4px; }
.btn-text:hover { color: var(--ink); }

/* progress */
.progress-wrap { margin: 4px 0 12px; }
.progress-top {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12.5px; color: var(--muted); margin-bottom: 7px;
}
.progress-top strong { color: var(--ink-2); font-weight: 550; }
.progress-track {
  height: 4px; background: #ecebe5; border-radius: 999px; overflow: hidden;
}
.progress-bar {
  height: 100%; width: 0%;
  background: var(--accent);
  border-radius: 999px;
  transition: width .3s ease;
}
.progress-note { margin-top: 8px; font-size: 11.5px; color: var(--faint); }

/* result */
.result-stats {
  display: flex; gap: 18px; flex-wrap: wrap;
  padding: 12px 0 16px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 4px;
}
.result-stat { display: flex; flex-direction: column; }
.result-stat b { font-size: 20px; font-weight: 620; letter-spacing: -.02em; }
.result-stat span { font-size: 11.5px; color: var(--muted); }
.result-stat b.high { color: var(--danger); }
.result-stat b.medium { color: var(--warn); }
.result-stat b.low { color: var(--ok); }

.finding {
  border-bottom: 1px solid var(--line-soft);
  padding: 11px 0;
}
.finding:last-of-type { border-bottom: none; }

.finding-row {
  display: flex; align-items: flex-start; gap: 10px;
}
.sev {
  flex: none;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
  margin-top: 3px;
  white-space: nowrap;
}
.sev-high { color: var(--danger); background: var(--danger-soft); }
.sev-medium { color: var(--warn); background: var(--warn-soft); }
.sev-low { color: var(--ok); background: var(--ok-soft); }

.finding-main { flex: 1 1 auto; min-width: 0; }
.finding-title { font-size: 14px; font-weight: 550; color: var(--ink); }
.finding-meta {
  font-size: 12px; color: var(--muted); margin-top: 2px;
  display: flex; gap: 10px; flex-wrap: wrap;
}
.finding-detail {
  margin-top: 8px;
  padding: 10px 12px;
  background: #fafaf7;
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.7;
}
.finding-detail dt { color: var(--faint); font-size: 11px; margin-top: 6px; }
.finding-detail dt:first-child { margin-top: 0; }
.finding-detail dd { margin: 0; }

.finding-foot {
  margin-top: 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap;
}

/* policy / product cards */
.source-list { display: grid; gap: 10px; margin-top: 4px; }

.source-item {
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 12px 14px;
  background: #fdfdfb;
}
.source-item h4 { font-size: 13.5px; font-weight: 600; line-height: 1.55; }
.source-meta {
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--muted);
  display: flex; flex-wrap: wrap; gap: 4px 10px;
}
.source-note { margin-top: 6px; font-size: 12.5px; color: var(--ink-2); line-height: 1.65; }
.source-item a { font-size: 12px; display: inline-block; margin-top: 6px; }

.kv { display: grid; grid-template-columns: 92px 1fr; gap: 4px 12px; font-size: 12.5px; margin-top: 8px; }
.kv dt { color: var(--faint); }
.kv dd { color: var(--ink-2); }

.cat-block { margin-top: 14px; }
.cat-block h4 {
  font-size: 12px; color: var(--muted); font-weight: 550;
  padding-bottom: 5px; border-bottom: 1px solid var(--line-soft);
}
.cat-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cat-item {
  font-size: 12px; color: var(--ink-2);
  background: #f7f6f2; border: 1px solid var(--line-soft);
  padding: 2px 8px; border-radius: 5px;
}

/* ---------- composer ---------- */
.composer-wrap {
  flex: none;
  padding: 8px 20px 14px;
  background: linear-gradient(to bottom, rgba(243,245,247,0), var(--bg) 26%);
}
.composer {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 7px 8px 7px 7px;
  box-shadow: 0 2px 10px rgba(11, 31, 51, .05);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.composer:focus-within {
  border-color: rgba(10, 92, 116, .5);
  box-shadow: 0 0 0 4px rgba(10, 92, 116, .08), 0 6px 20px rgba(11, 31, 51, .08);
}
.composer textarea {
  flex: 1 1 auto;
  resize: none;
  border: none;
  outline: none;
  background: transparent;
  padding: 7px 4px;
  max-height: 160px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink);
}
.composer textarea::placeholder { color: #a9aaa5; }

.icon-btn {
  flex: none;
  width: 32px; height: 32px;
  border-radius: 8px;
  display: grid; place-items: center;
  color: var(--muted);
  transition: background .15s ease, color .15s ease;
}
.icon-btn:hover { background: #f3f2ed; color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }

.send-btn {
  flex: none;
  width: 32px; height: 32px;
  border-radius: 9px;
  display: grid; place-items: center;
  background: var(--accent);
  color: #fff;
  transition: background .15s ease, opacity .15s ease;
}
.send-btn:hover { background: var(--accent-hover); }
.send-btn:disabled { opacity: .35; cursor: default; }
.send-btn svg { width: 18px; height: 18px; }

.composer-hint {
  max-width: 780px;
  margin: 7px auto 0;
  font-size: 11px;
  color: #a6a7a2;
  text-align: center;
}
.composer-hint .dot { margin: 0 6px; }

/* ---------- drop overlay ---------- */
.drop-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(246, 246, 243, .82);
  backdrop-filter: blur(3px);
  display: grid; place-items: center;
  padding: 24px;
}
.drop-card {
  border: 1.5px dashed #b6c6d2;
  background: #fff;
  border-radius: 18px;
  padding: 40px 54px;
  text-align: center;
  box-shadow: var(--shadow);
}
.drop-card strong { display: block; font-size: 16px; }
.drop-card span { display: block; margin-top: 4px; font-size: 12.5px; color: var(--muted); }

/* ---------- scrim / drawer ---------- */
.scrim {
  position: fixed; inset: 0;
  background: rgba(20, 22, 25, .28);
  z-index: 70;
  animation: fade .18s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(820px, 100%);
  background: #fff;
  z-index: 80;
  transform: translateX(100%);
  transition: transform .26s cubic-bezier(.32, .72, .28, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -12px 0 40px rgba(20, 22, 25, .12);
}
.drawer.open { transform: none; }

.drawer-head {
  flex: none;
  padding: 18px 26px;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  background: #fcfcfa;
}
.eyebrow { font-size: 11px; letter-spacing: .08em; color: var(--faint); text-transform: uppercase; }
.drawer-head h2 { font-size: 17px; font-weight: 620; letter-spacing: -.01em; margin-top: 2px; }
.drawer-actions { display: flex; align-items: center; gap: 6px; }

.drawer-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 26px;
  background: #fbfbf9;
}

/* ---------- report ---------- */
.rpt {
  max-width: 700px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 40px 44px 46px;
  box-shadow: 0 1px 3px rgba(23, 25, 28, .04);
  color: #1e1f22;
}

.rpt-head { border-bottom: 2px solid #1e1f22; padding-bottom: 14px; margin-bottom: 6px; }
.rpt-kicker { font-size: 11px; letter-spacing: .1em; color: var(--muted); }
.rpt-title { font-size: 23px; font-weight: 650; letter-spacing: -.01em; margin-top: 4px; }
.rpt-sub { font-size: 12px; color: var(--muted); margin-top: 6px; display: flex; gap: 12px; flex-wrap: wrap; }

.rpt-banner {
  margin-top: 14px;
  border: 1px solid #efdcb9;
  background: #fdf7ec;
  color: #6f4d17;
  border-radius: 6px;
  padding: 8px 11px;
  font-size: 11.5px;
  line-height: 1.6;
}

.rpt h3 {
  font-size: 13.5px;
  font-weight: 650;
  margin: 26px 0 10px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--line-soft);
  letter-spacing: .01em;
}
.rpt p { font-size: 12.5px; line-height: 1.85; color: #33353a; }
.rpt .muted { color: var(--muted); }

.rpt-info {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 18px;
  font-size: 12.5px;
  margin-top: 12px;
}
.rpt-info div { display: flex; gap: 8px; }
.rpt-info span { color: var(--muted); flex: none; }
.rpt-info b { font-weight: 500; color: #24262a; }

.rpt table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 11.5px; }
.rpt th, .rpt td {
  border: 1px solid #e4e3dd;
  padding: 7px 8px;
  text-align: left;
  vertical-align: top;
  line-height: 1.6;
}
.rpt th { background: #f6f5f0; font-weight: 600; color: #3b3d42; }
.rpt td.num { white-space: nowrap; }
.rpt .rpt-sev { white-space: nowrap; font-weight: 500; }
.rpt .rpt-sev.high { color: var(--danger); }
.rpt .rpt-sev.medium { color: var(--warn); }
.rpt .rpt-sev.low { color: var(--ok); }
.rpt ol, .rpt ul { margin: 6px 0 0 18px; font-size: 12.5px; line-height: 1.85; color: #33353a; }
.rpt li { margin-bottom: 3px; }

.rpt-sign {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 14px;
  font-size: 12px;
}
.rpt-sign div { border-bottom: 1px solid #bbb; padding-bottom: 22px; color: var(--muted); }

.rpt-foot {
  margin-top: 30px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
  font-size: 10.5px;
  color: var(--faint);
  line-height: 1.7;
}

.rpt-review {
  margin-top: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 12px;
  background: #fcfcfa;
  display: grid;
  gap: 8px;
}
.rpt-review label { font-size: 11.5px; color: var(--muted); display: block; margin-bottom: 3px; }
.rpt-review input, .rpt-review textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 12px;
  background: #fff;
  outline: none;
  resize: vertical;
}
.rpt-review input:focus, .rpt-review textarea:focus { border-color: #b9c9d6; }
.rpt-review .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.empty-report {
  display: grid; place-items: center; gap: 8px;
  padding: 80px 20px; color: var(--muted); font-size: 13px; text-align: center;
}

/* ---------- modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 90;
  display: none;
  place-items: center;
  padding: 22px;
  background: rgba(20, 22, 25, .3);
}
.modal.open { display: grid; }
.modal-card {
  width: min(660px, 100%);
  max-height: 84vh;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(20, 22, 25, .2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: rise .2s ease both;
}
.modal-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line-soft);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-head h2 { font-size: 16px; font-weight: 620; }
.modal-body { padding: 6px 22px 24px; overflow-y: auto; font-size: 13.5px; color: var(--ink-2); line-height: 1.8; }
.modal-body h3 { font-size: 13px; font-weight: 620; color: var(--ink); margin: 18px 0 6px; }
.modal-body p { margin-top: 4px; }
.modal-body ul { margin: 6px 0 0 18px; }
.modal-body li { margin-bottom: 4px; }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 104px;
  transform: translateX(-50%);
  z-index: 100;
  background: #24262a;
  color: #fff;
  font-size: 12.5px;
  padding: 8px 14px;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(20, 22, 25, .18);
  animation: rise .18s ease both;
  max-width: calc(100vw - 40px);
}

/* ---------- workbench ---------- */
.workbench { width: min(1080px, 100%); }
.wb-head { align-items: center; }
.wb-actor {
  font-size: 12px; color: var(--muted); background: #f2f1ec;
  border: 1px solid var(--line-soft); padding: 3px 9px; border-radius: 999px;
}

.wb-tabs {
  flex: none; display: flex; gap: 2px; padding: 0 22px;
  background: #fcfcfa; border-bottom: 1px solid var(--line-soft);
  overflow-x: auto;
}
.wb-tabs button {
  flex: none; font-size: 13px; color: var(--muted);
  padding: 11px 12px 9px; border-bottom: 2px solid transparent; white-space: nowrap;
}
.wb-tabs button:hover { color: var(--ink); }
.wb-tabs button.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

.wb-body { padding: 22px 26px 40px; }
.wb-section { max-width: 940px; margin: 0 auto; display: grid; gap: 14px; }
.wb-sec-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.wb-sec-head h3 { font-size: 15px; font-weight: 620; }
.wb-sec-head p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.wb-note { font-size: 11.5px; color: var(--faint); line-height: 1.7; }

.wb-empty {
  border: 1px dashed var(--line); background: #fff; border-radius: 12px;
  padding: 48px 24px; text-align: center; color: var(--muted); font-size: 13px;
  display: grid; gap: 8px; justify-items: center;
}

.wb-task {
  border: 1px solid var(--line); background: #fff; border-radius: 12px;
  padding: 16px 18px; box-shadow: var(--shadow);
}
.wb-task-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.wb-task-id { font-size: 14.5px; font-weight: 600; letter-spacing: -.005em; }
.wb-task-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.wb-task-stats {
  display: flex; gap: 18px; flex-wrap: wrap; margin-top: 12px;
  padding-top: 12px; border-top: 1px solid var(--line-soft);
}
.wb-task-stats div { display: flex; flex-direction: column; min-width: 58px; }
.wb-task-stats b { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.wb-task-stats span { font-size: 11px; color: var(--muted); }
.wb-task-stats b.high { color: var(--danger); }
.wb-task-stats b.warn { color: var(--warn); }
.wb-task-stats b.ok { color: var(--ok); }
.wb-task-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

.wb-pill {
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--line-soft); background: #f6f5f1; color: var(--muted);
  white-space: nowrap;
}
.wb-pill.done { color: var(--ok); background: var(--ok-soft); border-color: #d9e8df; }
.wb-pill.running { color: var(--accent); background: var(--accent-soft); border-color: #d7e3ec; }
.wb-pill.warn { color: var(--warn); background: var(--warn-soft); border-color: #f0e0c4; }
.wb-pill.danger { color: var(--danger); background: var(--danger-soft); border-color: #f0d6d2; }

.wb-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.wb-toolbar label { font-size: 12px; color: var(--muted); }
.wb-toolbar select {
  border: 1px solid var(--line); background: #fff; border-radius: 8px;
  padding: 6px 9px; font-size: 13px;
}

.wb-review-list { display: grid; gap: 10px; }
.wb-review-item { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 13px 15px; }
.wb-review-top { display: flex; gap: 10px; align-items: flex-start; }
.wb-review-title { font-size: 13.5px; font-weight: 550; }
.wb-review-meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; display: flex; gap: 10px; flex-wrap: wrap; }
.wb-review-ctl { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.wb-choice {
  font-size: 12px; padding: 4px 10px; border: 1px solid var(--line);
  border-radius: 999px; background: #fff; color: var(--ink-2);
}
.wb-choice:hover { background: #fafaf7; }
.wb-choice.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 550; }
.wb-choice.on.exclude { border-color: #d9a9a3; background: var(--danger-soft); color: var(--danger); }
.wb-choice.on.change { border-color: #d9b878; background: var(--warn-soft); color: var(--warn); }
.wb-review-item select, .wb-review-item input[type="text"] {
  border: 1px solid var(--line); border-radius: 7px; padding: 4px 8px;
  font-size: 12px; background: #fff;
}
.wb-review-note { margin-top: 9px; display: flex; gap: 8px; align-items: center; }
.wb-review-note input { flex: 1 1 auto; min-width: 0; }
.wb-review-state { font-size: 11px; color: var(--faint); margin-top: 6px; }
.wb-review-summary {
  display: flex; gap: 18px; flex-wrap: wrap; padding: 12px 14px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
}
.wb-review-summary div { display: flex; flex-direction: column; }
.wb-review-summary b { font-size: 18px; font-weight: 620; }
.wb-review-summary span { font-size: 11px; color: var(--muted); }

.wb-log { border: 1px solid var(--line); background: #fff; border-radius: 10px; overflow: hidden; }
.wb-log-head {
  display: grid; grid-template-columns: 132px 90px 1fr; gap: 12px;
  padding: 9px 14px; background: #f6f5f0; font-size: 11px;
  color: var(--muted); border-bottom: 1px solid var(--line-soft);
}
.wb-log-row {
  display: grid; grid-template-columns: 132px 90px 1fr; gap: 12px;
  padding: 10px 14px; border-top: 1px solid var(--line-soft); font-size: 12.5px;
}
.wb-log-row:first-child { border-top: none; }
.wb-log-row .t { color: var(--muted); white-space: nowrap; }
.wb-log-row .a { color: var(--ink); font-weight: 550; white-space: nowrap; }
.wb-log-row .d { color: var(--ink-2); word-break: break-word; }

.wb-frame-wrap { display: grid; gap: 10px; }
.wb-frame {
  width: 100%; height: calc(100dvh - 300px); min-height: 420px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
.wb-seg { display: flex; gap: 4px; background: #f2f1ec; padding: 3px; border-radius: 9px; width: max-content; max-width: 100%; }
.wb-seg button { font-size: 12.5px; color: var(--muted); padding: 5px 12px; border-radius: 7px; white-space: nowrap; }
.wb-seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(23, 25, 28, .08); font-weight: 550; }

.wb-form { display: grid; gap: 10px; max-width: 420px; }
.wb-form label { font-size: 11.5px; color: var(--muted); display: block; margin-bottom: 3px; }
.wb-form input, .wb-form select {
  width: 100%; border: 1px solid var(--line); border-radius: 8px;
  padding: 7px 9px; font-size: 13px; background: #fff;
}
.wb-kicker { font-size: 11.5px; color: var(--faint); letter-spacing: .04em; text-transform: uppercase; }
.wb-perm { width: 100%; border-collapse: collapse; background: #fff; font-size: 12.5px; }
.wb-perm th, .wb-perm td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.wb-perm th { background: #f6f5f0; font-weight: 600; font-size: 11.5px; color: var(--ink-2); }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
  .only-mobile { display: inline; }
  .topbar { padding: 0 14px; height: 54px; }
  .brand-sub { display: none; }
  .proto-pill { display: none; }
  .chat { padding: 0 16px; }
  .empty { padding-top: 24px; min-height: calc(100dvh - 150px); }
  .chips { grid-template-columns: 1fr; gap: 8px; }
  .empty h1 { font-size: 26px; }
  .composer-wrap { padding: 6px 12px 10px; }
  .composer-hint { font-size: 10px; }
  .upload-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .meta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .msg-user .bubble { max-width: 88%; }
  .drawer-head { padding: 14px 16px; }
  .drawer-body { padding: 14px; }
  .rpt { padding: 24px 18px 30px; }
  .rpt-info { grid-template-columns: 1fr 1fr; }
  .rpt-sign { grid-template-columns: 1fr; gap: 10px; }
  .rpt-sign div { padding-bottom: 16px; }
  .rpt-review .row2 { grid-template-columns: 1fr; }
  .rpt table { font-size: 10.5px; }
  .rpt th, .rpt td { padding: 5px 6px; }
  .wb-tabs { padding: 0 10px; }
  .wb-body { padding: 14px; }
  .wb-actor { display: none; }
  .wb-log-head { display: none; }
  .wb-log-row { grid-template-columns: 1fr; gap: 2px; }
  .wb-frame { height: calc(100dvh - 260px); }
}

@media (max-width: 420px) {
  .btn-ghost#btn-about { display: none; }
  .empty h1 { font-size: 23px; }
  .msg-avatar { display: none; }
  .rpt-info { grid-template-columns: 1fr; }
}

:focus-visible {
  outline: 2px solid #7ea3bd;
  outline-offset: 2px;
  border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .chat { scroll-behavior: auto; }
}

/* ---------- auth ---------- */
.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(900px 420px at 80% 0%, rgba(47, 196, 178, .16), transparent 60%),
    linear-gradient(150deg, #0b1f33 0%, #10314a 55%, #0d3c50 100%);
}
body.auth-locked { overflow: hidden; }
.auth-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 18px;
  padding: 28px 30px 24px;
  box-shadow: 0 24px 70px rgba(3, 12, 22, .45);
}
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-brand .brand-mark { width: 40px; height: 40px; }
.auth-brand strong { display: block; font-size: 18px; letter-spacing: .14em; color: var(--navy); }
.auth-brand small { display: block; font-size: 12px; color: var(--muted); letter-spacing: .05em; }
.auth-sub { margin: 16px 0 18px; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.auth-field { display: block; margin-bottom: 12px; }
.auth-field span { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 5px; }
.auth-field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 14px;
  background: #fafcfd;
  outline: none;
}
.auth-field input:focus { border-color: rgba(10, 92, 116, .55); background: #fff; box-shadow: 0 0 0 3px var(--accent-soft); }
.auth-submit { width: 100%; margin-top: 6px; padding: 10px; font-size: 14px; border-radius: 9px; }
.auth-error {
  margin: 2px 0 8px;
  padding: 7px 10px;
  font-size: 12.5px;
  color: var(--danger);
  background: var(--danger-soft);
  border: 1px solid #f0d6d2;
  border-radius: 7px;
}
.auth-demo { margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--line); }
.auth-demo > p { font-size: 11.5px; color: var(--faint); margin-bottom: 8px; }
.auth-demo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.auth-demo-grid button {
  font-size: 11.5px;
  padding: 6px 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink-2);
  background: #f8fbfc;
}
.auth-demo-grid button:hover { border-color: rgba(10, 92, 116, .4); background: #fff; }

/* ---------- report status / server extras ---------- */
.rpt-status {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: #f6f5f1;
  white-space: nowrap;
}
.rpt-status.approved { color: var(--ok); background: var(--ok-soft); border-color: #cfe3d8; }
.rpt-status.reviewed { color: var(--warn); background: var(--warn-soft); border-color: #f0e0c4; }
.rpt-status.rejected { color: var(--danger); background: var(--danger-soft); border-color: #f0d6d2; }

.rpt-approve-panel {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafaf7;
}
.rpt-approve-panel h4 { font-size: 13px; margin-bottom: 6px; }
.rpt-approve-panel p { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.rpt-approve-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- server task pill ---------- */
.srv-badge {
  font-size: 10.5px;
  color: var(--ok);
  background: var(--ok-soft);
  border: 1px solid #cfe3d8;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 6px;
}

/* ---------- models ---------- */
.model-list { display: grid; gap: 12px; }
.model-card { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 14px 16px; }
.model-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.model-name { font-size: 14px; font-weight: 600; }
.model-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.model-stage { font-size: 11px; padding: 2px 8px; border-radius: 999px; white-space: nowrap; border: 1px solid var(--line); }
.model-stage.candidate { color: var(--muted); background: #f5f4f0; }
.model-stage.gray { color: var(--warn); background: var(--warn-soft); border-color: #f0e0c4; }
.model-stage.default { color: var(--ok); background: var(--ok-soft); border-color: #cfe3d8; }
.model-stage.retired { color: var(--faint); background: #f4f3ef; }
.model-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: 8px; overflow: hidden; margin: 12px 0; }
.model-metrics div { background: #fff; padding: 8px 10px; }
.model-metrics span { display: block; font-size: 10.5px; color: var(--muted); }
.model-metrics b { font-size: 14px; font-weight: 600; }
.model-gate { font-size: 11.5px; padding: 8px 10px; border-radius: 7px; margin-bottom: 10px; }
.model-gate.pass { color: var(--ok); background: var(--ok-soft); }
.model-gate.fail { color: var(--danger); background: var(--danger-soft); }
.model-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.model-form { border: 1px dashed var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 16px; }
.model-form h4 { font-size: 13px; margin-bottom: 10px; }
.model-form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.model-form-grid label { display: block; font-size: 11px; color: var(--muted); }
.model-form-grid input { width: 100%; border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; font-size: 12.5px; margin-top: 3px; }
.model-form-actions { margin-top: 10px; display: flex; gap: 8px; align-items: center; }

/* ---------- annotation ---------- */
.ann-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 14px; align-items: start; }
.ann-side { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fff; }
.ann-side label { display: block; font-size: 11.5px; color: var(--muted); margin: 8px 0 3px; }
.ann-side select, .ann-side input { width: 100%; border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; font-size: 12.5px; background: #fff; }
.ann-stage-wrap { border: 1px solid var(--line); border-radius: 10px; background: #202225; padding: 8px; min-height: 220px; display: grid; place-items: center; }
.ann-stage { position: relative; max-width: 100%; line-height: 0; }
.ann-stage img { display: block; max-width: 100%; max-height: 520px; user-select: none; }
.ann-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; }
.ann-empty { color: #9aa0a6; font-size: 12px; padding: 40px 10px; text-align: center; }
.ann-boxlist { margin-top: 8px; max-height: 220px; overflow: auto; }
.ann-boxrow { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 11.5px; padding: 4px 0; border-bottom: 1px solid var(--line-soft); }
.ann-boxrow button { color: var(--danger); font-size: 11px; }
.ann-hint { font-size: 11.5px; color: var(--faint); margin-top: 8px; line-height: 1.6; }

/* ---------- account card ---------- */
.wb-account-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  overflow: hidden;
  margin: 12px 0 18px;
}
.wb-account-card div { background: #fff; padding: 11px 13px; }
.wb-account-card span { display: block; font-size: 11px; color: var(--muted); }
.wb-account-card b { font-size: 13.5px; font-weight: 600; }
.ann-stage-wrap.is-empty { background: #f7f7f4; }
.ann-stage-wrap.is-empty .ann-stage { display: none; }

/* ---------- print ---------- */
@media print {
  @page { size: A4; margin: 12mm; }
  html, body { height: auto; background: #fff; }
  .app { height: auto; overflow: visible; display: block; }
  .topbar, .chat, .composer-wrap, .drop-overlay, .scrim, .toast, .modal { display: none !important; }
  .workbench { display: none !important; }
  .drawer {
    position: static;
    transform: none !important;
    width: 100%;
    display: block;
    box-shadow: none;
  }
  .drawer-head { display: none !important; }
  .drawer-body { overflow: visible; padding: 0; background: #fff; }
  .rpt { max-width: 100%; border: none; border-radius: 0; box-shadow: none; padding: 0; }
  .rpt-review { display: none !important; }
  .rpt-banner { break-inside: avoid; }
  .rpt tr { break-inside: avoid; }
  .rpt h3 { break-after: avoid; }
}

/* ---------- settings / final polish ---------- */
.settings-wrap { display: grid; gap: 14px; }
.settings-form { max-width: 540px; margin-top: 12px; }
.settings-field label { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.settings-field input, .settings-field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  background: #fff;
  outline: none;
}
.settings-field input:focus, .settings-field select:focus {
  border-color: rgba(10, 92, 116, .5);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.feed-rows { display: grid; gap: 8px; margin: 12px 0; }
.feed-row {
  display: grid;
  grid-template-columns: 1.1fr 2fr .8fr 1fr 1fr auto;
  gap: 6px;
  align-items: center;
}
.feed-row input, .feed-row select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px 8px;
  font-size: 12px;
  background: #fff;
}
@media (max-width: 900px) {
  .feed-row { grid-template-columns: 1fr 1fr; }
}
.drawer-head {
  background: linear-gradient(120deg, rgba(10, 92, 116, .06), transparent 60%);
}
.chat::-webkit-scrollbar, .drawer-body::-webkit-scrollbar, .modal-body::-webkit-scrollbar { width: 8px; }
.chat::-webkit-scrollbar-thumb, .drawer-body::-webkit-scrollbar-thumb, .modal-body::-webkit-scrollbar-thumb {
  background: #c7d5e0;
  border-radius: 8px;
}
.chat::-webkit-scrollbar-thumb:hover, .drawer-body::-webkit-scrollbar-thumb:hover { background: #a9bdcf; }
.wb-tabs button.on { border-bottom-color: var(--cyan); }
.tag-plain { background: #eef3f7; }
.wb-task { box-shadow: 0 1px 2px rgba(11, 31, 51, .03); }

/* ============================================================
   iOS 26 Liquid Glass 视觉层
   ============================================================ */
:root {
  --ios-spring: cubic-bezier(.22, 1, .36, 1);
  --ios-ease: cubic-bezier(.4, 0, .2, 1);
  --ios-font: -apple-system, "SF Pro Display", "SF Pro Text", BlinkMacSystemFont,
              "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --glass: rgba(255, 255, 255, .72);
  --glass-line: rgba(255, 255, 255, .55);
  --radius: 20px;
}

body { font-family: var(--ios-font); letter-spacing: -.006em; }

.btn-primary, .btn-secondary, .btn-ghost, .icon-btn, .send-btn, .chip, .avatar,
.auth-demo-grid button, .wb-tabs button, .wb-task, .card {
  transition: transform .34s var(--ios-spring), background .24s var(--ios-ease),
              box-shadow .34s var(--ios-spring), border-color .24s var(--ios-ease),
              color .2s var(--ios-ease);
}
.btn-primary, .btn-secondary { border-radius: 999px; }
.btn-primary:active, .btn-secondary:active, .btn-ghost:active,
.send-btn:active, .icon-btn:active, .chip:active { transform: scale(.965); }
.btn-secondary {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(12px);
  border-radius: 999px;
  padding: 8px 15px;
  font-size: 13px;
  color: var(--ink-2);
}
.btn-secondary:hover { border-color: rgba(10, 92, 116, .34); background: #fff; }
.btn-text { font-size: 12.5px; color: var(--accent); }

.topbar {
  height: 64px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 10px 30px rgba(4, 18, 30, .18);
}
.brand-name { letter-spacing: .18em; }
.prototype-pill, .proto-pill {
  backdrop-filter: blur(16px) saturate(160%);
  border-color: rgba(47, 196, 178, .38);
}

.chat { padding-top: 10px; }
.empty h1 { letter-spacing: -.02em; }
.chip { border-radius: 22px; background: rgba(255, 255, 255, .66); backdrop-filter: blur(18px); }
.chip:hover { transform: translateY(-3px) scale(1.012); }
.composer { border-radius: 26px; background: rgba(255, 255, 255, .82); backdrop-filter: blur(24px); }
.composer textarea { font-size: 15px; }
.msg-assistant .card { border-radius: 22px; }
.msg-user .bubble { border-radius: 22px 22px 6px 22px; }

.drawer {
  border-radius: 28px 0 0 28px;
  box-shadow: -24px 0 80px rgba(5, 18, 30, .18);
  backdrop-filter: blur(30px) saturate(170%);
}
.workbench { border-radius: 28px 0 0 28px; }
.wb-tabs { backdrop-filter: blur(20px); }
.wb-tabs button { border-radius: 999px 999px 0 0; }
.wb-task { border-radius: 18px; background: rgba(255, 255, 255, .74); }
.modal-card { border-radius: 30px; box-shadow: 0 40px 120px rgba(4, 16, 28, .4); }
.toast { border-radius: 999px; backdrop-filter: blur(20px); }

/* ---------- 登录页：地球 + 玻璃面板 ---------- */
.auth-gate {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px;
  background:
    radial-gradient(900px 520px at 15% 8%, rgba(34, 108, 130, .30), transparent 62%),
    radial-gradient(760px 520px at 92% 92%, rgba(47, 196, 178, .18), transparent 60%),
    linear-gradient(150deg, #061624 0%, #0a2233 48%, #07303f 100%);
}
.login-shell {
  position: relative;
  width: min(1160px, 96vw);
  min-height: min(690px, 90vh);
  display: grid;
  grid-template-columns: 1.14fr .86fr;
  border-radius: 36px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 50px 140px rgba(0, 8, 16, .6), inset 0 1px 0 rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .05);
  backdrop-filter: blur(34px) saturate(170%);
  animation: loginShellIn .95s var(--ios-spring) both;
}
@keyframes loginShellIn {
  from { opacity: 0; transform: translateY(22px) scale(.985); }
  to { opacity: 1; transform: none; }
}
.login-visual {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(720px 540px at 18% 12%, #16465c 0%, #0a2234 52%, #05131f 100%);
}
#login-globe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}
#login-globe:active { cursor: grabbing; }
.login-visual-copy {
  position: absolute;
  left: 40px;
  bottom: 38px;
  right: 36px;
  pointer-events: none;
}
.login-eyebrow {
  font-size: 11.5px;
  letter-spacing: .22em;
  color: rgba(120, 232, 218, .82);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.login-visual-copy h2 {
  font-size: clamp(26px, 2.6vw, 36px);
  line-height: 1.28;
  font-weight: 700;
  color: #eaf7f7;
  letter-spacing: .01em;
  text-shadow: 0 2px 30px rgba(0, 0, 0, .35);
}
.login-globe-note {
  margin-top: 14px;
  font-size: 12px;
  color: rgba(174, 208, 216, .78);
}
.login-legend {
  position: absolute;
  top: 26px;
  right: 26px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}
.login-legend-chip {
  font-size: 10.5px;
  color: rgba(206, 240, 240, .9);
  background: rgba(9, 34, 48, .55);
  border: 1px solid rgba(120, 226, 214, .22);
  border-radius: 999px;
  padding: 3px 10px;
  backdrop-filter: blur(14px);
}
.login-legend-chip.demo { color: #ffd9a8; border-color: rgba(255, 196, 120, .35); }

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 46px 52px;
  background: linear-gradient(180deg, rgba(252, 253, 254, .96), rgba(244, 248, 250, .94));
  backdrop-filter: blur(42px) saturate(180%);
}
.login-panel .auth-card {
  width: 100%;
  max-width: 356px;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
.login-panel .auth-brand strong { font-size: 19px; letter-spacing: .16em; }
.login-panel .auth-sub { margin: 14px 0 22px; font-size: 12.5px; color: var(--muted); }
.auth-field span { font-size: 11.5px; color: var(--muted); margin-left: 4px; }
.auth-field input {
  height: 46px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: #eef2f5;
  padding: 0 14px;
  font-size: 15px;
  transition: background .2s var(--ios-ease), box-shadow .3s var(--ios-spring);
}
.auth-field input:focus {
  background: #fff;
  border-color: rgba(10, 92, 116, .35);
  box-shadow: 0 0 0 4px rgba(10, 92, 116, .10);
}
.auth-submit {
  height: 48px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .02em;
  background: linear-gradient(135deg, #0e6f87, #08485d);
  box-shadow: 0 10px 26px rgba(10, 92, 116, .28);
}
.auth-submit:active { transform: scale(.975); }
.auth-demo-grid button {
  height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .8);
  font-size: 11.5px;
  border: 1px solid var(--line);
}
.auth-demo-grid button:hover { border-color: rgba(10, 92, 116, .4); background: #fff; transform: translateY(-1px); }

@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; min-height: auto; border-radius: 28px; }
  .login-visual { display: none; }
  .login-panel { padding: 34px 26px 30px; }
  .auth-gate { padding: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .login-shell { animation: none; }
  .btn-primary, .btn-secondary, .chip, .composer { transition: none; }
}

#btn-admin-console {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: #b9cddd;
}
#btn-admin-console:hover { color: #fff; }

.auth-hint {
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  text-align: center;
}

.offline-gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 14, 26, .62);
  backdrop-filter: blur(18px);
}
.offline-card {
  width: min(440px, 100%);
  padding: 30px 28px;
  border-radius: 26px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(255, 255, 255, .7);
  box-shadow: 0 30px 80px rgba(0, 12, 28, .35);
  text-align: left;
}
.offline-card strong { display: block; font-size: 18px; margin-bottom: 10px; }
.offline-card p { margin: 0 0 18px; font-size: 13px; line-height: 1.7; color: #4b5563; }
.offline-card code {
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(10, 92, 116, .08);
  color: #0a5c74;
}

