:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f3f7f5;
  color: #17211f;
  --ink: #17211f;
  --muted: #62706c;
  --line: #d9dfda;
  --panel: #ffffff;
  --accent: #0f766e;
  --accent-dark: #0b5e58;
  --warn: #b45309;
  --gone: #9f1239;
  --radius: 14px;
  --shadow-sm: 0 8px 24px rgba(16, 37, 34, 0.07);
  --shadow-md: 0 18px 48px rgba(16, 37, 34, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  background:
    radial-gradient(circle at 8% -5%, rgba(15, 118, 110, 0.10), transparent 30rem),
    linear-gradient(180deg, #f8fbf9 0, #f3f7f5 22rem, #f5f7f4 100%);
  margin: 0;
  min-height: 100vh;
}

.auth-screen {
  align-items: center;
  background: #102522;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
  padding: 20px;
  position: relative;
}

.auth-screen::before {
  background: url("/icon.svg") center / min(780px, 78vw) auto no-repeat;
  content: "";
  inset: 0;
  opacity: 0.13;
  position: absolute;
}

.auth-panel {
  background: rgba(16, 37, 34, 0.9);
  border: 1px solid rgba(167, 215, 209, 0.34);
  border-radius: 8px;
  color: white;
  display: grid;
  gap: 16px;
  max-width: 430px;
  padding: 28px;
  position: relative;
  width: 100%;
  z-index: 1;
}

.auth-panel h1 {
  color: white;
  font-size: 26px;
}

.auth-intro,
.auth-message {
  color: #c9dfdc;
  line-height: 1.45;
}

.auth-remember {
  margin: 0.2rem 0;
  font-size: 0.92rem;
}

.text-button {
  border: 0;
  background: transparent;
  color: #0f766e;
  padding: 0.35rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.2rem;
}

.auth-message {
  min-height: 20px;
}

.auth-logo-crop {
  height: 165px;
  margin: 0 auto;
  overflow: hidden;
  width: 260px;
}

.auth-logo {
  height: auto;
  max-width: 260px;
  width: 100%;
}

.auth-brand-name {
  color: white;
  font-size: 28px;
  text-align: center;
}

.auth-panel label {
  color: #d7e8e5;
}

.auth-panel input {
  background: white;
  color: var(--ink);
}

.password-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.password-control input {
  border-bottom-right-radius: 0;
  border-top-right-radius: 0;
}

.password-toggle {
  background: #d9f1ed;
  border-bottom-left-radius: 0;
  border-top-left-radius: 0;
  color: #0b5e58;
  min-height: 44px;
}

.topbar {
  align-items: center;
  background: linear-gradient(120deg, #0d2420, #103f38);
  box-shadow: 0 8px 28px rgba(5, 23, 20, 0.22);
  color: white;
  display: flex;
  justify-content: space-between;
  padding: 14px max(22px, env(safe-area-inset-left));
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand-lockup {
  align-items: center;
  display: flex;
  gap: 12px;
}

.brand-mark {
  align-items: center;
  background: linear-gradient(145deg, #2cc6b3, #0f766e);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
  display: inline-flex;
  font-size: 13px;
  font-weight: 950;
  height: 42px;
  justify-content: center;
  letter-spacing: 0.04em;
  width: 42px;
}

.account-bar {
  align-items: center;
  display: flex;
  gap: 12px;
}

.account-bar > div {
  text-align: right;
}

.account-bar strong,
.account-bar small {
  display: block;
}

.account-bar small {
  color: #a7d7d1;
  font-size: 11px;
  margin-top: 2px;
}

.topbar-button {
  background: #d9f1ed;
  color: #0b5e58;
  min-height: 38px;
}

.eyebrow {
  color: #a7d7d1;
  font-size: 12px;
  font-weight: 700;
  margin: 0 0 3px;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 22px;
  letter-spacing: 0;
}

main {
  margin: 0 auto;
  max-width: 1320px;
  padding: 20px;
}

.workspace-tabs {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(199, 214, 208, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 5px;
  margin-bottom: 12px;
  overflow-x: auto;
  padding: 6px;
  position: sticky;
  top: 78px;
  z-index: 9;
}

.workspace-tab {
  background: transparent;
  border-radius: 9px;
  color: var(--muted);
  min-height: 42px;
  white-space: nowrap;
}

.workspace-tab.active {
  background: var(--accent);
  box-shadow: 0 6px 16px rgba(15, 118, 110, 0.22);
  color: white;
}

.workspace-status {
  align-items: center;
  background: rgba(237, 248, 245, 0.96);
  border: 1px solid #c7e6df;
  border-radius: 10px;
  color: #245a52;
  display: grid;
  font-size: 13px;
  font-weight: 750;
  gap: 9px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  margin-bottom: 16px;
  padding: 9px 12px;
}

.workspace-status.status-error { background: #fff7ed; border-color: #fed7aa; color: #9a3412; }
.workspace-status small { color: var(--muted); font-weight: 650; }
.status-dot { background: #18a78f; border-radius: 50%; box-shadow: 0 0 0 4px rgba(24, 167, 143, 0.12); height: 8px; width: 8px; }
.status-error .status-dot { background: #d97706; box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.12); }
kbd { background: white; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; font: 10px ui-monospace, monospace; padding: 1px 4px; }

.view-heading {
  align-items: center;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin: 8px 2px 16px;
}

.view-heading .eyebrow { color: var(--accent); }
.view-heading h2 { font-size: clamp(25px, 3vw, 34px); letter-spacing: -0.025em; }
.view-heading p:last-child { color: var(--muted); margin-top: 5px; }

.source-tools {
  align-items: center;
  background: #f5fbfa;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 12px;
}

.source-tools strong,
.source-tools p {
  display: block;
}

.source-tools p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}

.source-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.access-view {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.help-view {
  display: grid;
  gap: 16px;
}

.team-view {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.team-summary {
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 18px;
}

.team-summary div {
  border-right: 1px solid var(--line);
  padding: 12px;
}

.team-summary div:last-child {
  border-right: 0;
}

.team-summary span,
.team-summary small {
  display: block;
}

.team-summary span {
  font-size: 24px;
  font-weight: 900;
}

.team-summary small {
  color: var(--muted);
  font-weight: 700;
}

.team-user-form {
  align-items: end;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  padding: 18px 0;
}

.team-module-access {
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  grid-column: 1 / -1;
  margin: 0;
  padding: 12px;
}

.team-module-access[hidden] { display: none; }
.team-module-access legend { color: var(--ink); font-size: 12px; font-weight: 900; padding: 0 6px; }
.team-module-access label { align-items: center; color: var(--muted); display: flex; flex-direction: row; font-size: 12px; font-weight: 750; gap: 6px; }
.team-module-access input { width: auto; }
.team-module-access small { color: var(--muted); flex-basis: 100%; }

.team-dashboard-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
}

.team-dashboard-grid h3 {
  font-size: 16px;
  margin: 0 0 10px;
}

.team-member-list,
.team-activity-list {
  display: grid;
  gap: 8px;
}

.team-member-row {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  padding: 10px;
}

.compact-button {
  min-height: 34px;
  padding: 7px 10px;
}

.team-member-row strong,
.team-member-row small {
  display: block;
}

.team-member-row small,
.member-metrics,
.team-activity-list p,
.team-activity-list small {
  color: var(--muted);
}

.member-metrics {
  font-size: 12px;
  font-weight: 700;
  margin-top: 5px;
}

.member-access-summary { color: var(--muted); font-size: 12px; margin: 7px 0 0; }
.member-access { margin-top: 8px; }
.member-access summary { color: #355b8c; cursor: pointer; font-size: 12px; font-weight: 850; }
.member-access > div { display: flex; flex-wrap: wrap; gap: 7px 10px; margin: 9px 0; }
.member-access label { align-items: center; color: var(--muted); display: flex; flex-direction: row; font-size: 11px; gap: 5px; }
.member-access input { width: auto; }

.team-activity-list article {
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}

.team-activity-list p {
  font-size: 13px;
  margin-top: 3px;
}

.team-activity-list small {
  display: block;
  font-size: 11px;
  margin-top: 3px;
}

.posting-center {
  display: grid;
  gap: 16px;
}

.posting-scorecards {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
}

.posting-scorecards button {
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  min-height: 84px;
  text-align: left;
}

.posting-scorecards button:last-child {
  border-right: 0;
}

.posting-scorecards button.active {
  background: rgba(15, 118, 110, 0.08);
  box-shadow: inset 0 -3px 0 var(--accent);
}

.posting-scorecards button.active small,
.posting-scorecards button.active span {
  color: var(--accent-dark);
}

.posting-scorecards span {
  display: block;
  font-size: 28px;
  font-weight: 800;
}

.posting-scorecards small {
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
}

.posting-worklist {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
}

.posting-worklist h3 {
  font-size: 16px;
  margin: 0 0 10px;
}

.posting-queue-list,
.posting-people-list {
  display: grid;
  gap: 8px;
}

.posting-queue-list article,
.posting-people-list article {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
}

.posting-queue-list article {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.posting-queue-list strong,
.posting-queue-list small,
.posting-people-list strong,
.posting-people-list small {
  display: block;
}

.posting-queue-list small,
.posting-people-list small {
  color: var(--muted);
  margin-top: 4px;
}

.help-heading {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.help-heading .eyebrow {
  color: var(--accent);
}

.help-heading p:last-child {
  color: var(--muted);
  line-height: 1.5;
  margin-top: 8px;
  max-width: 780px;
}

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

.help-grid article {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.help-grid h3 {
  font-size: 17px;
  margin: 0;
}

.help-grid ol,
.help-grid ul {
  color: var(--muted);
  line-height: 1.55;
  margin: 10px 0 0;
  padding-left: 22px;
}

.access-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.access-heading .eyebrow {
  color: var(--accent);
}

.access-heading h2 {
  font-size: 24px;
}

.master-badge {
  background: #102522;
  border-radius: 999px;
  color: white;
  font-size: 11px;
  font-weight: 900;
  padding: 6px 9px;
  text-transform: uppercase;
}

.access-note {
  color: var(--muted);
  line-height: 1.45;
  margin-top: 12px;
  max-width: 820px;
}

.dealer-form {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 18px;
  padding-bottom: 18px;
}

.dealer-form button {
  align-self: end;
}

.dealer-list {
  display: grid;
  gap: 10px;
}

.dealer-row {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  padding: 12px;
}

.dealer-row strong,
.dealer-row small {
  display: block;
}

.dealer-row small,
.dealer-row p {
  color: var(--muted);
}

.dealer-row p {
  font-size: 13px;
  margin-top: 4px;
}

.dealer-status {
  border-radius: 999px;
  color: white;
  font-size: 11px;
  font-weight: 900;
  padding: 6px 9px;
  text-transform: uppercase;
}

.dealer-status.active,
.activate-button {
  background: #17603a;
  color: white;
}

.dealer-status.suspended,
.suspend-button {
  background: var(--gone);
  color: white;
}

.controls,
.summary,
.filters {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
}

.controls {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 16px;
}

label {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
}

.wide {
  grid-column: 1 / -1;
}

.checkbox-row {
  align-items: center;
  display: flex;
  gap: 10px;
}

.checkbox-row input {
  min-height: 0;
  width: auto;
}

input,
textarea,
select {
  appearance: none;
  background: #fbfcfb;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
  min-height: 44px;
  padding: 10px 12px;
  width: 100%;
}

textarea {
  line-height: 1.4;
  resize: vertical;
}

button,
.secondary {
  align-items: center;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 800;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, color 160ms ease, transform 160ms ease;
}

button:not(:disabled):hover,
.secondary:hover { transform: translateY(-1px); }
button:focus-visible,
.secondary:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible { outline: 3px solid rgba(15, 118, 110, 0.24); outline-offset: 2px; }

.primary {
  background: var(--accent);
  color: white;
}

.primary:disabled {
  cursor: wait;
  opacity: 0.72;
}

.secondary {
  background: #e7efed;
  color: var(--accent-dark);
}

.disabled-link {
  cursor: not-allowed;
  opacity: 0.48;
  pointer-events: none;
}

.icon-button {
  background: #d9f1ed;
  color: #0b5e58;
  font-size: 24px;
  height: 42px;
  padding: 0;
  width: 42px;
}

.actions {
  align-items: end;
  display: flex;
  gap: 10px;
}

.import-panel,
.manual-panel {
  background: #f7faf8;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: 1.2fr auto 1fr;
  padding: 12px;
}

.import-panel p,
.manual-panel p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
  margin-top: 4px;
}

.file-label input {
  background: white;
}

.summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
}

.summary div {
  border-right: 1px solid var(--line);
  padding: 14px 16px;
}

.summary div:last-child {
  border-right: 0;
}

.summary span {
  display: block;
  font-size: 28px;
  font-weight: 900;
}

.summary small {
  color: var(--muted);
  display: block;
  font-weight: 700;
}

.filters {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 220px;
  padding: 12px;
}

.status {
  color: var(--muted);
  font-weight: 700;
  margin: 14px 2px;
}

.vehicle-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
}

.vehicle-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.vehicle-card:hover { border-color: #b5d4ce; box-shadow: var(--shadow-md); transform: translateY(-2px); }

.photo {
  align-items: center;
  aspect-ratio: 16 / 9;
  background: #dfe6e2;
  color: var(--muted);
  display: flex;
  font-weight: 800;
  justify-content: center;
}

.photo img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.vehicle-body {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.vehicle-title-row {
  align-items: start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

h2 {
  font-size: 18px;
  line-height: 1.25;
}

.badge {
  border-radius: 999px;
  color: white;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 900;
  padding: 5px 8px;
  text-transform: uppercase;
}

.badge.new {
  background: var(--warn);
}

.badge.seen {
  background: var(--accent);
}

.badge.removed {
  background: var(--gone);
}

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

.facts div {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.facts dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.facts dd {
  font-weight: 800;
  margin: 2px 0 0;
  overflow-wrap: anywhere;
}

.card-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.assignment-summary {
  background: #f3f7f5;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 10px;
}

.assignment-controls {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) 145px;
}

.assignment-controls .assign-button {
  grid-column: 1 / -1;
}

.facebook {
  grid-column: 1 / -1;
}

.posted-toggle.is-posted {
  background: #d9eadf;
  color: #17603a;
}

.details,
.photo-link {
  align-items: center;
  background: #eef1ee;
  border-radius: 6px;
  color: var(--ink);
  display: flex;
  font-weight: 800;
  justify-content: center;
  min-height: 44px;
  text-decoration: none;
}

.details[aria-disabled="true"],
.photo-link[aria-disabled="true"],
.posting-actions [aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.48;
  pointer-events: none;
}

.posting-dialog {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  max-height: calc(100vh - 32px);
  max-width: 720px;
  padding: 0;
  width: calc(100% - 28px);
}

.posting-dialog::backdrop {
  background: rgba(10, 24, 22, 0.72);
}

.posting-header {
  align-items: center;
  background: #102522;
  color: white;
  display: flex;
  justify-content: space-between;
  padding: 16px;
}

.posting-note {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  padding: 16px 16px 0;
}

.required-checklist {
  background: #edf8f5;
  border: 1px solid #b7ded7;
  border-radius: 6px;
  display: grid;
  gap: 10px;
  margin: 16px 16px 0;
  padding: 12px;
}

.required-checklist.has-missing {
  background: #fff7ed;
  border-color: #fed7aa;
}

.checklist-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.checklist-items span {
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 8px;
  text-transform: uppercase;
}

.check-ready {
  background: #d9eadf;
  color: #17603a;
}

.check-missing {
  background: #ffedd5;
  color: #9a3412;
}

.vehicle-detail-editor {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 16px 16px 0;
}

.posting-fields {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 16px;
}

.posting-photos {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0 16px 16px;
}

.posting-photos a {
  aspect-ratio: 4 / 3;
  background: #dfe6e2;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.posting-photos img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.packet-photo-empty {
  color: var(--muted);
  grid-column: 1 / -1;
  margin: 0;
}

.posting-field {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 64px;
  padding: 8px 8px 8px 12px;
}

.posting-field small,
.posting-field strong {
  display: block;
}

.posting-field small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.posting-field strong {
  overflow-wrap: anywhere;
}

.posting-dialog > label {
  padding: 0 16px;
}

.posting-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 16px;
}

.helper-status {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  padding: 0 16px;
}

.helper-location {
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 800;
  margin: 10px 16px 16px;
}

.helper-check {
  margin: 0 16px;
}

.listing {
  font-size: 13px;
  min-height: 150px;
}

.rescue-view{display:grid;gap:16px}.rescue-approval{background:#fff7ed;border:1px solid #fed7aa;border-radius:999px;color:#9a3412;font-size:12px;font-weight:800;padding:7px 10px}.rescue-import{align-items:end;background:var(--panel);border:1px solid var(--line);border-radius:8px;display:grid;gap:12px;grid-template-columns:minmax(240px,1fr) auto auto;padding:16px}.rescue-queue{display:grid;gap:14px}.rescue-card{background:var(--panel);border:1px solid var(--line);border-radius:8px;display:grid;gap:12px;padding:16px}.rescue-card-head{align-items:flex-start;display:flex;gap:12px;justify-content:space-between}.rescue-confidence{border-radius:999px;font-size:12px;font-weight:800;padding:6px 9px;text-transform:uppercase}.rescue-confidence.high{background:#dcfce7;color:#166534}.rescue-confidence.medium{background:#fef3c7;color:#92400e}.rescue-confidence.low{background:#e5e7eb;color:#374151}.rescue-reasons{color:var(--muted);margin:0;padding-left:20px}.rescue-match{background:#f5fbfa;border-left:3px solid var(--accent);display:grid;gap:4px;padding:12px}.rescue-draft{display:grid;gap:8px}.rescue-draft textarea{min-height:110px}.rescue-actions{display:flex;flex-wrap:wrap;gap:8px}

@media (max-width: 760px) {
  main {
    padding: 12px;
  }

  .controls,
  .filters,
  .summary,
  .import-panel,
  .manual-panel {
    grid-template-columns: 1fr;
  }

  .rescue-import { grid-template-columns: 1fr; }

  .summary div {
    border-bottom: 1px solid var(--line);
    border-right: 0;
  }

  .summary div:last-child {
    border-bottom: 0;
  }

  .actions,
  .card-actions {
    grid-template-columns: 1fr;
  }

  .actions {
    align-items: stretch;
    display: grid;
  }

  .source-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .source-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .vehicle-grid {
    grid-template-columns: 1fr;
  }

  .posting-fields,
  .posting-actions,
  .posting-photos,
  .vehicle-detail-editor,
  .help-grid,
  .posting-scorecards,
  .posting-worklist {
    grid-template-columns: 1fr;
  }

  .posting-scorecards button {
    border-bottom: 1px solid var(--line);
    border-right: 0;
  }

  .posting-scorecards button:last-child {
    border-bottom: 0;
  }

  .dealer-form,
  .dealer-row,
  .team-user-form,
  .team-dashboard-grid,
  .team-member-row,
  .team-summary {
    grid-template-columns: 1fr;
  }

  .team-summary div {
    border-bottom: 1px solid var(--line);
    border-right: 0;
  }

  .team-summary div:last-child {
    border-bottom: 0;
  }

  .topbar {
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
  }

  .account-bar {
    align-items: flex-end;
    flex-direction: column;
  }

  .account-bar > div {
    max-width: 180px;
  }

  .workspace-tabs {
    top: 100px;
  }

  .workspace-status {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .workspace-status small {
    display: none;
  }

  .view-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .topbar {
    position: relative;
  }

  .brand-mark {
    height: 36px;
    width: 36px;
  }

  .account-bar > div,
  .sync-button {
    display: none;
  }

  .workspace-tabs {
    top: 8px;
  }
}

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




/* Focused enrollment and notification additions */
.enrollment-checklist{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.55rem;padding:1rem;border:1px solid #cbd5e1;border-radius:14px;background:#f8fafc;color:#334155}
.enrollment-checklist strong{grid-column:1/-1;color:#0f172a}
.enrollment-checklist span{font-size:.9rem}
#healthTab:not(.active){position:relative}
#healthActionList .team-member-row{border-left:4px solid #f59e0b}
#accessView .team-summary{margin-bottom:1rem}
.dealer-row small{display:block;max-width:70ch;line-height:1.45}
@media (max-width:720px){.enrollment-checklist{grid-template-columns:1fr}}


/* Lead Center is additive and isolated from inventory/posting layouts. */
.lead-center{display:grid;gap:16px}
.lead-center[hidden]{display:none}
.lead-hero{align-items:center;background:linear-gradient(135deg,#073f3b 0%,#0f766e 68%,#15968c 100%);border-radius:14px;color:#fff;display:flex;justify-content:space-between;overflow:hidden;padding:24px;position:relative}
.lead-hero::after{background:rgba(255,255,255,.08);border-radius:999px;content:"";height:220px;position:absolute;right:-50px;top:-110px;width:220px}
.lead-hero h2{font-size:28px;margin:2px 0 6px}
.lead-hero p:last-child{color:#d9f1ed;max-width:680px}
.lead-new-button{background:#fff;color:#0b5e58;position:relative;z-index:1}
.lead-scorecards{background:var(--panel);border:1px solid var(--line);border-radius:10px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));overflow:hidden}
.lead-scorecards button{background:transparent;border:0;border-right:1px solid var(--line);border-radius:0;color:var(--ink);min-height:88px;text-align:left}
.lead-scorecards button:last-child{border-right:0}
.lead-scorecards span,.lead-scorecards small{display:block}
.lead-scorecards span{font-size:30px;font-weight:900}
.lead-scorecards small{color:var(--muted);font-weight:800;text-transform:uppercase}
.lead-toolbar{align-items:center;display:flex;justify-content:space-between}
.lead-filter-chips{display:flex;flex-wrap:wrap;gap:8px}
.lead-filter-chips button{background:#eef7f6;color:#35615d;min-height:34px;padding:7px 12px}
.lead-filter-chips button.active{background:#0f766e;color:#fff}
.lead-scope{color:var(--muted);font-size:13px;font-weight:800}
.lead-list{display:grid;gap:10px}
.lead-card{align-items:stretch;background:var(--panel);border:1px solid var(--line);border-left:5px solid #77bbb4;border-radius:10px;display:grid;gap:14px;grid-template-columns:104px minmax(0,1fr);padding:14px}
.lead-card.waiting{border-left-color:#e0a529}.lead-card.overdue{border-left-color:#d9534f;box-shadow:0 5px 18px rgba(160,42,39,.08)}
.lead-vehicle-photo{background:#e8f3f1;border-radius:8px;min-height:94px;overflow:hidden}
.lead-vehicle-photo img{height:100%;object-fit:cover;width:100%}
.lead-photo-placeholder{align-items:center;color:#0f766e;display:flex;font-size:25px;font-weight:900;height:100%;justify-content:center}
.lead-card-main{min-width:0}
.lead-card-top{align-items:start;display:flex;gap:12px;justify-content:space-between}
.lead-card-top h3{font-size:17px;margin:7px 0 5px}
.lead-card-top small,.lead-card-main>p,.lead-meta{color:var(--muted)}
.lead-card-main>p{font-size:14px}
.lead-status-pill{background:#dff3ef;border-radius:999px;color:#0b5e58;display:inline-block;font-size:11px;font-weight:900;padding:4px 8px;text-transform:uppercase}
.lead-status-pill.waiting{background:#fff3ce;color:#855f00}.lead-status-pill.overdue{background:#fde4e2;color:#a02622}.lead-status-pill.handled{background:#edf0f4;color:#52606d}
.lead-meta{display:flex;flex-wrap:wrap;font-size:12px;gap:16px;margin-top:10px}
.lead-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.lead-empty{background:var(--panel);border:1px dashed #9fcac5;border-radius:10px;padding:38px;text-align:center}
.lead-empty p{color:var(--muted);margin-top:5px}
.lead-dialog{border:0;border-radius:14px;box-shadow:0 24px 80px rgba(7,63,59,.25);max-width:680px;padding:0;width:calc(100% - 32px)}
.lead-dialog::backdrop{background:rgba(4,35,33,.55);backdrop-filter:blur(3px)}
.lead-dialog form{padding:22px}
.lead-dialog-heading{align-items:start;display:flex;justify-content:space-between}
.lead-dialog-heading .eyebrow{color:#0f766e}
.lead-form-grid{display:grid;gap:14px;grid-template-columns:repeat(2,minmax(0,1fr));margin-top:18px}
.lead-form-grid .wide{grid-column:1/-1}
.lead-dialog-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:18px}
@media(max-width:700px){.lead-hero{align-items:flex-start;flex-direction:column;gap:16px}.lead-scorecards{grid-template-columns:repeat(2,minmax(0,1fr))}.lead-scorecards button:nth-child(2){border-right:0}.lead-scorecards button:nth-child(-n+2){border-bottom:1px solid var(--line)}.lead-toolbar{align-items:flex-start;flex-direction:column;gap:10px}.lead-card{grid-template-columns:72px minmax(0,1fr)}.lead-card-top{flex-direction:column}.lead-form-grid{grid-template-columns:1fr}}

.action-center{display:grid;gap:18px}.action-center-heading{align-items:flex-start;background:linear-gradient(135deg,#0b1730,#1d4ed8 72%,#3b82f6);border-radius:18px;color:#fff;display:flex;gap:22px;justify-content:space-between;padding:26px}.action-center-heading h2{font-size:30px;margin:3px 0 7px}.action-center-heading p:last-child{color:#dbeafe;margin:0;max-width:760px}.action-scorecards{background:#fff;border:1px solid var(--line);border-radius:14px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));overflow:hidden}.action-scorecards button{align-items:flex-start;background:#fff;border-radius:0;border-right:1px solid var(--line);color:var(--ink);display:flex;flex-direction:column;gap:2px;justify-content:center;min-height:82px;padding:16px 22px}.action-scorecards button:last-child{border-right:0}.action-scorecards button:hover{background:#f5f8ff}.action-scorecards span{font-size:24px;font-weight:900}.action-scorecards small{color:var(--muted);font-weight:800}.action-center-grid{display:grid;gap:16px;grid-template-columns:repeat(2,minmax(0,1fr))}.action-center-grid>section{background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow-sm);min-width:0;padding:18px}.action-center-grid h3{margin:0 0 13px}.action-list{display:grid;gap:9px}.action-item{align-items:center;background:#f8faff;border:1px solid #dce6f4;border-left:4px solid #8db4eb;border-radius:11px;display:flex;gap:12px;justify-content:space-between;padding:12px}.action-item.high{border-left-color:#d99b17}.action-item.urgent{background:#fff7f7;border-left-color:#dc2626}.action-item p{color:#43546c;font-size:13px;margin:4px 0}.action-item small{color:var(--muted)}.action-reporting dl{display:grid;gap:8px;grid-template-columns:repeat(2,minmax(0,1fr));margin:0 0 12px}.action-reporting dl div{background:#f4f7fc;border-radius:10px;padding:12px}.action-reporting dt{color:var(--muted);font-size:11px;font-weight:800}.action-reporting dd{font-size:23px;font-weight:900;margin:3px 0 0}.action-reporting>small{color:var(--muted)}.inventory-heading-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}.crm-settings-panel{align-items:end;background:#f4f8ff;border:1px solid #bfd2ee;border-radius:14px;display:grid;gap:14px;grid-template-columns:minmax(220px,1fr) minmax(250px,1fr) auto;padding:16px}.crm-settings-panel[hidden]{display:none}.crm-settings-panel p{color:var(--muted);font-size:12px;margin:4px 0 0}.crm-settings-panel small{color:var(--muted);grid-column:1/-1}.member-refresh-permission{border-top:1px solid var(--line);font-weight:800;margin-top:5px;padding-top:10px}
@media(max-width:800px){.action-center-heading{display:grid}.action-scorecards{grid-template-columns:repeat(2,minmax(0,1fr))}.action-scorecards button:nth-child(2){border-right:0}.action-scorecards button:nth-child(-n+2){border-bottom:1px solid var(--line)}.action-center-grid{grid-template-columns:1fr}.crm-settings-panel{grid-template-columns:1fr}.inventory-heading-actions{justify-content:flex-start}}

.companion-view{display:grid;gap:20px}.companion-hero{padding:26px;border-radius:20px;background:linear-gradient(135deg,#082923,#125c52);color:#fff;display:flex;align-items:flex-start;justify-content:space-between;gap:22px;box-shadow:0 18px 45px rgba(5,42,36,.18)}.companion-hero h2{font-size:30px;margin:3px 0 8px}.companion-hero p:last-child{max-width:720px;color:#c7e2dc;margin:0}.companion-badge{white-space:nowrap;border-radius:999px;padding:9px 13px;font-size:12px;font-weight:850}.companion-badge.waiting{background:#fff3d6;color:#81510b}.companion-badge.connected{background:#d9f7e8;color:#176441}.companion-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.companion-card{position:relative;padding:24px;border:1px solid var(--line);border-radius:17px;background:#fff;box-shadow:0 10px 30px rgba(13,51,46,.07)}.companion-card.featured{border-color:#7fc8bd;background:linear-gradient(180deg,#f4fffc,#fff)}.companion-card h3{margin:11px 0 8px}.companion-card p,.companion-card li,.companion-card small{color:var(--muted)}.companion-card ol{padding-left:20px;margin:8px 0 20px}.companion-card li{margin:8px 0}.companion-step{display:grid;place-items:center;width:30px;height:30px;border-radius:9px;background:#def2ee;color:var(--brand2);font-weight:900}.companion-download{display:block;text-align:center;text-decoration:none;margin:22px 0 9px}.companion-card small{display:block;text-align:center}.companion-status{margin:14px 0 0;min-height:44px;font-weight:700}.companion-note{padding:17px 20px;border:1px solid #c8ddd8;border-radius:13px;background:#edf7f5;color:#355c55}
@media(max-width:850px){.companion-hero{display:grid}.companion-badge{justify-self:start}.companion-grid{grid-template-columns:1fr}}

/* LotCare is a shared-auth CRM module; messaging remains simulated until a provider is explicitly enabled. */
.care-view{display:grid;gap:18px}.care-heading{align-items:flex-start;background:linear-gradient(135deg,#132d29,#0f766e 72%,#20a497);border-radius:18px;color:#fff;display:flex;gap:24px;justify-content:space-between;overflow:hidden;padding:26px;position:relative}.care-heading::after{background:rgba(255,255,255,.07);border-radius:50%;content:"";height:250px;position:absolute;right:-80px;top:-140px;width:250px}.care-heading h2{font-size:30px;margin:3px 0 7px}.care-heading p:last-child{color:#d7eeea;margin:0;max-width:720px}.care-mode{background:#dcfce7;border:1px solid rgba(255,255,255,.35);border-radius:999px;color:#166534;font-size:12px;font-weight:900;padding:9px 12px;position:relative;white-space:nowrap;z-index:1}.care-summary{margin:0}.care-import-panel{background:var(--panel);border:1px solid var(--line);border-radius:14px;display:grid;gap:14px;padding:16px}.care-contact-form{align-items:end;display:grid;gap:12px;grid-template-columns:1.2fr 1fr 1.2fr 1fr auto}.care-import-row{align-items:end;border-top:1px solid var(--line);display:flex;flex-wrap:wrap;gap:10px;padding-top:14px}.care-import-row label{min-width:250px}.care-workspace{display:grid;gap:14px;grid-template-columns:minmax(230px,280px) minmax(340px,1fr) minmax(240px,300px);min-height:590px}.care-contacts-panel,.care-conversation-panel,.care-profile-panel,.care-playbook{background:var(--panel);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow-sm)}.care-contacts-panel{overflow:hidden;padding:12px}.care-search{padding:4px}.care-contact-list{display:grid;gap:6px;margin-top:10px;max-height:520px;overflow:auto}.care-contact{align-items:center;background:transparent;border:1px solid transparent;color:var(--ink);display:flex;gap:10px;justify-content:space-between;min-height:64px;padding:10px;text-align:left;width:100%}.care-contact:hover{background:#f1f8f6}.care-contact.active{background:#e6f5f2;border-color:#92cfc7}.care-contact span:first-child{display:grid;gap:4px;min-width:0}.care-contact strong,.care-contact small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.care-contact small{color:var(--muted);font-style:normal}.care-contact-meta{align-items:flex-end;display:flex;flex-direction:column;gap:6px}.care-consent-dot{background:#94a3b8;border-radius:50%;display:block;height:9px;width:9px}.care-consent-dot.opted_in{background:#16a34a}.care-consent-dot.opted_out{background:#dc2626}.care-conversation-panel{display:flex;flex-direction:column;overflow:hidden}.care-conversation-heading{align-items:flex-start;border-bottom:1px solid var(--line);display:flex;gap:12px;justify-content:space-between;padding:18px}.care-conversation-heading h3{margin:0 0 5px}.care-conversation-heading p{color:var(--muted);font-size:13px;margin:0}.care-consent{border-radius:999px;font-size:11px;font-weight:900;padding:7px 9px;white-space:nowrap}.care-consent.unknown{background:#f1f5f9;color:#475569}.care-consent.opted_in{background:#dcfce7;color:#166534}.care-consent.opted_out{background:#fee2e2;color:#991b1b}.care-message-timeline{background:#f7faf9;display:flex;flex-direction:column;gap:10px;height:300px;overflow:auto;padding:18px}.care-message{border-radius:14px;box-shadow:0 3px 12px rgba(16,37,34,.07);max-width:82%;padding:11px 13px}.care-message.outbound{align-self:flex-end;background:#dff4ef;border-bottom-right-radius:4px}.care-message.inbound{align-self:flex-start;background:#fff;border-bottom-left-radius:4px}.care-message p{line-height:1.45;margin:0 0 5px;white-space:pre-wrap}.care-message small{color:var(--muted)}.care-empty{color:var(--muted);margin:auto;max-width:360px;padding:36px;text-align:center}.care-empty strong{color:var(--ink);font-size:18px}.care-composer{border-top:1px solid var(--line);display:grid;gap:10px;padding:16px}.care-composer textarea{resize:vertical}.care-composer>small{color:var(--muted);text-align:right}.care-composer-actions{display:flex;gap:8px;justify-content:flex-end}.care-safety-note{background:#f8fafc;border-left:3px solid #94a3b8;color:var(--muted);font-size:12px;margin:0;padding:9px 11px}.care-profile-panel{align-content:start;display:grid;gap:13px;padding:16px}.care-profile-panel h3{margin:0}.care-profile-panel hr{border:0;border-top:1px solid var(--line);margin:4px 0;width:100%}.care-playbook{display:grid;gap:18px;padding:20px}.care-playbook>div>h3{margin:3px 0 5px}.care-playbook>div>p:last-child{color:var(--muted);margin:0}.care-playbook form{align-items:end;display:grid;gap:12px;grid-template-columns:1fr 1fr auto}.care-playbook form .wide{grid-column:1/3}.care-template-list{display:grid;gap:9px}.care-template-list article{background:#f7faf9;border:1px solid var(--line);border-radius:10px;padding:12px}.care-template-list article div{align-items:center;display:flex;gap:10px;justify-content:space-between}.care-template-list article small{color:var(--muted)}.care-template-list article p{color:#344541;line-height:1.45;margin:8px 0 0;white-space:pre-wrap}
@media(max-width:1100px){.care-contact-form{grid-template-columns:repeat(2,minmax(0,1fr))}.care-contact-form button{justify-self:start}.care-workspace{grid-template-columns:minmax(220px,280px) 1fr}.care-profile-panel{grid-column:1/-1;grid-template-columns:repeat(2,minmax(0,1fr))}.care-profile-panel h3,.care-profile-panel hr{grid-column:1/-1}}
@media(max-width:760px){.care-heading{display:grid}.care-mode{justify-self:start}.care-workspace{grid-template-columns:1fr}.care-contact-list{max-height:280px}.care-profile-panel{grid-column:auto;grid-template-columns:1fr}.care-contact-form,.care-playbook form{grid-template-columns:1fr}.care-playbook form .wide{grid-column:auto}.care-composer-actions{align-items:stretch;flex-direction:column}.care-message{max-width:94%}}

/* 2026 blue visual system refresh. Style-only: shared workflows and behavior are unchanged. */
:root {
  --ink: #172033;
  --muted: #66758a;
  --line: #d8e1ec;
  --panel: #ffffff;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --radius: 16px;
  --shadow-sm: 0 8px 26px rgba(30, 64, 175, 0.07);
  --shadow-md: 0 20px 52px rgba(30, 64, 175, 0.13);
}

body {
  background:
    radial-gradient(circle at 8% -8%, rgba(59, 130, 246, 0.13), transparent 31rem),
    linear-gradient(180deg, #f8faff 0, #f3f6fb 25rem, #f6f8fb 100%);
}

.auth-screen { background: #0b1730; }
.auth-panel { background: rgba(15, 31, 61, 0.94); border-color: rgba(147, 197, 253, 0.3); border-radius: 18px; box-shadow: 0 30px 90px rgba(2, 6, 23, 0.42); }
.auth-intro,.auth-message,.auth-panel label { color: #c9d7ec; }
.text-button { color: #60a5fa; }
.password-toggle { background: #e8f0ff; color: #1d4ed8; }

.topbar {
  background: linear-gradient(120deg, #0b1730 0%, #142b52 62%, #17396b 100%);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.2);
}
.brand-mark { background: linear-gradient(145deg, #60a5fa, #2563eb); box-shadow: 0 8px 22px rgba(2, 6, 23, 0.28); }
.account-bar small,.topbar .eyebrow { color: #b9cbe5; }
.topbar-button { background: rgba(255,255,255,.94); color: #173b72; }
.topbar-button:hover { background: #fff; box-shadow: 0 5px 16px rgba(2,6,23,.18); }

main { max-width: 1380px; padding-top: 22px; }
.workspace-tabs { border-color: rgba(203, 213, 225, .9); box-shadow: 0 8px 25px rgba(30, 64, 175, .07); scrollbar-color: #94a3b8 transparent; }
.workspace-tab { border-radius: 10px; padding-inline: 18px; }
.workspace-tab.active { background: linear-gradient(135deg, #2563eb, #1d4ed8); box-shadow: 0 7px 18px rgba(37, 99, 235, .24); }
.workspace-status { background: rgba(239, 246, 255, .96); border-color: #bfdbfe; color: #1e4e8c; }
.status-dot { background: #3b82f6; box-shadow: 0 0 0 4px rgba(59, 130, 246, .13); }

input,textarea,select { background: #fff; border-color: #cbd5e1; border-radius: 10px; }
button,.secondary { border-radius: 10px; }
button:focus-visible,.secondary:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible { outline-color: rgba(37, 99, 235, .25); }
.primary { background: linear-gradient(135deg, #2563eb, #1d4ed8); box-shadow: 0 5px 14px rgba(37, 99, 235, .17); }
.primary:not(:disabled):hover { box-shadow: 0 8px 20px rgba(37, 99, 235, .24); }
.secondary { background: #eaf1fb; color: #1e4e8c; }
.secondary:hover { background: #dce9f9; }
.icon-button { background: #e8f0ff; color: #1d4ed8; }

.source-tools,.import-panel,.manual-panel { background: #f8faff; border-radius: 12px; }
.team-view,.access-view { border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.team-summary,.summary,.lead-scorecards { border-radius: 14px; box-shadow: 0 5px 18px rgba(30, 64, 175, .05); }
.team-summary div,.summary div { background: linear-gradient(180deg, #fff, #fbfcff); }
.vehicle-card:hover { border-color: #adc7ed; }
.photo,.posting-photos a,.lead-vehicle-photo { background: #e9eff8; }
.posting-header { background: linear-gradient(120deg, #0b1730, #17396b); }
.posting-dialog::backdrop,.lead-dialog::backdrop { background: rgba(11, 23, 48, .58); }
.required-checklist { background: #eff6ff; border-color: #bfdbfe; }

.lead-hero { background: linear-gradient(135deg, #102a56 0%, #1d4ed8 68%, #3b82f6 100%); box-shadow: 0 16px 38px rgba(30, 64, 175, .16); }
.lead-hero p:last-child { color: #dbeafe; }
.lead-new-button { color: #1d4ed8; box-shadow: 0 7px 20px rgba(15, 23, 42, .18); }
.lead-scorecards button { align-items: flex-start; flex-direction: column; gap: 2px; justify-content: center; padding: 16px 22px; }
.lead-scorecards button:hover { background: #f5f8ff; transform: none; }
.lead-filter-chips button { background: #eaf1fb; color: #355b8c; }
.lead-filter-chips button.active { background: #2563eb; }
.lead-card { border-left-color: #74a7ea; border-radius: 14px; box-shadow: 0 5px 18px rgba(30, 64, 175, .05); }
.lead-photo-placeholder { color: #2563eb; }
.lead-status-pill { background: #e8f0ff; color: #1d4ed8; }
.lead-empty { border-color: #9dbce8; }
.lead-dialog { border-radius: 18px; box-shadow: 0 24px 80px rgba(15, 23, 42, .3); }
.lead-dialog-heading .eyebrow { color: #2563eb; }

.rescue-card,.rescue-import { border-radius: 14px; box-shadow: var(--shadow-sm); }
.rescue-match { background: #f2f7ff; }
.companion-hero { background: linear-gradient(135deg, #0b1730, #17396b); box-shadow: 0 18px 45px rgba(15, 23, 42, .2); }
.companion-hero p:last-child { color: #cbdaf0; }
.companion-card { box-shadow: 0 10px 30px rgba(30, 64, 175, .07); }
.companion-card.featured { background: linear-gradient(180deg, #f4f8ff, #fff); border-color: #9dbce8; }
.companion-step { background: #e8f0ff; color: #1d4ed8; }
.companion-note { background: #eff6ff; border-color: #bfdbfe; color: #355b8c; }

.care-heading { background: linear-gradient(135deg, #0b1730, #1d4ed8 72%, #3b82f6); box-shadow: 0 16px 38px rgba(30, 64, 175, .16); }
.care-heading p:last-child { color: #dbeafe; }
.care-mode { background: #eff6ff; color: #1e4e8c; }
.care-agent-controls{align-items:flex-end;display:grid;gap:10px;justify-items:end;position:relative;z-index:1}.care-agent-controls label{color:#dbeafe;font-size:11px;font-weight:900;letter-spacing:.04em;text-transform:uppercase}.care-agent-controls select{background:#fff;border-color:rgba(255,255,255,.55);color:#172033;margin-top:5px;min-width:150px}.care-inbox-filters{display:flex;flex-wrap:wrap;gap:6px;padding:10px 4px 2px}.care-inbox-filters button{background:#eff4fb;border:1px solid transparent;border-radius:999px;color:#516178;font-size:11px;font-weight:850;padding:7px 9px}.care-inbox-filters button:hover{background:#e5edfa}.care-inbox-filters button.active{background:#2563eb;color:#fff}.care-contact span:first-child em{color:#8390a3;font-size:10px;font-style:normal;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.care-owner-control{display:grid;gap:8px}.care-owner-control button{justify-self:start}
.care-contacts-panel,.care-conversation-panel,.care-profile-panel,.care-playbook,.care-import-panel { border-radius: 16px; }
.care-contact:hover { background: #f3f7fd; }
.care-contact.active { background: #eaf2ff; border-color: #93b4e7; }
.care-message-timeline,.care-template-list article { background: #f7f9fc; }
.care-message { box-shadow: 0 3px 12px rgba(30, 64, 175, .07); }
.care-message.outbound { background: #e3edff; }
.care-conversation-actions{align-items:flex-end;display:flex;flex-direction:column;gap:8px}.care-system-event{align-self:center;background:#eef2f7;border:1px solid #d9e1ec;border-radius:999px;color:#40526b;display:grid;gap:2px;max-width:92%;padding:7px 12px;text-align:center}.care-system-event strong{font-size:11px}.care-system-event small{color:#6b7b91;font-size:10px}.care-message.delivery-failed{background:#fee2e2;border:1px solid #fecaca}.care-conversation-actions .compact-button{font-size:11px;padding:6px 9px}
.care-message-triage{align-self:flex-start;background:#eaf1fb;border-radius:999px;color:#355b8c;display:inline-flex;font-size:10px;font-weight:850;margin:0 0 7px;padding:4px 7px;text-transform:capitalize}.care-message-triage.high{background:#fff3cd;color:#8a5a00}.care-message-triage.urgent{background:#fee2e2;color:#991b1b}.care-reply-assistant{background:linear-gradient(145deg,#f5f9ff,#fff);border:1px solid #b9cdef;border-radius:14px;display:grid;gap:9px;margin:14px 16px 0;padding:14px}.care-reply-assistant[hidden]{display:none}.care-assistant-heading{align-items:flex-start;display:flex;gap:12px;justify-content:space-between}.care-assistant-heading h4{font-size:16px;margin:3px 0 0}.care-assistant-label{color:#2563eb;font-size:10px;font-weight:900;letter-spacing:.08em;text-transform:uppercase}.care-priority{background:#eaf1fb;border-radius:999px;color:#355b8c;font-size:10px;font-weight:900;padding:6px 8px;text-transform:capitalize}.care-priority.high{background:#fff3cd;color:#8a5a00}.care-priority.urgent{background:#fee2e2;color:#991b1b}.care-assistant-route{color:#43546c;font-size:12px;font-weight:800;margin:0}.care-assistant-guardrail{background:#eaf1fb;border-radius:9px;color:#244f83;font-size:12px;font-weight:800;margin:0;padding:8px 10px}.care-assistant-guardrail.escalate{background:#fff3cd;color:#7a5000}.care-assistant-guardrail.blocked{background:#fee2e2;color:#991b1b}.care-assistant-guardrail.handled{background:#dcfce7;color:#166534}.care-reply-assistant ul{color:#516178;font-size:12px;margin:0;padding-left:19px}.care-assistant-suggestion{background:#fff;border:1px solid #d8e3f4;border-radius:10px;display:grid;gap:7px;padding:10px}.care-assistant-suggestion p{line-height:1.45;margin:0;white-space:pre-wrap}.care-assistant-suggestion button{justify-self:start}.care-reply-assistant>small,.care-inbound-capture>small{color:var(--muted)}.care-inbound-capture{border-top:1px solid var(--line);padding:12px 16px}.care-inbound-capture summary{color:#355b8c;cursor:pointer;font-size:12px;font-weight:850}.care-inbound-capture[open]{display:grid;gap:9px}.care-inbound-capture label{margin-top:3px}.care-inbound-capture textarea{resize:vertical}.care-inbound-capture button{justify-self:start}
.care-autopilot-panel{align-items:center;background:linear-gradient(135deg,#f8fbff,#eef5ff);border:1px solid #bfd2f0;border-radius:16px;display:flex;gap:24px;justify-content:space-between;padding:17px 19px}.care-autopilot-panel h3{margin:3px 0 5px}.care-autopilot-panel p:last-child{color:var(--muted);margin:0;max-width:760px}.care-autopilot-policy{align-items:flex-end;display:grid;gap:7px;justify-items:end;min-width:260px;text-align:right}.care-autopilot-policy small{color:var(--muted);font-size:11px}.care-autopilot-state{background:#eef2f7;border-radius:999px;color:#40526b;font-size:11px;font-weight:900;padding:7px 10px}.care-autopilot-state.stopped{background:#fee2e2;color:#991b1b}.care-autopilot-state.active{background:#dcfce7;color:#166534}.care-autopilot-state.standby{background:#fff3cd;color:#7a5000}.care-message.automated{border:1px solid #93b4e7}.care-message-automation{background:#1d4ed8;border-radius:999px;color:#fff;display:inline-flex;font-size:9px;font-weight:900;letter-spacing:.04em;margin-bottom:7px;padding:4px 7px;text-transform:uppercase}

@media (max-width: 760px) {
  .topbar { align-items: center; min-height: 70px; }
  .account-bar { align-items: center; flex-direction: row; flex-wrap: wrap; justify-content: flex-end; }
  .account-bar > div { display: none; }
  .workspace-tabs { top: 78px; }
  .lead-hero,.care-heading,.companion-hero { border-radius: 16px; padding: 21px; }
  .care-agent-controls{justify-items:start}.care-autopilot-panel{align-items:flex-start;display:grid}.care-autopilot-policy{justify-items:start;min-width:0;text-align:left}.care-inbox-filters{flex-wrap:nowrap;overflow-x:auto;padding-bottom:7px}.care-inbox-filters button{white-space:nowrap}
  .summary,.team-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary div,.team-summary div { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
  .summary div:nth-child(2n),.team-summary div:nth-child(2n) { border-right: 0; }
  .summary div:nth-last-child(-n+2),.team-summary div:nth-last-child(-n+2) { border-bottom: 0; }
}

@media (max-width: 520px) {
  .topbar { min-height: 64px; }
  .workspace-tabs { top: 8px; }
}

