:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #667085;
  --line: #e4e7ec;
  --paper: #ffffff;
  --canvas: #f4f6f8;
  --accent: #176b5b;
  --accent-soft: #e8f4f0;
  --danger: #b42318;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); font: 14px/1.55 system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif; }
button, input { font: inherit; }
button { cursor: pointer; }
.shell { width: calc(100% - 48px); margin: 0 auto; padding: 42px 0 80px; }
.hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; margin-bottom: 30px; }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: 12px; font-weight: 750; letter-spacing: .18em; }
h1, h2 { margin: 0; letter-spacing: -.02em; }
h1 { font-size: clamp(30px, 4vw, 48px); line-height: 1.15; }
h2 { font-size: 20px; }
.subtitle, .toolbar p, .login-card p { margin: 8px 0 0; color: var(--muted); }
.health { display: flex; align-items: center; gap: 8px; white-space: nowrap; color: var(--accent); font-weight: 650; background: var(--accent-soft); padding: 9px 13px; border-radius: 999px; }
.health span { width: 8px; height: 8px; border-radius: 50%; background: #20a47e; box-shadow: 0 0 0 4px #cbe9df; }
.login-card, .dashboard { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 12px 34px rgba(16, 24, 40, .06); }
.login-card { display: grid; grid-template-columns: 1fr minmax(300px, 430px); gap: 32px; align-items: center; padding: 30px; }
.login-card form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; }
input { min-width: 0; flex: 1; border: 1px solid #cfd4dc; border-radius: 10px; padding: 11px 13px; outline: none; }
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
button { border: 0; border-radius: 10px; color: white; background: var(--accent); padding: 11px 16px; font-weight: 700; }
button:hover { filter: brightness(.95); }
.secondary { color: var(--ink); background: #f1f3f5; }
.error { grid-column: 2; color: var(--danger) !important; min-height: 22px; }
.dashboard { overflow: hidden; }
.toolbar { display: flex; align-items: center; justify-content: space-between; padding: 24px 26px; border-bottom: 1px solid var(--line); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 1380px; }
th, td { padding: 15px 20px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--muted); background: #fafafa; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
tbody tr { transition: background .15s ease; }
tbody tr:hover { background: #f8fbfa; }
.badge { display: inline-flex; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 3px 9px; font-size: 12px; font-weight: 700; }
.analysis-button { width: 260px; color: var(--ink); background: transparent; padding: 0; text-align: left; font-weight: 400; }
.analysis-button:hover { color: var(--accent); filter: none; }
.analysis-preview { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; line-height: 1.55; white-space: pre-line; }
.analysis-empty { color: #98a2b3; }
.analysis-count { display: block; margin-top: 4px; color: var(--accent); font-size: 12px; font-weight: 700; }
.empty { padding: 70px 20px; color: var(--muted); text-align: center; }
.hidden { display: none !important; }
dialog { width: min(900px, calc(100% - 32px)); max-height: 86vh; border: 0; border-radius: 16px; padding: 0; box-shadow: 0 24px 80px rgba(0, 0, 0, .24); }
dialog::backdrop { background: rgba(12, 18, 24, .55); backdrop-filter: blur(2px); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.dialog-head button { color: var(--ink); background: transparent; font-size: 28px; line-height: 1; padding: 2px 8px; }
pre { margin: 0; padding: 22px; max-height: calc(86vh - 70px); overflow: auto; background: #fbfcfd; font: 13px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; word-break: break-word; }
@media (max-width: 720px) {
  .shell { width: calc(100% - 24px); padding-top: 30px; }
  .hero { flex-direction: column; }
  .login-card { grid-template-columns: 1fr; padding: 22px; }
  .login-card form { grid-template-columns: 1fr; }
  .error { grid-column: 1; }
}
