:root {
  --ink: #171b1a;
  --ink-muted: #5b655f;
  --border: #e4e7ef;
  --bg: #f5f7fb;
  /* dentec brand: navy + red (variable names kept from ZahnRoute) */
  --teal: #1B2A5E;
  --teal-dark: #121d44;
  --teal-tint: #eaeef8;
  --red: #D63C3C;
  --red-dark: #b92f2f;
  --red-tint: #fbeaea;
  --white: #ffffff;
  --danger: #b02367;
  --danger-tint: #fce8f1;
  --success: #0f9d58;
  --success-tint: #e6f6ec;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-dark); }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
}
.topbar-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; }
.topbar-logo { width: 26px; height: 26px; object-fit: contain; }
.topbar-nav { display: flex; gap: 16px; flex-grow: 1; margin-inline-start: 24px; }
.topbar-user { display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--ink-muted); }

/* Notification bell + list */
.notif-bell { position: relative; display: inline-flex; align-items: center; color: var(--ink-muted); padding: 4px; }
.notif-bell:hover { color: var(--teal-dark); }
.notif-badge {
  position: absolute; top: -4px; inset-inline-end: -6px;
  min-width: 17px; height: 17px; padding: 0 4px; box-sizing: border-box;
  border-radius: 999px; background: var(--danger); color: var(--white);
  font-size: 10px; font-weight: 700; line-height: 17px; text-align: center;
}
.notif-badge[hidden] { display: none; }
.notif-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.notif-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--border); color: var(--ink); text-decoration: none; background: var(--white); }
.notif-item:first-child { border-top: none; }
.notif-item:hover { background: var(--bg); }
.notif-item.unread { background: var(--teal-tint); }
.notif-dot { flex: 0 0 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: transparent; }
.notif-item.unread .notif-dot { background: var(--teal); }
.notif-main { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.notif-title { font-weight: 700; font-size: 14px; }
.notif-body { font-size: 13px; color: var(--ink-muted); }
.notif-time { font-size: 12px; color: var(--ink-muted); white-space: nowrap; }
.lang-switcher-label {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.lang-switcher {
  width: auto;
  padding: 4px 8px;
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
}

/* RTL (Arabic): flip a handful of layouts that use a fixed left/right rather
   than a logical direction. Most of the app (flexbox, text-align defaults)
   mirrors automatically just from the <html dir="rtl"> attribute. */
[dir="rtl"] .tooth-actions,
[dir="rtl"] .job-order-instruction,
[dir="rtl"] .teeth-summary { text-align: inherit; }
[dir="rtl"] th { text-align: right; }

.page { max-width: 1100px; margin: 0 auto; padding: 24px; }
.page.page-wide { max-width: 1320px; }

.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.alert-success { background: var(--success-tint); color: var(--success); }
.alert-error { background: var(--danger-tint); color: var(--danger); }

/* Login page: one clean white card, logo on top, form below — the official
   logo artwork is teal-on-transparent, designed for a light background. */
.auth-card {
  max-width: 360px;
  margin: 60px auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
}
.auth-logo-band { text-align: center; margin-bottom: 20px; }
.auth-logo-band img { max-width: 220px; width: 100%; height: auto; display: block; margin: 0 auto; }
.auth-card h1 { margin-top: 0; font-size: 20px; }

form label { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 4px; }
form input, form select, form textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
}
form button, .btn {
  display: inline-block;
  margin-top: 18px;
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  background: var(--teal);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
form button:hover, .btn:hover { background: var(--teal-dark); }
.btn-secondary { background: var(--white); color: var(--ink); border: 1px solid var(--border); }

table { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
th, td { text-align: left; padding: 10px 14px; font-size: 14px; border-top: 1px solid var(--border); }
th { border-top: none; background: var(--bg); font-size: 12px; text-transform: uppercase; color: var(--ink-muted); }

.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.badge-neutral { background: #e7ebef; color: #52606d; }
.badge-progress { background: var(--teal-tint); color: var(--teal-dark); }
.badge-shipped { background: var(--success-tint); color: var(--success); }
.badge-warn { background: #fdf1dc; color: #b4530a; }

.card { background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin-bottom: 20px; }

/* New-case page: form on the left, world-clock sidebar on the right */
.new-case-layout { display: flex; align-items: flex-start; gap: 24px; }
.new-case-layout .job-order-form { flex: 0 1 760px; margin: 0; }
.world-clocks { flex: 1 1 220px; position: sticky; top: 24px; display: flex; flex-direction: column; gap: 12px; }
.world-clocks .section-band { margin-bottom: 0; }
.clock-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}
.clock-card .clock-location { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: var(--ink-muted); margin-bottom: 6px; }
.clock-card .clock-time { font-size: 28px; font-weight: 700; color: var(--teal-dark); font-variant-numeric: tabular-nums; }
.clock-card .clock-date { font-size: 12px; color: var(--ink-muted); margin-top: 4px; }
@media (max-width: 960px) {
  .new-case-layout { flex-direction: column; }
  .world-clocks { position: static; width: 100%; flex-direction: row; flex-wrap: wrap; }
  .world-clocks .section-band { flex-basis: 100%; }
  .clock-card { flex: 1 1 160px; }
}
@media print {
  .world-clocks { display: none !important; }
}

/* Job-order-style forms (New case, and the printed job order) */
.job-order-form { max-width: 760px; }
.form-section { margin-bottom: 22px; }
.section-band {
  background: var(--teal);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 8px 12px;
  border-radius: 8px 8px 0 0;
  margin-top: 0;
}
.form-section .form-grid,
.form-section > label:first-of-type { margin-top: 0; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 8px 8px;
  padding: 4px 16px 16px;
}
.form-section .hint { color: var(--ink-muted); font-size: 13px; margin: 10px 0 0; }
.tooth-chart-wrap {
  background: var(--bg);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 8px 8px;
  padding: 16px;
}
/* Every tooth sits at the exact left/top/width/height (all percentages of
   this container) taken from the reference chart's own layout — see
   tooth_position_table() and tooth_shape_table() in functions.php — so the
   whole thing is genuinely one tall horseshoe (both arches together, front
   teeth at the poles, molars down the sides) rather than two shallow rows,
   and each tooth is already sized proportionally to how big it really is. */
.tooth-chart {
  position: relative;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  aspect-ratio: 377 / 618;
}
.arch-label {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-weight: 700;
  font-size: 13px;
  color: var(--ink-muted);
  white-space: nowrap;
}
.upper-arch-label { top: 47%; }
.lower-arch-label { top: 56%; }
.tooth {
  position: absolute;
  transform: translate(-50%, -50%);
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  display: block;
}
.tooth-svg { width: 100%; height: 100%; display: block; overflow: visible; }
/* Positioned by render_tooth_chart() at its own left/top, pushed radially
   outward from the chart's centre past that tooth's own size — not simply
   "above"/"below" — so it clears whichever neighbouring tooth happens to
   be bigger instead of getting tucked behind it. */
.tooth-num {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  color: var(--ink-muted);
  white-space: nowrap;
  pointer-events: none;
}
.tooth-num.selected { color: var(--teal-dark); font-weight: 800; }
/* Each tooth is a filled occlusal-view blob (not a stroke-only outline) so
   it reads the same way the reference job-order chart's teeth do: white
   when untouched, colored once a work type is assigned via the popover in
   create_case.php. The fissure shapes are small filled details
   layered on top for the biting-surface groove look. */
.tooth-outline {
  fill: var(--white);
  stroke: #7a7a7a;
  stroke-width: 1;
  stroke-linejoin: round;
}
.tooth-fissure {
  fill: #adadad;
  stroke: #d9d9d9;
  stroke-width: 0.5;
}
.tooth:hover .tooth-outline { stroke: var(--teal); }
.tooth.has-work .tooth-fissure { fill: rgba(255, 255, 255, 0.55); stroke: rgba(255, 255, 255, 0.3); }
/* One color per kind of work — see tooth_work_types() in functions.php,
   which is the single source of truth these colors are copied from.
   "legacy" is the plain brand-teal look older case records (saved before
   this feature existed, with no work-type information at all) still get. */
.tooth.work-crown .tooth-outline       { fill: #0f6e5c; stroke: #0b5c4d; }
.tooth.work-pontic .tooth-outline      { fill: #7c5cff; stroke: #5c3ce0; }
.tooth.work-veneer .tooth-outline      { fill: #e0a100; stroke: #b98400; }
.tooth.work-inlay_onlay .tooth-outline { fill: #2f7fd1; stroke: #1f63aa; }
.tooth.work-implant .tooth-outline     { fill: #8a4b08; stroke: #6e3b06; }
.tooth.work-legacy .tooth-outline      { fill: var(--teal); stroke: var(--teal-dark); }
.tooth.work-missing .tooth-outline     { fill: var(--white); stroke: #9aa39d; stroke-dasharray: 3 2; }
.tooth.work-missing .tooth-fissure     { fill: #d5d8d6; stroke: #e5e7e5; }

/* Small abbreviation badge (C, P, V, IO, IM) on a tooth that has a work
   type assigned — "missing" gets an X-strike instead, and "legacy" (old
   records with no work-type detail) gets neither. render_tooth_chart() sets
   this span's own left/top inline, pushed toward the mouth's open centre
   (the opposite side from the tooth's outward-pointing number label) so
   the two never overlap. */
.tooth-work-badge {
  position: absolute;
  transform: translate(-50%, -50%);
  background: var(--ink);
  color: var(--white);
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 999px;
  pointer-events: none;
  white-space: nowrap;
  z-index: 1;
}
.tooth.work-crown .tooth-work-badge       { background: #0f6e5c; }
.tooth.work-pontic .tooth-work-badge      { background: #7c5cff; }
.tooth.work-veneer .tooth-work-badge      { background: #e0a100; }
.tooth.work-inlay_onlay .tooth-work-badge { background: #2f7fd1; }
.tooth.work-implant .tooth-work-badge     { background: #8a4b08; }

.tooth-missing-strike {
  position: absolute;
  inset: 6%;
  pointer-events: none;
}
.tooth-missing-strike::before,
.tooth-missing-strike::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--danger);
  transform-origin: center;
}
.tooth-missing-strike::before { transform: translateY(-50%) rotate(45deg); }
.tooth-missing-strike::after  { transform: translateY(-50%) rotate(-45deg); }

/* Small circular marker sitting between two adjacent teeth (including the
   11-21 and 41-31 midline junctions), toggled on to mark them as one bridge
   unit — matching color (#ffcc00) chosen to mirror how it was marked up by
   hand for reference. The interactive create-case editor renders every
   possible dot so any pair can be toggled; a read-only view (case detail,
   printed job order) only ever draws the ones actually turned on. */
.tooth-connector {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid #b8bdb9;
  background: var(--white);
  padding: 0;
  cursor: pointer;
  z-index: 2;
}
button.tooth-connector:hover { border-color: var(--teal); }
.tooth-connector.connected {
  background: #ffcc00;
  border-color: #c99900;
}
span.tooth-connector { cursor: default; }

/* Color key explaining the highlight colors/abbreviations above — see
   render_tooth_legend() in functions.php. */
.tooth-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  justify-content: center;
  margin-top: 12px;
  font-size: 12px;
  color: var(--ink-muted);
}
.tooth-legend-item { display: flex; align-items: center; gap: 5px; }
.tooth-legend-swatch {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 3px;
  background: var(--white);
  border: 1px solid #7a7a7a;
  flex: none;
}
.tooth-legend-swatch-crown       { background: #0f6e5c; border-color: #0b5c4d; }
.tooth-legend-swatch-pontic      { background: #7c5cff; border-color: #5c3ce0; }
.tooth-legend-swatch-veneer      { background: #e0a100; border-color: #b98400; }
.tooth-legend-swatch-inlay_onlay { background: #2f7fd1; border-color: #1f63aa; }
.tooth-legend-swatch-implant     { background: #8a4b08; border-color: #6e3b06; }
.tooth-legend-swatch-missing     { background: var(--white); border: 1.5px dashed #9aa39d; }
.tooth-legend-swatch-connector   { background: #ffcc00; border-color: #c99900; border-radius: 50%; }

/* Work-type picker popover, opened next to whichever tooth was clicked in
   the interactive create-case editor. */
.tooth-popover {
  position: fixed;
  z-index: 50;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(23, 27, 26, 0.18);
  padding: 8px;
  min-width: 190px;
}
.tooth-popover-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--ink-muted);
  padding: 4px 8px 6px;
}
.tooth-popover-options { display: flex; flex-direction: column; gap: 2px; }
.tooth-popover-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 6px;
  border: none;
  background: none;
  font-size: 13px;
  font-family: inherit;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.tooth-popover-option:hover { background: var(--bg); }
.tooth-popover-option.active { background: var(--teal-tint); color: var(--teal-dark); font-weight: 600; }
.tooth-popover-swatch {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 3px;
  flex: none;
}
.tooth-popover-clear { color: var(--danger); border-top: 1px solid var(--border); margin-top: 4px; padding-top: 8px; }

.tooth-actions { margin-top: 10px; font-size: 13px; }
.tooth-actions a { cursor: pointer; }
.teeth-summary { color: var(--ink-muted); font-size: 13px; margin-top: 8px; text-align: center; min-height: 18px; }

.priority-options { display: flex; gap: 10px; margin-top: 4px; }
.priority-options label {
  display: flex !important;
  align-items: center;
  gap: 6px;
  font-weight: 500 !important;
  margin: 0 !important;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  cursor: pointer;
  font-size: 13px;
}
.priority-options input { width: auto !important; margin: 0; }
.priority-options label:has(input:checked) { border-color: var(--teal); background: var(--teal-tint); color: var(--teal-dark); }

.job-order-print {
  max-width: 440px;
  margin: 40px auto;
  text-align: center;
  border: 1px solid var(--ink);
  border-top: 6px solid var(--teal);
  padding: 26px 26px 22px;
  background: var(--white);
}
.job-order-brand-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
  margin: 0 auto 6px;
}
.job-order-brand {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--teal-dark);
  margin: 0 0 14px;
}
.job-order-header { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.job-order-header h2 { margin: 0 0 2px; font-size: 21px; }
.job-order-lab-location { margin: 0 0 10px; font-size: 12px; color: var(--ink-muted); }
.job-order-number { font-size: 22px; font-weight: 700; letter-spacing: 0.5px; margin: 0; }
.job-order-rush-stamp {
  display: inline-block;
  margin-top: 12px;
  padding: 4px 16px;
  border: 2px solid var(--danger);
  border-radius: 4px;
  color: var(--danger);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transform: rotate(-3deg);
}
.job-order-fields { margin-bottom: 16px; }
.job-order-fields th { width: 40%; text-transform: uppercase; font-size: 10px; letter-spacing: 0.3px; color: var(--ink-muted); font-weight: 700; background: transparent; }
.job-order-fields td { font-size: 14px; font-weight: 600; color: var(--ink); }
.job-order-qr { display: flex; justify-content: center; margin: 16px auto; }
.job-order-teeth { margin: 14px 0; padding: 14px 0; border-top: 1px dashed var(--border); border-bottom: 1px dashed var(--border); }
.job-order-print .tooth-chart { max-width: 190px; }
.job-order-print .arch-label { font-size: 8px; }
.job-order-print .upper-arch-label { top: 46%; }
.job-order-print .lower-arch-label { top: 57%; }
.job-order-print .tooth-outline { stroke-width: 1.8; }
.job-order-print .tooth-fissure { stroke-width: 1; }
.job-order-print .tooth-num { font-size: 5px; }
.job-order-print .tooth-work-badge { font-size: 5px; padding: 1px 3px; }
.job-order-print .tooth-missing-strike::before,
.job-order-print .tooth-missing-strike::after { height: 1.2px; }
.job-order-print .tooth-connector { width: 6px; height: 6px; border-width: 1px; }
.job-order-print .tooth-legend { font-size: 8px; gap: 4px 8px; margin-top: 8px; }
.job-order-print .tooth-legend-swatch { width: 8px; height: 8px; }
.job-order-instruction { color: var(--ink-muted); font-size: 13px; margin: 12px 0 0; }
.job-order-footer-meta { color: var(--ink-muted); font-size: 10px; margin: 8px 0 0; }
/* Printed job order: ONE A4 sheet, landscape, meant to be FOLDED down the
   middle. Left half = who/what (lab, job order numbers, patient, work
   details); right half = the teeth chart, QR code and scan instruction.
   On screen the two halves just stack inside the usual single card. @page
   margin 0 also makes Chrome/Edge drop their own date/URL header/footer. */
.jo-half { display: block; }
.job-order-notes { margin-top: 14px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; text-align: left; }
.job-order-notes-label { margin: 0 0 4px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; color: var(--ink-muted); }
.job-order-notes-text { margin: 0; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
@page { size: A4 landscape; margin: 0; }
@media print {
  html, body { background: #fff; margin: 0; padding: 0; }
  .topbar, .no-print { display: none !important; }
  .page { padding: 0; max-width: none; margin: 0; }
  .job-order-print {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 297mm;
    height: 208mm;
    max-width: none;
    margin: 0;
    padding: 0;
    border: none;
    border-top: 6px solid #000;
    background: #fff;
    overflow: hidden;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .jo-half {
    box-sizing: border-box;
    height: 100%;
    padding: 10mm 12mm;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }
  .jo-half-left { border-right: 1px dashed #888; }
  .jo-half-left .job-order-notes { flex: 1 1 auto; min-height: 0; overflow: hidden; margin-top: 8mm; border-color: #999; }
  .job-order-notes-text { font-size: 14px; }
  .jo-half-right { align-items: center; justify-content: space-between; }
  .jo-half-right .job-order-teeth { border: none; margin: 0; padding: 0; width: 100%; }
  .job-order-print .tooth-chart { max-width: 235px; }
  .job-order-print .tooth-num { font-size: 6px; }
  .job-order-print .arch-label { font-size: 9px; }
  .job-order-print .tooth-work-badge { font-size: 6px; }
  .job-order-print .tooth-legend { font-size: 9px; }
  .job-order-brand-logo { width: 44px; height: 44px; }
  .job-order-header { margin-bottom: 14px; padding-bottom: 14px; }
  .job-order-header h2 { font-size: 24px; }
  .job-order-number { font-size: 26px; }
  .job-order-fields { margin-bottom: 0; }
  .job-order-fields th { font-size: 11px; }
  .job-order-fields th, .job-order-fields td { padding: 7px 12px; }
  .job-order-fields td { font-size: 15px; }
  .job-order-qr { margin: 4mm auto 0; }
  .job-order-instruction { margin: 4px 0 0; }
  .job-order-footer-meta { margin: 2px 0 0; }
}


/* ======================================================================
   dentec additions
   ====================================================================== */
[dir="rtl"] th, [dir="rtl"] td { text-align: right; }
.topbar-brand { color: var(--ink); text-decoration: none; }
.topbar-brand:hover { color: var(--ink); }
.topbar-logo-wide { height: 34px; width: auto; display: block; }
.topbar-app-name { font-size: 13px; font-weight: 700; color: var(--ink-muted); padding-inline-start: 10px; border-inline-start: 1px solid var(--border); letter-spacing: .02em; }
.topbar-nav a { font-weight: 600; font-size: 14px; }
.nav-count { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
form button, .btn { border-radius: 999px; }
.btn-outline { background: transparent !important; color: var(--teal) !important; border: 1.5px solid var(--teal) !important; }
.btn-outline:hover { background: var(--teal-tint) !important; }
.badge-new { background: var(--red-tint); color: var(--red-dark); }
.form-intro { color: var(--ink-muted); margin-top: -6px; }
.field-hint { color: var(--ink-muted); font-size: 13px; margin-top: 4px; }
.table-scroll { overflow-x: auto; }
table.compact th, table.compact td { padding: 6px 10px; }
table.compact th { width: 180px; text-transform: none; font-size: 12px; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.section-band { background: var(--teal); }

/* Case list filters */
.filter-bar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-tab { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--ink-muted); background: var(--white); }
.filter-tab.active { background: var(--teal); border-color: var(--teal); color: #fff; }
.filter-search { max-width: 320px; margin: 0 !important; }

/* Progress strip on the case page */
.progress-strip { display: flex; gap: 0; margin: 4px 0 18px; overflow-x: auto; padding-bottom: 4px; }
.progress-step { flex: 1 0 96px; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; text-align: center; }
.progress-step::before { content: ""; position: absolute; top: 15px; inset-inline-start: -50%; width: 100%; height: 2px; background: var(--border); z-index: 0; }
.progress-step:first-child::before { display: none; }
.progress-step.done::before { background: var(--teal); }
.progress-dot { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--border); background: var(--white); display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--ink-muted); position: relative; z-index: 1; }
.progress-step.done .progress-dot { background: var(--teal); border-color: var(--teal); color: #fff; }
.progress-step.current .progress-dot { box-shadow: 0 0 0 5px var(--red-tint); border-color: var(--red); background: var(--red); color: #fff; }
.progress-label { font-size: 12px; font-weight: 600; color: var(--ink-muted); }
.progress-step.done .progress-label, .progress-step.current .progress-label { color: var(--ink); }

/* Clinics admin */
.clinic-request { background: var(--bg); margin-bottom: 12px; }
.clinic-request-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.inline-actions { display: flex; gap: 10px; margin-top: 12px; }
.inline-actions button { margin-top: 0; }

/* Login + register */
.login-page .page { max-width: none; margin: 0; padding: 0; }
.login-shell { max-width: 1100px; margin: 0 auto; padding: 40px 24px 56px; display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 48px; align-items: start; }
.login-side { display: flex; flex-direction: column; gap: 16px; }
.login-shell .auth-card { max-width: none; margin: 0; }
.login-shell .auth-logo-band img { max-width: 210px; }
.register-card { background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; }
.register-card h2 { margin: 0 0 4px; font-size: 16px; }
.register-card p { margin: 0 0 12px; color: var(--ink-muted); font-size: 14px; }
.login-welcome { font-size: 26px; font-weight: 700; color: var(--teal); line-height: 1.3; margin: 18px 0 28px; }
.login-features { display: flex; flex-direction: column; gap: 18px; }
.login-feature { display: flex; gap: 14px; align-items: flex-start; }
.login-feature-icon { flex: 0 0 36px; height: 36px; border-radius: 10px; background: var(--red-tint); color: var(--red); display: grid; place-items: center; font-weight: 800; }
.login-feature strong { display: block; margin-bottom: 2px; }
.login-feature p { margin: 0; color: var(--ink-muted); font-size: 14px; }
.login-contact { margin-top: 32px; color: var(--ink-muted); font-size: 14px; }
.register-form { max-width: 820px; margin: 24px auto; }
@media (max-width: 860px) {
  .login-shell { grid-template-columns: 1fr; gap: 28px; padding-top: 20px; }
  .login-welcome { font-size: 20px; margin-top: 0; }
  .topbar-app-name { display: none; }
}

/* Job order print logo */
.job-order-brand-logo-wide { height: 40px; width: auto; display: block; margin: 0 0 6px; }
