:root {
  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #eef2f7;
  --text: #111827;
  --muted: #667085;
  --border: #dfe4ea;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-soft: #e8f0ff;
  --success: #15803d;
  --success-soft: #e9f8ef;
  --warning: #b45309;
  --warning-soft: #fff4df;
  --danger: #b42318;
  --danger-soft: #ffebe9;
  --shadow: 0 16px 50px rgba(15, 23, 42, 0.11);
  --radius: 16px;
  --radius-sm: 10px;
  --sidebar: 250px;
}

* { box-sizing: border-box; }
html { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--text); background: var(--bg); }
body { margin: 0; min-width: 320px; min-height: 100vh; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.hidden { display: none !important; }
.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-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); padding: 22px 16px; background: #101828; color: #eef2f7; display: flex; flex-direction: column; z-index: 30; }
.brand-row { display: flex; align-items: center; gap: 12px; padding: 3px 7px 24px; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: linear-gradient(145deg, #2f6cf2, #1b4bb9); color: white; font-weight: 850; box-shadow: 0 8px 20px rgba(37,99,235,.35); }
.brand-name { font-size: 14px; font-weight: 800; letter-spacing: .01em; }
.brand-subtitle { margin-top: 2px; color: #98a2b3; font-size: 11px; }
.nav-list { display: grid; gap: 5px; }
.nav-item { width: 100%; border: 0; border-radius: 10px; padding: 11px 12px; background: transparent; color: #b9c2cf; text-align: left; display: flex; align-items: center; gap: 11px; font-weight: 650; }
.nav-item span { width: 18px; text-align: center; font-size: 17px; }
.nav-item:hover { color: white; background: rgba(255,255,255,.06); }
.nav-item.active { background: #233149; color: white; }
.sidebar-footer { margin-top: auto; display: grid; gap: 12px; }
.privacy-note { padding: 10px; color: #98a2b3; font-size: 11px; line-height: 1.5; }
.mini-timer { border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 11px; background: rgba(255,255,255,.05); }
.mini-timer-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 700; }
.mini-timer-time { margin-top: 6px; font-size: 21px; font-variant-numeric: tabular-nums; font-weight: 850; }
.mini-timer button { width: 100%; margin-top: 8px; }

.main-panel { grid-column: 2; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; height: 72px; padding: 14px 26px; background: rgba(243,245,248,.92); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(223,228,234,.9); display: flex; align-items: center; gap: 18px; }
.mobile-brand { display: none; align-items: center; gap: 10px; font-weight: 800; }
.topbar-search { position: relative; flex: 1; max-width: 650px; }
.topbar-search input { width: 100%; height: 43px; padding: 0 15px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); outline: none; }
.topbar-search input:focus { border-color: #94b4fa; box-shadow: 0 0 0 4px rgba(37,99,235,.09); }
.search-results { position: absolute; left: 0; right: 0; top: 50px; max-height: 420px; overflow: auto; padding: 8px; border: 1px solid var(--border); border-radius: 14px; background: white; box-shadow: var(--shadow); }
.search-result { width: 100%; padding: 10px; border: 0; border-radius: 10px; background: transparent; text-align: left; display: grid; grid-template-columns: auto 1fr; gap: 10px; }
.search-result:hover { background: var(--surface-2); }
.search-kind { color: var(--muted); font-size: 11px; text-transform: uppercase; font-weight: 800; letter-spacing: .07em; }
.search-title { margin-top: 2px; font-size: 14px; font-weight: 750; }
.topbar-actions { margin-left: auto; display: flex; gap: 9px; }
.view-root { padding: 26px; max-width: 1500px; margin: 0 auto; }

.page-header { margin-bottom: 22px; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.page-header h1 { margin: 0; font-size: clamp(27px, 4vw, 40px); letter-spacing: -.045em; }
.page-header p { margin: 8px 0 0; color: var(--muted); }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.eyebrow { margin: 0 0 6px; color: var(--accent); font-size: 11px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }

.button { border: 1px solid transparent; border-radius: 10px; min-height: 40px; padding: 9px 14px; font-weight: 750; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.button.primary { background: var(--accent); color: white; }
.button.primary:hover { background: var(--accent-strong); }
.button.secondary { background: var(--surface); border-color: var(--border); color: var(--text); }
.button.secondary:hover { background: var(--surface-2); }
.button.ghost { background: transparent; color: var(--muted); }
.button.danger { background: var(--danger-soft); color: var(--danger); border-color: #ffd3cf; }
.button.success { background: var(--success); color: white; }
.button.small { min-height: 32px; padding: 6px 10px; border-radius: 8px; font-size: 12px; }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); display: grid; place-items: center; font-size: 18px; color: var(--text); }

.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 2px 4px rgba(16,24,40,.02); }
.card-body { padding: 18px; }
.card-header { padding: 16px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-header h2, .card-header h3 { margin: 0; font-size: 16px; }
.card-header p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }

.stat-card { padding: 18px; }
.stat-label { color: var(--muted); font-size: 12px; font-weight: 700; }
.stat-value { margin-top: 8px; font-size: 30px; font-weight: 850; letter-spacing: -.035em; }
.stat-foot { margin-top: 8px; color: var(--muted); font-size: 12px; }

.hero { padding: 22px; background: linear-gradient(135deg, #111827, #1f3152); color: white; border: 0; }
.hero-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.hero h2 { margin: 0; font-size: 24px; letter-spacing: -.03em; }
.hero p { max-width: 650px; margin: 8px 0 0; color: #c4cbd7; line-height: 1.6; }
.hero .button.secondary { border-color: rgba(255,255,255,.15); background: rgba(255,255,255,.08); color: white; }

.priority-list, .simple-list, .timeline { display: grid; }
.priority-item, .simple-row { padding: 14px 18px; border-top: 1px solid var(--border); }
.priority-item:first-child, .simple-row:first-child { border-top: 0; }
.priority-item { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 13px; align-items: center; }
.priority-rank { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 850; }
.item-title { font-weight: 800; }
.item-meta { margin-top: 4px; color: var(--muted); font-size: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.next-action { margin-top: 8px; color: #344054; font-size: 13px; }
.next-action strong { color: var(--accent); }

.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 4px 8px; background: var(--surface-3); color: #475467; font-size: 11px; font-weight: 800; white-space: nowrap; }
.badge.high { background: var(--danger-soft); color: var(--danger); }
.badge.medium { background: var(--warning-soft); color: var(--warning); }
.badge.low { background: var(--success-soft); color: var(--success); }
.badge.active, .badge.in_progress { background: var(--accent-soft); color: var(--accent); }
.badge.done, .badge.completed { background: var(--success-soft); color: var(--success); }
.badge.paused { background: var(--warning-soft); color: var(--warning); }
.badge.cancelled, .badge.archived { background: var(--surface-3); color: #667085; }

.quick-capture { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.quick-capture input { min-width: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-field { display: grid; gap: 7px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: 12px; font-weight: 800; color: #344054; }
.input, input[type="text"], input[type="search"], input[type="date"], input[type="number"], input[type="url"], textarea, select { width: 100%; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); padding: 10px 12px; outline: none; }
textarea { min-height: 105px; resize: vertical; line-height: 1.55; }
.input:focus, input:focus, textarea:focus, select:focus { border-color: #94b4fa; box-shadow: 0 0 0 4px rgba(37,99,235,.08); }
.form-actions { grid-column: 1 / -1; margin-top: 5px; display: flex; justify-content: flex-end; gap: 8px; }
.help-text { color: var(--muted); font-size: 11px; line-height: 1.5; }

.area-card { overflow: hidden; }
.area-accent { height: 5px; }
.area-title-row { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.area-title-row h3 { margin: 0; font-size: 18px; }
.area-description { min-height: 42px; margin: 8px 0 15px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.progress-track { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress-bar { height: 100%; border-radius: inherit; background: var(--accent); }
.area-stats { margin-top: 10px; display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }

.toolbar { margin-bottom: 14px; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.toolbar > * { width: auto; }
.toolbar .grow { flex: 1; min-width: 220px; }
.task-table { width: 100%; border-collapse: collapse; }
.task-table th { padding: 11px 14px; color: var(--muted); font-size: 11px; text-align: left; text-transform: uppercase; letter-spacing: .06em; background: var(--surface-2); }
.task-table td { padding: 13px 14px; border-top: 1px solid var(--border); vertical-align: middle; font-size: 13px; }
.task-row { cursor: pointer; }
.task-row:hover { background: #fafcff; }
.task-main { min-width: 260px; }
.task-main strong { display: block; font-size: 14px; }
.task-main span { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; max-width: 560px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.empty-state { padding: 42px 24px; text-align: center; }
.empty-icon { width: 50px; height: 50px; margin: 0 auto 13px; display: grid; place-items: center; border-radius: 15px; background: var(--accent-soft); color: var(--accent); font-size: 22px; }
.empty-state h3 { margin: 0; }
.empty-state p { max-width: 450px; margin: 8px auto 17px; color: var(--muted); line-height: 1.55; }

.note-card { padding: 16px; }
.note-top { display: flex; justify-content: space-between; gap: 12px; }
.note-title { font-weight: 800; }
.note-content { margin-top: 9px; color: #344054; white-space: pre-wrap; line-height: 1.55; font-size: 13px; }
.note-footer { margin-top: 14px; color: var(--muted); font-size: 11px; display: flex; flex-wrap: wrap; gap: 8px; }

.timer-panel { padding: 24px; text-align: center; }
.timer-task { color: var(--muted); font-size: 13px; }
.timer-display { margin: 12px 0 18px; font-size: clamp(42px, 8vw, 68px); letter-spacing: -.05em; font-weight: 850; font-variant-numeric: tabular-nums; }
.timer-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 9px; }

.timeline-item { position: relative; display: grid; grid-template-columns: 95px 14px minmax(0,1fr); gap: 12px; padding: 12px 0; }
.timeline-item::before { content: ""; position: absolute; left: 101px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.timeline-time { color: var(--muted); font-size: 11px; text-align: right; padding-top: 3px; }
.timeline-dot { position: relative; z-index: 1; width: 12px; height: 12px; margin-top: 3px; border: 3px solid white; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px var(--border); }
.timeline-content { padding: 0 0 2px; }
.timeline-content strong { font-size: 13px; }
.timeline-content p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

.chart { min-height: 230px; padding: 18px; display: flex; align-items: flex-end; gap: 13px; overflow-x: auto; }
.bar-wrap { min-width: 54px; height: 190px; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; gap: 7px; }
.bar-value { text-align: center; font-size: 11px; font-weight: 800; }
.bar { min-height: 3px; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, #4d83f3, #2563eb); }
.bar-label { text-align: center; color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.review-score { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.score-card { padding: 15px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.score-card strong { display: block; margin-top: 7px; font-size: 22px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; padding: 24px; background: rgba(15,23,42,.52); display: grid; place-items: center; overflow: auto; }
.modal-card { width: min(780px, 100%); max-height: calc(100vh - 48px); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.modal-card.wide { width: min(1050px, 100%); }
.modal-header { padding: 18px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.modal-header h2 { margin: 0; font-size: 22px; }
.modal-body { padding: 20px; overflow: auto; }
.task-detail-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr); gap: 18px; }
.detail-section { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.detail-section h3 { margin: 0; padding: 13px 15px; border-bottom: 1px solid var(--border); background: var(--surface-2); font-size: 13px; }
.detail-content { padding: 15px; }
.detail-next { padding: 14px; border: 1px solid #bed1ff; border-radius: 12px; background: var(--accent-soft); }
.detail-next-label { color: var(--accent); font-size: 10px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.detail-next p { margin: 7px 0 0; font-size: 15px; font-weight: 800; line-height: 1.45; }
.kv-list { display: grid; gap: 10px; }
.kv { display: flex; justify-content: space-between; gap: 16px; font-size: 12px; }
.kv span { color: var(--muted); }
.action-entry { padding: 12px 0; border-top: 1px solid var(--border); }
.action-entry:first-child { padding-top: 0; border-top: 0; }
.action-entry-title { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; font-weight: 800; }
.action-entry p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.evidence-link { word-break: break-all; color: var(--accent); text-decoration: none; }

.toast-root { position: fixed; z-index: 200; right: 20px; bottom: 20px; display: grid; gap: 8px; }
.toast { max-width: 360px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); font-size: 13px; font-weight: 700; animation: toast-in .22s ease; }
.toast.success { border-color: #b9e7c8; background: #f0fbf4; color: var(--success); }
.toast.error { border-color: #ffc9c4; background: #fff3f2; color: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.setting-row { padding: 15px 0; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.setting-row:first-child { border-top: 0; }
.setting-copy h3 { margin: 0; font-size: 14px; }
.setting-copy p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.file-input { display: none; }

[data-theme="dark"] {
  --bg: #0b1120;
  --surface: #111827;
  --surface-2: #172033;
  --surface-3: #23304a;
  --text: #eef2f7;
  --muted: #9ca8ba;
  --border: #29354b;
  --accent-soft: #162a53;
  --success-soft: #143323;
  --warning-soft: #3d2c12;
  --danger-soft: #3d1b1b;
  --shadow: 0 16px 50px rgba(0,0,0,.35);
}
[data-theme="dark"] .topbar { background: rgba(11,17,32,.9); }
[data-theme="dark"] .task-row:hover { background: #151f31; }
[data-theme="dark"] .next-action { color: #c6cfdb; }
[data-theme="dark"] .note-content { color: #cbd5e1; }
[data-theme="dark"] .timeline-dot { border-color: var(--surface); }
[data-theme="dark"] .search-results { background: var(--surface); }

@media (max-width: 1050px) {
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid.cols-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .task-detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
  .app-shell { display: block; }
  .sidebar { transform: translateX(-105%); transition: transform .2s ease; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .main-panel { margin-left: 0; }
  .topbar { height: auto; min-height: 68px; padding: 12px 14px; flex-wrap: wrap; }
  .mobile-brand { display: flex; }
  .topbar-search { order: 3; flex-basis: 100%; max-width: none; }
  .topbar-actions .secondary { display: none; }
  .view-root { padding: 18px 14px 28px; }
  .page-header { align-items: flex-start; flex-direction: column; }
  .grid.cols-4, .grid.cols-3, .grid.cols-2, .form-grid { grid-template-columns: 1fr; }
  .hero-row { flex-direction: column; }
  .task-table thead { display: none; }
  .task-table, .task-table tbody, .task-table tr, .task-table td { display: block; width: 100%; }
  .task-table tr { padding: 12px 14px; border-top: 1px solid var(--border); }
  .task-table tr:first-child { border-top: 0; }
  .task-table td { padding: 4px 0; border: 0; }
  .task-table td::before { content: attr(data-label); display: inline-block; min-width: 90px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
  .task-table td:first-child::before { display: none; }
  .modal-backdrop { padding: 0; place-items: stretch; }
  .modal-card, .modal-card.wide { width: 100%; max-height: 100vh; border-radius: 0; }
  .quick-capture { grid-template-columns: 1fr; }
}

/* Cloud sync and authentication */
.sync-pill {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.sync-pill:hover { border-color: #b7c3d5; color: var(--text); }
.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; box-shadow: 0 0 0 3px rgba(148,163,184,.14); }
.sync-pill[data-sync-state="synced"] .sync-dot,
.sync-pill[data-sync-state="ready"] .sync-dot { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.sync-pill[data-sync-state="syncing"] .sync-dot,
.sync-pill[data-sync-state="authenticating"] .sync-dot { background: var(--warning); box-shadow: 0 0 0 3px var(--warning-soft); animation: sync-pulse 1s infinite; }
.sync-pill[data-sync-state="error"] .sync-dot { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.sync-pill[data-sync-state="signed-out"] .sync-dot { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
@keyframes sync-pulse { 50% { opacity: .35; transform: scale(.82); } }

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 22px;
  overflow: auto;
  background:
    radial-gradient(circle at 18% 12%, rgba(37,99,235,.16), transparent 34%),
    radial-gradient(circle at 82% 86%, rgba(15,118,110,.12), transparent 30%),
    rgba(11,17,32,.92);
  backdrop-filter: blur(18px);
}
.auth-gate.hidden { display: none; }
.auth-card {
  width: min(440px, 100%);
  padding: 28px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 24px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 28px 90px rgba(0,0,0,.38);
}
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 30px; }
.auth-copy h1 { margin: 5px 0 10px; font-size: clamp(27px, 6vw, 38px); line-height: 1.05; letter-spacing: -.035em; }
.auth-copy > p:last-child { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.auth-form { display: grid; gap: 14px; margin-top: 24px; }
.auth-form label { display: grid; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 800; }
.auth-form input {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  outline: none;
}
.auth-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.auth-submit { width: 100%; min-height: 46px; margin-top: 4px; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 17px; }
.auth-links button { padding: 0; border: 0; background: transparent; color: var(--accent); font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.auth-message { margin-top: 17px; padding: 11px 13px; border: 1px solid #bed1ff; border-radius: 11px; background: var(--accent-soft); color: var(--text); font-size: 12px; line-height: 1.5; }
.auth-footnote { margin: 23px 0 0; color: var(--muted); font-size: 10px; text-align: center; }
.auth-locked .app-shell { pointer-events: none; user-select: none; }
.button-row { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.cloud-settings-card { border-color: #bed1ff; }
.sync-badge { display: inline-flex; align-items: center; padding: 7px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 10px; font-weight: 900; white-space: nowrap; }
.sync-badge[data-state="synced"], .sync-badge[data-state="ready"] { background: var(--success-soft); color: var(--success); }
.sync-badge[data-state="error"] { background: var(--danger-soft); color: var(--danger); }
code { padding: 2px 5px; border-radius: 5px; background: var(--surface-3); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .92em; }

@media (max-width: 780px) {
  .sync-pill { min-height: 36px; padding: 0 10px; }
  .sync-pill span:last-child { display: none; }
  .auth-gate { padding: 0; align-items: stretch; }
  .auth-card { width: 100%; min-height: 100%; border: 0; border-radius: 0; padding: 26px 21px; display: flex; flex-direction: column; justify-content: center; }
  .auth-links { flex-direction: column; align-items: flex-start; }
  .setting-row { align-items: flex-start; flex-direction: column; }
}
