/* Kingdom Shine Ops — design tokens */
:root {
  /* Brand */
  --ks-navy: #0B1B2B;        /* deep midnight from the site */
  --ks-navy-2: #122738;
  --ks-gold: #C8A24B;        /* sparkle/star accent */
  --ks-gold-soft: #E8D8A8;
  --ks-sky: #4FA3D1;         /* shine blue */
  --ks-sky-soft: #DCEEF7;

  /* Neutrals */
  --bg: #F7F6F2;             /* warm off-white */
  --surface: #FFFFFF;
  --surface-2: #FBFAF6;
  --line: #E8E4DA;
  --line-2: #D8D2C4;
  --ink: #14202B;
  --ink-2: #3A4856;
  --ink-3: #6B7785;
  --ink-4: #98A2AE;

  /* Semantic */
  --success: #2E8B5A;
  --success-soft: #DDEFE3;
  --warn: #C5832C;
  --warn-soft: #F6E8D0;
  --danger: #B8453E;
  --danger-soft: #F4DEDC;
  --info: #2E6B96;
  --info-soft: #DCEAF4;

  /* Type */
  --font-display: "Fraunces", "Cormorant Garamond", Georgia, serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Radius / shadow */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --shadow-1: 0 1px 2px rgba(15, 25, 40, 0.04), 0 1px 1px rgba(15, 25, 40, 0.03);
  --shadow-2: 0 4px 16px rgba(15, 25, 40, 0.06), 0 1px 3px rgba(15, 25, 40, 0.04);
  --shadow-3: 0 14px 40px rgba(15, 25, 40, 0.10), 0 2px 8px rgba(15, 25, 40, 0.05);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

/* App shell */
.app {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}
.app.mobile-mode { grid-template-columns: 1fr; }

/* Sidebar */
.sidebar {
  background: var(--ks-navy);
  color: #E8EEF4;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 14px;
}
.sidebar-brand-mark {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--ks-gold) 0%, #B98D34 100%);
  display: grid; place-items: center;
  color: var(--ks-navy);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3);
}
.sidebar-brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.02em;
  line-height: 1;
}
.sidebar-brand-sub {
  font-size: 11px;
  color: rgba(232,238,244,0.55);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 4px;
}

.nav-section-label {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(232,238,244,0.4);
  padding: 14px 10px 6px;
  font-weight: 600;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: 8px;
  color: rgba(232,238,244,0.78);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  transition: background 0.12s, color 0.12s;
}
.nav-item:hover { background: rgba(255,255,255,0.05); color: #FFF; }
.nav-item.active {
  background: rgba(200, 162, 75, 0.15);
  color: #FFF;
  box-shadow: inset 2px 0 0 var(--ks-gold);
}
.nav-item .nav-icon { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.85; }
.nav-item .nav-badge {
  margin-left: auto;
  background: var(--ks-gold);
  color: var(--ks-navy);
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  min-width: 18px;
  text-align: center;
}
.sidebar-footer {
  margin-top: auto;
  padding: 14px 10px 4px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4FA3D1, #2E6B96);
  display: grid; place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
}
.sidebar-user-name { font-size: 13px; font-weight: 600; }
.sidebar-user-role { font-size: 11px; color: rgba(232,238,244,0.55); }

/* Main content */
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}
.page-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}
.page-sub { font-size: 12.5px; color: var(--ink-3); }
.topbar-search {
  flex: 1;
  max-width: 380px;
  margin-left: auto;
  position: relative;
}
.topbar-search input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  font-size: 13px;
  outline: none;
}
.topbar-search input:focus { border-color: var(--ks-sky); background: #fff; }
.topbar-search-icon {
  position: absolute;
  left: 10px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--ink-4);
}
.topbar-actions { display: flex; align-items: center; gap: 8px; }

.content { padding: 24px 28px 80px; max-width: 1400px; }
.content.wide { max-width: none; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  transition: all 0.12s;
  white-space: nowrap;
}
.btn:hover { background: rgba(15,25,40,0.04); }
.btn-primary {
  background: var(--ks-navy);
  color: #fff;
  border-color: var(--ks-navy);
}
.btn-primary:hover { background: var(--ks-navy-2); }
.btn-gold {
  background: var(--ks-gold);
  color: var(--ks-navy);
  border-color: var(--ks-gold);
}
.btn-gold:hover { background: #B98D34; }
.btn-ghost {
  border-color: var(--line-2);
  background: var(--surface);
  color: var(--ink-2);
}
.btn-ghost:hover { background: var(--surface-2); border-color: var(--ink-4); color: var(--ink); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-lg { padding: 11px 18px; font-size: 14px; }
.btn-icon { padding: 7px; width: 32px; height: 32px; }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
}
.card-pad { padding: 20px; }
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.card-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.005em;
}
.card-sub { font-size: 12px; color: var(--ink-3); }

/* Stats */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
@media (max-width: 1100px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px;
  position: relative;
  overflow: hidden;
}
.stat-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
  margin-bottom: 8px;
}
.stat-value {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--ink);
}
.stat-meta { margin-top: 8px; font-size: 12px; color: var(--ink-3); display: flex; gap: 6px; align-items: center; }
.stat-trend-up { color: var(--success); font-weight: 600; }
.stat-trend-down { color: var(--danger); font-weight: 600; }
.stat-spark {
  position: absolute;
  bottom: 0; right: 0;
  opacity: 0.5;
}
.stat.accent-gold { background: linear-gradient(180deg, #FBF6E8 0%, #fff 100%); border-color: var(--ks-gold-soft); }
.stat.accent-sky { background: linear-gradient(180deg, #EAF4FB 0%, #fff 100%); border-color: #C9E2F1; }
.stat.accent-navy { background: linear-gradient(180deg, var(--ks-navy) 0%, #1A3149 100%); color: #FFF; border-color: var(--ks-navy); }
.stat.accent-navy .stat-label { color: rgba(255,255,255,0.55); }
.stat.accent-navy .stat-value { color: #FFF; }
.stat.accent-navy .stat-meta { color: rgba(255,255,255,0.6); }

/* Layout helpers */
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.col { display: flex; flex-direction: column; gap: 10px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
@media (max-width: 1100px) { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.badge-success { background: var(--success-soft); color: #1F6543; }
.badge-warn { background: var(--warn-soft); color: #8B5C1A; }
.badge-danger { background: var(--danger-soft); color: #8B302B; }
.badge-info { background: var(--info-soft); color: #1F4E70; }
.badge-neutral { background: #ECEAE2; color: var(--ink-2); }
.badge-gold { background: #F8EDD2; color: #7A5E1F; }

/* Tables */
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.table td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-2);
}
.table tr:hover td { background: var(--surface-2); }
.table tr:last-child td { border-bottom: none; }
.table .td-strong { color: var(--ink); font-weight: 600; }
.table .td-mono { font-family: var(--font-mono); font-size: 12.5px; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 5px; }
.field label, .field-label {
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
}
.field input, .field textarea, .field select, .input {
  padding: 9px 11px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--surface);
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.12s, box-shadow 0.12s;
  width: 100%;
}
.field input:focus, .field textarea:focus, .field select:focus, .input:focus {
  border-color: var(--ks-sky);
  box-shadow: 0 0 0 3px rgba(79, 163, 209, 0.15);
}
.field textarea { resize: vertical; min-height: 80px; }

/* Avatar / initials */
.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 11px;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}
.avatar.lg { width: 44px; height: 44px; font-size: 14px; }
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(11, 27, 43, 0.55);
  backdrop-filter: blur(3px);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  animation: fadeIn 0.15s;
}
.modal {
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-3);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.18s ease-out;
}
.modal.lg { max-width: 860px; }
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}
.modal-body { padding: 22px 24px; overflow-y: auto; }
.modal-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Drawer (right side) */
.drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(11, 27, 43, 0.45);
  z-index: 90;
  animation: fadeIn 0.15s;
}
.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 540px;
  max-width: 92vw;
  background: var(--surface);
  z-index: 91;
  box-shadow: -10px 0 40px rgba(11,27,43,0.15);
  display: flex;
  flex-direction: column;
  animation: slideRight 0.22s ease-out;
}
@keyframes slideRight { from { transform: translateX(100%); } to { transform: translateX(0); } }

/* Section header */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 16px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 2px;
  letter-spacing: -0.005em;
}
.section-head .sub { font-size: 12.5px; color: var(--ink-3); }

/* Filter bar */
.filter-bar {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  align-items: center;
}
.chip {
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.12s;
}
.chip:hover { border-color: var(--ink-4); }
.chip.active { background: var(--ks-navy); color: #fff; border-color: var(--ks-navy); }

/* Empty state */
.empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--ink-3);
}
.empty-icon {
  width: 48px; height: 48px;
  margin: 0 auto 12px;
  color: var(--ink-4);
}
.empty-title { font-family: var(--font-display); font-size: 18px; color: var(--ink); margin: 0 0 4px; }
.empty-text { font-size: 13px; }

/* Hide scrollbar in panels */
.scroll-area { overflow-y: auto; }
.scroll-area::-webkit-scrollbar { width: 8px; height: 8px; }
.scroll-area::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 4px; }
.scroll-area::-webkit-scrollbar-track { background: transparent; }

/* Mobile bottom tabs */
.mobile-tabbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--ks-navy);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  z-index: 50;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 20px rgba(11,27,43,0.15);
}
.mobile-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 4px;
  border: none;
  background: transparent;
  color: rgba(232,238,244,0.6);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.mobile-tab.active { color: var(--ks-gold); }
.mobile-tab svg { width: 22px; height: 22px; }

/* Star sparkle motif */
.sparkle {
  display: inline-block;
  color: var(--ks-gold);
  font-size: 0.85em;
  vertical-align: 0.05em;
}

/* Misc utilities */
.muted { color: var(--ink-3); }
.tiny { font-size: 11.5px; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 5px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--ink-3);
}

/* Toast */
.toast-stack {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 380px;
}
.toast {
  background: var(--ks-navy);
  color: #fff;
  padding: 12px 16px;
  border-radius: 10px;
  box-shadow: var(--shadow-3);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideRight 0.2s;
}
.toast .toast-mark { color: var(--ks-gold); flex-shrink: 0; }


/* ======================================================
   AUTH / LOGIN / SYNC
   ====================================================== */
.login-shell {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  background:
    radial-gradient(1200px 600px at 80% 10%, rgba(200,162,75,0.12), transparent 60%),
    radial-gradient(900px 500px at 10% 90%, rgba(34,49,80,0.08), transparent 60%),
    var(--surface);
  font-family: var(--font-sans);
  overflow: hidden;
}
.login-bg {
  position: absolute; inset: 0; pointer-events: none;
}
.login-bg-sparkle {
  position: absolute;
  font-size: 28px;
  color: var(--ks-gold);
  opacity: 0.18;
  font-family: var(--font-display);
  user-select: none;
}
.login-card {
  position: relative;
  width: 420px; max-width: 92vw;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 36px 36px 28px;
  box-shadow: 0 24px 60px -20px rgba(34,49,80,0.18), 0 4px 16px -4px rgba(34,49,80,0.06);
}
.login-brand {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 28px;
}
.login-mark {
  width: 44px; height: 44px;
  background: var(--ks-navy); color: var(--ks-gold);
  display: grid; place-items: center;
  border-radius: 10px;
  font-family: var(--font-display); font-size: 22px; font-weight: 700;
}
.login-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.login-sub {
  font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 2px;
}
.login-title {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  color: var(--ks-navy);
}
.login-lede {
  margin: 0 0 24px;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.5;
}
.login-form { display: grid; gap: 14px; }
.login-form .field input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.login-form .field input:focus {
  outline: none;
  border-color: var(--ks-gold);
  box-shadow: 0 0 0 3px rgba(200,162,75,0.18);
}
.login-form .field label {
  display: block;
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600;
  margin-bottom: 5px;
}
.login-error {
  background: var(--danger-soft, #FCE9E7);
  color: var(--danger, #B8453E);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  border: 1px solid rgba(184,69,62,0.18);
}
.login-submit {
  margin-top: 6px;
  width: 100%;
  padding: 12px 16px;
  background: var(--ks-navy);
  color: #fff;
  border: none;
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
}
.login-submit:hover:not(:disabled) { background: #1A2640; }
.login-submit:active:not(:disabled) { transform: translateY(1px); }
.login-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.login-link {
  display: block;
  width: 100%; margin-top: 10px;
  background: transparent; border: none;
  color: var(--ink-3);
  font-size: 12.5px;
  cursor: pointer;
  padding: 6px;
}
.login-link:hover { color: var(--ks-navy); }
.login-footer {
  margin-top: 26px; padding-top: 18px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.login-footer-line { font-size: 12.5px; color: var(--ink-2); }
.login-footer-meta { font-size: 11px; color: var(--ink-3); margin-top: 6px; letter-spacing: 0.04em; }

.loading-card {
  display: grid; place-items: center;
  gap: 18px;
  padding: 40px;
}
.loading-mark {
  font-family: var(--font-display);
  font-size: 48px;
  color: var(--ks-gold);
  animation: ks-pulse 1.6s ease-in-out infinite;
}
.loading-message {
  font-size: 13px;
  color: var(--ink-2);
  letter-spacing: 0.04em;
}
@keyframes ks-pulse {
  0%, 100% { opacity: 0.4; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1.05); }
}

/* Sidebar sync indicator + sign out */
.sidebar-status {
  margin: 12px 12px 8px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.01em;
}
.sync-dot {
  width: 8px; height: 8px; border-radius: 50%;
  flex-shrink: 0;
}
.sync-idle { background: #4FA37C; box-shadow: 0 0 6px rgba(79,163,124,0.6); }
.sync-active { background: var(--ks-gold); animation: ks-pulse 1s ease-in-out infinite; }
.sync-error { background: #D67B73; }

.sidebar-signout {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.6);
  width: 28px; height: 28px;
  border-radius: 6px;
  display: grid; place-items: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.sidebar-signout:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

/* ======================================================
   LEGAL / POLICY CARDS
   ====================================================== */
.policy-card {
  display: flex; align-items: center; gap: 14px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: border-color 0.15s, transform 0.1s, box-shadow 0.15s;
}
.policy-card:hover {
  border-color: var(--ks-gold);
  box-shadow: 0 4px 12px -4px rgba(34,49,80,0.08);
}
.policy-card-icon {
  width: 38px; height: 38px;
  background: var(--ks-navy); color: var(--ks-gold);
  border-radius: 8px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.policy-card-title {
  font-weight: 700; font-size: 14px;
  color: var(--ink);
  margin-bottom: 2px;
}
.policy-card-sub {
  font-size: 12.5px; color: var(--ink-2);
  line-height: 1.4;
  margin-bottom: 6px;
}
.policy-card-meta {
  display: flex; gap: 6px;
  font-size: 11px; color: var(--ink-3);
  letter-spacing: 0.02em;
}
.policy-card-arrow {
  color: var(--ink-3);
  flex-shrink: 0;
}
.link-back {
  background: transparent; border: none;
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--ink-2);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
  padding: 6px 0;
  margin-bottom: 14px;
}
.link-back:hover { color: var(--ks-navy); }

.kicker {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 700;
}
