/* ---------- HIPS client: tokens (light only; brand of 2026-11-03: navy, blue and green from the emblem) ---------- */
@font-face { font-family: "IBM Plex Sans"; src: url("fonts/ibm-plex-sans.woff2") format("woff2"); font-weight: 100 700; font-display: swap; }
:root {
    color-scheme: light;
    --surface-0: #f5f8fc;   /* page */
    --surface-1: #ffffff;   /* cards, menu */
    --surface-2: #eef3fb;   /* hover */
    --text-primary: #1a2433;
    --text-secondary: #4a5568;
    --text-muted: #6b7686;
    --border: rgba(23, 63, 138, 0.13);
    --accent: #173F8A;      /* HIPS navy */
    --accent-ink: #ffffff;
    --accent-soft: #e6eefb;
    --green: #4BA82E;       /* the emblem's green */
    --bubble-me: #e6eefb;
    --critical: #c62f2f;
    --good-ink: #2f7d21;
}

body {
    margin: 0;
    background: var(--surface-0);
    color: var(--text-primary);
    font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    line-height: 1.45;
}
h1:focus { outline: none; }
a { color: var(--accent); }

.lead { color: var(--text-secondary); margin-top: 0; }
.muted { color: var(--text-muted); }

.card { background: var(--surface-1); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin: 12px 0; }
.btn { font: inherit; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-1);
       color: var(--text-primary); cursor: pointer; }
.btn:hover { background: var(--surface-2); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn-primary:hover { filter: brightness(1.08); background: var(--accent); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-link { background: none; border: none; color: var(--accent); cursor: pointer; font: inherit; padding: 0; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
input, textarea, select { font: inherit; color: var(--text-primary); background: var(--surface-1);
                          border: 1px solid var(--border); border-radius: 8px; padding: 7px 9px; }
textarea { width: 100%; box-sizing: border-box; min-height: 110px; resize: vertical; }
label.field { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--text-secondary); }

table.data { border-collapse: collapse; width: 100%; }
.table-wrap { overflow-x: auto; max-width: 100%; }
table.data .nw { white-space: nowrap; }
.table-wrap table.data { font-size: .85rem; }
.table-wrap table.data th, .table-wrap table.data td { padding: 6px 6px; }
table.data th, table.data td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.data th { font-weight: 600; color: var(--text-secondary); font-size: .85rem; }

.badge { display: inline-block; font-size: .75rem; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border);
         color: var(--text-secondary); }
.badge-locked::before { content: "🔒 "; }
.badge-draft { border-style: dashed; }
.alert { border-left: 3px solid var(--critical); padding: 8px 12px; background: var(--surface-1); border-radius: 6px; }
.ok { border-left: 3px solid var(--good-ink); padding: 8px 12px; background: var(--surface-1); border-radius: 6px; }

/* ---------- report chat ---------- */
.chat { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.bubble { max-width: 85%; padding: 9px 12px; border-radius: 14px; white-space: pre-wrap; }
.bubble.assistant { align-self: flex-start; background: var(--surface-1); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.bubble.reporter { align-self: flex-end; background: var(--bubble-me); border-bottom-right-radius: 4px; }
.answer { padding: 10px 0 4px; border-top: 1px solid var(--border); scroll-margin-bottom: 24px; }
.answer:focus { outline: none; }
.picker { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; margin: 8px 0; }
.picker .option { text-align: left; }
.picker .option.suggested { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.suggestion-note { font-size: .8rem; color: var(--text-muted); }
.mic.listening { background: var(--critical); color: #fff; border-color: transparent; }

#blazor-error-ui { background: lightyellow; bottom: 0; box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2); display: none; left: 0;
                   padding: 0.6rem 1.25rem 0.7rem 1.25rem; position: fixed; width: 100%; z-index: 1000; color: #000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }


.back-home { display: inline-block; margin-top: 12px; }

/* New incident, form version */
.incident-form { display: flex; flex-direction: column; gap: 14px; max-width: 640px; }
.incident-form select, .incident-form textarea { width: 100%; }
.incident-form textarea { min-height: 90px; }
label.check { display: flex; align-items: center; gap: 6px; font-size: .9rem; align-self: flex-end; padding-bottom: 6px; }

/* OSHA-equivalent forms (Pages/OshaPrint) */
.print-page { max-width: 1400px; margin: 0 auto; padding: 16px; background: #fff; color: #000; }
.osha-form { font-size: 11px; margin-bottom: 24px; }
.osha-head { display: flex; justify-content: space-between; gap: 24px; border-bottom: 2px solid #000; padding-bottom: 6px; margin-bottom: 8px; }
.osha-title { font-size: 12px; font-weight: 700; }
.osha-name { font-size: 18px; font-weight: 700; }
.osha-meta { text-align: right; font-size: 11px; }
.osha-small { font-size: 10px; color: #222; }
.osha-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.osha-form h3 { font-size: 12px; margin: 10px 0 4px; }
table.osha-grid { border-collapse: collapse; width: 100%; }
table.osha-grid th, table.osha-grid td { border: 1px solid #000; padding: 3px 5px; vertical-align: top; }
table.osha-grid thead th { font-size: 9.5px; font-weight: 600; background: #f0f0f0; }
table.osha-grid.kv th { width: 45%; text-align: left; font-weight: 600; background: #f7f7f7; }
table.osha-grid .c { text-align: center; }
table.osha-grid .r { text-align: right; }
table.osha-grid .big { font-size: 16px; font-weight: 700; }
table.osha-grid td.sign { height: 28px; }
ul.problems li { color: var(--danger, #b42318); }
@media print {
  @page { size: landscape; margin: 10mm; }
  .no-print { display: none; }
  .print-page { padding: 0; max-width: none; }
  .page-break { page-break-after: always; }
}

/* OSHA year status */
.year-status { display: inline-block; font-weight: 600; font-size: .9rem; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border); margin: 4px 0 8px; }
.year-status.status-YearToDate { background: #FEF3C7; color: #78350F; border-color: #FCD34D; }
.year-status.status-AwaitingCertification { background: #E0F2FE; color: #0C4A6E; border-color: #7DD3FC; }
.year-status.status-Final { background: #DCFCE7; color: #14532D; border-color: #86EFAC; }
.osha-stamp { border: 2px solid #B45309; color: #B45309; font-weight: 700; padding: 4px 10px; display: inline-block; margin: 0 0 8px; font-size: 12px; }

/* ---------- Reports ---------- */
.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px 14px; }
.report-grid label, .benchmark label { display: flex; flex-direction: column; gap: 4px; font-size: .8rem; color: var(--text-secondary); }
.report-grid select, .report-grid input, .benchmark select { font: inherit; font-size: .9rem; padding: 6px 8px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface-1); color: var(--text-primary); }
.report-filters { margin-top: 10px; }
.report-filters summary { cursor: pointer; color: var(--text-secondary); font-size: .9rem; margin-bottom: 8px; }
.report-heading { font-size: 1.1rem; margin: 18px 0 2px; }
.report-sub { margin: 0 0 8px; font-size: .9rem; }
.report-table th[scope=row] { font-weight: 500; }
.report-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.benchmark h2 { font-size: 1.05rem; margin: 0 0 4px; }
.benchmark .row { align-items: end; margin: 8px 0; }
.is-updating { opacity: .55; transition: opacity .15s; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Dashboard: month status (same look as HIPS Central) ---------- */
:root { --ms-due: #9a6700; --ms-late: #b42318; --grid: #e1e0d9; --baseline: #c3c2b7; }
.month-strip { display: flex; gap: 4px; list-style: none; margin: 8px 0; padding: 0; flex-wrap: wrap; }
.month-strip a { display: flex; flex-direction: column; align-items: center; gap: 3px; text-decoration: none; }
.month-strip .ms-label { font-size: .7rem; color: var(--text-muted); white-space: nowrap; }
.ms-cell { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 22px; border-radius: 4px;
           font-size: .72rem; font-weight: 700; border: 1.5px solid transparent; box-sizing: border-box; }
.ms-submitted .ms-cell { background: var(--accent); }
.ms-noevents .ms-cell { background: var(--surface-1); border-color: var(--accent); color: var(--accent); }
.ms-notpart .ms-cell { background: repeating-linear-gradient(135deg, var(--grid) 0 3px, var(--surface-1) 3px 6px); border-color: var(--baseline); }
.ms-due .ms-cell { background: var(--surface-1); border: 1.5px dashed var(--ms-due); }
.ms-pastdue .ms-cell { background: var(--ms-late); color: #fff; }
.ms-inprogress .ms-cell { background: var(--surface-1); border: 1px dashed var(--baseline); }
.month-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; list-style: none; margin: 4px 0 12px; padding: 0; font-size: .8rem; color: var(--text-secondary); }
.month-legend li { display: inline-flex; align-items: center; gap: 6px; }
.month-legend .ms-cell { width: 18px; height: 14px; font-size: .6rem; }
.alerts { list-style: none; padding: 0; margin: 12px 0; }
.alerts li { padding: 8px 12px; border-left: 3px solid var(--ms-due); background: var(--surface-1); border-radius: 0 6px 6px 0; margin-bottom: 6px; }
.alerts li.late { border-left-color: var(--ms-late); }
.alerts li.good { border-left-color: var(--good-ink); }
.standing.good { color: var(--good-ink); }
.standing.low { color: var(--ms-late); }
.ms-badge-pastdue { color: var(--ms-late); border-color: var(--ms-late); }
.ms-badge-due { color: var(--ms-due); border-color: var(--ms-due); }
.ms-badge-notpart { border-style: dashed; }
.ms-review .ms-cell { background: repeating-linear-gradient(90deg, var(--accent) 0 2px, var(--surface-1) 2px 5px); border: 1px solid var(--accent); }

/* ---------- Import from Excel ---------- */
.late-text { color: var(--ms-late); }
.badge-error { color: var(--ms-late); border-color: var(--ms-late); }

/* ---------- Month page: staffing ---------- */
details.occupations { margin: 10px 0; }
details.occupations summary { cursor: pointer; font-weight: 600; }
.occ-group { border: 1px solid var(--border); border-radius: 8px; margin: 8px 0; padding: 6px 12px 10px; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.occ-group legend { font-weight: 600; font-size: .9rem; padding: 0 4px; }
.occ-group label.occ { font-size: .85rem; }
.occ-group label.occ input { width: 7em; }

/* ---------- Staffing profile ---------- */
table.data.staffing input { width: 8em; text-align: right; }
fieldset.contractors { border: 1px solid var(--border); border-radius: 8px; padding: 8px 14px; margin: 10px 0; }
fieldset.contractors legend { font-weight: 600; padding: 0 4px; }

/* ---------- Preventability ---------- */
.card.preventable { border-left: 4px solid var(--ms-late); }
.card.preventable p { margin: 6px 0 0; }

/* ---------- report bar chart (OHSN style; Components/BarChart) ---------- */
.viz-root { background: var(--surface-1); border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px 8px; margin: 10px 0; }
.viz-caption { margin: 0 0 8px; font-size: .85rem; color: var(--text-secondary); }
.viz-scroll { overflow-x: auto; }
.viz-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; margin: 0 0 6px; padding: 0; font-size: .85rem; color: var(--text-secondary); }
.viz-legend li { display: inline-flex; align-items: center; gap: 6px; }
.viz-chart { width: 100%; height: auto; display: block; font-size: 12px; }
.viz-grid { stroke: var(--grid); stroke-width: 1; }
.viz-baseline { stroke: var(--baseline); stroke-width: 1; }
.viz-tick { fill: var(--text-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.viz-label { fill: var(--text-secondary); }
.viz-axis-title { fill: var(--text-secondary); font-size: 11px; }
.viz-value { fill: var(--text-primary); font-size: 11px; font-variant-numeric: tabular-nums; }
.viz-value-second { fill: var(--text-secondary); }
.mark-first { fill: var(--accent); }
.mark-second { fill: var(--text-muted); }
.mark-whisker { fill: none; stroke: var(--text-primary); stroke-width: 1.5; }
.viz-hit { fill: transparent; }
.viz-col:hover .viz-hit, .viz-col:focus .viz-hit { fill: var(--grid); fill-opacity: .45; }
.viz-col:focus { outline: none; }
.viz-col:focus-visible .viz-hit { stroke: var(--accent); stroke-width: 1.5; }

/* ---------- dictation hint on Report an incident: the device's own dictation (touch keyboard mic, or Windows+H / Mac Fn Fn) ---------- */
.dictate-hint { font-size: .85rem; margin: 6px 0 0; }
.dictate-hint kbd { font: inherit; font-size: .8rem; padding: 1px 6px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; background: var(--surface-1); color: var(--text-primary); }
.dictate-desktop { display: none; }
@media (pointer: fine) { .dictate-touch { display: none; } .dictate-desktop { display: block; } }

/* ---------- grouped bar chart (national OSHA rates by year; Components/GroupedBarChart) ---------- */
:root { --series-s2: #e0703d; --series-s3: #6d4fd8; --series-s4: #a996ee; --series-s5: #6b6a66; --series-s6: #a9a8a2; }
.mark-s1 { fill: var(--accent); }
.mark-s2 { fill: var(--series-s2); }
.mark-s3 { fill: var(--series-s3); }
.mark-s4 { fill: var(--series-s4); }
.mark-s5 { fill: var(--series-s5); }
.mark-s6 { fill: var(--series-s6); }
.viz-title { text-align: center; line-height: 1.45; margin: 0 0 8px; font-size: .9rem; color: var(--text-secondary); }
.viz-title div:first-child { font-weight: 600; font-size: 1.02rem; color: var(--text-primary); }
.viz-row:hover .viz-hit, .viz-row:focus .viz-hit { fill: var(--grid); fill-opacity: .45; }
.viz-row:focus { outline: none; }
.rate-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rate-table tr.is-bls td, .rate-table tr.is-bls th { color: var(--text-secondary); }
.rate-notes { font-size: .85rem; color: var(--text-secondary); padding-left: 18px; }

/* ---------- Reports form in three groups: what, period and comparison period, other hospitals (Dr. Gomaa 2026-10-28) ---------- */
.report-group { border: 1px solid var(--border); border-radius: 8px; padding: 6px 12px 10px; margin: 0 0 10px; }
.report-group legend { font-size: .85rem; font-weight: 600; color: var(--text-secondary); padding: 0 4px; }
.report-group .report-filters { margin-top: 6px; }
.note-latest { font-size: .9rem; margin: 4px 0 8px; }

/* ---------- left menu with the emblem (Basil 2026-11-03); on narrow screens a top bar whose menu opens below ---------- */
body { font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.shell { display: flex; min-height: 100vh; }
.side-nav { width: 248px; flex: none; box-sizing: border-box; position: sticky; top: 0; height: 100vh; overflow-y: auto;
            display: flex; flex-direction: column; padding: 18px 14px 14px; background: var(--surface-1); border-right: 1px solid var(--border); }
.side-body { display: flex; flex-direction: column; flex: 1; }
.side-top, .nav-toggle { display: none; }
.side-logo { display: block; padding: 0 14px 4px; }
.side-logo img { display: block; width: 100%; height: auto; }
.side-site { text-align: center; font-size: .82rem; color: var(--text-secondary); padding: 6px 4px 12px; border-bottom: 1px solid var(--border); margin-bottom: 10px; }
.side-nav nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav nav a { display: flex; gap: 12px; align-items: center; padding: 9px 12px; border-radius: 8px; color: #2b3647; text-decoration: none; font-weight: 500; }
.side-nav nav a:hover { background: var(--surface-2); }
.side-nav nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; box-shadow: inset 3px 0 0 var(--green); }
.side-nav nav a.nav-cta { background: var(--accent); color: var(--accent-ink); margin: 0 0 8px; }
.side-nav nav a.nav-cta:hover { background: #12336f; }
.side-nav nav a.nav-cta.active { box-shadow: inset 3px 0 0 var(--green); }
.nav-sep { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); margin: 14px 12px 4px; }
.nav-icon { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side-foot { margin-top: auto; padding: 12px 12px 0; border-top: 1px solid var(--border); font-size: .8rem; color: var(--text-secondary);
             display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; }
.side-foot a, .side-foot .btn-link { color: var(--accent); font-size: .8rem; text-align: left; }
.site-main { flex: 1; min-width: 0; padding: 26px 34px 48px; }
.site-main > .content { max-width: 1040px; margin: 0 auto; }
@media (max-width: 860px) {
    .shell { flex-direction: column; }
    .side-nav { width: auto; height: auto; max-height: 100vh; z-index: 20; padding: 8px 14px; border-right: 0; border-bottom: 1px solid var(--border); }
    .side-top { display: flex; align-items: center; justify-content: space-between; }
    .side-top a { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--accent); text-decoration: none; font-size: 1.1rem; }
    .side-top img { width: 26px; height: 30px; }
    .nav-burger { cursor: pointer; padding: 6px 12px; border: 1px solid var(--border); border-radius: 8px; color: var(--accent); font-weight: 600; }
    .side-body { display: none; padding-top: 8px; }
    .nav-toggle:checked ~ .side-body { display: flex; }
    .side-logo { display: none; }
    .side-foot { margin-top: 10px; }
    .site-main { padding: 16px 16px 40px; }
}
@media print { .side-nav { display: none; } .site-main { padding: 0; } }
