/* Browser presentation and responsive layouts. */
:root {
  --ink: #232323;
  --ink-soft: #57524a;
  --muted: #8a857c;
  --line: #e6e0d6;
  --line-soft: #f0ebe3;
  --paper: #ffffff;
  --canvas: #f5f3f0;
  --forest: #382410;
  --forest-2: #5c3d1e;
  --forest-pale: #f6eedd;
  --lime: #cca65b;
  --gold: #cca65b;
  --gold-dark: #b08a3e;
  --brown: #382410;
  --amber: #c77824;
  --amber-pale: #fff2df;
  --red: #b94c45;
  --red-pale: #fcebea;
  --blue: #3b6f84;
  --blue-pale: #e9f2f5;
  --shadow-sm: 0 1px 2px rgba(35, 27, 18, 0.04), 0 5px 18px rgba(35, 27, 18, 0.04);
  --shadow-md: 0 16px 40px rgba(35, 27, 18, 0.12);
  --radius-sm: 6px;
  --radius: 10px;
  --sidebar: 252px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--canvas);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: "Montserrat", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  padding: 26px 18px 18px;
  color: #f5f2ee;
  background:
    radial-gradient(circle at 12% 8%, rgba(210, 176, 108, 0.11), transparent 28%),
    linear-gradient(180deg, #3e2b16 0%, #2e2010 100%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 31px;
}

.primary-nav {
  display: grid;
  gap: 7px;
}

.nav-item {
  width: 100%;
  height: 46px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 13px;
  border: 0;
  border-radius: 11px;
  color: rgba(245, 242, 238, 0.72);
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: 160ms ease;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.nav-item.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.11);
  box-shadow: inset 3px 0 var(--lime);
}

.nav-icon,
.nav-icon svg,
[data-icon] svg {
  width: 20px;
  height: 20px;
  display: inline-block;
}

[data-icon] svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-count {
  min-width: 23px;
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 20px;
  color: #e7e0d9;
  background: rgba(255, 255, 255, 0.09);
  font-size: 11px;
  text-align: center;
}

.sidebar-bottom {
  margin-top: auto;
}

.demo-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.05);
}

.demo-dot,
.live-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 4px rgba(210, 176, 108, 0.12);
}

.demo-card strong,
.demo-card span {
  display: block;
}

.demo-card strong {
  font-size: 12px;
}

.demo-card span {
  margin-top: 3px;
  color: rgba(245, 242, 238, 0.55);
  font-size: 10px;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 8px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.avatar {
  width: 34px;
  height: 34px;
  display: grid;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 50%;
  color: #3e2c18;
  background: #e9d8b5;
  font-size: 11px;
  font-weight: 800;
}

.user-card strong,
.user-card span {
  display: block;
}

.user-card strong {
  font-size: 11px;
}

.user-card span {
  margin-top: 2px;
  color: rgba(245, 242, 238, 0.5);
  font-size: 9px;
}

.user-card .icon-button {
  margin-left: auto;
  color: rgba(255, 255, 255, 0.65);
}

.main-content {
  min-height: 100vh;
  margin-left: var(--sidebar);
}

.topbar {
  height: 94px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 36px;
  border-bottom: 1px solid var(--line);
  background: rgba(244, 246, 243, 0.92);
  backdrop-filter: blur(12px);
}

.topbar-title h1 {
  margin: 2px 0 0;
  font-family: "Mulish", sans-serif;
  font-size: 24px;
  letter-spacing: -0.035em;
}

.eyebrow {
  color: var(--forest-2);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.as-of {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.as-of .live-dot {
  margin: 0;
  background: #70a35e;
}

.icon-button {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  cursor: pointer;
}

.icon-button:hover {
  border-color: #d3cec9;
  background: #fcfbfa;
}

.icon-button.subtle {
  border: 0;
  background: transparent;
}

.icon-button [data-icon],
.icon-button [data-icon] svg {
  width: 18px;
  height: 18px;
}

.notification-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 5px;
  height: 5px;
  border: 1px solid #fff;
  border-radius: 50%;
  background: var(--amber);
}

.mobile-menu {
  display: none;
}

.view-container {
  max-width: 1500px;
  margin: 0 auto;
  padding: 30px 36px 48px;
}

.section-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.section-intro h2,
.panel-heading h2,
.panel-heading h3 {
  margin: 0;
  font-family: "Mulish", sans-serif;
  letter-spacing: -0.03em;
}

.section-intro h2 {
  font-size: 20px;
}

.section-intro p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.metric-card {
  position: relative;
  min-height: 142px;
  overflow: hidden;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.metric-card.highlight {
  color: white;
  border-color: transparent;
  background: linear-gradient(145deg, var(--forest-2), var(--forest));
}

.metric-card.highlight::after {
  position: absolute;
  right: -22px;
  bottom: -45px;
  width: 120px;
  height: 120px;
  border: 22px solid rgba(210, 176, 108, 0.15);
  border-radius: 50%;
  content: "";
}

.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.metric-card.highlight .metric-top {
  color: rgba(255, 255, 255, 0.7);
}

.metric-icon {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--forest-2);
  background: var(--forest-pale);
}

.metric-card.highlight .metric-icon {
  color: var(--lime);
  background: rgba(255, 255, 255, 0.1);
}

.metric-value {
  margin-top: 15px;
  font-family: "Mulish", sans-serif;
  font-size: 31px;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.metric-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.metric-card.highlight .metric-foot {
  color: rgba(255, 255, 255, 0.62);
}

.metric-accent {
  color: var(--forest-2);
  font-weight: 700;
}

.metric-card.highlight .metric-accent {
  color: var(--lime);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.8fr);
  gap: 18px;
  align-items: start;
}

.dashboard-stack {
  display: grid;
  gap: 18px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.panel-heading {
  min-height: 67px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 19px;
  border-bottom: 1px solid var(--line-soft);
}

.panel-heading h2,
.panel-heading h3 {
  font-size: 15px;
}

.panel-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 0;
  border: 0;
  color: var(--forest-2);
  background: none;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.text-button:hover {
  color: var(--forest);
}

.queue-list,
.appointment-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.queue-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 19px;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
  transition: background 140ms ease;
}

.queue-item:last-child {
  border-bottom: 0;
}

.queue-item:hover {
  background: #fcfbfa;
}

.claim-avatar {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--forest);
  background: var(--forest-pale);
  font-size: 11px;
  font-weight: 800;
}

.queue-main strong,
.queue-main span {
  display: block;
}

.queue-main strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-main span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.queue-meta {
  min-width: 116px;
  text-align: right;
}

.queue-meta > span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
}

.status-pill,
.attention-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill::before,
.attention-pill::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status-new { color: #806020; background: #fbf2d9; }
.status-contacted { color: #62653a; background: #f1f3df; }
.status-inspection-scheduled { color: #315f73; background: var(--blue-pale); }
.status-inspected { color: #65548c; background: #f0ecf8; }
.status-atr-sent { color: #995e27; background: var(--amber-pale); }
.status-atr-signed { color: #3f6e61; background: #e7f1ed; }
.status-cos-sent { color: #9b5c52; background: #f8ece9; }
.status-complete { color: #477339; background: #e9f3e5; }

/* Run logs page. */
.run-success { color: #477339; background: #e9f3e5; }
.run-warning { color: #995e27; background: var(--amber-pale); }
.run-error { color: var(--red); background: var(--red-pale); }
.run-running { color: #315f73; background: var(--blue-pale); }
.run-count { padding: 0; background: none; font-weight: 700; }
.claims-table.run-table { min-width: 760px; }
.run-toolbar .filter-group { flex-wrap: wrap; min-width: 0; }
.run-toolbar #runScenario { width: 320px; max-width: 100%; }
.run-toolbar #runRefresh { flex: 0 0 auto; }
.run-table td { vertical-align: middle; }
.run-table tbody tr.run-row { cursor: pointer; }
.run-table tbody tr.run-row.open { background: #faf9f7; }
.run-table tbody tr.run-detail { cursor: default; }
.run-table tbody tr.run-detail:hover { background: transparent; }
.run-table .run-actions { white-space: nowrap; text-align: right; }
.run-table .run-actions .text-button { display: inline-flex; margin-left: 8px; text-decoration: none; }
.run-table tbody tr.run-detail td {
  padding-top: 4px;
  padding-bottom: 18px;
  color: var(--ink-soft);
  background: #faf9f7;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.run-detail-panel { display: grid; gap: 12px; }
.run-error-box {
  padding: 10px 12px;
  border: 1px solid #f0cfcc;
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: var(--red-pale);
}
.run-detail:not(.failed) .run-error-box { border-color: #f1dcbc; background: var(--amber-pale); }
.run-error-box > strong { display: block; margin-bottom: 2px; color: var(--red); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
.run-detail:not(.failed) .run-error-box > strong { color: var(--amber); }
.run-error-box p { margin: 0; }
.run-error-meaning,
.run-error-fix,
.run-error-technical { display: block; }
.run-error-meaning { color: var(--ink); font-weight: 600; }
.run-error-fix { margin-top: 4px; }
.run-error-technical { margin-top: 6px; color: var(--muted); font-size: 11px; }
.run-facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px 18px;
  margin: 0;
}
.run-facts dt { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.run-facts dd { margin: 2px 0 0; color: var(--ink); font-weight: 600; }
.run-make-note { margin: 0; color: var(--muted); font-size: 11px; }
.run-steps { display: grid; gap: 6px; }
.run-steps-title { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.run-steps-note { margin: 0; color: var(--muted); font-size: 11px; }
.run-step-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.run-step,
.run-step-branch { margin-left: calc(var(--depth, 0) * 18px); }
.run-step {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
}
.run-step b {
  display: grid;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: #6e9a5f;
  font-size: 10px;
}
.run-step.warning b { background: var(--amber); }
.run-step.error { border-color: #f0cfcc; background: var(--red-pale); }
.run-step.error b { background: var(--red); }
.run-step-name { color: var(--ink); font-weight: 700; }
.run-step-app { color: var(--muted); font-size: 11px; }
.run-step-bundles { color: var(--ink-soft); font-size: 11px; font-weight: 600; }
.run-step-flag { margin-left: auto; color: var(--red); font-size: 11px; font-weight: 700; }
.run-step-flag.unknown { color: var(--muted); }
.run-step.unknown b { background: var(--muted); }
.run-step-branch { padding: 4px 2px 0; color: var(--gold-dark); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.run-make-note a { color: var(--gold-dark); font-weight: 700; }

.stage-bars {
  display: grid;
  gap: 17px;
  padding: 18px 20px 22px;
}

.stage-row {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr) 26px;
  align-items: center;
  gap: 10px;
  font-size: 10px;
}

.stage-row strong {
  text-align: right;
}

.bar-track {
  height: 7px;
  overflow: hidden;
  border-radius: 10px;
  background: #f1efed;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--forest-2);
}

.appointment-item {
  display: grid;
  grid-template-columns: 49px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
}

.appointment-item:last-child {
  border-bottom: 0;
}

.date-tile {
  display: grid;
  place-items: center;
  min-height: 49px;
  border-radius: 10px;
  color: var(--forest);
  background: var(--forest-pale);
}

.date-tile strong,
.date-tile span {
  display: block;
  text-align: center;
}

.date-tile strong {
  font-family: "Mulish", sans-serif;
  font-size: 17px;
  line-height: 1;
}

.date-tile span {
  margin-top: 3px;
  font-size: 8px;
  font-weight: 800;
}

.appointment-copy strong,
.appointment-copy span {
  display: block;
}

.appointment-copy strong {
  font-size: 11px;
}

.appointment-copy span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.claims-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.claims-intro {
  margin-bottom: 22px;
}

.claims-intro h2 {
  font-size: 30px;
  line-height: 1.15;
}

.claims-intro p {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.5;
}

.claims-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.claims-stat {
  min-height: 118px;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.claims-stat.needs-attention {
  border-color: #ead3bd;
  background: linear-gradient(135deg, #fffdf9, var(--amber-pale));
}

.claims-stat-icon {
  width: 44px;
  height: 44px;
  display: grid;
  flex: 0 0 44px;
  place-items: center;
  border-radius: 12px;
  color: var(--forest);
  background: var(--forest-pale);
}

.claims-stat-icon.active {
  color: var(--blue);
  background: var(--blue-pale);
}

.claims-stat-icon.attention {
  color: var(--amber);
  background: var(--amber-pale);
}

.claims-stat-icon svg {
  width: 21px;
  height: 21px;
}

.claims-stat-copy > span,
.claims-stat-copy strong,
.claims-stat-copy small {
  display: block;
}

.claims-stat-copy > span {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.claims-stat-copy strong {
  margin-top: 3px;
  color: var(--ink);
  font-family: "Mulish", sans-serif;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.claims-stat-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.search-wrap {
  position: relative;
  width: min(500px, 100%);
}

.search-wrap > span {
  position: absolute;
  top: 50%;
  left: 13px;
  width: 17px;
  height: 17px;
  transform: translateY(-50%);
  color: var(--muted);
}

.search-wrap input {
  width: 100%;
  height: 48px;
  padding: 0 42px 0 43px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
}

.search-wrap input::placeholder {
  color: var(--muted);
}

.search-wrap input:focus,
.filter-select:focus {
  border-color: #aa9883;
  box-shadow: 0 0 0 3px rgba(105, 73, 36, 0.09);
}

.clear-search {
  position: absolute;
  top: 50%;
  right: 9px;
  width: 24px;
  height: 24px;
  display: none;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: #f1efed;
  cursor: pointer;
  transform: translateY(-50%);
}

.clear-search.visible {
  display: grid;
}

.filter-group {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.filter-select {
  min-width: 150px;
  height: 48px;
  padding: 0 36px 0 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: 0;
  color: var(--ink-soft);
  background: var(--paper);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.exclusion-filter {
  position: relative;
  min-width: 132px;
}

.exclusion-summary {
  min-width: 132px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink-soft);
  background: var(--paper);
  font-size: 13px;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.exclusion-summary::-webkit-details-marker {
  display: none;
}

.exclusion-summary > [data-icon] {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.exclusion-summary strong {
  min-width: 21px;
  height: 21px;
  display: inline-grid;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  color: #fff;
  background: var(--forest-2);
  font-size: 10px;
}

.exclusion-summary:focus-visible,
.exclusion-filter[open] .exclusion-summary {
  border-color: #aa9883;
  box-shadow: 0 0 0 3px rgba(105, 73, 36, 0.09);
  outline: 0;
}

.exclusion-menu {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 30;
  width: min(430px, calc(100vw - 40px));
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: var(--shadow-md);
}

.exclusion-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line-soft);
}

.exclusion-heading strong,
.exclusion-heading span {
  display: block;
}

.exclusion-heading strong {
  color: var(--ink);
  font-size: 14px;
}

.exclusion-heading span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.exclusion-clear {
  flex: 0 0 auto;
  padding-top: 1px;
}

.exclusion-section {
  margin: 0;
  padding: 15px 0 0;
  border: 0;
}

.exclusion-section + .exclusion-section {
  margin-top: 15px;
  border-top: 1px solid var(--line-soft);
}

.exclusion-section legend,
.exclusion-section > label {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.exclusion-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.exclusion-option {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  color: var(--ink-soft);
  background: #fcfcfb;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.exclusion-option:has(input:checked) {
  border-color: #d1c6b9;
  color: var(--forest);
  background: var(--forest-pale);
}

.exclusion-option input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--forest-2);
}

.exclusion-claim-select {
  width: 100%;
  margin-top: 9px;
}

.exclusion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.exclusion-chip {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px 5px 10px;
  border: 1px solid #d1c6b9;
  border-radius: 999px;
  color: var(--forest);
  background: var(--forest-pale);
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.exclusion-chip [data-icon] {
  width: 13px;
  height: 13px;
}

.exclusion-empty {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.claims-panel {
  overflow: hidden;
}

.table-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 13px;
}

.table-summary strong {
  color: var(--ink);
  font-size: 14px;
}

.table-source {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.table-source i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--forest-2);
  box-shadow: 0 0 0 3px var(--forest-pale);
}

.table-scroll {
  overflow-x: auto;
}

.claims-table {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
  table-layout: fixed;
}

.claims-table th {
  height: 50px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
  background: #fafbf9;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-align: left;
  text-transform: uppercase;
}

.claims-table th.sortable {
  cursor: pointer;
  user-select: none;
}

.claims-table th.sortable:hover {
  color: var(--forest-2);
}

.sort-indicator {
  margin-left: 4px;
  color: var(--forest-2);
}

.claims-table td {
  height: 78px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.4;
  vertical-align: middle;
}

.claims-table tbody tr {
  cursor: pointer;
  transition: background 120ms ease;
}

.claims-table tbody tr:hover {
  background: #faf9f7;
}

.claims-table tbody tr:focus-visible {
  outline: 0;
  background: #f9f7f4;
  box-shadow: inset 3px 0 0 var(--forest-2);
}

.claims-table tbody tr:last-child td {
  border-bottom: 0;
}

.claims-table .claim-number {
  display: block;
  color: var(--forest-2);
  font-size: 14px;
  font-weight: 800;
}

.claim-platform {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.person-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.person-cell .claim-avatar {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 11px;
  font-size: 11px;
}

.person-cell strong,
.person-cell span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-cell strong {
  color: var(--ink);
  font-size: 14px;
}

.person-cell span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.property-cell strong,
.property-cell span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.property-cell strong {
  color: var(--ink);
  font-size: 14px;
}

.property-cell span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.assigned-date {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
}

.attention-cell {
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
}

.attention-cell.clear {
  color: var(--muted);
  font-weight: 400;
}

.empty-state {
  padding: 58px 20px;
  text-align: center;
}

.empty-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin: 0 auto 13px;
  border-radius: 14px;
  color: var(--forest-2);
  background: var(--forest-pale);
}

.empty-state h3 {
  margin: 0;
  font-family: "Mulish", sans-serif;
  font-size: 18px;
}

.empty-state p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.claim-back {
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 700;
}

.claim-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 20px;
  padding: 27px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-sm), inset 4px 0 0 var(--forest-2);
}

.claim-identity {
  min-width: 0;
}

.claim-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 14px;
}

.claim-title-row h2 {
  margin: 0;
  font-family: "Mulish", sans-serif;
  font-size: 30px;
  line-height: 1.18;
  letter-spacing: -0.04em;
}

.claim-hero p {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 20px;
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.45;
}

.claim-hero p span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.claim-hero p [data-icon],
.claim-hero p [data-icon] svg {
  width: 16px;
  height: 16px;
}

.claim-hero-side {
  min-width: 250px;
  text-align: right;
}

.claim-number-label,
.claim-hero-number {
  display: block;
}

.claim-number-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.claim-hero-number {
  margin-top: 5px;
  color: var(--forest);
  font-family: "Mulish", sans-serif;
  font-size: 18px;
  line-height: 1.25;
}

.claim-reference {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.attention-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 15px 17px;
  border: 1px solid #ecd4b8;
  border-radius: 12px;
  color: #7c4f20;
  background: var(--amber-pale);
  font-size: 13px;
  line-height: 1.45;
}

.attention-banner.critical {
  border-color: #efcfcc;
  color: #8e403b;
  background: var(--red-pale);
}

.attention-banner [data-icon],
.attention-banner [data-icon] svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.claim-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.72fr);
  gap: 20px;
  align-items: start;
}

.claim-main,
.claim-aside {
  display: grid;
  gap: 20px;
}

.claim-layout .panel-heading {
  min-height: 76px;
  padding: 18px 20px;
}

.claim-layout .panel-heading h3 {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.3;
}

.claim-layout .panel-heading p {
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.4;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
}

.detail-item {
  min-height: 94px;
  padding: 20px;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.detail-item:nth-child(2n) {
  border-right: 0;
}

.detail-item:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.detail-item label,
.detail-item strong,
.detail-item a {
  display: block;
}

.detail-item label {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.detail-item strong,
.detail-item a {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}

.detail-item a {
  color: var(--forest-2);
  text-decoration: none;
}

.notes-copy {
  margin: 0;
  padding: 21px 22px 23px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.7;
}

.timeline {
  padding: 21px 20px 23px;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  gap: 11px;
  padding-bottom: 20px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item:not(:last-child)::before {
  position: absolute;
  top: 19px;
  bottom: 0;
  left: 8px;
  width: 1px;
  background: var(--line);
  content: "";
}

.timeline-dot {
  position: relative;
  z-index: 1;
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  margin-top: 1px;
  border: 1px solid #ddd8d3;
  border-radius: 50%;
  color: transparent;
  background: var(--paper);
}

.timeline-item.done .timeline-dot {
  border-color: var(--forest-2);
  color: white;
  background: var(--forest-2);
}

.timeline-item.current .timeline-dot {
  border: 4px solid #e8e1d9;
  background: var(--forest-2);
}

.timeline-copy strong,
.timeline-copy span {
  display: block;
}

.timeline-copy strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
}

.timeline-copy span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.timeline-item.pending .timeline-copy strong {
  color: var(--muted);
}

.reference-list {
  padding: 5px 20px 8px;
}

.reference-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  padding: 15px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12px;
  line-height: 1.45;
}

.reference-row:last-child {
  border-bottom: 0;
}

.reference-row span {
  color: var(--muted);
}

.reference-row strong {
  max-width: 60%;
  overflow-wrap: anywhere;
  text-align: right;
  color: var(--ink);
  font-size: 13px;
}

.coming-soon {
  padding: 20px;
}

.coming-soon p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.future-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.future-action {
  min-height: 64px;
  padding: 10px;
  border: 1px dashed #ddd9d4;
  border-radius: 10px;
  color: #928c86;
  background: #fafbf9;
  font-size: 11px;
  line-height: 1.35;
  cursor: not-allowed;
}

.future-action span {
  display: block;
  margin: 0 auto 5px;
}

.future-action span,
.future-action span svg {
  width: 17px;
  height: 17px;
}

.automation-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  overflow: hidden;
  margin-bottom: 18px;
  padding: 31px 32px;
  border-radius: var(--radius);
  color: white;
  background:
    radial-gradient(circle at 88% 20%, rgba(210, 176, 108, 0.22), transparent 25%),
    linear-gradient(135deg, #694924 0%, #3e2b16 58%, #2e2010 100%);
  box-shadow: var(--shadow-sm);
  max-width: 100%;
}

.automation-hero::after {
  position: absolute;
  right: -72px;
  bottom: -112px;
  width: 240px;
  height: 240px;
  border: 34px solid rgba(255, 255, 255, 0.045);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.automation-hero-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
  max-width: 760px;
}

.automation-kicker {
  display: block;
  margin-bottom: 9px;
  color: var(--lime);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.automation-hero h2 {
  margin: 0;
  font-family: "Mulish", sans-serif;
  font-size: 30px;
  line-height: 1.16;
  letter-spacing: -0.04em;
}

.automation-hero-copy p {
  max-width: 720px;
  margin: 11px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.automation-hero-note {
  position: relative;
  z-index: 1;
  width: 280px;
  flex: 0 0 280px;
  padding: 15px 17px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.075);
  max-width: 100%;
  min-width: 0;
}

.automation-hero-note strong,
.automation-hero-note span {
  display: block;
}

.automation-hero-note strong {
  color: #fff;
  font-size: 12px;
}

.automation-hero-note span {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.automation-title-block {
  min-width: 0;
}

.automation-labels {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 9px;
}

.automation-reference,
.automation-category {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--muted);
  background: #f4f3f1;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.automation-reference {
  color: var(--forest-2);
  background: var(--forest-pale);
}

.automation-title-block > p {
  max-width: 900px;
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.automation-status {
  min-height: 29px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: #f7f6f5;
  font-size: 10px;
  font-weight: 800;
}

.automation-status-available {
  border-color: #d8ccbf;
  color: var(--forest);
  background: var(--forest-pale);
}

.automation-status-partial {
  border-color: #ebcea9;
  color: #89551d;
  background: var(--amber-pale);
}

.automation-status-planned {
  border-color: #c8dbe2;
  color: #315e70;
  background: var(--blue-pale);
}

.automation-status-test {
  border-color: #d9d1e2;
  color: #625375;
  background: #f3eff7;
}

.automation-meta-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(310px, 1.25fr);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: #fafbf9;
}

.automation-meta-item {
  min-width: 0;
  padding: 17px 20px;
  border-right: 1px solid var(--line-soft);
}

.automation-meta-item:last-child {
  border-right: 0;
}

.automation-meta-item > span,
.automation-meta-item > strong {
  display: block;
}

.automation-meta-item > span {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.automation-meta-item > strong {
  overflow-wrap: anywhere;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
}

.automation-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.automation-tools span {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 8px;
  border: 1px solid #e3dfdb;
  border-radius: 999px;
  color: var(--ink-soft);
  background: white;
  font-size: 10px;
  font-weight: 700;
}

.automation-outcome h4 {
  margin: 0;
  color: var(--ink);
  font-family: "Mulish", sans-serif;
  font-size: 13px;
  letter-spacing: -0.015em;
}

.automation-outcomes {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.automation-outcome {
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 10px;
  background: white;
}

.automation-outcome.success {
  border-left-color: var(--forest-2);
}

.automation-outcome.failure {
  border-left-color: var(--amber);
}

.automation-outcome p {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.6;
}

.automation-empty {
  min-height: 250px;
}

.automation-library-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 27px 2px 13px;
}

.automation-library-heading div > span,
.automation-aside-kicker {
  display: block;
  color: var(--forest-2);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.automation-library-heading h3 {
  margin: 5px 0 0;
  font-family: "Mulish", sans-serif;
  font-size: 19px;
  letter-spacing: -0.025em;
}

.automation-library-heading > span {
  color: var(--muted);
  font-size: 11px;
}

.automation-index-card + .automation-index-card {
  margin-top: 16px;
}

.automation-index-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: 0;
  color: inherit;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.automation-index-card:hover {
  border-color: #c5b8a9;
  box-shadow: 0 12px 30px rgba(51, 37, 20, 0.1);
  transform: translateY(-2px);
}

.automation-index-card:focus-visible {
  border-color: var(--forest-2);
  box-shadow: 0 0 0 4px rgba(105, 73, 36, 0.14), var(--shadow-sm);
}

.automation-index-header,
.automation-document-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  padding: 26px 28px 23px;
}

.automation-index-card h3,
.automation-document-header h2 {
  margin: 0;
  font-family: "Mulish", sans-serif;
  line-height: 1.24;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}

.automation-index-card h3 {
  font-size: 23px;
}

.automation-index-footer {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 24px 14px 28px;
  border-top: 1px solid var(--line-soft);
  color: var(--forest-2);
  background: #fdfdfc;
}

.automation-index-footer > span:first-child,
.automation-index-footer strong,
.automation-index-footer small {
  display: block;
}

.automation-index-footer strong {
  font-size: 13px;
}

.automation-index-footer small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.automation-index-arrow,
.automation-index-arrow svg {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
}

.automation-index-arrow {
  transition: transform 160ms ease;
}

.automation-index-card:hover .automation-index-arrow {
  transform: translateX(4px);
}

.automation-document-shell {
  width: 100%;
  max-width: 1260px;
  margin: 0 auto;
}

.automation-back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 16px;
  padding: 7px 3px;
  border-radius: 7px;
  color: var(--forest-2);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.automation-back-link:hover {
  color: var(--forest);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.automation-back-link:focus-visible {
  outline: 3px solid rgba(105, 73, 36, 0.18);
  outline-offset: 2px;
}

.automation-back-link span,
.automation-back-link svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
}

.automation-document {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.automation-document-header {
  padding: 32px 34px 28px;
}

.automation-document-header h2 {
  font-size: 30px;
}

.automation-document-header .automation-title-block > p {
  max-width: 800px;
  margin-top: 11px;
  font-size: 15px;
}

.automation-document-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 38px;
  align-items: start;
  padding: 36px 34px 40px;
}

.automation-document-main {
  min-width: 0;
}

.automation-document-section {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 15px;
  padding: 0 0 34px;
  border-bottom: 1px solid var(--line-soft);
}

.automation-document-section + .automation-document-section {
  padding-top: 34px;
}

.automation-document-section:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.automation-section-number {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid #e0d8cf;
  border-radius: 50%;
  color: var(--forest-2);
  background: var(--forest-pale);
  font-family: "Mulish", sans-serif;
  font-size: 10px;
  font-weight: 800;
}

.automation-document-section h3 {
  margin: 3px 0 0;
  font-family: "Mulish", sans-serif;
  font-size: 20px;
  letter-spacing: -0.025em;
}

.automation-document-section > div > p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.automation-document-section ul {
  margin: 15px 0 0;
  padding-left: 20px;
}

.automation-document-section ul li {
  padding-left: 3px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.65;
}

.automation-document-section ul li + li {
  margin-top: 8px;
}

.automation-document-steps {
  display: grid;
  gap: 9px;
  margin: 17px 0 0;
  padding: 0;
  counter-reset: automation-document-step;
  list-style: none;
}

.automation-document-steps li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  margin: 0;
  padding: 13px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  color: var(--ink-soft);
  background: #fdfdfc;
  font-size: 13px;
  line-height: 1.58;
  counter-increment: automation-document-step;
}

.automation-document-steps li::before {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--forest);
  background: var(--forest-pale);
  content: counter(automation-document-step);
  font-size: 10px;
  font-weight: 800;
}

.automation-document-section .automation-outcomes {
  margin-top: 17px;
}

.automation-document-aside {
  position: sticky;
  top: 20px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #faf9f8;
}

.automation-document-aside h3 {
  margin: 7px 0 0;
  font-family: "Mulish", sans-serif;
  font-size: 17px;
  letter-spacing: -0.025em;
}

.automation-document-aside dl {
  margin: 19px 0 0;
}

.automation-document-aside dl div {
  padding: 11px 0;
  border-top: 1px solid var(--line-soft);
}

.automation-document-aside dt {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.automation-document-aside dd {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.automation-document-aside > p {
  margin: 16px 0 0;
  padding-top: 15px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.toast-region {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  display: grid;
  gap: 8px;
}

.toast {
  width: min(380px, calc(100vw - 40px));
  min-width: 280px;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: white;
  box-shadow: var(--shadow-md);
  font-size: 13px;
  line-height: 1.45;
  animation: toast-in 180ms ease both;
}

.toast-title,
.toast-message {
  display: block;
}

.toast-title {
  margin-bottom: 4px;
  font-family: "Mulish", sans-serif;
  font-size: 14px;
}

.toast-message {
  color: currentColor;
}

.toast.success {
  border-color: #d6cabd;
  color: var(--forest);
  background: #f8f5f2;
}

.toast.error {
  border-color: #efcfcc;
  color: #8e403b;
  background: var(--red-pale);
}

.toast.warning {
  border-color: #edcfaa;
  color: #8a571f;
  background: var(--amber-pale);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
}

.sidebar-scrim {
  display: none;
}

@media (max-width: 1120px) {
  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-grid,
  .claim-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-stack {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .claims-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .search-wrap {
    width: 100%;
  }

  .filter-group {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .filter-select,
  .exclusion-filter,
  .exclusion-summary {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 980px) {
  .claims-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .claims-stat:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 220ms ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: block;
    visibility: hidden;
    background: rgba(23, 16, 9, 0.46);
    opacity: 0;
    transition: 200ms ease;
  }

  .sidebar-scrim.visible {
    visibility: visible;
    opacity: 1;
  }

  .main-content {
    margin-left: 0;
  }

  .mobile-menu {
    display: grid;
  }

  .topbar {
    height: 78px;
    padding: 0 20px;
  }

  .topbar-title {
    margin-right: auto;
  }

  .topbar-title h1 {
    font-size: 19px;
  }

  .as-of {
    display: none;
  }

  .view-container {
    padding: 23px 20px 38px;
  }

  .claims-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .search-wrap {
    width: 100%;
  }

  .filter-group {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .claims-intro h2 {
    font-size: 26px;
  }

  .claims-overview {
    grid-template-columns: 1fr;
  }

  .claims-stat,
  .claims-stat:last-child {
    min-height: 104px;
    grid-column: auto;
    padding: 17px;
  }

  .filter-group {
    grid-template-columns: 1fr;
  }

  .filter-select {
    width: 100%;
  }

  .exclusion-menu {
    position: static;
    width: 100%;
    margin-top: 8px;
  }

  .exclusion-options {
    grid-template-columns: 1fr;
  }

  .table-summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .metric-grid,
  .dashboard-stack,
  .detail-grid,
  .future-actions {
    grid-template-columns: 1fr;
  }

  .metric-card {
    min-height: 126px;
  }

  .detail-item,
  .detail-item:nth-child(2n),
  .detail-item:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .detail-item:last-child {
    border-bottom: 0;
  }

  .claim-hero {
    flex-direction: column;
    padding: 23px 22px;
  }

  .claim-title-row h2 {
    font-size: 25px;
  }

  .claim-hero-side {
    width: 100%;
    min-width: 0;
    text-align: left;
  }

  .queue-item {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .queue-meta {
    grid-column: 2;
    text-align: left;
  }

  .queue-meta > span {
    display: inline;
    margin-left: 6px;
  }

  .stage-row {
    grid-template-columns: 96px minmax(0, 1fr) 20px;
  }
}

@media (max-width: 1120px) {
  .automation-document-layout {
    grid-template-columns: 1fr;
  }

  .automation-document-aside {
    position: static;
  }

  .automation-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .automation-meta-item:nth-child(2) {
    border-right: 0;
  }

  .automation-meta-item:last-child {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line-soft);
  }
}

@media (max-width: 820px) {
  .automation-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .automation-hero-note {
    width: 100%;
    flex-basis: auto;
  }

  .automation-index-header,
  .automation-document-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .automation-hero {
    gap: 22px;
    padding: 25px 22px;
  }

  .automation-hero h2 {
    font-size: 25px;
  }

  .automation-library-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .automation-index-header,
  .automation-document-header {
    gap: 15px;
    padding: 22px 20px 20px;
  }

  .automation-index-card h3 {
    font-size: 20px;
  }

  .automation-document-header h2 {
    font-size: 25px;
  }

  .automation-index-footer {
    padding-right: 18px;
    padding-left: 20px;
  }

  .automation-document-layout {
    padding: 27px 20px 30px;
  }

  .automation-document-section {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .automation-section-number {
    width: 34px;
    height: 34px;
  }

  .automation-status {
    align-self: flex-start;
  }

  .automation-meta-grid {
    grid-template-columns: 1fr;
  }

  .automation-meta-item,
  .automation-meta-item:nth-child(2),
  .automation-meta-item:last-child {
    grid-column: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
    border-top: 0;
  }

  .automation-meta-item:last-child {
    border-bottom: 0;
  }

  .automation-outcomes {
    grid-template-columns: 1fr;
  }

}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Sign-in screen. It covers the app until the server approves the account. */
body.auth-locked {
  overflow: hidden;
}

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background:
    radial-gradient(circle at 12% 8%, rgba(210, 176, 108, 0.14), transparent 32%),
    var(--forest);
}

.auth-screen[hidden],
.auth-card [hidden],
.user-card [hidden] {
  display: none;
}

.auth-card {
  width: min(400px, 100%);
  padding: 32px 28px 28px;
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-md);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.auth-card h1 {
  margin: 0 0 8px;
  font-family: "Mulish", sans-serif;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.auth-card p {
  margin: 0 0 24px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.auth-card p.error {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  color: var(--red);
  background: var(--red-pale);
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form label {
  display: grid;
  gap: 6px;
}

.auth-form label span {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.auth-form input {
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-size: 14px;
}

.auth-form input:focus {
  outline: 2px solid var(--forest-2);
  outline-offset: 1px;
}

.auth-form .auth-button {
  margin-top: 4px;
}

.auth-form .auth-link {
  margin-top: 0;
}

.auth-button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.auth-button {
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: var(--radius-sm);
  color: #fff;
  background: var(--forest);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.auth-button:hover,
.auth-button:focus-visible {
  outline: 0;
  background: var(--forest-2);
}

.auth-link {
  display: block;
  margin: 14px auto 0;
  padding: 4px;
  border: 0;
  color: var(--forest-2);
  background: none;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.user-card-copy {
  min-width: 0;
}

.user-card-copy strong,
.user-card-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Schedule inspection panel on the claim workspace. */
.schedule-form {
  display: grid;
  gap: 12px;
  padding: 16px 19px 19px;
}

.schedule-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.schedule-field > span {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.schedule-field select,
.schedule-field input {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: var(--paper);
  font-size: 13px;
}

.schedule-field select:focus,
.schedule-field input:focus {
  border-color: var(--forest-2);
  outline: 3px solid rgba(105, 73, 36, 0.14);
}

.schedule-when {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 10px;
}

.schedule-zone {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.schedule-zone span,
.schedule-zone svg {
  width: 14px;
  height: 14px;
}

.schedule-submit {
  width: 100%;
  min-height: 43px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 15px;
  border: 1px solid var(--forest);
  border-radius: 9px;
  color: white;
  background: var(--forest);
  box-shadow: 0 5px 14px rgba(79, 54, 25, 0.16);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
}

.schedule-submit:hover:not(:disabled) {
  border-color: var(--forest-2);
  background: var(--forest-2);
}

.schedule-submit:focus-visible {
  outline: 3px solid rgba(210, 176, 108, 0.55);
  outline-offset: 2px;
}

.schedule-submit:disabled {
  cursor: progress;
  opacity: 0.7;
}

.schedule-submit [data-icon],
.schedule-submit [data-icon] svg {
  width: 16px;
  height: 16px;
}

.schedule-sent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  color: var(--forest);
  background: var(--forest-pale);
}

.schedule-sent > span,
.schedule-sent svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin-top: 1px;
}

.schedule-sent strong,
.schedule-sent div span {
  display: block;
}

.schedule-sent strong {
  font-size: 12px;
}

.schedule-sent div span {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 11px;
}

.schedule-sent.warning {
  color: #92400e;
  background: var(--amber-pale);
}

.schedule-sent.error {
  color: var(--red);
  background: var(--red-pale);
}

.schedule-sent > div {
  min-width: 0;
  flex: 1;
}

.schedule-result-summary {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.schedule-steps {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding: 10px 0 0;
  border-top: 1px solid rgba(38, 31, 23, 0.1);
  list-style: none;
}

.schedule-step {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.schedule-step > b {
  width: 18px;
  height: 18px;
  display: grid;
  flex: 0 0 18px;
  place-items: center;
  border-radius: 50%;
  color: var(--forest);
  background: var(--paper);
  font-size: 11px;
}

.schedule-step.not-needed > b {
  color: var(--muted);
}

.schedule-step.failed > b {
  color: var(--red);
}

.schedule-step.skipped > b,
.schedule-step.unknown > b {
  color: var(--amber);
}

.schedule-step > div {
  min-width: 0;
}

.schedule-sent .schedule-step strong,
.schedule-sent .schedule-step span {
  display: inline;
  margin: 0;
  font-size: 11px;
}

.schedule-sent .schedule-step strong {
  color: var(--ink);
}

.schedule-sent .schedule-step span::before {
  content: " · ";
}

.schedule-step small {
  display: block;
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.schedule-systems {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.schedule-systems legend {
  width: 100%;
  margin-bottom: 6px;
  padding: 0;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.schedule-system {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.schedule-system input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--forest);
}

.schedule-system:has(input:checked) {
  border-color: var(--forest-2);
  background: var(--forest-pale);
}

.schedule-system:has(input:focus-visible) {
  outline: 3px solid rgba(105, 73, 36, 0.2);
  outline-offset: 1px;
}

/* Complete inspection panel. */
.inspection-status-form {
  border-top: 1px solid var(--line);
}

.inspection-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.inspection-step-number {
  width: 24px;
  height: 24px;
  display: grid;
  flex: 0 0 24px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--forest);
  font-size: 11px;
  font-weight: 800;
}

.inspection-step strong,
.inspection-step span:not(.inspection-step-number) {
  display: block;
}

.inspection-step strong {
  font-size: 13px;
}

.inspection-step span:not(.inspection-step-number) {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.address-preview {
  display: grid;
  gap: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.address-preview > div {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 10px;
  padding: 8px 11px;
  border-top: 1px solid var(--line-soft);
}

.address-preview > div:first-child {
  border-top: 0;
}

.address-preview dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.address-preview dd {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.address-preview dd.missing {
  color: var(--amber);
}

.address-note {
  margin: 0;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  color: #92400e;
  background: var(--amber-pale);
  font-size: 11px;
  line-height: 1.45;
}

.email-check-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.email-check-note [data-icon],
.email-check-note svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  margin-top: 1px;
}

.address-note.blocking {
  color: var(--red);
  background: var(--red-pale);
}

@media (max-width: 380px) {
  .schedule-when {
    grid-template-columns: minmax(0, 1fr);
  }
}

/*
 * NWPMC Homes & Remodels brand, matched to nwpmchomes.com: deep brown
 * (#382410), gold (#CCA65B), warm off-white, Mulish headings, Montserrat text,
 * small gold labels, and a short gold rule under page titles.
 */
:root {
  /* Gold dark enough to read as small text on white. */
  --gold-text: #8f6c2b;
}

.sidebar {
  background:
    radial-gradient(circle at 18% 6%, rgba(204, 166, 91, 0.16), transparent 30%),
    linear-gradient(180deg, #3b2611 0%, #2a1a0a 100%);
}

.brand {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 0 6px 28px;
}

.brand-logo {
  display: block;
  width: 180px;
  max-width: 100%;
  height: auto;
}

.brand-product {
  padding-left: 3px;
  color: var(--gold);
  font-family: "Mulish", sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.nav-item {
  font-family: "Mulish", sans-serif;
  font-weight: 600;
}

.nav-item.active {
  color: var(--gold);
  background: rgba(204, 166, 91, 0.12);
  box-shadow: inset 3px 0 var(--gold);
}

.nav-item.active .nav-count {
  color: var(--brown);
  background: var(--gold);
}

.avatar {
  color: var(--brown);
  background: var(--gold);
}

.eyebrow,
.automation-library-heading > div > span {
  color: var(--gold-text);
}

.topbar h1::after {
  content: "";
  display: block;
  width: 38px;
  height: 2px;
  margin-top: 7px;
  background: var(--gold);
}

/* Primary actions use the site's gold call-to-action style. Dark brown text
   instead of white keeps the label readable at small sizes. */
.schedule-submit,
.auth-button {
  border-color: var(--gold);
  border-radius: 4px;
  color: var(--brown);
  background: var(--gold);
  box-shadow: 0 4px 12px rgba(56, 36, 16, 0.14);
  font-family: "Mulish", sans-serif;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.schedule-submit:hover:not(:disabled),
.auth-button:hover,
.auth-button:focus-visible {
  border-color: var(--gold-dark);
  color: var(--brown);
  background: var(--gold-dark);
}

.auth-screen {
  background:
    radial-gradient(circle at 15% 10%, rgba(204, 166, 91, 0.18), transparent 34%),
    linear-gradient(180deg, #3b2611 0%, #2a1a0a 100%);
}

.auth-card {
  overflow: hidden;
  border-top: 3px solid var(--gold);
}

.auth-brand {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin: -32px -28px 26px;
  padding: 26px 28px 20px;
  background: var(--brown);
}

.auth-brand .brand-logo {
  width: 200px;
}

.auth-form input:focus {
  outline-color: var(--gold);
}

.auth-link {
  color: var(--gold-text);
}

/* "How Restoration OS works" guide: link card and page parts. */
.guide-feature-card {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 26px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  color: inherit;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.guide-feature-card:hover,
.guide-feature-card:focus-visible {
  outline: 0;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.guide-feature-card:hover .automation-index-arrow {
  transform: translateX(3px);
}

.guide-feature-icon {
  width: 46px;
  height: 46px;
  display: grid;
  flex: 0 0 46px;
  place-items: center;
  border-radius: 50%;
  color: var(--gold);
  background: var(--brown);
}

.guide-feature-icon svg {
  width: 22px;
  height: 22px;
}

.guide-feature-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.guide-feature-kicker {
  color: var(--gold-text);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.guide-feature-copy strong {
  font-family: "Mulish", sans-serif;
  font-size: 17px;
}

.guide-feature-copy > span:last-child {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.5;
}

.guide-parts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 15px;
}

.guide-part {
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  background: var(--paper);
}

.guide-part h4 {
  margin: 0 0 6px;
  font-family: "Mulish", sans-serif;
  font-size: 14px;
}

.guide-part p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
}

.guide-faq {
  display: grid;
  gap: 10px;
  margin: 15px 0 0;
}

.guide-faq > div {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
}

.guide-faq dt {
  font-family: "Mulish", sans-serif;
  font-size: 14px;
  font-weight: 700;
}

.guide-faq dd {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
}

@media (max-width: 820px) {
  .guide-parts {
    grid-template-columns: minmax(0, 1fr);
  }

  .guide-feature-card {
    align-items: flex-start;
  }
}
