/* theme.css — colour tokens for the admin console (index.html).
 *
 * Tailwind's palette is pointed at these variables (see tailwind.config in
 * index.html), so every utility class already used across index.html and the
 * HTML templates in js/app.js (bg-white, text-slate-800, bg-amber-50 …) picks
 * up the Staff Portal's colours and flips for dark mode without being
 * rewritten one by one.
 *
 * Light values: the member.html palette (accent #2f6ef5, ink #18243d, bg
 * #f6f8fc) plus Tailwind's own hues. Dark values: iOS-style neutrals for slate
 * and white. For each hue, 50–200 become faint tints of the dark surface,
 * 500–600 keep their colour (solid buttons, dots), and 700–950 turn light so
 * text that was dark-on-tint stays readable on the dark tint. */
:root {
  --c-primary: 47 110 245;
  --c-secondary: 80 95 118;
  --c-background: 246 248 252;
  --c-surface: 246 248 252;
  --c-surface-container-lowest: 255 255 255;
  --c-surface-container-low: 240 244 250;
  --c-surface-container: 233 238 245;
  --c-surface-container-high: 226 232 241;
  --c-surface-container-highest: 219 226 237;
  --c-on-surface: 24 36 61;
  --c-on-background: 24 36 61;
  --c-on-surface-variant: 60 79 110;
  --c-error: 186 26 26;
  --c-error-container: 255 218 214;
  --c-on-error-container: 147 0 10;
  --c-primary-fixed: 216 226 255;
  --c-primary-fixed-dim: 173 199 255;
  --c-on-primary-fixed: 0 26 65;
  --c-on-primary-fixed-variant: 0 68 147;
  --c-secondary-fixed: 211 228 254;
  --c-secondary-fixed-dim: 183 200 225;
  --c-on-secondary-fixed: 11 28 48;
  --c-on-secondary-fixed-variant: 56 72 93;
  --c-tertiary-fixed: 218 226 253;
  --c-tertiary-fixed-dim: 190 198 224;
  --c-on-tertiary-fixed: 19 27 46;
  --c-on-tertiary-fixed-variant: 63 70 92;
  --c-outline: 121 137 166;
  --c-outline-variant: 205 216 238;
  --c-inverse-surface: 45 49 51;
  --c-inverse-on-surface: 239 241 243;
  --c-on-primary: 255 255 255;
  --c-primary-container: 47 110 245;
  --c-on-primary-container: 255 255 255;
  --c-secondary-container: 232 239 255;
  --c-on-secondary-container: 47 110 245;
  --c-white: 255 255 255;
  --c-slate-50: 248 250 252;
  --c-slate-100: 241 245 249;
  --c-slate-200: 226 232 240;
  --c-slate-300: 203 213 225;
  --c-slate-400: 148 163 184;
  --c-slate-500: 100 116 139;
  --c-slate-600: 71 85 105;
  --c-slate-700: 51 65 85;
  --c-slate-800: 30 41 59;
  --c-slate-900: 15 23 42;
  --c-slate-950: 2 6 23;
  --c-red-50: 254 242 242;
  --c-red-100: 254 226 226;
  --c-red-200: 254 202 202;
  --c-red-300: 252 165 165;
  --c-red-400: 248 113 113;
  --c-red-500: 239 68 68;
  --c-red-600: 220 38 38;
  --c-red-700: 185 28 28;
  --c-red-800: 153 27 27;
  --c-red-900: 127 29 29;
  --c-red-950: 69 10 10;
  --c-amber-50: 255 251 235;
  --c-amber-100: 254 243 199;
  --c-amber-200: 253 230 138;
  --c-amber-300: 252 211 77;
  --c-amber-400: 251 191 36;
  --c-amber-500: 245 158 11;
  --c-amber-600: 217 119 6;
  --c-amber-700: 180 83 9;
  --c-amber-800: 146 64 14;
  --c-amber-900: 120 53 15;
  --c-amber-950: 69 26 3;
  --c-emerald-50: 236 253 245;
  --c-emerald-100: 209 250 229;
  --c-emerald-200: 167 243 208;
  --c-emerald-300: 110 231 183;
  --c-emerald-400: 52 211 153;
  --c-emerald-500: 16 185 129;
  --c-emerald-600: 5 150 105;
  --c-emerald-700: 4 120 87;
  --c-emerald-800: 6 95 70;
  --c-emerald-900: 6 78 59;
  --c-emerald-950: 2 44 34;
  --c-green-50: 240 253 244;
  --c-green-100: 220 252 231;
  --c-green-200: 187 247 208;
  --c-green-300: 134 239 172;
  --c-green-400: 74 222 128;
  --c-green-500: 34 197 94;
  --c-green-600: 22 163 74;
  --c-green-700: 21 128 61;
  --c-green-800: 22 101 52;
  --c-green-900: 20 83 45;
  --c-green-950: 5 46 22;
  --c-blue-50: 239 246 255;
  --c-blue-100: 219 234 254;
  --c-blue-200: 191 219 254;
  --c-blue-300: 147 197 253;
  --c-blue-400: 96 165 250;
  --c-blue-500: 59 130 246;
  --c-blue-600: 37 99 235;
  --c-blue-700: 29 78 216;
  --c-blue-800: 30 64 175;
  --c-blue-900: 30 58 138;
  --c-blue-950: 23 37 84;
  --c-sky-50: 240 249 255;
  --c-sky-100: 224 242 254;
  --c-sky-200: 186 230 253;
  --c-sky-300: 125 211 252;
  --c-sky-400: 56 189 248;
  --c-sky-500: 14 165 233;
  --c-sky-600: 2 132 199;
  --c-sky-700: 3 105 161;
  --c-sky-800: 7 89 133;
  --c-sky-900: 12 74 110;
  --c-sky-950: 8 47 73;
  --c-indigo-50: 238 242 255;
  --c-indigo-100: 224 231 255;
  --c-indigo-200: 199 210 254;
  --c-indigo-300: 165 180 252;
  --c-indigo-400: 129 140 248;
  --c-indigo-500: 99 102 241;
  --c-indigo-600: 79 70 229;
  --c-indigo-700: 67 56 202;
  --c-indigo-800: 55 48 163;
  --c-indigo-900: 49 46 129;
  --c-indigo-950: 30 27 75;
  --c-orange-50: 255 247 237;
  --c-orange-100: 255 237 213;
  --c-orange-200: 254 215 170;
  --c-orange-300: 253 186 116;
  --c-orange-400: 251 146 60;
  --c-orange-500: 249 115 22;
  --c-orange-600: 234 88 12;
  --c-orange-700: 194 65 12;
  --c-orange-800: 154 52 18;
  --c-orange-900: 124 45 18;
  --c-orange-950: 67 20 7;
  --c-teal-50: 240 253 250;
  --c-teal-100: 204 251 241;
  --c-teal-200: 153 246 228;
  --c-teal-300: 94 234 212;
  --c-teal-400: 45 212 191;
  --c-teal-500: 20 184 166;
  --c-teal-600: 13 148 136;
  --c-teal-700: 15 118 110;
  --c-teal-800: 17 94 89;
  --c-teal-900: 19 78 74;
  --c-teal-950: 4 47 46;
  --c-purple-50: 250 245 255;
  --c-purple-100: 243 232 255;
  --c-purple-200: 233 213 255;
  --c-purple-300: 216 180 254;
  --c-purple-400: 192 132 252;
  --c-purple-500: 168 85 247;
  --c-purple-600: 147 51 234;
  --c-purple-700: 126 34 206;
  --c-purple-800: 107 33 168;
  --c-purple-900: 88 28 135;
  --c-purple-950: 59 7 100;
  --c-rose-50: 255 241 242;
  --c-rose-100: 255 228 230;
  --c-rose-200: 254 205 211;
  --c-rose-300: 253 164 175;
  --c-rose-400: 251 113 133;
  --c-rose-500: 244 63 94;
  --c-rose-600: 225 29 72;
  --c-rose-700: 190 18 60;
  --c-rose-800: 159 18 57;
  --c-rose-900: 136 19 55;
  --c-rose-950: 76 5 25;
  color-scheme: light;
}
:root.dark {
  --c-primary: 76 141 255;
  --c-secondary: 152 152 157;
  --c-background: 11 11 12;
  --c-surface: 11 11 12;
  --c-surface-container-lowest: 28 28 30;
  --c-surface-container-low: 36 36 38;
  --c-surface-container: 44 44 46;
  --c-surface-container-high: 52 52 55;
  --c-surface-container-highest: 60 60 63;
  --c-on-surface: 245 245 247;
  --c-on-background: 245 245 247;
  --c-on-surface-variant: 199 199 204;
  --c-error: 255 105 97;
  --c-error-container: 70 22 20;
  --c-on-error-container: 255 180 171;
  --c-primary-fixed: 30 46 84;
  --c-primary-fixed-dim: 52 78 135;
  --c-on-primary-fixed: 216 226 255;
  --c-on-primary-fixed-variant: 173 199 255;
  --c-secondary-fixed: 36 46 64;
  --c-secondary-fixed-dim: 62 74 94;
  --c-on-secondary-fixed: 211 228 254;
  --c-on-secondary-fixed-variant: 183 200 225;
  --c-tertiary-fixed: 36 41 62;
  --c-tertiary-fixed-dim: 62 68 92;
  --c-on-tertiary-fixed: 218 226 253;
  --c-on-tertiary-fixed-variant: 190 198 224;
  --c-outline: 142 142 147;
  --c-outline-variant: 58 58 60;
  --c-inverse-surface: 229 229 234;
  --c-inverse-on-surface: 28 28 30;
  --c-on-primary: 255 255 255;
  --c-primary-container: 76 141 255;
  --c-on-primary-container: 255 255 255;
  --c-secondary-container: 30 44 74;
  --c-on-secondary-container: 120 170 255;
  --c-white: 28 28 30;
  --c-slate-50: 35 35 38;
  --c-slate-100: 44 44 46;
  --c-slate-200: 58 58 60;
  --c-slate-300: 72 72 74;
  --c-slate-400: 124 124 128;
  --c-slate-500: 152 152 157;
  --c-slate-600: 174 174 178;
  --c-slate-700: 199 199 204;
  --c-slate-800: 229 229 234;
  --c-slate-900: 242 242 247;
  --c-slate-950: 255 255 255;
  --c-red-50: 58 28 30;
  --c-red-100: 78 28 29;
  --c-red-200: 106 28 29;
  --c-red-300: 185 28 28;
  --c-red-400: 248 113 113;
  --c-red-500: 239 68 68;
  --c-red-600: 239 68 68;
  --c-red-700: 248 113 113;
  --c-red-800: 252 165 165;
  --c-red-900: 254 202 202;
  --c-red-950: 254 226 226;
  --c-amber-50: 56 36 26;
  --c-amber-100: 75 42 24;
  --c-amber-200: 104 56 20;
  --c-amber-300: 180 83 9;
  --c-amber-400: 251 191 36;
  --c-amber-500: 245 158 11;
  --c-amber-600: 245 158 11;
  --c-amber-700: 251 191 36;
  --c-amber-800: 252 211 77;
  --c-amber-900: 253 230 138;
  --c-amber-950: 254 243 199;
  --c-emerald-50: 21 43 39;
  --c-emerald-100: 19 55 46;
  --c-emerald-200: 16 74 58;
  --c-emerald-300: 4 120 87;
  --c-emerald-400: 52 211 153;
  --c-emerald-500: 16 185 129;
  --c-emerald-600: 16 185 129;
  --c-emerald-700: 52 211 153;
  --c-emerald-800: 110 231 183;
  --c-emerald-900: 167 243 208;
  --c-emerald-950: 209 250 229;
  --c-green-50: 26 44 34;
  --c-green-100: 26 57 39;
  --c-green-200: 24 78 46;
  --c-green-300: 21 128 61;
  --c-green-400: 74 222 128;
  --c-green-500: 34 197 94;
  --c-green-600: 34 197 94;
  --c-green-700: 74 222 128;
  --c-green-800: 134 239 172;
  --c-green-900: 187 247 208;
  --c-green-950: 220 252 231;
  --c-blue-50: 29 37 62;
  --c-blue-100: 29 42 88;
  --c-blue-200: 28 53 123;
  --c-blue-300: 29 78 216;
  --c-blue-400: 96 165 250;
  --c-blue-500: 59 130 246;
  --c-blue-600: 59 130 246;
  --c-blue-700: 96 165 250;
  --c-blue-800: 147 197 253;
  --c-blue-900: 191 219 254;
  --c-blue-950: 219 234 254;
  --c-sky-50: 23 42 54;
  --c-sky-100: 20 52 71;
  --c-sky-200: 16 66 96;
  --c-sky-300: 3 105 161;
  --c-sky-400: 56 189 248;
  --c-sky-500: 14 165 233;
  --c-sky-600: 14 165 233;
  --c-sky-700: 56 189 248;
  --c-sky-800: 125 211 252;
  --c-sky-900: 186 230 253;
  --c-sky-950: 224 242 254;
  --c-indigo-50: 34 33 60;
  --c-indigo-100: 39 36 83;
  --c-indigo-200: 48 42 116;
  --c-indigo-300: 67 56 202;
  --c-indigo-400: 129 140 248;
  --c-indigo-500: 99 102 241;
  --c-indigo-600: 99 102 241;
  --c-indigo-700: 129 140 248;
  --c-indigo-800: 165 180 252;
  --c-indigo-900: 199 210 254;
  --c-indigo-950: 224 231 255;
  --c-orange-50: 57 33 26;
  --c-orange-100: 78 38 25;
  --c-orange-200: 111 46 21;
  --c-orange-300: 194 65 12;
  --c-orange-400: 251 146 60;
  --c-orange-500: 249 115 22;
  --c-orange-600: 249 115 22;
  --c-orange-700: 251 146 60;
  --c-orange-800: 253 186 116;
  --c-orange-900: 254 215 170;
  --c-orange-950: 255 237 213;
  --c-teal-50: 25 43 43;
  --c-teal-100: 24 54 54;
  --c-teal-200: 22 73 70;
  --c-teal-300: 15 118 110;
  --c-teal-400: 45 212 191;
  --c-teal-500: 20 184 166;
  --c-teal-600: 20 184 166;
  --c-teal-700: 45 212 191;
  --c-teal-800: 94 234 212;
  --c-teal-900: 153 246 228;
  --c-teal-950: 204 251 241;
  --c-purple-50: 46 28 62;
  --c-purple-100: 60 30 85;
  --c-purple-200: 77 31 118;
  --c-purple-300: 126 34 206;
  --c-purple-400: 192 132 252;
  --c-purple-500: 168 85 247;
  --c-purple-600: 168 85 247;
  --c-purple-700: 192 132 252;
  --c-purple-800: 216 180 254;
  --c-purple-900: 233 213 255;
  --c-purple-950: 243 232 255;
  --c-rose-50: 60 25 38;
  --c-rose-100: 80 24 41;
  --c-rose-200: 109 23 45;
  --c-rose-300: 190 18 60;
  --c-rose-400: 251 113 133;
  --c-rose-500: 244 63 94;
  --c-rose-600: 244 63 94;
  --c-rose-700: 251 113 133;
  --c-rose-800: 253 164 175;
  --c-rose-900: 254 205 211;
  --c-rose-950: 255 228 230;
  color-scheme: dark;
}

/* Printed documents (requisition PDF preview and the off-screen render that
   html2canvas captures) always use the light palette, whatever the UI theme. */
.dark .pdf-page, .dark #pdf-temp-container, .dark #pdf-view-scroll-container, .dark .print-area {

  --c-primary: 47 110 245;
  --c-secondary: 80 95 118;
  --c-background: 246 248 252;
  --c-surface: 246 248 252;
  --c-surface-container-lowest: 255 255 255;
  --c-surface-container-low: 240 244 250;
  --c-surface-container: 233 238 245;
  --c-surface-container-high: 226 232 241;
  --c-surface-container-highest: 219 226 237;
  --c-on-surface: 24 36 61;
  --c-on-background: 24 36 61;
  --c-on-surface-variant: 60 79 110;
  --c-error: 186 26 26;
  --c-error-container: 255 218 214;
  --c-on-error-container: 147 0 10;
  --c-primary-fixed: 216 226 255;
  --c-primary-fixed-dim: 173 199 255;
  --c-on-primary-fixed: 0 26 65;
  --c-on-primary-fixed-variant: 0 68 147;
  --c-secondary-fixed: 211 228 254;
  --c-secondary-fixed-dim: 183 200 225;
  --c-on-secondary-fixed: 11 28 48;
  --c-on-secondary-fixed-variant: 56 72 93;
  --c-tertiary-fixed: 218 226 253;
  --c-tertiary-fixed-dim: 190 198 224;
  --c-on-tertiary-fixed: 19 27 46;
  --c-on-tertiary-fixed-variant: 63 70 92;
  --c-outline: 121 137 166;
  --c-outline-variant: 205 216 238;
  --c-inverse-surface: 45 49 51;
  --c-inverse-on-surface: 239 241 243;
  --c-on-primary: 255 255 255;
  --c-primary-container: 47 110 245;
  --c-on-primary-container: 255 255 255;
  --c-secondary-container: 232 239 255;
  --c-on-secondary-container: 47 110 245;
  --c-white: 255 255 255;
  --c-slate-50: 248 250 252;
  --c-slate-100: 241 245 249;
  --c-slate-200: 226 232 240;
  --c-slate-300: 203 213 225;
  --c-slate-400: 148 163 184;
  --c-slate-500: 100 116 139;
  --c-slate-600: 71 85 105;
  --c-slate-700: 51 65 85;
  --c-slate-800: 30 41 59;
  --c-slate-900: 15 23 42;
  --c-slate-950: 2 6 23;
  --c-red-50: 254 242 242;
  --c-red-100: 254 226 226;
  --c-red-200: 254 202 202;
  --c-red-300: 252 165 165;
  --c-red-400: 248 113 113;
  --c-red-500: 239 68 68;
  --c-red-600: 220 38 38;
  --c-red-700: 185 28 28;
  --c-red-800: 153 27 27;
  --c-red-900: 127 29 29;
  --c-red-950: 69 10 10;
  --c-amber-50: 255 251 235;
  --c-amber-100: 254 243 199;
  --c-amber-200: 253 230 138;
  --c-amber-300: 252 211 77;
  --c-amber-400: 251 191 36;
  --c-amber-500: 245 158 11;
  --c-amber-600: 217 119 6;
  --c-amber-700: 180 83 9;
  --c-amber-800: 146 64 14;
  --c-amber-900: 120 53 15;
  --c-amber-950: 69 26 3;
  --c-emerald-50: 236 253 245;
  --c-emerald-100: 209 250 229;
  --c-emerald-200: 167 243 208;
  --c-emerald-300: 110 231 183;
  --c-emerald-400: 52 211 153;
  --c-emerald-500: 16 185 129;
  --c-emerald-600: 5 150 105;
  --c-emerald-700: 4 120 87;
  --c-emerald-800: 6 95 70;
  --c-emerald-900: 6 78 59;
  --c-emerald-950: 2 44 34;
  --c-green-50: 240 253 244;
  --c-green-100: 220 252 231;
  --c-green-200: 187 247 208;
  --c-green-300: 134 239 172;
  --c-green-400: 74 222 128;
  --c-green-500: 34 197 94;
  --c-green-600: 22 163 74;
  --c-green-700: 21 128 61;
  --c-green-800: 22 101 52;
  --c-green-900: 20 83 45;
  --c-green-950: 5 46 22;
  --c-blue-50: 239 246 255;
  --c-blue-100: 219 234 254;
  --c-blue-200: 191 219 254;
  --c-blue-300: 147 197 253;
  --c-blue-400: 96 165 250;
  --c-blue-500: 59 130 246;
  --c-blue-600: 37 99 235;
  --c-blue-700: 29 78 216;
  --c-blue-800: 30 64 175;
  --c-blue-900: 30 58 138;
  --c-blue-950: 23 37 84;
  --c-sky-50: 240 249 255;
  --c-sky-100: 224 242 254;
  --c-sky-200: 186 230 253;
  --c-sky-300: 125 211 252;
  --c-sky-400: 56 189 248;
  --c-sky-500: 14 165 233;
  --c-sky-600: 2 132 199;
  --c-sky-700: 3 105 161;
  --c-sky-800: 7 89 133;
  --c-sky-900: 12 74 110;
  --c-sky-950: 8 47 73;
  --c-indigo-50: 238 242 255;
  --c-indigo-100: 224 231 255;
  --c-indigo-200: 199 210 254;
  --c-indigo-300: 165 180 252;
  --c-indigo-400: 129 140 248;
  --c-indigo-500: 99 102 241;
  --c-indigo-600: 79 70 229;
  --c-indigo-700: 67 56 202;
  --c-indigo-800: 55 48 163;
  --c-indigo-900: 49 46 129;
  --c-indigo-950: 30 27 75;
  --c-orange-50: 255 247 237;
  --c-orange-100: 255 237 213;
  --c-orange-200: 254 215 170;
  --c-orange-300: 253 186 116;
  --c-orange-400: 251 146 60;
  --c-orange-500: 249 115 22;
  --c-orange-600: 234 88 12;
  --c-orange-700: 194 65 12;
  --c-orange-800: 154 52 18;
  --c-orange-900: 124 45 18;
  --c-orange-950: 67 20 7;
  --c-teal-50: 240 253 250;
  --c-teal-100: 204 251 241;
  --c-teal-200: 153 246 228;
  --c-teal-300: 94 234 212;
  --c-teal-400: 45 212 191;
  --c-teal-500: 20 184 166;
  --c-teal-600: 13 148 136;
  --c-teal-700: 15 118 110;
  --c-teal-800: 17 94 89;
  --c-teal-900: 19 78 74;
  --c-teal-950: 4 47 46;
  --c-purple-50: 250 245 255;
  --c-purple-100: 243 232 255;
  --c-purple-200: 233 213 255;
  --c-purple-300: 216 180 254;
  --c-purple-400: 192 132 252;
  --c-purple-500: 168 85 247;
  --c-purple-600: 147 51 234;
  --c-purple-700: 126 34 206;
  --c-purple-800: 107 33 168;
  --c-purple-900: 88 28 135;
  --c-purple-950: 59 7 100;
  --c-rose-50: 255 241 242;
  --c-rose-100: 255 228 230;
  --c-rose-200: 254 205 211;
  --c-rose-300: 253 164 175;
  --c-rose-400: 251 113 133;
  --c-rose-500: 244 63 94;
  --c-rose-600: 225 29 72;
  --c-rose-700: 190 18 60;
  --c-rose-800: 159 18 57;
  --c-rose-900: 136 19 55;
  --c-rose-950: 76 5 25;
  color-scheme: light;
}

/* Text on filled buttons stays white even though "white" means the card
   surface in dark mode. */
.dark .text-white, .dark .hover\:text-white:hover, .dark .group:hover .group-hover\:text-white { color: #fff !important; }
/* Modal backdrops (bg-slate-900/xx) must stay dark, not invert to light. */
.dark [class*="bg-slate-900\/"], .dark .bg-slate-900, .dark .bg-slate-800 { background-color: rgba(0, 0, 0, 0.55) !important; }
.dark .bg-slate-700 { background-color: #3a3a3c !important; }

/* Readability: the console used a lot of 9–10px text. Nothing below 11px. */
html .text-\[8px\], html .text-\[9px\] { font-size: 11px !important; }
html .text-\[10px\] { font-size: 11.5px !important; }
html .text-\[11px\] { font-size: 12px !important; }

/* The wordmark is dark navy; on the dark theme it becomes white. */
.dark .brand-logo, .dark #header-logo-mobile, .dark #dashboard-logo-mobile, .dark #auth-gate .auth-card__logo { filter: brightness(0) invert(1); }
