/* Blackstone Street Warehouse — shared styles */
:root {
  --black: #16181a;
  --ink: #1c1e20;
  --paper: #f2ede7;
  --white: #ffffff;
  --line: #d9cfc4;
  --muted: #6e665e;
  --accent: #b4492f;
  --accent-soft: #e6957a;
  --on-accent: #ffffff;
  --danger: #c21f1f;
  --display: "Anton", "Bebas Neue", Impact, Haettenschweiler, "Arial Narrow Bold", "Helvetica Neue Condensed Bold", sans-serif;
  --body: "Oswald", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --radius: 4px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0.01em;
  color: var(--ink);
  background: var(--paper);
}
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.05;
  margin: 0;
}
a { color: inherit; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- Login ---------- */
.login {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-brand {
  background: linear-gradient(rgba(12,13,14,0.35), rgba(12,13,14,0.6)), var(--black) url(../icons/login.jpg) center / cover no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  border-right: 8px solid var(--accent);
}
.login-brand img {
  width: min(420px, 80%);
  height: auto;
  filter: invert(1);
}
.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  padding-bottom: max(48px, env(safe-area-inset-bottom));
}
.login-form { width: 100%; max-width: 380px; }
.login-form h1 { font-size: 44px; margin-bottom: 6px; }
.app-name { font-family: "League Gothic", var(--display); text-transform: uppercase; letter-spacing: 0.01em; line-height: 0.95; font-size: clamp(56px, 9vw, 120px); color: var(--white); margin-top: 28px; padding-top: 24px; border-top: 6px solid var(--accent); text-align: center; }
.login-form .sub { color: var(--muted); margin: 0 0 24px; }
.agree { border: 2px solid var(--black); border-radius: var(--radius); background: var(--white); padding: 14px 16px; margin: 0 0 16px; font-size: 14px; line-height: 1.45; }
.agree h2 { font-size: 20px; margin: 0 0 8px; }
.agree p { margin: 0 0 8px; }
.agree ul { margin: 0 0 8px; padding-left: 20px; }
.agree-tick { display: flex; gap: 10px; align-items: flex-start; font-weight: 700; margin-top: 10px; cursor: pointer; }
.agree-tick input { width: 20px; height: 20px; flex: none; margin-top: 1px; }

.role-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 2px solid var(--black);
  border-radius: var(--radius);
  margin-bottom: 24px;
  overflow: hidden;
}
.role-toggle button {
  border: 0;
  background: transparent;
  padding: 12px;
  font-family: var(--display);
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--black);
}
.role-toggle button[aria-selected="true"] { background: var(--black); color: var(--white); }

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  font: inherit;
  padding: 13px 14px;
  border: 2px solid var(--black);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
}
.btn {
  display: inline-block;
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--black);
  border-radius: var(--radius);
  background: var(--black);
  color: var(--white);
  font-family: var(--display);
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-ghost {
  width: auto;
  padding: 8px 14px;
  font-size: 15px;
  background: transparent;
  color: inherit;
  border-color: currentColor;
}
.error {
  color: var(--danger);
  font-weight: 600;
  min-height: 24px;
  margin: 0 0 12px;
}
.demo-note {
  margin-top: 28px;
  padding: 14px;
  border: 2px dashed var(--black);
  border-radius: var(--radius);
  font-size: 14px;
  background: #fff8cc;
}
.demo-note strong { display: block; text-transform: uppercase; letter-spacing: 0.05em; font-size: 12px; }
.demo-note button {
  margin-top: 8px;
  background: none;
  border: 0;
  padding: 0;
  text-decoration: underline;
  font-weight: 700;
  color: var(--black);
}

@media (max-width: 760px) {
  .login { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .login-brand { padding: 32px 24px; border-right: 0; border-bottom: 8px solid var(--accent); }
  .login-brand img { width: 150px; }
  .login-panel { align-items: flex-start; padding-top: 32px; }
}

/* ---------- Portal shell ---------- */
.shell { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 240px 1fr; }
.sidebar {
  background: var(--black);
  color: var(--white);
  display: flex;
  flex-direction: column;
  padding: 24px 0;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
}
.sidebar .logo { display: block; padding: 0 24px 24px; }
.sidebar .logo img { width: 120px; height: auto; filter: invert(1); display: block; }
.side-label {
  padding: 0 24px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8a8a8a;
}
.nav { display: flex; flex-direction: column; }
.nav a {
  padding: 11px 24px;
  text-decoration: none;
  font-family: var(--display);
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #cfcfcf;
  border-left: 6px solid transparent;
  white-space: nowrap;
}
.nav a:hover { color: var(--white); }
.nav a[aria-current="page"] { color: var(--on-accent); background: var(--accent); border-left-color: var(--white); }
.sidebar .user { margin-top: auto; padding: 16px 24px 0; font-size: 14px; color: #cfcfcf; }
.sidebar .user .name { color: var(--white); font-weight: 700; display: block; margin-bottom: 10px; overflow-wrap: anywhere; }
.privacy-link { display: block; margin-top: 12px; font-size: 12px; color: #a8a8a8; text-transform: uppercase; letter-spacing: 0.05em; }
.privacy-link:hover { color: var(--white); }
.user .who { display: block; font-weight: 400; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: #a8a8a8; margin-top: 2px; }

.topbar { display: none; }
.main { padding: 40px 48px 64px; min-width: 0; }
.crumbs { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 10px; }
.crumbs a { text-decoration: none; border-bottom: 1px solid currentColor; }
.main h1 { font-size: clamp(44px, 7vw, 76px); }
.lede { color: var(--muted); max-width: 60ch; margin: 12px 0 32px; }
.rule { height: 6px; width: 72px; background: var(--accent); margin: 16px 0 0; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 110px;
  padding: 20px;
  background: var(--white);
  border: 2px solid var(--black);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--black);
  transition: transform 0.12s, box-shadow 0.12s;
}
a.tile:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--accent), 6px 6px 0 2px var(--black); }
.tile h2 { font-size: 30px; }
.tile .meta { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.tile.dark { background: var(--black); color: var(--white); }
.tile.dark .meta { color: #a8a8a8; }

.empty {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.5);
}
.empty strong { display: block; font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 24px; color: var(--ink); margin-bottom: 4px; }

@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .main h1 { overflow-wrap: anywhere; }
  .sidebar { display: none; }
  .topbar {
    display: block;
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--black);
    color: var(--white);
    padding-top: env(safe-area-inset-top);
  }
  .topbar-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; }
  .topbar-row img { height: 40px; width: auto; filter: invert(1); display: block; }
  .topbar .nav { flex-direction: row; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .topbar .nav::-webkit-scrollbar { display: none; }
  .topbar .nav a { padding: 10px 16px; font-size: 17px; border-left: 0; border-bottom: 4px solid transparent; }
  .topbar .nav a[aria-current="page"] { border-bottom-color: var(--white); }
  .main { padding: 24px 16px 48px; padding-bottom: max(48px, env(safe-area-inset-bottom)); }
}

/* ---------- Stock: forms, tables, tabs ---------- */
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn-small { width: auto; padding: 9px 16px; font-size: 16px; text-decoration: none; }
.btn-light { background: var(--white); color: var(--black); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-accent:hover { background: var(--black); color: var(--white); }
.link { font-weight: 700; white-space: nowrap; }
.hint { font-size: 14px; color: var(--muted); max-width: 75ch; margin: 0 0 14px; }
.sub { font-size: 26px; margin: 32px 0 12px; }

.panel { background: var(--white); border: 2px solid var(--black); border-radius: var(--radius); padding: 20px; margin: 24px 0; }
.panel h3 { font-size: 24px; margin-bottom: 12px; }
.panel p { margin: 0 0 14px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 16px; }
.field select { width: 100%; font: inherit; padding: 13px 14px; border: 2px solid var(--black); border-radius: var(--radius); background: var(--white); color: var(--ink); }
.panel .field input, .panel .field select { padding: 10px 12px; }

.tabs { display: flex; overflow-x: auto; border-bottom: 2px solid var(--black); margin-bottom: 16px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 10px 16px; font-family: var(--display); font-size: 18px; text-transform: uppercase; letter-spacing: 0.04em; text-decoration: none; color: var(--muted); white-space: nowrap; }
.tabs a[aria-current] { background: var(--black); color: var(--white); }

.table-wrap { overflow-x: auto; border: 2px solid var(--black); border-radius: var(--radius); background: var(--white); margin-bottom: 20px; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.table th, .table td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table thead th { background: var(--black); color: var(--white); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; }
.table tbody tr:last-child > * { border-bottom: 0; }
.table tbody th { font-weight: 400; background: var(--white); position: sticky; left: 0; }
.table small { display: block; color: var(--muted); font-size: 12px; }
.table .r { text-align: right; white-space: nowrap; }
.table .out { font-weight: 700; }
.table .muted td { color: var(--muted); }
.table .total > * { font-weight: 700; border-top: 2px solid var(--black); background: var(--paper); }
.neg, .table .neg td { color: var(--danger); }
.recon { max-width: 520px; }
.table-wrap:has(.recon) { max-width: 520px; }

.cell { width: 84px; font: inherit; font-variant-numeric: tabular-nums; padding: 8px; border: 2px solid var(--line); border-radius: var(--radius); background: #fffdf0; color: var(--ink); }
.cell:focus { border-color: var(--black); outline: 3px solid var(--accent); outline-offset: 0; }
.cell-text { width: 130px; }
.cell-name { width: 190px; font-weight: 700; }
.x { border: 0; background: none; font-size: 22px; line-height: 1; color: var(--muted); padding: 4px 8px; }
.x:hover { color: var(--danger); }

.tag { display: inline-block; padding: 2px 8px; border: 2px solid var(--black); border-radius: 999px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap; }
.tag-done { background: var(--black); color: var(--white); }

.actionbar { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--black); color: #cfcfcf; border-radius: var(--radius); font-size: 14px; }
.actionbar .btn-light { border-color: var(--white); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 20px 0; }
.stat { background: var(--white); border: 2px solid var(--black); border-radius: var(--radius); padding: 14px 16px; }
.stat span { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.stat strong { display: block; font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1.2; }
.stat small { color: var(--muted); font-size: 13px; }
.stat-neg { background: var(--black); color: var(--white); }
.stat-neg strong { color: #ff8a80; }
.stat-neg span, .stat-neg small { color: #cfcfcf; }
.stat-pos { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.stat-pos span, .stat-pos small { color: rgba(255,255,255,0.85); }

@media (max-width: 860px) {
  .cell { width: 68px; }
  .table th, .table td { padding: 8px; }
}
@media print {
  .sidebar, .topbar, .no-print, .crumbs { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; }
  body { background: #fff; }
  .table-wrap { overflow: visible; }
  .table { font-size: 10px; }
  .table th, .table td { padding: 3px 5px; }
}
.form-grid { align-items: end; }
.checks { border: 0; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.checks legend { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; padding: 0; }
.checks label { display: inline-flex; align-items: center; gap: 6px; }
.checks input { width: 18px; height: 18px; accent-color: var(--black); }
.checks small { color: var(--muted); }
.forgot { margin: 14px 0 0; text-align: center; }
.forgot button { background: none; border: 0; padding: 0; text-decoration: underline; color: var(--muted); font-size: 14px; }
.notice { padding: 10px 14px; border: 2px solid var(--black); border-radius: var(--radius); background: #fff8cc; margin: 0 0 16px; font-weight: 600; }
.notice.bad { background: #fde7e5; border-color: var(--danger); color: var(--danger); }
.table select.cell, .table input.cell-text { width: 100%; min-width: 130px; }

/* ---------- Event calendar ---------- */
.cal-bar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.cal-title { font-size: 30px; min-width: 9ch; text-align: center; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 2px solid var(--black); border-radius: var(--radius); background: var(--line); gap: 1px; overflow: hidden; }
.cal-head { background: var(--black); color: var(--white); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; padding: 6px 8px; }
.cal-day { background: var(--white); min-height: 96px; padding: 6px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal-day:hover { background: #fffdf0; }
.cal-day.other { background: #ebe8e1; color: var(--muted); }
.cal-num { font-weight: 600; font-size: 14px; align-self: flex-start; padding: 0 5px; border-radius: 999px; }
.cal-day.today .cal-num { background: var(--accent); color: var(--on-accent); }
.cal-ev { display: block; width: 100%; text-align: left; border: 0; border-left: 4px solid var(--accent); border-radius: 2px; background: var(--black); color: var(--white); font: inherit; font-size: 13px; line-height: 1.25; padding: 3px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev:hover { background: #333; }
.cal-ev b { font-weight: 600; color: var(--accent-soft); }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; text-decoration: underline; color: inherit; }
.field textarea { width: 100%; font: inherit; padding: 10px 12px; border: 2px solid var(--black); border-radius: var(--radius); background: var(--white); color: var(--ink); resize: vertical; }
@media (max-width: 860px) {
  .cal-day { min-height: 64px; padding: 3px; }
  .cal-ev { font-size: 11px; padding: 2px 3px; border-left-width: 3px; }
  .cal-ev b { display: none; }
  .cal-head { padding: 4px; font-size: 11px; }
}

.bulk { margin-top: 28px; padding-top: 20px; border-top: 2px solid var(--line); }
.bulk h3 { margin-bottom: 8px; }

/* ---------- A document page (privacy policy) ---------- */
.doc-body { background: var(--paper); }
.doc { max-width: 760px; margin: 0 auto; padding: 40px 16px 64px; }
.doc h1 { font-size: clamp(34px, 6vw, 54px); }
.doc h2.sub { margin: 32px 0 8px; font-size: 24px; }
.doc p, .doc li { font-size: 16px; }
.doc ul { padding-left: 20px; }
.doc li { margin-bottom: 6px; }
.doc .crumbs { margin-bottom: 8px; }
.doc .lede { margin-top: 14px; }
.doc-back { margin-top: 36px; }

/* ---------- Home page: this week's shows ---------- */
.week { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 22px; padding: 16px 20px; margin: 0 0 28px; background: var(--accent); color: var(--on-accent); border-radius: var(--radius); text-decoration: none; }
.week b { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: 0.06em; font-size: 20px; opacity: 0.85; }
.week span { font-size: 16px; text-transform: uppercase; letter-spacing: 0.04em; }
.week strong { font-family: var(--display); font-weight: 400; font-size: 30px; letter-spacing: 0.02em; margin-right: 8px; }
.week:hover { background: var(--black); }

/* ---------- In-app notices ---------- */
.content { min-width: 0; }
.banner { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; padding: 12px 48px; background: var(--accent); color: var(--on-accent); border-bottom: 2px solid var(--black); }
.banner strong { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: 0.03em; font-size: 18px; margin-right: 6px; }
.cal-day.ro { cursor: default; }
.cal-day.ro:hover { background: var(--white); }
.cal-day.ro.other:hover { background: #ebe8e1; }
span.cal-ev { cursor: default; }
@media (max-width: 860px) { .banner { padding: 10px 16px; } }
@media print { .banner { display: none !important; } }

.btn[disabled] { opacity: 0.6; cursor: default; }

/* ---------- Settings: access switches ---------- */
.table .c { text-align: center; }
.table.access td.c { color: var(--muted); font-size: 13px; }
.table.access .sub-row th { padding-left: 32px; }
.switch { display: inline-flex; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch span { width: 46px; height: 26px; border-radius: 999px; background: #c9c5bc; border: 2px solid var(--black); position: relative; transition: background 0.15s; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--white); border: 2px solid var(--black); box-sizing: border-box; transition: transform 0.15s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid var(--black); outline-offset: 2px; }
.switch input:disabled + span { opacity: 0.35; cursor: default; }

/* Settings: access levels, name on the left and what it means on the right */
.levels { display: grid; grid-template-columns: max-content 1fr; margin: 0 0 14px; border: 2px solid var(--black); border-radius: var(--radius); background: var(--white); overflow: hidden; max-width: 760px; }
.levels dt, .levels dd { margin: 0; padding: 9px 14px; border-bottom: 1px solid var(--line); }
.levels dt { font-family: var(--display); text-transform: uppercase; letter-spacing: 0.04em; font-size: 17px; background: var(--black); color: var(--white); border-bottom-color: #333; white-space: nowrap; }
.levels dt:last-of-type, .levels dd:last-of-type { border-bottom: 0; }
@media (max-width: 560px) { .levels dt, .levels dd { padding: 8px 10px; } .levels dt { font-size: 15px; } }

/* Messages stay in view while scrolling, so a result is never hidden above a long page */
#view > .notice { position: sticky; top: 12px; z-index: 4; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.15); }
@media (max-width: 860px) { #view > .notice { top: 112px; } }
@media print { #view > .notice { display: none; } }

/* ---------- Checklists ---------- */
.table.checklist .ck-tick { width: 48px; }
.tick { width: 26px; height: 26px; accent-color: #1f7a3a; cursor: pointer; }
.table.checklist .ck-task strong { font-weight: 500; }
.table.checklist tr.is-done .ck-task strong { color: var(--muted); text-decoration: line-through; }
.table.checklist tr.is-done td { background: #f1f8f2; }
.table.checklist .ck-notes { min-width: 180px; }
.ck-add { margin: -8px 0 8px; }
.ck-add .ck-new { flex: 1; min-width: 200px; max-width: 520px; }
/* Progress colours: green = complete, red = tasks outstanding */
.pc { display: inline-block; min-width: 58px; padding: 3px 10px; border-radius: 999px; font-weight: 600; font-size: 14px; border: 2px solid transparent; }
.pc-big { font-size: 16px; min-width: 66px; }
.pc-good { background: #1f7a3a; color: #fff; border-color: #155a2a; }
.pc-bad { background: #c62f24; color: #fff; border-color: #96231a; }
.stat-good { background: #1f7a3a; color: #fff; border-color: #155a2a; }
.stat-bad { background: #c62f24; color: #fff; border-color: #96231a; }
.stat-good span, .stat-good small, .stat-bad span, .stat-bad small { color: #fff; }
@media print { .ck-add, .table.checklist .x { display: none !important; } .pc-good, .pc-bad, .stat-good, .stat-bad { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

.table.access .sub-row-2 th { padding-left: 56px; }

/* Event Control: the log, laid out with the portal's own tables, tags and panels. The row and tag
   colours are the key from the control room workbook. */
.ec-key { margin: 0 0 14px; line-height: 2.2; }
.ec-silver, tr.ec-silver > td { background: #d9d9d9; color: var(--ink); }
.ec-pink, tr.ec-pink > td { background: #f9c6dc; color: var(--ink); }
.ec-purple, tr.ec-purple > td { background: #dccbf5; color: var(--ink); }
.ec-green, tr.ec-green > td { background: #c5ebd0; color: var(--ink); }
.ec-brown, tr.ec-brown > td { background: #ddc3a1; color: var(--ink); }
.ec-yellow, tr.ec-yellow > td { background: #fff3a6; color: var(--ink); }
.ec-red, tr.ec-red > td { background: #f7b1ad; color: var(--ink); }
.ec-blue, tr.ec-blue > td { background: #b5d6f6; color: var(--ink); }
.ec-gold, tr.ec-gold > td { background: #f1d98f; color: var(--ink); }
.table.ec-log td { vertical-align: top; }
.table.ec-log td.ec-details { min-width: 220px; white-space: pre-wrap; }
.ec-text { width: 100%; font: inherit; padding: 10px 12px; border: 2px solid var(--black); border-radius: var(--radius); background: var(--white); color: var(--ink); resize: vertical; }
.ec-check { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.ec-count { display: inline-block; min-width: 2.5em; text-align: center; }
.ec-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 16px; align-items: start; }
tr.ec-flash > td { outline: 3px solid var(--black); outline-offset: -3px; }
@media print { .ec-key .tag, .table.ec-log td { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.ec-submit { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 6px; }
.ec-prio { display: flex; flex-wrap: wrap; gap: 6px; }
.ec-status { font: inherit; padding: 9px 12px; border: 2px solid var(--black); border-radius: var(--radius); background: var(--white); color: var(--ink); }
.ec-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 4px 0 16px; }
.ec-card { display: block; width: 100%; text-align: left; font: inherit; color: var(--ink); background: var(--white); border: 2px solid var(--black); border-radius: var(--radius); padding: 12px 14px; cursor: pointer; }
.ec-card.on { background: var(--black); color: var(--white); }
.ec-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ec-card-head strong { font-family: var(--display); font-weight: 400; font-size: 20px; text-transform: uppercase; letter-spacing: 0.02em; }
.ec-card-head b { font-family: var(--display); font-weight: 400; font-size: 28px; line-height: 1; }
.ec-card-prio { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 10px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; text-align: center; }
.ec-card-prio span { display: block; }
.ec-card-prio i { display: block; font-style: normal; font-weight: 700; font-size: 15px; border: 2px solid currentColor; border-radius: 999px; margin-bottom: 3px; }
.ec-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0 14px; }
.ec-bar .field { min-width: 150px; }
.ec-bar .field input, .ec-bar .field select { padding: 10px 12px; }
.ec-bar .ec-search { flex: 1 1 220px; }
.ec-bar .row { margin-bottom: 16px; }
.ec-sort { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-transform: inherit; letter-spacing: inherit; font-weight: inherit; white-space: nowrap; }
.table.ec-log td small { display: block; }
.ec-p-medium { background: #fff3a6; }
.ec-p-high { background: #f9c58a; }
.ec-p-critical { background: var(--danger); color: var(--white); border-color: var(--danger); }

/* A button that reads as a text link (Edit, Note, View and so on), wherever it is used. */
button.link { font: inherit; font-weight: 700; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
button.link:hover { text-decoration-thickness: 2px; }
.ec-live { font-size: 13px; font-weight: 700; align-self: center; }
.ec-live::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #1f7a3a; margin-right: 6px; }
.ec-live.off { color: var(--danger); }
.ec-live.off::before { background: var(--danger); }
.ec-map-img { display: block; max-width: 100%; height: auto; border: 2px solid var(--black); border-radius: var(--radius); background: var(--white); }
.ec-chat-log { max-height: 420px; overflow-y: auto; margin-bottom: 14px; }
.ec-msg { border: 2px solid var(--black); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 10px; background: var(--white); }
.ec-msg strong { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.ec-msg small { display: block; margin-top: 6px; }
.ec-msg-user { background: #fff8cc; margin-left: 12%; }
.ec-msg-assistant { margin-right: 12%; }
.ec-msg div strong { display: inline; font-size: inherit; text-transform: none; letter-spacing: 0; margin: 0; }
.ec-msg p { margin: 0 0 8px; }
.ec-msg p:last-child, .ec-msg ul:last-child { margin-bottom: 0; }
.ec-msg ul { margin: 0 0 8px; padding-left: 20px; }
