/* ============================================================================
   dosenku — brand override
   Palet: teal-navy dingin + aksen indigo (identitas dosenku).
   Dimuat PALING AKHIR setelah seluruh CSS aplikasi.
   ============================================================================ */

:root {
  --background: #f7f9fb;
  --foreground: #0f1b23;
  --primary: #0f766e;
  --primary-foreground: #f0fdfa;
  --secondary: #e2eaf1;
  --secondary-foreground: #0f1b23;
  --accent: #e8f1f6;
  --accent-foreground: #0f1b23;
  --accent-warm: #4f46e5;
  --accent-warm-foreground: #eef2ff;
  --card: #ffffff;
  --card-foreground: #0f1b23;
  --popover: #ffffff;
  --popover-foreground: #0f1b23;
  --muted: #eef3f7;
  --muted-foreground: #4a5f6e;
  --border: #d7e2ea;
  --input: #d7e2ea;
  --ring: #0f766e;
  --destructive: #dc2626;
  --destructive-foreground: #fef2f2;
  --sidebar: #ffffff;
  --sidebar-foreground: #0f1b23;
  --sidebar-primary: #0f766e;
  --sidebar-primary-foreground: #f0fdfa;
  --sidebar-accent: #e8f1f6;
  --sidebar-accent-foreground: #0f1b23;
  --sidebar-border: #d7e2ea;
  --sidebar-ring: #0f766e;
  --chart-1: #0f766e;
  --chart-2: #4f46e5;
  --chart-3: #2dd4bf;
  --chart-4: #6366f1;
  --chart-5: #0ea5e9;
  --radius: 0.5rem;

  /* tipografi: heading pakai Plus Jakarta Sans (sudah lokal), body Geist */
  --font-sans: "Plus Jakarta Sans", "Plus Jakarta Sans Fallback", system-ui, -apple-system, sans-serif;
  --font-geist-sans: var(--font-sans);
}

.dark {
  --background: #0a1017;
  --foreground: #e6eef4;
  --primary: #2dd4bf;
  --primary-foreground: #04211d;
  --secondary: #152431;
  --secondary-foreground: #e6eef4;
  --accent: #12212c;
  --accent-foreground: #e6eef4;
  --accent-warm: #818cf8;
  --accent-warm-foreground: #1e1b4b;
  --card: #0f1a24;
  --card-foreground: #e6eef4;
  --popover: #0f1a24;
  --popover-foreground: #e6eef4;
  --muted: #111d27;
  --muted-foreground: #8ba3b3;
  --border: #1e2e3b;
  --input: #1e2e3b;
  --ring: #2dd4bf;
  --destructive: #f87171;
  --destructive-foreground: #450a0a;
  --sidebar: #0c151d;
  --sidebar-foreground: #e6eef4;
  --sidebar-primary: #2dd4bf;
  --sidebar-primary-foreground: #04211d;
  --sidebar-accent: #12212c;
  --sidebar-accent-foreground: #e6eef4;
  --sidebar-border: #1e2e3b;
  --sidebar-ring: #2dd4bf;
  --chart-1: #2dd4bf;
  --chart-2: #818cf8;
  --chart-3: #5eead4;
  --chart-4: #a5b4fc;
  --chart-5: #38bdf8;
}

/* ---------- tipografi & detail brand ---------- */
/* PENTING: jangan pakai letter-spacing negatif. Plus Jakarta Sans punya glyph
   spasi jauh lebih sempit dari Geist (1.69px vs 3px pada 14px); letter-spacing
   negatif tambahan membuat kata tampak menempel ("ituDOSENKU").
   Karena itu word-spacing dinaikkan sedikit untuk mengompensasi glyph spasi
   yang sempit, supaya jarak antar kata setara font asli. */
h1, h2, h3, h4, .font-display {
  font-family: var(--font-sans);
  letter-spacing: normal;
}

body {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  --dk-word-spacing: 0.06em;
}

body, p, li, td, th, span, a, button, label, h1, h2, h3, h4, h5, h6, div {
  word-spacing: var(--dk-word-spacing, 0.06em);
}

/* tombol & kontrol: sudut lebih tegas dari dospem (0.5rem vs 0.75rem) */
.btn, button.rounded-xl, a.rounded-xl { border-radius: var(--radius); }

/* aksen dekoratif brand (dipakai hemat, tidak mengubah layout) */
.dk-gradient {
  background-image: linear-gradient(135deg, #0f766e 0%, #4f46e5 100%);
}
.dk-gradient-text {
  background-image: linear-gradient(135deg, #0f766e 0%, #4f46e5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.dark .dk-gradient-text {
  background-image: linear-gradient(135deg, #2dd4bf 0%, #818cf8 100%);
}

/* garis aksen tipis di bawah header marketing */
header.sticky { border-bottom-color: color-mix(in srgb, var(--primary) 25%, var(--border)); }

/* badge paket/chip memakai warna brand (teal) */
[class*="bg-primary"] { --tw-bg-opacity: 1; }

/* tampilan angka besar (kuota, statistik) memakai mono agar terasa "akademik" */
.dk-metric, .tabular-nums { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------------------
   Tombol bantuan melayang (aria-label="Bantuan") berukuran 56x56 di pojok
   kanan bawah, dan di /chat/ posisinya PERSIS menutupi tombol kirim composer
   sehingga pesan tidak bisa dikirim dengan klik (harus tekan Enter).

   :has(textarea) membatasi perbaikan hanya pada halaman yang punya kotak
   tulis, jadi halaman lain tidak ikut berubah.
   --------------------------------------------------------------------------- */
body:has(textarea) button[aria-label="Bantuan"] {
  bottom: 6.5rem !important;
}

/* --- Panel riwayat percakapan (chat-history.js) --- */
#dca-history-list{display:flex;flex-direction:column;gap:2px}
.dca-hist-item{display:flex;align-items:center;border-radius:.5rem;transition:background .15s}
.dca-hist-item:hover{background:rgba(148,163,184,.12)}
.dca-hist-active{background:rgba(45,212,191,.14)}
.dca-hist-link{display:flex;align-items:center;gap:.5rem;flex:1;min-width:0;padding:.5rem .6rem;font-size:.8125rem;color:inherit;text-decoration:none;line-height:1.3}
.dca-hist-star{font-size:.6rem;opacity:.55;flex:none}
.dca-hist-text{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dca-hist-time{font-size:.625rem;opacity:.55;flex:none;font-variant-numeric:tabular-nums}
.dca-hist-del{opacity:0;background:none;border:0;color:inherit;cursor:pointer;font-size:1rem;line-height:1;padding:.15rem .45rem;border-radius:.35rem}
.dca-hist-item:hover .dca-hist-del,.dca-hist-del:focus-visible{opacity:.75}
.dca-hist-del:hover{opacity:1;background:rgba(248,113,113,.18);color:#fca5a5}
.dca-hist-empty{font-size:.75rem;opacity:.55;padding:.45rem .6rem}
.dca-history-count{float:right;font-size:.625rem;font-weight:600;opacity:.55}
