/* Clinic-selected accents. Medical status colors remain semantic across themes. */
:root {
  --theme-primary: #0369a1;
  --theme-primary-hover: #075985;
  --theme-action: #0873b9;
  --theme-action-hover: #075c94;
  --theme-brand: #087fba;
  --theme-icon: #0284c7;
  --theme-soft: #f0f9ff;
  --theme-soft-selected: #e0f2fe;
  --theme-canvas: #f5fbff;
  --theme-border: #dce7f1;
  --theme-border-soft: #cfe1f1;
  --theme-border-hover: #7dd3fc;
  --theme-highlight: #bae6fd;
  --viz-1: #0369a1;
  --viz-2: #38bdf8;
  --viz-3: #0e7490;
  --viz-4: #67e8f9;
  --viz-5: #0f9f92;
  --viz-6: #5eead4;
  --viz-7: #475569;
  --viz-8: #94a3b8;
  --viz-bar: #b9e2f7;
  --viz-bar-hover: #78c5ee;
  --viz-track: #e2e8f0;
  --viz-grid: #e7eff7;
  --viz-heat-0: #e6f7fb;
  --viz-heat-1: #b4e5eb;
  --viz-heat-2: #72d0d0;
  --viz-heat-3: #2aabb0;
  --viz-heat-4: #0e7886;
  --viz-progress-low: #8eb8cf;
  --viz-progress-mid: #0369a1;
  --viz-progress-high: #0f9f92;
  --color-primary: var(--theme-primary);
  --color-secondary: var(--theme-soft);
  --medical-app-bg: var(--theme-canvas);
}
:root[data-cabinet-theme="teal"] {
  --theme-primary: #087980;
  --theme-primary-hover: #075d62;
  --theme-action: #087980;
  --theme-action-hover: #075d62;
  --theme-brand: #0b8188;
  --theme-icon: #0b8890;
  --theme-soft: #effbfa;
  --theme-soft-selected: #daf4f1;
  --theme-canvas: #f6fcfb;
  --theme-border: #d6e9e7;
  --theme-border-soft: #c5e4e1;
  --theme-border-hover: #74cfc9;
  --theme-highlight: #b9ebe6;
  --viz-1: #075d62;
  --viz-2: #31a7ae;
  --viz-3: #347b93;
  --viz-4: #75c7ce;
  --viz-5: #128f7e;
  --viz-6: #85d5bd;
  --viz-7: #4e6f78;
  --viz-8: #a0c3c3;
  --viz-bar: #87cecf;
  --viz-bar-hover: #49afb2;
  --viz-track: #dcecea;
  --viz-grid: #e2efee;
  --viz-heat-0: #e6f5f3;
  --viz-heat-1: #b7e1db;
  --viz-heat-2: #78c6bc;
  --viz-heat-3: #35a99e;
  --viz-heat-4: #087980;
  --viz-progress-low: #83beb8;
  --viz-progress-mid: #31a7ae;
  --viz-progress-high: #087980;
}
:root[data-cabinet-theme="gold"] {
  --theme-primary: #92550c;
  --theme-primary-hover: #724009;
  --theme-action: #92550c;
  --theme-action-hover: #724009;
  --theme-brand: #9b6015;
  --theme-icon: #a16417;
  --theme-soft: #fff8eb;
  --theme-soft-selected: #fbeccd;
  --theme-canvas: #fffcf6;
  --theme-border: #eadfc9;
  --theme-border-soft: #e7d5ae;
  --theme-border-hover: #d2ad64;
  --theme-highlight: #f6e2b5;
  --viz-1: #92550c;
  --viz-2: #cf932d;
  --viz-3: #8c722b;
  --viz-4: #e2b85e;
  --viz-5: #9c6a39;
  --viz-6: #dabd78;
  --viz-7: #70594b;
  --viz-8: #b9a88c;
  --viz-bar: #e4bc70;
  --viz-bar-hover: #c68b2f;
  --viz-track: #eee3d1;
  --viz-grid: #f1e8d9;
  --viz-heat-0: #fbf2df;
  --viz-heat-1: #f1dbac;
  --viz-heat-2: #dfbd70;
  --viz-heat-3: #bf8e38;
  --viz-heat-4: #92550c;
  --viz-progress-low: #d8b46f;
  --viz-progress-mid: #bf8e38;
  --viz-progress-high: #92550c;
}
:root[data-cabinet-theme="forest"] {
  --theme-primary: #276a47;
  --theme-primary-hover: #1c5437;
  --theme-action: #276a47;
  --theme-action-hover: #1c5437;
  --theme-brand: #28734b;
  --theme-icon: #307852;
  --theme-soft: #f0f8f2;
  --theme-soft-selected: #e0efe4;
  --theme-canvas: #f8fcf8;
  --theme-border: #d9e7db;
  --theme-border-soft: #c9e0cf;
  --theme-border-hover: #8fc9a2;
  --theme-highlight: #ccebd5;
  --viz-1: #276a47;
  --viz-2: #5ba876;
  --viz-3: #587c4d;
  --viz-4: #a2c17b;
  --viz-5: #8a8e40;
  --viz-6: #c3b879;
  --viz-7: #526e63;
  --viz-8: #a2b9aa;
  --viz-bar: #99cba4;
  --viz-bar-hover: #61a875;
  --viz-track: #dfebe1;
  --viz-grid: #e7f0e8;
  --viz-heat-0: #ecf5eb;
  --viz-heat-1: #cce4cd;
  --viz-heat-2: #99c79f;
  --viz-heat-3: #5aa673;
  --viz-heat-4: #276a47;
  --viz-progress-low: #a0c69f;
  --viz-progress-mid: #5ba876;
  --viz-progress-high: #276a47;
}
:root[data-cabinet-theme="coffee"] {
  --theme-primary: #79513d;
  --theme-primary-hover: #603d2e;
  --theme-action: #79513d;
  --theme-action-hover: #603d2e;
  --theme-brand: #815741;
  --theme-icon: #906148;
  --theme-soft: #faf5f0;
  --theme-soft-selected: #f0e4da;
  --theme-canvas: #fcf9f6;
  --theme-border: #e7ddd5;
  --theme-border-soft: #dfcfc2;
  --theme-border-hover: #c6a38d;
  --theme-highlight: #ead3c4;
  --viz-1: #79513d;
  --viz-2: #b17c5f;
  --viz-3: #856b59;
  --viz-4: #c6a282;
  --viz-5: #9c6b62;
  --viz-6: #cfaa9a;
  --viz-7: #655a56;
  --viz-8: #b8a7a0;
  --viz-bar: #cba58e;
  --viz-bar-hover: #a9795d;
  --viz-track: #ece1d9;
  --viz-grid: #f0e8e2;
  --viz-heat-0: #f7eee7;
  --viz-heat-1: #e9d5c7;
  --viz-heat-2: #d0ab91;
  --viz-heat-3: #ad785a;
  --viz-heat-4: #79513d;
  --viz-progress-low: #c8a994;
  --viz-progress-mid: #b17c5f;
  --viz-progress-high: #79513d;
}

html, body { background-color: var(--theme-canvas); }
::selection { background: var(--theme-highlight); color: #0f172a; }
.login-page { background: var(--theme-canvas); }
.login-page .btn-login-primary, .login-page .btn-login-primary:hover:not(:disabled) { background: var(--theme-primary); box-shadow: none; }
.cabinet-standalone .test-header, .cabinet-standalone .btn-primary-custom { background: var(--theme-primary); }
.cabinet-standalone .question-icon-wrapper, .cabinet-standalone .answer-btn { background: var(--theme-soft); }
.cabinet-standalone .answer-btn { border-color: var(--theme-border-soft); }
.cabinet-standalone .answer-btn:hover { background: var(--theme-soft-selected); border-color: var(--theme-primary); box-shadow: none; }

/* Shared SweetAlert2 dialog language, including messenger notices and confirmations. */
.swal2-container { padding: 16px; background: rgb(15 23 42 / .42) !important; }
.swal2-popup { width: min(440px, 100%) !important; padding: 28px 28px 24px !important; border: 1px solid var(--theme-border) !important; border-radius: 16px !important; background: #fff !important; box-shadow: 0 20px 52px rgb(15 23 42 / .18) !important; color: #0f172a !important; font: 14px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important; }
.swal2-icon { width: 56px !important; height: 56px !important; margin: 0 auto 18px !important; border-width: 2px !important; font-size: 12px !important; }
.swal2-icon.swal2-info, .swal2-icon.swal2-question { color: var(--theme-primary) !important; border-color: var(--theme-border-hover) !important; }
.swal2-title { padding: 0 !important; color: #0f172a !important; font-size: 21px !important; font-weight: 700 !important; line-height: 1.3 !important; letter-spacing: -.02em; }
.swal2-html-container { margin: 10px 0 0 !important; color: #475569 !important; font-size: 14px !important; line-height: 1.55 !important; }
.swal2-actions { gap: 8px; margin: 22px 0 0 !important; }
.swal2-actions .swal2-styled { min-height: 40px; margin: 0 !important; padding: 9px 16px !important; border-radius: 9px !important; font: 650 13px/1.3 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important; box-shadow: none !important; }
.swal2-confirm:not([style*="background"]) { background: var(--theme-primary) !important; color: #fff !important; }
.swal2-confirm:not([style*="background"]):hover { background: var(--theme-primary-hover) !important; }
.swal2-cancel { border: 1px solid var(--theme-border) !important; background: #fff !important; color: #334155 !important; }
.swal2-cancel:hover { background: var(--theme-soft) !important; }
.swal2-actions .swal2-styled:focus-visible, .swal2-close:focus-visible { outline: 3px solid var(--theme-border-hover) !important; outline-offset: 2px; }
.swal2-input, .swal2-textarea, .swal2-select { border: 1px solid var(--theme-border) !important; border-radius: 9px !important; box-shadow: none !important; color: #0f172a !important; font: inherit !important; }
.swal2-input:focus, .swal2-textarea:focus, .swal2-select:focus { border-color: var(--theme-primary) !important; outline: 3px solid var(--theme-highlight) !important; }
.swal2-timer-progress-bar { background: var(--theme-primary) !important; }
@media (max-width: 480px) {
  .swal2-popup { padding: 24px 18px 20px !important; }
  .swal2-title { font-size: 19px !important; }
  .swal2-actions { width: 100%; }
  .swal2-actions .swal2-styled { flex: 1; }
}
