/*
 * Product colour palette, layered over the prototype stylesheet (kept verbatim in
 * prototype.css). Only colours change here — every layout and class stays the prototype's.
 *
 *   Stormy Teal      #006d77  dark theme: cards and panels · light theme: links and highlights
 *   Deep Teal        #062528  dark theme: sidebar and header
 *   Pearl Aqua       #83c5be  dark theme: content area background
 *   Alice Blue       #edf6f9  light theme background, dark theme text on dark surfaces
 *   Almond Silk      #ffddd2  highlights: active menu item, links, accent text in cards
 *   Tangerine Dream  #e29578  buttons — the default brand accent (Settings → Branding)
 *
 * Healthy (emerald), monitor (amber) and critical (rose) keep their colours: they carry meaning.
 */

/* ---------- Dark theme (default) ---------- */
/* Text set used on teal surfaces (cards, tables, inputs, modals). */
:root, .theme-dark {
  --color-white:247 251 252;       /* Alice Blue, brightened for contrast on teal */
  --slate-200:240 248 249;
  --slate-300:236 246 248;
  --slate-400:222 239 241;
  --slate-500:210 233 235;         /* muted text: lightest that still reads as secondary, ≥4.5:1 on #006d77 */
  --slate-600:210 233 235;
  --color-base:6 37 40;            /* #062528: page and header behind the content area */
  --color-panel:0 109 119;         /* #006d77 Stormy Teal: cards */
  --color-panel2:0 92 101;         /* deeper teal: table headers, inputs */
  --color-line:38 136 145;
  --color-sidebar:6 37 40;         /* #062528 */
  --color-navactive:#FFDDD2;       /* Almond Silk */
  --color-scrollbar:#1D5A61;
  --highlight:255 232 224;         /* Almond Silk, lifted a touch so text passes on tinted buttons */
  --on-accent:4 25 28;             /* text on Tangerine buttons */
}

/* The content area is Pearl Aqua. Text sitting straight on it is dark teal; cards,
   inputs and modals keep the light text set above (variables are re-set inside them). */
:root:not(.theme-light) #mainContent {
  background-color: #83C5BE;
  --color-white:4 25 28;
  --slate-200:8 52 58;
  --slate-300:12 58 64;
  --slate-400:18 66 72;
  --slate-500:24 76 82;
  --slate-600:36 92 98;
  --color-line:95 160 155;
  --highlight:0 75 82;
}
:root:not(.theme-light) #mainContent :is(.bg-panel, .bg-panel2, [class*="bg-panel/"], [class*="bg-panel2/"], .modal-pop) {
  --color-white:247 251 252;
  --slate-200:240 248 249;
  --slate-300:236 246 248;
  --slate-400:222 239 241;
  --slate-500:210 233 235;
  --slate-600:210 233 235;
  --color-line:38 136 145;
  --highlight:255 232 224;
}

/* Coloured text on teal surfaces (status, roles, avatars): lighter tints of the same hues,
   so the meaning stays and every badge passes AA. */
:root:not(.theme-light) :is(.bg-panel, .bg-panel2, [class*="bg-panel/"], [class*="bg-panel2/"], .modal-pop, aside, header) {
  --tone-rose:#FFD5DC; --tone-amber:#FEF0B4; --tone-emerald:#D1FAE5; --tone-indigo:#E0E7FF;
  --tone-purple:#F3E8FF; --tone-blue:#EFF6FF; --tone-pink:#FCE7F3; --tone-orange:#FFEDD5; --tone-teal:#F0FDFA;
}
:root:not(.theme-light) :is(.bg-panel, .bg-panel2, [class*="bg-panel/"], [class*="bg-panel2/"], .modal-pop, aside, header) :is(.text-rose, .hover\:text-rose:hover) { color: var(--tone-rose); }
:root:not(.theme-light) :is(.bg-panel, .bg-panel2, [class*="bg-panel/"], [class*="bg-panel2/"], .modal-pop, aside, header) :is(.text-amber, .hover\:text-amber:hover) { color: var(--tone-amber); }
:root:not(.theme-light) :is(.bg-panel, .bg-panel2, [class*="bg-panel/"], [class*="bg-panel2/"], .modal-pop, aside, header) :is(.text-emerald, .hover\:text-emerald:hover) { color: var(--tone-emerald); }
:root:not(.theme-light) :is(.bg-panel, .bg-panel2, [class*="bg-panel/"], [class*="bg-panel2/"], .modal-pop, aside, header) .text-indigo-400 { color: var(--tone-indigo); }
:root:not(.theme-light) :is(.bg-panel, .bg-panel2, [class*="bg-panel/"], [class*="bg-panel2/"], .modal-pop, aside, header) .text-purple-400 { color: var(--tone-purple); }
:root:not(.theme-light) :is(.bg-panel, .bg-panel2, [class*="bg-panel/"], [class*="bg-panel2/"], .modal-pop, aside, header) .text-blue-400 { color: var(--tone-blue); }
:root:not(.theme-light) :is(.bg-panel, .bg-panel2, [class*="bg-panel/"], [class*="bg-panel2/"], .modal-pop, aside, header) .text-pink-400 { color: var(--tone-pink); }
:root:not(.theme-light) :is(.bg-panel, .bg-panel2, [class*="bg-panel/"], [class*="bg-panel2/"], .modal-pop, aside, header) .text-orange-400 { color: var(--tone-orange); }
:root:not(.theme-light) :is(.bg-panel, .bg-panel2, [class*="bg-panel/"], [class*="bg-panel2/"], .modal-pop, aside, header) .text-teal-400 { color: var(--tone-teal); }

/* Avatar / badge colours sitting straight on the aqua content area (outside cards) need the
   dark shades. :where() keeps this weaker than the card rules above, so cards stay light. */
:root:not(.theme-light) :where(#mainContent) .text-indigo-400 { color: #1E1B4B; }
:root:not(.theme-light) :where(#mainContent) .text-purple-400 { color: #3B0764; }
:root:not(.theme-light) :where(#mainContent) .text-blue-400 { color: #172554; }
:root:not(.theme-light) :where(#mainContent) .text-pink-400 { color: #500724; }
:root:not(.theme-light) :where(#mainContent) .text-orange-400 { color: #431407; }
:root:not(.theme-light) :where(#mainContent) .text-teal-400 { color: #042F2E; }

/* Grey tints are built from the (now light) muted-text colour; on teal they'd lighten the
   badge, so use a slight darkening instead. */
:root:not(.theme-light) :is(.bg-panel, .bg-panel2, [class*="bg-panel/"], [class*="bg-panel2/"], .modal-pop, aside, header) :is(.bg-slate-500\/15, .bg-slate-500\/20) { background-color: rgb(4 25 28 / .22); }

/* See-through panels were designed for a dark page; over the aqua they wash out to light
   teal where no light text can pass. In the content area they're solid instead. */
:root:not(.theme-light) #mainContent :is(.bg-panel2\/50, .bg-panel2\/60) { background-color: rgb(var(--color-panel2)); }
:root:not(.theme-light) #mainContent .bg-panel\/40 { background-color: rgb(var(--color-panel)); }

/* Small white-on-colour chips: a deeper fill so the white text passes. */
#taskNavBadge { background-color: #E11D48; color: #fff; }
/* Red confirm buttons (Delete, Archive, Revoke): deeper red, always true white text. */
.bg-rose.text-white { background-color: #E11D48; color: #fff; }
.bg-rose.text-white:hover { background-color: #BE123C; }
#headerUserInitials { background-color: #4F46E5; color: #fff; }

/* ---------- Light theme ---------- */
.theme-light {
  --color-white:8 52 58;
  --slate-200:20 66 72;
  --slate-300:38 84 90;
  --slate-400:48 86 91;
  --slate-500:70 104 109;          /* muted text: ≥4.5:1 on white and the sidebar tint */
  --slate-600:78 112 117;
  --color-base:237 246 249;        /* Alice Blue */
  --color-panel:255 255 255;
  --color-panel2:245 250 251;
  --color-line:207 227 230;
  --color-sidebar:227 241 242;
  --color-navactive:#FFDDD2;       /* Almond Silk */
  --color-scrollbar:#B9D6D9;
  --highlight:0 109 119;           /* Stormy Teal: readable on white */
  --on-accent:4 25 28;
}

/* Status, role and avatar text on white: deeper shades of the same hues so they pass AA. */
.theme-light :is(.text-rose, .hover\:text-rose:hover) { color: #BE123C; }
.theme-light :is(.text-amber, .hover\:text-amber:hover) { color: #92400E; }
.theme-light :is(.text-emerald, .hover\:text-emerald:hover) { color: #065F46; }
.theme-light .text-indigo-400 { color: #4338CA; }
.theme-light .text-purple-400 { color: #7E22CE; }
.theme-light .text-blue-400 { color: #1D4ED8; }
.theme-light .text-pink-400 { color: #9D174D; }
.theme-light .text-orange-400 { color: #9A3412; }
.theme-light .text-teal-400 { color: #115E59; }

/* ---------- Shared ---------- */
/* Highlights: accent-coloured text and the active menu item. */
.text-electric, .hover\:text-electric:hover { color: rgb(var(--highlight)); }
.nav-item.active { color: rgb(4 25 28); }
.nav-item.active svg { color: rgb(4 25 28); }

/* Buttons are the brand accent (Tangerine by default) with dark text for contrast. */
.bg-electric.text-white, .bg-electric .text-white, .from-electric.text-white { color: rgb(var(--on-accent)); }
.to-purple-500 { --tw-gradient-to: #FFDDD2 var(--tw-gradient-to-position); }

/* Decorative glows in the palette instead of navy and purple. */
#auroraBlob2 { background-color: rgb(131 197 190 / .16); }
#auroraBlob3 { background-color: rgb(255 221 210 / .10); }
#modal-welcomeBack .bg-purple-500\/20 { background-color: rgb(131 197 190 / .18); }
.cursor-ripple { border-color: rgb(var(--brand-accent) / .85); }
.modal-backdrop { background: rgba(2, 16, 18, .72); }
.tick { background-image: repeating-linear-gradient(90deg, rgb(var(--color-line)) 0 1px, transparent 1px 24px); }

/* Utilities used by screens added beyond the prototype (its build didn't include them). */
.p-1\.5 { padding: .375rem; }
.space-y-1 > :not([hidden]) ~ :not([hidden]) { margin-top: .25rem; }
.w-48 { width: 12rem; }
.ml-1 { margin-left: .25rem; }
.mr-4 { margin-right: 1rem; }
.mr-auto { margin-right: auto; }
.border-amber-500\/40 { border-color: rgb(245 158 11 / .4); }
.border-rose-500\/60 { border-color: rgb(244 63 94 / .6); }
.mt-2\.5 { margin-top: .625rem; }
.disabled\:opacity-60:disabled { opacity: .6; cursor: default; }
.mx-3 { margin-left: .75rem; margin-right: .75rem; }
.z-40 { z-index: 40; }
.space-y-1 > :not([hidden]) ~ :not([hidden]) { margin-top: .25rem; }
.pl-3\.5 { padding-left: .875rem; }
.pr-1\.5 { padding-right: .375rem; }
.pr-2\.5 { padding-right: .625rem; }
.pl-0\.5 { padding-left: .125rem; }
.text-white\/70 { color: rgb(var(--color-white) / .7); }
/* Website QA pages */
.align-top { vertical-align: top; }
.aspect-video { aspect-ratio: 16 / 9; }
.bg-amber-500\/20 { background-color: rgb(245 158 11 / .2); }
.hover\:bg-amber-500\/30:hover { background-color: rgb(245 158 11 / .3); }
.hover\:bg-amber-400:hover { background-color: rgb(251 191 36); }
.bg-black\/70 { background-color: rgb(0 0 0 / .7); }
.text-black { color: #000; }
.bottom-0 { bottom: 0; }
.top-0 { top: 0; }
.sticky { position: sticky; }
.disabled\:opacity-50:disabled { opacity: .5; cursor: default; }
.focus\:opacity-100:focus { opacity: 1; }
.items-baseline { align-items: baseline; }
.last\:border-0:last-child { border-width: 0; }
.list-decimal { list-style-type: decimal; }
.max-h-48 { max-height: 12rem; }
.max-w-\[calc\(100vw-32px\)\] { max-width: calc(100vw - 32px); }
.ml-1\.5 { margin-left: .375rem; }
.object-cover { object-fit: cover; }
.pl-5 { padding-left: 1.25rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.space-y-5 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.25rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; }
.uppercase { text-transform: uppercase; }
.w-1\/3 { width: 33.333333%; }
.w-\[500px\] { width: 500px; }
.w-\[760px\] { width: 760px; }
.w-\[84px\] { width: 84px; }
.whitespace-pre-line { white-space: pre-line; }
@media (min-width: 640px) { .sm\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pl-4 { padding-left: 1rem; }
.pt-3\.5 { padding-top: .875rem; }
.z-20 { z-index: 20; }
/* Website QA bulk bar: floats at the bottom of the screen while items are selected. */
/* Over the content area only: the sidebar is 16rem (w-64) and the page has 24px padding (p-6). */
.qa-bulk-floating { position: fixed; z-index: 40; bottom: 16px; left: calc(16rem + 24px); right: 24px; }
/* QA bulk-select checkboxes: a block box at a fixed offset, centred on the item's status chip in every browser (not on the text baseline). */
.qa-check { display: block; margin: 0; flex-shrink: 0; width: 16px; height: 16px; }
.qa-check-cell { display: flex; flex-shrink: 0; padding-left: 1rem; padding-top: 16px; cursor: pointer; }

/* Sidebar brand: one block per theme (each picks the wordmark that reads on that theme's sidebar). */
:root.theme-light .sb-brand-dark, :root:not(.theme-light) .sb-brand-light { display: none !important; }
