/* =============================================================================
   READABILITY — text must be clearly visible in BOTH themes, on every page.
   These win over every skin (html + 2 attributes beats the skin selectors).
   ============================================================================= */
html[data-theme="light"][data-skin], html[data-theme="light"] {
  --text-primary:   #14111F;
  --text-secondary: #3D3955;
  --text-muted:     #625E7C;
  --success: #047857; --success-bg: rgba(5,150,105,.12);
  --warning: #B45309; --warning-bg: rgba(217,119,6,.12);
  --danger:  #C81E1E; --danger-bg:  rgba(220,38,38,.10);
  --info:    #1D4ED8; --info-bg:    rgba(37,99,235,.10);
}
html[data-theme="dark"][data-skin], html[data-theme="dark"] {
  --text-primary:   #F1F3FF;
  --text-secondary: #C3CBEA;
  --text-muted:     #98A3C9;
  --success: #34D399; --warning: #FBBF24; --danger: #F87171; --info: #60A5FA;
}
/* Sidebar section headings: bright on dark, deeper shades on light */
html[data-theme="light"] .nav-section:nth-of-type(1) .nav-section-label { color:#6D28D9; }
html[data-theme="light"] .nav-section:nth-of-type(2) .nav-section-label { color:#0E7490; }
html[data-theme="light"] .nav-section:nth-of-type(3) .nav-section-label { color:#047857; }
html[data-theme="light"] .nav-section:nth-of-type(4) .nav-section-label { color:#B45309; }
html[data-theme="light"] .nav-section:nth-of-type(5) .nav-section-label { color:#BE185D; }
html[data-theme="light"] .nav-section:nth-of-type(n+6) .nav-section-label { color:#6D28D9; }
/* Placeholders readable but still clearly hints */
html[data-theme="light"] ::placeholder { color:#8A86A3; opacity:1; }
html[data-theme="dark"]  ::placeholder { color:#7D88AE; opacity:1; }
/* Dark mode buttons: slightly deeper start colour so white button text stays crisp */
html[data-theme="dark"][data-skin="nova"]{
  --gradient-main: linear-gradient(135deg,#0284C7 0%,#2563EB 50%,#4F46E5 100%);
  --gradient-hover: linear-gradient(135deg,#0369A1 0%,#4338CA 100%);
}

/* Admin sidebar headings (light) */
html[data-theme="light"] .admin-nav-label:nth-of-type(1) { color:#6D28D9; }
html[data-theme="light"] .admin-nav-label:nth-of-type(2) { color:#0E7490; }
html[data-theme="light"] .admin-nav-label:nth-of-type(3) { color:#047857; }
html[data-theme="light"] .admin-nav-label:nth-of-type(4) { color:#B45309; }
html[data-theme="light"] .admin-nav-label:nth-of-type(5) { color:#BE185D; }

/* Bright accent text written inline (made for dark backgrounds) → deeper
   shade of the same colour on light backgrounds so it stays readable. */
html[data-theme="light"] :is([style^="color:#22D3EE" i],[style*=";color:#22D3EE" i],[style*="; color:#22D3EE" i],[style^="color:#06B6D4" i],[style*=";color:#06B6D4" i]) { color:#0E7490 !important; }
html[data-theme="light"] :is([style^="color:#34D399" i],[style*=";color:#34D399" i],[style^="color:#10B981" i],[style*=";color:#10B981" i],[style*="; color:#10B981" i]) { color:#047857 !important; }
html[data-theme="light"] :is([style^="color:#FBBF24" i],[style*=";color:#FBBF24" i],[style^="color:#F59E0B" i],[style*=";color:#F59E0B" i],[style*="; color:#F59E0B" i]) { color:#B45309 !important; }
html[data-theme="light"] :is([style^="color:#A78BFA" i],[style*=";color:#A78BFA" i]) { color:#6D28D9 !important; }
html[data-theme="light"] :is([style^="color:#F472B6" i],[style*=";color:#F472B6" i]) { color:#BE185D !important; }
html[data-theme="light"] :is([style^="color:#60A5FA" i],[style*=";color:#60A5FA" i]) { color:#1D4ED8 !important; }
html[data-theme="light"] :is([style^="color:#F87171" i],[style*=";color:#F87171" i]) { color:#C81E1E !important; }

/* Card gloss sheen sits BEHIND the content (it was painted over the top of
   every card, washing out labels/headings in light mode). isolation keeps the
   negative z-index inside the card, above its own background. */
[data-skin] .glass-card, [data-skin] .card { isolation: isolate; }
[data-skin] .glass-card::after, [data-skin] .card::after { z-index: -1; }
