/* ========================================
   TIGA OS — Theme Variables
======================================== */
:root {
  --c-dark: 15 29 43;       /* #0F1D2B */
  --c-blue: 22 42 58;       /* #162A3A */
  --c-mid: 30 58 79;        /* #1E3A4F */
  --c-light: 69 120 160;    /* #4578A0 — brighter for better text contrast */
  --c-accent: 59 130 246;   /* #3B82F6 */
  --bg-body: #0F1D2B;
  --text-main: #e2e8f0;
  --text-bright: #ffffff;
  --shadow-card: rgba(0,0,0,.5);
  --scrollbar-track: #0F1D2B;
  --scrollbar-thumb: #1E3A4F;
  /* Premium glow tokens */
  --glow-accent: rgba(59,130,246,.35);
  --glow-success: rgba(52,211,153,.3);
  --glow-danger: rgba(248,113,113,.3);
  --premium-ease: cubic-bezier(.22,1,.36,1);
  --spring-ease: cubic-bezier(.34,1.56,.64,1);
}

body.theme-light {
  --c-dark: 245 245 245;    /* #f5f5f5 neutral-100 */
  --c-blue: 255 255 255;    /* #ffffff */
  --c-mid: 163 163 163;     /* #a3a3a3 neutral-400 */
  --c-light: 82 82 82;      /* #525252 neutral-600 */
  --bg-body: #f5f5f5;
  --text-main: #404040;
  --text-bright: #262626;
  --shadow-card: rgba(0,0,0,.08);
  --scrollbar-track: #f5f5f5;
  --scrollbar-thumb: #a3a3a3;
  --glow-accent: rgba(59,130,246,.2);
  --glow-success: rgba(34,197,94,.15);
  --glow-danger: rgba(239,68,68,.15);
}

/* ========================================
   BASE
======================================== */
* { font-family: 'Montserrat', sans-serif; }
body {
  background: var(--bg-body);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar */
::-webkit-scrollbar { width:6px; height:6px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius:3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(var(--c-light),.8); }

/* ========================================
   Focus & Accessibility
======================================== */
:focus-visible {
  outline: 2px solid rgb(var(--c-accent));
  outline-offset: 2px;
  border-radius: 4px;
}
button:focus-visible, a:focus-visible {
  outline: 2px solid rgb(var(--c-accent));
  outline-offset: 2px;
}
body.theme-light :focus-visible {
  outline-color: #3B82F6;
}

/* ========================================
   Global Transitions (Premium)
======================================== */
button, a, .card, input, textarea, select {
  transition: all .25s var(--premium-ease);
}

/* ========================================
   Premium Button Effects
======================================== */
button.premium-hover {
  position: relative;
  overflow: hidden;
}
button.premium-hover::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255,255,255,.08) 0%, transparent 60%);
  opacity: 0;
  transition: opacity .3s var(--premium-ease);
  pointer-events: none;
  border-radius: inherit;
}
button.premium-hover:hover::before { opacity: 1; }

/* Primary button glow */
.btn-glow {
  box-shadow: 0 0 0 0 var(--glow-accent);
  transition: all .25s var(--premium-ease), box-shadow .4s var(--premium-ease);
}
.btn-glow:hover {
  box-shadow: 0 4px 20px -4px var(--glow-accent), 0 0 0 1px rgba(59,130,246,.15);
  transform: translateY(-1px);
}
.btn-glow:active { transform: translateY(0) scale(.98); }

/* ========================================
   Cards (Premium)
======================================== */
.card {
  transition: transform .3s var(--premium-ease), box-shadow .3s var(--premium-ease), border-color .3s var(--premium-ease);
  cursor: pointer;
  position: relative;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px -8px var(--shadow-card), 0 2px 8px -2px rgba(0,0,0,.2);
  border-color: rgba(var(--c-light),.3) !important;
}
.card:active {
  transform: translateY(-1px) scale(.995);
}

/* ========================================
   Glassmorphism Panels
======================================== */
.glass {
  background: rgba(var(--c-blue),.7);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border: 1px solid rgba(var(--c-light),.12);
}
.glass-strong {
  background: rgba(var(--c-blue),.85);
  backdrop-filter: blur(32px) saturate(1.5);
  -webkit-backdrop-filter: blur(32px) saturate(1.5);
  border: 1px solid rgba(var(--c-light),.15);
}
body.theme-light .glass {
  background: rgba(255,255,255,.75);
  border-color: rgba(212,212,212,.4);
}
body.theme-light .glass-strong {
  background: rgba(255,255,255,.9);
  border-color: rgba(212,212,212,.5);
}

/* ========================================
   Drag & Drop
======================================== */
.dragging { opacity:.4; }
.drop-zone { transition: background .15s, border .15s; min-height:460px; }
@media (max-width: 1023px) {
  .drop-zone { min-height: auto; }
}
.drag-active { background:rgba(59,130,246,.08); border:2px dashed rgba(59,130,246,.5); border-radius:.75rem; box-shadow:inset 0 0 20px rgba(59,130,246,.06); }
.drop-indicator { height:3px; background:linear-gradient(90deg,transparent,rgb(var(--c-accent)),transparent); border-radius:2px; margin:4px 0; transition:opacity .15s; animation:dropPulse 1s ease infinite; }
@keyframes dropPulse { 0%,100%{opacity:.6} 50%{opacity:1} }
.dragging ~ .drop-zone { border:2px dashed rgba(var(--c-light),.2); border-radius:.75rem; }

/* ========================================
   Skeleton Loader
======================================== */
.skeleton { position:relative; overflow:hidden; background:rgba(var(--c-mid),.5); border-radius:.75rem; }
.skeleton::after { content:''; position:absolute; inset:0; background:linear-gradient(90deg,transparent,rgba(255,255,255,.04),transparent); animation:shimmer 1.5s infinite; }
@keyframes shimmer { 0%{transform:translateX(-100%)} 100%{transform:translateX(100%)} }
body.theme-light .skeleton { background:rgba(0,0,0,.06); }
body.theme-light .skeleton::after { background:linear-gradient(90deg,transparent,rgba(255,255,255,.4),transparent); }

/* ========================================
   Toast System (Enhanced with actions)
======================================== */
.toast-container { position:fixed; bottom:1.5rem; right:1.5rem; z-index:9999; display:flex; flex-direction:column-reverse; gap:.5rem; pointer-events:none; }
.toast { pointer-events:auto; display:flex; align-items:center; gap:.75rem; padding:.75rem 1.25rem; border-radius:.75rem; font-size:.875rem; font-weight:500; color:#fff; backdrop-filter:blur(12px); box-shadow:0 8px 24px -8px rgba(0,0,0,.4); animation:toastIn .3s var(--premium-ease); min-width:280px; }
.toast-success { background:rgba(16,185,129,.92); }
.toast-error { background:rgba(220,38,38,.92); }
.toast-warning { background:rgba(217,119,6,.92); }
.toast .toast-action { margin-left:auto; padding:.25rem .75rem; border-radius:.5rem; font-size:.75rem; font-weight:600; cursor:pointer; background:rgba(255,255,255,.2); transition:background .15s; flex-shrink:0; }
.toast .toast-action:hover { background:rgba(255,255,255,.35); }
.toast-exit { animation:toastOut .25s var(--premium-ease) forwards; }
@keyframes toastIn { from{transform:translateX(100%);opacity:0} to{transform:translateX(0);opacity:1} }
@keyframes toastOut { from{transform:translateX(0);opacity:1} to{transform:translateX(100%);opacity:0} }

/* ========================================
   Offline Banner
======================================== */
.offline-banner { position:fixed; top:0; left:0; right:0; z-index:9999; padding:.5rem 1rem; background:rgba(220,38,38,.95); color:#fff; text-align:center; font-size:.8125rem; font-weight:600; backdrop-filter:blur(8px); animation:slideDown .3s var(--premium-ease); }
.offline-banner.reconnected { background:rgba(16,185,129,.95); animation:slideDown .3s var(--premium-ease); }
@keyframes slideDown { from{transform:translateY(-100%)} to{transform:translateY(0)} }

/* ========================================
   Form Validation
======================================== */
.field-error { border-color:rgba(248,113,113,.6) !important; box-shadow:0 0 0 2px rgba(248,113,113,.15) !important; }
.field-error-msg { color:rgb(248,113,113); font-size:.75rem; margin-top:.25rem; animation:fadeIn .2s; }
.field-success { border-color:rgba(52,211,153,.5) !important; }

/* ========================================
   Empty State
======================================== */
.empty-state { text-align:center; padding:3rem 1.5rem; }
.empty-state-icon { width:3rem; height:3rem; margin:0 auto .75rem; opacity:.2; color:rgb(var(--c-light)); }
.empty-state p { color:rgba(var(--c-light),.3); font-size:.875rem; margin-bottom:.75rem; }
.empty-state .empty-cta { display:inline-flex; align-items:center; gap:.375rem; color:rgb(var(--c-accent)); font-size:.8125rem; font-weight:600; cursor:pointer; transition:opacity .15s; }
.empty-state .empty-cta:hover { opacity:.8; }

/* ========================================
   Bulk Select
======================================== */
.bulk-bar { position:sticky; top:0; z-index:20; background:rgba(var(--c-blue),.95); backdrop-filter:blur(12px); border:1px solid rgba(var(--c-accent),.3); border-radius:.75rem; padding:.625rem 1rem; margin-bottom:.75rem; display:flex; align-items:center; gap:.75rem; animation:fadeIn .2s var(--premium-ease); }
body.theme-light .bulk-bar { background:rgba(255,255,255,.95); }
.bulk-check { width:15px; height:15px; accent-color:rgb(var(--c-accent)); cursor:pointer; }

/* ========================================
   Checkbox (Premium)
======================================== */
.check-box {
  width:17px; height:17px; accent-color:rgb(var(--c-accent)); cursor:pointer; flex-shrink:0; margin-top:2px;
  transition: transform .2s var(--spring-ease);
}
.check-box:hover { transform: scale(1.15); }
.check-box:active { transform: scale(.9); }

/* ========================================
   Modal (Premium)
======================================== */
.modal-bg { animation: fadeIn .2s var(--premium-ease); }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
.modal-box { animation: modalEnter .35s var(--premium-ease); }
@keyframes modalEnter {
  from { transform: translateY(20px) scale(.97); opacity:0; }
  to   { transform: translateY(0) scale(1); opacity:1; }
}

/* Modal glass effect */
.modal-glass {
  background: rgba(var(--c-blue),.92);
  backdrop-filter: blur(40px) saturate(1.6);
  -webkit-backdrop-filter: blur(40px) saturate(1.6);
}
body.theme-light .modal-glass {
  background: rgba(255,255,255,.95);
}
.lead-cv-header {
  background: linear-gradient(to right, rgba(59,130,246,.12), rgba(100,116,139,.15)), rgba(var(--c-blue),1);
}
body.theme-light .lead-cv-header {
  background: linear-gradient(to right, rgba(59,130,246,.08), rgba(241,245,249,1));
}

/* ========================================
   Sidebar slide (mobile drawer)
======================================== */
.sidebar-slide { animation:slideIn .25s var(--premium-ease); }
@keyframes slideIn { from{transform:translateX(-100%)} to{transform:translateX(0)} }

/* ========================================
   Badges (Premium)
======================================== */
.badge {
  display:inline-flex; align-items:center; padding:2px 9px; border-radius:999px;
  font-size:11px; font-weight:600; white-space:nowrap;
  max-width:100%; overflow:hidden; text-overflow:ellipsis;
  transition: transform .2s var(--spring-ease), box-shadow .2s var(--premium-ease);
}
.badge:hover { transform: scale(1.05); }
.b-blue   { background:rgba(59,130,246,.15);  color:#93c5fd; }
.b-green  { background:rgba(52,211,153,.15);  color:#6ee7b7; }
.b-orange { background:rgba(251,146,60,.15);  color:#fbbf7a; }
.b-red    { background:rgba(248,113,113,.15); color:#fca5a5; }
.b-purple { background:rgba(167,139,250,.15); color:#c4b5fd; }
.b-gray   { background:rgba(156,163,175,.15); color:#9ca3af; }

/* ========================================
   Forms (Premium)
======================================== */
input,textarea,select { font-family:'Montserrat',sans-serif !important; }
input:focus, textarea:focus, select:focus {
  box-shadow: 0 0 0 3px rgba(var(--c-accent),.15), 0 2px 8px -2px rgba(var(--c-accent),.2);
}

/* ========================================
   Tabs (Premium)
======================================== */
.tab-active {
  background:rgba(59,130,246,.12); color:var(--text-bright);
  border-bottom:2px solid rgb(var(--c-accent));
  box-shadow: 0 2px 8px -4px var(--glow-accent);
}
.tab-inactive { color:rgba(148,178,204,.5); }
.tab-inactive:hover { color:rgba(148,178,204,.8); background:rgba(45,90,123,.15); }

/* ========================================
   Admin Dashboard
======================================== */
.admin-progress-bar { transition: width 0.5s var(--premium-ease); }
.activity-feed { scrollbar-width: thin; }

/* ========================================
   PORTAL LOGO
======================================== */
.portal-logo-preview svg { max-width:100%; max-height:100%; width:auto; height:auto; }
.portal-icon { border-radius: 4px; overflow: hidden; }
.portal-logo-preview svg { border-radius: 4px; overflow: hidden; }

/* ========================================
   NEW Badge (Premium)
======================================== */
.badge-new {
  display:inline-flex; align-items:center; padding:1px 7px; border-radius:999px;
  font-size:11px; font-weight:800; letter-spacing:.5px; text-transform:uppercase;
  background:linear-gradient(135deg, rgba(52,211,153,.25), rgba(56,189,248,.25));
  color:#6ee7b7; border:1px solid rgba(52,211,153,.3);
  animation: newPulse 2s ease-in-out infinite;
  flex-shrink:0;
  box-shadow: 0 0 12px -3px rgba(52,211,153,.4);
}
@keyframes newPulse {
  0%, 100% { opacity:1; box-shadow: 0 0 12px -3px rgba(52,211,153,.4); }
  50% { opacity:.7; box-shadow: 0 0 20px -3px rgba(52,211,153,.6); }
}

/* ========================================
   Staggered Entrance Animations
======================================== */
@keyframes fadeUp {
  from { opacity:0; transform:translateY(12px); }
  to   { opacity:1; transform:translateY(0); }
}
@keyframes fadeIn2 {
  from { opacity:0; }
  to   { opacity:1; }
}
@keyframes scaleIn {
  from { opacity:0; transform:scale(.95); }
  to   { opacity:1; transform:scale(1); }
}

.anim-fade-up {
  animation: fadeUp .4s var(--premium-ease) both;
}
.anim-fade-in {
  animation: fadeIn2 .3s var(--premium-ease) both;
}
.anim-scale-in {
  animation: scaleIn .35s var(--premium-ease) both;
}

/* Stagger delays */
.delay-1 { animation-delay: .05s; }
.delay-2 { animation-delay: .1s; }
.delay-3 { animation-delay: .15s; }
.delay-4 { animation-delay: .2s; }
.delay-5 { animation-delay: .25s; }
.delay-6 { animation-delay: .3s; }

/* ========================================
   Premium Nav Items
======================================== */
.nav-item {
  position: relative;
  transition: all .25s var(--premium-ease);
}
.nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 3px;
  height: 60%;
  border-radius: 0 3px 3px 0;
  background: rgb(var(--c-accent));
  transition: transform .25s var(--spring-ease);
}
.nav-item.nav-active::before {
  transform: translateY(-50%) scaleY(1);
}
.nav-item:hover {
  transform: translateX(2px);
}
.nav-item.nav-active:hover {
  transform: translateX(0);
}

/* ========================================
   Premium Sidebar
======================================== */
.sidebar-premium {
  background: rgba(var(--c-blue),.85);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
}
body.theme-light .sidebar-premium {
  background: rgba(255,255,255,.9);
}

/* Sidebar user section glow */
.user-section {
  position: relative;
}
.user-section::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--c-accent),.3), transparent);
}

/* ========================================
   Premium Stats Cards
======================================== */
.stat-card {
  position: relative;
  overflow: hidden;
  transition: all .3s var(--premium-ease);
}
.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: linear-gradient(135deg, transparent 40%, rgba(var(--c-accent),.04));
  pointer-events: none;
  border-radius: inherit;
}
.stat-card:hover {
  border-color: rgba(var(--c-accent),.25) !important;
  box-shadow: 0 4px 16px -4px var(--glow-accent);
}

/* ========================================
   Premium Panel Headers
======================================== */
.panel-header {
  position: relative;
}
.panel-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 5%;
  right: 5%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--c-light),.2), transparent);
}

/* ========================================
   Premium Avatar
======================================== */
.avatar-premium {
  position: relative;
  box-shadow: 0 0 0 2px rgba(var(--c-accent),.2);
  transition: all .25s var(--premium-ease);
}
.avatar-premium:hover {
  box-shadow: 0 0 0 2px rgba(var(--c-accent),.4), 0 0 12px -2px var(--glow-accent);
}

/* ========================================
   Shimmer Loading Effect
======================================== */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.shimmer {
  background: linear-gradient(90deg, rgba(var(--c-mid),.3) 25%, rgba(var(--c-mid),.5) 50%, rgba(var(--c-mid),.3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

/* ========================================
   Completion Animation
======================================== */
@keyframes checkComplete {
  0% { transform: scale(1); }
  30% { transform: scale(1.3); }
  60% { transform: scale(.9); }
  100% { transform: scale(1); }
}
.check-done {
  animation: checkComplete .4s var(--spring-ease);
}

/* ========================================
   Premium Tooltip
======================================== */
[data-tip] {
  position: relative;
}
[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  background: rgba(var(--c-blue),.95);
  color: #fff;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(var(--c-light),.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s var(--premium-ease), transform .2s var(--premium-ease);
}
[data-tip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-8px);
}

/* ========================================
   Page Transition
======================================== */
.page-enter {
  animation: pageEnter .4s var(--premium-ease) both;
}
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ========================================
   LIGHT THEME — Clean White & Gray
======================================== */

/* --- Theme transition for smooth switching --- */
body { transition: background-color .3s ease, color .3s ease; }

/* --- Core Tailwind color overrides: tiga-* → white/gray --- */
body.theme-light .bg-tiga-dark   { background-color: #f5f5f5 !important; }
body.theme-light .bg-tiga-blue   { background-color: #ffffff !important; }
body.theme-light .bg-tiga-mid    { background-color: #e5e5e5 !important; }
body.theme-light .bg-tiga-light  { background-color: #525252 !important; }
body.theme-light .bg-tiga-accent { background-color: #3B82F6 !important; }

/* Backgrounds with opacity */
body.theme-light [class*="bg-tiga-mid\/"]  { background-color: rgba(229,229,229,.5) !important; }
body.theme-light [class*="bg-tiga-blue\/"] { background-color: rgba(255,255,255,.5) !important; }
body.theme-light [class*="bg-tiga-dark\/"] { background-color: rgba(245,245,245,.5) !important; }
body.theme-light .bg-tiga-light\/80 { background-color: rgba(82,82,82,.8) !important; }
body.theme-light .bg-tiga-light\/20 { background-color: rgba(82,82,82,.12) !important; }
body.theme-light .bg-tiga-light\/25 { background-color: rgba(82,82,82,.15) !important; }
body.theme-light .bg-tiga-light\/15 { background-color: rgba(82,82,82,.08) !important; }
body.theme-light .bg-tiga-light\/10 { background-color: rgba(82,82,82,.06) !important; }
body.theme-light .bg-tiga-mid\/50   { background-color: rgba(229,229,229,.5) !important; }
body.theme-light .bg-tiga-mid\/60   { background-color: rgba(229,229,229,.6) !important; }
body.theme-light .bg-tiga-mid\/70   { background-color: rgba(229,229,229,.7) !important; }
body.theme-light .bg-tiga-mid\/40   { background-color: rgba(229,229,229,.4) !important; }
body.theme-light .bg-tiga-mid\/30   { background-color: rgba(229,229,229,.3) !important; }
body.theme-light .bg-tiga-mid\/20   { background-color: rgba(245,245,245,.6) !important; }
body.theme-light .bg-tiga-mid\/15   { background-color: rgba(245,245,245,.5) !important; }
body.theme-light .bg-tiga-mid\/10   { background-color: rgba(245,245,245,.3) !important; }

/* Borders → light gray */
body.theme-light [class*="border-tiga-light"] { border-color: rgba(212,212,212,.5) !important; }
body.theme-light [class*="border-tiga-mid"]   { border-color: rgba(212,212,212,.4) !important; }

/* Text colors: tiga-light → gray in light mode */
body.theme-light [class*="text-tiga-light"] { color: rgba(82,82,82,.6) !important; }

/* --- All SVG logos: white → black in light mode (except portal icons) --- */
body.theme-light svg path[fill="#fff"],
body.theme-light svg path[fill="#ffffff"],
body.theme-light svg path[fill="white"],
body.theme-light svg path[fill="#FFF"],
body.theme-light svg path[fill="#FFFFFF"] { fill: #1a1a1a !important; }
body.theme-light .portal-icon svg path[fill="#fff"],
body.theme-light .portal-icon svg path[fill="#ffffff"],
body.theme-light .portal-icon svg path[fill="white"],
body.theme-light .portal-icon svg path[fill="#FFF"],
body.theme-light .portal-icon svg path[fill="#FFFFFF"],
body.theme-light .portal-logo-preview svg path[fill="#fff"],
body.theme-light .portal-logo-preview svg path[fill="#ffffff"],
body.theme-light .portal-logo-preview svg path[fill="white"],
body.theme-light .portal-logo-preview svg path[fill="#FFF"],
body.theme-light .portal-logo-preview svg path[fill="#FFFFFF"] { fill: #fff !important; }

/* --- Text: override text-white to dark --- */
body.theme-light .text-white { color: #1a1a1a !important; }
body.theme-light .text-white\/80 { color: rgba(26,26,26,.8) !important; }
body.theme-light .text-white\/70 { color: rgba(26,26,26,.7) !important; }
body.theme-light .text-white\/60 { color: rgba(26,26,26,.6) !important; }
body.theme-light .placeholder-white\/60::placeholder { color: rgba(26,26,26,.4) !important; }

/* Placeholder text in inputs */
body.theme-light [class*="placeholder-tiga-light"]::placeholder { color: rgba(82,82,82,.4) !important; }

/* Keep white text on primary action buttons */
body.theme-light .bg-tiga-light .text-white,
body.theme-light .bg-tiga-light.text-white,
body.theme-light [class*="bg-tiga-light"]:not([class*="bg-tiga-light/"]) > .text-white,
body.theme-light button.bg-tiga-light,
body.theme-light a.bg-tiga-light { color: #ffffff !important; }
body.theme-light .bg-tiga-light\/80 { color: #ffffff !important; }
body.theme-light button[class*="bg-red-"]:not([class*="bg-red-500/"]):not([class*="bg-red-600/"]):not([class*="bg-red-900/"]),
body.theme-light button[class*="bg-emerald-"]:not([class*="bg-emerald-500/"]):not([class*="bg-emerald-600/"]):not([class*="bg-emerald-900/"]),
body.theme-light button[class*="bg-blue-"]:not([class*="bg-blue-500/"]):not([class*="bg-blue-600/"]):not([class*="bg-blue-900/"]),
body.theme-light button[class*="bg-orange-"]:not([class*="bg-orange-500/"]):not([class*="bg-orange-600/"]):not([class*="bg-orange-900/"]) { color: #ffffff !important; }

/* Focus rings → gray */
body.theme-light [class*="ring-tiga-light"] { --tw-ring-color: rgba(82,82,82,.25) !important; }

/* --- Input/textarea/select backgrounds --- */
body.theme-light input, body.theme-light textarea, body.theme-light select {
  background-color: #f5f5f5 !important;
  border-color: #d4d4d4 !important;
  color: #1a1a1a !important;
}

/* --- Badges: stronger contrast --- */
body.theme-light .b-blue   { background:rgba(59,130,246,.1);  color:#2563eb; }
body.theme-light .b-green  { background:rgba(34,197,94,.1);   color:#16a34a; }
body.theme-light .b-orange { background:rgba(249,115,22,.1);  color:#ea580c; }
body.theme-light .b-red    { background:rgba(239,68,68,.1);   color:#dc2626; }
body.theme-light .b-purple { background:rgba(139,92,246,.1);  color:#7c3aed; }
body.theme-light .b-gray   { background:rgba(115,115,115,.1); color:#525252; }

/* --- Tabs --- */
body.theme-light .tab-active { background:rgba(82,82,82,.08); color:#1a1a1a; border-bottom-color:#525252; }
body.theme-light .tab-inactive { color:rgba(82,82,82,.4); }
body.theme-light .tab-inactive:hover { color:rgba(82,82,82,.7); background:rgba(82,82,82,.06); }

/* --- Card shadow --- */
body.theme-light .card { border-color: rgba(212,212,212,.5) !important; }
body.theme-light .card:hover { box-shadow:0 8px 24px rgba(0,0,0,.08); }

/* --- Modal overlay --- */
body.theme-light .bg-black\/65 { background-color: rgba(0,0,0,.35) !important; }
body.theme-light .bg-black\/50 { background-color: rgba(0,0,0,.25) !important; }
body.theme-light .bg-black\/60 { background-color: rgba(0,0,0,.3) !important; }

/* --- Badge-new --- */
body.theme-light .badge-new {
  background:linear-gradient(135deg, rgba(34,197,94,.12), rgba(14,165,233,.12));
  color:#16a34a; border-color:rgba(34,197,94,.2);
  box-shadow: 0 0 12px -3px rgba(34,197,94,.2);
}

/* --- Scrollbar --- */
body.theme-light { scrollbar-color: #d4d4d4 #fafafa; }
body.theme-light ::-webkit-scrollbar-track { background: #fafafa; }
body.theme-light ::-webkit-scrollbar-thumb { background: #d4d4d4; }

/* --- Select option backgrounds --- */
body.theme-light select option { background: #fff; color: #1a1a1a; }
body.theme-light .bg-tiga-dark { background-color: #f5f5f5 !important; }

/* --- Accent text colors (keep readable) --- */
body.theme-light .text-emerald-400 { color: #059669 !important; }
body.theme-light .text-emerald-300 { color: #10b981 !important; }
body.theme-light .text-red-400 { color: #dc2626 !important; }
body.theme-light .text-red-300 { color: #ef4444 !important; }
body.theme-light .text-orange-400 { color: #ea580c !important; }
body.theme-light .text-amber-400 { color: #d97706 !important; }
body.theme-light .text-blue-400 { color: #2563eb !important; }
body.theme-light .text-purple-400 { color: #7c3aed !important; }
body.theme-light .text-cyan-400 { color: #0891b2 !important; }
body.theme-light .text-rose-400 { color: #e11d48 !important; }

/* --- Status backgrounds --- */
body.theme-light .bg-emerald-900\/20 { background-color: rgba(5,150,105,.08) !important; }
body.theme-light .bg-emerald-900\/30 { background-color: rgba(5,150,105,.1) !important; }
body.theme-light .bg-red-900\/20 { background-color: rgba(220,38,38,.08) !important; }
body.theme-light .bg-red-900\/30 { background-color: rgba(220,38,38,.1) !important; }
body.theme-light .bg-red-900\/50 { background-color: rgba(220,38,38,.15) !important; }
body.theme-light .bg-orange-900\/20 { background-color: rgba(234,88,12,.08) !important; }
body.theme-light .bg-orange-900\/30 { background-color: rgba(234,88,12,.1) !important; }
body.theme-light .border-emerald-400\/20 { border-color: rgba(5,150,105,.15) !important; }
body.theme-light .border-red-400\/20 { border-color: rgba(220,38,38,.15) !important; }
body.theme-light .border-red-900\/30 { border-color: rgba(220,38,38,.15) !important; }

/* --- Sidebar: glass effect in light mode --- */
body.theme-light aside { background-color: rgba(255,255,255,.9) !important; border-color: #e5e5e5 !important; }
body.theme-light header { background-color: rgba(255,255,255,.9) !important; border-color: #e5e5e5 !important; }

/* --- Notification badge keeps red+white --- */
body.theme-light .notif-badge { color: #fff !important; }

/* --- Avatar circles --- */
body.theme-light [class*="bg-tiga-light\/25"] { background-color: rgba(82,82,82,.1) !important; }

/* ========================================
   Command Palette (Premium)
======================================== */
.cmd-palette-bg { animation: fadeIn .2s var(--premium-ease); }
.cmd-palette-box { animation: cmdSlideDown .25s var(--premium-ease); }
@keyframes cmdSlideDown {
  from { transform: translateY(-16px) scale(.96); opacity: 0; filter: blur(4px); }
  to   { transform: translateY(0) scale(1); opacity: 1; filter: blur(0); }
}
.cmd-item { transition: all .15s var(--premium-ease); }
.cmd-item:hover, .cmd-active { background: rgba(59,130,246,.12); }
.cmd-results-scroll { scrollbar-width: thin; }
.cmd-results-scroll::-webkit-scrollbar { width: 4px; }
.cmd-results-scroll::-webkit-scrollbar-thumb { background: rgba(45,90,123,.3); border-radius: 2px; }
body.theme-light .cmd-item:hover,
body.theme-light .cmd-active { background: rgba(82,82,82,.06); }
body.theme-light .cmd-palette-box { background: #ffffff; border-color: #e5e5e5; }
body.theme-light .cmd-results-scroll::-webkit-scrollbar-thumb { background: rgba(82,82,82,.15); }

/* ========================================
   Notification Panel (Premium)
======================================== */
.notif-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  color: #fff;
  background: #ef4444;
  border-radius: 9999px;
  animation: notifPulse 2s ease-in-out 3;
  box-shadow: 0 0 8px rgba(239,68,68,.4);
}
@keyframes notifPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 8px rgba(239,68,68,.4); }
  50% { transform: scale(1.2); box-shadow: 0 0 16px rgba(239,68,68,.6); }
}
.notif-panel {
  animation: notifSlide .2s var(--premium-ease);
}
@keyframes notifSlide {
  from { opacity: 0; transform: translateY(8px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.notif-scroll { scrollbar-width: thin; }
.notif-scroll::-webkit-scrollbar { width: 4px; }
.notif-scroll::-webkit-scrollbar-thumb { background: rgba(45,90,123,.3); border-radius: 2px; }
body.theme-light .notif-panel { background: #ffffff !important; border-color: #e5e5e5 !important; }
body.theme-light .notif-scroll::-webkit-scrollbar-thumb { background: rgba(82,82,82,.15); }

/* ========================================
   Quick Nav FAB (Premium)
======================================== */
.quick-nav-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #3B82F6, #2563EB);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.25), 0 0 0 0 rgba(59,130,246,.3);
  cursor: pointer;
  z-index: 40;
  border: none;
  transition: all .25s var(--premium-ease);
}
.quick-nav-fab:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 6px 24px rgba(0,0,0,.35), 0 0 20px -4px rgba(59,130,246,.5);
}
.quick-nav-fab:active {
  transform: scale(.95);
}
.quick-nav-fab svg { width: 20px; height: 20px; }
body.theme-light .quick-nav-fab {
  background: linear-gradient(135deg, #525252, #404040);
  box-shadow: 0 4px 16px rgba(0,0,0,.15), 0 0 0 0 rgba(82,82,82,.2);
}

/* ========================================
   Landing Page
======================================== */
html { scroll-behavior: smooth; }

/* ========================================
   Toast Animation (Premium)
======================================== */
@keyframes toastSlideIn {
  from { transform: translateY(16px) scale(.95); opacity: 0; filter: blur(2px); }
  to   { transform: translateY(0) scale(1); opacity: 1; filter: blur(0); }
}
.animate-toast { animation: toastSlideIn .3s var(--premium-ease); }

/* ========================================
   Subtle Background Gradient
======================================== */
.bg-premium-gradient {
  background: linear-gradient(135deg, rgba(var(--c-dark),1) 0%, rgba(var(--c-blue),.8) 50%, rgba(var(--c-dark),1) 100%);
}

/* ========================================
   Interactive Glow Ring on Focus
======================================== */
.glow-ring {
  transition: box-shadow .3s var(--premium-ease);
}
.glow-ring:focus-within {
  box-shadow: 0 0 0 3px var(--glow-accent), 0 4px 16px -4px var(--glow-accent);
}

/* ========================================
   Smooth Counter Transition
======================================== */
.counter-value {
  display: inline-block;
  transition: transform .3s var(--spring-ease);
}
.counter-value.bump {
  animation: counterBump .4s var(--spring-ease);
}
@keyframes counterBump {
  0% { transform: scale(1); }
  40% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

/* ========================================
   MOBILE OPTIMIZATIONS
======================================== */

/* Prevent any accidental horizontal scroll globally on mobile */
@media (max-width: 1023px) {
  html, body {
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }
  /* Body scroll lock when sidebar drawer is open */
  body.sidebar-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
  }
  /* Glass panels: flatten on mobile so content aligns with header */
  /* Only flatten page-level panels, not overlays/modals/header/notif */
  main .glass, main .glass-strong {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

@media (max-width: 639px) {
  /* Modals: full-width bottom sheet on small screens */
  .modal-box {
    border-radius: 1.25rem 1.25rem 0 0 !important;
    max-height: 92vh !important;
  }
  /* Cards: reduce hover effects on touch */
  .card:hover {
    transform: none;
    box-shadow: none;
  }
  /* Nav item: no hover translate on touch */
  .nav-item:hover {
    transform: none;
  }
  /* Quick Nav FAB: better mobile placement */
  .quick-nav-fab {
    width: 48px;
    height: 48px;
    bottom: 20px;
    right: 16px;
  }
  /* Touch-friendly: minimum 44px tap targets */
  .check-box {
    width: 20px;
    height: 20px;
    min-width: 20px;
  }
  /* Badge: slightly bigger for touch */
  .badge {
    padding: 3px 10px;
    font-size: 11px;
  }
  /* Stat cards: compact on mobile */
  .stat-card {
    padding: 0.5rem 0.75rem !important;
  }
  /* Better card spacing on mobile */
  .card {
    padding: 0.875rem !important;
  }
  /* Mobile header: sticky feel */
  header {
    position: sticky;
    top: 0;
    z-index: 30;
  }
  /* Smooth scroll for main content */
  main {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }
  /* Command palette: closer to top on mobile */
  .cmd-palette-bg {
    align-items: flex-start !important;
    padding-top: 8vh !important;
  }
  /* Notification panel: full width on mobile */
  .notif-panel {
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    bottom: 64px !important;
  }
}
