:root {
  color-scheme: light;
  --ink: #10233f;
  --ink-strong: #061a35;
  --muted: #68778d;
  --muted-soft: #8a97a9;
  --line: #e2e8f0;
  --line-strong: #d4dde8;
  --canvas: #f5f7fb;
  --card: #ffffff;
  --navy: #061d3d;
  --navy-2: #0b2b55;
  --amber: #f5a300;
  --amber-soft: #fff4d8;
  --teal: #0c8b80;
  --teal-soft: #e6f7f5;
  --danger: #c93d52;
  --danger-soft: #fff0f2;
  --success: #087b65;
  --success-soft: #e8f8f2;
  --warning: #a86600;
  --warning-soft: #fff4dc;
  --info: #1769aa;
  --info-soft: #edf6ff;
  --shadow-sm: 0 1px 2px rgba(6, 26, 53, 0.04), 0 5px 16px rgba(6, 26, 53, 0.04);
  --shadow-md: 0 14px 38px rgba(6, 26, 53, 0.09);
  --radius-sm: 9px;
  --radius: 14px;
  --radius-lg: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font: 14px/1.55 "Inter";
  -webkit-font-smoothing: antialiased;
}
a { color: #0b63a8; text-decoration: none; }
a:hover { color: #074b80; }
button, input, select, textarea { font: inherit; }
button, .button, input, select, textarea, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, .button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(245, 163, 0, 0.38);
  outline-offset: 2px;
}
img { max-width: 100%; }
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: -1px !important;
  border: 0 !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
}
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4, strong { color: var(--ink-strong); }
h2 { margin-bottom: 6px; font-size: 18px; line-height: 1.3; letter-spacing: -0.02em; }
h3 { margin-bottom: 10px; font-size: 15px; }

.shell { display: grid; min-height: 100vh; }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 22px 14px 16px;
  color: #fff;
  background: radial-gradient(circle at 10% 0%, rgba(245, 163, 0, 0.16), transparent 29%),
    linear-gradient(175deg, #082448 0%, #04172f 74%);
  box-shadow: inset -1px 0 rgba(255, 255, 255, 0.04);
}
.brand {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 3px 20px;
  padding: 7px 8px;
  border-radius: 12px;
  color: #fff;
}
.brand:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.brand img {
  width: 43px;
  height: 43px;
  flex: 0 0 auto;
  object-fit: contain;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.2);
}
.brand strong { color: #fff; font-size: 16px; letter-spacing: -0.02em; }
.sidebar nav {
  min-height: 0;
  display: grid;
  gap: 3px;
  overflow: auto;
  padding: 2px;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}
.sidebar nav a {
  position: relative;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 9px;
  color: #bdcadb;
  font-size: 12.5px;
  font-weight: 590;
  transition: color 150ms ease, background-color 150ms ease, transform 150ms ease;
}
.sidebar nav a::before {
  display: none;
}
.sidebar nav a > svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .9;
  transition: opacity 150ms ease, transform 150ms ease;
}
.sidebar nav a > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar nav a:hover > svg { opacity: 1; transform: scale(1.06); }
.sidebar nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.075); transform: translateX(2px); }
.sidebar nav a.is-active, .sidebar nav a[aria-current="page"] {
  color: #fff;
  background: linear-gradient(90deg, rgba(245, 163, 0, 0.24), rgba(255, 255, 255, 0.07));
  box-shadow: inset 3px 0 var(--amber);
}
.sidebar nav a.is-active > svg, .sidebar nav a[aria-current="page"] > svg { color: var(--amber); opacity: 1; }
.logout { margin: auto 2px 0; padding-top: 14px; }
.logout button {
  width: 100%;
  color: #d9e4f0;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
}
.logout button:hover { color: #fff; border-color: rgba(245, 163, 0, 0.55); background: rgba(245, 163, 0, 0.1); }

.page-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}
.page-intro h2 { margin-bottom: 5px; font-size: 24px; }
.page-intro p { max-width: 720px; margin: 0; color: var(--muted); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
  color: var(--warning);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.eyebrow::before { width: 18px; height: 2px; content: ""; border-radius: 99px; background: var(--amber); }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.stats article, .metric-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.stats article::after, .metric-card::after {
  position: absolute;
  width: 72px;
  height: 72px;
  right: -28px;
  top: -28px;
  content: "";
  border-radius: 999px;
  background: var(--metric-tint, rgba(12, 139, 128, 0.09));
}
.stats article:nth-child(2n)::after { --metric-tint: rgba(245, 163, 0, 0.12); }
.stats article:nth-child(3n)::after { --metric-tint: rgba(23, 105, 170, 0.1); }
.stats span, .stats small, .metric-card > span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.stats strong, .metric-card > strong {
  display: block;
  margin-top: 6px;
  color: var(--ink-strong);
  font-size: clamp(22px, 2.2vw, 29px);
  line-height: 1.2;
  letter-spacing: -0.04em;
}
.metric-card > small { display: block; margin-top: 5px; color: var(--muted); }
.metric-change {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  margin-top: 9px;
  color: var(--success) !important;
  font-size: 11px !important;
  font-weight: 750 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}
.metric-change.negative { color: var(--danger) !important; }
.metric-change.neutral { color: var(--muted) !important; }
.performance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}
.performance-panel { overflow: hidden; background: linear-gradient(145deg, #fff 45%, #f8fbff); }

.panel {
  min-width: 0;
  margin-bottom: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.panel.is-highlighted { border-color: rgba(245, 163, 0, 0.4); background: linear-gradient(135deg, #fff, #fffaf0); }
.panel-title, .toolbar, .section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.panel-title { margin-bottom: 15px; }
.panel-title h2, .panel-title p, .section-heading h2, .section-heading p { margin-bottom: 0; }
.panel-title p, .section-heading p, .helper, .muted { color: var(--muted); }
.panel-title p, .section-heading p { margin-top: 3px; font-size: 12px; }
.toolbar { align-items: flex-end; margin-bottom: 16px; }
.toolbar-form, .filters { width: 100%; display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; }
.toolbar-form label, .filters label {
  min-width: 150px;
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.toolbar-form .search-field, .filters .search-field { min-width: min(320px, 100%); flex: 1; }
.tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.tabs a, .segmented a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: #fff;
  font-size: 11.5px;
  font-weight: 700;
}
.tabs a:hover, .tabs a.is-active, .segmented a:hover, .segmented a.is-active {
  color: var(--navy);
  border-color: rgba(245, 163, 0, 0.5);
  background: var(--amber-soft);
}

.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 11px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; white-space: nowrap; }
th, td { padding: 13px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th {
  position: sticky;
  z-index: 1;
  top: 0;
  color: #718096;
  background: #f8fafc;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background-color 140ms ease; }
tbody tr:hover { background: #fbfcfe; }
td strong { font-size: 12.5px; }
td small { display: block; margin-top: 2px; color: var(--muted); font-size: 10.5px; }
.cell-person { display: flex; align-items: center; gap: 10px; }
.cell-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 10px;
  color: var(--navy);
  background: linear-gradient(135deg, #fff1bd, #d7f1f0);
  font-size: 11px;
  font-weight: 850;
}
.status, .badge, .pill {
  position: relative;
  max-width: 100%;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  overflow: hidden;
  border: 1px solid rgba(104, 119, 141, 0.18);
  border-radius: 999px;
  color: #40536c;
  background: linear-gradient(180deg, #f8fafc 0%, #eaf0f5 100%);
  box-shadow: 0 3px 8px rgba(6, 26, 53, 0.07), inset 0 1px rgba(255, 255, 255, 0.78);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.035em;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease, filter 150ms ease;
}
.status:hover, .badge:hover, .pill:hover { transform: translateY(-1px); filter: saturate(1.08); box-shadow: 0 6px 13px rgba(6, 26, 53, 0.1), inset 0 1px rgba(255, 255, 255, 0.82); }
.status::before { width: 7px; height: 7px; flex: 0 0 auto; content: ""; border: 2px solid rgba(255, 255, 255, 0.86); border-radius: 99px; background: currentColor; box-shadow: 0 0 0 2px color-mix(in srgb, currentColor 20%, transparent); }
.badge::before, .pill::before { width: 6px; height: 6px; flex: 0 0 auto; content: ""; border-radius: 2px; background: currentColor; opacity: 0.75; transform: rotate(45deg); }
.status.ACTIVE, .status.APPROVED, .status.CONFIRMED, .status.COMPLETED,
.status.CONVERTED, .status.PRESENT, .status.SENT, .status.PAID {
  color: #08705d; border-color: #b9e5d7; background: linear-gradient(180deg, #f1fcf8, #dcf5eb);
}
.status.PENDING, .status.PENDING_APPROVAL, .status.UNDER_REVIEW, .status.PAYMENT_PENDING,
.status.FOLLOW_UP, .status.QUEUED, .status.ON_FIELD, .status.SCHEDULED, .status.DRAFT {
  color: #925900; border-color: #eed49b; background: linear-gradient(180deg, #fffaf0, #ffedc2);
}
.status.REJECTED, .status.SUSPENDED, .status.INACTIVE, .status.FAILED, .status.LOST,
.status.CANCELLED, .status.OVERDUE, .status.ENDED {
  color: #b33349; border-color: #efc5cc; background: linear-gradient(180deg, #fff7f8, #ffe5e9);
}
.status.IN_PROGRESS, .status.ASSIGNED, .status.CORRECTION_REQUIRED, .status.VISITED {
  color: #155f9c; border-color: #c3dff2; background: linear-gradient(180deg, #f5fbff, #dfedf9);
}
.status.UPCOMING { color: #155f9c; border-color: #c3dff2; background: linear-gradient(180deg, #f5fbff, #dfedf9); }
.status[data-chip-tone="success"], .badge[data-chip-tone="success"], .pill[data-chip-tone="success"] { color: #08705d; border-color: #b9e5d7; background: linear-gradient(180deg, #f1fcf8, #dcf5eb); }
.status[data-chip-tone="warning"], .badge[data-chip-tone="warning"], .pill[data-chip-tone="warning"] { color: #925900; border-color: #eed49b; background: linear-gradient(180deg, #fffaf0, #ffedc2); }
.status[data-chip-tone="danger"], .badge[data-chip-tone="danger"], .pill[data-chip-tone="danger"] { color: #b33349; border-color: #efc5cc; background: linear-gradient(180deg, #fff7f8, #ffe5e9); }
.status[data-chip-tone="info"], .badge[data-chip-tone="info"], .pill[data-chip-tone="info"] { color: #155f9c; border-color: #c3dff2; background: linear-gradient(180deg, #f5fbff, #dfedf9); }
.status[data-chip-tone="purple"], .badge[data-chip-tone="purple"], .pill[data-chip-tone="purple"] { color: #6941a5; border-color: #d8c7ef; background: linear-gradient(180deg, #fbf8ff, #eee5fb); }
.status[data-chip-tone="teal"], .badge[data-chip-tone="teal"], .pill[data-chip-tone="teal"] { color: #08756d; border-color: #b9e3df; background: linear-gradient(180deg, #f1fcfa, #dff5f1); }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(290px, 0.85fr); gap: 18px; }
.three-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.two-grid, .dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.dashboard-grid { grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr); }
.wide { min-width: 0; }

.form { display: grid; gap: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.settings-area-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)); gap: 11px; margin-bottom: 18px; }
.settings-area { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 11px; min-height: 82px; padding: 14px; color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-sm); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.settings-area:hover { color: var(--ink); transform: translateY(-2px); border-color: #b8cee2; box-shadow: var(--shadow-md); }
.settings-area-icon { display: grid; place-items: center; width: 38px; height: 38px; color: var(--info); background: var(--info-soft); border-radius: 11px; font-size: 18px; font-weight: 800; }
.settings-area > span:nth-child(2) { display: grid; gap: 3px; }
.settings-area strong { font-size: 12px; }
.settings-area small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.integration-hero { background: linear-gradient(115deg, #fff 0%, #f4fbff 100%); }
.integration-alert { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; padding: 13px 16px; color: #72500c; border: 1px solid #efd28c; border-radius: 12px; background: #fffaf0; }
.integration-alert svg, .integration-card svg, .integration-planned svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.integration-alert div { display: grid; gap: 2px; } .integration-alert strong { font-size: 12px; } .integration-alert span { color: #8a6a28; font-size: 11px; }
.integration-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.integration-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--card); box-shadow: var(--shadow-sm); }
.integration-card-head { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.integration-card-head h3 { margin: 0 0 2px; color: var(--ink); font-size: 15px; } .integration-card-head p { margin: 0; color: var(--muted); font-size: 10.5px; line-height: 1.45; }
.integration-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; } .integration-icon.blue { color: #2369ef; background: #edf4ff; } .integration-icon.teal { color: #079b8e; background: #eafaf7; }
.integration-form { padding: 18px; } .integration-form > button { justify-self: start; }
.integration-enable { padding: 11px 12px; border-radius: 10px; background: #f7f9fc; }
.teal-button { background: #079b8e; border-color: #079b8e; }
.integration-feedback { margin: -6px 0 18px; border-radius: 10px; }
.integration-feedback.success { color: var(--success); border-color: #bfe8dc; background: var(--success-soft); }
.integration-feedback.error { color: var(--danger); border-color: #f0cdd2; background: #fff4f5; }
.integration-test { display: grid; gap: 14px; margin: 0 18px 18px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; }
.integration-test-title { display: flex; align-items: center; gap: 11px; }
.integration-test-title > span:last-child { display: grid; gap: 3px; }
.integration-test-title strong { color: var(--ink); font-size: 13px; }
.integration-test-title small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.integration-test-fields { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; }
.integration-test-fields label { display: grid; gap: 6px; color: #34455c; font-size: 11.5px; font-weight: 700; }
.integration-test-fields input { width: 100%; min-height: 40px; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 9px; background: #fff; }
.integration-test-fields button svg { width: 16px; height: 16px; }
.integration-test-fields button:disabled { cursor: not-allowed; opacity: .5; box-shadow: none; }
.integration-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; } .integration-foot > small { max-width: 65%; color: var(--muted); font-size: 10px; line-height: 1.5; }
.integration-info-body { display: grid; gap: 14px; padding: 18px; } .integration-info-body p { margin: 0; color: var(--muted); font-size: 11.5px; line-height: 1.65; } .integration-info-body .button { justify-self: start; }
.integration-planned { display: grid; grid-template-columns: minmax(250px, .7fr) minmax(0, 1.3fr); gap: 24px; margin-top: 18px; padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: linear-gradient(135deg, #fff 0%, #f8fafc 100%); box-shadow: var(--shadow-sm); }
.integration-planned h2 { margin: 7px 0 5px; font-size: 17px; } .integration-planned > div > p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.planned-items { display: grid; gap: 8px; } .planned-items article { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.planned-items article > svg { color: var(--muted); } .planned-items article > span:nth-child(2) { display: grid; gap: 2px; } .planned-items strong { font-size: 11.5px; } .planned-items small { color: var(--muted); font-size: 9.5px; }
@media (max-width: 980px) { .integration-grid { grid-template-columns: 1fr; } .integration-planned { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .integration-card-head { grid-template-columns: 40px minmax(0, 1fr); } .integration-card-head .status { grid-column: 2; justify-self: start; } .integration-form .form-grid { grid-template-columns: 1fr; } .integration-foot { align-items: flex-start; flex-direction: column; } .integration-foot > small { max-width: none; } .integration-test-fields { grid-template-columns: 1fr; } }
.permission-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.permission-grid .check { min-height: 66px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); align-items: flex-start; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.permission-grid .check:hover { border-color: var(--info); background: var(--info-soft); transform: translateY(-1px); }
.permission-grid .check span { display: grid; gap: 3px; }
.permission-grid .check strong { color: var(--ink); font-size: 12px; }
.permission-grid .check small { color: var(--muted); font-family: "Inter"; font-size: 10px; }
.form label, .field { min-width: 0; display: grid; gap: 6px; color: #34455c; font-size: 11.5px; font-weight: 700; }
.form label > small { color: var(--muted); font-size: 10px; font-weight: 500; }
.form input, .form select, .form textarea, .toolbar-form input, .toolbar-form select,
.filters input, .filters select {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 1px 2px rgba(6, 26, 53, 0.025);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.form textarea { min-height: 94px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus, .toolbar-form input:focus,
.toolbar-form select:focus, .filters input:focus, .filters select:focus {
  border-color: #df9600;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(245, 163, 0, 0.13);
}
.form .check, .check { display: flex; align-items: center; gap: 8px; }
.form .check input, .check input { width: 17px; min-height: 17px; flex: 0 0 auto; accent-color: var(--navy); }
.form fieldset, fieldset.form { margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.form legend, fieldset.form legend { padding: 0 5px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.form fieldset .check + .check { margin-top: 7px; }
.inset { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }

button, .button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 1px 2px rgba(6, 26, 53, 0.025);
  font-size: 11.5px;
  font-weight: 750;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, background-color 140ms ease;
}
button:hover, .button:hover {
  color: var(--ink-strong);
  border-color: #bbc7d5;
  background: #f9fbfd;
  box-shadow: 0 4px 12px rgba(6, 26, 53, 0.07);
  transform: translateY(-1px);
}
button:disabled, .button[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; }
.small { min-height: 31px; padding: 6px 9px; font-size: 10.5px; }
.primary {
  color: #fff !important;
  border-color: var(--navy) !important;
  background: linear-gradient(135deg, var(--navy-2), var(--navy)) !important;
  box-shadow: 0 8px 18px rgba(6, 29, 61, 0.15) !important;
}
.primary:hover { color: #fff !important; border-color: #0b3264 !important; background: linear-gradient(135deg, #0d3569, #071f40) !important; }
.accent { color: var(--navy) !important; border-color: #e6aa35 !important; background: linear-gradient(135deg, #ffc34f, var(--amber)) !important; }
.danger { color: #fff !important; border-color: var(--danger) !important; background: var(--danger) !important; }
.warning { color: #704600 !important; border-color: #efc56d !important; background: #ffedbd !important; }
.ghost-danger { color: var(--danger); border-color: #f0c7cd; background: var(--danger-soft); }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.actions.is-end { justify-content: flex-end; }
details > summary.button { width: fit-content; list-style: none; }
details > summary.button::-webkit-details-marker { display: none; }
details[open] > summary.button { color: var(--navy); border-color: rgba(245, 163, 0, 0.55); background: var(--amber-soft); }

.details { display: grid; grid-template-columns: minmax(110px, 0.38fr) minmax(0, 1fr); gap: 10px 15px; margin: 0; }
.details dt { color: var(--muted); font-size: 11px; font-weight: 650; }
.details dd { min-width: 0; margin: 0; overflow-wrap: anywhere; font-weight: 550; }
.files, .media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.files a, .media-card {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: #fbfcfe;
  font-size: 11px;
  font-weight: 650;
}
.files a:hover, .media-card:hover { border-color: rgba(245, 163, 0, 0.55); background: #fffaf0; }
.evidence-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.evidence-card { min-width: 0; overflow: hidden; border: 1px solid #dce5ee; border-radius: 14px; background: #fff; box-shadow: 0 7px 20px rgba(6, 26, 53, .05); transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease; }
.evidence-card:hover { transform: translateY(-3px); border-color: #bfd2e4; box-shadow: 0 15px 30px rgba(6, 26, 53, .1); }
.evidence-preview { position: relative; height: 178px; display: grid; place-items: center; overflow: hidden; color: inherit; background: linear-gradient(145deg, #f5f8fb, #edf3f8); }
.evidence-preview img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform 240ms ease, filter 240ms ease; }
.evidence-card:hover .evidence-preview img { transform: scale(1.035); filter: brightness(.76); }
.evidence-open { position: absolute; left: 50%; bottom: 12px; min-height: 32px; display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; opacity: 0; border: 1px solid rgba(255, 255, 255, .42); border-radius: 9px; color: #fff; background: rgba(6, 29, 61, .86); box-shadow: 0 7px 18px rgba(6, 26, 53, .22); font-size: 10px; font-weight: 750; white-space: nowrap; transform: translate(-50%, 7px); transition: opacity 180ms ease, transform 180ms ease; backdrop-filter: blur(7px); }
.evidence-card:hover .evidence-open, .evidence-preview:focus-visible .evidence-open { opacity: 1; transform: translate(-50%, 0); }
.evidence-open svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.evidence-meta { min-height: 86px; display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; justify-items: start; gap: 8px; padding: 12px; border-top: 1px solid #e7edf3; }
.evidence-meta > .badge { max-width: none; overflow: visible; flex: none; }
.evidence-meta > div { min-width: 0; display: grid; gap: 3px; }
.evidence-meta strong { overflow: hidden; color: var(--ink); font-size: 11px; text-overflow: ellipsis; text-transform: capitalize; white-space: nowrap; }
.evidence-meta small { overflow: hidden; color: var(--muted); font-size: 9.5px; text-overflow: ellipsis; white-space: nowrap; }
.document-preview-icon { display: grid; place-items: center; gap: 5px; color: #ad3549; }
.document-preview-icon svg { width: 48px; height: 48px; padding: 10px; border: 1px solid #f0cbd1; border-radius: 13px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; background: linear-gradient(145deg, #fff, #ffecef); box-shadow: 0 6px 16px rgba(173, 53, 73, .1); }
.document-preview-icon strong { font-size: 11px; letter-spacing: .08em; }
.document-preview-icon small { color: var(--muted); font-size: 9px; }
.evidence-document-card:hover .document-preview-icon { opacity: .2; }
.evidence-empty { min-height: 249px; border: 1px dashed #d7e1eb; border-radius: 14px; background: linear-gradient(145deg, #fbfcfe, #f4f7fa); }
.list-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-item small { display: block; margin-top: 2px; color: var(--muted); }
.catalog-grid { grid-template-columns: repeat(auto-fit, minmax(min(460px, 100%), 1fr)); align-items: start; }
.catalog-item { border-bottom: 1px solid var(--line); }
.catalog-item:last-of-type { border-bottom: 0; }
.catalog-item > .list-item { border-bottom: 0; }
.catalog-item .actions form { display: inline-flex; }
.inline-editor { padding: 0 0 13px; }
.inline-editor > .inset { padding: 15px; border: 1px solid var(--line); border-radius: 11px; background: #f8fafc; }
.lead-edit-link { white-space: nowrap; }
.lead-edit-link span { color: var(--info); font-size: 15px; line-height: 1; transition: transform 150ms ease; }
.lead-edit-link:hover span { transform: translateX(3px); }
.lead-edit-hero .actions { justify-content: flex-end; }
.lead-save-notice { display: flex; align-items: center; gap: 6px; margin-bottom: 18px; color: #08705d; border-color: #b9e5d7; background: linear-gradient(135deg, #f3fcf9, #e2f7ef); }
.lead-edit-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(310px, .75fr); align-items: start; gap: 20px; }
.lead-edit-main, .lead-edit-sidebar { min-width: 0; }
.lead-edit-sidebar { display: grid; position: sticky; top: 18px; gap: 16px; }
.lead-editor-card { padding: 0; overflow: hidden; }
.lead-editor-card .panel-title { margin: 0; padding: 20px 22px; background: linear-gradient(135deg, #fff, #f6faff); }
.lead-editor-card .panel-title > div { display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 11px; align-items: center; }
.lead-editor-card .panel-title .section-icon { width: 36px; height: 36px; display: grid; grid-row: 1 / 3; place-items: center; border-radius: 10px; color: #1769df; background: #eaf3ff; }
.lead-editor-card .panel-title .section-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.lead-editor-card .panel-title p { grid-column: 2; }
.lead-edit-form { gap: 18px; padding: 22px; }
.lead-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.lead-edit-form label { padding: 14px; border: 1px solid #e3eaf1; border-radius: 12px; background: #fbfcfe; }
.lead-edit-form label:focus-within { border-color: #c5d8ed; background: #fff; box-shadow: 0 8px 20px rgba(6, 26, 53, .045); }
.lead-form-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 2px; }
.lead-summary-card { padding: 0; overflow: hidden; }
.lead-summary-heading { display: flex; align-items: center; gap: 13px; padding: 20px; border-bottom: 1px solid var(--line); background: linear-gradient(135deg, #fffdf6, #f5fbff); }
.lead-summary-heading h2 { margin: 2px 0 1px; font-size: 17px; }
.lead-summary-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.lead-summary-avatar { width: 46px; height: 46px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid #c9e5e1; border-radius: 14px; color: var(--navy); background: linear-gradient(135deg, #fff0bb, #cdf0ec); font-size: 12px; font-weight: 850; }
.lead-details { padding: 20px; }
.lead-details dt, .lead-details dd { padding-bottom: 8px; border-bottom: 1px solid #edf1f5; }
.lead-owner { display: grid; gap: 3px; margin: 0 20px 20px; padding: 14px; border: 1px solid #cfe1f4; border-radius: 11px; background: #f3f8fe; }
.lead-owner span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.lead-owner strong { color: var(--navy); font-size: 12px; }
.lead-owner small { color: var(--muted); font-size: 10px; }
.lead-danger-card { display: grid; gap: 14px; border-color: #f0ced4; background: linear-gradient(135deg, #fff, #fff8f9); }
.lead-danger-card h2 { margin: 5px 0; font-size: 15px; }
.lead-danger-card p { margin: 0; color: var(--muted); font-size: 10.5px; line-height: 1.55; }
.lead-danger-card form, .lead-danger-card button { width: 100%; }
.lead-danger-card .lead-archive-confirm { padding: 10px 11px; border: 1px solid #f0d8dc; border-radius: 10px; color: #7d3b47; background: #fff; font-size: 10px; font-weight: 650; }
.compact-toolbar { margin-bottom: 8px; }
.result-count { margin: 0 0 4px; color: var(--muted); font-size: 10.5px; }
.campaign-creative { min-height: 220px; display: grid; place-items: center; overflow: hidden; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 12px; background: #f6f8fb; }
.campaign-creative img { width: 100%; max-height: 430px; object-fit: contain; }
.target {
  display: grid;
  grid-template-columns: minmax(140px, 0.7fr) minmax(150px, 1.6fr) minmax(90px, 0.45fr);
  align-items: center;
  gap: 15px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.target:last-child { border-bottom: 0; }
.target small { display: block; color: var(--muted); }
.progress { height: 8px; overflow: hidden; border-radius: 999px; background: #edf1f5; }
.progress span { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, var(--teal), #28b4a6); }
.metric-summary-panel { overflow: hidden; }
.metric-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 11px;
}
.metric-summary-grid.compact-grid { grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); margin-bottom: 14px; }
.metric-summary-card {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: linear-gradient(145deg, #fff, #f8fafc);
}
.metric-summary-heading, .metric-summary-footer, .revenue-split-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.metric-summary-heading small, .metric-summary-footer, .revenue-split-row > small { color: var(--muted); font-size: 10.5px; }
.metric-summary-card > strong { display: block; margin: 13px 0 10px; font-size: 19px; letter-spacing: -0.025em; }
.metric-summary-card > strong span { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: 0; }
.metric-summary-footer { margin-top: 8px; }
.metric-summary-footer span:last-child { text-align: right; }

.revenue-split-row { padding: 12px 0; border-bottom: 1px solid var(--line); }
.revenue-split-row:last-child { padding-bottom: 0; border-bottom: 0; }
.revenue-split-heading { margin-bottom: 8px; }
.revenue-split-heading small, .revenue-split-row > small { display: block; margin-top: 2px; }
.revenue-split-heading > strong { white-space: nowrap; }

.date-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-block: 15px;
}
.date-navigation h2 { margin: 0; }
.date-navigation .eyebrow { margin-bottom: 3px; }
.date-navigation-actions, .date-navigation-form { display: flex; align-items: center; gap: 7px; }
.date-navigation-form input {
  min-height: 31px;
  padding: 5px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
}

.activity-feed { display: grid; gap: 0; }
.activity-feed article {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr);
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.activity-feed article:last-child { border-bottom: 0; }
.activity-feed p { margin: 0 0 4px; overflow-wrap: anywhere; }
.activity-feed small { color: var(--muted); }
.activity-marker { width: 8px; height: 8px; margin-top: 7px; border-radius: 99px; background: var(--teal); box-shadow: 0 0 0 4px var(--teal-soft); }

.tracking-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.tracking-grid article { min-width: 0; display: flex; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcfe; }
.tracking-grid p { margin: 3px 0; color: var(--muted); }
.map-pin { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; color: var(--navy); background: var(--amber-soft); font-size: 16px; }
.tracking-filters label:nth-of-type(3) { min-width: min(260px, 100%); }
.tracking-map-panel { overflow: hidden; padding-bottom: 0; }
.tracking-map-heading { padding-bottom: 3px; }
.tracking-map-frame {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  margin: 0 -20px;
  border-block: 1px solid var(--line);
  background: #edf2f7;
}
.tracking-map-frame iframe { width: 100%; height: clamp(360px, 48vw, 560px); display: block; border: 0; }
.map-attribution { display: block; margin-top: 8px; color: var(--muted); font-size: 9.5px; text-align: right; }
.tracking-map-meta {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 15px 0 18px;
}
.tracking-map-meta strong, .tracking-map-meta small { display: block; overflow-wrap: anywhere; }
.tracking-map-meta small { margin-top: 3px; color: var(--muted); }

.timeline { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.timeline li { position: relative; min-height: 56px; display: grid; grid-template-columns: 18px 1fr auto; gap: 10px; padding: 0 0 14px; }
.timeline li::before { width: 9px; height: 9px; margin-top: 5px; content: ""; border: 2px solid #fff; border-radius: 99px; background: var(--teal); box-shadow: 0 0 0 2px #a9ddd7; }
.timeline li:not(:last-child)::after { position: absolute; width: 1px; left: 4px; top: 18px; bottom: 3px; content: ""; background: var(--line); }
.timeline small { color: var(--muted); }
.quick-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.quick-action {
  min-height: 92px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: linear-gradient(145deg, #fff, #f8fafc);
  font-size: 11px;
  font-weight: 700;
}
.quick-action:hover { color: var(--navy); border-color: rgba(245, 163, 0, 0.5); background: #fffaf0; }
.chart-bars { min-height: 180px; display: flex; align-items: end; gap: 8px; padding: 18px 4px 4px; border-bottom: 1px solid var(--line); }
.chart-bar { min-width: 18px; flex: 1; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #1b6aaf, var(--navy)); box-shadow: inset 0 1px rgba(255, 255, 255, 0.25); }
.chart-bar:nth-child(2n) { background: linear-gradient(180deg, #ffc04a, var(--amber)); }

.person-heading { min-width: 0; display: flex; align-items: center; gap: 14px; }
.person-avatar {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid rgba(245, 163, 0, 0.4);
  border-radius: 17px;
  color: var(--navy);
  background: linear-gradient(145deg, #fff1bd, #d7f1f0);
  box-shadow: var(--shadow-sm);
  font-size: 15px;
  font-weight: 850;
}
.person-avatar img { width: 100%; height: 100%; object-fit: cover; }
.person-heading h2 { overflow-wrap: anywhere; }
.person-detail-grid { align-items: start; }
.person-detail-grid > aside { position: sticky; top: 16px; }
.team-leader-detail-layout { grid-template-columns: minmax(0, 1fr); }
.team-leader-detail-layout > aside { display: grid; position: static; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.team-leader-detail-layout > div,
.team-leader-detail-layout > aside { min-width: 0; }
.team-leader-detail-layout > div > .panel,
.team-leader-detail-layout > aside > .panel { margin-bottom: 0; }
.team-leader-detail-layout #edit-profile .form { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
.team-leader-detail-layout #edit-profile .form > .form-grid,
.team-leader-detail-layout #edit-profile .form > button,
.team-leader-detail-layout #edit-profile .form > .notice { grid-column: 1 / -1; }
.team-leader-detail-layout #edit-profile .form > button { width: fit-content; min-width: 190px; justify-self: end; }
.team-leader-detail-layout > aside > .is-highlighted .details { grid-template-columns: repeat(4, minmax(90px, .42fr) minmax(130px, 1fr)); align-items: baseline; }
.team-leader-detail-layout > aside > .is-highlighted .details dt,
.team-leader-detail-layout > aside > .is-highlighted .details dd { padding: 8px 0; border-bottom: 1px solid #edf1f5; }
.team-leader-detail-layout #permissions .permission-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.team-leader-detail-layout #permissions .form > button,
.team-leader-detail-layout .danger-zone form > button { width: fit-content; min-width: 210px; justify-self: end; }
.team-leader-detail-layout .danger-zone form { max-width: none; }
.team-leader-detail-layout .danger-zone .check { width: 100%; padding: 12px 14px; border: 1px solid #f0d2d7; border-radius: 11px; background: rgba(255, 255, 255, .78); }
.stat-status-text { font-size: clamp(16px, 1.9vw, 22px) !important; letter-spacing: -0.02em !important; overflow-wrap: anywhere; }
.mini-heading { display: block; margin-bottom: 9px; font-size: 11px; }
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.table-note { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.danger-zone { border-color: #f0cdd2; background: linear-gradient(145deg, #fff, #fff7f8); }
.danger-zone .check { align-items: flex-start; color: #7e3540; font-weight: 600; }
.danger-zone .check input { margin-top: 2px; }

.empty { width: 100%; padding: 32px 18px !important; color: var(--muted) !important; text-align: center !important; }
.empty-state { min-height: 180px; display: grid; place-items: center; padding: 28px; color: var(--muted); text-align: center; }
.empty-state.compact { min-height: 104px; padding: 18px; }
.empty-state strong { display: block; margin-bottom: 4px; }
.alert { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 14px; padding: 10px 12px; border: 1px solid #f0cdd2; border-radius: 9px; color: #9e2f40; background: var(--danger-soft); }
.notice { padding: 11px 13px; border: 1px solid #cfe3f4; border-radius: 9px; color: #185b91; background: var(--info-soft); font-size: 11px; }
code { padding: 2px 5px; border-radius: 5px; color: #21405e; background: #edf2f7; font-size: 0.9em; }

.auth-page:not(.login-page) {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at top left, rgba(245, 163, 0, 0.16), transparent 32%),
    radial-gradient(circle at bottom right, rgba(7, 42, 82, 0.12), transparent 34%), var(--canvas);
}
.auth-page:not(.login-page) .auth-card {
  width: min(430px, 100%);
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-md);
  text-align: center;
}

@media (max-width: 1120px) {
  .three-grid, .dashboard-grid { grid-template-columns: 1fr; }
  .team-leader-detail-layout > aside > .is-highlighted .details { grid-template-columns: repeat(2, minmax(90px, .42fr) minmax(130px, 1fr)); }
}
@media (max-width: 900px) {
  .lead-edit-layout { grid-template-columns: 1fr; }
  .lead-edit-sidebar { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid, .two-grid, .performance-grid { grid-template-columns: 1fr; }
  .person-detail-grid > aside { position: static; }
}
@media (max-width: 700px) {
  .team-leader-detail-layout #edit-profile .form,
  .team-leader-detail-layout #permissions .permission-grid { grid-template-columns: 1fr; }
  .team-leader-detail-layout > aside > .is-highlighted .details { grid-template-columns: minmax(90px, .42fr) minmax(0, 1fr); }
  .team-leader-detail-layout #edit-profile .form > button,
  .team-leader-detail-layout #permissions .form > button,
  .team-leader-detail-layout .danger-zone form > button { width: 100%; min-width: 0; justify-self: stretch; }
  .evidence-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lead-field-grid, .lead-edit-sidebar { grid-template-columns: 1fr; }
  .lead-form-actions { flex-direction: column-reverse; }
  .lead-form-actions > * { width: 100%; }
  .page-intro, .panel-title, .section-heading, .toolbar { align-items: stretch; flex-direction: column; }
  .page-intro h2 { font-size: 21px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stats article, .metric-card, .panel { padding: 15px; }
  .form-grid { grid-template-columns: 1fr; }
  .target { grid-template-columns: 1fr; gap: 7px; }
  .quick-actions { grid-template-columns: 1fr; }
  .details { grid-template-columns: 1fr; gap: 3px; }
  .details dd { margin-bottom: 9px; }
  .toolbar-form > *, .filters > * { width: 100%; }
  .date-navigation { align-items: stretch; flex-direction: column; }
  .date-navigation-actions { align-items: stretch; flex-wrap: wrap; }
  .date-navigation-form { flex: 1 1 100%; }
  .date-navigation-form input { min-width: 0; flex: 1; }
  .metric-summary-grid, .metric-summary-grid.compact-grid { grid-template-columns: 1fr; }
  .person-header .actions { width: 100%; }
  .tracking-map-frame { min-height: 300px; margin-inline: -15px; }
  .tracking-map-frame iframe { height: 320px; }
  .tracking-map-meta { grid-template-columns: auto minmax(0, 1fr); }
  .tracking-map-meta > .actions { grid-column: 1 / -1; }
}
@media (max-width: 430px) {
  .evidence-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .actions > button, .actions > .button { flex: 1; }
}
@media print {
  :root { --canvas: #fff; }
  .sidebar, .toolbar, .actions, .quick-actions, button { display: none !important; }
  .shell { display: block; }
  .panel, .stats article { break-inside: avoid; box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
