:root {
  --bg: #080e17;
  --bg-2: #0d1624;
  --surface: #111c2d;
  --surface-2: #16243a;
  --line: rgba(127, 184, 240, 0.14);
  --line-strong: rgba(127, 184, 240, 0.3);
  --text: #f0faff;
  --muted: #8ea3bd;
  --accent: #00d4ff;          /* parkinsurgical.com CTA cyan */
  --logo-1: #7fc0f5;          /* logo gradient top */
  --logo-2: #8a8fd6;          /* logo gradient bottom */
  --warn: #ffb547;
  --danger: #ff6b7a;
  --ok: #3ee0a1;
  --radius: 12px;
  --font-body: "Inter", system-ui, sans-serif;
  --font-head: "Archivo", system-ui, sans-serif;
  --font-brand: "Orbitron", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; } /* hidden always wins, whatever else styles the element */
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  background-image: radial-gradient(1200px 600px at 80% -10%, rgba(0, 212, 255, 0.08), transparent 60%);
  color: var(--text);
  font: 14px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-head); margin: 0; letter-spacing: -0.01em; }

.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }

/* Sidebar */
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  border-right: 1px solid var(--line);
  padding: 20px 14px;
}
.brand { display: block; padding: 4px 8px 18px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.brand img { width: 100%; max-width: 190px; display: block; mix-blend-mode: screen; }
.brand-tag {
  display: inline-block; margin-top: 6px; font: 600 10px/1 var(--font-brand);
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent);
}
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label {
  font: 600 10px/1 var(--font-brand); letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted); padding: 16px 10px 8px;
}
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px;
  color: rgba(240, 250, 255, 0.78); font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.nav a:hover { background: var(--surface); color: var(--text); }
.nav a.active { background: var(--surface-2); color: var(--text); box-shadow: inset 2px 0 0 var(--accent); }
.nav .ico { width: 22px; text-align: center; color: var(--logo-1); }
.nav .step {
  width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line-strong); font: 600 11px/1 var(--font-brand); color: var(--logo-1);
}
.nav a.active .step { background: var(--accent); border-color: var(--accent); color: var(--bg); }

/* Main */
.main { padding: 24px 32px 48px; min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.eyebrow { margin: 0 0 4px; font: 600 11px/1 var(--font-brand); letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); }
.topbar h1 { font-size: 28px; }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.today { color: var(--muted); font-variant-numeric: tabular-nums; }

.btn {
  font: 600 12px/1 var(--font-brand); letter-spacing: 0.08em; text-transform: uppercase;
  padding: 11px 16px; border-radius: 8px; border: 1px solid var(--line-strong);
  background: transparent; color: var(--text); cursor: pointer;
}
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.view[hidden] { display: none; }

/* Pipeline */
.pipeline { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 18px; }
.stage {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px;
}
.stage .n {
  grid-row: span 2; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(180deg, var(--logo-1), var(--logo-2)); color: var(--bg); font: 700 12px/1 var(--font-brand);
}
.stage .t { font-size: 12px; color: var(--muted); line-height: 1.3; }
.stage .c { font: 600 20px/1.2 var(--font-head); font-variant-numeric: tabular-nums; }

/* Maps */
.maps { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 16px; }
.map-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.map-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.map-head h2 { font-size: 15px; font-family: var(--font-brand); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.map { height: 460px; background: var(--bg-2); }
.map-body { display: grid; grid-template-columns: 1fr; }
.map-london .map-body { grid-template-columns: 1fr 260px; }
.dark-tiles { filter: invert(1) hue-rotate(185deg) brightness(0.85) contrast(0.9) saturate(0.35); }

.hosp-list { list-style: none; margin: 0; padding: 8px; border-left: 1px solid var(--line); max-height: 460px; overflow-y: auto; }
.map-bham .hosp-list { border-left: 0; border-top: 1px solid var(--line); }
.hosp-list li { display: flex; gap: 10px; padding: 8px; border-radius: 8px; cursor: pointer; }
.hosp-list li:hover, .hosp-list li:focus-visible { background: var(--surface-2); outline: none; }
.hosp-list li.selected { background: var(--surface-2); box-shadow: inset 2px 0 0 var(--accent); }
.hosp-list .num {
  flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--bg); font: 700 10px/1 var(--font-brand);
}
.hosp-list strong { display: block; font-size: 13px; font-weight: 600; line-height: 1.3; }
.hosp-list small { display: block; color: var(--muted); font-size: 11px; line-height: 1.35; margin-top: 2px; }
.pill { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; }

/* Leaflet theming */
.leaflet-container { font-family: var(--font-body); background: var(--bg-2); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface-2); color: var(--text); border: 1px solid var(--line-strong); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.leaflet-popup-content { margin: 12px 14px; }
.leaflet-popup-content h4 { margin: 0 0 4px; font: 600 14px/1.3 var(--font-head); }
.leaflet-popup-content p { margin: 0; color: var(--muted); font-size: 12px; }
.leaflet-container a.leaflet-popup-close-button { color: var(--muted); }
.leaflet-control-zoom a { background: var(--surface-2) !important; color: var(--text) !important; border-color: var(--line) !important; }
.leaflet-control-attribution { background: rgba(8,14,23,0.7) !important; color: var(--muted) !important; }
.leaflet-control-attribution a { color: var(--logo-1) !important; }

.hosp-pin { position: relative; }
.hosp-pin .dot {
  width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--bg);
  display: grid; place-items: center; font: 700 11px/1 var(--font-brand);
  border: 2px solid var(--bg); box-shadow: 0 0 0 2px var(--accent), 0 0 18px rgba(0, 212, 255, 0.6);
}
.hosp-pin .lbl {
  display: none; position: absolute; left: 30px; top: 2px; white-space: nowrap;
  font: 600 11px/1 var(--font-body); color: var(--text);
  background: rgba(8, 14, 23, 0.82); border: 1px solid var(--line); padding: 4px 7px; border-radius: 6px;
}
.show-labels .hosp-pin .lbl { display: block; }
.hosp-pin.selected .dot { background: #fff; box-shadow: 0 0 0 2px #fff, 0 0 22px rgba(255,255,255,0.8); }

/* Panels */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.panel-head h3 { font-size: 15px; }
.muted { color: var(--muted); }
.soon {
  font: 600 10px/1 var(--font-brand); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--warn); border: 1px solid rgba(255, 181, 71, 0.4); border-radius: 999px; padding: 4px 8px;
}
.empty { border: 1px dashed var(--line-strong); border-radius: 10px; padding: 18px; text-align: center; }
.empty p { margin: 0 0 4px; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.detail-title { font: 600 18px/1.3 var(--font-head); margin: 0 0 2px; }
.detail-sub { color: var(--accent); font-size: 12px; margin: 0 0 12px; }

/* Placeholder views */
.ph-intro { max-width: 760px; color: var(--muted); margin: 0 0 18px; }
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-bottom: 18px; }
.ph-card h4 { margin: 0 0 6px; font: 600 14px/1.3 var(--font-head); }
.ph-card p { margin: 0; color: var(--muted); font-size: 13px; }
.table-skeleton { width: 100%; border-collapse: collapse; }
.table-skeleton th { text-align: left; font: 600 11px/1 var(--font-brand); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table-skeleton td { padding: 14px 12px; border-bottom: 1px solid var(--line); }
.table-skeleton td .bar { display: block; height: 8px; border-radius: 4px; background: var(--surface-2); }
.table-wrap { overflow-x: auto; }

/* Case profit calculator */
.calc { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
.calc-form { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 16px; }
.calc-form label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.calc-form label[hidden] { display: none; }
.calc-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.calc-form select, .calc-form input[type="number"] {
  font: 14px var(--font-body); color: var(--text); background: var(--bg-2);
  border: 1px solid var(--line-strong); border-radius: 8px; padding: 9px 10px; width: 100%;
}
.calc-form select:focus, .calc-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.calc-form .check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: 13px; }
.calc-out { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.calc-lines td { padding: 8px 12px; }
.calc-lines .tf td { padding: 10px 12px; border-bottom: 0; color: var(--muted); }
.calc-lines .tf tr.hl td { color: var(--text); font-weight: 600; border-top: 1px solid var(--line-strong); }
.calc-lines tr.sub td { padding: 14px 12px 6px; font: 600 11px/1 var(--font-brand); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.calc-note { color: var(--muted); font-size: 12px; margin: 12px 0 0; }
.calc-verdict { margin: 14px 0 6px; font-size: 15px; }
.calc-alt { margin: 0; padding-left: 18px; color: var(--muted); }
.calc-alt li { margin: 4px 0; }
.calc-alt strong, .calc-verdict strong { color: var(--text); }
tr.best td { background: rgba(0, 212, 255, 0.07); }
tr.dim td { opacity: 0.7; }
.tag { display: inline-block; margin-left: 6px; font-size: 10px; font-weight: 600; letter-spacing: 0.04em; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--logo-1); vertical-align: 1px; }
.tag.good { border-color: var(--accent); color: var(--accent); }
.tag.bad { border-color: rgba(255, 107, 122, 0.5); color: var(--danger); }

/* Editable tables */
.edit-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.small { font-size: 12px; }
.btn-sm { padding: 7px 10px; font-size: 10px; }
table.editable td[contenteditable] { cursor: text; border-radius: 4px; transition: background 0.2s; }
table.editable td[contenteditable]:hover { background: var(--surface-2); }
table.editable td[contenteditable]:focus { outline: 2px solid var(--accent); outline-offset: -2px; background: var(--bg-2); }
table.editable td.saved { background: rgba(62, 224, 161, 0.15); }
table.editable td.ro { color: var(--muted); font-variant-numeric: tabular-nums; }

/* Cases */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 14px; }
.chip { font: 500 13px var(--font-body); color: var(--muted); background: transparent; border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.chip span { margin-left: 4px; font-variant-numeric: tabular-nums; opacity: 0.8; }
.chip:hover { color: var(--text); }
.chip.on { background: var(--surface-2); color: var(--text); border-color: var(--accent); }
.case-table td { vertical-align: top; }
.case-table tbody tr, .case-list li { cursor: pointer; }
.case-table tbody tr:hover td, .case-list li:hover { background: rgba(127, 184, 240, 0.06); }
.case-table tbody tr:focus-visible, .case-list li:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.case-table small, .case-list small { font-size: 12px; }
.dots { display: inline-flex; gap: 4px; vertical-align: middle; }
.dots i { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--line-strong); }
.dots i.on { background: var(--accent); border-color: var(--accent); }
.flag { display: inline-block; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; margin: 0 4px 4px 0; white-space: nowrap; }
.flag.warn { color: var(--warn); background: rgba(255, 181, 71, 0.12); border: 1px solid rgba(255, 181, 71, 0.4); }
.flag.danger { color: var(--danger); background: rgba(255, 107, 122, 0.12); border: 1px solid rgba(255, 107, 122, 0.45); }
.btn.is-on { border-color: var(--ok); color: var(--ok); }
.btn-danger { border-color: rgba(255, 107, 122, 0.5); color: var(--danger); }
.inline-select, .dialog select, .dialog input, .dialog textarea {
  font: 14px var(--font-body); color: var(--text); background: var(--bg-2);
  border: 1px solid var(--line-strong); border-radius: 8px; padding: 8px 10px;
}
.inline-select { padding: 6px 8px; font-size: 13px; }
.planned { margin: 22px 0 10px; color: var(--muted); }

.case-list { list-style: none; margin: 0; padding: 0; }
.case-list li { display: grid; grid-template-columns: 96px 1fr auto; gap: 12px; padding: 10px 8px; border-top: 1px solid var(--line); border-radius: 6px; }
.case-list li:first-child { border-top: 0; }
.case-list .state { text-align: right; }
.case-list .flag-row { display: block; margin-top: 6px; }
.case-list .flag-row .flag { margin: 0 0 4px 4px; }
.case-list.compact li { grid-template-columns: 84px 1fr; padding: 8px 0; }
.case-list.compact .state { grid-column: 2; text-align: left; }
.case-list.compact .flag-row .flag { margin: 0 4px 4px 0; }

.hosp-pin .badge {
  position: absolute; top: -9px; left: 14px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px;
  background: var(--warn); color: var(--bg); font: 700 10px/17px var(--font-body); text-align: center; border: 2px solid var(--bg);
}

/* Dialog */
.dialog { width: min(620px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); color: var(--text); }
.dialog::backdrop { background: rgba(3, 7, 13, 0.72); }
.dialog form { padding: 20px 22px; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; }
.dialog-head h2 { font-size: 20px; }
.dialog-note { margin: 4px 0 16px; }
.icon-btn { background: transparent; border: 0; color: var(--muted); font-size: 26px; line-height: 1; cursor: pointer; padding: 0 4px; }
.icon-btn:hover { color: var(--text); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); min-width: 0; }
.form-grid label[hidden] { display: none; }
.form-grid .wide { grid-column: 1 / -1; }
.dialog textarea { resize: vertical; }
.extra-set { display: flex; gap: 10px; align-items: flex-end; padding: 10px 0 2px; border-top: 1px dashed var(--line); }
.extra-set label { flex: 0 0 84px; }
.extra-set label.grow { flex: 1 1 auto; }
.extra-set label[hidden] { display: none; }
.extra-set .icon-btn { padding-bottom: 6px; }
#f-extra-sets:empty { display: none; }
.dialog select:focus, .dialog input:focus, .dialog textarea:focus, .inline-select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.dialog input[type="date"], .dialog input[type="time"] { color-scheme: dark; }
.steps { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.steps h3 { font-size: 15px; margin-bottom: 8px; }
.step-row { display: grid; grid-template-columns: 26px 1fr; gap: 10px; padding: 6px 0; align-items: start; }
.step-row > b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 700 11px/1 var(--font-brand); color: var(--bg); background: linear-gradient(180deg, var(--logo-1), var(--logo-2)); }
.step-check { display: flex; align-items: center; gap: 8px; padding: 2px 0; cursor: pointer; }
.step-check input { width: 16px; height: 16px; accent-color: var(--accent); padding: 0; }
.step-check small { margin-left: auto; }
.dialog-foot { display: flex; gap: 10px; align-items: center; margin-top: 18px; }
.dialog-foot .spacer { flex: 1; }
#case-error { margin-top: 12px; }
#case-duplicate { margin: 14px 0 0; }

/* Calendar tab */
#team-panel { margin-top: 16px; }
.cal-bar { flex-wrap: wrap; gap: 10px; }
.cal-bar .chips { margin: 0; }
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-nav h3 { margin-left: 8px; font-size: 16px; }
.cal-status { margin: 0 0 10px; }
.cal-scroll { overflow-x: auto; }
.cal-week { display: grid; grid-template-columns: 96px repeat(7, minmax(118px, 1fr)); min-width: 940px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.cal-month { display: grid; grid-template-columns: repeat(7, minmax(110px, 1fr)); min-width: 780px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.cal-head, .cal-corner { padding: 8px 10px; background: var(--bg-2); border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.cal-head b { color: var(--text); font-size: 14px; margin-left: 2px; }
.cal-head.today { color: var(--accent); } .cal-head.today b { color: var(--accent); }
.cal-who { padding: 10px; border-top: 1px solid var(--line); font-weight: 600; font-size: 13px; background: var(--bg-2); }
.cal-who small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; margin-top: 2px; }
.cal-who.warn { color: var(--warn); }
.cal-cell { padding: 6px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); min-height: 64px; display: flex; flex-direction: column; gap: 4px; }
.cal-cell.today, .cal-mcell.today { background: rgba(0, 212, 255, 0.05); }
.cal-case { all: unset; box-sizing: border-box; display: block; width: 100%; cursor: pointer; font-size: 12px; line-height: 1.3; padding: 5px 7px; border-radius: 6px; background: rgba(0, 212, 255, 0.14); border: 1px solid rgba(0, 212, 255, 0.5); color: var(--text); }
.cal-case small { display: block; color: var(--muted); font-size: 11px; }
.cal-case:hover, .cal-case:focus-visible { border-color: var(--accent); background: rgba(0, 212, 255, 0.22); }
.cal-case.clash { border-color: var(--warn); } .cal-case.clash small { color: var(--warn); }
.cal-case.done { opacity: 0.55; }
.cal-cell.open .cal-case { background: rgba(255, 181, 71, 0.12); border-color: rgba(255, 181, 71, 0.55); }
.cal-busy { font-size: 11px; color: var(--muted); padding: 3px 7px; border-radius: 6px; border: 1px dashed var(--line-strong); font-variant-numeric: tabular-nums; }
.cal-key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; }
.cal-key.case { background: rgba(0, 212, 255, 0.3); border: 1px solid rgba(0, 212, 255, 0.6); }
.cal-key.busy { border: 1px dashed var(--line-strong); }
.cal-mcell { min-height: 92px; padding: 6px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); cursor: pointer; display: flex; flex-direction: column; gap: 3px; }
.cal-mcell:nth-child(7n + 1) { border-left: 0; }
.cal-mcell:hover { background: rgba(127, 184, 240, 0.06); }
.cal-mcell.other { opacity: 0.45; }
.cal-mtop { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; }
.cal-initials { font-size: 10px; color: var(--muted); letter-spacing: 0.08em; }
.cal-mcase { font-size: 11px; padding: 2px 6px; border-radius: 5px; background: rgba(0, 212, 255, 0.14); border: 1px solid rgba(0, 212, 255, 0.45); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-mcase.open { background: rgba(255, 181, 71, 0.12); border-color: rgba(255, 181, 71, 0.55); color: var(--warn); }
.cal-mcase.done { opacity: 0.55; }

/* Calendars on the day */
#case-calendars:empty { display: none; }
.cal-day { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.cal-day h3 { font-size: 13px; margin: 0 0 6px; color: var(--muted); font-family: var(--font-body); font-weight: 600; }
.cal-day ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.cal-day li { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.cal-day li strong { flex: 0 0 64px; }
.cal-day li span { color: var(--muted); }
.cal-day li.clash span { color: var(--warn); }
.cal-day li.err span { color: var(--danger); }
.cal-day li small { color: var(--warn); border: 1px solid rgba(255, 181, 71, 0.4); border-radius: 999px; padding: 1px 8px; font-size: 11px; }

/* Paste a booking */
#paste-box { margin-bottom: 16px; }
#paste-box[hidden] { display: none; }
#paste-text { width: 100%; font: 14px/1.5 var(--font-body); color: var(--text); background: var(--bg-2); border: 1px solid var(--line-strong); border-radius: 8px; padding: 10px 12px; resize: vertical; }
#paste-text:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.paste-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; }

/* Bookings from email */
#drafts { margin-bottom: 16px; border-color: rgba(255, 181, 71, 0.35); }
#drafts[hidden] { display: none; }
.drafts-table tbody tr { cursor: default; }
.drafts-table .btn { margin: 0 0 4px 4px; }
.small.err { color: var(--danger); }
.from-email { margin: 0 0 16px; padding: 12px 14px; border: 1px solid rgba(255, 181, 71, 0.35); border-radius: 10px; font-size: 13px; }
.from-email p { margin: 6px 0 0; }
.from-email a, .notice a { color: var(--accent); }
.notice[hidden] { display: none; }

/* Sign-in, account, sync */
.shell[hidden] { display: none; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login[hidden] { display: none; }
.login-card { width: min(380px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 32px 28px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.login-card img { width: 220px; max-width: 100%; mix-blend-mode: screen; }
.login-card .btn-primary { width: 100%; padding: 14px 16px; }
.login-card p { margin: 0; }
.account { margin-top: 18px; padding: 14px 10px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.sync-status { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 2000; margin: 0 auto; max-width: 720px; padding: 12px 16px; border-radius: 10px; background: #3a1620; border: 1px solid rgba(255, 107, 122, 0.6); color: #ffd9de; font-size: 13px; }
.sync-status[hidden] { display: none; }
.notice { margin: 0 0 14px; padding: 10px 12px; border: 1px solid rgba(255, 181, 71, 0.4); border-radius: 10px; color: var(--warn); font-size: 13px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* Responsive */
@media (max-width: 1100px) {
  .pipeline { grid-template-columns: repeat(3, 1fr); }
  .maps { grid-template-columns: 1fr; }
  .map { height: 380px; }
  .calc { grid-template-columns: 1fr; }
  .calc-form { position: static; }
  .case-list li { grid-template-columns: 84px 1fr; }
  .case-list .state { grid-column: 2; text-align: left; }
  .case-list .flag-row .flag { margin: 0 4px 4px 0; }
  .map-london .map-body { grid-template-columns: 1fr; }
  .map-london .hosp-list { border-left: 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); max-height: none; }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { display: flex; align-items: center; justify-content: space-between; border: 0; padding: 0 0 10px; margin: 0; }
  .brand img { max-width: 140px; }
  .brand-tag { margin: 0; }
  .nav { flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 4px; }
  .nav a { white-space: nowrap; flex: none; }
  .nav-label { display: none; }
  .main { padding: 18px 16px 40px; }
  .grid-2 { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: repeat(2, 1fr); }
  .map { height: 320px; }
}
