/* ── Sequel Sosial Marketing Plan ─────────────────────────── */
/* ── Design tokens ────────────────────────────────────────── */
:root {
  color-scheme: light dark;

  /* Brand — Sequel blue */
  --primary:        #3080ff;
  --primary-hover:  #1a6fef;
  --primary-deep:   #155dfc;
  --primary-dark:   #1c398e;
  --primary-light:  #eff6ff;
  --primary-muted:  #dbeafe;

  /* Light-mode surfaces */
  --bg-base:        #f1f5f9;
  --bg-surface:     #ffffff;
  --bg-elevated:    #f8fafc;
  --bg-hover:       #f0f7ff;
  --border:         #e2e8f0;
  --border-hi:      #cbd5e1;

  /* Light-mode text */
  --text-primary:   #0f172a;
  --text-secondary: #1e293b;
  --text-muted:     #475569;
  --text-faint:     #64748b;
  --text-ghost:     #94a3b8;

  /* Sidebar */
  --sidebar-bg:     #ffffff;
  --sidebar-border: #e2e8f0;
  --nav-active-bg:  #eff6ff;
  --nav-active-txt: #1a6fef;
  --nav-hover-bg:   #f8fafc;

  /* Status / semantic */
  --green:     #16a34a;
  --green-hi:  #22c55e;
  --green-bg:  #f0fdf4;
  --red-hi:    #ef4444;
  --orange-hi: #f97316;
  --orange-bg: #fff7ed;
  --pink-hi:   #ec4899;

  /* Platform colours (unchanged) */
  --ig:     #e1306c; --ig-bg:  #fff0f5;
  --tt:     #00d2ef; --tt-bg:  #f0fcfe;
  --fb:     #1877f2; --fb-bg:  #eff6ff;
  --xc:     #64748b; --xc-bg:  #f8fafc;

  /* Misc */
  --radius-sm: 5px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 14px;
  --shadow:    0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.10);
}

/* ── Dark mode via system preference ──────────────────────── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-base:        #0d1117;
    --bg-surface:     #161b27;
    --bg-elevated:    #1e2a3a;
    --bg-hover:       #1e3a5f;
    --border:         #253047;
    --border-hi:      #374a65;
    --text-primary:   #f1f5f9;
    --text-secondary: #e2e8f0;
    --text-muted:     #94a3b8;
    --text-faint:     #64748b;
    --text-ghost:     #475569;
    --sidebar-bg:     #111827;
    --sidebar-border: #1f2d3d;
    --nav-active-bg:  #1e3a5f;
    --nav-active-txt: #60a5fa;
    --nav-hover-bg:   #1a2740;
    --primary-light:  #1e3a5f;
    --primary-muted:  #1a3060;
    --green-bg:       #052e16;
    --orange-bg:      #1c0a00;
    --ig-bg: #2a0d1a; --tt-bg: #0d2a30; --fb-bg: #0d1a2a; --xc-bg: #1a1e2a;
    --shadow:    0 1px 3px rgba(0,0,0,.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,.4);
  }
}

/* ── Explicit dark override ────────────────────────────────── */
[data-theme="dark"] {
  --bg-base:        #0d1117;
  --bg-surface:     #161b27;
  --bg-elevated:    #1e2a3a;
  --bg-hover:       #1e3a5f;
  --border:         #253047;
  --border-hi:      #374a65;
  --text-primary:   #f1f5f9;
  --text-secondary: #e2e8f0;
  --text-muted:     #94a3b8;
  --text-faint:     #64748b;
  --text-ghost:     #475569;
  --sidebar-bg:     #111827;
  --sidebar-border: #1f2d3d;
  --nav-active-bg:  #1e3a5f;
  --nav-active-txt: #60a5fa;
  --nav-hover-bg:   #1a2740;
  --primary-light:  #1e3a5f;
  --primary-muted:  #1a3060;
  --green-bg:       #052e16;
  --orange-bg:      #1c0a00;
  --ig-bg: #2a0d1a; --tt-bg: #0d2a30; --fb-bg: #0d1a2a; --xc-bg: #1a1e2a;
  --shadow:    0 1px 3px rgba(0,0,0,.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,.4);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  height: 100%;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background .2s, color .2s;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; background: none; }
input, textarea, select { font-family: inherit; }
svg { display: block; flex-shrink: 0; }

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 10px; }

/* ── App Shell ─────────────────────────────────────────────── */
#app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── Sidebar ───────────────────────────────────────────────── */
.sidebar {
  width: 228px;
  flex-shrink: 0;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  transition: background .2s, border-color .2s;
}

/* Logo */
.sidebar-logo {
  padding: 16px 18px 13px;
  border-bottom: 1px solid var(--sidebar-border);
}
.sidebar-logo-img { display: flex; align-items: center; margin-bottom: 5px; }
.logo-icon {
  height: 32px;
  width: auto;
  object-fit: contain;
  display: block;
}
.sidebar-logo-sub {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-ghost);
  letter-spacing: .3px;
}

/* Nav */
.sidebar-nav {
  flex: 1;
  padding: 10px 10px;
  overflow-y: auto;
}
.nav-section {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-ghost);
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 12px 8px 5px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  margin-bottom: 1px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  transition: background .12s, color .12s;
}
.nav-item svg { opacity: .7; transition: opacity .12s; }
.nav-item:hover {
  background: var(--nav-hover-bg);
  color: var(--text-secondary);
}
.nav-item:hover svg { opacity: 1; }
.nav-item.active {
  background: var(--nav-active-bg);
  color: var(--nav-active-txt);
  font-weight: 600;
}
.nav-item.active svg { opacity: 1; color: var(--primary); }

.nav-badge {
  margin-left: auto;
  font-size: 9px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 20px;
  background: var(--primary-muted);
  color: var(--primary);
}
.nav-badge.green  { background: var(--green-bg);  color: var(--green); }
.nav-badge.orange { background: var(--orange-bg); color: var(--orange-hi); }

/* Footer */
.sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--sidebar-border);
}
.user-pill { display: flex; align-items: center; gap: 9px; }
.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: #fff; font-weight: 700;
  flex-shrink: 0;
  letter-spacing: .5px;
}
.user-name { font-size: 12.5px; font-weight: 600; color: var(--text-secondary); }
.user-role { font-size: 10px; color: var(--text-ghost); margin-top: 1px; }

/* ── Main Area ─────────────────────────────────────────────── */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }

/* Topbar */
.topbar {
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  gap: 12px;
  transition: background .2s, border-color .2s;
}
.page-title { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.page-sub   { font-size: 11.5px; color: var(--text-faint); margin-top: 1px; }
.topbar-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

/* Content */
.content {
  flex: 1;
  overflow-y: auto;
  padding: 22px 24px;
  background: var(--bg-base);
  transition: background .2s;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  padding: 7px 14px;
  border-radius: var(--radius-md);
  font-size: 12.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border-hi);
  background: var(--bg-surface);
  color: var(--text-secondary);
  transition: background .12s, border-color .12s, color .12s, box-shadow .12s;
  white-space: nowrap;
  line-height: 1;
}
.btn:hover {
  background: var(--bg-elevated);
  border-color: var(--border-hi);
  box-shadow: var(--shadow);
}
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-sm  { padding: 6px 12px; font-size: 12px; }
.btn-xs  { padding: 3px 9px;  font-size: 10.5px; }
.btn-full { width: 100%; justify-content: center; }
.btn-danger {
  background: transparent;
  border-color: #fca5a5;
  color: var(--red-hi);
}
.btn-danger:hover { background: #fef2f2; }
[data-theme="dark"] .btn-danger:hover { background: #2a0a0a; }

/* Theme toggle */
.btn-theme {
  padding: 6px 8px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}
.btn-theme:hover { background: var(--bg-hover); color: var(--primary); border-color: var(--primary); }

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow);
  transition: background .2s, border-color .2s;
}
.card-title { font-size: 11.5px; font-weight: 500; color: var(--text-faint); margin-bottom: 4px; }
.card-val   { font-size: 24px; font-weight: 700; color: var(--text-primary); letter-spacing: -.5px; }
.card-delta { font-size: 11px; margin-top: 4px; font-weight: 500; }
.card-delta.up   { color: var(--green); }
.card-delta.down { color: var(--red-hi); }

.section-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-title span { color: var(--text-ghost); font-size: 11px; font-weight: 400; }

/* ── Grids ─────────────────────────────────────────────────── */
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr;       gap: 12px; margin-bottom: 16px; }

/* ── Progress Bar ──────────────────────────────────────────── */
.progress-track {
  height: 5px;
  background: var(--bg-elevated);
  border-radius: 20px;
  overflow: hidden;
  margin-top: 4px;
}
.progress-fill { height: 100%; border-radius: 20px; transition: width .6s ease; }

/* ── Tabs ──────────────────────────────────────────────────── */
.tab-bar { display: flex; gap: 4px; margin-bottom: 16px; flex-wrap: wrap; }
.tab {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-faint);
  transition: all .12s;
}
.tab:hover { color: var(--text-muted); background: var(--bg-elevated); }
.tab.active {
  background: var(--primary-light);
  border-color: var(--primary-muted);
  color: var(--primary-deep);
}

/* ── Platform Badge ────────────────────────────────────────── */
.plat-badge {
  width: 22px; height: 22px;
  border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  font-size: 8px; font-weight: 700;
  flex-shrink: 0;
}

/* ── Status Badges ─────────────────────────────────────────── */
.status-badge {
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 10.5px;
  font-weight: 600;
}
.status-scheduled { background: var(--green-bg);    color: var(--green); }
.status-published  { background: var(--primary-light); color: var(--primary-deep); }
.status-draft      { background: var(--bg-elevated);  color: var(--text-ghost); }
.status-active     { color: var(--green); font-weight: 600; }
.status-review     { color: var(--orange-hi); font-weight: 600; }
.status-paused     { color: var(--text-muted); }

/* ── Post Card ─────────────────────────────────────────────── */
.post-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 8px;
  transition: border-color .12s, box-shadow .12s;
  box-shadow: var(--shadow);
}
.post-card:hover { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.post-meta    { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.post-content { font-size: 12.5px; color: var(--text-muted); line-height: 1.6; margin-bottom: 9px; }
.post-content.draft { color: var(--text-ghost); font-style: italic; }
.post-media   { display: flex; gap: 5px; margin-bottom: 8px; }
.post-media-thumb {
  width: 58px; height: 46px;
  background: var(--bg-elevated);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  color: var(--text-ghost);
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.post-footer { display: flex; align-items: center; font-size: 11px; color: var(--text-faint); gap: 12px; }

/* ── AI Page ───────────────────────────────────────────────── */
.ai-layout { display: flex; gap: 16px; height: calc(100vh - 162px); min-height: 400px; }
.ai-chat   { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ai-sidebar{ width: 180px; flex-shrink: 0; }

.chat-window {
  flex: 1;
  background: var(--bg-base);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 14px;
  overflow-y: auto;
  min-height: 200px;
  margin-bottom: 10px;
}
.chat-msg { display: flex; gap: 10px; margin-bottom: 14px; }
.chat-avatar {
  width: 28px; height: 28px;
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; flex-shrink: 0;
}
.chat-avatar.user { background: var(--primary-muted); color: var(--primary-deep); }
.chat-avatar.ai   { background: var(--bg-elevated); color: var(--primary); border: 1px solid var(--border); }
.chat-bubble {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.65;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  flex: 1;
  white-space: pre-wrap;
  word-break: break-word;
}
.chat-input-row { display: flex; gap: 7px; }
.chat-input {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 9px 14px;
  font-size: 12.5px;
  color: var(--text-primary);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.chat-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.chat-input::placeholder { color: var(--text-ghost); }

/* ── SEO Ring ──────────────────────────────────────────────── */
.seo-ring { position: relative; width: 90px; height: 90px; flex-shrink: 0; }
.seo-ring-score {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  font-size: 20px; font-weight: 700; color: var(--text-primary);
}

/* ── Heatmap ───────────────────────────────────────────────── */
.heatmap-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 3px; }
.heatmap-label { text-align: center; font-size: 9px; color: var(--text-ghost); }
.heatmap-cell  { height: 20px; border-radius: 3px; }

/* ── Bar chart ─────────────────────────────────────────────── */
.bar-chart { display: flex; align-items: flex-end; gap: 10px; height: 100px; }
.bar-group { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bar-pair  { width: 100%; display: flex; gap: 2px; align-items: flex-end; height: 80px; }
.bar       { flex: 1; border-radius: 4px 4px 0 0; }
.bar-label { font-size: 10px; color: var(--text-faint); }

/* ── Modal ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  backdrop-filter: blur(3px);
}
.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 26px;
  width: 100%; max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
}
.modal-title { font-size: 15px; font-weight: 700; color: var(--text-primary); margin-bottom: 18px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

/* ── Form Elements ─────────────────────────────────────────── */
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 11.5px; font-weight: 500; color: var(--text-muted); margin-bottom: 5px; }
.form-control {
  width: 100%;
  background: var(--bg-base);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  font-size: 12.5px;
  color: var(--text-primary);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.form-control::placeholder { color: var(--text-ghost); }
textarea.form-control { resize: vertical; min-height: 90px; }

.platform-checkboxes { display: flex; gap: 8px; flex-wrap: wrap; }
.plat-check {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--border-hi); font-size: 11.5px; font-weight: 500;
  color: var(--text-muted); transition: all .12s;
  user-select: none; background: var(--bg-elevated);
}
.plat-check.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary-deep);
}

/* ── Toast ─────────────────────────────────────────────────── */
#toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 200;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast-item {
  padding: 10px 16px; border-radius: var(--radius-md);
  font-size: 12.5px; font-weight: 500;
  background: var(--bg-surface);
  border: 1px solid var(--border-hi);
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  animation: slideIn .2s ease;
  pointer-events: auto;
}
.toast-item.success { border-color: var(--green);  color: var(--green); background: var(--green-bg); }
.toast-item.error   { border-color: var(--red-hi); color: var(--red-hi); background: #fef2f2; }
[data-theme="dark"] .toast-item.error { background: #2a0a0a; }
@keyframes slideIn { from { opacity:0; transform:translateX(16px); } to { opacity:1; transform:none; } }

/* ── Loading / Error ───────────────────────────────────────── */
.loading-spinner {
  display: flex; align-items: center; justify-content: center;
  padding: 64px; color: var(--text-faint); gap: 10px; font-size: 13px;
}
.loading-spinner.error-state { flex-direction: column; gap: 6px; color: var(--red-hi); }
.spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--border-hi);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Login ─────────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-base);
  background-image: radial-gradient(ellipse at 30% 30%, var(--primary-light) 0%, transparent 60%);
}
.login-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 38px 34px;
  width: 390px;
  box-shadow: var(--shadow-md);
}
.login-logo { text-align: center; margin-bottom: 30px; }
.login-logo-icon-img { height: 44px; width: auto; display: block; margin: 0 auto; }
.login-logo-sub { font-size: 12px; font-weight: 500; color: var(--text-faint); margin-top: 8px; }
.login-error {
  background: #fef2f2; border: 1px solid #fca5a5;
  color: var(--red-hi); font-size: 12.5px;
  border-radius: var(--radius-md); padding: 9px 12px; margin-bottom: 14px;
}
[data-theme="dark"] .login-error { background: #2a0a0a; }

/* ── Keyword Table ─────────────────────────────────────────── */
.kw-table { overflow-y: auto; max-height: 195px; }
.kw-row {
  display: flex; align-items: center; padding: 7px 0;
  border-bottom: 1px solid var(--bg-elevated); gap: 8px;
}
.kw-rank {
  width: 28px; height: 22px; border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; flex-shrink: 0;
}
.kw-rank.top { background: var(--green-bg);    color: var(--green); }
.kw-rank.mid { background: var(--primary-light); color: var(--primary-deep); }

/* ── Schedule Week ─────────────────────────────────────────── */
.week-grid { display: flex; gap: 6px; }
.week-day {
  flex: 1; border-radius: 8px; padding: 9px 4px;
  text-align: center; border: 1px solid transparent;
  background: var(--bg-elevated);
}
.week-day.today { background: var(--primary-light); border-color: var(--primary-muted); }
.week-day-label { font-size: 10px; color: var(--text-ghost); font-weight: 500; }
.week-day.today .week-day-label { color: var(--primary-deep); }
.week-day-count { font-size: 16px; font-weight: 700; margin-top: 3px; }

/* ── AI sidebar ────────────────────────────────────────────── */
.model-pills { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 12px; }
.model-pill {
  padding: 5px 12px; border-radius: var(--radius-md); font-size: 11.5px;
  font-weight: 500; cursor: pointer; border: 1px solid var(--border-hi);
  background: var(--bg-elevated); color: var(--text-muted); transition: all .12s;
}
.model-pill.active { background: var(--primary-light); border-color: var(--primary-muted); color: var(--primary-deep); }
.ai-shortcuts { display: flex; flex-direction: column; gap: 5px; }
.shortcut-btn { width: 100%; justify-content: flex-start; font-size: 11px; }
.token-info { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.token-label { font-size: 11px; color: var(--text-faint); margin-bottom: 5px; }
.token-count { font-size: 9px; color: var(--text-ghost); margin-top: 3px; }

/* Typing dots */
.typing-dots span {
  display: inline-block; width: 5px; height: 5px;
  background: var(--text-ghost); border-radius: 50%; margin: 0 1px;
  animation: bounce .8s infinite;
}
.typing-dots span:nth-child(2) { animation-delay: .15s; }
.typing-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%,80%,100% { transform:translateY(0); } 40% { transform:translateY(-5px); } }

/* ── Settings ──────────────────────────────────────────────── */
.settings-section { font-size: 12px; font-weight: 600; color: var(--text-faint); text-transform: uppercase; letter-spacing: .6px; margin: 20px 0 8px; }

/* ── Divider ───────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 12px 0; }

/* ── Metric info box ───────────────────────────────────────── */
.metric-mini {
  background: var(--bg-base);
  border-radius: 8px;
  padding: 9px 10px;
}
.metric-mini-label { font-size: 9.5px; color: var(--text-faint); }
.metric-mini-val   { font-size: 14px; font-weight: 700; margin-top: 2px; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 768px) {
  .sidebar { width: 64px; }
  .sidebar-logo-img, .sidebar-logo-sub { display: none; }
  .nav-item span:not(svg) { display: none; }
  .nav-badge { display: none; }
  .user-name, .user-role { display: none; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .ai-layout { flex-direction: column; height: auto; }
  .ai-sidebar { width: 100%; }
  .content { padding: 14px 12px; }
  .topbar { padding: 10px 14px; }
}
