/* =========================================================================
   Point of Care Consults - Design System
   Modern replacement for the legacy ASP.NET LoggedInC.master chrome.
   ========================================================================= */

:root {
  --brand:        #0284c7;
  --brand-dark:   #0369a1;
  --brand-light:  #38bdf8;
  --brand-tint:   #f0f9ff;

  --ink:          #0f172a;
  --ink-soft:     #334155;
  --muted:        #64748b;
  --line:         #e2e8f0;
  --line-soft:    #f1f5f9;
  --surface:      #ffffff;
  --canvas:       #f4faff;   /* white, with a light-blue wash */

  --ok:           #059669;
  --ok-tint:      #ecfdf5;
  --warn:         #b45309;
  --warn-tint:    #fffbeb;
  --danger:       #dc2626;
  --danger-tint:  #fef2f2;
  --info:         #2563eb;
  --info-tint:    #eff6ff;

  --radius:       12px;
  --radius-lg:    16px;
  --shadow-sm:    0 1px 2px rgba(15, 23, 42, .06);
  --shadow:       0 4px 16px rgba(15, 23, 42, .08);
  --shadow-lg:    0 12px 32px rgba(15, 23, 42, .14);

  --sidebar-w:    286px;
  --topbar-h:     64px;

  --font: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.25; font-weight: 700; color: var(--ink); }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.12rem; }
h4 { font-size: 1rem; }
p  { margin: 0 0 1rem; }
a  { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }

/* Full-bleed: the site header and every homepage section span the viewport. */
.container {
  width: 100%;
  padding-inline: clamp(1rem, 2.5vw, 2.75rem);
  margin-inline: auto;
}
/* Reading-width wrapper kept for long-form copy and forms. */
.container-narrow { width: min(920px, 100% - 2.5rem); margin-inline: auto; }

.muted { color: var(--muted); }
.small { font-size: .84rem; }
.strong { font-weight: 600; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.hidden { display: none !important; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: .5rem; } .gap-2 { gap: 1rem; }
.items-center { align-items: center; }

/* ------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .62rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font: inherit; font-weight: 600; font-size: .92rem;
  cursor: pointer;
  text-decoration: none;
  transition: background .18s ease, transform .12s ease, box-shadow .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--brand-dark); text-decoration: none; color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid rgba(56, 189, 248, .45); outline-offset: 2px; }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }

.btn-outline { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-outline:hover { background: var(--brand); color: #fff; }
.btn-ghost { background: var(--line-soft); color: var(--ink-soft); }
.btn-ghost:hover { background: var(--line); color: var(--ink); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #b91c1c; }
.btn-success { background: var(--ok); }
.btn-success:hover { background: #047857; }
.btn-sm { padding: .38rem .7rem; font-size: .82rem; border-radius: 8px; }
.btn-lg { padding: .85rem 1.6rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* --------------------------------------------------------------- cards */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card-head {
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.card-head h2, .card-head h3 { margin: 0; }
.card-body { padding: 1.4rem; }
.card-foot { padding: 1rem 1.4rem; border-top: 1px solid var(--line); background: var(--line-soft); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }

/* ---------------------------------------------------------- stat tiles */
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; gap: 1rem;
}
.stat .stat-icon {
  width: 46px; height: 46px; flex: none;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--brand-tint); color: var(--brand);
  font-size: 1.15rem;
}
.stat .stat-value { font-size: 1.75rem; font-weight: 700; line-height: 1.1; }
.stat .stat-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; }
.stat.is-warn { border-left-color: var(--warn); }
.stat.is-warn .stat-icon { background: var(--warn-tint); color: var(--warn); }
.stat.is-ok { border-left-color: var(--ok); }
.stat.is-ok .stat-icon { background: var(--ok-tint); color: var(--ok); }
.stat.is-info { border-left-color: var(--info); }
.stat.is-info .stat-icon { background: var(--info-tint); color: var(--info); }

/* --------------------------------------------------------------- forms */
.form-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.field { display: flex; flex-direction: column; gap: .38rem; min-width: 0; }
.field.span-2 { grid-column: 1 / -1; }
.field > label {
  font-size: .82rem; font-weight: 600; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: .045em;
}
.field .req { color: var(--danger); margin-left: .15rem; }
.field .hint { font-size: .78rem; color: var(--muted); }

input[type="text"], input[type="email"], input[type="tel"], input[type="password"],
input[type="number"], input[type="date"], input[type="time"], input[type="search"],
select, textarea {
  width: 100%;
  padding: .62rem .8rem;
  font: inherit; font-size: .93rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  transition: border-color .16s ease, box-shadow .16s ease;
}
select { cursor: pointer; }
textarea { resize: vertical; min-height: 96px; line-height: 1.55; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand-light);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, .2);
}
input:disabled, select:disabled, textarea:disabled { background: var(--line-soft); color: var(--muted); cursor: not-allowed; }
input.is-invalid, select.is-invalid, textarea.is-invalid { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(220, 38, 38, .14); }
.field-error { font-size: .78rem; color: var(--danger); font-weight: 500; }

.check { display: flex; align-items: flex-start; gap: .6rem; font-size: .9rem; color: var(--ink-soft); }
.check input { width: 17px; height: 17px; margin-top: .18rem; accent-color: var(--brand); flex: none; }

.form-actions { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 1.4rem; }

.toolbar {
  display: flex; gap: .7rem; flex-wrap: wrap; align-items: flex-end;
  padding: 1rem 1.25rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 1.25rem;
}
.toolbar .field { flex: 1 1 200px; }

/* -------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 720px; }
table.data th {
  text-align: left; padding: .8rem 1rem;
  background: var(--line-soft); color: var(--ink-soft);
  font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.data td { padding: .8rem 1rem; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: #fbfdff; }
table.data .actions { display: flex; gap: .35rem; flex-wrap: wrap; }

.empty {
  padding: 2.75rem 1.5rem; text-align: center; color: var(--muted);
  background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius);
}
.empty i { font-size: 2rem; color: #cbd5e1; display: block; margin-bottom: .7rem; }

/* -------------------------------------------------------------- badges */
.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .22rem .6rem; border-radius: 999px;
  font-size: .74rem; font-weight: 700; letter-spacing: .03em;
  background: var(--line-soft); color: var(--ink-soft); white-space: nowrap;
}
.badge-ok      { background: var(--ok-tint);     color: var(--ok); }
.badge-warn    { background: var(--warn-tint);   color: var(--warn); }
.badge-danger  { background: var(--danger-tint); color: var(--danger); }
.badge-info    { background: var(--info-tint);   color: var(--info); }
.badge-brand   { background: var(--brand-tint);  color: var(--brand); }

.result-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .55rem 1.4rem; border-radius: 999px;
  font-size: 1.15rem; font-weight: 800; letter-spacing: .1em;
}
.result-badge.pass { background: var(--ok-tint); color: var(--ok); border: 2px solid var(--ok); }
.result-badge.fail { background: var(--danger-tint); color: var(--danger); border: 2px solid var(--danger); }
.result-badge.pending { background: var(--warn-tint); color: var(--warn); border: 2px solid var(--warn); }

.key-chip {
  display: inline-block; padding: .3rem .7rem; border-radius: 8px;
  background: #0f172a; color: #7dd3fc;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; letter-spacing: .06em;
}

/* ------------------------------------------------------------- alerts */
.alert {
  display: flex; gap: .8rem; align-items: flex-start;
  padding: .9rem 1.1rem; border-radius: var(--radius);
  border: 1px solid; font-size: .92rem; margin-bottom: 1.25rem;
}
.alert i { margin-top: .18rem; }
.alert-ok     { background: var(--ok-tint);     border-color: #a7f3d0; color: #065f46; }
.alert-warn   { background: var(--warn-tint);   border-color: #fde68a; color: #92400e; }
.alert-danger { background: var(--danger-tint); border-color: #fecaca; color: #991b1b; }
.alert-info   { background: var(--info-tint);   border-color: #bfdbfe; color: #1e40af; }

/* --------------------------------------------------------------- toast */
#toast-stack {
  position: fixed; top: 1rem; right: 1rem; z-index: 3000;
  display: flex; flex-direction: column; gap: .6rem; max-width: min(380px, calc(100vw - 2rem));
}
.toast {
  display: flex; gap: .7rem; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand);
  border-radius: 10px; box-shadow: var(--shadow-lg); padding: .85rem 1rem; font-size: .9rem;
  animation: toast-in .22s ease;
}
.toast.ok     { border-left-color: var(--ok); }
.toast.error  { border-left-color: var(--danger); }
.toast.warn   { border-left-color: var(--warn); }
.toast .toast-close { margin-left: auto; background: none; border: 0; cursor: pointer; color: var(--muted); font-size: 1rem; padding: 0 .2rem; }
@keyframes toast-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }

/* --------------------------------------------------------------- modal */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 2500;
  background: rgba(15, 23, 42, .55);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 4vh 1rem; overflow-y: auto;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  background: var(--surface); border-radius: var(--radius-lg);
  width: min(680px, 100%); box-shadow: var(--shadow-lg);
  animation: modal-in .2s ease;
}
.modal.modal-wide { width: min(1080px, 100%); }
@keyframes modal-in { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
.modal-head { padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.modal-head h3 { margin: 0; }
.modal-close { background: none; border: 0; font-size: 1.3rem; cursor: pointer; color: var(--muted); line-height: 1; }
.modal-close:hover { color: var(--ink); }
.modal-body { padding: 1.4rem; }
.modal-foot { padding: 1rem 1.4rem; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: .7rem; flex-wrap: wrap; }

/* ====================================================== PORTAL CHROME */
.portal { min-height: 100vh; }

.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 1200;
  background: linear-gradient(178deg, #075985 0%, #0284c7 100%);
  color: #e0f2fe; display: flex; flex-direction: column;
  transition: transform .25s ease;
}
.sidebar-brand { padding: 1.15rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,.13); }
.sidebar-brand .logo { display: flex; align-items: center; gap: .7rem; color: #fff; text-decoration: none; }
.sidebar-brand .logo-mark {
  width: 40px; height: 40px; flex: none; border-radius: 11px;
  background: rgba(255,255,255,.15); display: grid; place-items: center;
  font-size: 1.15rem; color: #fff;
}
.sidebar-brand .logo-text strong { display: block; font-size: .98rem; letter-spacing: .01em; line-height: 1.2; }
.sidebar-brand .logo-text span { font-size: .7rem; opacity: .8; letter-spacing: .07em; text-transform: uppercase; }

.sidebar-user { padding: .9rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,.13); font-size: .82rem; }
.sidebar-user .welcome { text-transform: uppercase; letter-spacing: .08em; font-size: .68rem; opacity: .75; }
.sidebar-user .who { font-weight: 700; color: #fff; font-size: .95rem; margin: .15rem 0; }
.sidebar-user .meta { opacity: .82; font-size: .76rem; }
.sidebar-user .logout {
  display: inline-flex; align-items: center; gap: .45rem; margin-top: .7rem;
  padding: .34rem .8rem; border-radius: 8px; font-size: .78rem; font-weight: 600;
  background: rgba(255,255,255,.14); color: #fff; text-decoration: none;
}
.sidebar-user .logout:hover { background: rgba(255,255,255,.26); text-decoration: none; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: .8rem 0 1.6rem; }
.sidebar-nav .nav-title {
  padding: .5rem 1.25rem; font-size: .68rem; letter-spacing: .14em;
  text-transform: uppercase; opacity: .62; font-weight: 700;
}
.sidebar-nav a {
  display: flex; align-items: center; gap: .7rem;
  padding: .58rem 1.25rem; color: #dbeafe; text-decoration: none;
  font-size: .82rem; font-weight: 500; line-height: 1.3;
  border-left: 3px solid transparent; transition: background .15s ease, color .15s ease;
}
.sidebar-nav a .idx {
  flex: none; width: 21px; height: 21px; border-radius: 6px;
  background: rgba(255,255,255,.11); display: grid; place-items: center;
  font-size: .66rem; font-weight: 700;
}
.sidebar-nav a i.fa-solid { flex: none; width: 18px; text-align: center; font-size: .88rem; opacity: .9; }
.sidebar-nav a:hover { background: rgba(255,255,255,.1); color: #fff; text-decoration: none; }
.sidebar-nav a.active { background: rgba(255,255,255,.17); color: #fff; border-left-color: var(--brand-light); font-weight: 700; }
.sidebar-nav .nav-sep { height: 1px; background: rgba(255,255,255,.13); margin: .7rem 1.25rem; }

.portal-main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  height: var(--topbar-h); position: sticky; top: 0; z-index: 1100;
  background: rgba(255,255,255,.94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 1rem; padding: 0 1.5rem;
}
.topbar .page-title { font-size: 1.02rem; font-weight: 700; margin: 0; }
.topbar .spacer { flex: 1; }
.topbar .topbar-meta { display: flex; align-items: center; gap: 1rem; font-size: .82rem; color: var(--muted); }
.topbar .avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--brand); color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: .85rem;
}
.menu-toggle {
  display: none; background: var(--line-soft); border: 1px solid var(--line);
  width: 38px; height: 38px; border-radius: 10px; cursor: pointer; color: var(--ink-soft); font-size: 1rem;
}

.portal-content {
  padding: 2rem 2.25rem 3.5rem;
  flex: 1;
  max-width: 1560px;
  width: 100%;
  margin-inline: auto;
}

.page-head { margin-bottom: 1.75rem; }
.page-head h1 { margin-bottom: .4rem; font-size: 1.85rem; font-weight: 800; }
.page-head p { color: var(--muted); margin: 0; font-size: 1.05rem; }
.page-head .legacy { font-size: .78rem; color: #94a3b8; letter-spacing: .04em; }

.sidebar-scrim { position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 1150; display: none; }
.sidebar-scrim.show { display: block; }

/* ---------------------------------------------------- subject cards */
.subject-grid { display: grid; gap: 1.35rem; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.subject-card {
  border: 2px solid var(--brand-light);
  border-radius: 16px;
  background: var(--surface);
  padding: 1.5rem 1.4rem;
  display: flex; flex-direction: column; gap: .85rem;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.subject-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(56, 189, 248,.24); background: #fbfeff; }
.subject-card .sc-num {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: var(--brand-tint); color: var(--brand); font-weight: 800; font-size: .95rem;
}
.subject-card h3 { font-size: 1.15rem; margin: 0; letter-spacing: .01em; font-weight: 700; line-height: 1.3; }
.subject-card p { font-size: .95rem; color: var(--muted); margin: 0; flex: 1; line-height: 1.55; }
.subject-card .btn { align-self: flex-start; margin-top: .4rem; font-size: .9rem; padding: .5rem 1rem; font-weight: 700; }

/* ------------------------------------------------------- staff cards */
.staff-grid { display: grid; gap: 1.15rem; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); }
.staff-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.35rem 1.2rem; text-align: center; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.staff-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.staff-photo {
  width: 84px; height: 84px; border-radius: 50%; margin: 0 auto .85rem;
  object-fit: cover; border: 3px solid var(--brand-tint); background: var(--brand-tint);
  display: grid; place-items: center; color: var(--brand); font-size: 1.5rem; font-weight: 700;
}
.staff-card h3 { font-size: 1.02rem; margin: 0 0 .2rem; }
.staff-card .tags { display: flex; gap: .35rem; justify-content: center; flex-wrap: wrap; margin: .55rem 0; }
.staff-card .contact { font-size: .82rem; color: var(--ink-soft); display: grid; gap: .3rem; margin-top: .7rem; text-align: left; }
.staff-card .contact div { display: flex; align-items: center; gap: .5rem; }
.staff-card .contact i { color: var(--brand); width: 14px; text-align: center; }

/* --------------------------------------------------------- dropzone */
.dropzone {
  border: 2px dashed #94a3b8; border-radius: var(--radius-lg);
  padding: 2.25rem 1.5rem; text-align: center; cursor: pointer;
  background: var(--line-soft); transition: border-color .18s ease, background .18s ease;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--brand-light); background: var(--brand-tint); }
.dropzone i { font-size: 2.1rem; color: var(--brand); display: block; margin-bottom: .6rem; }
.dropzone .dz-title { font-weight: 700; margin-bottom: .25rem; }
.dropzone .dz-hint { font-size: .82rem; color: var(--muted); }
.dropzone input[type="file"] { display: none; }
.dz-file {
  margin-top: 1rem; padding: .8rem 1rem; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line);
  display: flex; align-items: center; gap: .8rem; text-align: left;
}
.dz-file i { font-size: 1.4rem; margin: 0; }
.dz-file .dz-name { font-weight: 600; font-size: .9rem; word-break: break-all; }

/* ------------------------------------------------------- book cards */
.book-grid { display: grid; gap: 1.3rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.book-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: transform .18s ease, box-shadow .18s ease; }
.book-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.book-cover { height: 168px; display: grid; place-items: center; color: #fff; font-size: 3rem; }
.book-card .book-body { padding: 1.1rem; flex: 1; display: flex; flex-direction: column; gap: .4rem; }
.book-card h3 { font-size: .98rem; margin: 0; }
.book-card .book-actions { display: flex; gap: .5rem; padding: 0 1.1rem 1.1rem; flex-wrap: wrap; }

/* ------------------------------------------------------ video cards */
.video-player { background: #000; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.video-player video { width: 100%; display: block; aspect-ratio: 16 / 9; background: #000; }
.video-placeholder {
  aspect-ratio: 16 / 9; display: grid; place-items: center; text-align: center;
  background: linear-gradient(135deg, #075985, #0284c7); color: #e0f2fe; padding: 2rem;
}
.video-placeholder i { font-size: 3rem; margin-bottom: .8rem; }
.video-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); }
.video-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease; }
.video-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.video-card.active { border-color: var(--brand-light); box-shadow: 0 0 0 3px rgba(56, 189, 248,.24); }
.video-thumb { aspect-ratio: 16/9; background: linear-gradient(135deg, #0284c7, #38bdf8); display: grid; place-items: center; color: #fff; font-size: 2rem; position: relative; }
.video-thumb .duration { position: absolute; right: .5rem; bottom: .5rem; background: rgba(0,0,0,.7); color: #fff; font-size: .72rem; padding: .12rem .45rem; border-radius: 5px; }
.video-card .video-meta { padding: .9rem 1rem; }
.video-card h4 { margin: 0 0 .25rem; font-size: .92rem; }

/* ------------------------------------------------------ safety test */
.test-shell { max-width: 980px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
.test-header {
  background: linear-gradient(135deg, #075985, #0284c7); color: #fff;
  border-radius: var(--radius-lg); padding: 1.75rem; margin-bottom: 1.5rem; box-shadow: var(--shadow);
}
.test-header h1 { color: #fff; margin-bottom: .35rem; }
.test-header .test-meta { display: flex; gap: 1.75rem; flex-wrap: wrap; margin-top: 1.1rem; font-size: .86rem; }
.test-header .test-meta .label { display: block; text-transform: uppercase; letter-spacing: .08em; font-size: .67rem; opacity: .78; }
.test-header .test-meta .value { font-weight: 700; font-size: .96rem; }

.test-section { margin-bottom: 1.5rem; }
.test-section-head {
  background: var(--brand-tint); border-left: 4px solid var(--brand);
  padding: .7rem 1.1rem; border-radius: 8px; margin-bottom: 1rem;
  font-weight: 700; color: var(--brand-dark); font-size: .92rem;
  text-transform: uppercase; letter-spacing: .05em;
}
.question {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem; margin-bottom: .9rem;
}
.question.unanswered { border-color: #fca5a5; background: #fffbfb; }
.question .q-head { display: flex; gap: .8rem; margin-bottom: .75rem; }
.question .q-num {
  flex: none; width: 30px; height: 30px; border-radius: 8px;
  background: var(--brand); color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: .84rem;
}
.question .q-text { font-weight: 600; color: var(--ink); line-height: 1.5; }
.tf-options { display: flex; gap: .8rem; flex-wrap: wrap; }
.tf-option {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .5rem 1.1rem; border: 1px solid #cbd5e1; border-radius: 9px;
  cursor: pointer; font-weight: 600; font-size: .9rem; background: #fff;
  transition: all .16s ease;
}
.tf-option:hover { border-color: var(--brand-light); background: var(--brand-tint); }
.tf-option input { accent-color: var(--brand); }
.tf-option:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); color: var(--brand-dark); }

.progress-bar { position: sticky; top: 0; z-index: 900; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1.1rem; margin-bottom: 1.25rem; box-shadow: var(--shadow-sm); }
.progress-track { height: 8px; background: var(--line-soft); border-radius: 999px; overflow: hidden; margin-top: .5rem; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-light)); width: 0%; transition: width .25s ease; }

/* ------------------------------------------------------- Q&A review */
.qa-row {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.15rem; margin-bottom: .75rem; background: var(--surface);
}
.qa-row .qa-q { font-weight: 600; margin-bottom: .5rem; display: flex; gap: .7rem; }
.qa-row .qa-q .n { flex: none; width: 26px; height: 26px; border-radius: 7px; background: var(--line-soft); color: var(--ink-soft); display: grid; place-items: center; font-size: .78rem; font-weight: 700; }
.qa-row .qa-a { background: var(--brand-tint); border-left: 3px solid var(--brand-light); padding: .6rem .85rem; border-radius: 0 8px 8px 0; font-size: .9rem; white-space: pre-wrap; }
.qa-row .qa-guide { margin-top: .55rem; font-size: .82rem; color: var(--muted); background: var(--line-soft); padding: .55rem .85rem; border-radius: 8px; }
.qa-row .qa-guide strong { color: var(--ink-soft); }

/* -------------------------------------------------------- calendar */
.calendar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.calendar-head { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--line-soft); }
.calendar-head div { padding: .6rem; text-align: center; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-cell { min-height: 104px; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); padding: .45rem; font-size: .78rem; }
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell.other { background: #fafbfc; color: #cbd5e1; }
.cal-cell.today { background: var(--brand-tint); }
.cal-cell .day { font-weight: 700; color: var(--ink-soft); margin-bottom: .3rem; }
.cal-event { display: block; font-size: .68rem; padding: .16rem .35rem; border-radius: 5px; margin-bottom: .2rem; background: var(--info-tint); color: var(--info); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-event.test { background: var(--brand-tint); color: var(--brand-dark); }

/* ================================================== PUBLIC WEBSITE */
.topbar-strip { background: var(--brand-dark); color: #e0f2fe; font-size: .8rem; }
.topbar-strip .container { display: flex; align-items: center; gap: 1.25rem; flex-wrap: nowrap; white-space: nowrap; overflow: hidden; padding-block: .5rem; }
.topbar-strip span { display: inline-flex; align-items: center; gap: .4rem; }
.topbar-strip .spacer { flex: 1; }
.topbar-strip a { color: #fff; font-weight: 700; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1000; box-shadow: var(--shadow-sm); }
.site-header .container { display: flex; align-items: center; gap: 1rem; padding-block: .8rem; flex-wrap: nowrap; }
.site-logo { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); flex: none; }
.site-logo .logo-mark { width: 38px; height: 38px; flex: none; border-radius: 11px; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 1.1rem; }
.site-logo strong { display: block; font-size: .95rem; line-height: 1.2; white-space: nowrap; }
.site-logo span { font-size: .66rem; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; white-space: nowrap; }

/* One row, never wrapping: the links + login button stay on a single line. */
.site-nav {
  margin-left: auto;
  display: flex; align-items: center;
  gap: .2rem; flex-wrap: nowrap; white-space: nowrap;
}
.site-nav a {
  padding: .5rem .65rem; border-radius: 8px;
  font-size: .88rem; font-weight: 600; color: var(--ink-soft);
  white-space: nowrap; transition: background .15s ease, color .15s ease;
}
.site-nav a:hover { background: var(--brand-tint); color: var(--brand); text-decoration: none; }
.site-nav a.active { color: var(--brand); background: var(--brand-tint); }

.nav-btn-login {
  display: inline-flex; align-items: center; gap: .5rem;
  margin-left: .65rem; padding: .52rem 1.15rem; border-radius: 9999px;
  font-size: .88rem; font-weight: 700; color: #ffffff !important;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: 1px solid rgba(255, 255, 255, .3);
  box-shadow: 0 4px 14px rgba(2, 132, 199, .28);
  text-decoration: none !important; transition: all .2s ease;
  white-space: nowrap; flex: none;
}
.nav-btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(2, 132, 199, .42);
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  color: #ffffff !important;
}
.nav-btn-login.is-portal {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  box-shadow: 0 4px 14px rgba(5, 150, 105, .28);
}
.nav-btn-login.is-portal:hover {
  background: linear-gradient(135deg, #047857 0%, #065f46 100%);
  box-shadow: 0 6px 20px rgba(5, 150, 105, .4);
}
.nav-btn-login .nav-btn-icon {
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(255, 255, 255, .22);
  display: grid; place-items: center; font-size: .75rem;
}

.site-nav .has-children { position: relative; }
.site-nav .dropdown {
  position: absolute; top: calc(100% + .4rem); left: 0; min-width: 230px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: .4rem; display: none; z-index: 20;
}
.site-nav .has-children:hover .dropdown, .site-nav .has-children:focus-within .dropdown { display: block; }
.site-nav .dropdown a { display: block; }
.nav-toggle { display: none; margin-left: auto; background: var(--line-soft); border: 1px solid var(--line); width: 40px; height: 40px; border-radius: 10px; cursor: pointer; font-size: 1.05rem; color: var(--ink-soft); }

.hero {
  background: linear-gradient(140deg, #05486e 0%, #0284c7 55%, #38bdf8 135%);
  color: #fff; padding: 4.5rem 0 4rem; position: relative; overflow: hidden;
}
.hero-grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem; align-items: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .35rem .95rem; background: rgba(255, 255, 255, .15);
  border: 1px solid rgba(255, 255, 255, .25); border-radius: 9999px;
  font-size: .82rem; font-weight: 700; color: #e0f2fe;
  letter-spacing: .04em; margin-bottom: 1.25rem;
}
.hero-badge-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #38bdf8; box-shadow: 0 0 10px #38bdf8;
}
.hero h1 {
  color: #ffffff; font-size: clamp(2.3rem, 4.2vw, 3.25rem);
  font-weight: 800; line-height: 1.18; letter-spacing: -0.025em; margin-bottom: 1.2rem;
}
.hero p.lead {
  font-size: 1.15rem; line-height: 1.68; color: #e0f2fe;
  max-width: 54ch; margin-bottom: 2rem;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.8rem; }
.btn-hero-primary {
  background: #ffffff !important; color: #0369a1 !important;
  font-weight: 800; border: none !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18); padding: .95rem 1.85rem; border-radius: 12px;
}
.btn-hero-primary:hover {
  background: #f8fafc !important; color: #075985 !important;
  transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0, 0, 0, .25);
}
.btn-hero-outline {
  background: rgba(255, 255, 255, .12) !important; color: #ffffff !important;
  border: 1.5px solid rgba(255, 255, 255, .6) !important; font-weight: 700;
  backdrop-filter: blur(8px); padding: .95rem 1.85rem; border-radius: 12px;
}
.btn-hero-outline:hover {
  background: rgba(255, 255, 255, .25) !important; color: #ffffff !important;
  border-color: #ffffff !important; transform: translateY(-2px);
}
.hero-highlights {
  display: flex; gap: 1.4rem; flex-wrap: wrap;
  font-size: .88rem; font-weight: 600; color: #bae6fd;
}
.hero-highlights span { display: inline-flex; align-items: center; gap: .45rem; }
.hero-highlights i { color: #38bdf8; }

/* Hero visual card */
.hero-visual { position: relative; }
.hero-image-frame {
  position: relative; border-radius: 20px; overflow: visible;
  box-shadow: 0 25px 50px -12px rgba(3, 105, 161, .4);
}
.hero-img {
  width: 100%; height: auto; display: block; border-radius: 20px;
  border: 3px solid rgba(255, 255, 255, .35); box-shadow: 0 20px 40px rgba(0, 0, 0, .28);
  object-fit: cover; aspect-ratio: 4 / 3;
}
.hero-float-badge {
  position: absolute; background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 14px; padding: .7rem 1rem; display: flex;
  align-items: center; gap: .75rem; box-shadow: 0 14px 28px rgba(15, 23, 42, .18);
  color: var(--ink); z-index: 10;
}
.hero-float-badge.badge-top-right { top: -14px; right: -14px; }
.hero-float-badge.badge-bottom-left { bottom: -14px; left: -14px; }
.hero-float-badge strong { display: block; font-size: .88rem; line-height: 1.2; color: var(--ink); }
.hero-float-badge span { display: block; font-size: .74rem; color: var(--muted); font-weight: 600; }
.hero-float-badge .float-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: grid; place-items: center; font-size: .95rem; flex: none;
}
.hero-float-badge .float-icon.ok { background: #ecfdf5; color: #059669; }
.hero-float-badge .float-icon.brand { background: #eff6ff; color: #0284c7; }

.hero-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1.25rem; margin-top: 3.5rem;
}
.hero-stat {
  background: rgba(255, 255, 255, .14); backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, .24); border-radius: 16px;
  padding: 1.25rem 1.4rem; transition: transform .2s ease, background .2s ease;
}
.hero-stat:hover { transform: translateY(-3px); background: rgba(255, 255, 255, .2); }
.hero-stat .v { font-size: 2.1rem; font-weight: 800; line-height: 1.1; margin-bottom: .35rem; }
.hero-stat .l { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; opacity: .9; font-weight: 600; }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-visual { max-width: 520px; margin: 0 auto; }
  .hero-float-badge.badge-top-right { right: 0; }
  .hero-float-badge.badge-bottom-left { left: 0; }
}

.section { padding: 3.5rem 0; }
.section.alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { text-align: center; max-width: 62ch; margin: 0 auto 2.5rem; }
.section-head .eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .76rem; font-weight: 700; color: var(--brand); margin-bottom: .5rem; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.section-head p { color: var(--muted); margin-bottom: 0; }

.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.6rem; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature .icon { width: 50px; height: 50px; border-radius: 13px; background: var(--brand-tint); color: var(--brand); display: grid; place-items: center; font-size: 1.25rem; margin-bottom: 1rem; }
.feature h3 { font-size: 1.05rem; }
.feature ul { margin: .8rem 0 0; padding-left: 1.15rem; color: var(--ink-soft); font-size: .88rem; }
.feature ul li { margin-bottom: .35rem; }

.cta-band { background: linear-gradient(135deg, #0284c7, #075985); color: #fff; padding: 3rem 0; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #e0f2fe; max-width: 60ch; margin-inline: auto; }

.site-footer { background: #0c1e2e; color: #94a3b8; padding: 3rem 0 1.5rem; font-size: .88rem; }
.site-footer h4 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 1rem; }
.site-footer a { color: #cbd5e1; display: block; padding: .18rem 0; }
.site-footer a:hover { color: var(--brand-light); }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 2rem; padding-top: 1.25rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .82rem; }

/* --------------------------------------------------------- auth page */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 0.85fr; }
.auth-art {
  color: #fff; padding: 3.5rem; display: flex; flex-direction: column; justify-content: center;
  position: relative;
}
.auth-art h2 { color: #fff; font-size: 2.1rem; }
.auth-art ul { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: .9rem; }
.auth-art li { display: flex; gap: .8rem; align-items: flex-start; color: #e0f2fe; font-size: 1rem; }
.auth-art li i { color: var(--brand-light); margin-top: .25rem; }
.auth-form-wrap { display: grid; place-items: center; padding: 2.5rem 1.5rem; background: var(--canvas); }
.auth-card { width: min(460px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 2.5rem; box-shadow: var(--shadow); }

.password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.password-wrap input {
  padding-right: 2.8rem !important;
}
.btn-toggle-password {
  position: absolute;
  right: 0.75rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 1.05rem;
  padding: 0.4rem;
  display: grid;
  place-items: center;
  border-radius: 6px;
  transition: color 0.15s ease;
}
.btn-toggle-password:hover {
  color: var(--ink);
}

/* ------------------------------------------------------- error page */
.error-shell { min-height: 100vh; display: grid; place-items: center; padding: 2rem; text-align: center; }
.error-code { font-size: 5.5rem; font-weight: 800; color: var(--brand); line-height: 1; }

/* ------------------------------------------------------- responsive */
@media (max-width: 1024px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-art { display: none; }
}

/* Below this width the links can no longer share one row - use the drawer. */
@media (max-width: 1240px) {
  .topbar-strip .container { flex-wrap: wrap; white-space: normal; overflow: visible; }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: .6rem 1.25rem 1rem; gap: .1rem;
    box-shadow: var(--shadow);
  }
  .site-nav.open { display: flex; }
  .site-nav .dropdown { position: static; display: block; border: 0; box-shadow: none; padding: 0 0 0 1rem; }
  .nav-toggle { display: block; }
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .portal-main { margin-left: 0; }
  .menu-toggle { display: block; }
  .portal-content { padding: 1.25rem 1rem 2.5rem; }
  .topbar { padding: 0 1rem; }
}

@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .hero { padding: 3rem 0 2.5rem; }
  .section { padding: 2.5rem 0; }
  .card-body, .modal-body { padding: 1.1rem; }
  .test-shell { padding: 1.25rem .9rem 3rem; }
  .test-header { padding: 1.25rem; }
  .form-actions .btn { flex: 1 1 100%; }
  .cal-cell { min-height: 72px; font-size: .7rem; }
}

@media print {
  .sidebar, .topbar, .site-header, .topbar-strip, .site-footer, .form-actions, .btn, .toolbar { display: none !important; }
  .portal-main { margin-left: 0; }
  body { background: #fff; }
  .card, .qa-row { box-shadow: none; border-color: #cbd5e1; }
}

/* ------------------------------------- OSHA manual: fillable paper forms */
/* The legacy manual is a printed binder. The sheet keeps that reading feel
   while every underscore run from the original becomes a real input. */
.manual-sheet .card-body {
  max-width: 84rem;
  margin-inline: auto;
  padding: 2.75rem 3.5rem;
}
.ml-h2 {
  font-size: 1.35rem; letter-spacing: .035em; text-transform: uppercase;
  color: #0369a1; border-bottom: 2px solid #bae6fd;
  padding-bottom: .65rem; margin: 2.5rem 0 1.25rem; font-weight: 800;
}
.ml-h2:first-child { margin-top: 0; }
.ml-h3 { font-size: 1.22rem; color: var(--ink); margin: 2rem 0 .8rem; font-weight: 700; }
.ml-p { font-size: 1.12rem; line-height: 2.2; color: #1e293b; margin: 0 0 1.25rem; font-weight: 450; }
.ml-list { font-size: 1.12rem; line-height: 2.2; color: #1e293b; padding-left: 1.65rem; margin: 0 0 1.35rem; }
.ml-list li { margin-bottom: .45rem; }
.ml-note {
  font-size: 1.1rem; line-height: 2.15; background: var(--brand-tint); border-left: 4px solid var(--brand);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 1.1rem 1.45rem; margin: 0 0 1.35rem;
  color: var(--ink);
}
.ml-table { margin: 0 0 1.5rem; font-size: 1.05rem; }
.ml-table td { vertical-align: middle; padding: .85rem 1rem; }

/* Element-qualified so these beat the global input[type=...] box styling. */
input.ml-input, textarea.ml-input {
  display: inline-block; vertical-align: baseline; width: auto;
  border: 0; border-bottom: 2px solid #0284c7; border-radius: 0;
  background: rgba(2, 132, 199, 0.05); padding: .15rem .5rem; margin: 0 .2rem;
  font: inherit; font-size: 1.12rem; font-weight: 600; color: #0369a1;
  min-width: 5.5rem; max-width: 100%; box-shadow: none;
  transition: background .15s ease, border-color .15s ease;
}
input.ml-input::placeholder { color: #94a3b8; font-weight: 400; opacity: .75; font-size: .95rem; }
input.ml-input:focus, textarea.ml-input:focus {
  outline: 0; box-shadow: none;
  background: #e0f2fe; border-bottom-color: #0369a1;
}
input.ml-date { width: 11.5rem; min-width: 11.5rem; }
textarea.ml-long {
  display: block; width: 100%; min-height: 0; margin: .55rem 0;
  border: 1.5px solid var(--line); border-radius: var(--radius); padding: .7rem .9rem;
  font-weight: 500; font-size: 1.08rem; line-height: 1.65;
}

/* Read-only rendering after submit: the answer sits on the original blank. */
.ml-filled {
  display: inline-block; min-width: 5.5rem; padding: .15rem .5rem;
  border-bottom: 2px solid #0284c7;
  font-size: 1.12rem; font-weight: 600; color: #0369a1;
}
.ml-filled.is-empty { border-bottom-style: dashed; border-bottom-color: #94a3b8; }

.manual-actions { position: sticky; bottom: 1rem; z-index: 5; box-shadow: var(--shadow-md, 0 6px 24px rgba(2,132,199,.14)); }

.progress { height: 7px; background: var(--line-soft); border-radius: 999px; overflow: hidden; margin: .5rem 0 .75rem; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-light)); }
.stat-big { font-size: 1.5rem; font-weight: 800; color: var(--brand-dark); line-height: 1.1; }

@media print {
  .sidebar, .topbar, .manual-actions, .btn, .sidebar-scrim { display: none !important; }
  .portal-main, .portal-content { margin: 0; padding: 0; }
  .ml-input { border-bottom: 1px solid #333; color: #000; }
}
