@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,400..800&display=swap');

:root {
  --bg: #f3f5f9;
  --card: #ffffff;
  --ink: #16213e;
  --muted: #5b6b80;
  --line: #dde3ec;
  --brand: #0a2a5e;        /* navy */
  --brand-dark: #071e45;   /* deep navy */
  --brand-soft: #eaeff7;   /* pale navy tint */
  --ok-bg: #e6f4ea; --ok-ink: #1e7a3c;
  --warn-bg: #fff4e0; --warn-ink: #a8630a;
  --bad-bg: #fdecec; --bad-ink: #c0392b;
  --gen-bg: #e9f1fc; --gen-ink: #1e5fae; --gen-line: #c8dbf3;
  --mammo-bg: #fdeef5; --mammo-ink: #b23e6d; --mammo-line: #f0cadd;
  --cct-bg: #f9eae8; --cct-ink: #93342e; --cct-line: #e5c0bb;
  --qa-bg: #e6f1fb; --qa-ink: #185fa5; --qa-line: #b5d4f4;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.dev-banner {
  background: #c0392b; color: #fff; text-align: center;
  font-size: 17px; font-weight: 800; letter-spacing: .02em;
  text-transform: uppercase; padding: 10px 16px;
  border-bottom: 2px solid #8f2a20;
}

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--brand); border-bottom: 1px solid var(--brand-dark);
  padding: 12px 24px; position: sticky; top: 0; z-index: 20;
}

@media print { .dev-banner { position: static; } }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-logo { height: 34px; width: auto; display: block; }
.brand-divider { width: 1px; height: 26px; background: rgba(255,255,255,.28); }
.brand-title { font-weight: 600; color: #fff; font-size: 16px; letter-spacing: .01em; }
nav a { margin-left: 20px; color: #dbe4f2; font-weight: 500; }
nav a:hover { color: #fff; text-decoration: none; }
nav a.active { color: #fff; border-bottom: 2px solid #fff; padding-bottom: 3px; }
nav { display: flex; align-items: center; }
.nav-drop { position: relative; display: inline-block; }
.nav-drop-menu { display: none; position: absolute; right: 0; top: 100%; padding-top: 8px;
  z-index: 40; }
.nav-drop-inner { background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 10px 26px rgba(0,0,0,.14); overflow: hidden; min-width: 210px; }
nav .nav-drop-inner a { display: block; margin: 0; padding: 10px 16px;
  color: var(--ink) !important; font-size: 14px; border-bottom: 1px solid var(--line); }
.nav-drop-inner a:last-child { border-bottom: none; }
nav .nav-drop-inner a:hover { background: #f2f6ff; color: var(--brand) !important;
  text-decoration: none; }
.nav-drop:hover .nav-drop-menu, .nav-drop:focus-within .nav-drop-menu { display: block; }

.container { max-width: 1080px; margin: 24px auto; padding: 0 24px; }
h1 { font-size: 24px; margin: 0 0 4px; }
h2 { font-size: 17px; margin: 0 0 12px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; margin-bottom: 20px; box-shadow: 0 1px 2px rgba(16,33,62,.04); }

/* ---- Dashboard ---- */
.dash-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.dash-head h1 { margin: 0 0 3px; }

.hero { position: relative; overflow: hidden; display: flex; align-items: center;
  justify-content: space-between; gap: 24px; margin-bottom: 24px; padding: 26px 30px;
  border-radius: 16px; color: #fff;
  background: linear-gradient(120deg, var(--brand) 0%, #123a78 55%, var(--brand-dark) 100%); }
.hero::after { content: ""; position: absolute; right: -30px; top: -40px; width: 260px; height: 260px;
  background: url('/static/logo-mark-white.png') no-repeat center / contain; opacity: .07;
  pointer-events: none; }
.hero-greet { font-size: 13px; color: #aebfda; letter-spacing: .02em; }
.hero-title { margin: 2px 0 4px; font-size: 26px; color: #fff; letter-spacing: -.01em; }
.hero-sub { margin: 0; font-size: 13px; color: #c4d2e8; }
.hero-ring { text-align: center; position: relative; z-index: 1; }
.ring-bg { fill: none; stroke: rgba(255,255,255,.14); stroke-width: 10; }
.ring-fg { fill: none; stroke-width: 10; stroke-linecap: round;
  transform: rotate(-90deg); transform-origin: 60px 60px;
  transition: stroke-dashoffset 1.1s cubic-bezier(.25,.7,.3,1); }
.ring--ok { stroke: #5ad08a; }
.ring--warn { stroke: #f2b64f; }
.ring--bad { stroke: #f07f72; }
.ring-num { fill: #fff; font-size: 26px; font-weight: 650; text-anchor: middle; }
.ring-label { fill: #aebfda; font-size: 11px; text-anchor: middle; letter-spacing: .04em; }
.hero-ring-sub { margin-top: 6px; font-size: 12px; color: #c4d2e8; }
@media (max-width: 720px) { .hero { flex-direction: column; align-items: flex-start; } }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .hero, .metric, .action-tile, .panel-clear { animation: rise .45s ease both; }
  .metrics--3 .metric:nth-child(2), .metrics--4 .metric:nth-child(2) { animation-delay: .05s; }
  .metrics--3 .metric:nth-child(3), .metrics--4 .metric:nth-child(3) { animation-delay: .1s; }
  .metrics--4 .metric:nth-child(4) { animation-delay: .15s; }
  .action-grid .action-tile:nth-child(2) { animation-delay: .07s; }
  .action-grid .action-tile:nth-child(3) { animation-delay: .14s; }
}

.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 14px; }
.metrics--3 { grid-template-columns: repeat(3, 1fr); }
.metrics--4 { grid-template-columns: repeat(4, 1fr); margin-bottom: 28px; }
.metrics--5 { grid-template-columns: repeat(5, 1fr); margin-bottom: 28px; }
@media (max-width: 720px) { .metrics--3, .metrics--4, .metrics--5 { grid-template-columns: repeat(2, 1fr); } }
/* mammo dashboard hero: purple-tinted variant of the navy hero */
.hero--mammo { background: linear-gradient(135deg, #5e2138 0%, #8a3457 60%, #a63e68 100%); }
.metric { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px;
  box-shadow: 0 1px 2px rgba(16,33,62,.04); }
.metric-num { font-size: 30px; font-weight: 600; line-height: 1.05; letter-spacing: -.02em; color: var(--ink); }
.metric-label { font-size: 12px; color: var(--muted); margin-top: 7px; }
.metric--warn .metric-num { color: var(--warn-ink); }
.metric--bad .metric-num { color: var(--bad-ink); }
.metric--mammo .metric-num { color: var(--mammo-ink); }
.metric--cct .metric-num { color: var(--cct-ink); }
.metric--qa .metric-num { color: var(--qa-ink); }
.metric-link { display: block; transition: box-shadow .12s, transform .12s; }
.metric-link:hover { text-decoration: none; box-shadow: 0 4px 14px rgba(16,33,62,.10); transform: translateY(-1px); }
.metric-link .metric-label { display: flex; align-items: center; justify-content: space-between; }
.metric-go { color: var(--muted); font-size: 15px; }
.filter-note { margin: -8px 0 14px; }

.section-head { display: flex; align-items: center; gap: 9px; margin: 4px 0 14px; }
.section-head h2 { margin: 0; font-size: 16px; }

.action-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 26px; }
.action-tile { display: block; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--line);
  border-radius: 12px; padding: 18px 20px; box-shadow: 0 1px 2px rgba(16,33,62,.04);
  transition: box-shadow .12s, transform .12s, border-color .12s; }
.action-tile:hover { text-decoration: none; box-shadow: 0 4px 14px rgba(16,33,62,.10); transform: translateY(-1px); }
.action-top { display: flex; align-items: center; justify-content: space-between; }
.action-num { font-size: 34px; font-weight: 600; letter-spacing: -.02em; line-height: 1; color: var(--ink); }
.action-go { color: var(--muted); font-size: 18px; }
.action-label { font-weight: 600; font-size: 15px; margin-top: 8px; color: var(--ink); }
.action-tile.is-bad { border-left-color: var(--bad-ink); }
.action-tile.is-bad .action-num { color: var(--bad-ink); }
.action-tile.is-warn { border-left-color: var(--warn-ink); }
.action-tile.is-warn .action-num { color: var(--warn-ink); }
.action-tile.is-ok { border-left-color: var(--ok-ink); }
.action-tile.is-ok .action-num { color: var(--ok-ink); }

.dash-section .section-head { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.dash-section .section-head h2 { margin: 0; font-size: 16px; }
.dash-section .section-sub { margin: -6px 0 14px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.dot-bad { background: var(--bad-ink); } .dot-warn { background: var(--warn-ink); }
.dot-ok { background: var(--ok-ink); } .dot-mammo { background: var(--mammo-ink); } .dot-cct { background: var(--cct-ink); }
.count-pill { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: #eef1f5; color: var(--muted); margin-left: auto; }
.count-pill.is-bad { background: var(--bad-bg); color: var(--bad-ink); }
.count-pill.is-warn { background: var(--warn-bg); color: var(--warn-ink); }

.dash-section table th { padding: 9px 12px 10px; }
.dash-section table td { padding: 12px; }
.dash-section tbody tr:hover td { background: #f8fafc; }
.cell-name { font-weight: 500; white-space: nowrap; }
.dash-section .pill { margin: 2px 4px 2px 0; }

.panel-clear { display: flex; align-items: center; gap: 16px; border-color: #bfe0c9; background: #fbfefc; }
.clear-badge { width: 44px; height: 44px; min-width: 44px; border-radius: 50%; background: var(--ok-bg);
  color: var(--ok-ink); display: grid; place-items: center; font-size: 22px; font-weight: 700; }
.clear-title { font-weight: 600; font-size: 16px; }

.btn-sm { padding: 5px 12px; font-size: 13px; }
table.card, .card table { width: 100%; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
tbody tr:last-child td { border-bottom: none; }
.row-warn { background: var(--warn-bg); }
.row-bad { background: var(--bad-bg); }
.nowrap { white-space: nowrap; }
.small { font-size: 12px; }
.muted { color: var(--muted); }

.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #eef1f5; color: var(--muted); }
.pill-ok { background: var(--ok-bg); color: var(--ok-ink); }
.pill-warn { background: var(--warn-bg); color: var(--warn-ink); }
.pill-bad { background: var(--bad-bg); color: var(--bad-ink); }

.btn {
  display: inline-block; border: 1px solid var(--line); background: #fff; color: var(--ink);
  padding: 8px 14px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.btn:hover { border-color: #c9d2dd; text-decoration: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: transparent; }
.btn-danger { background: #fff; border-color: #f0c2bd; color: var(--bad-ink); }
.btn-danger:hover { background: var(--bad-bg); }

.link { background: none; border: none; color: var(--brand); cursor: pointer; font-size: 14px; padding: 0 4px; }
label.replace-link { cursor: pointer; font-weight: 400; display: inline; margin: 0; }
.link-danger { color: var(--bad-ink); }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.head-actions { display: flex; gap: 8px; align-items: center; }
.head-actions form { margin: 0; }

.form label { display: block; margin-bottom: 14px; font-weight: 600; font-size: 13px; }
.form input, .form select, .form textarea {
  display: block; width: 100%; margin-top: 5px; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: 8px; font-size: 14px; font-weight: 400;
  background: #fff; color: var(--ink);
}
.form .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-actions { display: flex; gap: 10px; margin-top: 8px; }
.form .muted { font-weight: 400; }

.search { display: flex; gap: 8px; margin-bottom: 16px; }
.search input { flex: 1; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; }

.empty { text-align: center; color: var(--muted); padding: 32px; }

.filter-chips { display: inline-flex; gap: 6px; align-items: center; margin-left: 8px; }
.chip { padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line);
  font-size: 13px; font-weight: 600; color: var(--muted); background: #fff; }
.chip:hover { text-decoration: none; border-color: #c9d2dd; }
.chip--on { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip--warn.chip--on { background: var(--warn-ink); border-color: var(--warn-ink); }

.dropdown-group { padding: 7px 14px 3px; font-size: 11px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; color: var(--muted);
  background: #f7f9fb; border-bottom: 1px solid var(--line); }
.note { white-space: pre-wrap; background: #fbfcfe; }

.upload-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.upload-row select { padding: 8px; border: 1px solid var(--line); border-radius: 8px; }

.dropdown { position: relative; }
.dropdown-menu {
  display: none; position: absolute; right: 0; top: 110%; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.1);
  min-width: 240px; z-index: 30; overflow: hidden;
}
.dropdown-menu.open { display: block; }
.dropdown-menu a { display: block; padding: 10px 14px; color: var(--ink); border-bottom: 1px solid var(--line); }
.dropdown-menu a:last-child { border-bottom: none; }
.dropdown-menu a:hover { background: #f2f6ff; text-decoration: none; }

.flash { padding: 11px 14px; border-radius: 9px; margin-bottom: 14px; font-weight: 500; }
.flash-success { background: var(--ok-bg); color: var(--ok-ink); }
.flash-error { background: var(--bad-bg); color: var(--bad-ink); }
.flash-reminder { background: var(--warn-bg); color: var(--warn-ink); border: 1px solid #f2d9a8; }

.footer { text-align: center; color: var(--muted); font-size: 12px; padding: 24px; }

code { background: #eef1f5; padding: 1px 6px; border-radius: 5px; font-size: 13px; }

@media (max-width: 720px) {
  .card { overflow-x: auto; }
  .form .grid2 { grid-template-columns: 1fr; }
  nav a { margin-left: 12px; font-size: 14px; }
}
/* accreditation compliance panels (mammography, cardiac CT) */
.tag { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .05em;
  padding: 2px 6px; border-radius: 5px; vertical-align: middle; margin-left: 6px; }
/* dedicated tag column on list pages: fixed slots so MAMMO and CARDIAC CT
   badges each line up in their own straight column */
.cell-tags { white-space: nowrap; }
.cell-tags .tag { margin-left: 0; margin-right: 0; }
.tag-slot { display: inline-block; width: 62px; }
.tag-slot + .tag-slot { width: auto; margin-left: 8px; }
.tag-mammo { background: var(--mammo-bg); color: var(--mammo-ink); }
.tag-cct { background: var(--cct-bg); color: var(--cct-ink); }

.cmp { --accent: var(--muted); --accent-line: var(--line);
  border-color: var(--accent-line); border-left: 4px solid var(--accent); border-radius: 12px; }
.cmp--purple { --accent: var(--mammo-ink); --accent-line: var(--mammo-line); }
.cmp--teal { --accent: var(--cct-ink); --accent-line: var(--cct-line); }
.cmp--blue { --accent: var(--qa-ink); --accent-line: var(--qa-line); }
.cmp--navy { --accent: var(--brand); --accent-line: #c6d2e4; }
.cmp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.cmp-head h2 { margin: 0; }
.cmp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cmp-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cmp-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cmp-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1250px) { .cmp-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .cmp-grid--4 { grid-template-columns: 1fr; } }
@media (max-width: 1100px) { .cmp-grid--3 { grid-template-columns: 1fr; } }

/* prominent stat tiles (rolling CME trackers) */
.stat-strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 4px 0 14px; }
.stat-tile { display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  border-radius: 12px; border: 1px solid var(--line); background: #fbfafd;
  border-left-width: 5px; }
.stat-num { font-size: 30px; font-weight: 800; letter-spacing: -0.5px; line-height: 1;
  white-space: nowrap; }
.stat-cap { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.stat-ok { border-color: #bfe0c9; border-left-color: var(--ok-ink); background: var(--ok-bg); }
.stat-ok .stat-num { color: var(--ok-ink); }
.stat-warn { border-color: #f2d9a8; border-left-color: var(--warn-ink); background: var(--warn-bg); }
.stat-warn .stat-num { color: var(--warn-ink); }
.stat-bad { border-color: #f0c2bd; border-left-color: var(--bad-ink); background: var(--bad-bg); }
.stat-bad .stat-num { color: var(--bad-ink); }
.stat-info { border-color: #cdd9ec; border-left-color: var(--brand); background: var(--brand-soft); }
.stat-info .stat-num { color: var(--brand); font-size: 22px; }
.stat-note { margin: -6px 0 12px; }
.cme-exp { margin: 0 0 14px; }
/* multi-date CME entry editor */
#cme-entries-wrap { margin: 4px 0 16px; padding: 14px 16px; border: 1px solid var(--line);
  border-radius: 10px; background: #fbfafd; }
.cme-entry-row { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.cme-entry-row input[type=date] { width: auto; margin: 0; }
.cme-entry-row input[type=number] { width: 120px; margin: 0; }
.cme-exp-table { width: auto; min-width: 55%; }
.cme-exp-table th, .cme-exp-table td { padding: 6px 14px 6px 0; font-size: 13px; }
@media (max-width: 760px) { .stat-strip { grid-template-columns: 1fr; } }
.upload-mini { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 9px; min-width: 0; }
.upload-mini input[type=file] { font-size: 12px; min-width: 0; max-width: 100%; }
.upload-mini--wrap { flex-wrap: wrap; }
.upload-mini--wrap input[type=text] { flex: 1; min-width: 140px; padding: 6px 9px;
  border: 1px solid var(--line); border-radius: 7px; font-size: 12px; }
.upload-mini--wrap input[type=date] { padding: 5px 8px; border: 1px solid var(--line);
  border-radius: 7px; font-size: 12px; }
.cmp-item { display: flex; gap: 10px; align-items: flex-start; padding: 12px;
  border: 1px solid var(--line); border-radius: 10px; background: #fbfafd; }
.cmp-icon { width: 26px; height: 26px; min-width: 26px; border-radius: 50%; display: grid;
  place-items: center; font-weight: 700; font-size: 14px; color: #fff; background: var(--muted); }
.cmp-valid .cmp-icon, .cmp-on_file .cmp-icon { background: var(--ok-ink); }
.cmp-soon .cmp-icon, .cmp-behind .cmp-icon { background: var(--warn-ink); }
.cmp-expired .cmp-icon { background: var(--bad-ink); }
.cmp-missing .cmp-icon { background: #9aa3af; }
.cmp-pending .cmp-icon { background: #8aa0c2; }
.cmp-valid { border-color: #bfe0c9; } .cmp-on_file { border-color: #bfe0c9; }
.cmp-soon, .cmp-behind { border-color: #f2d9a8; background: var(--warn-bg); }
.cmp-expired { border-color: #f0c2bd; background: var(--bad-bg); }
.cmp-missing { border-color: #d7dbe0; }
.cmp-pending { border-color: #cfdaea; background: #f4f7fb; }
.cmp-in_progress .cmp-icon { background: #8aa0c2; }
.cmp-in_progress { border-color: #cfdaea; background: #f4f7fb; }
.cmp-optional .cmp-icon { background: #c3cbd6; }
.cmp-optional { border-color: #e2e6ec; background: #fbfcfd; }
.cmp-optional .cmp-label { color: var(--muted); }
.cmp-label { font-weight: 600; font-size: 13px; }
.cmp-req { font-size: 12px; color: var(--ink); margin: 3px 0 4px; line-height: 1.4; }
.cmp-req span { color: var(--accent); font-weight: 600; }
.cmp-body { flex: 1; min-width: 0; }
.cmp-action { white-space: nowrap; }
.cmp-item .pill { margin-top: 2px; }
.cmp-group-label { font-size: 11px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--accent); margin: 4px 0 10px; }
.cmp-group-label + .cmp-grid { margin-bottom: 18px; }
.progress { height: 5px; border-radius: 3px; background: #e6e9ef; margin-top: 8px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.cmp-behind .progress span, .cmp-soon .progress span { background: var(--warn-ink); }
.cmp-expired .progress span { background: var(--bad-ink); }
.cmp-valid .progress span, .cmp-on_file .progress span { background: var(--ok-ink); }
.pill-info { background: #e8eef7; color: #2c4a72; }
.attached-docs { background: #f8fafc; border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; margin-bottom: 14px; }
.delete-record { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.attached-doc-row { padding: 2px 0; }

/* AI Smart Upload review banner */
.smart-banner { background: linear-gradient(135deg, #eef2fb 0%, #fdeef5 100%);
  border: 1px solid #cdd9ec; border-left: 5px solid var(--mammo-ink);
  border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.smart-banner-title { font-weight: 700; margin-bottom: 4px; }
.smart-offer { display: flex; align-items: center; gap: 14px; }

/* AdminRad site hierarchy: landing + company pages, tracker breadcrumbs */
.brand-crumbs { font-size: 11px; letter-spacing: .02em; color: #aebfda; }
.brand-crumbs a { color: #aebfda; }
.brand-crumbs a:hover { color: #fff; text-decoration: none; }
.site-landing { max-width: 900px; }
.site-hero { margin-top: 18px; }
.site-title { font-size: 34px; }
.site-hero-logo { height: 56px; width: auto; position: relative; z-index: 1; }
.site-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.site-card { display: block; color: var(--ink); }
.site-card:hover { text-decoration: none; border-color: var(--brand); box-shadow: 0 4px 14px rgba(16,33,62,.10); }
.site-card-logo { height: 40px; width: auto; margin-bottom: 10px; }
.site-card-title { font-weight: 700; font-size: 17px; margin-bottom: 6px; }
.site-card-go { margin-top: 12px; font-weight: 600; color: var(--brand); }
.site-card--soon { border-style: dashed; background: #fbfafd; }
@media (max-width: 720px) { .site-grid { grid-template-columns: 1fr; } }

/* per-person compliance: list column + profile dashboard */
.cell-pct { min-width: 120px; }
.pct-wrap { display: flex; align-items: center; gap: 8px; }
.pct-num { font-weight: 700; font-size: 13px; min-width: 40px; text-align: right; }
.pct--ok { color: var(--ok-ink); } .pct--warn { color: var(--warn-ink); } .pct--bad { color: var(--bad-ink); }
.pct-bar { flex: 1; height: 6px; min-width: 52px; border-radius: 999px; background: #eceff5; overflow: hidden; }
.pct-bar-fill { display: block; height: 100%; border-radius: 999px; }
.pctf--ok { background: var(--ok-ink); } .pctf--warn { background: #f2b64f; } .pctf--bad { background: #f07f72; }
.person-dash { display: flex; align-items: center; gap: 20px; }
.person-dash .ring-bg--light { stroke: #e7ebf3; }
.person-dash .ring-num--dark { fill: var(--ink); }
.person-dash .ring-label--dark { fill: var(--muted); }
.person-dash-body { flex: 1; }
.person-dash-mods { display: flex; gap: 10px; flex-wrap: wrap; }
.mod-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px;
  border-radius: 999px; border: 1px solid var(--line); font-size: 13px; font-weight: 600;
  color: var(--ink); background: #fbfafd; }
.mod-chip:hover { text-decoration: none; background: var(--brand-soft); }
.mod-chip-num { font-weight: 700; }
.mod-chip--ok { border-color: #bfe0c9; } .mod-chip--ok .mod-chip-num { color: var(--ok-ink); }
.mod-chip--warn { border-color: #f2d9a8; background: var(--warn-bg); } .mod-chip--warn .mod-chip-num { color: var(--warn-ink); }
.mod-chip--bad { border-color: #f0c2bd; background: var(--bad-bg); } .mod-chip--bad .mod-chip-num { color: var(--bad-ink); }
@media (max-width: 720px) { .person-dash { flex-direction: column; align-items: flex-start; } }

/* anchor navigation (radiologist detail) */
html { scroll-behavior: smooth; }
.cmp[id], .page-head[id] { scroll-margin-top: 16px; }
.anchor-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 2px 0 16px; }
.anchor-chip { font-size: 12.5px; font-weight: 600; padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--brand); text-decoration: none; }
.anchor-chip:hover { background: var(--brand-soft); border-color: #cdd9ec; }
.anchor-hint { margin-left: auto; }
@media print { .anchor-nav { display: none; } }

.form-static { background: var(--brand-soft); border: 1px solid #cdd9ec; color: var(--brand);
  border-radius: 8px; padding: 10px 12px; font-size: 13px; font-weight: 600; margin-bottom: 14px; }
.phi-warn { background: var(--bad-bg); border: 1px solid #f0c2bd; color: var(--bad-ink);
  border-radius: 8px; padding: 10px 12px; font-size: 13px; font-weight: 700;
  letter-spacing: 0.2px; margin-bottom: 14px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; margin-bottom: 14px; }
.check input { width: auto; margin: 0; }
/* keep checkbox + text on one line even inside .form (which makes inputs
   block-level and full-width) */
.form label.check { display: flex; align-items: center; gap: 8px; }
.form .check input[type=checkbox], .check input[type=checkbox] {
  display: inline-block; width: auto; min-width: 0; margin: 0; flex: none; }
.check span { font-weight: 600; }
.reader-picker { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px;
  margin-bottom: 16px; }
.reader-picker legend { font-weight: 600; font-size: 14px; padding: 0 6px; }
.reader-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 4px 16px; }
.check--inline { margin-bottom: 6px; font-weight: 500; }
@media (max-width: 720px) { .cmp-grid { grid-template-columns: 1fr; } }

.report-brand { margin: 4px 0 18px; }
.report-brand img { height: 54px; width: auto; }
.print-only { display: none; }

.doc-preview { position: absolute; z-index: 100; width: 720px; height: 560px; max-width: 92vw; max-height: 82vh;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 10px 30px rgba(16,33,62,.18); overflow: hidden; pointer-events: none; }
.doc-preview iframe, .doc-preview img { width: 100%; height: 100%; border: 0; object-fit: contain; background: #f4f6f9; }
.doc-preview-none { display: grid; place-items: center; height: 100%;
  color: var(--muted); font-size: 13px; padding: 16px; text-align: center; }

.print-only-block { display: none; }

@media print {
  .topbar, .footer, .btn, nav, .no-print { display: none; }
  .print-only { display: block; margin-top: -6px; }
  .print-only-block { display: block; margin-bottom: 12px; }
  body { background: #fff; }
  .card { box-shadow: none; break-inside: avoid; }
}

.nav-badge { display:inline-block; min-width:17px; padding:1px 5px; border-radius:9px; background:#e5484d; color:#fff; font-size:11px; font-weight:700; text-align:center; line-height:1.4; vertical-align:1px; }

/* side-by-side document review for Smart Upload / intake approvals */
.docside { position: fixed; top: 118px; right: 18px; bottom: 18px;
  width: min(46vw, 760px); background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 6px 24px rgba(11,42,71,.12);
  display: flex; flex-direction: column; overflow: hidden; z-index: 40; }
.docside-head { padding: 8px 12px; font-size: 12.5px; font-weight: 600;
  border-bottom: 1px solid var(--line); background: var(--brand-soft); }
.docside iframe { flex: 1; width: 100%; border: 0; }
.docside-img { flex: 1; overflow: auto; padding: 10px; }
.docside-img img { max-width: 100%; height: auto; }
.docside-none { padding: 16px; }
.docside--hidden { display: none; }
@media (min-width: 1100px) {
  body:has(.docside:not(.docside--hidden)) .container { margin-right: calc(min(46vw, 760px) + 30px); }
}
@media (max-width: 1099px) {
  .docside { position: static; width: auto; height: 60vh; margin-bottom: 14px; }
}

.nav-signout { display:inline; margin-left: 6px; }
.nav-signout button { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.3);
  border-radius: 7px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
.nav-signout button:hover { background: rgba(255,255,255,.22); }

/* workstation compliance banner on Monitor QA — soft tint + accent edge */
.ws-band { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: -20px -22px 16px; padding: 11px 20px 11px 17px;
  border-radius: 11px 11px 0 0; border-bottom: 1px solid var(--line); }
.ws-band--ok  { background: var(--ok-bg);  border-left: 4px solid var(--ok-ink); }
.ws-band--bad { background: var(--bad-bg); border-left: 4px solid var(--bad-ink); }
.ws-band h2 { margin: 0; font-size: 16.5px; }
.ws-band h2 a { color: var(--ink); text-decoration: none; }
.ws-band h2 a:hover { text-decoration: underline; }
.ws-band-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.ws-band-right { display: flex; align-items: center; gap: 10px; }
.ws-band--ok  .ws-band-tag { color: var(--ok-ink);  background: #fff; border: 1px solid var(--ok-ink); }
.ws-band--bad .ws-band-tag { color: var(--bad-ink); background: #fff; border: 1px solid var(--bad-ink); }
.ws-band-tag { font-weight: 600; font-size: 12px; letter-spacing: .2px;
  border-radius: 999px; padding: 3px 11px; white-space: nowrap; }

/* compliance-card labels with an attached document: hover to preview */
.doc-hover { cursor: pointer; text-decoration: underline dotted var(--muted); text-underline-offset: 3px; }
.doc-hover:hover { color: var(--brand); text-decoration-color: var(--brand); }

.site-byline { font-size: 14px; letter-spacing: .4px; color: var(--muted); margin-top: 2px; font-weight: 500; }

.brand-section { font-weight: 500; opacity: .75; font-size: 13px; }


/* ---- global search box in the top bar ---- */
.nav-search { display: inline-flex; align-items: center; margin: 0 4px; }
.nav-search input {
  width: 150px; padding: 5px 10px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.12);
  color: #fff; font-size: 13px; transition: width .15s, background .15s; }
.nav-search input::placeholder { color: rgba(255,255,255,.65); }
.nav-search input:focus { width: 210px; background: #fff; color: var(--ink);
  outline: none; }
.nav-search input:focus::placeholder { color: var(--muted); }

/* ---- search results ---- */
.sr-group { margin-top: 18px; }
.sr-row { display: flex; align-items: baseline; gap: 10px; padding: 8px 4px;
  border-bottom: 1px solid var(--line); }
.sr-row:last-child { border-bottom: 0; }
.sr-kind { font-size: 11px; color: var(--muted); text-transform: uppercase;
  letter-spacing: .04em; min-width: 86px; }

/* ---- 12-month timeline ---- */
.tl-month { margin-top: 20px; }
.tl-month h3 { margin: 0 0 6px; font-size: 15px; color: var(--brand); }
.tl-empty { color: var(--muted); font-size: 13px; padding: 4px 0 8px; }
.tl-item { display: flex; align-items: baseline; gap: 10px; padding: 7px 4px;
  border-bottom: 1px solid var(--line); font-size: 14px; }
.tl-item:last-child { border-bottom: 0; }
.tl-date { min-width: 76px; color: var(--muted); font-size: 12.5px;
  font-variant-numeric: tabular-nums; }
.tl-who { font-weight: 600; }
.tl-cat { color: var(--muted); font-size: 13px; }

/* ---- drag-and-drop upload overlay ---- */
.dropzone-overlay { position: fixed; inset: 0; z-index: 400; display: none;
  align-items: center; justify-content: center;
  background: rgba(10,42,94,.55); backdrop-filter: blur(2px); }
.dropzone-overlay.on { display: flex; }
.dropzone-inner { background: #fff; border: 2px dashed var(--brand);
  border-radius: 14px; padding: 36px 48px; text-align: center;
  font-size: 17px; font-weight: 600; color: var(--brand); }
.dropzone-inner .muted { display: block; margin-top: 6px; font-weight: 400;
  font-size: 13px; }

/* ---- recently viewed chips ---- */
.recent-row { margin: 14px 0 0; font-size: 13px; color: var(--muted); }
.recent-row a { display: inline-block; margin: 2px 4px 2px 0; padding: 3px 10px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.recent-row a:hover { border-color: var(--brand); }

/* ---- sort chips on list pages ---- */
/* sortable column headers (replaces the old sort-chips row) */
.th-sort a { color: inherit; }
.th-sort a:hover { color: var(--brand); text-decoration: none; }
.th-sort--on a { color: var(--brand); }
.th-arrow { font-size: 10px; }


/* ==========================================================================
   Polish layer — typography, elevation, focus & micro-interactions.
   Overrides base rules above (last wins). Safe to remove as a block.
   ========================================================================== */

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background:
    radial-gradient(1100px 320px at 50% -80px, #e7edf6 0%, rgba(231,237,246,0) 70%),
    var(--bg);
}
::selection { background: #cddcf3; }

h1 { letter-spacing: -.02em; font-weight: 700; }
h2 { letter-spacing: -.01em; font-weight: 650; }
.metric-num, .action-num, .stat-num, .ring-num, .tl-date, td.small,
th, .gate-stat { font-variant-numeric: tabular-nums; }

/* elevation system: resting cards whisper, interactive cards answer hover */
.card, .metric, .action-tile {
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(16,33,62,.05), 0 12px 28px -22px rgba(16,33,62,.18);
}
.metric-link:hover, .action-tile:hover, .site-card:hover {
  box-shadow: 0 2px 4px rgba(16,33,62,.06), 0 18px 34px -18px rgba(16,33,62,.28);
  transform: translateY(-2px);
}
.site-card { transition: box-shadow .16s ease, transform .16s ease, border-color .16s ease; }
.site-card-go { transition: transform .16s ease; display: inline-block; }
.site-card:hover .site-card-go { transform: translateX(3px); }

/* topbar: gradient + soft drop instead of a hard border */
.topbar {
  background: linear-gradient(180deg, #0c3069 0%, var(--brand) 60%, #092756 100%);
  border-bottom: none;
  box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 8px 20px -14px rgba(7,30,69,.65);
}
nav a { transition: color .12s ease; }
nav a.active { border-bottom-color: #7ea1d8; }

/* section headers: quiet editorial eyebrows with a hairline rule */
.section-head { margin: 26px 0 12px; }
.section-head h2 {
  font-size: 12.5px; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--muted);
}
.section-head::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* tables: gentle row hover everywhere, airier header */
tbody tr { transition: background .1s ease; }
tbody tr:hover td { background: #f8fafd; }
.row-warn:hover td { background: #fdeecd; }
.row-bad:hover td { background: #fbdfdf; }
th { letter-spacing: .06em; font-weight: 650; padding-bottom: 8px; }

/* pills: hairline borders lift them off tinted rows */
.pill { border: 1px solid rgba(22,33,62,.07); line-height: 1.5; }
.pill-ok { border-color: #c4e2cd; }
.pill-warn { border-color: #eed6a6; }
.pill-bad { border-color: #efc5c0; }

/* buttons: press states + primary depth */
.btn { transition: background .12s ease, border-color .12s ease, box-shadow .12s ease, transform .06s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary { box-shadow: 0 1px 2px rgba(7,30,69,.3), 0 6px 14px -8px rgba(7,30,69,.5); }
.btn-primary:hover { box-shadow: 0 1px 2px rgba(7,30,69,.3), 0 8px 18px -8px rgba(7,30,69,.6); }

/* inputs: calm focus ring, hover hint */
.form input:hover, .form select:hover, .form textarea:hover,
.search input:hover { border-color: #c3cddc; }
.form input:focus, .form select:focus, .form textarea:focus,
.search input:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(10,42,94,.12);
}
input[type=date], input[type=file] { font-family: inherit; }

/* keyboard users get a clear, branded focus ring */
a:focus-visible, button:focus-visible, .btn:focus-visible, .chip:focus-visible {
  outline: 2px solid #4a76c4; outline-offset: 2px; border-radius: 6px;
  text-decoration: none;
}

/* hero: subtle top sheen so the gradient reads as glass, not flat paint */
.hero { box-shadow: 0 18px 40px -24px rgba(7,30,69,.55); }
.hero::before { content: ""; position: absolute; inset: 0 0 55% 0;
  background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,0));
  pointer-events: none; }

/* dropdown + hover panels share the elevated shadow language */
.nav-drop-inner, .dropdown-menu {
  box-shadow: 0 4px 10px rgba(7,30,69,.08), 0 24px 48px -20px rgba(7,30,69,.3);
  border-radius: 12px;
}

/* landing pages: bigger, calmer title rhythm */
.site-title { letter-spacing: -.025em; }
.footer { letter-spacing: .01em; }

/* thin, unobtrusive scrollbars (WebKit + Firefox) */
* { scrollbar-width: thin; scrollbar-color: #c3cddc transparent; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #c3cddc; border-radius: 999px;
  border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #9fb0c9; }
::-webkit-scrollbar-track { background: transparent; }

/* printing any page: chrome disappears, content stands alone */
@media print {
  .topbar, .footer, .head-actions, .nav-search, .filter-chips,
  .search, .dev-banner, .recent-row { display: none !important; }
  body { background: #fff; }
  .card, .metric, .action-tile { box-shadow: none; }
}

/* respect reduced-motion for the new micro-interactions */
@media (prefers-reduced-motion: reduce) {
  .site-card, .site-card-go, .btn, nav a, tbody tr { transition: none; }
  .metric-link:hover, .action-tile:hover, .site-card:hover { transform: none; }
}


/* ---- compliance requirements as a compact table (was a card grid) ---- */
.cmp-table { width: 100%; margin-bottom: 16px; }
.cmp-table:last-child { margin-bottom: 4px; }
.cmp-table td { padding: 8px 10px; border-bottom: 1px solid var(--line);
  vertical-align: middle; }
.cmp-table tr:last-child td { border-bottom: none; }
.cmpr-ic { width: 30px; padding-right: 0 !important; }
.cmp-icon--sm { width: 20px; height: 20px; min-width: 20px; font-size: 11px; }
.cmpic-valid, .cmpic-on_file { background: var(--ok-ink); }
.cmpic-soon, .cmpic-behind { background: var(--warn-ink); }
.cmpic-expired { background: var(--bad-ink); }
.cmpic-missing { background: #9aa3af; }
.cmpic-pending, .cmpic-in_progress { background: #8aa0c2; }
.cmpic-optional { background: #c3cbd6; }
.cmpr-label { font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.cmpr-label .doc-hover { cursor: pointer; border-bottom: 1px dashed #b6c3d6; }
.cmpr-count { font-weight: 600; margin-left: 4px; }
.cmpr-status { width: 92px; white-space: nowrap; }
.cmpr-status .pill { min-width: 64px; text-align: center; }
.cmpr-detail { width: 46%; }
.cmpr-action { width: 100px; text-align: right; white-space: nowrap; }
.progress--slim { max-width: 180px; margin-top: 5px; height: 4px; }
/* row tints only where attention is needed — quiet otherwise */
.cmpr-soon td, .cmpr-behind td { background: var(--warn-bg); }
.cmpr-expired td { background: var(--bad-bg); }
.cmpr-soon:hover td, .cmpr-behind:hover td { background: #fdeecd; }
.cmpr-expired:hover td { background: #fbdfdf; }
.cmpr-optional .cmpr-label, .cmpr-pending .cmpr-label { color: var(--muted);
  font-weight: 500; }
@media (max-width: 860px) {
  .cmpr-detail { width: auto; }
  .cmpr-label { white-space: normal; }
}


/* ---- section color identity: General blue · Mammo pink · Cardiac CT red ---- */
.brand-section--general { color: #9fc2ef; }
.brand-section--mammo { color: #f2afc9; }
.brand-section--cct { color: #efa9a3; }
.brand-section--facilities { color: #b9c9e2; }


/* ---- collapsible Credentials & Records section ---- */
.records-toggle { background: none; border: none; padding: 0; cursor: pointer;
  font: inherit; font-weight: 650; color: var(--ink); display: inline-flex;
  align-items: center; gap: 8px; letter-spacing: -.01em; }
.records-toggle:hover { color: var(--brand); }
.records-chev { display: inline-block; width: 14px; color: var(--muted);
  font-size: 13px; transition: transform .12s ease; }


/* ---- per-record sub-rows under a multi-record requirement ---- */
.cmpr-sub td { background: #fbfcfe; padding-top: 6px; padding-bottom: 6px;
  font-size: 12.5px; }
.cmpr-sub:hover td { background: #f4f7fc; }
.cmpr-tree { color: #b6c3d6; font-size: 12px; padding-left: 6px; }
/* paired requirement (e.g. MOC under Board Certification): full row, nested look */
.cmpr-pair .cmpr-label { padding-left: 14px; }
.cmpr-pair .cmpr-label .cmpr-tree { padding-left: 0; margin-right: 2px; }
.cmpr-sub-label { font-weight: 500; color: var(--ink); white-space: normal; }
.cmpr-doc { display: inline-block; margin-right: 10px; }


/* superseded records: kept for history, visually stepped back */
.row-replaced td { color: var(--muted); }
.row-replaced .pill { opacity: .85; }


/* workstation QA table: upload rows sit quietly under each record */
.cmpr-upload td { border-bottom-width: 2px; padding-bottom: 10px; }
.cmpr-upload .upload-mini { margin-top: 0; }


/* standing schedule notice on Monitor QA */
.qa-notice { display: flex; align-items: flex-start; gap: 12px;
  background: var(--qa-bg); border: 1px solid var(--qa-line);
  border-left: 4px solid var(--qa-ink); border-radius: 12px;
  padding: 13px 16px; margin: 4px 0 18px; }
.qa-notice strong { color: var(--qa-ink); }
.qa-notice-icon { font-size: 20px; line-height: 1.2; }


/* repository sections: General Practice vs Mammography */
.pd-section { display: flex; align-items: center; gap: 9px; margin: 30px 0 2px;
  padding-bottom: 7px; border-bottom: 2px solid var(--line); }
.pd-section h2 { margin: 0; font-size: 16px; letter-spacing: -.01em;
  text-transform: none; }
.pd-section--mammo { border-bottom-color: var(--mammo-line); }
.pd-section--mammo h2 { color: var(--mammo-ink); }
.pd-table--mammo { border-top: 3px solid var(--mammo-line); }


/* intake drag-and-drop strip */
.intake-dropstrip { display: flex; align-items: center; gap: 12px;
  border: 2px dashed #c3cddc; border-radius: 12px; background: #fbfcfe;
  padding: 14px 18px; margin: 4px 0 18px; cursor: pointer;
  font-size: 13.5px; color: var(--muted);
  transition: border-color .15s, background .15s; }
.intake-dropstrip strong { color: var(--ink); }
.intake-dropstrip:hover { border-color: var(--brand); }
.intake-dropstrip.is-over { border-color: var(--brand);
  background: var(--brand-soft); }
.intake-dropstrip.is-busy { border-style: solid; border-color: var(--qa-line);
  background: var(--qa-bg); pointer-events: none; }
.intake-dropstrip-icon { font-size: 22px; color: var(--brand); line-height: 1; }


/* physician self-view: read-only — hide edit/upload affordances.
   The auth gate enforces this server-side; CSS just tidies the page. */
.selfview .head-actions,
.selfview .page-head .dropdown,
.selfview .upload-row, .selfview .upload-mini,
.selfview .rename-doc, .selfview .replace-link, .selfview .link-danger,
.selfview .cmpr-action, .selfview td.nowrap > .link,
.selfview td.nowrap > form,
.selfview .dropzone-overlay { display: none !important; }


/* "compliant today, lapsing soon" note on the profile dashboard */
.lapse-note { display: inline-block; font-size: 12.5px; color: var(--warn-ink);
  background: var(--warn-bg); border: 1px solid #eed6a6; border-radius: 8px;
  padding: 5px 10px; margin-bottom: 8px; }
.lapse-note--gap { color: #93342e; background: #fdf1ef; border-color: #ecc7c2; }


.pd-section--mri { border-bottom-color: var(--qa-line); }
.pd-section--mri h2 { color: var(--qa-ink); }
.pd-table--mri { border-top: 3px solid var(--qa-line); }


/* practice docs: Modalities super-heading with indented modality sections */
.pd-supersec { margin: 34px 0 0; font-size: 19px; font-weight: 750;
  letter-spacing: -.015em; color: var(--brand);
  border-bottom: 2px solid var(--brand-soft); padding-bottom: 8px; }
.pd-section--indent { margin-left: 18px; margin-top: 20px; }
.pd-section--indent + .pd-table, .pd-section--indent ~ table { }


/* ==========================================================================
   Uniform row heights: tables keep tight single-line rows; long text
   truncates with an ellipsis instead of wrapping onto a second line.
   ========================================================================== */
th, td { padding: 8px 12px; line-height: 1.45; }
.pill { white-space: nowrap; }

/* cells that carry long text: one line + ellipsis */
td.ell { max-width: 300px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
.ell-line { overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 440px; }

/* compliance table detail: one tidy line */
.cmpr-detail > span.muted { display: inline-block; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  vertical-align: bottom; }

/* timeline + search rows: single line, name truncates before wrapping */
.tl-item { flex-wrap: nowrap; }
.tl-cat { overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  flex: 1; min-width: 0; }
.tl-who { white-space: nowrap; }
.sr-row { flex-wrap: nowrap; }
.sr-row > a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  min-width: 0; }
.sr-row .muted.small { white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; min-width: 0; }


/* ==========================================================================
   Interior polish — every page inside the shell inherits the front door's
   institutional look: white canvas, title band, generous rhythm, navy
   footer band. Overrides base rules above.
   ========================================================================== */

/* white canvas; cards read via hairline + shadow instead of gray backdrop */
body {
  background:
    radial-gradient(1100px 300px at 50% -90px, #eef2f8 0%, rgba(238,242,248,0) 70%),
    #ffffff;
}
.container { max-width: 1120px; margin-top: 0; padding-top: 6px; }
.card, .metric, .action-tile, .stat-tile { border-color: #e6eaf1; }

/* page title band: large title, hairline rule spanning the content column */
.page-head { padding: 26px 0 16px; margin-bottom: 24px;
  border-bottom: 1px solid var(--line); align-items: flex-end; }
.page-head h1 { font-size: 30px; letter-spacing: -.025em; }
.page-head .muted.small { margin-top: 4px; }
/* crumbs sit tight above the band */
.container > p.muted.small:first-child { margin: 14px 0 -14px; }

/* heroes get the home page's presence */
.hero { border-radius: 18px; margin-top: 20px; }
.hero-title { font-size: 30px; }

/* section rhythm */
.section-head { margin-top: 34px; }
.card { margin-bottom: 22px; }

/* forms feel like panels, not boxes */
.form.card { padding: 26px 28px; }

/* navy footer band on shell pages (base.html's footer is a direct child
   of <body>; standalone landing pages keep their light in-page footers) */
body > footer.footer {
  background: var(--brand-dark); color: #9db4d9; margin-top: 56px;
  padding: 20px 24px; font-size: 12.5px; text-align: center;
  letter-spacing: .01em; }
body > footer.footer a { color: #b9c9e2; }
body > footer.footer a:hover { color: #fff; text-decoration: none; }

/* home page's tinted stats band keeps its contrast on the white canvas */
.rq-sec--tint { background: #f4f6fa; }

/* landing-page shells match the wider column */
.site-landing { max-width: 1120px; }
.site-grid { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .site-grid { grid-template-columns: 1fr; } }

/* empty states: quieter, roomier */
.card.empty { padding: 44px 32px; border-style: dashed; box-shadow: none; }

/* flash messages align with the band width and float above content */
.flash { border: 1px solid transparent; }
.flash-success { border-color: #c4e2cd; }
.flash-error { border-color: #efc5c0; }


/* radiologist/reader lists: strictly one line per person */
.people-table th, .people-table td { white-space: nowrap; }
.people-table .cell-name a { display: inline-block; max-width: 220px;
  overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.people-table td:nth-last-child(4) {  /* specialty */
  max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.people-table .cell-tags .tag { display: inline-block; }
.people-table .pct-wrap { flex-wrap: nowrap; }
/* the list card may scroll sideways on narrow screens rather than wrap */
.people-table { min-width: 900px; }


/* CME + Continuing Reading Experience trackers: attention without shouting */
.stat-tile { padding: 11px 14px; gap: 12px; }
.stat-num { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.stat-info .stat-num { font-size: 17px; }
.stat-cap { font-size: 12px; line-height: 1.4; }
.stat-strip { gap: 10px; margin: 4px 0 12px; }


/* ==========================================================================
   EDITION 2 — editorial redesign. Structure from rules and whitespace,
   not boxes. Flat solids, near-square corners, typography-led hierarchy.
   Final layer: overrides everything above.
   ========================================================================== */

:root { --r: 4px; }
body { background: #fff; }

/* panels: quiet hairline frame with a confident top rule; no shadows */
.card, .metric, .action-tile, .stat-tile, .site-card {
  border-radius: var(--r); box-shadow: none; }
.card { border: 1px solid #e8ecf2; border-top: 3px solid var(--brand); }
.card.empty { border-style: solid; border-top-style: solid; }
.metric-link:hover, .action-tile:hover, .site-card:hover {
  transform: none; box-shadow: none; }

/* compliance cards: accent moves to the top rule */
.cmp { border-left: 1px solid #e8ecf2; border-top: 3px solid var(--accent); }

/* metrics: open stat columns divided by hairlines — no boxes */
.metrics { gap: 0; border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line); }
.metric { background: transparent; border: 0; border-left: 1px solid var(--line);
  border-radius: 0; padding: 18px 24px; }
.metric:first-child { border-left: 0; padding-left: 6px; }
.metric-num { font-weight: 620; font-size: 32px; }
.metric-link:hover { background: #f6f8fb; }

/* action tiles: same open column treatment; color lives in the number */
.action-grid { gap: 0; border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line); margin-bottom: 30px; }
.action-tile { background: transparent; border: 0;
  border-left: 1px solid var(--line); border-radius: 0; padding: 18px 24px; }
.action-tile:first-child { border-left: 0; padding-left: 6px; }
.action-tile:hover { background: #f6f8fb; }

/* heroes: flat, full-strength solids — no gradients, no sheen */
.hero { background: var(--brand-dark); border-radius: var(--r);
  box-shadow: none; }
.hero::before, .hero::after { display: none; }
.hero--mammo { background: #4d1c31; }

/* controls: squared, flat */
.btn { border-radius: 3px; }
.btn-primary { box-shadow: none; }
.btn-primary:hover { box-shadow: none; }
.form input, .form select, .form textarea, .search input,
.upload-row select, .upload-row input[type=text], .upload-row input[type=url],
.upload-row input[type=date] { border-radius: 3px; }
.pill { border-radius: 3px; }
.chip { border-radius: 3px; }
.tag { border-radius: 2px; }
.count-pill, .nav-badge { border-radius: 3px; }

/* stat tiles: tint + hairline, square shoulders */
.stat-tile { border-radius: var(--r); border-width: 1px;
  border-left-width: 3px; }

/* landing/gateway pages: card grids become an editorial index */
.site-grid { display: block; border-bottom: 1px solid var(--line); }
.site-card { display: flex; align-items: center; gap: 22px;
  background: transparent; border: 0; border-top: 1px solid var(--line);
  border-radius: 0; padding: 20px 6px; margin: 0; }
.site-card:hover { background: #f6f8fb; border-color: var(--line); }
.site-card-logo { margin: 0; height: 36px; }
.site-card-title { margin: 0; font-size: 17px; min-width: 280px; }
.site-card .muted.small { flex: 1; }
.site-card-go { margin: 0 0 0 auto; white-space: nowrap; }
.site-card .small { margin: 0 !important; white-space: nowrap; }
.site-card--soon { border-style: none; border-top: 1px solid var(--line);
  background: transparent; }

/* dropdowns and previews keep the only shadows on the site */
.nav-drop-inner, .dropdown-menu { border-radius: 6px; }
.doc-preview { border-radius: 4px; }

/* section eyebrows stay; give them a touch more air */
.section-head { margin-top: 38px; }

/* person dashboard + gate cards inherit the ruled language via .card */
.person-dash { border-top-color: var(--brand); }

/* gate cards sit in a multi-column grid: keep Open → next to its own
   title instead of at the far edge (where it reads as the next card's) */
.gate-card { justify-content: flex-start; }
.gate-card .site-card-title { min-width: 0; }
.gate-card .site-card-go { margin-left: 0; }


/* Clinical Documents: nested indentation — categories sit to the right
   of their section header; modality sections step in under Modalities */
.pd-section--indent { margin-left: 24px; }
.pd-sec-body { margin-left: 28px; }
.pd-sec-body--sub { margin-left: 56px; }
.pd-sec-body .section-head { margin-top: 20px; }
@media (max-width: 720px) {
  .pd-sec-body, .pd-sec-body--sub { margin-left: 12px; }
  .pd-section--indent { margin-left: 8px; }
}

/* fluid layout: fill the browser width, with gutters that scale gently.
   Long-form inputs keep a readable cap so forms don't stretch absurdly. */
.container { max-width: none; padding: 0 clamp(22px, 2.6vw, 52px); }
.site-landing { max-width: none; }
.card.form, form.card.form { max-width: 960px; }

/* physician (selfview) accounts: the document library is read-only —
   uploads and row actions vanish (the server blocks the POSTs regardless) */
.selfview section.card:has(form.upload-row) { display: none; }
.selfview .pd-table td.nowrap { visibility: hidden; }

/* Settings: System Health checks */
.sys-health { width: 100%; border-collapse: collapse; }
.sys-health td { padding: 7px 10px 7px 0; border-bottom: 1px solid var(--line); }
.sys-health tr:last-child td { border-bottom: 0; }
.sh-dot { width: 22px; }
.sh-label { font-weight: 600; font-size: 13.5px; white-space: nowrap; width: 220px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.dot--ok { background: #2e7d32; }
.dot--warn { background: #c99a06; }
.dot--bad { background: #c0392b; }

/* Shared-with-Hospitals manager: shared rows get a quiet highlight */
.row-shared td { background: #f2f7ff; }

/* breadcrumb bar: the "where am I" line under the header */
.crumbbar { background: #f4f7fc; border-bottom: 1px solid var(--line); }
.crumbbar-in { padding: 7px clamp(22px, 2.6vw, 52px); font-size: 12.5px; }
.crumbbar a { color: var(--muted); font-weight: 600; }
.crumbbar a:hover { color: var(--brand); text-decoration: none; }
.crumb-sep { color: #b6c3d6; margin: 0 8px; }
.crumb-here { color: var(--ink); font-weight: 700; }

/* section-colored underline on the active nav tab */
.topbar nav a.nav-sec--general.active { box-shadow: inset 0 -3px 0 #6ea8ee; }
.topbar nav a.nav-sec--mammo.active { box-shadow: inset 0 -3px 0 #e888b0; }
.topbar nav a.nav-sec--cct.active { box-shadow: inset 0 -3px 0 #e0837a; }

/* unified nav: little group labels inside dropdown menus */
.nav-drop-label { font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase;
  color: var(--muted); padding: 9px 12px 3px; border-top: 1px solid var(--line);
  margin-top: 5px; }
.nav-drop-inner .nav-drop-label:first-child { border-top: 0; margin-top: 0; }

/* compliance cards: lock the column grid so status pills align across
   every group table (Initial Qualification / Continuing …) on a card */
.cmp-table { table-layout: fixed; }
.cmpr-label { width: 31%; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 720px) {
  .cmp-table { table-layout: auto; }
  .cmpr-label { width: auto; }
}

/* Training hub */
.tr-tabs { display: flex; gap: 6px; border-bottom: 2px solid var(--line);
  margin: 4px 0 16px; }
.tr-tab { padding: 9px 18px 10px; font-weight: 600; font-size: 14.5px;
  color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -2px; }
.tr-tab:hover { color: var(--ink); text-decoration: none; }
.tr-tab.on { color: var(--ink); border-bottom-color: #0b2447; }
.tr-videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px; margin-bottom: 18px; }
.tr-video { padding: 0; overflow: hidden; }
.tr-video iframe, .tr-video video { display: block; width: 100%;
  aspect-ratio: 16 / 9; border: 0; background: #000; }
.tr-video-meta { display: flex; justify-content: space-between; gap: 10px;
  align-items: flex-start; padding: 10px 14px 12px; }

/* Facility Credentialing matrix */
.fc-table { width: 100%; border-collapse: collapse; }
.fc-table th { padding: 10px 8px; font-size: 12.5px; text-align: center;
  border-bottom: 2px solid var(--line); white-space: nowrap; }
.fc-table th:first-child { text-align: left; }
.fc-name { padding: 6px 10px; white-space: nowrap; font-weight: 600; font-size: 13.5px;
  border-bottom: 1px solid var(--line); }
.fc-cell { text-align: center; border-bottom: 1px solid var(--line);
  border-left: 1px solid #eef1f6; padding: 3px; }
.fc-cell form { display: inline; margin: 0; }
.fc-btn { border: 0; background: none; cursor: pointer; font-size: 19px; line-height: 1;
  width: 40px; height: 34px; border-radius: 7px; font-family: inherit; }
.fc-btn:hover { background: #eef2f9; }
.fc-blank { color: #c3ccd9; }
.fc-needed, .fc-dot.fc-needed { color: #b23e3e; font-weight: 700; }
.fc-submitted, .fc-dot.fc-submitted { color: #a05a0a; font-weight: 700; }
.fc-completed, .fc-dot.fc-completed { color: #1e7a5c; font-weight: 700; }
.fc-key { font-size: 13.5px; display: inline-flex; gap: 7px; align-items: baseline; }
.fc-key .fc-dot { font-size: 16px; }
