:root,
:root[data-theme="classic"] {
  color-scheme: light;
  --theme-background: #f8f9fa;
  --theme-surface: #fefefe;
  --theme-surface-raised: #ffffff;
  --theme-surface-subtle: #f1f3f5;
  --theme-foreground: #212529;
  --theme-muted: #6c757d;
  --theme-border: #dee2e6;
  --theme-primary: #195a2c;
  --theme-primary-foreground: #ffffff;
  --theme-sidebar: #096830;
  --theme-sidebar-foreground: #ffffff;
  --theme-sidebar-muted: rgba(255, 255, 255, 0.8);
  --theme-sidebar-border: rgba(255, 255, 255, 0.16);
  --theme-sidebar-hover: rgba(0, 0, 0, 0.18);
  --theme-sidebar-active: rgba(0, 0, 0, 0.18);
  --theme-btn-primary-bg: rgb(25 90 44);
  --theme-btn-primary-hover-bg: rgb(19 74 34);
  --theme-btn-primary-fg: #ffffff;
  --theme-btn-secondary-bg: rgb(75 85 99);
  --theme-btn-secondary-hover-bg: rgb(55 65 81);
  --theme-btn-secondary-fg: #ffffff;
  --theme-btn-success-bg: rgb(34 197 94);
  --theme-btn-success-hover-bg: rgb(22 163 74);
  --theme-btn-success-fg: #ffffff;
  --theme-btn-danger-bg: rgb(239 68 68);
  --theme-btn-danger-hover-bg: rgb(220 38 38);
  --theme-btn-danger-fg: #ffffff;
  --theme-success-surface: #e7f7ed;
  --theme-success-foreground: #087443;
  --theme-danger-surface: #fff0f0;
  --theme-danger-foreground: #c92a2a;
  --theme-warning-surface: #fff8db;
  --theme-warning-foreground: #b26a00;
  --theme-btn-outline-border: rgb(209, 213, 219);
  --theme-btn-outline-color: rgb(55, 65, 81);
  --theme-btn-outline-hover-bg: rgb(249, 250, 251);
  --theme-btn-ghost-color: rgb(107, 114, 128);
  --theme-btn-ghost-hover-bg: rgb(249, 250, 251);
  --theme-btn-ghost-hover-color: rgb(17, 24, 39);
}

:root[data-theme="light"] {
  color-scheme: light;
  --theme-background: #f8f9fa;
  --theme-surface: #ffffff;
  --theme-surface-raised: #ffffff;
  --theme-surface-subtle: #f1f3f5;
  --theme-foreground: #343a40;
  --theme-muted: #6c757d;
  --theme-border: #dee2e6;
  --theme-primary: #096830;
  --theme-primary-foreground: #ffffff;
  --theme-sidebar: #fefefe;
  --theme-sidebar-foreground: var(--theme-foreground);
  --theme-sidebar-muted: var(--theme-muted);
  --theme-sidebar-border: var(--theme-border);
  --theme-sidebar-hover: color-mix(in srgb, var(--theme-primary) 12%, transparent);
  --theme-sidebar-active: color-mix(in srgb, var(--theme-primary) 18%, transparent);
  --theme-btn-primary-bg: var(--theme-primary);
  --theme-btn-primary-hover-bg: #075c27;
  --theme-btn-primary-fg: #ffffff;
  --theme-btn-secondary-bg: #495057;
  --theme-btn-secondary-hover-bg: #343a40;
  --theme-btn-secondary-fg: #ffffff;
  --theme-btn-success-bg: #198754;
  --theme-btn-success-hover-bg: #157347;
  --theme-btn-success-fg: #ffffff;
  --theme-btn-danger-bg: #dc3545;
  --theme-btn-danger-hover-bg: #bb2d3b;
  --theme-btn-danger-fg: #ffffff;
  --theme-success-surface: #e7f7ed;
  --theme-success-foreground: #087443;
  --theme-danger-surface: #fff0f0;
  --theme-danger-foreground: #c92a2a;
  --theme-warning-surface: #fff8db;
  --theme-warning-foreground: #b26a00;

  --c-white-bg: 255 255 255;
  --c-gray-50: 248 249 250;
  --c-gray-100: 241 243 245;
  --c-gray-200: 233 236 239;
  --c-gray-300: 222 226 230;
  --c-gray-400: 206 212 218;
  --c-gray-500: 108 117 125;
  --c-gray-600: 73 80 87;
  --c-gray-700: 52 58 64;
  --c-gray-800: 33 37 41;
  --c-gray-900: 26 30 33;
  --c-gray-950: 15 17 18;
  --c-bg-gray-500: 108 117 125;
  --c-bg-gray-600: 73 80 87;
  --c-bg-gray-700: 52 58 64;
  --c-bg-gray-800: 33 37 41;
  --c-bg-gray-900: 26 30 33;

  --c-secondary-50: 255 255 255;
  --c-secondary-500: 248 249 250;
  --c-secondary-600: 233 236 239;
  --c-secondary-700: 222 226 230;

  --c-primary-50: 240 249 240;
  --c-primary-500: 9 104 48;
  --c-primary-600: 9 104 48;
  --c-primary-700: 9 104 48;
  --c-bg-primary-50: 240 249 240;
  --c-bg-primary-50: 240 249 240;
  --c-bg-primary-500: 9 104 48;
  --c-bg-primary-600: 9 104 48;
  --c-bg-primary-700: 9 104 48;
  --c-green-50: 240 253 244;
  --c-green-100: 220 252 231;
  --c-green-200: 185 248 207;
  --c-green-300: 123 241 168;
  --c-green-400: 5 223 114;
  --c-green-500: 0 201 80;
  --c-green-600: 0 166 62;
  --c-green-700: 0 130 54;
  --c-green-800: 9 104 48;
  --c-green-900: 13 84 43;
  --c-green-950: 3 46 21;
  --c-bg-green-50: 240 253 244;
  --c-bg-green-100: 220 252 231;
  --c-bg-green-700: 0 130 54;
  --c-bg-green-500: 0 201 80;
  --c-bg-green-600: 0 166 62;
  --c-bg-green-700: 0 130 54;
  --c-bg-green-800: 9 104 48;
  --c-bg-green-900: 13 84 43;
  --c-red-100: 254 226 226;
  --c-red-200: 254 202 202;
  --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-bg-red-50: 254 242 242;
  --c-bg-red-100: 254 226 226;
  --c-bg-red-600: 220 38 38;
  --c-bg-red-700: 185 28 28;
  --c-bg-red-500: 239 68 68;
  --c-bg-red-600: 220 38 38;
  --c-bg-red-700: 185 28 28;
  --c-bg-red-800: 153 27 27;
  --c-amber-100: 254 243 199;
  --c-amber-200: 253 230 138;
  --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-bg-amber-50: 255 251 235;
  --c-bg-amber-100: 254 243 199;
  --c-bg-amber-600: 217 119 6;
  --c-bg-amber-700: 180 83 9;
  --c-bg-amber-500: 245 158 11;
  --c-bg-amber-600: 217 119 6;
  --c-bg-amber-700: 180 83 9;
  --c-blue-100: 219 234 254;
  --c-blue-200: 191 219 254;
  --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-bg-blue-50: 239 246 255;
  --c-bg-blue-100: 219 234 254;
  --c-bg-blue-600: 37 99 235;
  --c-bg-blue-700: 29 78 216;
  --c-bg-blue-500: 59 130 246;
  --c-bg-blue-600: 37 99 235;
  --c-bg-blue-700: 29 78 216;
  --c-bg-blue-800: 30 64 175;
  --c-emerald-100: 209 250 229;
  --c-emerald-200: 167 243 208;
  --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-bg-emerald-50: 236 253 245;
  --c-bg-emerald-100: 209 250 229;
  --c-bg-emerald-700: 4 120 87;
  --c-bg-emerald-800: 6 95 70;
  --c-bg-emerald-500: 16 185 129;
  --c-bg-emerald-600: 5 150 105;
  --c-bg-emerald-700: 4 120 87;
  --c-bg-emerald-800: 6 95 70;
  --c-bg-emerald-900: 6 78 59;
  --theme-btn-outline-border: #dee2e6;
  --theme-btn-outline-color: #343a40;
  --theme-btn-outline-hover-bg: #f1f3f5;
  --theme-btn-ghost-color: #6c757d;
  --theme-btn-ghost-hover-bg: #f1f3f5;
  --theme-btn-ghost-hover-color: #212529;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --theme-background: #050a0e;
  --theme-surface: #0e1a1f;
  --theme-surface-raised: #132226;
  --theme-surface-subtle: #0a1418;
  --theme-foreground: #d4e8de;
  --theme-muted: #9bb5b0;
  --theme-border: #1a3a3e;
  --theme-primary: #096830;
  --theme-primary-foreground: #ffffff;
  --theme-sidebar: #050a0e;
  --theme-sidebar-foreground: #ffffff;
  --theme-sidebar-muted: rgba(212, 232, 222, 0.8);
  --theme-sidebar-border: var(--theme-border);
  --theme-sidebar-hover: rgba(255, 255, 255, 0.08);
  --theme-sidebar-active: rgba(255, 255, 255, 0.14);
  --theme-btn-primary-bg: var(--theme-primary);
  --theme-btn-primary-hover-bg: #008236;
  --theme-btn-primary-fg: #ffffff;
  --theme-btn-secondary-bg: #2d3748;
  --theme-btn-secondary-hover-bg: #4a5568;
  --theme-btn-secondary-fg: #ffffff;
  --theme-btn-success-bg: #047857;
  --theme-btn-success-hover-bg: #065f46;
  --theme-btn-success-fg: #ffffff;
  --theme-btn-danger-bg: #b91c1c;
  --theme-btn-danger-hover-bg: #991b1b;
  --theme-btn-danger-fg: #ffffff;
  --theme-success-surface: #123427;
  --theme-success-foreground: #a7e6c2;
  --theme-danger-surface: #3b1f25;
  --theme-danger-foreground: #ffc1c7;
  --theme-warning-surface: #3a2f14;
  --theme-warning-foreground: #ffe19a;

  --c-white-bg: 14 26 31;
  --c-gray-50: 10 20 24;
  --c-gray-100: 14 26 31;
  --c-gray-200: 26 58 62;
  --c-gray-300: 34 72 77;
  --c-gray-400: 106 142 136;
  --c-gray-500: 155 181 176;
  --c-gray-600: 176 199 195;
  --c-gray-700: 212 232 222;
  --c-gray-800: 224 240 232;
  --c-gray-900: 234 245 240;
  --c-gray-950: 255 255 255;
  --c-bg-gray-500: 100 116 139;
  --c-bg-gray-600: 71 85 105;
  --c-bg-gray-700: 51 65 85;
  --c-bg-gray-800: 30 41 59;
  --c-bg-gray-900: 15 23 42;

  --c-secondary-50: 14 26 31;
  --c-secondary-500: 10 20 24;
  --c-secondary-600: 26 58 62;
  --c-secondary-700: 34 72 77;

  --c-primary-50: 18 52 39;
  --c-primary-500: 63 165 126;
  --c-primary-600: 45 138 102;
  --c-primary-700: 167 230 194;
  --c-bg-primary-50: 18 52 39;
  --c-bg-primary-500: 25 90 44;
  --c-bg-primary-600: 19 74 34;
  --c-bg-primary-700: 14 58 26;

  --c-green-50: 18 52 39;
  --c-green-100: 22 64 48;
  --c-green-200: 26 78 57;
  --c-green-300: 34 102 74;
  --c-green-400: 45 138 102;
  --c-green-500: 63 165 126;
  --c-green-600: 45 138 102;
  --c-green-700: 167 230 194;
  --c-green-800: 167 230 194;
  --c-green-900: 198 242 217;
  --c-green-950: 232 250 240;
  --c-bg-green-50: 18 52 39;
  --c-bg-green-100: 22 64 48;
  --c-bg-green-500: 0 130 54;
  --c-bg-green-600: 0 130 54;
  --c-bg-green-700: 9 104 48;
  --c-bg-green-800: 9 104 48;
  --c-bg-green-900: 13 84 43;

  --c-red-50: 59 31 37;
  --c-red-100: 74 38 46;
  --c-red-200: 92 46 56;
  --c-red-500: 239 68 68;
  --c-red-600: 220 38 38;
  --c-red-700: 255 193 199;
  --c-red-800: 255 193 199;
  --c-bg-red-50: 59 31 37;
  --c-bg-red-100: 74 38 46;
  --c-bg-red-500: 220 38 38;
  --c-bg-red-600: 220 38 38;
  --c-bg-red-700: 185 28 28;
  --c-bg-red-800: 153 27 27;

  --c-amber-50: 58 47 20;
  --c-amber-100: 72 58 24;
  --c-amber-200: 89 71 29;
  --c-amber-500: 251 191 36;
  --c-amber-600: 245 158 11;
  --c-amber-700: 255 225 154;
  --c-amber-800: 255 225 154;
  --c-bg-amber-50: 58 47 20;
  --c-bg-amber-100: 72 58 24;
  --c-bg-amber-500: 180 83 9;
  --c-bg-amber-600: 180 83 9;
  --c-bg-amber-700: 146 64 14;

  --c-blue-50: 20 40 59;
  --c-blue-100: 27 53 79;
  --c-blue-200: 36 71 106;
  --c-blue-500: 96 165 250;
  --c-blue-600: 147 197 253;
  --c-blue-700: 147 197 253;
  --c-blue-800: 191 219 254;
  --c-bg-blue-50: 20 40 59;
  --c-bg-blue-100: 27 53 79;
  --c-bg-blue-500: 37 99 235;
  --c-bg-blue-600: 37 99 235;
  --c-bg-blue-700: 29 78 216;
  --c-bg-blue-800: 30 64 175;

  --c-emerald-50: 18 52 39;
  --c-emerald-100: 22 64 48;
  --c-emerald-200: 26 78 57;
  --c-emerald-500: 52 211 153;
  --c-emerald-600: 16 185 129;
  --c-emerald-700: 167 230 194;
  --c-emerald-800: 167 230 194;
  --c-bg-emerald-50: 18 52 39;
  --c-bg-emerald-100: 22 64 48;
  --c-bg-emerald-500: 4 120 87;
  --c-bg-emerald-600: 4 120 87;
  --c-bg-emerald-700: 4 120 87;
  --c-bg-emerald-800: 6 95 70;
  --c-bg-emerald-900: 6 78 59;

  --c-slate-50: 10 20 24;
  --c-slate-100: 14 26 31;
  --c-slate-200: 26 58 62;
  --c-slate-300: 34 72 77;
  --c-slate-400: 99 133 128;
  --c-slate-500: 155 181 176;
  --c-slate-600: 176 199 195;
  --c-slate-700: 212 232 222;
  --c-slate-800: 224 240 232;
  --c-slate-900: 234 245 240;
  --c-slate-950: 255 255 255;
  --c-bg-slate-50: 10 20 24;
  --c-bg-slate-100: 14 26 31;
  --c-bg-slate-200: 26 58 62;
  --c-bg-slate-500: 100 116 139;
  --c-bg-slate-600: 71 85 105;
  --c-bg-slate-700: 51 65 85;
  --c-bg-slate-800: 30 41 59;
  --c-bg-slate-900: 15 23 42;

  --c-yellow-50: 58 47 20;
  --c-yellow-100: 72 58 24;
  --c-yellow-200: 89 71 29;
  --c-yellow-700: 255 225 154;
  --c-yellow-800: 255 225 154;
  --c-bg-yellow-50: 58 47 20;
  --c-bg-yellow-100: 72 58 24;
  --c-bg-yellow-500: 180 83 9;
  --c-bg-yellow-600: 180 83 9;

  --c-indigo-50: 28 32 54;
  --c-indigo-100: 38 43 74;
  --c-indigo-200: 52 59 98;
  --c-indigo-500: 129 140 248;
  --c-indigo-600: 99 102 241;
  --c-indigo-700: 199 210 254;
  --c-indigo-800: 199 210 254;
  --c-indigo-900: 224 231 255;
  --c-bg-indigo-50: 28 32 54;
  --c-bg-indigo-100: 38 43 74;
  --c-bg-indigo-600: 79 70 229;
  --c-bg-indigo-700: 67 56 202;

  --c-purple-50: 38 24 50;
  --c-purple-100: 52 32 68;
  --c-purple-200: 71 42 94;
  --c-purple-500: 192 132 252;
  --c-purple-600: 168 85 247;
  --c-purple-700: 233 213 255;
  --c-purple-800: 233 213 255;
  --c-purple-900: 243 232 255;
  --c-bg-purple-50: 38 24 50;
  --c-bg-purple-100: 52 32 68;
  --c-bg-purple-600: 147 51 234;
  --c-bg-purple-700: 126 34 206;

  --c-sky-50: 20 40 59;
  --c-sky-100: 27 53 79;
  --c-sky-200: 36 71 106;
  --c-sky-500: 56 189 248;
  --c-sky-600: 14 165 233;
  --c-sky-700: 186 230 253;
  --c-sky-800: 186 230 253;
  --c-sky-900: 224 242 254;
  --c-bg-sky-50: 20 40 59;
  --c-bg-sky-100: 27 53 79;
  --c-bg-sky-600: 2 132 199;
  --c-bg-sky-700: 3 105 161;

  --c-orange-50: 58 36 20;
  --c-orange-100: 74 46 25;
  --c-orange-200: 96 59 31;
  --c-orange-500: 251 146 60;
  --c-orange-600: 249 115 22;
  --c-orange-700: 254 215 170;
  --c-orange-800: 254 215 170;
  --c-bg-orange-50: 58 36 20;
  --c-bg-orange-100: 74 46 25;
  --c-bg-orange-600: 234 88 12;
  --c-bg-orange-700: 194 65 12;

  --c-cyan-50: 16 38 46;
  --c-cyan-100: 22 52 64;
  --c-cyan-200: 32 74 88;
  --c-cyan-500: 6 182 212;
  --c-cyan-600: 8 145 178;
  --c-cyan-700: 165 243 252;
  --c-cyan-800: 165 243 252;
  --c-cyan-900: 207 250 254;
  --c-bg-cyan-50: 16 38 46;
  --c-bg-cyan-100: 22 52 64;
  --c-bg-cyan-600: 8 145 178;
  --c-bg-cyan-700: 14 116 144;
  --c-bg-cyan-800: 21 94 117;

  --c-rose-50: 59 31 37;
  --c-rose-100: 74 38 46;
  --c-rose-200: 92 46 56;
  --c-rose-500: 244 63 94;
  --c-rose-600: 225 29 72;
  --c-rose-700: 254 205 211;
  --c-rose-800: 254 205 211;
  --c-rose-900: 255 228 230;
  --c-bg-rose-50: 59 31 37;
  --c-bg-rose-100: 74 38 46;
  --c-bg-rose-600: 225 29 72;
  --c-bg-rose-700: 190 18 60;
  --c-bg-rose-800: 159 18 57;

  --c-violet-50: 38 24 50;
  --c-violet-100: 52 32 68;
  --c-violet-200: 71 42 94;
  --c-violet-500: 139 92 246;
  --c-violet-600: 124 58 237;
  --c-violet-700: 221 214 254;
  --c-violet-800: 221 214 254;
  --c-violet-900: 237 233 254;
  --c-bg-violet-50: 38 24 50;
  --c-bg-violet-100: 52 32 68;
  --c-bg-violet-600: 124 58 237;
  --c-bg-violet-700: 109 40 217;
  --c-bg-violet-800: 91 33 182;

  --c-teal-50: 18 52 46;
  --c-teal-100: 22 64 56;
  --c-teal-200: 28 82 72;
  --c-teal-500: 20 184 166;
  --c-teal-600: 13 148 136;
  --c-teal-700: 153 246 228;
  --c-teal-800: 153 246 228;
  --c-teal-900: 204 251 241;
  --c-bg-teal-50: 18 52 46;
  --c-bg-teal-100: 22 64 56;
  --c-bg-teal-600: 13 148 136;
  --c-bg-teal-700: 15 118 110;
  --c-bg-teal-800: 17 94 89;

  --theme-btn-outline-border: #2e5b61;
  --theme-btn-outline-color: #d4e8de;
  --theme-btn-outline-hover-bg: #132226;
  --theme-btn-ghost-color: #9bb5b0;
  --theme-btn-ghost-hover-bg: #132226;
  --theme-btn-ghost-hover-color: #ffffff;
}

html, body { background: var(--theme-background); color: var(--theme-foreground); }
.card { background-color: var(--theme-surface); border-color: var(--theme-border); color: var(--theme-foreground); }
.text-theme-muted { color: var(--theme-muted); }
body :where(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea) {
  background-color: var(--theme-surface);
  border-color: var(--theme-border);
  color: var(--theme-foreground);
}
body :where(input, textarea)::placeholder { color: var(--theme-muted); opacity: 1; }
body option { background-color: var(--theme-surface-raised); color: var(--theme-foreground); }
:root[data-theme="light"] #sidebar { background-color: var(--theme-sidebar); color: var(--theme-foreground); border-color: var(--theme-border); }
:root[data-theme="light"] #sidebar a { color: color-mix(in srgb, var(--theme-foreground) 76%, transparent); }
:root[data-theme="light"] #sidebar a:hover { background-color: color-mix(in srgb, var(--theme-primary) 12%, transparent); color: var(--theme-foreground); }
:root[data-theme="dark"] #sidebar { background-color: var(--theme-sidebar); border-color: var(--theme-border); }
.theme-choice { display: block; cursor: pointer; border: 1px solid var(--theme-border); border-radius: .75rem; padding: 1rem; color: var(--theme-foreground); }
.theme-choice:has(input:checked) { border-color: var(--theme-primary); box-shadow: 0 0 0 2px color-mix(in srgb, var(--theme-primary) 28%, transparent); }
.theme-choice:has(input:focus-visible) { outline: 2px solid var(--theme-primary); outline-offset: 2px; }

/* Choices.js replaces native selects, so it needs the same tokenized surfaces. */
.choices__inner, .choices__input, .choices__list--dropdown, .choices__list[aria-expanded],
.choices__list--dropdown .choices__item--selectable.is-highlighted {
  background-color: var(--theme-surface-raised) !important;
  border-color: var(--theme-border) !important;
  color: var(--theme-foreground) !important;
}
.choices__inner { min-height: auto; }
.choices__list--single, .choices__input::placeholder, .choices__list--dropdown .choices__placeholder {
  color: var(--theme-muted) !important;
  opacity: 1;
}
.choices[data-type*="select-one"]::after { border-color: var(--theme-muted) transparent transparent !important; }
.choices.is-open[data-type*="select-one"]::after { border-color: transparent transparent var(--theme-muted) !important; }
.choices__list--dropdown .choices__item--selectable.is-highlighted {
  background-color: var(--theme-surface-subtle) !important;
}

/* Quill ships a fixed light Snow theme; scope token overrides to editor instances. */
.quill-editor-wrapper .ql-toolbar.ql-snow, .quill-editor-wrapper .ql-container.ql-snow,
.quill-editor-wrapper .ql-tooltip, .quill-editor-wrapper .ql-picker-options {
  background-color: var(--theme-surface-raised);
  border-color: var(--theme-border);
  color: var(--theme-foreground);
}
.quill-editor-wrapper .ql-editor, .quill-editor-wrapper .ql-picker-label,
.quill-editor-wrapper .ql-picker-item { color: var(--theme-foreground); }
.quill-editor-wrapper .ql-editor.ql-blank::before { color: var(--theme-muted); }
.quill-editor-wrapper .ql-snow .ql-stroke { stroke: var(--theme-foreground); }
.quill-editor-wrapper .ql-snow .ql-fill { fill: var(--theme-foreground); }
.quill-editor-wrapper .ql-snow .ql-picker-label:hover, .quill-editor-wrapper .ql-snow .ql-picker-item:hover,
.quill-editor-wrapper .ql-snow .ql-picker-label.ql-active, .quill-editor-wrapper .ql-snow .ql-picker-item.ql-selected {
  color: var(--theme-primary);
}
.quill-editor-wrapper .ql-snow .ql-picker-label:hover .ql-stroke, .quill-editor-wrapper .ql-snow .ql-picker-item:hover .ql-stroke,
.quill-editor-wrapper .ql-snow .ql-picker-label.ql-active .ql-stroke, .quill-editor-wrapper .ql-snow .ql-picker-item.ql-selected .ql-stroke {
  stroke: var(--theme-primary);
}

.theme-metric-positive { background-color: var(--theme-success-surface); color: var(--theme-success-foreground); }
.theme-metric-negative { background-color: var(--theme-danger-surface); color: var(--theme-danger-foreground); }
.theme-metric-warning { background-color: var(--theme-warning-surface); color: var(--theme-warning-foreground); }

.bid-form-due-callout {
  background: var(--theme-surface-subtle);
  border: 1px solid var(--theme-border);
  border-radius: 0.5rem;
  margin: 0.125rem 0.5rem 0.125rem 0;
  padding-left: 0.75rem;
}

/* Bluebeam validation states need semantic surfaces rather than light pastels. */

/* SweetAlert2 modal and toast adaptation */
.swal2-popup {
  background-color: var(--theme-surface-raised) !important;
  color: var(--theme-foreground) !important;
  border: 1px solid var(--theme-border) !important;
}
.swal2-title {
  color: var(--theme-foreground) !important;
}
.swal2-html-container {
  color: var(--theme-muted) !important;
}
.swal2-toast {
  background-color: var(--theme-surface-raised) !important;
  color: var(--theme-foreground) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25) !important;
}
.swal2-close {
  color: var(--theme-muted) !important;
}
.validation-rule.validation-rule-enabled { background-color: var(--theme-success-surface); border-color: var(--theme-success-foreground); }
.validation-rule.validation-rule-disabled { background-color: var(--theme-surface-subtle); border-color: var(--theme-border); }
.validation-rule.validation-rule-disabled:hover { background-color: var(--theme-surface); }

/* Personal Insights uses compact status cells whose contrast must not depend on light utilities. */
.personal-insights .bg-red-50.text-red-700 { background-color: var(--theme-danger-surface); color: var(--theme-danger-foreground); }
.personal-insights .bg-emerald-50.text-emerald-700 { background-color: var(--theme-success-surface); color: var(--theme-success-foreground); }
.personal-insights .text-amber-600 { color: var(--theme-warning-foreground); }

/* Foundry Workbench chrome adaptation (preserves canvas geometry tokens) */
:root[data-theme="dark"] #foundry-workbench { background-color: var(--theme-background); }
:root[data-theme="dark"] #foundry-workbench header { background-color: var(--theme-surface); border-color: var(--theme-border); }
:root[data-theme="dark"] #foundry-workbench .bg-white { background-color: var(--theme-surface); }
:root[data-theme="dark"] #foundry-workbench .bg-slate-50 { background-color: var(--theme-surface-subtle); }
:root[data-theme="dark"] #foundry-workbench .border-slate-200 { border-color: var(--theme-border); }
:root[data-theme="dark"] #foundry-workbench .text-slate-900 { color: var(--theme-foreground); }
:root[data-theme="dark"] #foundry-workbench .text-slate-600 { color: var(--theme-muted); }
