/**
 * SST Ventures OS — Light & Dark Themes
 * Toggle via data-theme="light" | data-theme="dark" on <html>
 * Light: Coolors #545e75, #63adf2, #a7cced, #304d6d, #82a0bc
 * Dark:  #D6D6D6, #FFEE32, #FFD100, #202020, #333533
 */

/* ═══ LIGHT THEME (default) ═══ */
:root,
[data-theme="light"] {
  --bg: #f0f4f8;
  --surface: #ffffff;
  --surface2: #e8eef4;
  --border: rgba(48, 77, 109, 0.15);
  --text: #304d6d;
  --muted: #545e75;
  --accent: #63adf2;
  --accent-secondary: #82a0bc;
  --accent-bg: rgba(99, 173, 242, 0.12);
  --accent-border: rgba(99, 173, 242, 0.35);
  --sidebar-bg: #304d6d;
  --sidebar-border: rgba(255, 255, 255, 0.08);
  --sidebar-text: #ffffff;
  --sidebar-muted: #a7cced;
  --sidebar-hover: rgba(255, 255, 255, 0.08);
  --on-accent: #ffffff;
  --red: #dc2626;
  --green: #059669;
  --amber: #d97706;
  --radius: 16px;
  --blue: var(--accent);
  --blue-dark: var(--accent-secondary);
  --gc: var(--accent);
  --gc-light: var(--accent);
  --gc-bg: var(--accent-bg);
  --gradient-orb: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99,173,242,.08), transparent), radial-gradient(ellipse 60% 40% at 100% 100%, rgba(167,204,237,.06), transparent);
  --login-orb-1: rgba(99,173,242,.2);
  --login-orb-2: rgba(167,204,237,.15);
  --login-orb-3: rgba(99,173,242,.12);

  /* Role accent colors */
  --role-admin: #63adf2;
  --role-admin-bg: rgba(99, 173, 242, 0.12);
  --role-employee: #63adf2;
  --role-employee-bg: rgba(99, 173, 242, 0.12);
  --role-hr: #8b5cf6;
  --role-hr-bg: rgba(139, 92, 246, 0.12);
  --role-hr-border: rgba(139, 92, 246, 0.3);
  --role-accountant: #059669;
  --role-accountant-bg: rgba(5, 150, 105, 0.12);
  --role-accountant-border: rgba(5, 150, 105, 0.3);
}

/* ═══ DARK THEME ═══ */
[data-theme="dark"] {
  --bg: #202020;
  --surface: #333533;
  --surface2: #2a2b2a;
  --border: rgba(255, 255, 255, 0.08);
  --text: #D6D6D6;
  --muted: #9ca3af;
  --accent: #FFEE32;
  --accent-secondary: #FFD100;
  --accent-bg: rgba(255, 238, 50, 0.12);
  --accent-border: rgba(255, 238, 50, 0.3);
  --sidebar-bg: #0D1117;
  --sidebar-border: rgba(255, 255, 255, 0.06);
  --sidebar-text: #ffffff;
  --sidebar-muted: #94A3B8;
  --sidebar-hover: rgba(255, 255, 255, 0.06);
  --on-accent: #202020;
  --red: #EF4444;
  --green: #22C55E;
  --amber: #FBBF24;
  --blue: var(--accent);
  --blue-dark: var(--accent-secondary);
  --gc: var(--accent);
  --gc-light: var(--accent);
  --gc-bg: var(--accent-bg);
  --gradient-orb: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(255,238,50,.06), transparent), radial-gradient(ellipse 60% 40% at 100% 100%, rgba(255,209,0,.04), transparent);
  --login-orb-1: rgba(255,238,50,.2);
  --login-orb-2: rgba(255,209,0,.15);
  --login-orb-3: rgba(255,238,50,.12);

  /* Role accent colors (dark theme) */
  --role-admin: #FFEE32;
  --role-admin-bg: rgba(255, 238, 50, 0.12);
  --role-employee: #FFEE32;
  --role-employee-bg: rgba(255, 238, 50, 0.12);
  --role-hr: #a78bfa;
  --role-hr-bg: rgba(167, 139, 250, 0.12);
  --role-hr-border: rgba(167, 139, 250, 0.3);
  --role-accountant: #34d399;
  --role-accountant-bg: rgba(52, 211, 153, 0.12);
  --role-accountant-border: rgba(52, 211, 153, 0.3);
}

/* Sidebar overrides */
.sidebar .sb-item { color: var(--sidebar-muted); }
.sidebar .sb-item:hover { background: var(--sidebar-hover); color: var(--sidebar-text); }
.sidebar .sb-label { color: var(--sidebar-muted); }

/* ── Accessibility: respect reduced motion globally ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Focus visibility for keyboard navigation ── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
  outline: none;
}

/* Logo visibility — ensure full logo is visible everywhere (login, sidebar, etc.) */
.sb-logo img {
  height: 44px !important;
  width: auto !important;
  max-width: 100% !important;
  object-fit: contain !important;
  flex-shrink: 0;
}
.login-logo img {
  height: 110px !important;
  width: auto !important;
  max-width: 100% !important;
  object-fit: contain !important;
}
.receipt-logo,
.company-logo {
  height: 52px !important;
  width: auto !important;
  max-width: 100% !important;
  object-fit: contain !important;
}
