/* National Transplant Programme Systems (demo console): back-office styling. DEMO / SYNTHETIC. Self-contained, works offline. */

:root {
  --brand: #0e4744;
  --brand-2: #155955;
  --brand-ink: #a9d1ca;
  --bg: #f1f5f4;
  --surface: #ffffff;
  --surface-2: #f6f9f8;
  --surface-3: #e9f0ee;
  --border: #d2dcd9;
  --border-soft: #e3eae8;
  --border-strong: #b3c3bf;
  --text: #172624;
  --text-2: #364946;
  --muted: #566a66;
  --accent: #17766c;
  --accent-hover: #11625a;
  --accent-soft: #e0f1ed;
  --accent-ink: #11605a;
  --ribbon: #f2a93b;
  --ribbon-ink: #2b1b00;
  --radius: 3px;
  --radius-sm: 2px;
  --shadow-lg: 0 8px 24px rgba(14, 71, 68, 0.18);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  /* pill palette: background / border / text */
  --amber-bg: #fff4dc; --amber-bd: #ecc06a; --amber-tx: #744700;
  --blue-bg: #e7effa; --blue-bd: #a8c2e4; --blue-tx: #1c4d86;
  --green-bg: #e5f3ea; --green-bd: #9ccfae; --green-tx: #1d6537;
  --red-bg: #fbe8e6; --red-bd: #e5a69f; --red-tx: #982318;
  --orange-bg: #fdeee1; --orange-bd: #eeb383; --orange-tx: #85420e;
  --slate-bg: #eef1f5; --slate-bd: #c6ced9; --slate-tx: #45526a;
  --violet-bg: #efebf7; --violet-bd: #c4b6e0; --violet-tx: #52388f;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 13.5px/1.45 var(--font); -webkit-text-size-adjust: 100%; }
::selection { background: #c3e2db; }
a { color: var(--accent-ink); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid #1f8a7e; outline-offset: 2px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
p { margin: 0; }
code, pre, .mono { font-family: var(--mono); }
.mono { font-size: 0.92em; }
.small { font-size: 12px; }
.muted { color: var(--muted); }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.tnum, .amount, .ref { font-variant-numeric: tabular-nums; }
.amount { white-space: nowrap; }
.ref { font-family: var(--mono); font-size: 12px; }
.ref-plain { color: var(--text-2); }
.wrap-text { white-space: normal; overflow-wrap: anywhere; min-width: 150px; }
.clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.spacer { flex: 1 1 0; }
.icon { flex: none; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.boot, .noscript { padding: 48px; text-align: center; color: var(--muted); }
.skip-link { position: absolute; left: 8px; top: -40px; z-index: 60; background: var(--surface); padding: 6px 10px; border-radius: var(--radius); }
.skip-link:focus { top: 8px; }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 30px; padding: 0 12px;
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--text);
  font: 500 12.5px/1 var(--font); white-space: nowrap; text-decoration: none; cursor: pointer;
  transition: background-color 100ms ease-out, border-color 100ms ease-out;
}
.btn:hover { background: var(--surface-2); border-color: #9eabba; color: var(--text); }
.btn:active { background: var(--surface-3); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-sm { height: 26px; padding: 0 9px; font-size: 12px; }
.btn-block { width: 100%; height: 34px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn-danger { background: #9b2419; border-color: #9b2419; color: #fff; }
.btn-danger:hover { background: #7f1c13; border-color: #7f1c13; color: #fff; }
.btn-danger-outline { color: #982318; border-color: #dba59e; }
.btn-danger-outline:hover { background: var(--red-bg); border-color: #c98b83; color: #982318; }
.btn-header { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.btn-header:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.7); color: #fff; }
.btn[aria-busy="true"]::before {
  content: ""; width: 11px; height: 11px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: spin 700ms linear infinite;
}
.btn[aria-pressed="true"] { background: var(--accent-soft); border-color: #93c4bb; color: var(--accent-ink); }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: var(--radius) 0 0 var(--radius); margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.btn-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; flex: none;
  border: 1px solid transparent; border-radius: var(--radius); background: transparent; color: var(--muted);
  font: 17px/1 var(--font); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.link {
  border: 0; padding: 0; background: none; cursor: pointer; color: var(--accent-ink); font: inherit; text-align: left;
  text-decoration: underline; text-decoration-color: #9fcbc3; text-underline-offset: 2px;
}
.link:hover { color: var(--accent-hover); text-decoration-color: currentColor; }
.link.ref { font-family: var(--mono); font-size: 12px; }
.caret { font-size: 10px; color: var(--muted); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- pills, tags */

.pill {
  display: inline-flex; align-items: center; height: 19px; padding: 0 7px;
  border: 1px solid var(--slate-bd); border-radius: var(--radius-sm);
  background: var(--slate-bg); color: var(--slate-tx);
  font-size: 11px; font-weight: 600; line-height: 1; white-space: nowrap; letter-spacing: 0.01em;
}
.pill-amber { background: var(--amber-bg); border-color: var(--amber-bd); color: var(--amber-tx); }
.pill-blue { background: var(--blue-bg); border-color: var(--blue-bd); color: var(--blue-tx); }
.pill-green { background: var(--green-bg); border-color: var(--green-bd); color: var(--green-tx); }
.pill-red { background: var(--red-bg); border-color: var(--red-bd); color: var(--red-tx); }
.pill-orange { background: var(--orange-bg); border-color: var(--orange-bd); color: var(--orange-tx); }
.pill-slate { background: var(--slate-bg); border-color: var(--slate-bd); color: var(--slate-tx); }
.tag {
  display: inline-flex; align-items: center; height: 18px; padding: 0 5px;
  border: 1px solid var(--slate-bd); border-radius: var(--radius-sm); background: var(--surface);
  color: var(--slate-tx); font-size: 11px; line-height: 1; white-space: nowrap;
}
.tag-blue { border-color: var(--blue-bd); color: var(--blue-tx); background: var(--blue-bg); }
.tag-green { border-color: var(--green-bd); color: var(--green-tx); background: var(--green-bg); }
.tag-red { border-color: var(--red-bd); color: var(--red-tx); background: var(--red-bg); }
.tag-orange { border-color: var(--orange-bd); color: var(--orange-tx); background: var(--orange-bg); }
.tag-violet { border-color: var(--violet-bd); color: var(--violet-tx); background: var(--violet-bg); }
.tag-demo { border-color: var(--amber-bd); color: var(--amber-tx); background: var(--amber-bg); font-weight: 600; }
.tag-inline { margin-left: 6px; vertical-align: 1px; }
.tags { display: inline-flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.tags.wrap { display: flex; gap: 6px; }
.method {
  display: inline-block; min-width: 42px; padding: 1px 5px; border-radius: var(--radius-sm);
  font: 600 10.5px/1.5 var(--mono); text-align: center; background: var(--slate-bg); color: var(--slate-tx); border: 1px solid var(--slate-bd);
}
.method-post { background: var(--blue-bg); color: var(--blue-tx); border-color: var(--blue-bd); }
.arrow { color: var(--muted); padding: 0 3px; }
.status-change { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 2px; }
.count {
  display: inline-block; margin-left: 8px; padding: 0 6px; border-radius: var(--radius-sm);
  background: var(--surface-3); color: var(--text-2); font-size: 11.5px; font-weight: 600; line-height: 18px; vertical-align: 1px;
  font-variant-numeric: tabular-nums;
}
.ref-chip {
  display: inline-flex; align-items: center; height: 24px; padding: 0 8px;
  border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface);
  color: var(--accent-ink); cursor: pointer; font: inherit;
}
.ref-chip:hover { border-color: var(--accent); background: var(--accent-soft); }
.ref-chip-plain { color: var(--text-2); cursor: default; background: var(--surface-2); border-style: dashed; }
.ref-chip-plain:hover { border-color: var(--border-strong); background: var(--surface-2); }

/* ---------------------------------------------------------------- shell: ribbon, header, demo strip */

.app-shell { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.masthead { flex: none; position: relative; z-index: 30; }
.env-ribbon {
  padding: 3px 16px; background: var(--ribbon); color: var(--ribbon-ink);
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; text-align: center; line-height: 16px;
  border-bottom: 1px solid #c9861c;
}
.portal-header {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 16px;
  background: var(--brand); color: #fff; border-bottom: 1px solid #08302d;
}
.brand { display: inline-flex; align-items: center; gap: 9px; color: #fff; text-decoration: none; flex: none; }
.brand:hover { color: #fff; }
.brand-name { font-size: 14px; font-weight: 650; letter-spacing: 0.005em; white-space: nowrap; }
.biz-clock { display: flex; flex-direction: column; line-height: 1.25; flex: none; }
.biz-clock-label { display: flex; align-items: center; gap: 6px; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--brand-ink); }
.biz-clock-row { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.biz-clock-date, .biz-clock-time { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.clock-offset {
  padding: 0 5px; border-radius: var(--radius-sm); background: var(--ribbon); color: var(--ribbon-ink);
  font-size: 10px; font-weight: 700; letter-spacing: 0.02em; text-transform: none; line-height: 15px; white-space: nowrap;
}
.secured { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--brand-ink); white-space: nowrap; flex: none; }
.user-chip { display: flex; align-items: center; gap: 8px; padding-left: 12px; border-left: 1px solid rgba(255, 255, 255, 0.18); min-width: 0; flex: 0 1 auto; }
.user-avatar {
  display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; flex: none;
  border-radius: 50%; background: #1d6e66; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: 0.03em;
}
.user-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; white-space: nowrap; }
.user-role { font-size: 11px; color: var(--brand-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 210px; }
.demo-strip {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 38px; padding: 4px 16px;
  background: #e4eeeb; border-bottom: 1px solid #c6d6d2;
}
.demo-strip-label { font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--slate-tx); }
.demo-strip-clock { font-size: 12.5px; color: var(--text-2); }
.demo-strip-clock.is-ahead { color: var(--amber-tx); font-weight: 600; }

/* ---------------------------------------------------------------- layout, navigation, footer */

.layout { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 238px minmax(0, 1fr); }
.rail { overflow-y: auto; padding: 6px 0 16px; background: var(--surface); border-right: 1px solid var(--border); }
.nav-group { display: flex; flex-direction: column; }
.nav-group + .nav-group { margin-top: 4px; border-top: 1px solid var(--border-soft); }
.nav-group-label { padding: 12px 16px 4px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: #5f736f; }
.nav-link {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 29px; padding: 4px 14px 4px 16px; color: var(--text-2); text-decoration: none; font-size: 13px;
}
.nav-link:hover { background: #eef5f3; color: var(--text); }
.nav-link[aria-current="page"] { background: var(--accent-soft); color: var(--brand); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
.nav-label { overflow: hidden; text-overflow: ellipsis; }
.nav-badge { min-width: 20px; padding: 0 5px; border-radius: var(--radius-sm); font-size: 11px; font-weight: 700; line-height: 17px; text-align: center; border: 1px solid; }
.nav-badge-amber { background: var(--amber-bg); color: var(--amber-tx); border-color: var(--amber-bd); }
.nav-badge-red { background: var(--red-bg); color: var(--red-tx); border-color: var(--red-bd); }
.nav-badge-orange { background: var(--orange-bg); color: var(--orange-tx); border-color: var(--orange-bd); }
.main { position: relative; min-width: 0; overflow-y: auto; display: flex; flex-direction: column; outline: none; }
.page { flex: 1 0 auto; padding: 18px 24px 32px; min-width: 0; }
.portal-footer {
  flex: none; padding: 10px 24px; border-top: 1px solid var(--border); background: var(--surface);
  font-size: 11.5px; color: var(--muted); letter-spacing: 0.01em;
}

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.crumb { font-size: 10.5px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: #5f736f; margin-bottom: 3px; }
.page-title { font-size: 19px; font-weight: 650; color: var(--brand); outline: none; }
.page-sub { margin-top: 3px; color: var(--muted); max-width: 900px; font-size: 13px; }
.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------------------------------------------------------------- panels, notices, banners */

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 14px; min-width: 0; }
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 9px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.panel-title { font-size: 13.5px; font-weight: 650; color: var(--brand); }
.panel-sub { margin-top: 1px; font-size: 12px; color: var(--muted); }
.panel-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.panel-actions:empty { display: none; }
.panel-actions .input { width: auto; min-width: 200px; }
.panel-body { padding: 12px 14px 14px; min-width: 0; }
.panel-body > .table-wrap, .panel-body > .flush > .table-wrap { margin: -12px -14px -14px; border: 0; border-radius: 0 0 var(--radius) var(--radius); }
.grid-2 { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 14px; align-items: start; }
.grid-2 > .panel { margin-bottom: 0; }
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.toolbar .input[type="search"] { width: 360px; max-width: 100%; }
.toolbar select.input { width: auto; }
.notice { margin-bottom: 14px; padding: 9px 12px; border: 1px solid #bcd9d2; border-left: 3px solid var(--accent); border-radius: var(--radius); background: #f0f8f6; color: var(--text-2); font-size: 12.5px; }
.notice p + p { margin-top: 3px; }
.notice-warn { border-color: var(--amber-bd); border-left-color: #c98a12; background: #fff9ec; }
.help-inline { margin: -4px 0 12px; color: var(--muted); font-size: 12.5px; }
.banner-host:empty { display: none; }
.banner {
  display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; padding: 10px 12px;
  border: 1px solid var(--green-bd); border-left: 4px solid #2e8b57; border-radius: var(--radius); background: var(--green-bg);
}
.banner-warn { border-color: var(--amber-bd); border-left-color: #c98a12; background: var(--amber-bg); }
.banner-body { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; }
.banner-body strong { font-size: 13px; color: var(--text); }
.banner-status { color: var(--text-2); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- tabs */

.tabs { display: flex; flex-wrap: wrap; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.tab {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; margin-bottom: -1px;
  border: 1px solid transparent; border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; background: none;
  font: 500 13px var(--font); color: var(--muted); cursor: pointer;
}
.tab:hover { color: var(--text); background: var(--surface-2); }
.tab[aria-selected="true"] { color: var(--brand); font-weight: 600; background: var(--surface); border-color: var(--border); box-shadow: inset 0 2px 0 var(--accent); }
.tab-count { padding: 0 5px; border-radius: var(--radius-sm); background: var(--surface-3); color: var(--text-2); font-size: 11px; font-weight: 600; line-height: 17px; font-variant-numeric: tabular-nums; }
.tab-panel { outline: none; }

/* ---------------------------------------------------------------- tables */

.table-wrap { overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
.tbl th {
  position: sticky; top: 0; z-index: 1; padding: 7px 10px; background: var(--surface-3); border-bottom: 1px solid #cfd6df;
  color: var(--text-2); font-size: 11.5px; font-weight: 650; text-align: left; white-space: nowrap; letter-spacing: 0.01em;
}
.tbl td { padding: 6px 10px; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
.tbl tbody tr:nth-child(even) > td { background: #fafbfc; }
.tbl tbody tr:last-child > td { border-bottom: 0; }
.tbl tbody tr:hover > td { background: #eef6f4; }
.tbl tr.clickable { cursor: pointer; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .actions-col { text-align: right; white-space: nowrap; width: 1%; }
.tbl .applied-col { min-width: 170px; }
.tbl .clip-cell { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl .ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tbl .cell-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.cell-stack .ellipsis { max-width: 100%; }
.tbl .mode-cell { min-width: 170px; }
.tbl .scopes-cell { min-width: 140px; max-width: 260px; }
.tbl .sub-name { max-width: 300px; }
.tbl tr.empty-row > td, .tbl tr.empty-row:hover > td { padding: 0; background: var(--surface); }
.tbl tr.row-bad > td { background: #fff7f6; }
.tbl tr.row-muted > td { color: var(--muted); }
.tbl tr.row-open > td { background: var(--accent-soft); border-bottom-color: transparent; }
.tbl tr.detail-row > td, .tbl tr.detail-row:hover > td { background: var(--surface-2); padding: 12px 14px 14px; }
.tbl .expander-col { width: 34px; padding-right: 0; }
.tbl .expander { width: 22px; height: 22px; font-size: 12px; }
.tbl-sub { font-size: 12px; }
.tbl-sub td { padding: 5px 8px; }
.tbl-sub th { padding: 6px 8px; }
.feed-wrap { max-height: 420px; }
.tbl-feed { table-layout: fixed; font-size: 12px; }
.tbl-feed td { padding-top: 4px; padding-bottom: 4px; }
.tbl-feed .c-time { width: 76px; }
.tbl-feed .c-caller { width: 230px; }
.tbl-feed .c-method { width: 64px; }
.tbl-feed .c-status { width: 200px; }
.tbl-feed .c-notes { width: 140px; }
.tbl-feed .c-ms { width: 52px; }
.tbl-feed .tag { margin-left: 6px; }
.tbl-feed tr.fresh > td { animation: fresh 2.4s ease-out; }
@keyframes fresh { from { background: #d5eee8; } to { background: transparent; } }
.status-code { margin-left: 6px; color: var(--red-tx); }
.failures { margin: 0; padding-left: 16px; color: var(--red-tx); font-size: 12px; }

/* ---------------------------------------------------------------- empty / loading */

.empty { padding: 26px 16px; text-align: center; }
.empty-title { font-weight: 600; color: var(--text-2); }
.empty-hint { margin-top: 4px; color: var(--muted); font-size: 12.5px; }
.empty .btn { margin-top: 12px; }
.empty-error .empty-title { color: var(--red-tx); }
.code-inline { padding: 1px 5px; border-radius: var(--radius-sm); background: var(--red-bg); color: var(--red-tx); font-size: 11.5px; }
.loading { display: flex; align-items: center; gap: 8px; padding: 18px 4px; color: var(--muted); }
.spinner { width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--border-strong); border-right-color: var(--accent); animation: spin 700ms linear infinite; }

/* ---------------------------------------------------------------- dashboard */

.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpis > .loading, .kpis > .empty { grid-column: 1 / -1; padding: 16px; background: var(--surface); border: 1px solid var(--border); }
.kpi {
  display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 11px; min-width: 0;
  background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--slate-bd); border-radius: var(--radius);
  color: inherit; text-decoration: none;
}
a.kpi:hover { background: var(--surface-2); color: inherit; border-color: #b9c6d4; }
.kpi-label { font-size: 11px; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.kpi-value { font-size: 24px; font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1.2; color: var(--brand); }
.kpi-hint { font-size: 11.5px; color: var(--muted); }
.kpi-amber { border-top-color: #d99a1e; }
.kpi-amber .kpi-value { color: var(--amber-tx); }
.kpi-blue { border-top-color: var(--accent); }
.kpi-red { border-top-color: #b8352a; }
.kpi-red .kpi-value { color: var(--red-tx); }
.kpi-orange { border-top-color: #d77a2e; }
.kpi-orange .kpi-value { color: var(--orange-tx); }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); }
.live[data-mode="live"] .live-dot { background: #2e8b57; animation: pulse 2s ease-in-out infinite; }
.live[data-mode="error"] { color: var(--red-tx); }
.live[data-mode="error"] .live-dot { background: #b8352a; }
@keyframes pulse { 50% { opacity: 0.35; } }
.inv-others { margin-top: 10px; color: var(--muted); }

/* ---------------------------------------------------------------- forms */

.input {
  width: 100%; height: 30px; padding: 0 9px; border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--text); font: 12.5px var(--font);
}
textarea.input { height: auto; padding: 7px 9px; line-height: 1.45; resize: vertical; }
textarea.input.mono, .input.mono { font-family: var(--mono); font-size: 12px; }
select.input { padding-right: 26px; }
.input:focus-visible { outline: 2px solid #1f8a7e; outline-offset: 0; border-color: #1f8a7e; }
.input[aria-invalid="true"] { border-color: #b8352a; }
.input::placeholder { color: #848f9d; }
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; margin: 0; padding: 0; border: 0; }
fieldset.field { gap: 8px; }
.field-label { font-size: 12px; font-weight: 650; color: var(--text-2); padding: 0; }
.field-hint { font-size: 11.5px; color: var(--muted); }
.field-error { font-size: 12px; color: var(--red-tx); font-weight: 600; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.form-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; }
.check, .radio { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; cursor: pointer; }
.radio { align-items: flex-start; }
.radio input { margin-top: 3px; }
.check input, .radio input { accent-color: var(--accent); width: 14px; height: 14px; margin: 0; flex: none; }
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; }
.kv-rows { display: flex; flex-direction: column; gap: 6px; }
.kv-row { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 6px; align-items: center; }
fieldset.field > .btn { align-self: flex-start; }
.preview { border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.preview-bar { display: flex; gap: 8px; }
.preview-out:empty { display: none; }
.inject-result { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.inject-result:empty { display: none; }

/* ---------------------------------------------------------------- JSON viewer */

.json {
  font: 12px/1.55 var(--mono); padding: 8px 10px; overflow-x: auto;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
}
.j-kids { padding-left: 16px; border-left: 1px dotted var(--border-strong); margin-left: 3px; }
.j-node > summary { cursor: pointer; list-style: none; }
.j-node > summary::-webkit-details-marker { display: none; }
.j-node > summary::before { content: "▸"; display: inline-block; width: 12px; color: var(--muted); }
.j-node[open] > summary::before { content: "▾"; }
.j-row { padding-left: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.j-key { color: #1c4d86; }
.j-idx, .j-punct { color: var(--muted); }
.j-count { color: var(--muted); font-style: italic; padding: 0 4px; }
.j-str { color: #1d6537; }
.j-num { color: #8a4510; }
.j-bool { color: #52388f; }
.j-null { color: var(--muted); }
.pre {
  margin: 0; padding: 8px 10px; max-height: 320px; overflow: auto; font: 12px/1.5 var(--mono);
  white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
}

/* ---------------------------------------------------------------- dialogs: modal + record drawer */

dialog { color: var(--text); }
dialog::backdrop { background: rgba(11, 37, 69, 0.38); }
.modal { width: min(480px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--border); border-top: 3px solid var(--brand); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.modal-wide { width: min(600px, calc(100vw - 32px)); }
.modal-inner { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; }
.modal-title { font-size: 15px; font-weight: 650; color: var(--brand); }
.modal-msg { color: var(--text-2); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.modal .notice { margin-bottom: 0; }
.facts { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 6px 12px; margin: 0; font-size: 12.5px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.drawer {
  margin: 0 0 0 auto; padding: 0; width: min(840px, 100vw); max-width: 100vw; height: 100vh; height: 100dvh; max-height: none;
  border: 0; border-left: 1px solid var(--border); box-shadow: var(--shadow-lg); background: var(--surface);
}
.drawer[open] { animation: drawer-in 160ms ease-out; }
@keyframes drawer-in { from { transform: translateX(20px); opacity: 0.5; } to { transform: none; opacity: 1; } }
.drawer-inner { display: flex; flex-direction: column; height: 100%; }
.drawer-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 14px 20px 12px; border-bottom: 1px solid var(--border); border-top: 3px solid var(--brand); background: var(--surface-2);
}
.drawer-titles { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.drawer-title { font-size: 17px; font-weight: 650; font-family: var(--mono); color: var(--brand); overflow-wrap: anywhere; outline: none; font-variant-numeric: tabular-nums; }
.drawer-meta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.meta-item { display: inline-flex; align-items: baseline; gap: 5px; font-size: 12.5px; }
.meta-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.drawer-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.drawer-body { flex: 1; overflow-y: auto; padding: 14px 20px 28px; display: flex; flex-direction: column; gap: 16px; }
.eyebrow { font-size: 10.5px; font-weight: 700; color: #5f736f; letter-spacing: 0.08em; text-transform: uppercase; }
.back-link { font-size: 12px; margin-bottom: 3px; }
.rec-body .tabs { margin-bottom: 14px; }
.rec-section { margin-bottom: 18px; }
.rec-section-title { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); padding-bottom: 6px; margin-bottom: 4px; border-bottom: 2px solid var(--surface-3); }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin: 0; }
.fg-item { display: grid; grid-template-columns: minmax(110px, 40%) minmax(0, 1fr); gap: 8px; padding: 6px 0; border-bottom: 1px dotted #dde2e8; min-width: 0; }
.fg-item dt { color: var(--muted); font-size: 12px; }
.fg-item dd { margin: 0; font-size: 12.5px; overflow-wrap: anywhere; min-width: 0; }
.sub-block { display: flex; flex-direction: column; gap: 6px; }
.sub-title { font-size: 12.5px; font-weight: 650; color: var(--text-2); }
.stack { display: flex; flex-direction: column; gap: 10px; }
.section-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }

/* scanned-document viewer for long text (documentText, transcriptText) */
.doc-viewer { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.doc-bar { display: flex; align-items: center; gap: 10px; padding: 6px 10px; background: var(--surface-3); border-bottom: 1px solid var(--border); }
.doc-title { font-size: 12px; font-weight: 650; color: var(--text-2); }
.doc-meta { flex: 1; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.doc-scroll { max-height: 440px; overflow: auto; padding: 18px; background: #d9dde2; outline: none; }
.doc-scroll:focus-visible { outline: 2px solid #1f8a7e; outline-offset: -2px; }
.doc-paper {
  position: relative; max-width: 680px; margin: 0 auto; padding: 30px 34px; overflow: hidden;
  background: #fdfcf7; border: 1px solid #d7d1c2; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}
.doc-paper::after {
  content: "DEMO / SYNTHETIC"; position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%) rotate(-24deg);
  font: 700 42px/1 var(--font); letter-spacing: 0.08em; color: rgba(11, 37, 69, 0.06); white-space: nowrap; pointer-events: none;
}
.doc-text { position: relative; margin: 0; font: 12.5px/1.65 var(--mono); color: #2a2a2a; white-space: pre-wrap; overflow-wrap: anywhere; }
.cell-doc > summary { cursor: pointer; color: var(--accent-ink); font-size: 12px; }
.cell-doc .doc-viewer { margin-top: 6px; min-width: 420px; }

.timeline { list-style: none; margin: 0; padding: 0; }
.tl-item { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border-soft); }
.tl-item:last-child { border-bottom: 0; }
.tl-time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 1px; }
.tl-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; }
.tl-meta { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.tl-note { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.tl-json { margin-top: 4px; font-size: 12px; }
.tl-json > summary { cursor: pointer; color: var(--accent-ink); }
.tl-json .json { margin-top: 4px; }

/* ---------------------------------------------------------------- popover menu */

.menu-wrap { display: inline-block; }
.menu {
  position: fixed; inset: auto; margin: 0; padding: 4px; min-width: 280px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-lg);
}
.menu-item {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; padding: 7px 10px;
  border: 0; border-radius: var(--radius-sm); background: none; text-align: left; font: 12.5px var(--font); color: var(--text); cursor: pointer;
}
.menu-item:hover, .menu-item:focus-visible { background: var(--accent-soft); outline: none; }
.menu-label { font-weight: 600; }
.menu-hint { font-size: 11.5px; color: var(--muted); }

/* ---------------------------------------------------------------- toasts */

.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 100; display: flex; flex-direction: column; gap: 8px; width: min(400px, calc(100vw - 32px)); }
.toast {
  display: flex; gap: 8px; align-items: flex-start; padding: 9px 8px 9px 12px;
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--accent);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); font-size: 12.5px; animation: toast-in 150ms ease-out;
}
.toast-ok { border-left-color: #2e8b57; }
.toast-warn { border-left-color: #c98a12; }
.toast-error { border-left-color: #b8352a; }
.toast-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.toast-title { font-weight: 600; overflow-wrap: anywhere; }
.toast-code { display: inline-block; margin-right: 6px; padding: 0 5px; border-radius: var(--radius-sm); background: var(--red-bg); color: var(--red-tx); font-size: 11px; font-weight: 700; vertical-align: 1px; }
.toast-msg { color: var(--text-2); overflow-wrap: anywhere; }
.toast-lines { margin: 2px 0 0; padding-left: 16px; color: var(--text-2); font-family: var(--mono); font-size: 11.5px; overflow-wrap: anywhere; }
.toast-details > summary { cursor: pointer; color: var(--accent-ink); font-size: 12px; margin-top: 2px; }
.toast-details .pre { margin-top: 6px; max-height: 220px; }
.toast-close { width: 22px; height: 22px; font-size: 15px; }
@keyframes toast-in { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------------------------------------------------------------- sign in */

.signin-shell { min-height: 100vh; display: flex; flex-direction: column; }
.signin-shell .portal-header { min-height: 52px; }
.signin { flex: 1; display: grid; place-items: center; padding: 32px 16px; }
.signin-card {
  width: min(400px, 100%); display: flex; flex-direction: column; gap: 13px; padding: 24px 26px;
  background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--brand); border-radius: var(--radius);
}
.signin-title { font-size: 18px; font-weight: 650; color: var(--brand); }
.signin-sub { margin-top: -8px; font-size: 12.5px; color: var(--muted); }
.signin-note { font-size: 12px; color: var(--muted); padding-top: 12px; border-top: 1px solid var(--border-soft); }

/* ---------------------------------------------------------------- keys */

.key-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.key-text { overflow-wrap: anywhere; }
.key-cell { min-width: 290px; }
.key-reveal { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); }
.key-reveal code { flex: 1; min-width: 0; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- events */

.event-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 16px; }
.event-detail .sub-title { margin-bottom: 8px; }
.event-detail .section-bar .sub-title { margin-bottom: 0; }
.deliveries { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.delivery { padding: 8px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; gap: 6px; }
.delivery-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.delivery-error { font-size: 12px; color: var(--red-tx); overflow-wrap: anywhere; }
.delivery details > summary { cursor: pointer; font-size: 12px; color: var(--accent-ink); }
.delivery details > .json, .delivery details > .pre { margin-top: 6px; }

/* ---------------------------------------------------------------- responsive */

@media (max-width: 1240px) {
  .secured-text { display: none; }
  .brand-name { font-size: 13px; }
}
@media (max-width: 1180px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .form-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .event-detail { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .app-shell { height: auto; min-height: 100vh; }
  .portal-header { flex-wrap: wrap; }
    .layout { display: block; }
  .rail { display: flex; overflow-x: auto; padding: 0 8px; border-right: 0; border-bottom: 1px solid var(--border); }
  .nav-group { flex-direction: row; }
  .nav-group + .nav-group { margin-top: 0; border-top: 0; border-left: 1px solid var(--border-soft); }
  .nav-group-label { display: none; }
  .nav-link { white-space: nowrap; padding: 8px 12px; }
  .nav-link[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--accent); }
  .main { overflow: visible; }
  .field-grid { grid-template-columns: minmax(0, 1fr); }
  .page-head { flex-direction: column; align-items: flex-start; }
  .page-actions { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .page { padding: 14px 12px 28px; }
  .form-grid, .form-grid-4, .check-grid { grid-template-columns: minmax(0, 1fr); }
  .span-2 { grid-column: auto; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .user-chip { border-left: 0; padding-left: 0; }
  .tl-item { grid-template-columns: minmax(0, 1fr); gap: 2px; }
    }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .btn[aria-busy="true"]::before, .spinner { animation: none; border-right-color: currentColor; opacity: 0.6; }
}

/* ---------------------------------------------------------------- transplant programme screens */

.pill-violet { background: var(--violet-bg); color: var(--violet-tx); border-color: var(--violet-bd); }
.ar { font-family: "Noto Naskh Arabic", "Geeza Pro", "Segoe UI", Tahoma, var(--font); font-size: 14px; line-height: 1.7; unicode-bidi: isolate; }
.ar-block { display: block; text-align: right; white-space: normal; overflow-wrap: anywhere; }
.bi { display: flex; flex-direction: column; gap: 1px; min-width: 130px; }
.bi .ar { color: var(--text-2); font-size: 13px; line-height: 1.5; }
.translation { color: var(--muted); font-size: 12px; font-style: italic; overflow-wrap: anywhere; }
.sub-ribbon { font-size: 11px; color: var(--brand-ink); letter-spacing: 0.04em; display: block; font-weight: 500; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.grid-3 > .panel, .grid-2 > .panel { margin-bottom: 0; }
.section-gap { margin-top: 14px; }

.journey { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 14px; margin-bottom: 14px; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.step { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 8px 2px; border-bottom: 1px solid var(--border-soft); }
.step:last-child { border-bottom: 0; }
.step-no {
  display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text-2); font: 600 12px/1 var(--font); font-variant-numeric: tabular-nums;
}
.step-done .step-no { background: var(--green-bg); border-color: var(--green-bd); color: var(--green-tx); }
.step-in_progress .step-no { background: var(--amber-bg); border-color: var(--amber-bd); color: var(--amber-tx); }
.step-a2os .step-no { background: var(--violet-bg); border-color: var(--violet-bd); color: var(--violet-tx); }
.step-return { background: #fbf8f1; }
.step-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.step-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 600; }
.step-who { font-size: 12px; color: var(--muted); }
.step-detail { font-size: 12.5px; color: var(--text-2); overflow-wrap: anywhere; }
.step-actions { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }

.inbox-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.inbox-item { padding: 10px 12px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--border-strong); border-radius: var(--radius); display: flex; flex-direction: column; gap: 4px; }
.inbox-item.is-unread { border-left-color: var(--accent); background: #f8fcfb; }
.inbox-item.is-urgent { border-left-color: #b8352a; background: #fff8f7; }
.inbox-item.is-correction { border-left-color: #d77a2e; }
.inbox-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inbox-subject { font-weight: 600; overflow-wrap: anywhere; }
.inbox-meta { font-size: 12px; color: var(--muted); }
.field-errors { margin: 2px 0 0; padding-left: 18px; font-size: 12.5px; }
.field-errors li + li { margin-top: 2px; }
.field-errors .ref { color: var(--orange-tx); }

.eta { display: flex; flex-direction: column; gap: 4px; min-width: 240px; }
.eta-track { position: relative; height: 12px; border-radius: 6px; background: var(--surface-3); border: 1px solid var(--border); overflow: hidden; }
.eta-fill { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 6px 0 0 6px; }
.eta-expected { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(45deg, rgba(23, 118, 108, 0.18) 0 4px, transparent 4px 8px); }
.eta.is-breach .eta-fill { background: #b8352a; }
.eta.is-breach .eta-expected { background: repeating-linear-gradient(45deg, rgba(184, 53, 42, 0.22) 0 4px, transparent 4px 8px); }
.eta-limit { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--brand); }
.eta-legend { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.eta-legend .is-bad { color: var(--red-tx); font-weight: 600; }
.transfer-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 1.1fr); gap: 16px; padding: 12px 14px; border-bottom: 1px solid var(--border-soft); }
.transfer-card:last-child { border-bottom: 0; }
.route { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 600; }

.draft-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.draft { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 9px 2px; border-bottom: 1px solid var(--border-soft); }
.draft:last-child { border-bottom: 0; }
.draft-desc { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.inquiry { padding: 12px 14px; border-bottom: 1px solid var(--border-soft); display: flex; flex-direction: column; gap: 6px; }
.inquiry:last-child { border-bottom: 0; }
.inquiry-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.reply { padding: 8px 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; gap: 4px; }
.doc-check { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.doc-check li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mini-kpis { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 10px; }
.mini-kpis > div { display: flex; flex-direction: column; }
.stat-value { font-size: 20px; font-weight: 650; color: var(--brand); font-variant-numeric: tabular-nums; }
.stat-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters .input { width: auto; min-width: 130px; }
.tbl tr.row-live > td { background: #eef8f5; }

@media (max-width: 1180px) {
  .journey, .grid-3, .inquiry-grid, .transfer-card { grid-template-columns: minmax(0, 1fr); }
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.tbl-wrap-head th { white-space: normal; }
.tbl-wrap-head td { padding-left: 8px; padding-right: 8px; }
.cell-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.transfer-card .cell-stack, .inquiry .cell-stack { align-items: stretch; }
.step-actions .btn { max-width: 220px; white-space: normal; height: auto; min-height: 28px; padding-top: 4px; padding-bottom: 4px; text-align: center; }
