/* ============================================================
   Chit-O · Design Tokens
   Dipakai oleh public.css & admin.css
   ============================================================ */

:root {
  /* Brand */
  --brand-cyan:   #00D4FF;
  --brand-blue:   #0066FF;
  --brand-purple: #8B5CF6;
  --brand-gradient: linear-gradient(135deg, #00D4FF 0%, #0066FF 55%, #8B5CF6 100%);
  --brand-gradient-soft: linear-gradient(135deg, rgba(0,212,255,.15), rgba(139,92,246,.15));

  /* Typography */
  --font-heading: 'Sora', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, Menlo, monospace;

  /* Radius */
  --r-xs: 6px;
  --r-sm: 10px;
  --r:    14px;
  --r-lg: 20px;
  --r-xl: 28px;

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur:  0.25s;

  /* Layout */
  --container: 1200px;
  --nav-h: 68px;
  --tab-h: 64px;

  /* Safe area (iOS) */
  --safe-top:    env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ============ DARK (default) ============ */
:root, [data-theme="dark"] {
  --bg:            #0A0A12;
  --bg-soft:       #0E0E18;
  --surface:       #14141F;
  --surface-2:     #1C1C2E;
  --surface-3:     #24243A;
  --border:        #26263A;
  --border-strong: #34344D;

  --text:          #E8EAF2;
  --text-soft:     #B9BDCB;
  --text-muted:    #9095A8;
  --text-dim:      #6B7085;

  --accent:        #00D4FF;
  --accent-2:      #8B5CF6;
  --accent-soft:   rgba(0, 212, 255, 0.12);
  --accent-glow:   0 0 0 1px rgba(0,212,255,.25), 0 8px 30px rgba(0,212,255,.25);

  --danger:        #FF5C7A;
  --success:       #2DD4A6;
  --warning:       #F5B300;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.35);
  --shadow:    0 8px 24px rgba(0,0,0,.4);
  --shadow-lg: 0 24px 60px rgba(0,0,0,.55);

  --glass-bg:     rgba(20, 20, 31, 0.72);
  --glass-border: rgba(255,255,255,0.06);
}

/* ============ LIGHT ============ */
[data-theme="light"] {
  --bg:            #F7F8FC;
  --bg-soft:       #EFF1F7;
  --surface:       #FFFFFF;
  --surface-2:     #F1F3F9;
  --surface-3:     #E6E9F2;
  --border:        #E1E5EF;
  --border-strong: #C8CEE0;

  --text:          #0F1220;
  --text-soft:     #2C3142;
  --text-muted:    #5A5F75;
  --text-dim:      #8B90A5;

  --accent:        #0066FF;
  --accent-2:      #8B5CF6;
  --accent-soft:   rgba(0, 102, 255, 0.10);
  --accent-glow:   0 0 0 1px rgba(0,102,255,.2), 0 8px 30px rgba(0,102,255,.18);

  --shadow-sm: 0 1px 3px rgba(15,18,32,.06);
  --shadow:    0 8px 24px rgba(15,18,32,.08);
  --shadow-lg: 0 24px 60px rgba(15,18,32,.12);

  --glass-bg:     rgba(255,255,255,0.72);
  --glass-border: rgba(15,18,32,0.06);
}

/* ============ BASE ============ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 .6em;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--brand-purple); }

img { max-width: 100%; height: auto; display: block; }

::selection { background: var(--accent); color: #001018; }

/* ============ UTILITIES ============ */
.text-gradient {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.container-x {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

/* Scrollbar premium */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-soft); }
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 99px;
  border: 2px solid var(--bg-soft);
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
