/*
 * Theme configuration
 * Change these tokens to rebrand the whole interface.
 */
:root {
    color-scheme: light;

    --color-primary: #2563eb;
    --color-primary-hover: #1d4ed8;
    --color-primary-soft: #eff6ff;
    --color-danger: #dc2626;
    --color-danger-hover: #b91c1c;
    --color-success: #059669;

    --color-background: #f5f7fb;
    --color-surface: #ffffff;
    --color-input: #ffffff;
    --color-surface-muted: #f3f4f6;
    --color-surface-soft: #f9fafb;
    --color-text: #111827;
    --color-body: #4b5563;
    --color-text-muted: #6b7280;
    --color-border: #d1d5db;

    --font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --radius-sm: 7px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 5%);
    --shadow-md: 0 12px 28px rgb(15 23 42 / 12%);

    --sidebar-width: 288px;
    --content-width: 1600px;
}

.report-summary{display:flex;align-items:center;gap:1rem;flex-wrap:wrap;margin-bottom:1.25rem;padding:1rem;border:1px solid var(--color-border);border-radius:.75rem;background:var(--color-surface-muted)}
.report-entry-table textarea,.report-entry-table input{min-width:18rem;margin:0}.report-entry-table td small{display:block;margin-top:.35rem}.report-entry-table td{vertical-align:top}
.report-workspace{display:grid;gap:1.25rem}.report-page-heading{margin-bottom:0}.report-title-row{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap}.report-title-row h1{margin:0}.report-patient-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem}.report-patient-strip div{display:grid;gap:.3rem}.report-patient-strip span{color:var(--color-text-muted);font-size:.78rem;text-transform:uppercase;letter-spacing:.05em}.report-fields{display:grid;border:1px solid var(--color-border);border-radius:.75rem;overflow:hidden}.report-field-row{display:grid;grid-template-columns:minmax(15rem,.8fr) minmax(20rem,1.2fr);gap:1.25rem;padding:1rem}.report-field-row+ .report-field-row{border-top:1px solid var(--color-border)}.report-field-meta,.report-result-control{display:grid;align-content:start;gap:.5rem}.report-field-meta small{color:var(--color-text-muted)}.report-reference{display:flex;gap:.5rem;flex-wrap:wrap}.report-reference span{padding:.2rem .5rem;border-radius:.4rem;background:var(--color-surface-muted);font-size:.78rem}.result-type-pill{justify-self:start;padding:.25rem .55rem;border-radius:999px;background:var(--color-primary-soft);color:var(--color-primary);font-size:.75rem;font-weight:700}.report-result-control input,.report-result-control textarea,.report-result-control select{margin:0;width:100%}.report-action-bar{position:sticky;bottom:1rem;z-index:5;display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:1rem 1.25rem;border:1px solid var(--color-border);border-radius:.9rem;background:var(--color-surface);box-shadow:var(--shadow-md)}.report-action-bar>div:first-child{display:grid;gap:.15rem}.report-action-bar span{color:var(--color-text-muted);font-size:.85rem}.form-actions{display:flex;justify-content:flex-end;gap:.75rem;align-items:center;margin-top:1.25rem}@media(max-width:800px){.report-patient-strip{grid-template-columns:repeat(2,minmax(0,1fr))}.report-field-row{grid-template-columns:1fr}.report-action-bar{position:static;align-items:flex-start;flex-direction:column}.report-action-bar .actions{width:100%}}

[data-theme="dark"] {
    color-scheme: dark;

    --color-primary: #3b82f6;
    --color-primary-hover: #2563eb;
    --color-primary-soft: #172554;
    --color-danger: #f87171;
    --color-danger-hover: #fca5a5;
    --color-success: #34d399;

    --color-background: #0b1120;
    --color-surface: #111827;
    --color-input: #182235;
    --color-surface-muted: #1f2937;
    --color-surface-soft: #182235;
    --color-text: #f9fafb;
    --color-body: #d1d5db;
    --color-text-muted: #9ca3af;
    --color-border: #374151;

    --shadow-sm: 0 1px 2px rgb(0 0 0 / 20%);
    --shadow-md: 0 16px 34px rgb(0 0 0 / 28%);
}

.report-result-control input,.report-result-control textarea,.report-result-control select{background:var(--color-input);color:var(--color-text);border-color:var(--color-border)}
.confirmation-modal{width:min(32rem,calc(100vw - 2rem));padding:0;border:1px solid var(--color-border);border-radius:1rem;background:var(--color-surface);color:var(--color-text);box-shadow:var(--shadow-md)}.confirmation-modal::backdrop{background:rgb(2 6 23 / 70%);backdrop-filter:blur(3px)}.confirmation-modal[open]{display:grid;grid-template-columns:auto 1fr;gap:1rem;padding:1.5rem}.confirmation-modal-icon{display:grid;place-items:center;width:2.75rem;height:2.75rem;border-radius:50%;background:#fef3c7;color:#92400e;font-size:1.25rem;font-weight:800}.confirmation-modal-copy{display:grid;gap:.5rem}.confirmation-modal-copy h2,.confirmation-modal-copy p{margin:0}.confirmation-modal-copy p{color:var(--color-text-muted)}.confirmation-modal-note{display:grid;gap:.2rem;margin-top:.5rem;padding:.8rem;border:1px solid var(--color-border);border-radius:.65rem;background:var(--color-surface-muted)}.confirmation-modal-note span{font-size:.85rem;color:var(--color-text-muted)}.confirmation-modal-actions{grid-column:1/-1;display:flex;justify-content:flex-end;gap:.75rem;margin-top:.5rem}@media(max-width:520px){.confirmation-modal[open]{grid-template-columns:1fr}.confirmation-modal-actions{flex-direction:column-reverse}.confirmation-modal-actions button{width:100%}}
