/* AlphaOS V9 Theme Engine
   - CSS Variables by theme
   - base background for dark MUST be #161616 as requested
*/

:root{
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 12px 30px rgba(0,0,0,.35);
  --shadow-soft: 0 10px 24px rgba(0,0,0,.22);
  --border-w: 1px;
  --blur: 18px;

  --font-fa: "Vazirmatn", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --font-en: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

  --trans-fast: 160ms;
  --trans: 240ms;
}

/* Theme tokens */
body[data-theme="dark"]{
  --bg: #161616;
  --surface: #1E1E1E;
  --surface-2: #232323;
  --surface-3: #262626;
  --border: #2A2A2A;
  --muted: #A0A0A0;
  --text: #F5F5F5;

  --accent: #00C896;
  --accent-2: #39E6B5;

  --danger: #FF4D4F;
  --warning: #FFA940;
  --success: #2ED573;
  --info: #4D96FF;

  --chip: rgba(255,255,255,.06);
  --glass: rgba(255,255,255,.06);
  --glass-border: rgba(255,255,255,.10);
}

body[data-theme="light"]{
  --bg: #F7F7F9;
  --surface: #FFFFFF;
  --surface-2: #FFFFFF;
  --surface-3: #F2F3F6;
  --border: #E3E5EA;
  --muted: #586070;
  --text: #0D0F14;

  --accent: #0BBE8C;
  --accent-2: #19D7A2;

  --danger: #D92D20;
  --warning: #DC6803;
  --success: #039855;
  --info: #175CD3;

  --chip: rgba(13,15,20,.05);
  --glass: rgba(255,255,255,.6);
  --glass-border: rgba(13,15,20,.10);
}

body[data-theme="midnight"]{
  --bg: #0B1020;
  --surface: #101A33;
  --surface-2: #122042;
  --surface-3: #15254C;
  --border: #20305C;
  --muted: #9FB2DA;
  --text: #ECF2FF;

  --accent: #4D96FF;
  --accent-2: #7CB3FF;

  --danger: #FF4D4F;
  --warning: #FFB020;
  --success: #2ED573;
  --info: #9B8CFF;

  --chip: rgba(236,242,255,.07);
  --glass: rgba(236,242,255,.07);
  --glass-border: rgba(236,242,255,.14);
}

body[data-theme="emerald"]{
  --bg: #0F1513;
  --surface: #141D19;
  --surface-2: #18231E;
  --surface-3: #1A2621;
  --border: #26352F;
  --muted: #A3B7AF;
  --text: #F0F7F4;

  --accent: #00C896;
  --accent-2: #39E6B5;

  --danger: #FF4D4F;
  --warning: #FFA940;
  --success: #2ED573;
  --info: #4D96FF;

  --chip: rgba(240,247,244,.06);
  --glass: rgba(240,247,244,.06);
  --glass-border: rgba(240,247,244,.12);
}

body[data-theme="sunset"]{
  --bg: #141316;
  --surface: #1B1920;
  --surface-2: #201D27;
  --surface-3: #251F2F;
  --border: #322B40;
  --muted: #B5A9C6;
  --text: #F7F3FF;

  --accent: #FF6B6B;
  --accent-2: #FF9A7A;

  --danger: #FF4D4F;
  --warning: #FFB020;
  --success: #2ED573;
  --info: #4D96FF;

  --chip: rgba(247,243,255,.07);
  --glass: rgba(247,243,255,.07);
  --glass-border: rgba(247,243,255,.14);
}

/* System: derived at runtime, but define fallback */
body[data-theme="system"]{
  --bg: #161616;
  --surface: #1E1E1E;
  --surface-2: #232323;
  --surface-3: #262626;
  --border: #2A2A2A;
  --muted: #A0A0A0;
  --text: #F5F5F5;
  --accent: #00C896;
  --accent-2: #39E6B5;
  --danger: #FF4D4F;
  --warning: #FFA940;
  --success: #2ED573;
  --info: #4D96FF;
  --chip: rgba(255,255,255,.06);
  --glass: rgba(255,255,255,.06);
  --glass-border: rgba(255,255,255,.10);
}

/* Font / Direction */
body[data-font="inter"]{ font-family: var(--font-en); }
body[data-font="vazirmatn"]{ font-family: var(--font-fa); }

html[dir="rtl"]{ direction: rtl; }
html[dir="ltr"]{ direction: ltr; }
