/* Copied from the public demo's stylesheet, admin-demo/public/css/app.css at commit 5468af2
   (integration/frontend-2026-11), with the demo-only calendar, guided-tour and preview-link rules
   removed. Customer-app additions live in customer.css. */
/* Keepford admin preview. Plain CSS, no build step, no external requests.
   Tokens follow the keepford.com product page (site/public/styles.css). */

:root {
  --ink: #0b1f3a;
  --ink-2: #1f3350;
  --muted: #56667b;
  --faint: #5f6f83;
  --line: #e2e7ed;
  --line-2: #d3dae3;
  --soft: #f6f8fa;
  --canvas: #f3f5f8;
  --white: #fff;
  --green: #0f7a45;
  --green-dark: #0b6438;
  --green-tint: #e6f3eb;
  --green-line: #c4e3cf;
  --green-light: #4ade80;
  --red: #b42318;
  --red-tint: #fdeceb;
  --red-line: #f5c6c2;
  --amber: #8a5300;
  --amber-tint: #fdf1dc;
  --amber-line: #f2d7a6;
  --blue: #1d4ed8;
  --blue-tint: #e8effd;
  --blue-line: #c7d7fa;
  --purple: #6d28d9;
  --purple-tint: #f1ebfd;
  --pink: #be185d;
  --pink-tint: #fce7f1;
  --orange: #c2410c;
  --orange-tint: #fdeee4;
  --slate-tint: #edf1f5;
  --dark: #0b1f3a;
  --dark-2: #13294a;
  --dark-3: #1b3459;
  --on-dark: #e6ecf4;
  --on-dark-muted: #a9b6c8;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 1px 2px rgb(11 31 58 / 5%), 0 8px 24px rgb(11 31 58 / 7%);
  --shadow-lg: 0 2px 4px rgb(11 31 58 / 6%), 0 24px 48px rgb(11 31 58 / 16%);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --ease: 0.15s ease;
  --sidebar: 248px;
  --topbar: 60px;
  --banner: 0px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 0.9375rem; line-height: 1.5; color: var(--ink);
  background: var(--canvas); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; border-radius: 4px; }
.sidebar :focus-visible, .landing :focus-visible { outline-color: var(--green-light); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); font-size: 0.86em; letter-spacing: -0.01em; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.nowrap { white-space: nowrap; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 200; padding: 0.6rem 1rem; background: var(--ink); color: var(--white); border-radius: 8px; }
.skip-link:focus { top: 0.75rem; }

/* ---------- no-JavaScript notice ---------- */
.landing {
  min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem;
  background: radial-gradient(1200px 600px at 80% -10%, #1b3d6b 0%, transparent 60%), radial-gradient(900px 500px at -10% 110%, #0f4a35 0%, transparent 55%), var(--dark);
  color: var(--on-dark);
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; color: inherit; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem; padding: 0.5rem 0.9rem;
  font-weight: 600; font-size: 0.9rem; line-height: 1.2; border-radius: 8px; border: 1px solid transparent;
  cursor: pointer; white-space: nowrap; transition: background var(--ease), border-color var(--ease), color var(--ease), box-shadow var(--ease);
}
.btn .icon { width: 16px; height: 16px; }
.btn--primary { background: var(--green); color: var(--white); }
.btn--primary:hover { background: var(--green-dark); }
.btn--secondary { background: var(--white); border-color: var(--line-2); color: var(--ink); }
.btn--secondary:hover { border-color: var(--faint); background: var(--soft); }
.btn--ghost { background: transparent; color: var(--ink-2); }
.btn--ghost:hover { background: var(--slate-tint); }
.btn--danger { background: var(--white); color: var(--red); border-color: var(--red-line); }
.btn--danger:hover { background: var(--red-tint); }
.btn--light { background: var(--white); color: var(--ink); }
.btn--light:hover { background: var(--green-tint); }
.btn--outline-light { background: transparent; color: var(--white); border-color: rgb(255 255 255 / 30%); }
.btn--outline-light:hover { background: rgb(255 255 255 / 8%); }
.btn--lg { padding: 0.75rem 1.25rem; font-size: 1rem; border-radius: var(--radius); }
.btn--sm { padding: 0.3rem 0.6rem; font-size: 0.82rem; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--slate-tint); color: var(--ink); }
.link-btn { border: 0; background: none; padding: 0; color: var(--blue); cursor: pointer; font-weight: 500; }
.link-btn:hover { text-decoration: underline; }

/* ---------- app shell ---------- */
.app { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) 1fr; grid-template-rows: var(--banner) var(--topbar) 1fr; grid-template-areas: "banner banner" "side top" "side main"; }
.preview-banner {
  grid-area: banner; position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: center; gap: 0.75rem;
  background: var(--amber-tint); border-bottom: 1px solid var(--amber-line); color: var(--amber); font-size: 0.82rem; font-weight: 600; padding: 0 1rem;
}
.preview-banner .link-btn { color: var(--amber); text-decoration: underline; font-weight: 600; font-size: 0.82rem; }
.sidebar {
  grid-area: side; position: sticky; top: var(--banner); height: calc(100vh - var(--banner)); overflow-y: auto;
  background: var(--dark); color: var(--on-dark); display: flex; flex-direction: column; padding: 1rem 0.75rem; gap: 1rem; z-index: 20;
}
.sidebar .brand { padding: 0.25rem 0.5rem; }
.sidebar .brand img { width: 28px; height: 28px; }
.sidebar__label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--on-dark-muted); padding: 0 0.5rem 0.35rem; }
.biz-switch { display: grid; gap: 0.25rem; }
.biz-switch select {
  width: 100%; padding: 0.5rem 0.6rem; border-radius: 8px; border: 1px solid rgb(255 255 255 / 14%); background: var(--dark-2); color: var(--white); font-weight: 600; font-size: 0.88rem;
}
.biz-switch__meta { font-size: 0.75rem; color: var(--on-dark-muted); padding: 0 0.15rem; }
.nav { display: grid; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 0.65rem; padding: 0.5rem 0.6rem; border-radius: 8px; color: var(--on-dark-muted);
  font-weight: 500; font-size: 0.9rem; text-decoration: none; transition: background var(--ease), color var(--ease);
}
.nav a:hover { background: var(--dark-2); color: var(--white); }
.nav a[aria-current="page"] { background: var(--dark-3); color: var(--white); box-shadow: inset 3px 0 0 var(--green-light); }
.nav__count { margin-left: auto; min-width: 22px; padding: 0 6px; border-radius: 999px; background: rgb(255 255 255 / 10%); font-size: 0.72rem; text-align: center; line-height: 20px; }
.nav__count--warn { background: #7a4a06; color: #ffe6b5; }
.nav__count--bad { background: #8a1c14; color: #ffd9d5; }
.sidebar__foot { margin-top: auto; display: grid; gap: 0.5rem; padding: 0.75rem 0.5rem 0; border-top: 1px solid rgb(255 255 255 / 10%); font-size: 0.78rem; color: var(--on-dark-muted); }
.sidebar__foot .btn { justify-content: flex-start; color: var(--on-dark); }
.sidebar__foot .btn:hover { background: var(--dark-2); }

.topbar {
  grid-area: top; position: sticky; top: var(--banner); z-index: 15; display: flex; align-items: center; gap: 0.75rem;
  padding: 0 1.5rem; background: rgb(255 255 255 / 92%); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line);
}
.topbar__menu { display: none; }
.topbar__crumb { font-size: 0.86rem; color: var(--muted); display: flex; align-items: center; gap: 0.4rem; min-width: 0; }
.topbar__crumb strong { color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__spacer { flex: 1; }
.topbar__live { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; color: var(--muted); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgb(15 122 69 / 50%); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgb(15 122 69 / 0%); } 100% { box-shadow: 0 0 0 0 rgb(15 122 69 / 0%); } }
.operator { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.25rem 0.35rem 0.25rem 0.25rem; border-radius: 999px; border: 1px solid var(--line); background: var(--white); cursor: pointer; }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 0.72rem; font-weight: 700; color: var(--white); background: var(--ink-2); flex: none; }
.avatar--lg { width: 44px; height: 44px; font-size: 0.95rem; }
.operator__name { font-size: 0.84rem; font-weight: 600; }

.menu { position: relative; }
.menu__panel {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 280px; padding: 0.4rem; border-radius: var(--radius);
  background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-lg); z-index: 50;
}
.menu__panel button, .menu__panel a {
  display: flex; width: 100%; align-items: flex-start; gap: 0.6rem; padding: 0.55rem 0.6rem; border: 0; background: none;
  border-radius: 8px; text-align: left; cursor: pointer; color: var(--ink); font-size: 0.88rem; text-decoration: none;
}
.menu__panel button:hover, .menu__panel button:focus-visible, .menu__panel a:hover, .menu__panel a:focus-visible { background: var(--soft); }
.menu__panel small { display: block; color: var(--muted); font-size: 0.78rem; font-weight: 400; }
.menu__panel strong { font-weight: 600; }
.menu__sep { height: 1px; background: var(--line); margin: 0.35rem 0.2rem; }
.menu__head { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); padding: 0.4rem 0.6rem 0.2rem; }

.main { grid-area: main; min-width: 0; padding: 1.5rem 1.5rem 3rem; }
.page { max-width: 1320px; margin: 0 auto; display: grid; gap: 1.25rem; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.page-title { font-size: 1.45rem; line-height: 1.2; letter-spacing: -0.02em; font-weight: 700; display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.page-title:focus { outline: none; }
.page-sub { color: var(--muted); margin-top: 0.25rem; font-size: 0.92rem; max-width: 760px; }
.page-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.back-link { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.85rem; color: var(--muted); }
.back-link .icon { transform: rotate(180deg); width: 15px; height: 15px; }

/* ---------- cards, grids ---------- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: 0 1px 2px rgb(11 31 58 / 4%); min-width: 0; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card__title { font-size: 0.98rem; font-weight: 650; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.card__sub { font-size: 0.82rem; color: var(--muted); }
.card__body { padding: 1rem 1.1rem; }
.card__body--flush { padding: 0; }
.card__foot { padding: 0.7rem 1.1rem; border-top: 1px solid var(--line); font-size: 0.84rem; color: var(--muted); display: flex; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
.grid { display: grid; gap: 1rem; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--main-side { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.grid--side-main { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }

/* stat tiles */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0.75rem; }
.stat {
  display: grid; gap: 0.2rem; padding: 0.9rem 1rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  color: inherit; text-decoration: none; position: relative; transition: border-color var(--ease), box-shadow var(--ease);
}
a.stat:hover { border-color: var(--line-2); box-shadow: var(--shadow); text-decoration: none; }
.stat__label { font-size: 0.8rem; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 0.35rem; }
.stat__value { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.stat__meta { font-size: 0.78rem; color: var(--faint); }
.stat--ok .stat__value { color: var(--green); }
.stat--warn .stat__value { color: var(--amber); }
.stat--bad .stat__value { color: var(--red); }
.organization-operations .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.organization-operations .stat { align-content: start; }
@media (max-width: 850px) {
  .organization-operations .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .organization-operations .stat__label { min-height: 2.6em; }
}
.stat--flash { animation: flash 1.4s ease; }
@keyframes flash { 0% { box-shadow: 0 0 0 0 rgb(15 122 69 / 0%); } 20% { box-shadow: 0 0 0 4px rgb(15 122 69 / 30%); border-color: var(--green); } 100% { box-shadow: 0 0 0 0 rgb(15 122 69 / 0%); } }

/* ---------- badges and chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.12rem 0.5rem; border-radius: 999px; font-size: 0.76rem; font-weight: 600;
  line-height: 1.5; white-space: nowrap; border: 1px solid transparent;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.85; }
.badge--ok { background: var(--green-tint); color: var(--green-dark); border-color: var(--green-line); }
.badge--warn { background: var(--amber-tint); color: var(--amber); border-color: var(--amber-line); }
.badge--bad { background: var(--red-tint); color: var(--red); border-color: var(--red-line); }
.badge--info { background: var(--blue-tint); color: var(--blue); border-color: var(--blue-line); }
.badge--neutral { background: var(--slate-tint); color: var(--muted); border-color: var(--line); }
.badge--plain::before { display: none; }
.chip { display: inline-flex; align-items: center; padding: 0.05rem 0.45rem; border-radius: 5px; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.6; white-space: nowrap; vertical-align: middle; cursor: help; }
.chip--preview { background: var(--amber-tint); color: var(--amber); border: 1px solid var(--amber-line); }
.chip--planned { background: var(--slate-tint); color: var(--muted); border: 1px dashed var(--faint); }
.chip--live { background: var(--green); color: var(--white); border: 1px solid var(--green); }
.chip--built { background: var(--blue-tint); color: var(--blue); border: 1px solid var(--blue-line); }
.tag { display: inline-flex; padding: 0.1rem 0.45rem; border-radius: 5px; background: var(--slate-tint); color: var(--ink-2); font-size: 0.78rem; font-weight: 500; }

/* ---------- toolbar, forms ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; padding: 0.75rem 1.1rem; border-bottom: 1px solid var(--line); }
.toolbar__spacer { flex: 1; }
.search { position: relative; min-width: 220px; flex: 1 1 260px; max-width: 380px; }
.search .icon { position: absolute; left: 0.65rem; top: 50%; transform: translateY(-50%); color: var(--faint); width: 16px; height: 16px; }
.search input { padding-left: 2.1rem; }
.input, .select, .textarea, .search input {
  width: 100%; padding: 0.45rem 0.65rem; border: 1px solid var(--line-2); border-radius: 8px; background: var(--white); font-size: 0.88rem;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.select { width: auto; padding-right: 1.8rem; }
.textarea { min-height: 84px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus, .search input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgb(15 122 69 / 15%); }
.field { display: grid; gap: 0.3rem; }
.field__label { font-size: 0.8rem; font-weight: 600; color: var(--ink-2); }
.field__hint { font-size: 0.78rem; color: var(--muted); }
.form-grid { display: grid; gap: 0.9rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .field--full { grid-column: 1 / -1; }
.switch { display: inline-flex; align-items: center; gap: 0.55rem; cursor: pointer; font-size: 0.88rem; }
.switch input { appearance: none; width: 36px; height: 20px; border-radius: 999px; background: var(--line-2); position: relative; cursor: pointer; transition: background var(--ease); margin: 0; flex: none; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--white); box-shadow: 0 1px 2px rgb(0 0 0 / 20%); transition: transform var(--ease); }
.switch input:checked { background: var(--green); }
.switch input:checked::after { transform: translateX(16px); }
.switch input:disabled { opacity: 0.5; cursor: not-allowed; }
.segmented { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; background: var(--white); }
.segmented button { border: 0; background: none; padding: 0.4rem 0.75rem; font-size: 0.84rem; font-weight: 500; color: var(--muted); cursor: pointer; }
.segmented button + button { border-left: 1px solid var(--line-2); }
.segmented button[aria-pressed="true"] { background: var(--ink); color: var(--white); }
.filter-note { font-size: 0.8rem; color: var(--muted); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.87rem; }
.table th { text-align: left; font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); padding: 0.6rem 0.9rem; background: var(--soft); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 0.65rem 0.9rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr.is-link { cursor: pointer; }
.table tbody tr.is-link:hover td { background: #fafbfc; }
.table tbody tr.is-new td { animation: rowflash 2.2s ease; }
@keyframes rowflash { 0%, 30% { background: var(--green-tint); } 100% { background: transparent; } }
.table .num { text-align: right; }
.work-no-wrap { white-space: nowrap; }
.table__primary { font-weight: 600; color: var(--ink); }
.table__primary a { color: var(--ink); }
.table__sub { font-size: 0.79rem; color: var(--muted); }
.th-sort { border: 0; background: none; padding: 0; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; display: inline-flex; gap: 0.25rem; }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 0.6rem 1.1rem; border-top: 1px solid var(--line); font-size: 0.84rem; color: var(--muted); gap: 0.5rem; flex-wrap: wrap; }

/* ---------- lists ---------- */
.list { display: grid; }
.list__item { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.7rem 1.1rem; border-bottom: 1px solid var(--line); color: inherit; }
.list__item:last-child { border-bottom: 0; }
a.list__item:hover { background: #fafbfc; text-decoration: none; }
.list__main { min-width: 0; flex: 1; }
.list__title { font-size: 0.88rem; font-weight: 550; color: var(--ink); }
.list__meta { font-size: 0.78rem; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 0.42rem; flex: none; background: var(--faint); }
.dot--ok { background: var(--green); } .dot--warn { background: #d08a12; } .dot--bad { background: var(--red); } .dot--info { background: var(--blue); }

.kv { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: 0.5rem 1.25rem; font-size: 0.88rem; }
.kv dt { color: var(--muted); }
.kv dd { color: var(--ink); min-width: 0; overflow-wrap: anywhere; }

/* ---------- timeline ---------- */
.timeline { position: relative; display: grid; gap: 0; padding: 0.25rem 0; }
.timeline__item { display: grid; grid-template-columns: 84px 22px 1fr; gap: 0 0.6rem; position: relative; padding-bottom: 0.9rem; }
.timeline__item::before { content: ""; position: absolute; left: calc(84px + 0.6rem + 10px); top: 18px; bottom: 0; width: 2px; background: var(--line); }
.timeline__item:last-child::before { display: none; }
.timeline__time { font-size: 0.78rem; color: var(--muted); text-align: right; padding-top: 1px; font-variant-numeric: tabular-nums; }
.timeline__dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--slate-tint); color: var(--muted); border: 2px solid var(--white); box-shadow: 0 0 0 1px var(--line); z-index: 1; }
.timeline__dot .icon { width: 12px; height: 12px; stroke-width: 2.2; }
.timeline__dot--ok { background: var(--green-tint); color: var(--green); }
.timeline__dot--warn { background: var(--amber-tint); color: var(--amber); }
.timeline__dot--bad { background: var(--red-tint); color: var(--red); }
.timeline__dot--info { background: var(--blue-tint); color: var(--blue); }
.timeline__title { font-weight: 600; font-size: 0.88rem; }
.timeline__detail { font-size: 0.82rem; color: var(--muted); margin-top: 0.1rem; overflow-wrap: anywhere; }
.timeline__group { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); padding: 0.4rem 0 0.6rem calc(84px + 0.6rem + 32px); }

/* ---------- integrations ---------- */
.mono-tile { width: 40px; height: 40px; border-radius: 10px; display: inline-grid; place-items: center; font-weight: 800; font-size: 0.85rem; letter-spacing: -0.02em; flex: none; }
.mono-tile--sm { width: 30px; height: 30px; border-radius: 8px; font-size: 0.72rem; }
.int-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.85rem; }
.int-card { display: grid; gap: 0.7rem; padding: 1rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); color: inherit; text-align: left; cursor: pointer; transition: border-color var(--ease), box-shadow var(--ease); font: inherit; }
.int-card:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.int-card__head { display: flex; gap: 0.75rem; align-items: center; }
.int-card__name { font-weight: 650; }
.int-card__desc { font-size: 0.84rem; color: var(--muted); }
.int-card__foot { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; }
.group-title { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); margin: 0.5rem 0 0.1rem; }
/* receiver test and event delivery panel on a connection card (integrations.js, activationPanel) */
.activation { display: grid; gap: 0.7rem; min-width: 0; padding: 0.9rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft); }
.activation__head { display: flex; flex-wrap: wrap; gap: 0.4rem 0.75rem; align-items: center; justify-content: space-between; }
.activation__title { font-size: 0.92rem; font-weight: 650; }
.activation__body { display: grid; gap: 0.7rem; min-width: 0; }
.activation__about { font-size: 0.88rem; color: var(--ink-2); }
.activation__result { min-width: 0; overflow-wrap: anywhere; }
.activation__result:empty { margin-bottom: -0.7rem; }
.activation__events { overflow-wrap: anywhere; }
.activation__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.activation__failed { flex-wrap: wrap; align-items: center; }
.activation__ack { align-items: flex-start; }
.activation__ack input { flex: none; width: 1.05rem; height: 1.05rem; margin-top: 0.15rem; accent-color: var(--green); }
.activation__ack label { min-width: 0; cursor: pointer; }
@media (max-width: 640px) {
  .activation { padding: 0.8rem; }
  .activation__actions .btn { flex: 1 1 100%; justify-content: center; }
}

/* ---------- misc ---------- */
.empty { display: grid; justify-items: center; gap: 0.35rem; padding: 2.5rem 1rem; text-align: center; color: var(--muted); }
.empty__icon { width: 28px; height: 28px; color: var(--faint); }
.empty__title { font-weight: 600; color: var(--ink-2); }
.empty__body { font-size: 0.86rem; max-width: 420px; }
.callout { display: flex; gap: 0.65rem; padding: 0.8rem 1rem; border-radius: var(--radius); font-size: 0.86rem; border: 1px solid var(--blue-line); background: var(--blue-tint); color: var(--ink-2); }
.callout .icon { color: var(--blue); margin-top: 1px; }
.callout--warn { border-color: var(--amber-line); background: var(--amber-tint); }
.callout--warn .icon { color: var(--amber); }
.callout--bad { border-color: var(--red-line); background: var(--red-tint); }
.callout--bad .icon { color: var(--red); }
.callout--ok { border-color: var(--green-line); background: var(--green-tint); }
.callout--ok .icon { color: var(--green); }
.callout strong { font-weight: 650; }
.bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding-top: 0.5rem; }
.bar-chart__col { flex: 1; display: grid; grid-template-rows: 1fr auto; gap: 0.35rem; height: 100%; min-width: 0; }
.bar-chart__stack { display: flex; flex-direction: column-reverse; justify-content: flex-start; border-radius: 5px 5px 2px 2px; overflow: hidden; min-height: 2px; align-self: end; }
.bar-chart__seg--booked { background: var(--green); }
.bar-chart__seg--other { background: #9fb0c4; }
.bar-chart__seg--missed { background: #e0a43a; }
.bar-chart__label { font-size: 0.66rem; color: var(--faint); text-align: center; white-space: nowrap; }
.meter { height: 8px; border-radius: 999px; background: var(--slate-tint); overflow: hidden; display: flex; }
.meter span { display: block; height: 100%; }
.meter__ok { background: var(--green); } .meter__warn { background: #e0a43a; } .meter__bad { background: var(--red); } .meter__info { background: var(--blue); }
.tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--line); padding: 0 1.1rem; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 0.7rem 0.6rem; font-weight: 550; font-size: 0.88rem; color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--green); }
.pill-row { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.divider { height: 1px; background: var(--line); margin: 0.25rem 0; }
.skeleton { background: linear-gradient(90deg, var(--slate-tint) 25%, var(--soft) 50%, var(--slate-tint) 75%); background-size: 200% 100%; animation: shimmer 1.1s infinite; border-radius: 6px; height: 14px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.highlight-ring { animation: ring 1.8s ease 2; }
@keyframes ring { 0%, 100% { box-shadow: 0 0 0 0 rgb(15 122 69 / 0%); } 40% { box-shadow: 0 0 0 5px rgb(15 122 69 / 35%); } }

/* ---------- overlays ---------- */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgb(11 31 58 / 42%); display: flex; animation: fade 0.16s ease; }
.overlay--leaving { opacity: 0; transition: opacity 0.16s ease; }
@keyframes fade { from { opacity: 0; } }
.overlay--dialog { align-items: center; justify-content: center; padding: 1rem; }
.overlay--drawer { justify-content: flex-end; }
.dialog, .drawer { background: var(--white); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); max-height: 100%; }
.dialog { width: 100%; max-width: 520px; border-radius: var(--radius-lg); max-height: calc(100vh - 2rem); animation: pop 0.18s ease; }
.dialog--wide { max-width: 860px; }
.drawer { width: min(560px, 100%); height: 100%; animation: slide 0.2s ease; }
.drawer--wide { width: min(760px, 100%); }
@keyframes pop { from { transform: translateY(8px) scale(0.98); opacity: 0; } }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }
.dialog__head, .drawer__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); }
.dialog__title, .drawer__title { font-size: 1.05rem; font-weight: 650; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.dialog__body, .drawer__body { padding: 1.1rem 1.2rem; overflow-y: auto; display: grid; gap: 1rem; align-content: start; }
/* Long option text (a select's min-content width) must never widen a dialog or drawer: single-column grids
   inside get a shrinkable track, and form controls never exceed their column. */
.dialog__body, .drawer__body, .dialog__body .grid:not([class*="grid--"]), .drawer__body .grid:not([class*="grid--"]) { grid-template-columns: minmax(0, 1fr); }
.dialog__body .field, .drawer__body .field { min-width: 0; }
.dialog__body :is(.select, .input, .textarea), .drawer__body :is(.select, .input, .textarea) { max-width: 100%; min-width: 0; text-overflow: ellipsis; }
.dialog__foot, .drawer__foot { display: flex; justify-content: flex-end; gap: 0.5rem; padding: 0.85rem 1.2rem; border-top: 1px solid var(--line); flex-wrap: wrap; }

.toasts { position: fixed; right: 1rem; bottom: 1rem; z-index: 150; display: grid; gap: 0.5rem; width: min(380px, calc(100vw - 2rem)); }
.toast { display: flex; align-items: flex-start; gap: 0.6rem; padding: 0.75rem 0.6rem 0.75rem 0.9rem; border-radius: var(--radius); background: var(--ink); color: var(--white); box-shadow: var(--shadow-lg); font-size: 0.87rem; animation: pop 0.2s ease; border-left: 4px solid var(--green-light); transition: opacity 0.35s, transform 0.35s; }
.toast--warn { border-left-color: #f2b544; }
.toast--bad { border-left-color: #ff8a80; }
.toast--info { border-left-color: #93b4ff; }
.toast--leaving { opacity: 0; transform: translateY(6px); }
.toast__msg { flex: 1; }
.toast__link { color: var(--green-light); font-weight: 600; white-space: nowrap; }
.toast__close { border: 0; background: none; color: var(--on-dark-muted); cursor: pointer; padding: 0; }
.toast__close .icon { width: 16px; height: 16px; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--main-side, .grid--side-main { grid-template-columns: 1fr; }
}
@media (max-width: 920px) {
  .app { grid-template-columns: 1fr; grid-template-areas: "banner" "top" "main"; }
  .sidebar { position: fixed; top: var(--banner); left: 0; bottom: 0; width: 280px; height: auto; transform: translateX(-100%); visibility: hidden; transition: transform 0.2s ease, visibility 0s linear 0.2s; box-shadow: var(--shadow-lg); }
  .app--nav-open .sidebar { transform: none; visibility: visible; transition: transform 0.2s ease; }
  .app--nav-open .scrim { display: block; }
  .scrim { display: none; position: fixed; inset: var(--banner) 0 0 0; background: rgb(11 31 58 / 40%); z-index: 19; }
  .topbar__menu { display: inline-grid; }
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .topbar__live { display: none; }
}
@media (max-width: 640px) {
  .main { padding: 1rem 1rem 2.5rem; }
  .topbar { padding: 0 1rem; gap: 0.5rem; }
  .grid--4 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat__value { font-size: 1.45rem; }
  .form-grid { grid-template-columns: 1fr; }
  .operator__name, .btn .btn__label-wide { display: none; }
  .preview-banner { font-size: 0.74rem; gap: 0.4rem; text-align: center; }
  .kv { grid-template-columns: 1fr; gap: 0.1rem 0; }
  .kv dd { margin-bottom: 0.45rem; }
  .timeline__item { grid-template-columns: 62px 22px 1fr; }
  .timeline__item::before { left: calc(62px + 0.6rem + 10px); }
  .search { min-width: 0; max-width: none; }
  .table th, .table td { padding: 0.55rem 0.65rem; }
  .hide-sm { display: none !important; }
  .menu__panel { position: fixed; left: 0.75rem; right: 0.75rem; top: calc(var(--banner) + var(--topbar)); min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ---------- small-screen shell fixes ---------- */
@media (max-width: 640px) {
  /* The notice and its "What is real?" link flow as one centred paragraph, so the link stays on phones. */
  .preview-banner { display: block; align-content: center; }
  .preview-banner .link-btn { display: inline; margin-left: 0.3rem; font-size: inherit; }
  .topbar__spacer { display: none; }
  .topbar__crumb { flex: 1 1 auto; overflow: hidden; }
  .topbar__crumb > span { display: none; }
  .topbar__crumb strong { display: block; min-width: 0; }
  .operator { padding: 2px; border: 0; }
  .menu > .btn--ghost { padding: 0.2rem; }
}
.page { grid-template-columns: minmax(0, 1fr); }
.search input { padding-left: 2.1rem; }
@media (max-width: 920px) { .app { grid-template-columns: minmax(0, 1fr); } }
.table-wrap, .table th { position: relative; }
.biz-switch select { font-size: 0.8rem; text-overflow: ellipsis; }

/* ---------- consolidated demo: notice, links to keepford.com, booking action ---------- */
.preview-banner__text { min-width: 0; }
@media (max-width: 640px) {
  .preview-banner { line-height: 1.25; padding: 0.2rem 0.75rem; }
}
.int-card__level { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; font-size: 0.78rem; color: var(--muted); }

@media (max-width: 1400px) { .topbar__live { display: none; } }
.topbar__crumb { min-width: 0; }
.topbar__crumb strong { white-space: nowrap; }
/* A list row never forces its card wider than a narrow phone: the row may wrap its trailing badge. */
.list__item { min-width: 0; }
.list__main { overflow-wrap: anywhere; }
@media (max-width: 400px) { .list__item { flex-wrap: wrap; } }

/* ---------- horizontal scroll cues (enhanceScrollers in util.js) ---------- */
.scroll-frame { min-width: 0; }
.scroll-frame__view { position: relative; }
.scroll-edge { position: absolute; top: 0; bottom: 0; width: 2.25rem; pointer-events: none; opacity: 0; transition: opacity 0.15s ease; z-index: 2; }
.scroll-edge--start { left: 0; background: linear-gradient(to right, rgb(11 31 58 / 14%), rgb(11 31 58 / 0%)); }
.scroll-edge--end { right: 0; background: linear-gradient(to left, rgb(11 31 58 / 14%), rgb(11 31 58 / 0%)); }
.scroll-frame.is-scrollable:not(.is-at-start) .scroll-edge--start,
.scroll-frame.is-scrollable:not(.is-at-end) .scroll-edge--end { opacity: 1; }
.scroll-hint { display: none; margin: 0; padding: 0.4rem 0.9rem; font-size: 0.78rem; color: var(--muted); border-bottom: 1px solid var(--line); }
.scroll-frame.is-scrollable:not(.is-at-end) .scroll-hint { display: block; }
.scroll-frame.is-scrollable .table-wrap:focus-visible { outline: 3px solid var(--green); outline-offset: -3px; }
@media (prefers-reduced-motion: reduce) { .scroll-edge { transition: none; } }

/* ---------- screen sweep 2026-11-05 ---------- */
/* Long unbroken names, addresses or notes wrap inside the page header instead of widening the page. */
.page-head > div { min-width: 0; max-width: 100%; }
.page-title, .page-sub { overflow-wrap: anywhere; }
button.list__item { width: 100%; font: inherit; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; }
button.list__item:last-child { border-bottom: 0; }
button.list__item:hover { background: #fafbfc; }
button.list__item .list__title, button.list__item .list__meta { display: block; }
button.list__item .list__meta { margin-top: 0.15rem; }
/* Menus taller than a short window scroll inside themselves. */
.menu__panel { max-height: calc(100vh - var(--banner) - 5rem); overflow-y: auto; }

/* ---------- contact maintenance (add, edit, load more, erased) ---------- */
.contact-name { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0.4rem; min-width: 0; overflow-wrap: anywhere; }
.contact-form { min-width: 0; }
.contact-form .input { width: 100%; min-width: 0; }
.contact-erased { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; margin: 0; color: var(--ink-2); overflow-wrap: anywhere; }
.contact-enquiries { min-width: 0; }
.contact-enquiries__status { margin: 0; }

/* managed-activation:begin (setup screen, managed businesses) */
.managed { display: grid; gap: 1rem; min-width: 0; margin-top: 1rem; }
.managed__loading { margin: 0; color: var(--muted); }
.managed__hint { margin: 0; color: var(--ink-2); font-size: 0.86rem; overflow-wrap: anywhere; }
.managed__error { margin: 0; color: var(--red); font-size: 0.86rem; }
.managed__step { min-width: 0; }
.managed__step .list__main { min-width: 0; overflow-wrap: anywhere; }
.managed__evidence { display: block; margin-top: 0.2rem; overflow-wrap: anywhere; }
.managed__stale { margin: 0.3rem 0 0; padding-left: 1.1rem; font-size: 0.84rem; color: var(--amber); }
.managed__form { display: grid; gap: 0.6rem; margin-top: 0.5rem; max-width: 32rem; min-width: 0; }
.managed__form .input, .managed__form .select { width: 100%; min-width: 0; }
.managed__legend { display: grid; gap: 0.35rem; margin: 0; padding-left: 1.2rem; font-size: 0.86rem; overflow-wrap: anywhere; }
.managed__senders { min-width: 0; }
.managed .callout, .managed .card { min-width: 0; }
.managed button:focus-visible, .managed select:focus-visible, .managed input:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
@media (max-width: 640px) { .managed__senders { grid-template-columns: 1fr; } }
/* managed-activation:end */

/* contact-timeline:begin (Activity section on the contact detail screen) */
.contact-activity { min-width: 0; }
.activity { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; min-width: 0; }
.activity__item { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr) auto; gap: 0.75rem; align-items: baseline; padding: 0.6rem 1rem; border-top: 1px solid var(--line, rgba(0, 0, 0, 0.1)); min-width: 0; }
.activity__item:first-child { border-top: 0; }
.activity__when { font-size: 0.82rem; color: var(--ink-2); overflow-wrap: anywhere; }
.activity__main { display: grid; gap: 0.15rem; min-width: 0; overflow-wrap: anywhere; }
.activity__detail { font-size: 0.86rem; color: var(--ink-2); }
.activity__link { overflow-wrap: anywhere; }
.activity__status { margin: 0; }
.contact-activity .pager { padding: 0.5rem 1rem; }
@media (max-width: 640px) { .activity__item { grid-template-columns: minmax(0, 1fr); gap: 0.2rem; } }
/* contact-timeline:end */

/* business-ops:begin (Data export, Recovery and the lifecycle banner; managed-activation) */
.lifecycle-banner { max-width: 1320px; margin: 0 auto 1.25rem; min-width: 0; }
.lifecycle-banner .state__text { min-width: 0; overflow-wrap: anywhere; }
.business-ops { min-width: 0; }
.business-ops .card, .business-ops .callout { min-width: 0; }
.export__items, .recovery-list { list-style: none; margin: 0; padding: 0; min-width: 0; }
.export__item { flex-wrap: wrap; justify-content: space-between; align-items: center; min-width: 0; }
.export__item .list__main { min-width: 0; overflow-wrap: anywhere; }
.export__exclusions { margin: 0.4rem 0 0; padding-left: 1.2rem; display: grid; gap: 0.25rem; font-size: 0.86rem; overflow-wrap: anywhere; }
.export__manifest { margin-top: 0.4rem; font-size: 0.86rem; min-width: 0; }
.export__manifest summary { cursor: pointer; font-weight: 550; }
.export__manifest dl { margin-top: 0.5rem; grid-template-columns: minmax(0, 1fr) auto; gap: 0.25rem 1rem; }
.export__item .list__title, .export__item .list__meta { display: block; margin-top: 0.15rem; }
.export__message:empty { display: none; }
.recovery__filters { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.recovery__filters a[aria-current="true"] { background: var(--ink); color: var(--white); border-color: var(--ink); }
.recovery-item { display: grid; gap: 0.6rem; padding: 0.9rem 1.1rem; border-top: 1px solid var(--line); min-width: 0; }
.recovery-item:first-child { border-top: 0; }
.recovery-item__head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.recovery-item .kv { min-width: 0; }
.recovery-item .btn { justify-self: start; max-width: 100%; white-space: normal; }
.business-ops button:focus-visible, .business-ops a:focus-visible, .business-ops summary:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
@media (max-width: 640px) { .recovery-item .kv { grid-template-columns: minmax(0, 1fr); gap: 0.1rem 0; } .recovery-item .kv dd { margin-bottom: 0.35rem; } }
/* business-ops:end */

/* reply-assist:begin (suggest a reply from business facts) */
.assist { display: grid; gap: 0.5rem; min-width: 0; padding: 0.75rem 0.9rem; border: 1px solid var(--line); border-radius: 8px; }
.assist[hidden] { display: none; }
.assist__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; min-width: 0; }
.assist__label { font-weight: 550; }
.assist__sources { display: inline-flex; flex-wrap: wrap; gap: 0.35rem; list-style: none; margin: 0; padding: 0; min-width: 0; }
.assist__chip { padding: 0.1rem 0.6rem; border: 1px solid var(--line); border-radius: 999px; font-size: 0.86rem; overflow-wrap: anywhere; }
.assist__missing { min-width: 0; padding: 0.5rem 0.75rem; border-left: 3px solid var(--ink); }
.assist__missing p { margin: 0 0 0.25rem; }
.assist__missing ul { margin: 0; padding-left: 1.2rem; overflow-wrap: anywhere; }
@media (max-width: 640px) { .assist__bar .btn { max-width: 100%; white-space: normal; } }
/* reply-assist:end */
