:root {
  color-scheme: light;
  --brand: #e56a2a;
  --brand-foreground: #f4f1ec;
  --brand-soft: color-mix(in srgb, #e56a2a 12%, #f4f1ec);
  --field-dark: #16181d;
  --background: #f3f0ea;
  --foreground: #1c1e22;
  --card: #fffcf7;
  --card-foreground: #1c1e22;
  --primary: #16181d;
  --primary-foreground: #f4f1ec;
  --muted: #ece8e1;
  --muted-foreground: #5c5f66;
  --border: #ddd6cc;
  --input: #d5cfc5;
  --ring: #e56a2a;
  --destructive: oklch(0.55 0.2 25);
  --good: oklch(0.48 0.13 155);
  --good-soft: oklch(0.94 0.04 155);
  --warn: oklch(0.62 0.14 70);
  --warn-soft: oklch(0.95 0.05 85);
  --bad: oklch(0.54 0.19 25);
  --bad-soft: oklch(0.95 0.04 25);
  --info: oklch(0.5 0.1 230);
  --info-soft: oklch(0.94 0.03 230);
  --radius: 0.5rem;
  --control-h: 2.25rem;
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --font-heading: var(--font-sans);
  --font-display: var(--font-sans);
  --orange: var(--brand);
  --dark: var(--field-dark);
  --light: var(--background);
  --line: var(--border);
  --white: #ffffff;
  --surface: 1px solid var(--border);
}

.dark {
  color-scheme: dark;
  --brand-soft: color-mix(in srgb, #e56a2a 22%, #16181d);
  --background: oklch(0.2 0.016 70);
  --foreground: oklch(0.97 0.01 85);
  --card: oklch(0.24 0.016 70);
  --card-foreground: oklch(0.97 0.01 85);
  --primary: oklch(0.8 0.11 162);
  --primary-foreground: oklch(0.22 0.04 162);
  --muted: oklch(0.3 0.016 70);
  --muted-foreground: oklch(0.72 0.02 80);
  --border: oklch(1 0 0 / 12%);
  --input: oklch(1 0 0 / 16%);
  --ring: oklch(0.8 0.11 162);
  --destructive: oklch(0.7 0.16 22);
  --good: oklch(0.8 0.12 155);
  --good-soft: oklch(0.3 0.05 155);
  --warn: oklch(0.82 0.12 80);
  --warn-soft: oklch(0.32 0.05 80);
  --bad: oklch(0.75 0.14 22);
  --bad-soft: oklch(0.32 0.06 22);
  --info: oklch(0.78 0.08 230);
  --info-soft: oklch(0.3 0.04 230);
  --line: var(--border);
}

* { box-sizing: border-box; }
html {
  height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-size: 15px;
}
html, body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  min-height: 100%;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  line-height: 1.45;
}
body {
  background-color: var(--background);
  background-image:
    linear-gradient(180deg, color-mix(in srgb, var(--brand) 7%, var(--background)) 0, var(--background) 18rem);
}
.dark body {
  background-image:
    linear-gradient(180deg, color-mix(in srgb, var(--brand) 8%, var(--background)) 0, var(--background) 16rem);
}
::selection {
  background: color-mix(in srgb, var(--brand) 30%, transparent);
  color: var(--foreground);
}
@media print {
  body { background-image: none !important; }
}

button, input, select, textarea { font: inherit; }
a { color: var(--primary); }
a.brand-link { color: var(--brand); text-underline-offset: 4px; }
a.brand-link:hover { text-decoration: underline; }

.app { min-height: 100vh; width: 100%; min-width: 0; }
.app.desk {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
}
.app.desk.collapsed { grid-template-columns: 64px minmax(0, 1fr); }
.desk-col { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }

.rail {
  background: var(--field-dark);
  color: #f4f4f5;
  border-right: 1px solid rgb(255 255 255 / 8%);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px 12px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.rail-brand { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rail-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  display: block;
}
.rail-nav { display: grid; gap: 2px; }
.rail-nav button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  color: #a1a1aa;
  border-radius: 8px;
  padding: 8px 10px 8px 12px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  text-align: left;
}
.rail-nav button:hover { background: rgb(255 255 255 / 8%); color: #fff; }
.rail-nav button.active {
  background: rgb(255 255 255 / 12%);
  color: #fff;
  font-weight: 600;
}
.rail-nav button.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 2px;
  border-radius: 999px;
  background: var(--brand);
}
.app.desk.collapsed .rail-brand { flex-direction: column; align-items: center; }
.app.desk.collapsed .rail-nav button { justify-content: center; gap: 0; padding-left: 8px; padding-right: 8px; }
.app.desk.collapsed .rail-icon { display: block; }
.app.desk.collapsed .rail-label,
.app.desk.collapsed .wordmark,
.app.desk.collapsed .live-dot { display: none; }
.rail-badge {
  margin-left: auto;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 6px;
  border-radius: 999px;
  background: #e56a2a;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.25rem;
  text-align: center;
}
.app.desk.collapsed .rail-badge {
  display: block;
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 0.7rem;
  height: 0.7rem;
  padding: 0;
  font-size: 0;
}
.app.desk.collapsed .kairn-mark.invert { padding: 4px; }
.rail-toggle, .icon-btn {
  border: 0;
  background: transparent;
  color: #d4d4d8;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.rail-toggle:hover, .icon-btn:hover { background: rgb(255 255 255 / 10%); }
.icon-btn.active { background: rgb(255 255 255 / 12%); color: #fff; }

.chrome, .top {
  height: 52px;
  min-height: 52px;
  background: var(--field-dark);
  color: #f4f4f5;
  border-bottom: 1px solid rgb(255 255 255 / 8%);
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: 100%;
}
.chrome-title { min-width: 0; display: flex; align-items: center; }
.page-head { display: grid; gap: 2px; padding-bottom: 4px; }
.page-head h1 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.375rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  color: var(--foreground);
}
.page-sub { color: var(--muted-foreground); font-size: 13px; }
.sub { color: #a1a1aa; font-size: 12px; margin-top: 0; }
.chrome-right { display: flex; align-items: center; gap: 8px; }
.account { color: #a1a1aa; font-size: 12px; letter-spacing: 0.01em; }

.kairn-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brand);
}
.kairn-mark.invert {
  border-radius: 999px;
  background: rgb(255 255 255 / 8%);
  padding: 4px 10px;
}
.kairn-mark.invert .kairn-name { color: #fff; }
.kairn-mark.invert .kairn-suffix { color: #a1a1aa; }
.kairn-name { font-weight: 600; color: var(--foreground); letter-spacing: -0.025em; }
.kairn-suffix { font-weight: 400; color: var(--muted-foreground); }
.cairn { width: 20px; height: 20px; color: var(--brand); flex: 0 0 auto; }
.cairn.sm { width: 16px; height: 16px; }
.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--good);
  flex: 0 0 auto;
}
.wordmark { white-space: nowrap; letter-spacing: -0.025em; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.brand { display: flex; align-items: center; gap: 8px; color: #a1a1aa; font-weight: 600; }
.nav { display: flex; gap: 8px; flex-wrap: wrap; }
.nav button {
  position: relative;
  border: 0;
  background: transparent;
  color: #a1a1aa;
  border-radius: 8px;
  padding: 8px 10px;
  font-weight: 500;
  cursor: pointer;
}
.nav button:hover { background: rgb(255 255 255 / 8%); color: #fff; }
.nav button.active {
  background: rgb(255 255 255 / 12%);
  color: #fff;
  font-weight: 600;
}
.nav button.active::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 2px;
  height: 2px;
  border-radius: 999px;
  background: var(--brand);
}

.ghost, .primary, button.dark, .rail-nav button, .nav button, .slicers button, .icon-btn, .rail-toggle {
  outline: none;
}
.ghost, .primary, button.dark {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 14px;
  min-height: var(--control-h);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.primary {
  background: var(--brand);
  color: var(--brand-foreground);
}
.primary:hover { background: color-mix(in srgb, var(--brand) 88%, #000); }
button.dark {
  background: var(--field-dark);
  color: var(--brand-foreground);
}
button.dark:hover { background: color-mix(in srgb, var(--field-dark) 88%, #fff); }
.ghost {
  background: var(--card);
  border-color: var(--border);
  color: var(--foreground);
}
.ghost:hover { background: var(--muted); }
.chrome .ghost, .top .ghost {
  border-color: rgb(255 255 255 / 16%);
  color: #e4e4e7;
}
.chrome .ghost:hover, .top .ghost:hover { background: rgb(255 255 255 / 10%); }
button:disabled { opacity: 0.45; }
.ghost:focus-visible, .primary:focus-visible, button.dark:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 50%, transparent);
}

.wrap,
.wrap.wide {
  padding: 24px 16px 56px;
  display: grid;
  gap: 20px;
  align-content: start;
  width: 100%;
  max-width: 92rem;
  margin: 0 auto;
  min-width: 0;
}
@media (min-width: 640px) {
  .wrap, .wrap.wide { padding-left: 28px; padding-right: 28px; }
}
.page-body {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.foot {
  border-top: 1px solid rgb(0 0 0 / 6%);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-foreground);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}
.dark .foot { border-top-color: rgb(255 255 255 / 10%); }
.foot .cairn { width: 14px; height: 14px; }

.auth-page { min-height: 100vh; display: flex; flex-direction: column; }
.auth-shell {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}
.auth-card {
  width: 100%;
  max-width: 52rem;
  display: grid;
  overflow: hidden;
  border-radius: 12px;
  background: var(--card);
  box-shadow: none;
  outline: var(--surface);
}
@media (min-width: 1024px) {
  .auth-card { grid-template-columns: 1fr 1fr; }
}
.auth-aside {
  display: none;
  position: relative;
  overflow: hidden;
  background: var(--field-dark);
  color: #f4f4f5;
  padding: 36px 32px;
  flex-direction: column;
  justify-content: space-between;
}
@media (min-width: 1024px) {
  .auth-aside { display: flex; }
}
.auth-orb {
  pointer-events: none;
  position: absolute;
  border-radius: 999px;
  filter: none;
  opacity: 0.55;
}
.auth-orb.a { top: -40px; right: -40px; width: 140px; height: 140px; background: color-mix(in srgb, var(--brand) 28%, transparent); }
.auth-orb.b { bottom: -48px; left: -32px; width: 160px; height: 160px; background: color-mix(in srgb, var(--brand) 12%, transparent); }
.eyebrow {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--brand);
}
.display {
  margin: 10px 0 0;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: #fff;
}
.auth-lede { margin: 16px 0 0; max-width: 24rem; color: #a1a1aa; font-size: 14px; line-height: 1.6; }
.auth-tz { position: relative; font-size: 11px; text-transform: uppercase; letter-spacing: 0.18em; color: #71717a; }
.auth-form { padding: 24px; display: grid; gap: 18px; }
@media (min-width: 640px) {
  .auth-form { padding: 36px; }
}
.auth-form .primary { width: 100%; }
.auth-mobile { display: grid; gap: 8px; }
@media (min-width: 1024px) {
  .auth-mobile { display: none; }
}
.auth-form .display { color: var(--foreground); font-size: 1.625rem; }
.auth-form input { height: 40px; }

.people-sections {
  display: flex;
  gap: 0;
  outline: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  width: fit-content;
  max-width: 100%;
  background: var(--muted);
}
.people-sections button {
  border: 0;
  background: transparent;
  padding: 7px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.people-sections button.active {
  background: var(--field-dark);
  color: var(--brand-foreground);
}
.slicers { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.slicers button {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--foreground);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.slicers button.active { background: var(--field-dark); color: #fff; border-color: var(--field-dark); }
.people-layout { display: grid; gap: 16px; width: 100%; min-width: 0; }
.people-layout.has-drawer { align-items: start; }
@media (min-width: 960px) {
  .people-layout.has-drawer { grid-template-columns: minmax(0, 1fr) 400px; }
}
.people-table-wrap {
  overflow: auto;
  background: var(--card);
  border-radius: 10px;
  box-shadow: none;
  outline: var(--surface);
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.dark .people-table-wrap { outline-color: rgb(255 255 255 / 10%); }
.people-table { width: 100%; border-collapse: collapse; }
.people-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--muted);
  font-weight: 650;
  letter-spacing: 0.02em;
}
.people-table tbody tr:hover { background: color-mix(in srgb, var(--brand) 6%, var(--card)); }
.people-table tr { cursor: pointer; }
.people-table tr.selected { background: var(--brand-soft); }
.people-table tr.group-expand { cursor: default; }
.people-table tr.group-expand:hover { background: transparent; }
.group-members {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: 4px 16px;
  list-style: none;
  margin: 0;
  padding: 4px 0 8px;
  max-height: 280px;
  overflow: auto;
}
.group-members li {
  font-size: 13px;
  line-height: 1.35;
}
.form-panel,
.sheet.filters {
  display: grid;
  gap: 14px;
  padding: 16px 18px;
  background: var(--card);
  outline: var(--surface);
  border-radius: 10px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.dark .form-panel,
.dark .sheet.filters { outline-color: rgb(255 255 255 / 10%); }
.sheet.person-drawer {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  background: var(--card);
  outline: var(--surface);
  border-radius: 10px;
}
.dark .sheet.person-drawer { outline-color: rgb(255 255 255 / 10%); }
.person-drawer { position: sticky; top: 16px; }
.action-feed { max-height: 360px; }
.map {
  min-height: 460px;
  border-radius: 10px;
  outline: var(--surface);
  background: #e8e4de;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.map-fallback svg { display: block; width: 100%; height: 420px; background: var(--background); }
.geofence-picker-block {
  display: grid;
  gap: 8px;
  grid-column: 1 / -1;
}
.geofence-map-prompt {
  display: grid;
  justify-items: start;
}
.map.geofence-map {
  height: 280px;
  min-height: 280px;
}
.geofence-map-fallback {
  min-height: 72px;
  display: grid;
  align-content: center;
  padding: 12px;
}
.filters {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  align-items: end;
  width: 100%;
  min-width: 0;
}
.filters > label { max-width: 22rem; }
.filters > button.primary,
.filters > button.ghost,
.filters > button.dark {
  width: auto;
  min-width: 6.75rem;
  justify-self: start;
}
.sheet.filters {
  position: relative;
  z-index: 3;
  overflow: visible;
}
.sheet.filters .multi-select,
.update-audience .multi-select { width: 100%; }
.iso-date-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: var(--control-h);
  padding: 8px 12px;
  border: 1px solid var(--input);
  border-radius: 8px;
  background: var(--card);
  color: var(--foreground);
}
.iso-date-shown {
  pointer-events: none;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--foreground);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.iso-date-native {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}
textarea {
  border: 1px solid var(--input);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--card);
  color: var(--foreground);
  min-height: 120px;
  resize: vertical;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
label.check { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--foreground); }
.muted { color: var(--muted-foreground); line-height: 1.45; }
.page-help {
  margin: 0;
  width: fit-content;
  max-width: 100%;
}
.page-help > summary {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-foreground);
  list-style: none;
  user-select: none;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 999px;
  padding: 4px 10px 4px 12px;
}
.page-help > summary::-webkit-details-marker { display: none; }
.page-help > summary::after {
  content: "+";
  font-size: 15px;
  line-height: 1;
  color: var(--muted-foreground);
}
.page-help[open] {
  width: 100%;
  padding: 12px 14px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
}
.page-help[open] > summary {
  border: 0;
  background: transparent;
  padding: 0;
}
.page-help[open] > summary::after { content: "–"; }
.page-help[open] > summary { margin-bottom: 8px; }
.page-help .muted { margin: 0; }
.grid { display: grid; gap: 12px; width: 100%; min-width: 0; }
.cards {
  display: grid;
  gap: 12px;
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
}
.card {
  position: relative;
  background: var(--card);
  color: var(--card-foreground);
  outline: var(--surface);
  border-radius: 10px;
  padding: 16px 18px;
  display: grid;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-shadow: none;
}
.dark .card { outline-color: rgb(255 255 255 / 10%); box-shadow: none; }
.card.editing { outline-color: transparent; }
.card.editing::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--brand);
}
.row { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.pill { background: var(--field-dark); color: #fff; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700; }
.pill.late, .pill.accept { background: var(--warn); color: #16181d; }
.pill.call { background: var(--bad); color: #fff; }
.pill.ok { background: var(--good); color: #fff; }
label { display: grid; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted-foreground); letter-spacing: 0.01em; }
input, select {
  border: 1px solid var(--input);
  border-radius: 8px;
  padding: 8px 12px;
  min-height: var(--control-h);
  background: var(--card);
  color: var(--foreground);
}
input:not([type="checkbox"]):not([type="color"]):not([type="file"]):not([type="radio"]),
select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.people-page-size-label {
  display: flex;
  align-items: center;
  gap: 8px;
  width: auto;
  color: var(--muted-foreground);
  font-size: 13px;
}
.people-page-size {
  width: auto;
  min-width: 4.5rem;
  max-width: 6rem;
}
.people-toolbar {
  align-items: center;
}
.people-columns {
  position: relative;
}
.people-columns-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 6;
  display: grid;
  gap: 6px;
  min-width: 10rem;
  padding: 10px;
  background: var(--card);
  border-radius: 10px;
  outline: var(--surface);
  box-shadow: 0 8px 20px -14px rgba(22, 24, 29, 0.35);
}
.dark .people-columns-menu { outline-color: rgb(255 255 255 / 10%); }
.role-pick {
  display: grid;
  gap: 8px;
}
.people-bulk {
  gap: 10px;
}
.err {
  background: var(--bad-soft);
  color: var(--destructive);
  padding: 12px;
  border-radius: 12px;
}
.note-banner {
  background: var(--field-dark);
  color: #e4e4e7;
  padding: 8px 16px;
  text-align: center;
  font-size: 14px;
  border-bottom: 1px solid rgb(255 255 255 / 10%);
}
.note-banner .eyebrow { display: inline; margin-right: 8px; }
.section {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--muted);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--foreground);
}
button.chip {
  border: 0;
  cursor: pointer;
  font: inherit;
}
.chip.on {
  background: var(--brand);
  color: var(--brand-foreground);
}
.role-sections {
  display: grid;
  gap: 16px;
}
@media (min-width: 720px) {
  .role-sections { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
}
.field-block { display: grid; gap: 6px; }
.field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-foreground);
}
.time-pick { display: grid; gap: 10px; }
.time-pick-windows,
.time-pick-lengths { display: flex; flex-wrap: wrap; gap: 8px; }
.time-pick-clocks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.time-pick-clock { display: grid; gap: 6px; }
.time-clock-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.time-nudge { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.time-select { min-width: 6rem; }
.time-pick-summary { font-weight: 600; color: var(--foreground); }
.officer-pick-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.officer-pick-bar .muted { flex: 1 1 auto; }
.req-editor { overflow: visible; }
.req-apply {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  position: relative;
  z-index: 2;
}
.checks {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
}
.multi-select { position: relative; }
.multi-select-btn {
  width: 100%;
  max-width: 100%;
  text-align: left;
  border: 1px solid var(--input);
  border-radius: 8px;
  padding: 8px 12px;
  min-height: var(--control-h);
  background: var(--card);
  color: var(--foreground);
  font: inherit;
}
.multi-select-menu {
  display: none;
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: var(--card);
  border: 1px solid var(--input);
  border-radius: 8px;
  padding: 8px;
  max-height: 220px;
  overflow: auto;
  box-shadow: 0 8px 24px rgb(0 0 0 / 12%);
}
.multi-select.open .multi-select-menu { display: grid; gap: 6px; }
.multi-select-menu.pinned {
  position: fixed;
  right: auto;
  z-index: 80;
}
.accept-board {
  display: grid;
  gap: 12px;
  width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
}
.officer-pick {
  max-height: 180px;
  overflow: auto;
  display: grid;
  gap: 6px;
  padding: 8px;
  background: var(--muted);
  border-radius: 12px;
}
.roster {
  display: grid;
  grid-template-columns: minmax(88px, 140px) repeat(7, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  outline: 1px solid var(--border);
  border-radius: 12px;
  overflow: auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.roster .cell {
  background: var(--card);
  padding: 8px 9px;
  min-height: 76px;
  min-width: 0;
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.roster .head { background: var(--muted); font-weight: 700; color: var(--muted-foreground); min-height: 0; }
.roster .name { font-weight: 700; font-size: 13px; }
.shift-chip { margin-top: 4px; padding-left: 8px; border-left: 3px solid var(--border); position: relative; }
.shift-chip.waiting { border-left-color: var(--orange); }
.shift-chip.accepted { border-left-color: var(--good); }
.shift-chip.rejected { border-left-color: var(--bad); }
.chip.accept-waiting.on { background: var(--orange); color: var(--brand-foreground); }
.chip.accept-accepted.on { background: var(--good); color: #fff; }
.chip.accept-rejected.on { background: var(--bad); color: #fff; }
.shift-chip.desk-edited,
.period-punch.desk-edited {
  background: var(--brand-soft);
  outline: 1px solid var(--brand);
  color: var(--brand);
  font-weight: 600;
  border-radius: 4px;
  padding: 2px 8px;
}
.people-table tr.desk-edited { background: var(--brand-soft); box-shadow: inset 3px 0 0 var(--brand); }
.people-table tr.desk-edited.selected { background: color-mix(in srgb, var(--brand) 22%, var(--card)); }
.desk-edited[data-edit]:hover::after {
  content: attr(data-edit);
  position: absolute;
  left: 0;
  top: calc(100% + 4px);
  z-index: 30;
  min-width: 12rem;
  max-width: 20rem;
  padding: 6px 8px;
  border-radius: 6px;
  background: var(--field-dark);
  color: var(--brand-foreground);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  white-space: normal;
  box-shadow: 0 8px 24px -12px rgb(22 24 29 / 50%);
  pointer-events: none;
}
.people-table tr.desk-edited { position: relative; }
.people-table tr.desk-edited[data-edit]:hover::after {
  top: auto;
  bottom: calc(100% + 4px);
}
.shift-chip.desk-edited { z-index: 2; }
.roster .cell:has(.desk-edited) { overflow: visible; }
.leave-chip {
  margin-top: 4px;
  padding: 2px 8px;
  border-left: 3px solid var(--info);
  background: var(--info-soft);
  color: var(--info);
  border-radius: 4px;
  font-weight: 600;
}
.leave-chip.unavailable {
  border-left-color: var(--warn);
  background: var(--warn-soft);
  color: var(--warn);
}
.roster .cell.clash {
  background: var(--bad-soft);
  box-shadow: inset 0 0 0 1px var(--bad);
}
.leave-chip.clash {
  border-left-color: var(--bad);
  background: var(--bad-soft);
  color: var(--bad);
}
.composer-toggle {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  padding: 11px 14px;
  border: 0;
  border-radius: 10px;
  background: var(--card);
  outline: var(--surface);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  text-align: left;
}
.dark .composer-toggle { outline-color: rgb(255 255 255 / 10%); }
.composer-toggle.open { outline-color: var(--brand); }
.composer-toggle.in-use {
  outline-color: var(--brand);
  background: var(--brand-soft);
}
.schedule-filters { position: relative; z-index: 20; }
.schedule-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}
.schedule-filter-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.schedule-filters .composer-toggle { width: auto; min-width: 8rem; }
.schedule-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-foreground);
}
.schedule-sort-select {
  font: inherit;
  font-weight: 600;
  color: var(--foreground);
}
.sheet.schedule-filter-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 70;
  overflow: visible;
  display: grid;
  gap: 12px;
  width: min(36rem, calc(100vw - 2rem));
  padding: 16px;
  background: var(--card);
  outline: var(--surface);
  border-radius: 10px;
  box-shadow: 0 12px 28px -16px rgb(22 24 29 / 40%);
}
.dark .sheet.schedule-filter-panel { outline-color: rgb(255 255 255 / 10%); }
.schedule-filter-panel .multi-select { width: 100%; }
.schedule-filter-fieldset { display: grid; gap: 8px; }
.schedule-filter-row {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(7rem, 11rem) minmax(0, 1fr) auto;
  align-items: end;
}
@media (max-width: 720px) {
  .schedule-filter-row { grid-template-columns: minmax(0, 1fr); }
}
.schedule-filter-row .multi-select { width: 100%; }
.composer-toggle::after {
  content: "+";
  font-weight: 700;
  color: var(--muted-foreground);
}
.composer-toggle.open::after { content: "–"; }
.csv-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.csv-pick {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 20px 16px;
  border: 0;
  border-radius: 12px;
  background: var(--muted);
  outline: 1px dashed var(--border);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.csv-pick:hover { outline-color: var(--brand); }
.csv-pick strong { font-size: 15px; }
.swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  margin-right: 8px;
  vertical-align: -1px;
  border: 1px solid var(--border);
}
.sheet { overflow: auto; width: 100%; max-width: 100%; min-width: 0; }
.modal-scrim {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgb(22 24 29 / 48%);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
  overflow: auto;
}
.modal {
  width: min(40rem, 100%);
  max-height: calc(100vh - 48px);
  background: var(--card);
  color: var(--card-foreground);
  border-radius: 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 40px -24px rgba(22, 24, 29, 0.4);
  outline: var(--surface);
}
.modal-wide { width: min(68rem, 100%); }
.payroll-pivot-wrap { overflow-x: auto; }
.payroll-pivot th,
.payroll-pivot td { text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.payroll-pivot tbody tr:hover td { background: color-mix(in srgb, var(--brand) 6%, var(--card)); }
.payroll-pivot th:first-child,
.payroll-pivot td:first-child {
  text-align: left;
  position: sticky;
  left: 0;
  background: var(--card);
}
.payroll-pivot tbody tr:hover td:first-child { background: color-mix(in srgb, var(--brand) 6%, var(--card)); }
.payroll-pivot td.clickable:hover { background: var(--brand-soft); }
.payroll-pivot button.linkish {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.payroll-day-punches tr { cursor: default; }
.map.payroll-day-map { min-height: 320px; }
.apis-features {
  display: grid;
  gap: 8px;
}
button.apis-feature {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border: 0;
  border-radius: 10px;
  background: var(--card);
  color: inherit;
  font: inherit;
  cursor: pointer;
  outline: var(--surface);
}
button.apis-feature:hover { outline-color: var(--brand); }
.apis-feature-name { font-weight: 600; }
.apis-maps-usage { display: grid; gap: 12px; }
.modal-title {
  margin: 4px 0 0;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}
.modal-head, .modal-foot {
  padding: 20px 24px;
  display: grid;
  gap: 8px;
}
.modal-head {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--card);
  border-radius: 12px 12px 0 0;
  z-index: 1;
}
.modal-body {
  padding: 20px 24px 8px;
  overflow: auto;
  display: grid;
  gap: 16px;
  min-height: 0;
}
.modal-foot {
  border-top: 1px solid var(--border);
  position: sticky;
  bottom: 0;
  background: var(--card);
  border-radius: 0 0 12px 12px;
}
.leave-alert-names {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 6px;
  font-weight: 600;
}
.ot-block {
  background: var(--muted);
  border-radius: 12px;
  padding: 16px;
  display: grid;
  gap: 12px;
}
.ot-fields {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  align-items: start;
}
.ot-scope-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
}
.ot-scope {
  background: var(--card);
  border-radius: 10px;
  padding: 12px;
  display: grid;
  gap: 8px;
  outline: 1px solid rgb(0 0 0 / 6%);
}
.dark .ot-scope { outline-color: rgb(255 255 255 / 10%); }
.ot-notes { min-height: 72px; }
.ot-advanced {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  background: var(--card);
}
.ot-advanced > summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
.ot-advanced > summary::-webkit-details-marker { display: none; }
.ot-advanced-hide { display: none; }
.ot-advanced[open] .ot-advanced-show { display: none; }
.ot-advanced[open] .ot-advanced-hide { display: inline; }
.ot-advanced-body {
  display: grid;
  gap: 16px;
  margin-top: 12px;
}
.ot-rule-list { display: grid; gap: 10px; }
.ot-rule {
  cursor: pointer;
}
.ot-rule-meta {
  display: grid;
  gap: 8px 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
}
.ot-meta span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; }
.admin-toolbar {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.dark .modal { outline-color: rgb(255 255 255 / 10%); }
.menu {
  display: none;
  border: 0;
  background: transparent;
  color: #d4d4d8;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
}
.scrim {
  display: none;
  position: fixed;
  inset: 0;
  background: rgb(0 0 0 / 50%);
  z-index: 20;
}
@media (max-width: 820px) {
  .app.desk, .app.desk.collapsed { grid-template-columns: 1fr; }
  .rail {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 30;
    width: 256px;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
  }
  .app.desk.nav-open .rail { transform: translateX(0); }
  .app.desk.nav-open .scrim { display: block; }
  .menu { display: inline-flex; align-items: center; justify-content: center; }
  .chrome, .top { flex-wrap: nowrap; }
}
input[type="color"] { padding: 2px; height: 40px; width: 72px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { color: var(--muted-foreground); font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.04em; }
tbody tr:last-child td { border-bottom: 0; }

.update-desk { display: grid; gap: 16px; width: 100%; min-width: 0; }
.update-composer {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 14px;
  padding: 18px 20px;
  background: var(--card);
  color: var(--card-foreground);
  outline: var(--surface);
  border-radius: 10px;
  box-shadow: none;
  overflow: visible;
}
.update-composer .multi-select { width: 100%; }
.dark .update-composer { outline-color: rgb(255 255 255 / 10%); }
.update-composer::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  top: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--brand);
}
.update-composer-head { display: grid; gap: 4px; }
.update-expiry {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 720px) {
  .update-expiry { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; }
}
.expiry-presets { display: flex; flex-wrap: wrap; gap: 8px; }
.expiry-presets button {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--foreground);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 600;
  cursor: pointer;
}
.expiry-presets button.active {
  background: var(--field-dark);
  color: #fff;
  border-color: var(--field-dark);
}
.update-composer-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.update-split {
  display: grid;
  gap: 16px;
  width: 100%;
  min-width: 0;
}
@media (min-width: 1100px) {
  .update-split { grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); align-items: start; }
}
.update-list { display: grid; gap: 8px; align-content: start; }
.update-item {
  display: grid;
  gap: 6px;
  width: 100%;
  text-align: left;
  border: 0;
  background: var(--card);
  color: var(--card-foreground);
  outline: var(--surface);
  border-radius: 10px;
  padding: 13px 15px;
  cursor: pointer;
  box-shadow: none;
}
.dark .update-item { outline-color: rgb(255 255 255 / 10%); }
.update-item:hover { outline-color: color-mix(in srgb, var(--brand) 40%, var(--border)); }
.update-item.selected {
  outline-color: var(--brand);
  background: var(--brand-soft);
}
.update-item-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.update-item-top strong { font-size: 15px; letter-spacing: -0.02em; }
.update-item-meta { color: var(--muted-foreground); font-size: 12px; }
.update-detail {
  display: grid;
  gap: 14px;
  padding: 18px 20px;
  background: var(--card);
  color: var(--card-foreground);
  outline: var(--surface);
  border-radius: 10px;
  box-shadow: none;
}
.dark .update-detail { outline-color: rgb(255 255 255 / 10%); }
.update-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.update-title {
  margin: 4px 0 0;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.update-body { margin: 0; line-height: 1.5; }
.update-meta-row {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr));
}
.update-progress { display: grid; gap: 8px; }
.update-meter {
  height: 6px;
  background: var(--muted);
  border-radius: 999px;
  overflow: hidden;
}
.update-meter > span {
  display: block;
  height: 100%;
  background: var(--brand);
  border-radius: inherit;
}
.update-people {
  padding: 14px;
  background: var(--muted);
  border-radius: 12px;
}
.update-empty {
  padding: 24px;
  background: var(--card);
  outline: var(--surface);
  border-radius: 10px;
}
.dark .update-empty { outline-color: rgb(255 255 255 / 10%); }

.template-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}
.template-bar label { flex: 1 1 220px; }
.punch-editor {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  background: var(--card);
  outline: var(--surface);
  border-radius: 10px;
  position: sticky;
  top: 16px;
}
.dark .punch-editor { outline-color: rgb(255 255 255 / 10%); }
.punch-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
}
.punch-status.in { background: var(--info-soft); color: var(--info); }
.punch-status.out { background: var(--muted); color: var(--muted-foreground); }
.punch-status.approved { background: var(--good-soft); color: var(--good); }
.punch-status.locked { background: var(--warn-soft); color: var(--warn); }
.punch-status.break { background: var(--brand-soft); color: var(--brand); }
.punch-status.pending { background: var(--warn-soft); color: var(--warn); }
.punch-status.due { background: var(--warn-soft); color: var(--warn); }
.punch-status.overdue { background: var(--bad-soft); color: var(--bad); }
.punch-status.open { background: var(--info-soft); color: var(--info); }

.mode-toggle {
  display: flex;
  gap: 0;
  align-self: end;
  outline: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.mode-toggle button {
  border: 0;
  background: transparent;
  padding: 8px 14px;
  font: inherit;
  cursor: pointer;
}
.mode-toggle button.active {
  background: var(--field-dark);
  color: var(--brand-foreground);
}

.period-banner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  padding: 16px 18px;
  background: var(--card);
  outline: var(--surface);
  border-radius: 10px;
}
.dark .period-banner { outline-color: rgb(255 255 255 / 10%); }
.period-banner.due { outline-color: color-mix(in srgb, var(--warn) 45%, var(--border)); }
.period-banner.overdue { outline-color: color-mix(in srgb, var(--bad) 45%, var(--border)); }

.edit-request {
  display: grid;
  gap: 8px;
}
.edit-was {
  color: var(--muted-foreground);
  text-decoration: line-through;
}
.payroll-up { color: var(--good); font-weight: 600; }
.payroll-down { color: var(--bad); font-weight: 600; }
.edit-decide {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.decide.accept,
.decide.decline {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 12px;
  min-height: var(--control-h);
  font: inherit;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}
.decide.accept {
  background: var(--good);
  color: var(--primary-foreground);
}
.decide.accept:hover { background: color-mix(in srgb, var(--good) 88%, #000); }
.decide.decline {
  background: transparent;
  border-color: var(--bad);
  color: var(--bad);
}
.decide.decline:hover { background: var(--bad-soft); }
.decide.note {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.decide.note .note-icon { width: 16px; height: 16px; display: block; }
.decide.note.good { background: var(--good-soft); color: var(--good); }
.decide.note.good:hover { outline: 1px solid var(--good); }
.decide.note.bad { background: var(--bad-soft); color: var(--bad); }
.decide.note.bad:hover { outline: 1px solid var(--bad); }
.period-punches {
  display: grid;
  gap: 8px;
}
.period-punch {
  display: grid;
  gap: 6px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}
.leave-policy-types {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--input);
  border-radius: 8px;
  background: var(--card);
}
.leave-policy-head,
.leave-policy-row {
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) 7rem 7rem;
  gap: 10px;
  align-items: center;
}
.leave-policy-head {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-foreground);
}
.leave-policy-row input[type='number'] { width: 100%; }
.leave-blackouts { display: grid; gap: 8px; }
.leave-blackout-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) auto;
  gap: 10px;
  align-items: end;
}
.api-explainer input[aria-label='Search the Field API catalog'] {
  width: min(36rem, 100%);
}
