/* Kahfi Data admin panel — mobile first.
 *
 * Self-hosted on purpose. The legacy panel pulled Bootstrap and an icon font
 * from a CDN on every page: two blocking third-party round trips before
 * anything painted, and a dead panel whenever the CDN was unreachable. This
 * file is the whole design system.
 *
 * Layout order below is deliberate: base tokens, then the phone layout, then
 * two min-width queries that add columns. Nothing is written desktop-first and
 * clawed back.
 */

:root {
  --primary: #c2185b;
  --primary-dark: #8e1041;
  --primary-soft: #ffe5ef;
  --accent: #f06292;
  --accent-dark: #ad1457;
  --surface: #fff5f8;
  --card: #ffffff;
  --ink: #351627;
  --ink-soft: #624c58;
  --muted: #806c77;
  --line: #f0dce5;
  --good: #067647;
  --good-bg: #e7f6ee;
  --wait: #b54708;
  --wait-bg: #fdf2e2;
  --bad: #b42318;
  --bad-bg: #fdecea;
  --info: #175cd3;
  --info-bg: #e8f0fd;
  --radius: 12px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.1);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.18);
  --bar-h: 56px;
  --tap: 44px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--surface);
  /* Stops a wide table from letting the whole page slide sideways. */
  overflow-x: hidden;
}

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }

a { color: var(--primary); }

.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 8px;
  top: 8px;
  z-index: 60;
  background: #fff;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
}

/* Labels a screen reader needs but a sighted operator does not, on controls
 * whose purpose is obvious from the button beside them. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ------------------------------------------------------------------ app bar */

.appbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 6px;
  height: calc(var(--bar-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 10px 0;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08), 0 2px 10px rgba(13, 36, 97, 0.25);
}

.appbar-title {
  flex: 1;
  min-width: 0;
  font-size: 17px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.appbar-burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: var(--tap);
  height: var(--tap);
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
}
.appbar-burger span {
  display: block;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.appbar-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.appbar-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.appbar-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.appbar-who {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 0 6px;
  color: #fff;
  text-decoration: none;
}
.who-initials {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
}
.who-role { display: none; font-size: 12px; opacity: 0.85; }

/* ------------------------------------------------------------------- drawer */

.drawer {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  width: min(84vw, 300px);
  height: 100%;
  padding: calc(12px + env(safe-area-inset-top)) 0 24px;
  background: #fff;
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateX(-100%);
  transition: transform 0.22s ease;
}
.drawer.is-open { transform: translateX(0); }

.drawer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px 14px;
  border-bottom: 1px solid var(--line);
}
.drawer-brand img { border-radius: 8px; }
.drawer-brand span { font-weight: 700; font-size: 16px; line-height: 1.1; }
.drawer-brand small { display: block; font-weight: 500; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }

.drawer-group {
  margin: 16px 16px 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.drawer-list { margin: 0; padding: 0; list-style: none; }
.drawer-list a {
  display: flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 16px;
  color: var(--ink-soft);
  text-decoration: none;
  border-left: 3px solid transparent;
  font-size: 14.5px;
}
.drawer-list a:hover { background: var(--surface); }
.drawer-list a.is-active {
  color: var(--primary);
  background: var(--primary-soft);
  border-left-color: var(--accent);
  font-weight: 600;
}

.drawer-foot { margin-top: 20px; padding: 16px; border-top: 1px solid var(--line); }
.drawer-user { margin: 0 0 10px; font-weight: 600; font-size: 14px; }
.drawer-user small { display: block; font-weight: 400; color: var(--muted); }

.scrim {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(16, 24, 40, 0.45);
  backdrop-filter: blur(1px);
}
.scrim[hidden] { display: none; }

/* ------------------------------------------------------------------ content */

.content {
  padding: 14px 12px calc(28px + env(safe-area-inset-bottom));
  max-width: 1180px;
  margin: 0 auto;
}

.screen-intro { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.back-link { text-decoration: none; font-weight: 600; }
.empty {
  margin: 0;
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* ------------------------------------------------------------------ banners */

.banner {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border-left: 4px solid;
  font-size: 14px;
}
.banner-ok { background: var(--good-bg); border-color: var(--good); color: #05502f; }
.banner-warn { background: var(--wait-bg); border-color: var(--wait); color: #7a3306; }
.banner-error { background: var(--bad-bg); border-color: var(--bad); color: #8a1a12; }
.banner-info { background: var(--info-bg); border-color: var(--info); color: #10396f; }

/* -------------------------------------------------------------------- cards */

.card {
  margin: 0 0 14px;
  padding: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.card-head h2 { font-size: 15px; }
.card-link { font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }

/* -------------------------------------------------------------------- tiles */

.tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.tile {
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.tile-good { border-left-color: var(--good); }
.tile-wait { border-left-color: var(--accent); }
.tile-bad { border-left-color: var(--bad); }
.tile-label { margin: 0; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.tile-value { margin: 5px 0 0; font-size: 21px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.tile-note { margin: 3px 0 0; font-size: 12px; color: var(--muted); }

/* ------------------------------------------------------------------ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: var(--tap);
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-gold { background: var(--accent); color: var(--primary-dark); }
.btn-gold:hover { background: var(--accent-dark); }
.btn-ghost { background: #fff; color: var(--primary); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface); }
.btn-danger { background: #fff; color: var(--bad); border-color: #f3b7b2; }
.btn-danger:hover { background: var(--bad-bg); }
.btn-block { width: 100%; }
.btn-small { min-height: 36px; padding: 0 11px; font-size: 13px; }
.btn.is-disabled, .btn:disabled { opacity: 0.45; pointer-events: none; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.toolbar > * { flex: 1 1 auto; }
.toolbar-search { display: flex; gap: 8px; min-width: 0; }
.toolbar-search input { flex: 1; min-width: 0; }
.inline-form { display: inline; }

.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-row > .btn, .btn-row > form { flex: 1 1 46%; }
.btn-row > form > .btn { width: 100%; }

/* -------------------------------------------------------------------- forms */

.form { display: block; }
.field { margin-bottom: 14px; }
.field > label {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}
.req { color: var(--bad); }

input[type="text"], input[type="search"], input[type="password"],
input[type="email"], input[type="tel"], input[type="number"],
input[type="date"], select, textarea {
  width: 100%;
  min-height: var(--tap);
  padding: 10px 12px;
  font-family: inherit;
  /* 16px keeps iOS Safari from zooming the viewport on focus. */
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  appearance: none;
}
textarea { min-height: 84px; resize: vertical; }
select {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%23667085' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(18, 48, 126, 0.14);
}
.has-error input, .has-error select, .has-error textarea { border-color: var(--bad); }

.hint { margin: 5px 0 0; font-size: 12.5px; color: var(--muted); }
.field-error { margin: 5px 0 0; font-size: 12.5px; font-weight: 600; color: var(--bad); }
.secret-state { margin: 0 0 6px; font-size: 13px; color: var(--muted); }

.switch { display: flex; align-items: center; gap: 10px; min-height: var(--tap); font-weight: 500; }
.switch input { width: 22px; height: 22px; min-height: 0; margin: 0; accent-color: var(--primary); }

.form-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 12px; }

.form-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 8px;
  margin: 4px -14px -14px;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, #fff 72%, rgba(255, 255, 255, 0));
  border-top: 1px solid var(--line);
  border-radius: 0 0 var(--radius) var(--radius);
}
.form-actions > * { flex: 1; }

/* ------------------------------------------------------------------- tables
 *
 * Below 720px each row becomes its own card and each cell prints the header it
 * belongs to from data-label. Wide financial tables stay readable on a phone
 * without a horizontal scrollbar or a pinch.
 */

.table-wrap { margin: 0 0 12px; }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table.data thead { display: none; }
table.data tbody tr {
  display: block;
  margin-bottom: 10px;
  padding: 10px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
table.data tbody td {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  border: 0;
  text-align: right;
}
table.data tbody td::before {
  content: attr(data-label);
  flex: 0 0 40%;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-align: left;
}
table.data tbody td:empty { display: none; }
table.data td.col-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
table.data td.col-actions::before { display: none; }
table.data td.col-actions > * { flex: 1; }
table.data td.col-actions .btn { width: 100%; }

.num { font-variant-numeric: tabular-nums; }
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  word-break: break-all;
}

/* ------------------------------------------------------------------ badges */

.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.badge-good { background: var(--good-bg); color: var(--good); }
.badge-wait { background: var(--wait-bg); color: var(--wait); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-muted { background: #f2f4f7; color: var(--muted); }

/* ------------------------------------------------------- key/value detail */

.kv {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.kv:last-child { border-bottom: 0; }
.kv-label { flex: 0 0 38%; font-size: 13px; color: var(--muted); }
.kv-value { flex: 1; text-align: right; font-weight: 500; word-break: break-word; }

pre.payload {
  margin: 0;
  padding: 12px;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

/* Collapsed detail inside a table row — the audit log's metadata. Closed by
 * default so a page of events stays scannable on a phone, and native <details>
 * rather than JS so it works with the panel's strict script-src. */
.reveal > summary {
  display: inline-block;
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.reveal > summary::-webkit-details-marker { display: none; }
.reveal[open] > summary { margin-bottom: 8px; }

/* A sub-heading inside a card, for the one long block of prose on a detail
 * screen — a customer's own words, a maintenance message. */
.field-heading {
  margin: 16px 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ticket-body {
  margin: 0;
  padding: 12px;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

/* -------------------------------------------------------------------- pager */

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 4px 0 8px;
}
.pager-summary { margin: 0; font-size: 12.5px; color: var(--muted); text-align: center; }

/* --------------------------------------------------------------- filter bar */

.filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.filters .filter-wide { grid-column: 1 / -1; }
.filters label { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.filters .filter-actions { grid-column: 1 / -1; display: flex; gap: 8px; }
.filters .filter-actions > * { flex: 1; }

/* -------------------------------------------------------- sign-in / notices */

.shell-plain { display: grid; place-items: center; min-height: 100vh; padding: 20px; }

.login-wrap {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px 16px calc(24px + env(safe-area-inset-bottom));
  background: linear-gradient(165deg, var(--primary) 0%, var(--primary-dark) 55%, #081a48 100%);
}
.login-card {
  width: 100%;
  max-width: 380px;
  padding: 24px 20px;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
}
.login-brand { text-align: center; margin-bottom: 18px; }
.login-brand img { border-radius: 14px; }
.login-brand h1 { margin: 10px 0 2px; font-size: 19px; }
.login-brand p { margin: 0; font-size: 13px; color: var(--muted); }

.stop-card {
  max-width: 420px;
  padding: 28px 22px;
  text-align: center;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.stop-card h1 { margin-bottom: 8px; font-size: 19px; }
.stop-card p { color: var(--ink-soft); }

/* --------------------------------------------------------- attention lists */

.attention { margin: 0; padding: 0; list-style: none; }
.attention li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--tap);
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.attention li:last-child { border-bottom: 0; }
.attention a { font-weight: 600; text-decoration: none; }
.attention .count { font-weight: 700; font-variant-numeric: tabular-nums; }

.feed { margin: 0; padding: 0; list-style: none; font-size: 14px; }
.feed li { padding: 9px 0; border-bottom: 1px solid var(--line); }
.feed li:last-child { border-bottom: 0; }
.feed .feed-meta { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }

/* ------------------------------------------------------------- 600px and up */

@media (min-width: 600px) {
  body { font-size: 15.5px; }
  .content { padding: 20px 20px 40px; }
  .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .card { padding: 18px; }
  .who-role { display: inline; }
  .toolbar > * { flex: 0 0 auto; }
  .toolbar-search { flex: 1 1 260px; }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .btn-row > .btn, .btn-row > form { flex: 0 1 auto; }
}

/* ------------------------------------------------------------- 900px and up
 *
 * Only here does the drawer become a permanent rail. Everything above this
 * point is the phone layout, which is the one that gets used most.
 */

@media (min-width: 900px) {
  .appbar { padding-left: 300px; }
  .appbar-burger { display: none; }
  .drawer { transform: none; box-shadow: none; border-right: 1px solid var(--line); }
  .scrim { display: none !important; }
  .content { padding-left: 320px; padding-right: 24px; max-width: none; }
  .drawer-foot { display: none; }

  table.data { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
  table.data thead { display: table-header-group; }
  table.data thead th {
    padding: 11px 14px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    text-align: left;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
  }
  table.data tbody tr {
    display: table-row;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  table.data tbody tr:nth-child(even) { background: #fbfcfe; }
  table.data tbody td {
    display: table-cell;
    padding: 11px 14px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
  }
  table.data tbody td::before { display: none; }
  table.data tbody td:empty { display: table-cell; }
  table.data td.col-actions {
    display: table-cell;
    margin: 0;
    padding: 8px 14px;
    border-top: 0;
    white-space: nowrap;
  }
  table.data td.col-actions > * { flex: none; display: inline-block; }
  table.data td.col-actions .btn { width: auto; }
  .table-wrap { overflow-x: auto; }

  .form { max-width: 640px; }
  .form-actions { position: static; margin: 8px 0 0; padding: 14px 0 0; background: none; border-radius: 0; }
  .form-actions > * { flex: 0 0 auto; min-width: 180px; }
  .kv-label { flex: 0 0 30%; }
}

@media (prefers-reduced-motion: reduce) {
  .drawer, .appbar-burger span { transition: none; }
}


/* Kahfi Data workspace: a quiet canvas, rose rail and editorial overview. */
:root {
  --radius: 20px;
  --radius-sm: 12px;
  --bar-h: 76px;
  --shadow: 0 5px 20px rgba(89, 25, 53, .035);
  --shadow-lg: 0 22px 70px rgba(89, 25, 53, .14);
}
body { background: #fff8fb; }
h1, h2, h3 { font-weight: 700; letter-spacing: -.035em; }
.appbar { background: rgba(255, 255, 255, .97); color: var(--ink); border-bottom: 1px solid var(--line); box-shadow: none; gap: 12px; padding-right: 20px; }
.appbar-heading { flex: 1; min-width: 0; }
.appbar-eyebrow { display: block; font-size: 10px; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; }
.appbar-title { font-size: 20px; }
.appbar-who { color: var(--ink); }
.appbar-burger span { background: var(--primary); }
.who-initials { background: var(--primary-soft); color: var(--primary); border-radius: 12px; width: 38px; height: 38px; }
.drawer { background: #fff; }
.drawer-brand { padding: 8px 20px 22px; border-bottom: 0; gap: 12px; }
.brand-monogram { display: inline-grid; place-items: center; width: 42px; height: 42px; flex-shrink: 0; border-radius: 14px; background: var(--primary); color: white; font-size: 17px; font-weight: 800; letter-spacing: -1px; }
.brand-wordmark { color: var(--ink); font-size: 22px; font-weight: 800; letter-spacing: -1px; }
.brand-wordmark em { color: var(--primary); font-style: normal; font-weight: 400; }
.brand-wordmark small { margin-top: 5px; letter-spacing: .16em; font-size: 9px; }
.drawer-group { margin: 18px 22px 6px; font-size: 9px; letter-spacing: .15em; }
.drawer-list { padding: 0 12px; }
.drawer-list a { min-height: 42px; border-left: 0; border-radius: 11px; padding: 9px 14px; font-size: 13px; }
.drawer-list a.is-active { background: var(--primary-soft); color: var(--primary); }
.drawer-list a.is-active::after { content: ''; width: 6px; height: 6px; margin-left: auto; border-radius: 50%; background: var(--primary); }
.content { padding-top: 24px; }
.card { padding: 20px; margin-bottom: 20px; border-color: #f3e6ec; }
.card-head { margin-bottom: 20px; }
.card-head h2 { font-size: 17px; }
.tile { border-left: 1px solid var(--line); padding: 20px; box-shadow: none; }
.tile-label { font-size: 10px; letter-spacing: .06em; text-transform: none; }
.tile-value { font-size: clamp(22px, 2.3vw, 34px); margin-top: 12px; color: var(--ink); }
.tile-note { margin-top: 8px; }
.tile-good .tile-note { color: var(--good); }
.tile-wait .tile-note { color: var(--wait); }
.tile-bad .tile-note { color: var(--bad); }
.tiles { gap: 14px; margin-bottom: 24px; }
.welcome { padding: 24px; border-radius: 24px; background: #ffe5ef; margin-bottom: 24px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.welcome h2 { font-size: clamp(23px, 3vw, 32px); margin: 8px 0; color: var(--ink); }
.welcome p { color: #765866; margin: 0; font-size: 13px; }
.welcome .eyebrow { color: var(--primary); font-size: 10px; font-weight: 700; letter-spacing: .16em; }
.welcome-date { flex-shrink: 0; padding: 12px 18px; background: #fff8fb; border-radius: 14px; color: var(--primary); font-size: 12px; }
.dashboard-panels { display: grid; gap: 0 20px; }
.dashboard-panels > section { min-width: 0; }
.feed li { padding: 16px 0; }
.feed .feed-meta { margin-top: 7px; }
.btn { font-size: 13px; font-weight: 600; }
.btn-primary { box-shadow: 0 4px 12px rgba(194, 24, 91, .1); }
.login-wrap { min-height: 100dvh; padding: 24px; background: #fff5f8; display: grid; place-items: center; }
.login-layout { width: min(1040px, 100%); display: grid; gap: 0; background: #fff; border: 1px solid var(--line); border-radius: 30px; overflow: hidden; box-shadow: var(--shadow-lg); }
.login-story { background: var(--primary); color: white; padding: 40px; display: flex; flex-direction: column; justify-content: space-between; gap: 44px; }
.login-story .brand-wordmark, .login-story .brand-wordmark em { color: white; }
.login-story h2 { font-size: clamp(30px, 4vw, 48px); line-height: 1.13; max-width: 360px; }
.login-story p { color: #ffe5ef; font-size: 13px; max-width: 320px; line-height: 1.7; }
.login-story .eyebrow { color: #ffd0e2; font-size: 10px; letter-spacing: .15em; font-weight: 600; }
.login-card { width: 100%; max-width: none; margin: 0; border: 0; box-shadow: none; border-radius: 0; padding: 30px; align-self: center; }
.login-brand { text-align: left; margin-bottom: 30px; }
.login-brand h1 { font-size: 28px; margin: 8px 0; }
.login-brand p { margin: 0; }
.login-brand .eyebrow { color: var(--primary); font-size: 10px; letter-spacing: .15em; font-weight: 700; }
.login-card .hint { font-size: 11px; }
.login-card .form { max-width: none; }
a:focus-visible, button:focus-visible { outline: 3px solid #ed82ab; outline-offset: 3px; }
@media (max-width: 599px) {
  .welcome { display: block; padding: 22px; }
  .welcome-date { display: inline-block; margin-top: 16px; }
  .tile { padding: 15px; }
  .tile-value { font-size: 23px; overflow-wrap: anywhere; }
  .login-wrap { padding: 14px; }
  .login-story { padding: 26px; gap: 24px; }
  .login-story h2 { font-size: 28px; }
  .login-story p, .login-story .eyebrow { display: none; }
  .login-card { padding: 26px; }
}
@media (min-width: 760px) { .login-layout { grid-template-columns: 1fr 1fr; } .login-card { padding: 48px; } }
@media (min-width: 900px) {
  .drawer { width: 250px; border-right: 1px solid var(--line); padding-top: 22px; }
  .appbar { padding-left: 282px; }
  .content { padding: 30px 32px 48px 282px; max-width: 1740px; margin: 0 auto; }
  .dashboard-panels { grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr); align-items: start; }
  .dashboard-panels .card:nth-child(1) { grid-column: 2; grid-row: 1; }
  .dashboard-panels .card:nth-child(2) { grid-column: 1; grid-row: 1 / span 2; }
  .dashboard-panels .card:nth-child(3) { grid-column: 2; }
  table.data thead th { background: #fff5f8; }
  table.data tbody tr:nth-child(even) { background: #fffbfd; }
}

/* Kahfi Data illustrated identity. */
.brand-art { display: block; object-fit: contain; }
.login-story > .brand-art { width: 180px; height: 180px; }
.drawer-brand { flex-direction: column; align-items: flex-start; gap: 8px; padding-top: 0; }
.drawer-brand small { color: var(--muted); font-size: 9px; letter-spacing: .15em; font-weight: 600; }
.drawer-brand .brand-art { width: 112px; height: 112px; border-radius: 0; }
@media (max-width: 599px) { .login-story > .brand-art { width: 112px; height: 112px; } }
