:root {
  --brand: #c61d23;
  --brand-dark: #9f151a;
  --brand-soft: #fff0f0;
  --brand-wash: #fff8f7;
  --ink: #20242a;
  --ink-soft: #414750;
  --muted: #727982;
  --muted-light: #989ea6;
  --canvas: #f6f5f2;
  --surface: #ffffff;
  --surface-alt: #faf9f7;
  --line: #e7e5e1;
  --line-strong: #d9d6d0;
  --sidebar: #202327;
  --sidebar-elevated: #2a2e33;
  --sidebar-line: rgba(255, 255, 255, 0.09);
  --teal: #168a78;
  --teal-soft: #e8f6f3;
  --amber: #c98016;
  --amber-soft: #fff4df;
  --blue: #3678a8;
  --blue-soft: #eaf4fb;
  --purple: #7456a3;
  --purple-soft: #f2edf9;
  --danger: #c23c42;
  --danger-soft: #fdecee;
  --shadow-xs: 0 1px 2px rgba(28, 29, 31, 0.04);
  --shadow-sm: 0 5px 18px rgba(32, 34, 37, 0.06);
  --shadow-md: 0 16px 44px rgba(31, 32, 35, 0.12);
  --shadow-lg: 0 28px 70px rgba(20, 21, 23, 0.2);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --sidebar-width: 264px;
  --topbar-height: 76px;
  --ease: 180ms ease;
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light;
}

/* Live Interakt / WhatsApp workspace */
.whatsapp-page {
  display: grid;
  gap: 1.25rem;
}

.whatsapp-setup-state {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  border-left: 4px solid #f59e0b;
}

.whatsapp-setup-state__icon {
  display: grid;
  width: 3rem;
  height: 3rem;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  background: #16794a;
  border-radius: 50%;
}

.whatsapp-setup-state__icon .app-icon { width: 1.5rem; height: 1.5rem; }
.whatsapp-setup-state > div { flex: 1; }
.whatsapp-setup-state h2,
.whatsapp-empty-state h2 { margin: 0 0 .35rem; font-size: 1.1rem; }
.whatsapp-setup-state p,
.whatsapp-empty-state p { margin: 0; color: var(--muted, #65717e); }

.whatsapp-filter-panel { overflow: visible; }
.whatsapp-filter-form {
  display: grid;
  grid-template-columns: minmax(15rem, 1fr) minmax(18rem, 1.35fr) auto;
  align-items: end;
  gap: 1rem;
  padding: 1.25rem;
}

.whatsapp-filter-form .form-field { margin: 0; }

.whatsapp-compose-grid {
  display: grid;
  grid-template-columns: minmax(19rem, .85fr) minmax(32rem, 1.4fr);
  gap: 1.25rem;
  align-items: start;
}

.whatsapp-template-card,
.whatsapp-recipient-card,
.whatsapp-confirm-card { overflow: hidden; }

.whatsapp-template-card { padding-bottom: 1.25rem; }
.whatsapp-template-card > .form-field,
.whatsapp-template-preview,
.whatsapp-template-meta,
.whatsapp-variable-help { margin-left: 1.25rem; margin-right: 1.25rem; }

.whatsapp-template-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  margin-bottom: 1rem;
}

.whatsapp-template-meta > div {
  padding: .75rem;
  border: 1px solid var(--border, #e1e5e9);
  border-radius: .65rem;
  background: #fafbfc;
}

.whatsapp-template-meta span,
.whatsapp-template-preview small {
  display: block;
  margin-bottom: .2rem;
  color: var(--muted, #65717e);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.whatsapp-template-meta strong { overflow-wrap: anywhere; }
.whatsapp-template-preview {
  margin-bottom: .75rem;
  padding: .85rem 1rem;
  color: #263238;
  background: #f1f8f4;
  border-left: 3px solid #1a9b5b;
  border-radius: .4rem;
}
.whatsapp-template-preview p { margin: 0; white-space: pre-wrap; }

.whatsapp-variable-help {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-bottom: 1rem;
  padding: .85rem;
  background: #f8fafc;
  border-radius: .65rem;
}
.whatsapp-variable-help strong { flex-basis: 100%; font-size: .8rem; }
.whatsapp-variable-help code {
  padding: .22rem .4rem;
  color: #126c43;
  background: #e6f5ed;
  border-radius: .3rem;
  font-size: .72rem;
}

.whatsapp-recipient-card { min-width: 0; }
.whatsapp-selection-count { color: var(--muted, #65717e); white-space: nowrap; }
.whatsapp-selection-count strong { color: #16794a; font-size: 1.05rem; }
.whatsapp-recipient-toolbar {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--line, #e1e5e9);
  background: #fafbfc;
}
.whatsapp-recipient-toolbar .search-field { max-width: none; }
.whatsapp-recipient-toolbar .button { flex: 0 0 auto; }
.whatsapp-recipient-table-shell { max-height: 31rem; overflow: auto; }
.whatsapp-recipient-table thead { position: sticky; top: 0; z-index: 1; }
.whatsapp-recipient-table input[type="checkbox"] { width: 1rem; height: 1rem; accent-color: #16794a; }
.whatsapp-select-page {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-width: 6.25rem;
  cursor: pointer;
  white-space: nowrap;
}
.whatsapp-select-page span { font-size: .68rem; font-weight: 700; text-transform: none; }
.whatsapp-recipient-footer { border-top: 1px solid var(--line, #e1e5e9); }
.whatsapp-recipient-footer .page-link.disabled { opacity: .45; cursor: not-allowed; }

.whatsapp-confirm-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr minmax(18rem, 1.1fr) minmax(18rem, .8fr);
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem;
  border-top: 3px solid #16794a;
}
.whatsapp-confirm-card h2 { margin: .15rem 0 0; }
.whatsapp-confirm-card .admin-security-note { margin: 0; }
.whatsapp-live-confirm { margin: 0 0 .75rem; }
.whatsapp-confirm-card .button { grid-column: 3; }

.whatsapp-empty-state {
  padding: 2.5rem 1.25rem;
  text-align: center;
}
.whatsapp-empty-state > .app-icon { width: 2rem; height: 2rem; margin-bottom: .75rem; color: #16794a; }
.whatsapp-empty-state--compact { padding: 2rem 1rem; }
.whatsapp-empty-state--compact strong,
.whatsapp-empty-state--compact span { display: block; }
.whatsapp-empty-state--compact span { margin-top: .25rem; color: var(--muted, #65717e); }
.whatsapp-history-panel { overflow: hidden; }
.admin-summary-action { margin: 1rem 0 .65rem; }

@media (max-width: 1100px) {
  .whatsapp-compose-grid { grid-template-columns: 1fr; }
  .whatsapp-confirm-card { grid-column: auto; grid-template-columns: 1fr; }
  .whatsapp-confirm-card .button { grid-column: auto; }
}

@media (max-width: 760px) {
  .whatsapp-filter-form { grid-template-columns: 1fr; }
  .whatsapp-setup-state { align-items: flex-start; flex-wrap: wrap; }
  .whatsapp-template-meta { grid-template-columns: 1fr; }
  .whatsapp-compose-grid { display: block; }
  .whatsapp-compose-grid > .panel { margin-bottom: 1rem; }
  .whatsapp-recipient-toolbar { align-items: stretch; flex-wrap: wrap; }
  .whatsapp-recipient-toolbar .search-field { flex-basis: 100%; }
  .whatsapp-recipient-footer { align-items: flex-start; flex-direction: column; }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: inherit;
  font-size: 0.94rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.app-body {
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button,
label,
select {
  -webkit-tap-highlight-color: transparent;
}

button,
[role="button"] {
  cursor: pointer;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  color: var(--brand-dark);
}

img,
svg {
  display: block;
}

svg {
  width: 1.3rem;
  height: 1.3rem;
}

strong,
h1,
h2,
h3,
h4 {
  font-weight: 700;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 2000;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  color: #fff;
  background: var(--brand);
  box-shadow: var(--shadow-md);
  transform: translateY(-180%);
  transition: transform var(--ease);
}

.skip-link:focus {
  color: #fff;
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid rgba(198, 29, 35, 0.24);
  outline-offset: 2px;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Application shell */
.nav-toggle-control {
  position: fixed;
  opacity: 0;
  pointer-events: none;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  z-index: 60;
  top: 0;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  height: 100vh;
  padding: 0 16px 18px;
  overflow: hidden auto;
  color: #e9ebed;
  background:
    radial-gradient(circle at 12% 4%, rgba(198, 29, 35, 0.2), transparent 22%),
    linear-gradient(180deg, #24272b 0%, #1c1f22 100%);
  border-right: 1px solid rgba(0, 0, 0, 0.22);
  scrollbar-width: thin;
  scrollbar-color: #464a4f transparent;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  min-height: var(--topbar-height);
  padding: 0 8px;
  border-bottom: 1px solid var(--sidebar-line);
}

.brand-mark,
.mobile-brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  color: #fff;
}

.brand-mark:hover,
.mobile-brand:hover {
  color: #fff;
}

.brand-emblem {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 39px;
  height: 39px;
  color: #fff;
  background: linear-gradient(135deg, #e13439, var(--brand));
  border-radius: 11px;
  box-shadow: 0 7px 18px rgba(198, 29, 35, 0.28);
}

.brand-emblem svg {
  width: 26px;
  height: 26px;
}

.brand-copy {
  display: grid;
  margin-left: 11px;
}

.brand-copy strong,
.mobile-brand strong {
  font-size: 1.05rem;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.brand-copy strong span,
.mobile-brand strong span {
  color: #f05a5f;
}

.brand-copy small {
  margin-top: 1px;
  color: #8f969d;
  font-size: 0.66rem;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.sidebar-close,
.mobile-menu-button,
.mobile-brand {
  display: none;
}

.sidebar-nav {
  padding-top: 18px;
}

.nav-eyebrow {
  margin: 0 11px 8px;
  color: #767d85;
  font-size: 0.66rem;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.nav-eyebrow-secondary {
  margin-top: 24px;
}

.sidebar-link {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  min-height: 46px;
  margin-bottom: 3px;
  padding: 0 12px;
  color: #abb0b6;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 620;
  transition: color var(--ease), background var(--ease), border-color var(--ease), transform var(--ease);
}

.sidebar-link > svg {
  width: 20px;
  height: 20px;
  transition: color var(--ease);
}

.sidebar-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.055);
  transform: translateX(1px);
}

.sidebar-link.is-active {
  color: #fff;
  background: linear-gradient(90deg, rgba(198, 29, 35, 0.24), rgba(198, 29, 35, 0.11));
  border-color: rgba(229, 57, 63, 0.16);
}

.sidebar-link.is-active::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: -16px;
  width: 3px;
  content: "";
  background: #e3343a;
  border-radius: 0 4px 4px 0;
}

.sidebar-link.is-active > svg {
  color: #ed4f54;
}

.nav-count {
  min-width: 24px;
  padding: 2px 7px;
  color: #ffb7b9;
  background: rgba(198, 29, 35, 0.2);
  border-radius: 999px;
  font-size: 0.67rem;
  font-weight: 750;
  text-align: center;
}

.sidebar-spacer {
  flex: 1 1 24px;
  min-height: 20px;
}

.sidebar-goal {
  display: flex;
  gap: 11px;
  margin: 0 2px 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--sidebar-line);
  border-radius: 13px;
}

.goal-icon {
  display: grid;
  flex: 0 0 34px;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #ff777b;
  background: rgba(198, 29, 35, 0.14);
  border-radius: 10px;
}

.goal-icon svg {
  width: 18px;
  height: 18px;
}

.goal-copy {
  min-width: 0;
  flex: 1;
}

.goal-copy > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  font-size: 0.76rem;
}

.goal-copy > div:first-child span {
  color: #ff8589;
  font-size: 0.71rem;
  font-weight: 750;
}

.goal-copy small {
  display: block;
  margin-top: 6px;
  color: #8e949b;
  font-size: 0.66rem;
}

.progress-track,
.progress-bar-track {
  height: 5px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
}

.progress-track > span,
.progress-bar-track > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #d92c32, #f06469);
  border-radius: inherit;
}

.sidebar-more {
  display: grid;
  place-items: center;
  padding: 3px;
  color: #858b91;
  background: none;
  border: 0;
  border-radius: 6px;
}

.sidebar-more:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.nav-scrim {
  display: none;
}

.app-main {
  min-width: 0;
}

.topbar {
  position: sticky;
  z-index: 40;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--topbar-height);
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.topbar-leading {
  display: flex;
  flex: 1;
  align-items: center;
  min-width: 0;
}

.global-search {
  display: flex;
  align-items: center;
  width: min(430px, 44vw);
  height: 42px;
  padding: 0 12px;
  color: var(--muted);
  background: #f7f6f4;
  border: 1px solid #ebe9e5;
  border-radius: 10px;
  transition: background var(--ease), border-color var(--ease), box-shadow var(--ease);
}

.global-search:focus-within {
  background: #fff;
  border-color: rgba(198, 29, 35, 0.36);
  box-shadow: 0 0 0 3px rgba(198, 29, 35, 0.08);
}

.global-search > svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}

.global-search input {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0 10px;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: none;
  font-size: 0.84rem;
}

.global-search input::placeholder {
  color: #9a9ea3;
}

.global-search kbd {
  flex: 0 0 auto;
  padding: 3px 6px;
  color: #8b8f95;
  background: #fff;
  border: 1px solid #dfdcd7;
  border-radius: 5px;
  box-shadow: 0 1px 0 #d5d2cd;
  font: 600 0.63rem/1.2 inherit;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: 18px;
}

.today-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  padding: 0 13px;
  color: var(--muted);
  border-right: 1px solid var(--line);
}

.today-chip > svg {
  width: 18px;
  height: 18px;
}

.today-chip > span {
  display: grid;
  line-height: 1.18;
}

.today-chip small {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.today-chip strong {
  color: var(--ink-soft);
  font-size: 0.75rem;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: color var(--ease), background var(--ease), border-color var(--ease);
}

.icon-button:hover {
  color: var(--brand);
  background: var(--brand-soft);
  border-color: rgba(198, 29, 35, 0.16);
}

.notification-button {
  position: relative;
}

.notification-button > svg {
  width: 19px;
  height: 19px;
}

.notification-dot {
  position: absolute;
  top: -4px;
  right: -4px;
  display: grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  color: #fff;
  background: var(--brand);
  border: 2px solid #fff;
  border-radius: 999px;
  font-size: 0.55rem;
  font-weight: 800;
}

.profile-button {
  display: grid;
  grid-template-columns: 36px auto 16px;
  gap: 9px;
  align-items: center;
  min-height: 46px;
  padding: 4px 6px 4px 8px;
  background: transparent;
  border: 0;
  border-radius: 11px;
  text-align: left;
  transition: background var(--ease);
}

.profile-button:hover {
  background: #f5f4f2;
}

.profile-button > svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.avatar,
.customer-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #fff;
  background: linear-gradient(135deg, #353a40, #646b73);
  border-radius: 10px;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.03em;
}

.profile-copy {
  display: grid;
  line-height: 1.25;
}

.profile-copy strong {
  color: var(--ink);
  font-size: 0.78rem;
}

.profile-copy small {
  color: var(--muted);
  font-size: 0.66rem;
}

.page-content {
  width: 100%;
  max-width: 1680px;
  min-height: calc(100vh - var(--topbar-height));
  margin: 0 auto;
  padding: 28px 30px 48px;
}

.mobile-bottom-nav {
  display: none;
}

/* Page headings and general layout */
.page,
.dashboard-page,
.calls-page,
.customers-page,
.upload-page,
.reports-page,
.templates-page {
  animation: page-in 360ms ease both;
}

@keyframes page-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-head,
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.page-head h1,
.page-header h1 {
  margin: 0;
  color: #1f2227;
  font-size: clamp(1.55rem, 2vw, 2rem);
  line-height: 1.17;
  letter-spacing: -0.04em;
}

.page-head p,
.page-header p,
.page-subtitle {
  max-width: 720px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.page-eyebrow,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
  color: var(--brand);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-head-actions,
.page-actions,
.toolbar-actions,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}

.breadcrumb {
  display: flex;
  gap: 7px;
  align-items: center;
  margin: 0 0 7px;
  padding: 0;
  color: var(--muted);
  background: none;
  font-size: 0.73rem;
  list-style: none;
}

.breadcrumb svg {
  width: 12px;
  height: 12px;
}

.section-title {
  margin: 0;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.section-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.stack {
  display: grid;
  gap: 20px;
}

.stack-sm { display: grid; gap: 12px; }
.stack-lg { display: grid; gap: 28px; }
.cluster { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.spacer { flex: 1; }
.muted { color: var(--muted) !important; }
.text-success { color: var(--teal) !important; }
.text-warning { color: var(--amber) !important; }
.text-danger { color: var(--danger) !important; }
.text-brand { color: var(--brand) !important; }

/* Buttons */
.button,
.btn {
  --button-bg: #fff;
  --button-color: var(--ink-soft);
  --button-border: var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 41px;
  padding: 8px 15px;
  color: var(--button-color);
  background: var(--button-bg);
  border: 1px solid var(--button-border);
  border-radius: 9px;
  box-shadow: none;
  font-size: 0.8rem;
  font-weight: 680;
  line-height: 1.2;
  text-decoration: none;
  transition: color var(--ease), background var(--ease), border-color var(--ease), box-shadow var(--ease), transform var(--ease);
}

.button:hover,
.btn:hover {
  color: var(--button-color);
  background: color-mix(in srgb, var(--button-bg) 93%, #000);
  border-color: color-mix(in srgb, var(--button-border) 82%, #000);
  transform: translateY(-1px);
}

.button:active,
.btn:active {
  transform: translateY(0);
}

.button svg,
.btn svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
}

.button-primary,
.btn-primary {
  --button-bg: var(--brand);
  --button-color: #fff;
  --button-border: var(--brand);
  box-shadow: 0 6px 14px rgba(198, 29, 35, 0.16);
}

.button-secondary,
.btn-secondary,
.button-outline,
.btn-outline {
  --button-bg: #fff;
  --button-color: var(--ink-soft);
  --button-border: var(--line-strong);
}

.button-ghost,
.btn-ghost {
  --button-bg: transparent;
  --button-color: var(--muted);
  --button-border: transparent;
}

.button-soft,
.btn-soft {
  --button-bg: var(--brand-soft);
  --button-color: var(--brand);
  --button-border: transparent;
}

.button-success,
.btn-success {
  --button-bg: var(--teal);
  --button-color: #fff;
  --button-border: var(--teal);
}

.button-danger,
.btn-danger {
  --button-bg: var(--danger-soft);
  --button-color: var(--danger);
  --button-border: #f8d5d8;
}

.button-sm,
.btn-sm {
  min-height: 34px;
  padding: 6px 11px;
  border-radius: 8px;
  font-size: 0.72rem;
}

.button-lg,
.btn-lg {
  min-height: 48px;
  padding: 11px 20px;
  font-size: 0.88rem;
}

.button-icon,
.btn-icon {
  width: 38px;
  min-width: 38px;
  padding: 0;
}

.button[disabled],
.btn[disabled],
.button.disabled,
.btn.disabled {
  pointer-events: none;
  opacity: 0.52;
  transform: none;
}

/* Cards, panels, and metrics */
.card,
.panel,
.content-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}

.card-header,
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
}

.card-header h2,
.card-header h3,
.panel-header h2,
.panel-header h3 {
  margin: 0;
  font-size: 0.97rem;
  letter-spacing: -0.02em;
}

.card-header p,
.panel-header p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.card-body,
.panel-body {
  padding: 18px;
}

.card-footer,
.panel-footer {
  padding: 13px 18px;
  background: var(--surface-alt);
  border-top: 1px solid var(--line);
  border-radius: 0 0 var(--radius) var(--radius);
}

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

.kpi-card,
.metric-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 126px;
  padding: 18px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}

.kpi-card:hover,
.metric-card:hover {
  border-color: #ddd9d4;
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.kpi-label,
.metric-label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.kpi-value,
.metric-value {
  display: block;
  color: var(--ink);
  font-size: 1.86rem;
  font-weight: 760;
  line-height: 1;
  letter-spacing: -0.045em;
}

.kpi-note,
.metric-note {
  display: flex;
  gap: 5px;
  align-items: center;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.69rem;
}

.metric-note strong,
.kpi-note strong {
  color: var(--teal);
}

.metric-icon,
.kpi-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 11px;
}

.metric-icon.success,
.kpi-icon.success { color: var(--teal); background: var(--teal-soft); }
.metric-icon.warning,
.kpi-icon.warning { color: var(--amber); background: var(--amber-soft); }
.metric-icon.info,
.kpi-icon.info { color: var(--blue); background: var(--blue-soft); }
.metric-icon.purple,
.kpi-icon.purple { color: var(--purple); background: var(--purple-soft); }

.metric-icon svg,
.kpi-icon svg {
  width: 21px;
  height: 21px;
}

.trend,
.metric-trend {
  display: inline-flex;
  gap: 3px;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 700;
}

.trend svg,
.metric-trend svg { width: 12px; height: 12px; }
.trend-up { color: var(--teal); }
.trend-down { color: var(--danger); }

/* Grids */
.content-grid,
.dashboard-grid,
.split-grid,
.two-column-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(290px, 0.8fr);
  gap: 18px;
  align-items: start;
}

.content-grid.equal,
.split-grid.equal,
.two-column-grid.equal {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-column-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.span-2 { grid-column: span 2; }
.full-width { grid-column: 1 / -1; }

/* Tables */
.table-shell,
.table-card,
.data-table-wrap {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
}

.data-table,
.table-shell table,
.table-card table,
table.table {
  width: 100%;
  margin: 0;
  color: var(--ink-soft);
  border-collapse: collapse;
  border-spacing: 0;
  vertical-align: middle;
}

.data-table thead,
.table-shell thead,
.table-card thead,
.table thead {
  background: #faf9f7;
}

.data-table th,
.table-shell th,
.table-card th,
.table > :not(caption) > * > th {
  height: 46px;
  padding: 10px 15px;
  color: #757a80;
  background: #faf9f7;
  border: 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.66rem;
  font-weight: 750;
  letter-spacing: 0.065em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table td,
.table-shell td,
.table-card td,
.table > :not(caption) > * > td {
  height: 62px;
  padding: 11px 15px;
  background: #fff;
  border: 0;
  border-bottom: 1px solid #efede9;
  font-size: 0.78rem;
  vertical-align: middle;
}

.data-table tbody tr:last-child td,
.table-shell tbody tr:last-child td,
.table-card tbody tr:last-child td,
.table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr,
.table-shell tbody tr,
.table-card tbody tr,
.table tbody tr {
  transition: background var(--ease);
}

.data-table tbody tr:hover td,
.table-shell tbody tr:hover td,
.table-card tbody tr:hover td,
.table tbody tr:hover td {
  background: #fdfcfa;
}

.table-primary {
  display: block;
  color: var(--ink);
  font-weight: 680;
}

.table-secondary {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.69rem;
}

.customer-cell,
.vehicle-cell {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 180px;
}

.customer-avatar {
  width: 34px;
  height: 34px;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 9px;
}

.customer-avatar.teal { color: var(--teal); background: var(--teal-soft); }
.customer-avatar.amber { color: var(--amber); background: var(--amber-soft); }
.customer-avatar.blue { color: var(--blue); background: var(--blue-soft); }

.table-actions {
  display: flex;
  gap: 5px;
  justify-content: flex-end;
}

.table-action {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.table-action:hover {
  color: var(--brand);
  background: var(--brand-soft);
  border-color: #f3cacc;
}

.table-action svg { width: 15px; height: 15px; }

.table-pagination,
.pagination-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 58px;
  padding: 10px 15px;
  color: var(--muted);
  background: #fdfcfa;
  border-top: 1px solid var(--line);
  font-size: 0.71rem;
}

.pagination {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pagination a,
.pagination button,
.page-link {
  display: grid;
  place-items: center;
  min-width: 31px;
  height: 31px;
  padding: 0 8px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 0.7rem;
}

.pagination .active,
.page-link.active {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}

/* Statuses and badges */
.badge,
.status,
.status-pill,
.chip,
.tag,
.priority-pill {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  width: max-content;
  max-width: 100%;
  padding: 4px 8px;
  color: #5f656c;
  background: #f2f1ef;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
}

.badge::before,
.status-pill::before,
.status.has-dot::before {
  width: 6px;
  height: 6px;
  content: "";
  background: currentColor;
  border-radius: 50%;
}

.badge-success,
.status-success,
.status.completed,
.status.contacted,
.chip-success {
  color: #147765;
  background: var(--teal-soft);
  border-color: #ccece5;
}

.badge-warning,
.status-warning,
.status.pending,
.status.follow-up,
.chip-warning,
.priority-medium {
  color: #9b6311;
  background: var(--amber-soft);
  border-color: #f6dfb9;
}

.badge-danger,
.status-danger,
.status.expiring,
.status.overdue,
.chip-danger,
.priority-high {
  color: #ac2d34;
  background: var(--danger-soft);
  border-color: #f7d4d7;
}

.badge-info,
.status-info,
.status.scheduled,
.chip-info {
  color: #2f6e9d;
  background: var(--blue-soft);
  border-color: #d4e8f5;
}

.badge-neutral,
.status-neutral,
.status.not-interested,
.chip-neutral,
.priority-low {
  color: #666c72;
  background: #f1f1ef;
  border-color: #e6e4df;
}

.badge-brand,
.status-brand,
.chip-brand {
  color: var(--brand);
  background: var(--brand-soft);
  border-color: #f5d2d4;
}

/* Filters and forms */
.filter-bar,
.filters,
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.filter-search,
.search-control {
  position: relative;
  display: flex;
  flex: 1 1 240px;
  align-items: center;
  min-width: 190px;
}

.filter-search svg,
.search-control svg {
  position: absolute;
  left: 12px;
  z-index: 1;
  width: 17px;
  height: 17px;
  color: var(--muted);
  pointer-events: none;
}

.filter-search input,
.search-control input {
  padding-left: 38px;
}

.form-group,
.field {
  display: grid;
  gap: 6px;
}

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

.form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-group label,
.field label,
.form-label {
  margin: 0;
  color: #4e545b;
  font-size: 0.71rem;
  font-weight: 700;
}

.form-control,
.form-select,
.field-input,
.filter-select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="date"],
input[type="search"],
select,
textarea {
  width: 100%;
  min-height: 41px;
  padding: 9px 11px;
  color: var(--ink);
  background-color: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  box-shadow: none;
  font-size: 0.79rem;
  transition: border-color var(--ease), box-shadow var(--ease), background var(--ease);
}

textarea,
textarea.form-control {
  min-height: 105px;
  resize: vertical;
}

.form-control:focus,
.form-select:focus,
.field-input:focus,
.filter-select:focus,
input:focus,
select:focus,
textarea:focus {
  background-color: #fff;
  border-color: rgba(198, 29, 35, 0.48);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(198, 29, 35, 0.08);
}

input::placeholder,
textarea::placeholder {
  color: #a1a5aa;
}

.filter-select,
.filters select,
.toolbar select {
  width: auto;
  min-width: 135px;
}

.input-group,
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-group > svg,
.input-wrap > svg {
  position: absolute;
  left: 12px;
  width: 17px;
  height: 17px;
  color: var(--muted);
  pointer-events: none;
}

.input-group > svg + input,
.input-wrap > svg + input {
  padding-left: 39px;
}

.form-hint,
.field-hint {
  color: var(--muted);
  font-size: 0.67rem;
}

.validation-message,
.field-error,
.text-danger.field-validation-error {
  color: var(--danger);
  font-size: 0.67rem;
}

.check-row,
.checkbox-label {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--ink-soft);
  font-size: 0.75rem;
  cursor: pointer;
}

input[type="checkbox"],
input[type="radio"] {
  width: 16px;
  height: 16px;
  min-height: auto;
  accent-color: var(--brand);
}

.segmented-control,
.view-switcher,
.tabs {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  background: #efeeeb;
  border-radius: 9px;
}

.segmented-control button,
.view-switcher button,
.tabs a,
.tab {
  min-height: 32px;
  padding: 6px 11px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-size: 0.71rem;
  font-weight: 650;
}

.segmented-control .active,
.view-switcher .active,
.tabs .active,
.tab.active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* Charts and reports */
.chart-panel,
.report-card {
  min-height: 310px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.chart-head,
.report-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 18px;
}

.chart-head h3,
.report-card-head h3 {
  margin: 0;
  font-size: 0.94rem;
}

.chart-head p,
.report-card-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.7rem;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-size: 0.67rem;
}

.chart-legend span {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}

.legend-dot {
  width: 7px;
  height: 7px;
  background: var(--brand);
  border-radius: 2px;
}

.legend-dot.teal { background: var(--teal); }
.legend-dot.amber { background: var(--amber); }
.legend-dot.gray { background: #b7babd; }

.chart-area,
.chart-placeholder,
.bar-chart {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 10px;
  min-height: 205px;
  padding: 10px 8px 24px 38px;
  border-bottom: 1px solid var(--line);
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 45px, #f0efec 46px);
}

.chart-bar,
.bar-chart > span {
  position: relative;
  width: min(34px, 9%);
  min-height: 4px;
  background: linear-gradient(180deg, #d63a3f, var(--brand));
  border-radius: 5px 5px 2px 2px;
}

.chart-bar.teal { background: linear-gradient(180deg, #32aa96, var(--teal)); }
.chart-bar.amber { background: linear-gradient(180deg, #e6a43e, var(--amber)); }

.chart-bar::after {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  color: var(--muted);
  content: attr(data-label);
  font-size: 0.62rem;
  transform: translateX(-50%);
}

.donut-chart {
  position: relative;
  display: grid;
  place-items: center;
  width: 164px;
  height: 164px;
  margin: 18px auto;
  background: conic-gradient(var(--teal) 0 58%, var(--amber) 58% 78%, var(--brand) 78% 91%, #e8e7e3 91% 100%);
  border-radius: 50%;
}

.donut-chart::before {
  position: absolute;
  width: 104px;
  height: 104px;
  content: "";
  background: #fff;
  border-radius: 50%;
}

.donut-center {
  position: relative;
  z-index: 1;
  display: grid;
  text-align: center;
}

.donut-center strong { font-size: 1.35rem; letter-spacing: -0.04em; }
.donut-center small { color: var(--muted); font-size: 0.65rem; }

.funnel-list {
  display: grid;
  gap: 12px;
}

.funnel-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 42px;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 0.7rem;
}

.funnel-track {
  height: 9px;
  overflow: hidden;
  background: #f0efec;
  border-radius: 999px;
}

.funnel-track span {
  display: block;
  height: 100%;
  background: var(--brand);
  border-radius: inherit;
}

/* Timeline and activity */
.timeline,
.activity-list,
.call-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline-item,
.activity-row,
.call-row,
.list-row {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid #efede9;
}

.timeline-item:last-child,
.activity-row:last-child,
.call-row:last-child,
.list-row:last-child {
  border-bottom: 0;
}

.timeline-icon,
.activity-icon,
.list-icon {
  display: grid;
  flex: 0 0 35px;
  place-items: center;
  width: 35px;
  height: 35px;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 10px;
}

.timeline-icon svg,
.activity-icon svg,
.list-icon svg { width: 17px; height: 17px; }
.timeline-icon.success,
.activity-icon.success { color: var(--teal); background: var(--teal-soft); }
.timeline-icon.warning,
.activity-icon.warning { color: var(--amber); background: var(--amber-soft); }

.timeline-content,
.activity-content,
.list-content {
  min-width: 0;
  flex: 1;
}

.timeline-content strong,
.activity-content strong,
.list-content strong {
  display: block;
  color: var(--ink);
  font-size: 0.77rem;
}

.timeline-content p,
.activity-content p,
.list-content p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.7rem;
}

.timeline-time,
.activity-time,
.list-meta {
  flex: 0 0 auto;
  color: var(--muted-light);
  font-size: 0.65rem;
}

/* Upload experience */
.upload-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.62fr);
  gap: 18px;
  align-items: start;
}

.upload-dropzone,
.drop-zone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 290px;
  padding: 36px 24px;
  color: var(--muted);
  background:
    radial-gradient(circle at 50% 35%, rgba(198, 29, 35, 0.035), transparent 42%),
    #fdfcfa;
  border: 1.5px dashed #cbc7c0;
  border-radius: var(--radius);
  text-align: center;
  transition: color var(--ease), background var(--ease), border-color var(--ease);
}

.upload-dropzone:hover,
.drop-zone:hover,
.upload-dropzone.is-dragging,
.drop-zone.is-dragging {
  color: var(--brand);
  background-color: var(--brand-wash);
  border-color: var(--brand);
}

.upload-icon,
.drop-zone-icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin: 0 auto 17px;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 18px;
}

.upload-icon svg,
.drop-zone-icon svg { width: 28px; height: 28px; }

.upload-dropzone h3,
.drop-zone h3 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 1rem;
}

.upload-dropzone p,
.drop-zone p {
  margin: 0 0 16px;
  font-size: 0.74rem;
}

.upload-dropzone input[type="file"],
.drop-zone input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.sample-download,
.template-download-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 15px;
  color: var(--ink-soft);
  background: var(--teal-soft);
  border: 1px solid #d4ece7;
  border-radius: 11px;
}

.sample-download:hover,
.template-download-card:hover { color: var(--ink); border-color: #a9dad0; }

.sample-download > svg,
.template-download-card > svg {
  flex: 0 0 21px;
  color: var(--teal);
}

.sample-download span,
.template-download-card span { display: grid; min-width: 0; flex: 1; }
.sample-download strong,
.template-download-card strong { font-size: 0.75rem; }
.sample-download small,
.template-download-card small { color: var(--muted); font-size: 0.66rem; }

.upload-steps,
.steps-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.upload-step,
.step-item {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 11px;
  padding: 0 0 22px;
}

.upload-step:not(:last-child)::after,
.step-item:not(:last-child)::after {
  position: absolute;
  top: 30px;
  bottom: 2px;
  left: 14px;
  width: 1px;
  content: "";
  background: var(--line);
}

.step-number {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--muted);
  background: #f2f1ef;
  border-radius: 50%;
  font-size: 0.68rem;
  font-weight: 750;
}

.upload-step.active .step-number,
.step-item.active .step-number {
  color: #fff;
  background: var(--brand);
}

.upload-step.completed .step-number,
.step-item.completed .step-number {
  color: #fff;
  background: var(--teal);
}

.step-copy strong { display: block; margin-top: 4px; font-size: 0.75rem; }
.step-copy small { color: var(--muted); font-size: 0.66rem; }

.upload-result,
.result-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.result-stat {
  padding: 13px;
  background: var(--surface-alt);
  border-radius: 9px;
}

.result-stat strong { display: block; font-size: 1.2rem; }
.result-stat small { color: var(--muted); font-size: 0.66rem; }

/* Customer and call cards */
.customer-grid,
.call-card-grid,
.template-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.customer-card,
.call-card,
.template-card {
  padding: 17px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}

.customer-card:hover,
.call-card:hover,
.template-card:hover {
  border-color: #dad6d0;
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.customer-card-head,
.call-card-head,
.template-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.customer-identity {
  display: flex;
  gap: 10px;
  align-items: center;
}

.customer-identity h3,
.call-card h3,
.template-card h3 {
  margin: 0;
  font-size: 0.85rem;
}

.customer-identity p,
.call-card p,
.template-card p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.68rem;
}

.vehicle-summary,
.customer-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  background: var(--surface-alt);
  border-radius: 9px;
}

.detail-item small {
  display: block;
  color: var(--muted);
  font-size: 0.61rem;
  text-transform: uppercase;
}

.detail-item strong {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  font-size: 0.71rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-divider {
  height: 1px;
  margin: 14px 0;
  background: var(--line);
}

.card-bottom,
.customer-card-actions,
.call-card-actions,
.template-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
}

.warranty-meter {
  display: grid;
  gap: 6px;
}

.warranty-meter-head {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.65rem;
}

.warranty-meter .progress-track {
  height: 6px;
  background: #efede9;
}

/* Message templates */
.template-type {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--teal);
  font-size: 0.67rem;
  font-weight: 700;
}

.template-type svg { width: 15px; height: 15px; }

.template-preview {
  position: relative;
  min-height: 112px;
  padding: 13px;
  color: #51575e;
  background: #f7f6f3;
  border: 1px solid #ece9e4;
  border-radius: 9px;
  font-size: 0.72rem;
  line-height: 1.6;
}

.template-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.65rem;
}

.template-meta span {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.template-meta svg { width: 13px; height: 13px; }

.phone-preview {
  width: min(100%, 280px);
  margin: 0 auto;
  padding: 10px;
  background: #25292d;
  border: 4px solid #34383d;
  border-radius: 27px;
  box-shadow: var(--shadow-md);
}

.phone-screen {
  min-height: 460px;
  padding: 14px 10px;
  background: #e9e4dc;
  border-radius: 18px;
}

.message-bubble {
  margin-top: 60px;
  padding: 11px;
  color: #2f3438;
  background: #dcf8c6;
  border-radius: 9px 9px 2px 9px;
  box-shadow: var(--shadow-xs);
  font-size: 0.68rem;
}

/* Modals and drawers */
.modal-backdrop,
.drawer-backdrop {
  position: fixed;
  z-index: 90;
  inset: 0;
  background: rgba(17, 19, 21, 0.56);
  backdrop-filter: blur(2px);
}

.modal-dialog,
.app-modal {
  position: fixed;
  z-index: 100;
  top: 50%;
  left: 50%;
  width: min(92vw, 560px);
  max-height: 88vh;
  overflow: hidden auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transform: translate(-50%, -50%);
}

.modal-header,
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2,
.drawer-header h2 { margin: 0; font-size: 1rem; }
.modal-body,
.drawer-body { padding: 20px; }
.modal-footer,
.drawer-footer {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 14px 20px;
  background: var(--surface-alt);
  border-top: 1px solid var(--line);
}

.drawer {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  width: min(94vw, 470px);
  height: 100vh;
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.drawer-body { min-height: 0; overflow-y: auto; flex: 1; }

/* Alerts, empty states, and toasts */
.alert,
.notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  color: #2f6e9d;
  background: var(--blue-soft);
  border: 1px solid #d3e7f5;
  border-radius: 9px;
  font-size: 0.73rem;
}

.alert-success { color: #147765; background: var(--teal-soft); border-color: #ccece5; }
.alert-warning { color: #96600f; background: var(--amber-soft); border-color: #f2ddb7; }
.alert-danger { color: #a82e34; background: var(--danger-soft); border-color: #f7d4d7; }
.alert > svg,
.notice > svg { flex: 0 0 auto; width: 18px; height: 18px; }
.alert p,
.notice p { margin: 0; }

.empty-state {
  display: grid;
  place-items: center;
  min-height: 280px;
  padding: 36px 20px;
  color: var(--muted);
  text-align: center;
}

.empty-state-icon {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin-bottom: 14px;
  color: var(--muted);
  background: #f2f1ee;
  border-radius: 18px;
}

.empty-state-icon svg { width: 27px; height: 27px; }
.empty-state h3 { margin: 0 0 5px; color: var(--ink); font-size: 0.92rem; }
.empty-state p { max-width: 380px; margin: 0 0 16px; font-size: 0.73rem; }

.toast-stack {
  position: fixed;
  z-index: 150;
  right: 22px;
  bottom: 22px;
  display: grid;
  gap: 10px;
}

.toast,
.app-toast {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 24px;
  gap: 10px;
  align-items: center;
  width: min(380px, calc(100vw - 32px));
  padding: 12px;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

.toast-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 9px;
}

.toast strong { display: block; font-size: 0.75rem; }
.toast small { display: block; color: var(--muted); font-size: 0.66rem; }

/* Login page (rendered without the application shell) */
.login-page {
  min-height: 100vh;
  background: #f4f3f0;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(430px, 0.92fr) minmax(520px, 1.08fr);
  min-height: 100vh;
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 46px clamp(28px, 5vw, 76px);
  background: #fff;
}

.login-form-wrap,
.login-card {
  width: min(100%, 410px);
}

.login-logo {
  display: inline-flex;
  gap: 11px;
  align-items: center;
  margin-bottom: 48px;
  color: var(--ink);
}

.login-logo .brand-emblem { width: 42px; height: 42px; }
.login-logo strong { font-size: 1.15rem; letter-spacing: -0.04em; }
.login-logo strong span { color: var(--brand); }

.login-heading h1,
.login-card h1 {
  margin: 0 0 9px;
  font-size: clamp(1.8rem, 3vw, 2.25rem);
  letter-spacing: -0.05em;
}

.login-heading p,
.login-card > p {
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 0.83rem;
}

.login-form {
  display: grid;
  gap: 17px;
}

.login-form .form-control,
.login-form input {
  min-height: 49px;
  padding: 11px 13px;
}

.login-form .button,
.login-form .btn {
  width: 100%;
  min-height: 49px;
  margin-top: 4px;
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.login-options a { font-size: 0.73rem; font-weight: 650; }

.login-footer {
  margin-top: 34px;
  color: var(--muted-light);
  font-size: 0.67rem;
}

.login-visual {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 100vh;
  padding: clamp(40px, 6vw, 84px);
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(20, 22, 24, 0.04) 0%, rgba(20, 22, 24, 0.86) 100%),
    radial-gradient(circle at 75% 25%, rgba(198, 29, 35, 0.7), transparent 40%),
    linear-gradient(135deg, #30343a, #111315);
}

.login-visual::before {
  position: absolute;
  inset: 0;
  content: "";
  opacity: 0.2;
  background-image: linear-gradient(120deg, transparent 49.5%, rgba(255, 255, 255, 0.17) 50%, transparent 50.5%);
  background-size: 58px 58px;
}

.login-visual::after {
  position: absolute;
  top: 15%;
  right: -12%;
  width: 55%;
  aspect-ratio: 1;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(255, 255, 255, 0.025), 0 0 0 140px rgba(255, 255, 255, 0.018);
}

.login-visual-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
}

.login-visual-content .eyebrow { color: #ff9da0; }
.login-visual-content h2 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -0.055em;
}

.login-visual-content > p {
  max-width: 520px;
  margin: 0 0 30px;
  color: #bdc2c7;
  font-size: 0.9rem;
}

.login-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
}

.login-stat {
  min-width: 132px;
  padding: 13px 15px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 11px;
  backdrop-filter: blur(8px);
}

.login-stat strong { display: block; font-size: 1rem; }
.login-stat small { color: #aeb4ba; font-size: 0.64rem; }

/* View contracts and page-specific compositions */
[hidden] {
  display: none !important;
}

.app-icon {
  display: inline-block;
  width: 1.1rem;
  height: 1.1rem;
  flex: 0 0 auto;
}

.button--primary {
  --button-bg: var(--brand);
  --button-color: #fff;
  --button-border: var(--brand);
  box-shadow: 0 6px 14px rgba(198, 29, 35, 0.16);
}

.button--secondary {
  --button-bg: #fff;
  --button-color: var(--ink-soft);
  --button-border: var(--line-strong);
}

.button--ghost {
  --button-bg: transparent;
  --button-color: var(--muted);
  --button-border: transparent;
}

.button--whatsapp {
  --button-bg: #e9f8ef;
  --button-color: #127a45;
  --button-border: #c8ead5;
}

.button--wide {
  width: 100%;
}

.text-button,
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  color: var(--brand);
  background: none;
  border: 0;
  font-size: 0.71rem;
  font-weight: 700;
}

.text-link .app-icon,
.text-button .app-icon {
  width: 14px;
  height: 14px;
}

.page-header__subtitle {
  max-width: 700px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.page-header__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}

.eyebrow--light {
  color: #ffb2b4;
}

.panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  min-height: 67px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.panel__header h2,
.panel__header h3 {
  margin: 0;
  font-size: 0.98rem;
  letter-spacing: -0.025em;
}

.panel__header .eyebrow {
  margin-bottom: 3px;
  font-size: 0.61rem;
}

.panel__header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.7rem;
}

.metric-card {
  display: block;
  min-height: 150px;
  padding: 17px;
}

.metric-card__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.metric-card__icon {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 10px;
}

.metric-card__icon .app-icon {
  width: 19px;
  height: 19px;
}

.metric-card > p {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 680;
}

.metric-card > strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 1.75rem;
  line-height: 1;
  letter-spacing: -0.045em;
}

.metric-card > span:last-child {
  color: var(--muted-light);
  font-size: 0.66rem;
}

.metric-card--warning .metric-card__icon {
  color: var(--amber);
  background: var(--amber-soft);
}

.metric-card--info .metric-card__icon {
  color: var(--blue);
  background: var(--blue-soft);
}

.metric-card--success .metric-card__icon {
  color: var(--teal);
  background: var(--teal-soft);
}

.metric-card__context {
  color: var(--muted);
  font-size: 0.63rem;
  font-weight: 700;
}

.trend-pill {
  display: inline-flex;
  gap: 3px;
  align-items: center;
  padding: 3px 6px;
  border-radius: 999px;
  font-size: 0.61rem;
  font-weight: 750;
}

.trend-pill .app-icon {
  width: 11px;
  height: 11px;
}

.trend-pill--up {
  color: var(--teal);
  background: var(--teal-soft);
}

.dashboard-grid--top {
  grid-template-columns: minmax(0, 1.45fr) minmax(330px, 0.8fr);
  margin-bottom: 18px;
}

.dashboard-grid--bottom {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hourly-performance { margin-bottom: 18px; padding-bottom: 14px; }
.hourly-performance__legend { display: flex; gap: 16px; padding: 0 18px 8px; color: var(--muted); font-size: 0.63rem; }
.hourly-performance__legend span { display: inline-flex; gap: 6px; align-items: center; }
.hour-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.hour-dot--connected { background: var(--teal); }
.hour-dot--interested { background: var(--amber); }
.hourly-rows { padding: 0 18px; }
.hourly-row { display: grid; grid-template-columns: 95px minmax(80px, 1fr) 58px minmax(155px, 0.8fr); gap: 14px; align-items: center; min-height: 37px; border-top: 1px solid #f0eeea; }
.hourly-row__label, .hourly-row__detail { color: var(--muted); font-size: 0.65rem; }
.hourly-row__track { height: 7px; overflow: hidden; background: #f0eeea; border-radius: 99px; }
.hourly-row__bar { display: block; height: 100%; min-width: 4px; background: linear-gradient(90deg, var(--brand), #e6776e); border-radius: inherit; }
.hourly-row__calls { color: var(--ink); font-size: 0.68rem; }
.hourly-row__calls small { color: var(--muted); font-size: 0.58rem; font-weight: 550; }
.hourly-row__detail b { color: var(--ink-soft); font-weight: 700; }
.hourly-row__detail b:first-of-type { color: var(--teal); }
.hourly-row__detail b:last-of-type { color: #aa7218; }
.hourly-row__detail i { padding: 0 4px; color: #b8b5af; font-style: normal; }
.hourly-performance__note { margin: 10px 18px 0; color: var(--muted); font-size: 0.59rem; }

.queue-list {
  padding: 2px 18px 7px;
}

.queue-item {
  display: grid;
  grid-template-columns: 36px minmax(145px, 1.2fr) minmax(105px, 0.72fr) auto 38px;
  gap: 11px;
  align-items: center;
  min-height: 69px;
  padding: 10px 0;
  border-bottom: 1px solid #efede9;
}

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

.queue-item__customer,
.queue-item__expiry {
  display: grid;
  min-width: 0;
}

.queue-item__customer strong,
.queue-item__expiry strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.73rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-item__customer span,
.queue-item__expiry small {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.63rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-item__customer .app-icon {
  width: 12px;
  height: 12px;
}

.priority-chip,
.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  padding: 4px 8px;
  color: #666c72;
  background: #f1f1ef;
  border: 1px solid #e5e3df;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 730;
  line-height: 1.2;
  white-space: nowrap;
}

.priority-chip--high,
.status-chip--error,
.status-chip--not-interested {
  color: #aa3036;
  background: var(--danger-soft);
  border-color: #f6d1d4;
}

.priority-chip--medium,
.status-chip--warning,
.status-chip--follow-up,
.status-chip--follow-up-due {
  color: #95600f;
  background: var(--amber-soft);
  border-color: #f2ddb5;
}

.priority-chip--low,
.status-chip--not-contacted,
.status-chip--not-reachable {
  color: #62686e;
  background: #f1f1ef;
  border-color: #e5e3df;
}

.status-chip--interested,
.status-chip--converted,
.status-chip--completed,
.status-chip--imported {
  color: #147765;
  background: var(--teal-soft);
  border-color: #ccebe4;
}

.status-chip--scheduled,
.status-chip--in-progress,
.status-chip--callback {
  color: #2f6e9d;
  background: var(--blue-soft);
  border-color: #d3e8f5;
}

.chart-total {
  display: grid;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.1;
  text-align: right;
}

.chart-total small {
  color: var(--muted);
  font-size: 0.57rem;
  font-weight: 600;
}

.expiry-chart {
  padding: 10px 14px 0;
  color: var(--brand);
}

.expiry-chart__svg {
  width: 100%;
  height: auto;
  min-height: 225px;
  overflow: visible;
}

.expiry-chart__grid line {
  stroke: #e9e7e3;
  stroke-width: 1;
  stroke-dasharray: 3 5;
}

.expiry-chart__area {
  fill: url(#expiry-area-gradient);
}

.expiry-chart__line {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.expiry-chart__point circle {
  fill: #fff;
  stroke: var(--brand);
  stroke-width: 3;
}

.expiry-chart__point.urgent circle,
.expiry-chart__point.danger circle,
.expiry-chart__point.accent-red circle {
  fill: var(--brand);
}

.expiry-chart__value {
  fill: var(--ink-soft);
  font-size: 11px;
  font-weight: 750;
}

.expiry-chart__label {
  fill: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.panel--chart .chart-legend {
  justify-content: center;
  padding: 3px 16px 15px;
}

.legend-dot {
  display: inline-block;
}

.legend-dot--urgent,
.legend-dot--calls,
.legend-dot--interested {
  background: var(--brand);
}

.legend-dot--standard,
.legend-dot--connected,
.legend-dot--followup {
  background: var(--amber);
}

.legend-dot--converted {
  background: var(--teal);
}

.legend-dot--unreachable {
  background: var(--blue);
}

.legend-dot--declined {
  background: #a9adb2;
}

.outcome-chart {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 15px;
  align-items: center;
  padding: 20px 18px;
}

.outcome-chart .donut-chart {
  position: relative;
  display: grid;
  place-items: center;
  width: 136px;
  height: 136px;
  margin: 0;
  background: none;
}

.outcome-chart .donut-chart::before {
  display: none;
}

.outcome-chart .donut-chart > svg {
  width: 136px;
  height: 136px;
  transform: rotate(-90deg);
}

.donut-chart__track,
.donut-chart__segment {
  fill: none;
  stroke-width: 11;
}

.donut-chart__track {
  stroke: #eeece8;
}

.donut-chart__segment {
  stroke-linecap: round;
}

.donut-chart__segment--interested { stroke: var(--brand); }
.donut-chart__segment--followup { stroke: var(--amber); }
.donut-chart__segment--unreachable { stroke: var(--blue); }
.donut-chart__segment--declined { stroke: #a9adb2; }

.outcome-chart .donut-chart > span {
  position: absolute;
  display: grid;
  text-align: center;
}

.outcome-chart .donut-chart > span strong {
  font-size: 1.25rem;
  letter-spacing: -0.04em;
}

.outcome-chart .donut-chart > span small {
  color: var(--muted);
  font-size: 0.62rem;
}

.outcome-legend {
  display: grid;
  gap: 9px;
}

.outcome-legend > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.67rem;
}

.outcome-legend > div span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.outcome-legend > div strong {
  color: var(--ink-soft);
  font-size: 0.7rem;
}

.compact-list {
  padding: 3px 18px 7px;
}

.compact-list__item {
  display: grid;
  grid-template-columns: 37px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 60px;
  padding: 8px 0;
  border-bottom: 1px solid #efede9;
}

.compact-list__item:last-child {
  border-bottom: 0;
}

.date-tile {
  display: grid;
  place-items: center;
  width: 36px;
  height: 41px;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 8px;
  line-height: 1;
}

.date-tile strong { font-size: 0.78rem; }
.date-tile small { font-size: 0.53rem; text-transform: uppercase; }
.compact-list__item > div { display: grid; min-width: 0; }
.compact-list__item > div strong { overflow: hidden; font-size: 0.72rem; text-overflow: ellipsis; white-space: nowrap; }
.compact-list__item > div span { overflow: hidden; margin-top: 2px; color: var(--muted); font-size: 0.62rem; text-overflow: ellipsis; white-space: nowrap; }
.days-chip { color: var(--amber); font-size: 0.61rem; font-weight: 720; }

.live-indicator {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  color: var(--teal);
  font-size: 0.62rem;
  font-weight: 700;
}

.live-indicator i {
  width: 6px;
  height: 6px;
  background: var(--teal);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(22, 138, 120, 0.1);
}

.activity-list {
  padding: 3px 18px 7px;
}

.activity-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid #efede9;
}

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

.activity-item__icon {
  display: grid;
  flex: 0 0 31px;
  place-items: center;
  width: 31px;
  height: 31px;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 8px;
}

.activity-item__icon .app-icon { width: 14px; height: 14px; }
.activity-item__icon.success { color: var(--teal); background: var(--teal-soft); }
.activity-item__icon.warning { color: var(--amber); background: var(--amber-soft); }
.activity-item p { margin: 0; color: var(--ink-soft); font-size: 0.67rem; line-height: 1.45; }
.activity-item p strong { color: var(--ink); }
.activity-item div > span { color: var(--muted); font-size: 0.6rem; }

/* Calls workspace */
.queue-progress {
  display: inline-flex;
  gap: 4px;
  align-items: baseline;
  color: var(--muted);
  font-size: 0.71rem;
}

.queue-progress strong { color: var(--ink); font-size: 0.9rem; }

.status-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.status-summary {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 45px;
  padding: 8px 11px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 0.68rem;
  font-weight: 650;
}

.status-summary:hover,
.status-summary.is-active {
  color: var(--ink-soft);
  border-color: rgba(198, 29, 35, 0.3);
  box-shadow: 0 0 0 2px rgba(198, 29, 35, 0.05);
}

.status-summary strong {
  color: var(--ink);
  font-size: 0.78rem;
}

.status-summary__dot {
  width: 7px;
  height: 7px;
  background: #9ca1a6;
  border-radius: 50%;
}

.status-summary__dot.success,
.status-summary__dot.green,
.status-summary__dot.accent-green { background: var(--teal); }
.status-summary__dot.warning,
.status-summary__dot.amber,
.status-summary__dot.accent-amber { background: var(--amber); }
.status-summary__dot.danger,
.status-summary__dot.red,
.status-summary__dot.accent-red { background: var(--brand); }
.status-summary__dot.info,
.status-summary__dot.blue,
.status-summary__dot.accent-blue { background: var(--blue); }

.table-panel {
  overflow: hidden;
}

.table-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.filter-form {
  display: flex;
  flex: 1;
  gap: 8px;
  align-items: center;
}

.search-field,
.select-field,
.date-range-control {
  position: relative;
  display: flex;
  align-items: center;
}

.search-field {
  flex: 1 1 230px;
  max-width: 330px;
}

.search-field--wide {
  max-width: 430px;
}

.search-field > .app-icon,
.select-field > .app-icon,
.date-range-control > .app-icon {
  position: absolute;
  z-index: 1;
  left: 11px;
  width: 16px;
  height: 16px;
  color: var(--muted);
  pointer-events: none;
}

.search-field input,
.select-field select,
.date-range-control select {
  min-height: 38px;
  padding-top: 7px;
  padding-bottom: 7px;
  padding-left: 35px;
}

.select-field select,
.date-range-control select {
  width: auto;
  min-width: 145px;
  padding-right: 30px;
}

.customer-cell > span:last-child,
.vehicle-cell {
  display: grid;
  min-width: 0;
}

.customer-cell strong,
.vehicle-cell strong,
.expiry-cell strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-cell small,
.vehicle-cell small,
.expiry-cell small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.62rem;
  white-space: nowrap;
}

.expiry-cell--urgent strong,
.text-urgent {
  color: var(--brand) !important;
}

.table-primary-text {
  color: var(--ink-soft);
  font-size: 0.7rem;
}

.location-cell {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}

.location-cell .app-icon { width: 13px; height: 13px; color: var(--muted); }

.row-actions {
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: flex-end;
}

.table-action {
  display: inline-flex;
  gap: 5px;
  width: auto;
  min-width: 62px;
  padding: 0 9px;
  color: var(--brand);
  background: var(--brand-soft);
  border-color: #f2d0d2;
  font-size: 0.65rem;
  font-weight: 700;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 58px;
  padding: 10px 15px;
  color: var(--muted);
  background: #fdfcfa;
  border-top: 1px solid var(--line);
  font-size: 0.7rem;
}

.pagination button {
  display: grid;
  place-items: center;
  min-width: 31px;
  height: 31px;
  padding: 0 7px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 0.69rem;
}

.pagination button.is-active {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}

.pagination button:disabled { opacity: 0.45; cursor: not-allowed; }

.table-empty {
  display: grid;
  place-items: center;
  min-height: 230px;
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

.table-empty .app-icon { width: 28px; height: 28px; margin-bottom: 9px; }
.table-empty strong { color: var(--ink); font-size: 0.8rem; }
.table-empty span { margin-top: 3px; font-size: 0.68rem; }

.drawer-backdrop {
  visibility: hidden;
  opacity: 0;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.drawer-backdrop.is-open {
  visibility: visible;
  opacity: 1;
}

.call-drawer {
  position: fixed;
  z-index: 110;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  width: min(600px, 96vw);
  height: 100vh;
  color: var(--ink-soft);
  background: #f8f7f5;
  box-shadow: var(--shadow-lg);
  transform: translateX(102%);
  transition: transform 260ms ease;
}

.call-drawer.is-open,
.call-drawer[aria-hidden="false"] {
  transform: translateX(0);
}

body.drawer-open {
  overflow: hidden;
}

.call-drawer__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.call-drawer__identity {
  display: flex;
  gap: 11px;
  align-items: center;
}

.call-drawer__identity h2 { margin: 0; font-size: 1.05rem; }
.call-drawer__identity .eyebrow { margin-bottom: 2px; }
.call-drawer__identity p { margin: 2px 0 0; color: var(--muted); font-size: 0.68rem; }
.customer-avatar--large { width: 44px; height: 44px; font-size: 0.76rem; }
.customer-avatar--xl { width: 68px; height: 68px; border-radius: 18px; font-size: 1rem; }

.call-drawer__body {
  flex: 1;
  min-height: 0;
  padding: 17px 20px;
  overflow-y: auto;
}

.call-drawer__footer {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 13px 20px;
  background: #fff;
  border-top: 1px solid var(--line);
}

.customer-vehicle-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.customer-vehicle-card__icon,
.call-control-card__pulse {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 10px;
}

.customer-vehicle-card > div:nth-child(2),
.customer-vehicle-card__expiry { display: grid; }
.customer-vehicle-card span,
.customer-vehicle-card small { color: var(--muted); font-size: 0.62rem; }
.customer-vehicle-card strong { color: var(--ink); font-size: 0.77rem; }
.customer-vehicle-card__expiry { justify-items: end; text-align: right; }

.call-control-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
  padding: 13px 14px;
  color: #fff;
  background: linear-gradient(115deg, #262a2f, #363b42);
  border-radius: 11px;
}

.call-control-card > div {
  display: flex;
  gap: 10px;
  align-items: center;
}

.call-control-card__pulse { color: #fff; background: rgba(198, 29, 35, 0.85); }
.call-control-card small { display: block; color: #aeb4ba; font-size: 0.6rem; }
.call-control-card strong { display: block; color: #fff; font-size: 0.8rem; }

.drawer-section {
  margin-top: 13px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.drawer-section__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
}

.drawer-section__heading > div {
  display: flex;
  gap: 8px;
  align-items: center;
}

.drawer-section__heading h3 { margin: 0; font-size: 0.8rem; }
.section-number {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  color: #fff;
  background: var(--brand);
  border-radius: 7px;
  font-size: 0.62rem;
  font-weight: 750;
}

.script-duration {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  color: var(--muted);
  font-size: 0.62rem;
}

.script-duration .app-icon { width: 13px; height: 13px; }
.script-card { padding: 13px; background: var(--surface-alt); border: 1px solid #ece9e4; border-radius: 9px; }
.script-card p { margin: 0 0 10px; font-size: 0.7rem; line-height: 1.65; }
.script-card p:last-of-type { margin-bottom: 0; }
.script-card[lang="mr"] p { font-size: 0.79rem; line-height: 1.8; }
.script-duration { gap: 5px; }
.section-number--muted { color: #6f7780; background: #edeef0; }
.script-card--objection { border-color: #f0e4d5; background: #fffaf4; }
.part-cost-preview { margin-top: 12px; padding: 11px; background: #fff; border: 1px dashed #d7d2c8; border-radius: 8px; }
.part-cost-preview > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; color: var(--ink); font-size: 0.67rem; }
.part-cost-preview > div span { color: var(--brand); font-weight: 700; }
.major-part-list { margin: 8px 0 4px; padding: 0; list-style: none; }
.major-part-list li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid #efede9; font-size: 0.65rem; }
.major-part-list li span { color: var(--muted); font-weight: 600; }
.major-part-list li strong { color: var(--ink); white-space: nowrap; }
.part-cost-preview p { margin: 7px 0 8px !important; color: var(--muted); font-size: 0.64rem !important; line-height: 1.55 !important; }
.master-status { display: inline-flex; gap: 5px; align-items: center; color: #916319; font-size: 0.59rem; font-weight: 700; }
.master-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }
.validation-summary--six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.history-panel { overflow: hidden; }
.history-count { color: var(--muted); font-size: 0.7rem; }
.history-table td > strong, .history-table td > small { display: block; }
.history-table td > strong { color: var(--ink); font-size: 0.69rem; }
.history-table td > small { margin-top: 3px; color: var(--muted); font-size: 0.61rem; }
.history-note { max-width: 240px; overflow-wrap: anywhere; }
.recording-pending { display: inline-flex; gap: 5px; align-items: center; color: var(--muted); font-size: 0.62rem; }
.recording-pending .app-icon { width: 14px; height: 14px; }
.history-audio { width: 190px; height: 34px; }
.history-footer { display: flex; justify-content: space-between; gap: 10px; padding: 12px 18px; color: var(--muted); background: #fbfaf8; font-size: 0.61rem; }
.history-empty { display: grid; justify-items: center; gap: 7px; padding: 50px 20px; color: var(--muted); text-align: center; }
.history-empty strong { color: var(--ink); font-size: 0.85rem; }
.history-empty p { max-width: 400px; margin: 0; font-size: 0.68rem; line-height: 1.6; }
.history-empty__icon { display: grid; width: 44px; height: 44px; place-items: center; color: var(--brand); background: var(--brand-soft); border-radius: 12px; }
.opt-out-flag { color: var(--danger) !important; font-weight: 700; }
.do-not-contact-choice { display: flex; gap: 8px; align-items: flex-start; margin-top: 11px; padding: 10px; color: #8a3838; background: #fff3f3; border: 1px solid #f3d3d3; border-radius: 7px; font-size: 0.65rem; line-height: 1.5; }
.do-not-contact-choice input { margin-top: 2px; accent-color: var(--brand); }
.closed-call-label { color: var(--muted); font-size: 0.6rem; font-weight: 650; }
.rejection-summary-list { margin: 8px 0; padding: 0; list-style: none; }
.rejection-summary-list li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid #eee7db; font-size: 0.64rem; }
.rejection-summary-list strong { color: var(--danger); }
.signout-form { margin: 0; }
.signout-button { min-height: 34px; padding: 6px 10px; font-size: 0.63rem; }
.master-notice { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; padding: 15px 17px; color: #76520f; background: #fff8e9; border: 1px solid #f0dfb9; border-radius: 10px; }
.master-notice__icon { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; color: #a36b0a; background: #ffefc9; border-radius: 8px; }
.master-notice__icon .app-icon { width: 17px; height: 17px; }
.master-notice strong { font-size: 0.75rem; }
.master-notice p { margin: 3px 0 0; color: #82692f; font-size: 0.67rem; line-height: 1.55; }
.master-panel { overflow: hidden; }
.master-filter-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; padding: 18px; border-bottom: 1px solid #efede9; }
.master-filter-row .form-field { width: min(340px, 100%); margin: 0; }
.master-filter-row__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.master-price-label { display: block; min-width: 180px; }
.master-price-input { width: 100%; padding: 8px 10px; color: var(--ink); background: white; border: 1px solid #dedbd5; border-radius: 7px; font: inherit; font-size: 0.66rem; }
.master-price-input:focus { border-color: var(--brand); outline: 3px solid var(--brand-soft); }
.master-table td strong { color: var(--ink); font-size: 0.7rem; }
.master-footer { display: flex; justify-content: space-between; gap: 12px; padding: 13px 18px; color: var(--muted); background: #fbfaf8; font-size: 0.62rem; }

@media (max-width: 720px) {
  .hourly-row { grid-template-columns: 72px minmax(45px, 1fr) 48px; gap: 8px; padding: 5px 0; }
  .hourly-row__detail { grid-column: 2 / 4; margin-top: -3px; }
  .hourly-performance__legend { gap: 10px; flex-wrap: wrap; }
  .master-filter-row, .master-footer { align-items: stretch; flex-direction: column; }
  .master-filter-row .form-field { width: 100%; }
  .master-filter-row__meta { justify-content: space-between; }
  .master-panel .table-shell { overflow-x: auto; }
  .validation-summary--six { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .history-footer { flex-direction: column; }
  .history-panel .table-shell { overflow-x: auto; }
}
.script-card mark { padding: 1px 3px; color: var(--brand); background: var(--brand-soft); border-radius: 3px; }
.script-tip { display: flex; gap: 7px; align-items: flex-start; margin-top: 12px; padding: 9px; color: #2f6e9d; background: var(--blue-soft); border-radius: 7px; font-size: 0.63rem; }
.script-tip .app-icon { width: 15px; height: 15px; }

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

.outcome-options input { position: absolute; opacity: 0; }
.outcome-options label { margin: 0; cursor: pointer; }
.outcome-options label > span {
  display: flex;
  gap: 7px;
  align-items: center;
  min-height: 40px;
  padding: 8px 10px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.68rem;
  font-weight: 650;
}

.outcome-options input:checked + span {
  color: var(--brand);
  background: var(--brand-soft);
  border-color: rgba(198, 29, 35, 0.35);
  box-shadow: 0 0 0 2px rgba(198, 29, 35, 0.06);
}

.outcome-options .app-icon { width: 15px; height: 15px; }

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

.form-field > span:first-child,
.form-field > label,
.form-field label {
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 680;
}

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

.brochure-actions__grid .button { justify-content: flex-start; text-align: left; }
.brochure-actions__grid .button > span { display: grid; }
.brochure-actions__grid .button strong { font-size: 0.68rem; }
.brochure-actions__grid .button small { color: inherit; opacity: 0.75; font-size: 0.57rem; }
.demo-note { display: flex; gap: 6px; align-items: flex-start; margin: 10px 0 0; color: var(--muted); font-size: 0.61rem; }
.demo-note .app-icon { width: 14px; height: 14px; }

/* Customer portfolio and detail */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 17px;
}

.summary-card {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 91px;
  padding: 15px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.summary-card__icon,
.details-card__icon {
  display: grid;
  flex: 0 0 40px;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 10px;
}

.summary-card__icon--warning { color: var(--amber); background: var(--amber-soft); }
.summary-card__icon--success { color: var(--teal); background: var(--teal-soft); }
.summary-card > div { display: grid; }
.summary-card small { color: var(--muted); font-size: 0.62rem; }
.summary-card strong { margin: 2px 0; color: var(--ink); font-size: 1.25rem; line-height: 1; }
.summary-card div > span { color: var(--muted-light); font-size: 0.61rem; }

.profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 17px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.profile-header__identity {
  display: flex;
  gap: 14px;
  align-items: center;
}

.profile-header__identity h1 { margin: 0; font-size: 1.35rem; letter-spacing: -0.035em; }
.profile-header__identity p { display: flex; gap: 5px; align-items: center; margin: 4px 0 0; color: var(--muted); font-size: 0.7rem; }
.profile-header__identity p .app-icon { width: 13px; height: 13px; }

.profile-status-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 17px;
  padding: 14px 4px;
  background: #292d32;
  border-radius: var(--radius);
}

.profile-status-bar > div {
  display: grid;
  gap: 4px;
  padding: 0 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-status-bar > div:last-child { border-right: 0; }
.profile-status-bar > div > span:first-child { color: #8f969d; font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.06em; }
.profile-status-bar > div > strong:not(.status-chip):not(.priority-chip) { color: #fff; font-size: 0.75rem; }

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

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

.detail-list {
  margin: 0;
  padding: 5px 18px 12px;
}

.detail-list > div {
  display: grid;
  grid-template-columns: minmax(110px, 0.65fr) minmax(0, 1fr);
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid #efede9;
}

.detail-list > div:last-child { border-bottom: 0; }
.detail-list dt { color: var(--muted); font-size: 0.67rem; font-weight: 600; }
.detail-list dd { margin: 0; color: var(--ink); font-size: 0.72rem; font-weight: 680; }

.timeline__item {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 11px;
  padding: 13px 18px;
}

.timeline__item:not(:last-child)::before {
  position: absolute;
  top: 47px;
  bottom: -1px;
  left: 34px;
  width: 1px;
  content: "";
  background: var(--line);
}

.timeline__marker {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 9px;
}

.timeline__marker .app-icon { width: 16px; height: 16px; }
.timeline__item strong { color: var(--ink); font-size: 0.73rem; }
.timeline__item p { margin: 3px 0; color: var(--muted); font-size: 0.67rem; }
.timeline__item small { color: var(--muted-light); font-size: 0.61rem; }

/* Excel upload */
.import-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 18px;
  padding: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  list-style: none;
}

.import-step {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 13px 16px;
}

.import-step:not(:last-child)::after {
  position: absolute;
  top: 50%;
  right: -5px;
  width: 10px;
  height: 10px;
  content: "";
  background: #fff;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  transform: translateY(-50%) rotate(45deg);
}

.import-step > span {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  color: var(--muted);
  background: #efeeeb;
  border-radius: 50%;
  font-size: 0.67rem;
  font-weight: 750;
}

.import-step.is-active > span { color: #fff; background: var(--brand); }
.import-step.is-complete > span { color: #fff; background: var(--teal); }
.import-step div { display: grid; }
.import-step strong { font-size: 0.71rem; }
.import-step small { color: var(--muted); font-size: 0.61rem; }

.upload-card { overflow: hidden; }
.file-type-badge { padding: 4px 8px; color: var(--teal); background: var(--teal-soft); border-radius: 6px; font-size: 0.61rem; font-weight: 780; }
.upload-card form { padding: 18px; }
.drop-zone { min-height: 260px; }
.drop-zone > strong { margin: 12px 0 4px; color: var(--ink); font-size: 0.9rem; }
.drop-zone > span:not(.drop-zone__icon):not(.selected-file) { color: var(--muted); font-size: 0.7rem; }
.drop-zone em { color: var(--brand); font-style: normal; font-weight: 680; }
.drop-zone > small { display: block; margin-top: 6px; color: var(--muted-light); font-size: 0.61rem; }

.drop-zone__icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 16px;
}

.drop-zone__icon .app-icon { width: 27px; height: 27px; }

.selected-file {
  display: flex;
  gap: 8px;
  align-items: center;
  width: min(100%, 390px);
  margin-top: 16px;
  padding: 9px;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  text-align: left;
}

.selected-file > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selected-file > .app-icon { color: var(--teal); }
.selected-file .icon-button { width: 29px; height: 29px; }

.upload-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding-top: 15px;
}

.upload-card__footer p { display: flex; gap: 6px; align-items: center; margin: 0; color: var(--muted); font-size: 0.62rem; }
.upload-card__footer p .app-icon { width: 14px; height: 14px; color: var(--teal); }

.format-guide { overflow: hidden; }
.format-guide__item {
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr);
  gap: 9px;
  padding: 12px 16px 0;
}

.format-guide__item > span {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 8px;
}

.format-guide__item .app-icon { width: 14px; height: 14px; }
.format-guide__item strong { font-size: 0.69rem; }
.format-guide__item p { margin: 2px 0 0; color: var(--muted); font-size: 0.61rem; }

.required-columns { margin: 14px 16px; padding: 12px; background: var(--surface-alt); border-radius: 9px; }
.required-columns > strong { font-size: 0.66rem; }
.required-columns > div { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.required-columns span { padding: 3px 6px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 5px; font-size: 0.57rem; }

.sample-file-link {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 18px;
  gap: 9px;
  align-items: center;
  margin: 0 16px 16px;
  padding: 10px;
  color: var(--ink-soft);
  background: var(--teal-soft);
  border: 1px solid #d3ebe6;
  border-radius: 9px;
}

.sample-file-link > span:first-child { display: grid; place-items: center; width: 31px; height: 31px; color: var(--teal); background: #fff; border-radius: 8px; }
.sample-file-link > span:nth-child(2) { display: grid; min-width: 0; }
.sample-file-link strong { font-size: 0.65rem; }
.sample-file-link small { color: var(--muted); font-size: 0.57rem; }
.sample-file-link > .app-icon { width: 15px; height: 15px; color: var(--teal); }

.upload-results,
.recent-uploads { margin-top: 18px; overflow: hidden; }
.validation-badge { display: inline-flex; gap: 5px; align-items: center; padding: 5px 8px; color: var(--teal); background: var(--teal-soft); border-radius: 999px; font-size: 0.61rem; font-weight: 700; }
.validation-badge .app-icon { width: 13px; height: 13px; }

.validation-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 16px 18px;
}

.validation-summary article { padding: 12px; background: var(--surface-alt); border: 1px solid var(--line); border-radius: 9px; }
.validation-summary article > span { color: var(--muted); font-size: 0.61rem; }
.validation-summary article > strong { display: block; margin: 3px 0; font-size: 1.2rem; }
.validation-summary article > small { color: var(--muted-light); font-size: 0.58rem; }
.validation-summary__valid > strong { color: var(--teal); }
.validation-summary__duplicate > strong { color: var(--amber); }
.validation-summary__invalid > strong { color: var(--danger); }

.validation-details {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(240px, 0.65fr);
  gap: 15px;
  padding: 0 18px 18px;
}

.validation-details h3 { margin: 0 0 8px; font-size: 0.75rem; }
.validation-details ul { margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 9px; list-style: none; }
.validation-details li { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 10px; border-bottom: 1px solid var(--line); }
.validation-details li:last-child { border-bottom: 0; }
.validation-details li > span:first-child { color: var(--muted); font-size: 0.61rem; }
.validation-details li p { display: grid; margin: 0; }
.validation-details li p strong { font-size: 0.67rem; }
.validation-details li p small { color: var(--muted); font-size: 0.59rem; }

.validation-action { display: grid; align-content: center; justify-items: center; padding: 16px; background: var(--teal-soft); border: 1px solid #cfe9e3; border-radius: 9px; text-align: center; }
.validation-action__icon { display: grid; place-items: center; width: 39px; height: 39px; margin-bottom: 8px; color: var(--teal); background: #fff; border-radius: 10px; }
.validation-action > strong { font-size: 0.74rem; }
.validation-action > p { margin: 5px 0 12px; color: var(--muted); font-size: 0.61rem; }

.file-cell { display: flex; gap: 8px; align-items: center; }
.file-cell > span { display: grid; place-items: center; width: 30px; height: 30px; color: var(--teal); background: var(--teal-soft); border-radius: 7px; }
.file-cell .app-icon { width: 14px; height: 14px; }
.file-cell strong { font-size: 0.7rem; }

/* Reports */
.reports-grid {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
  align-items: stretch;
}

.reports-grid--primary { grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.62fr); }
.reports-grid--secondary { grid-template-columns: minmax(310px, 0.75fr) minmax(0, 1.25fr); }
.performance-chart-panel,
.report-insight,
.vehicle-performance,
.monthly-table-panel { overflow: hidden; }

.grouped-bar-chart {
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  gap: 18px;
  height: 270px;
  padding: 25px 25px 17px 45px;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 54px, #efede9 55px);
}

.grouped-bar-chart__month {
  display: grid;
  grid-template-rows: minmax(0, 1fr) 20px;
  flex: 1;
  max-width: 74px;
  text-align: center;
}

.grouped-bar-chart__bars {
  display: flex;
  gap: 4px;
  align-items: end;
  justify-content: center;
}

.grouped-bar-chart .chart-bar {
  width: 10px;
  min-height: 5px;
  border-radius: 4px 4px 1px 1px;
}

.grouped-bar-chart .chart-bar::after { display: none; }
.chart-bar--calls { background: var(--brand); }
.chart-bar--connected { background: var(--amber); }
.chart-bar--converted { background: var(--teal); }
.grouped-bar-chart__month > strong { align-self: end; color: var(--muted); font-size: 0.61rem; }

.report-insight__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 10px;
}

.insight-highlight { margin: 16px; padding: 15px; color: #fff; background: linear-gradient(125deg, #2b2f34, #41474e); border-radius: 10px; }
.insight-highlight > span { color: #aeb4ba; font-size: 0.61rem; text-transform: uppercase; letter-spacing: 0.07em; }
.insight-highlight > strong { display: block; margin: 5px 0; color: #fff; font-size: 1.3rem; }
.insight-highlight > p { margin: 0; color: #bbc0c5; font-size: 0.64rem; }

.insight-list { padding: 0 16px 12px; }
.insight-list > div { display: grid; grid-template-columns: 31px minmax(0, 1fr); gap: 9px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.insight-list > div:last-child { border-bottom: 0; }
.insight-list > div > span { display: grid; place-items: center; width: 29px; height: 29px; color: var(--teal); background: var(--teal-soft); border-radius: 8px; }
.insight-list .app-icon { width: 14px; height: 14px; }
.insight-list p { display: grid; margin: 0; }
.insight-list strong { font-size: 0.67rem; }
.insight-list small { margin-top: 2px; color: var(--muted); font-size: 0.59rem; }

.vehicle-bars { padding: 9px 18px 16px; }
.vehicle-bar { display: grid; grid-template-columns: 105px minmax(100px, 1fr) 72px; gap: 10px; align-items: center; padding: 10px 0; }
.vehicle-bar > div:first-child,
.vehicle-bar > div:last-child { display: grid; }
.vehicle-bar strong { overflow: hidden; font-size: 0.68rem; text-overflow: ellipsis; white-space: nowrap; }
.vehicle-bar span { color: var(--muted); font-size: 0.58rem; }
.vehicle-bar > div:last-child { text-align: right; }
.vehicle-bar__track { height: 8px; overflow: hidden; background: #efede9; border-radius: 999px; }
.vehicle-bar__track span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #dc555a); border-radius: inherit; }

/* Template library */
.template-notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 15px;
  padding: 11px 13px;
  color: #7c561e;
  background: var(--amber-soft);
  border: 1px solid #f0dbb4;
  border-radius: 9px;
}

.template-notice > span { display: grid; place-items: center; width: 28px; height: 28px; color: var(--amber); background: #fff; border-radius: 8px; }
.template-notice .app-icon { width: 15px; height: 15px; }
.template-notice strong { display: block; font-size: 0.69rem; }
.template-notice p { margin: 2px 0 0; color: #846b45; font-size: 0.63rem; }

.template-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  padding: 11px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.segmented-filter {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  background: #efeeeb;
  border-radius: 9px;
}

.segmented-filter button {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  min-height: 31px;
  padding: 5px 9px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-size: 0.65rem;
  font-weight: 650;
}

.segmented-filter button.is-active { color: var(--ink); background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08); }
.segmented-filter .app-icon { width: 14px; height: 14px; }
.segmented-filter button > span { padding: 1px 5px; background: #e9e7e3; border-radius: 999px; font-size: 0.55rem; }

.templates-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.58fr);
  gap: 17px;
  align-items: start;
}

.template-list { display: grid; gap: 9px; }
.template-card { padding: 0; transform: none; }
.template-card:hover { transform: none; }
.template-card.is-selected { border-color: rgba(198, 29, 35, 0.42); box-shadow: 0 0 0 3px rgba(198, 29, 35, 0.06); }
.template-card__select { display: grid; grid-template-columns: 38px minmax(0, 1fr) 17px; gap: 11px; align-items: center; width: 100%; padding: 14px; color: var(--ink-soft); background: transparent; border: 0; text-align: left; }
.template-channel { display: grid; place-items: center; width: 37px; height: 37px; color: var(--teal); background: var(--teal-soft); border-radius: 10px; }
.template-channel--sms { color: var(--blue); background: var(--blue-soft); }
.template-channel--email { color: var(--purple); background: var(--purple-soft); }
.template-channel .app-icon { width: 18px; height: 18px; }
.template-card__content { display: grid; min-width: 0; }
.template-card__topline { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.template-card__topline > strong { overflow: hidden; color: var(--ink); font-size: 0.74rem; text-overflow: ellipsis; white-space: nowrap; }
.template-card__content > span:nth-child(2) { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 0.63rem; text-overflow: ellipsis; white-space: nowrap; }
.template-state { padding: 3px 6px; border-radius: 999px; font-size: 0.55rem; font-weight: 720; }
.template-state--active { color: var(--teal); background: var(--teal-soft); }
.template-state--draft { color: var(--muted); background: #efeeeb; }
.template-card__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; color: var(--muted-light); }
.template-card__meta small { font-size: 0.57rem; }
.template-card__arrow { width: 15px; height: 15px; color: var(--muted); }

.templates-layout .template-preview {
  position: sticky;
  top: calc(var(--topbar-height) + 18px);
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.templates-layout .phone-preview {
  width: 234px;
  margin: 18px auto;
  padding: 6px;
  background: #292d31;
  border: 3px solid #393e44;
  border-radius: 25px;
}

.phone-preview__topbar { display: flex; align-items: center; justify-content: space-between; padding: 5px 9px 7px; color: #fff; font-size: 0.52rem; }
.phone-preview__topbar > span:last-child { display: flex; gap: 2px; }
.phone-preview__topbar i { display: block; width: 3px; height: 3px; background: #fff; border-radius: 50%; }
.phone-preview__header { display: flex; gap: 7px; align-items: center; padding: 9px; color: #fff; background: #116c5e; }
.phone-preview__header > span { display: grid; place-items: center; width: 28px; height: 28px; color: #fff; background: rgba(255,255,255,.14); border-radius: 50%; }
.phone-preview__header .app-icon { width: 15px; height: 15px; }
.phone-preview__header div { display: grid; }
.phone-preview__header strong { font-size: 0.63rem; }
.phone-preview__header small { color: rgba(255,255,255,.72); font-size: 0.5rem; }
.phone-preview__conversation { min-height: 290px; padding: 14px 8px; background: #e8e1d8; }
.phone-preview__date { display: block; width: max-content; margin: 0 auto; padding: 3px 7px; color: #667079; background: rgba(255,255,255,.7); border-radius: 5px; font-size: 0.5rem; }
.phone-preview .message-bubble { margin-top: 16px; padding: 9px; font-size: 0.57rem; line-height: 1.5; }
.phone-preview .message-bubble p { margin: 0; }
.phone-preview .message-bubble > small { display: flex; gap: 2px; justify-content: flex-end; align-items: center; color: #718078; font-size: 0.48rem; }
.phone-preview .message-bubble > small .app-icon { width: 9px; height: 9px; color: var(--blue); }
.brochure-attachment { display: grid; grid-template-columns: 26px minmax(0, 1fr) 12px; gap: 6px; align-items: center; margin: 8px 0 5px; padding: 6px; background: rgba(255,255,255,.48); border-radius: 5px; }
.brochure-attachment > span:first-child { display: grid; place-items: center; width: 24px; height: 24px; color: var(--brand); background: #fff; border-radius: 5px; }
.brochure-attachment > span:nth-child(2) { display: grid; min-width: 0; }
.brochure-attachment strong { font-size: 0.5rem; }
.brochure-attachment small { color: #718078; font-size: 0.44rem; }
.brochure-attachment .app-icon { width: 11px; height: 11px; }

.template-variables { padding: 0 16px 14px; }
.template-variables > strong { font-size: 0.65rem; }
.template-variables > div { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.template-variables span { padding: 3px 6px; color: var(--purple); background: var(--purple-soft); border-radius: 5px; font-size: 0.55rem; }
.template-preview__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 13px 16px; background: var(--surface-alt); border-top: 1px solid var(--line); }

/* Login view */
.auth-body {
  background: #f3f2ef;
}

.auth-body .login-page {
  display: grid;
  grid-template-columns: minmax(440px, 1.08fr) minmax(440px, 0.92fr);
  min-height: 100vh;
  overflow: hidden;
}

.login-showcase {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: clamp(34px, 4.5vw, 68px);
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 78% 20%, rgba(198, 29, 35, 0.62), transparent 35%),
    linear-gradient(145deg, #32363c 0%, #151719 74%);
}

.login-showcase::before {
  position: absolute;
  inset: 0;
  content: "";
  opacity: 0.12;
  background-image: linear-gradient(125deg, transparent 49.5%, rgba(255,255,255,.5) 50%, transparent 50.5%);
  background-size: 78px 78px;
}

.brand-lockup {
  position: relative;
  z-index: 2;
  display: inline-flex;
  gap: 11px;
  align-items: center;
  width: max-content;
}

.brand-lockup .brand-mark {
  display: grid;
  place-items: center;
  width: 41px;
  height: 41px;
  color: #fff;
  background: var(--brand);
  border-radius: 11px;
  box-shadow: 0 8px 22px rgba(198,29,35,.25);
}

.brand-lockup .brand-mark .app-icon { width: 23px; height: 23px; }
.brand-lockup > span:last-child { display: grid; line-height: 1.1; }
.brand-lockup strong { color: #fff; font-size: 0.92rem; }
.brand-lockup small { margin-top: 4px; color: #abb1b7; font-size: 0.61rem; letter-spacing: .08em; text-transform: uppercase; }

.login-showcase__copy {
  position: relative;
  z-index: 2;
  width: min(100%, 590px);
  margin-top: auto;
  margin-bottom: clamp(250px, 31vh, 370px);
}

.login-showcase__copy h1 {
  max-width: 580px;
  margin: 0 0 14px;
  font-size: clamp(2.35rem, 4.2vw, 4.35rem);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.login-showcase__copy > p { max-width: 520px; margin: 0 0 23px; color: #bdc2c7; font-size: 0.9rem; }
.login-proof { display: flex; flex-wrap: wrap; gap: 8px; }
.login-proof span { display: inline-flex; gap: 5px; align-items: center; padding: 7px 9px; color: #d9dde0; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.09); border-radius: 8px; font-size: 0.64rem; backdrop-filter: blur(7px); }
.login-proof .app-icon { width: 13px; height: 13px; color: #5fd0b7; }

.login-vehicle {
  position: absolute;
  z-index: 1;
  right: -4%;
  bottom: -4%;
  width: min(92%, 930px);
  filter: drop-shadow(0 28px 28px rgba(0,0,0,.38));
}

.login-vehicle img { display: block; width: 100%; height: auto; }

.auth-body .login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: clamp(34px, 6vw, 86px);
  background: #f8f7f4;
}

.auth-body .login-card {
  width: min(100%, 410px);
  padding: clamp(25px, 3vw, 38px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(34,35,38,.09);
}

.login-card__header { margin-bottom: 25px; }
.login-card__badge { display: grid; place-items: center; width: 45px; height: 45px; margin-bottom: 18px; color: var(--brand); background: var(--brand-soft); border-radius: 12px; }
.login-card__badge .app-icon { width: 23px; height: 23px; }
.login-card__header h2 { margin: 0 0 7px; font-size: 1.75rem; letter-spacing: -0.045em; }
.login-card__header > p { margin: 0; color: var(--muted); font-size: 0.75rem; }
.login-card__header .eyebrow { margin-bottom: 7px; }

.auth-body .login-form { display: grid; gap: 15px; }
.form-field { display: grid; gap: 6px; }
.field-label-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.input-with-icon { position: relative; display: flex; align-items: center; }
.input-with-icon > .app-icon { position: absolute; z-index: 1; left: 12px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.input-with-icon input { min-height: 47px; padding-left: 39px; }
.field-validation { color: var(--danger); font-size: 0.62rem; }
.check-field { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 0.68rem; cursor: pointer; }
.form-alert { display: flex; gap: 8px; align-items: flex-start; padding: 10px; border-radius: 8px; font-size: 0.67rem; }
.form-alert--error { color: var(--danger); background: var(--danger-soft); border: 1px solid #f5d1d4; }
.form-alert .app-icon { width: 16px; height: 16px; }

.demo-credentials { display: grid; grid-template-columns: 35px minmax(0,1fr); gap: 10px; align-items: center; margin-top: 21px; padding: 11px; color: var(--blue); background: var(--blue-soft); border: 1px solid #d2e6f3; border-radius: 9px; }
.demo-credentials__icon { display: grid; place-items: center; width: 33px; height: 33px; background: #fff; border-radius: 8px; }
.demo-credentials__icon .app-icon { width: 16px; height: 16px; }
.demo-credentials strong { display: block; font-size: 0.68rem; }
.demo-credentials p { margin: 2px 0 0; color: #5d7e94; font-size: 0.59rem; }
.login-support { margin: 20px 0 0; color: var(--muted-light); font-size: 0.62rem; text-align: center; }

.toast-region {
  position: fixed;
  z-index: 200;
  right: 20px;
  bottom: 20px;
  display: grid;
  gap: 9px;
}

.app-toast {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--ease), transform var(--ease);
}

.app-toast.is-visible { opacity: 1; transform: translateY(0); }
.app-toast__mark { width: 9px; height: 9px; background: var(--blue); border-radius: 50%; }
.app-toast--success .app-toast__mark { background: var(--teal); }
.app-toast--warning .app-toast__mark { background: var(--amber); }
.app-toast--danger .app-toast__mark { background: var(--danger); }
.app-toast__copy { display: grid; }
.app-toast__copy strong { font-size: 0.71rem; }
.app-toast__copy span { color: var(--muted); font-size: 0.62rem; }
.app-toast__mark { justify-self: center; }
.app-toast__close { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; color: var(--muted); background: none; border: 0; font-size: 1.1rem; }

/* Responsive shell */
@media (max-width: 1180px) {
  :root { --sidebar-width: 236px; }
  .sidebar { padding-right: 12px; padding-left: 12px; }
  .sidebar-link.is-active::before { left: -12px; }
  .page-content { padding-right: 22px; padding-left: 22px; }
  .topbar { padding-right: 20px; padding-left: 20px; }
  .profile-copy { display: none; }
  .profile-button { grid-template-columns: 36px 14px; }
  .kpi-grid,
  .metric-grid,
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .customer-grid,
  .call-card-grid,
  .template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  :root { --topbar-height: 68px; }
  .app-shell { display: block; }
  .sidebar {
    position: fixed;
    z-index: 100;
    left: 0;
    width: min(304px, 87vw);
    padding-right: 16px;
    padding-left: 16px;
    box-shadow: var(--shadow-lg);
    transform: translateX(-104%);
    transition: transform 240ms ease;
  }
  .sidebar-brand { justify-content: space-between; }
  .sidebar-close { display: grid; color: #9ea4aa; border-color: var(--sidebar-line); }
  .sidebar-link.is-active::before { left: -16px; }
  .nav-scrim {
    position: fixed;
    z-index: 90;
    inset: 0;
    display: block;
    visibility: hidden;
    background: rgba(17, 19, 21, 0.48);
    opacity: 0;
    backdrop-filter: blur(2px);
    transition: opacity 220ms ease, visibility 220ms ease;
  }
  .nav-toggle-control:checked ~ .app-shell .sidebar { transform: translateX(0); }
  .nav-toggle-control:checked ~ .app-shell .nav-scrim { visibility: visible; opacity: 1; }
  .topbar { min-height: var(--topbar-height); }
  .mobile-menu-button { display: grid; flex: 0 0 auto; margin-right: 11px; }
  .mobile-brand { display: inline-flex; margin-right: 18px; }
  .mobile-brand .brand-emblem { width: 34px; height: 34px; border-radius: 9px; }
  .mobile-brand .brand-emblem svg { width: 22px; height: 22px; }
  .mobile-brand strong { margin-left: 8px; color: var(--ink); font-size: 0.93rem; }
  .today-chip { display: none; }
  .content-grid,
  .dashboard-grid,
  .split-grid,
  .two-column-grid,
  .upload-layout { grid-template-columns: 1fr; }
  .three-column-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-2 { grid-column: auto; }
  .login-shell { grid-template-columns: minmax(360px, 0.9fr) minmax(360px, 1.1fr); }
  .login-panel { padding: 38px; }
  .login-visual { padding: 42px; }
}

@media (max-width: 720px) {
  html { font-size: 15px; }
  body.app-body { padding-bottom: calc(67px + env(safe-area-inset-bottom)); }
  .topbar {
    gap: 9px;
    padding: 0 14px;
  }
  .mobile-menu-button { margin-right: 2px; }
  .mobile-brand { margin-right: 0; }
  .mobile-brand strong { display: none; }
  .global-search { display: none; }
  .topbar-leading { flex: 0 0 auto; }
  .topbar-actions { flex: 1; justify-content: flex-end; margin-left: 0; }
  .profile-button { padding: 3px; }
  .profile-button > svg { display: none; }
  .notification-button { border-color: transparent; }
  .page-content {
    min-height: calc(100vh - var(--topbar-height) - 67px);
    padding: 20px 15px 30px;
  }
  .page-head,
  .page-header { display: grid; gap: 15px; margin-bottom: 19px; }
  .page-head-actions,
  .page-actions { width: 100%; }
  .page-head-actions .button,
  .page-head-actions .btn,
  .page-actions .button,
  .page-actions .btn { flex: 1; }
  .kpi-grid,
  .metric-grid,
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi-card,
  .metric-card { min-height: 112px; padding: 14px; }
  .kpi-value,
  .metric-value { font-size: 1.55rem; }
  .metric-icon,
  .kpi-icon { width: 36px; height: 36px; border-radius: 9px; }
  .metric-icon svg,
  .kpi-icon svg { width: 18px; height: 18px; }
  .content-grid.equal,
  .split-grid.equal,
  .two-column-grid.equal,
  .three-column-grid,
  .customer-grid,
  .call-card-grid,
  .template-grid { grid-template-columns: 1fr; }
  .form-grid,
  .form-grid.three { grid-template-columns: 1fr; }
  .filter-bar,
  .filters,
  .toolbar { align-items: stretch; }
  .filter-search,
  .search-control { flex-basis: 100%; }
  .filter-select,
  .filters select,
  .toolbar select { width: 100%; }
  .card-header,
  .panel-header { padding-right: 14px; padding-left: 14px; }
  .card-body,
  .panel-body { padding: 15px; }
  .table-shell,
  .table-card,
  .data-table-wrap { overflow-x: auto; }
  .data-table,
  .table-shell table,
  .table-card table,
  table.table { min-width: 720px; }
  .table-pagination,
  .pagination-row { min-width: 520px; }
  .upload-dropzone,
  .drop-zone { min-height: 240px; padding: 28px 18px; }
  .upload-result,
  .result-summary { grid-template-columns: 1fr; }
  .modal-dialog,
  .app-modal {
    top: auto;
    right: 8px;
    bottom: 8px;
    left: 8px;
    width: auto;
    max-height: 90vh;
    border-radius: 17px;
    transform: none;
  }
  .mobile-bottom-nav {
    position: fixed;
    z-index: 70;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    height: calc(67px + env(safe-area-inset-bottom));
    padding: 6px 7px env(safe-area-inset-bottom);
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px rgba(30, 32, 35, 0.06);
    backdrop-filter: blur(14px);
  }
  .mobile-bottom-nav a {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 3px;
    align-items: center;
    justify-content: center;
    color: #777d84;
    border-radius: 9px;
    font-size: 0.58rem;
    font-weight: 650;
  }
  .mobile-bottom-nav a svg { width: 19px; height: 19px; }
  .mobile-bottom-nav a.is-active { color: var(--brand); background: var(--brand-wash); }
  .mobile-bottom-nav a.is-active::before {
    position: absolute;
    top: -6px;
    left: 28%;
    width: 44%;
    height: 2px;
    content: "";
    background: var(--brand);
    border-radius: 0 0 3px 3px;
  }
  .toast-stack { right: 12px; bottom: 82px; left: 12px; }
  .toast,
  .app-toast { width: 100%; }
  .login-shell { display: block; }
  .login-panel { min-height: 100vh; padding: 30px 22px; }
  .login-logo { margin-bottom: 42px; }
  .login-visual { display: none; }
}

@media (max-width: 430px) {
  .kpi-grid,
  .metric-grid,
  .metrics-grid { grid-template-columns: 1fr; }
  .kpi-card,
  .metric-card { min-height: 108px; }
  .page-head-actions,
  .page-actions { display: grid; grid-template-columns: 1fr; }
  .table-pagination,
  .pagination-row { align-items: flex-start; flex-direction: column; }
  .vehicle-summary,
  .customer-details { grid-template-columns: 1fr; }
  .funnel-row { grid-template-columns: 84px minmax(0, 1fr) 34px; }
}

@media (max-width: 960px) {
  .auth-body .login-page {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.92fr);
  }

  .login-showcase {
    padding: 38px;
  }

  .login-showcase__copy {
    margin-bottom: clamp(220px, 28vh, 300px);
  }

  .login-showcase__copy h1 {
    font-size: clamp(2.1rem, 5vw, 3.25rem);
  }

  .auth-body .login-panel {
    padding: 32px;
  }
}

@media (max-width: 720px) {
  .auth-body .login-page {
    display: block;
    overflow: visible;
  }

  .login-showcase {
    display: none;
  }

  .auth-body .login-panel {
    min-height: 100svh;
    padding: 24px 18px;
  }

  .auth-body .login-card {
    padding: 25px 20px;
    border-radius: 17px;
    box-shadow: 0 18px 50px rgba(34, 35, 38, 0.08);
  }

  .toast-region {
    right: 12px;
    bottom: 12px;
    left: 12px;
  }
}

@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;
  }
}

@media print {
  .sidebar,
  .topbar,
  .mobile-bottom-nav,
  .page-actions,
  .page-head-actions,
  .filter-bar,
  .filters { display: none !important; }
  .app-shell { display: block; }
  .page-content { max-width: none; padding: 0; }
  body { background: #fff; }
  .card,
  .panel,
  .table-shell { box-shadow: none; break-inside: avoid; }
}

/* Administration and account security */
.admin-page,
.account-page {
  animation: page-in 360ms ease both;
}

.admin-feedback {
  margin-bottom: 14px;
}

.admin-feedback strong {
  margin-right: 3px;
}

.admin-validation-summary {
  margin-bottom: 14px;
}

.admin-validation-summary.validation-summary-valid,
.account-password-form .validation-summary-valid {
  display: none;
}

.admin-validation-summary ul,
.account-password-form .validation-summary-errors ul {
  margin: 0;
  padding-left: 18px;
}

.admin-section-nav {
  position: sticky;
  z-index: 20;
  top: calc(var(--topbar-height) + 10px);
  display: flex;
  gap: 5px;
  width: max-content;
  max-width: 100%;
  margin: 0 0 18px;
  padding: 5px;
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
  scrollbar-width: none;
}

.admin-section-nav::-webkit-scrollbar {
  display: none;
}

.admin-section-nav a {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 7px;
  align-items: center;
  min-height: 36px;
  padding: 7px 11px;
  color: var(--muted);
  border-radius: 8px;
  font-size: 0.71rem;
  font-weight: 700;
  white-space: nowrap;
}

.admin-section-nav a:hover,
.admin-section-nav a:focus-visible {
  color: var(--brand);
  background: var(--brand-wash);
}

.admin-section-nav .app-icon {
  width: 15px;
  height: 15px;
}

.admin-metrics {
  margin-bottom: 18px;
}

.admin-metric-status {
  overflow: hidden;
  font-size: 1.2rem !important;
  line-height: 1.15 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-section {
  margin-bottom: 18px;
  scroll-margin-top: calc(var(--topbar-height) + 82px);
}

.admin-role-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  padding: 14px 18px;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--line);
}

.admin-role-guide article {
  display: flex;
  gap: 9px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.admin-role-guide p {
  margin: 0;
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.4;
}

.admin-role-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 23px;
  padding: 3px 7px;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 999px;
  font-size: 0.59rem;
  font-weight: 780;
  letter-spacing: 0.02em;
}

.admin-role-badge--admin {
  color: var(--brand);
  background: var(--brand-soft);
}

.admin-role-badge--manager {
  color: var(--purple);
  background: var(--purple-soft);
}

.admin-role-badge--icre {
  color: var(--blue);
  background: var(--blue-soft);
}

.admin-create-user {
  margin: 14px 18px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
}

.admin-create-user > summary,
.admin-user-manage > summary {
  list-style: none;
}

.admin-create-user > summary::-webkit-details-marker,
.admin-user-manage > summary::-webkit-details-marker {
  display: none;
}

.admin-create-user > summary {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 18px;
  gap: 11px;
  align-items: center;
  min-height: 64px;
  padding: 11px 14px;
  cursor: pointer;
}

.admin-create-user > summary:hover {
  background: #fdfcfa;
}

.admin-create-user[open] > summary {
  background: var(--brand-wash);
  border-bottom: 1px solid var(--line);
}

.admin-expander-icon {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 9px;
}

.admin-expander-icon .app-icon {
  width: 17px;
  height: 17px;
}

.admin-create-user > summary > span:nth-child(2) {
  display: grid;
}

.admin-create-user > summary strong {
  color: var(--ink);
  font-size: 0.76rem;
}

.admin-create-user > summary small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.63rem;
}

.admin-expander-chevron {
  color: var(--muted);
  transition: transform var(--ease);
}

details[open] > summary .admin-expander-chevron {
  transform: rotate(180deg);
}

.admin-create-form {
  padding: 17px;
}

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

.admin-form-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-form-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-form-actions,
.admin-settings-footer {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.admin-form-actions p,
.admin-settings-footer p {
  display: flex;
  gap: 7px;
  align-items: center;
  margin: 0;
  color: var(--muted);
  font-size: 0.64rem;
}

.admin-form-actions p .app-icon {
  width: 15px;
  height: 15px;
  color: var(--teal);
}

.admin-user-list {
  margin: 0 18px 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.admin-user-list__header {
  display: grid;
  grid-template-columns: minmax(210px, 1.4fr) minmax(100px, 0.7fr) 92px 150px minmax(135px, 0.8fr) 90px;
  gap: 13px;
  align-items: center;
  min-height: 43px;
  padding: 9px 14px;
  color: #757a80;
  background: #faf9f7;
  border-bottom: 1px solid var(--line);
  font-size: 0.59rem;
  font-weight: 760;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.admin-user-card {
  position: relative;
  background: #fff;
  border-bottom: 1px solid #efede9;
}

.admin-user-card:last-child {
  border-bottom: 0;
}

.admin-user-card.is-disabled {
  background: #fbfaf8;
}

.admin-user-card__summary {
  display: grid;
  grid-template-columns: minmax(210px, 1.4fr) minmax(100px, 0.7fr) 92px 150px minmax(135px, 0.8fr);
  gap: 13px;
  align-items: center;
  min-height: 73px;
  padding: 11px 118px 11px 14px;
}

.admin-user-card.is-disabled .admin-user-card__summary {
  opacity: 0.72;
}

.admin-user-identity {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.admin-user-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 9px;
  font-size: 0.68rem;
  font-weight: 780;
}

.admin-user-identity > span:last-child,
.admin-user-field {
  display: grid;
  min-width: 0;
}

.admin-user-identity strong,
.admin-user-field strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-identity small,
.admin-user-field small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.59rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-field > small:first-child {
  display: none;
}

.admin-password-state {
  margin-top: 3px;
  color: var(--amber);
  font-size: 0.54rem;
  font-weight: 700;
}

.admin-user-manage > summary {
  position: absolute;
  top: 19px;
  right: 14px;
  min-height: 34px;
  cursor: pointer;
}

.admin-user-manage > summary .app-icon:last-child {
  width: 12px;
  height: 12px;
}

.admin-user-manage[open] > summary {
  color: var(--brand);
  background: var(--brand-wash);
  border-color: #f1cfd1;
}

.admin-user-action-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 15px;
  background: #faf9f7;
  border-top: 1px solid var(--line);
}

.admin-action-form {
  display: grid;
  gap: 13px;
  align-content: start;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.admin-action-form--warning {
  border-color: #eedfca;
}

.admin-action-form__header {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.admin-action-form__header > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 8px;
}

.admin-action-form--warning .admin-action-form__header > span {
  color: var(--amber);
  background: var(--amber-soft);
}

.admin-action-form__header .app-icon {
  width: 16px;
  height: 16px;
}

.admin-action-form__header strong {
  display: block;
  font-size: 0.72rem;
}

.admin-action-form__header p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.6rem;
}

.admin-action-form__fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  align-items: end;
}

.admin-action-form > .button {
  justify-self: end;
}

.admin-checkbox-card,
.admin-setting-toggle,
.admin-danger-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px;
  cursor: pointer;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.admin-checkbox-card input,
.admin-setting-toggle input,
.admin-danger-check input {
  flex: 0 0 auto;
  margin-top: 2px;
}

.admin-checkbox-card > span,
.admin-setting-toggle > span,
.admin-danger-check > span {
  display: grid;
}

.admin-checkbox-card strong,
.admin-setting-toggle strong,
.admin-danger-check strong {
  font-size: 0.68rem;
}

.admin-checkbox-card small,
.admin-setting-toggle small,
.admin-danger-check small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.58rem;
}

.admin-current-user-note {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 14px;
  color: #2f6e9d;
  background: var(--blue-soft);
  border-top: 1px solid #d3e7f5;
}

.admin-current-user-note > span {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  background: #fff;
  border-radius: 9px;
}

.admin-current-user-note strong {
  font-size: 0.71rem;
}

.admin-current-user-note p {
  margin: 2px 0 0;
  color: #5d7e94;
  font-size: 0.61rem;
}

.admin-empty-state {
  min-height: 220px;
}

.admin-settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(275px, 0.55fr);
  gap: 18px;
  align-items: start;
}

.admin-settings-panel {
  overflow: hidden;
}

.admin-settings-body {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.admin-setting-toggle {
  align-items: center;
  color: #147765;
  background: var(--teal-soft);
  border-color: #ccece5;
}

.admin-setting-toggle input {
  width: 18px;
  height: 18px;
}

.admin-secret-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 13px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.admin-secret-state {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 41px;
  padding: 8px 11px;
  color: var(--amber);
  background: var(--amber-soft);
  border-radius: 8px;
  font-size: 0.64rem;
  font-weight: 720;
  white-space: nowrap;
}

.admin-secret-state.is-set {
  color: var(--teal);
  background: var(--teal-soft);
}

.admin-secret-state .app-icon {
  width: 14px;
  height: 14px;
}

.admin-danger-check {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: #f7d4d7;
}

.admin-settings-footer {
  margin: 0;
  padding: 14px 18px;
  background: var(--surface-alt);
}

.admin-integration-summary {
  overflow: hidden;
}

.admin-integration-hero {
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 18px;
  color: #96600f;
  background: var(--amber-soft);
  border-bottom: 1px solid #f2ddb7;
}

.admin-integration-hero.is-ready {
  color: #147765;
  background: var(--teal-soft);
  border-bottom-color: #ccece5;
}

.admin-integration-hero > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 11px;
}

.admin-integration-hero > span .app-icon {
  width: 21px;
  height: 21px;
}

.admin-integration-hero div {
  display: grid;
}

.admin-integration-hero small {
  font-size: 0.59rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.admin-integration-hero strong {
  font-size: 0.91rem;
}

.admin-summary-list {
  margin: 0;
  padding: 8px 18px;
}

.admin-summary-list > div {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  border-bottom: 1px solid #efede9;
}

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

.admin-summary-list dt {
  color: var(--muted);
  font-size: 0.63rem;
  font-weight: 650;
}

.admin-summary-list dd {
  max-width: 58%;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 700;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-security-note {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin: 5px 13px 13px;
  padding: 11px;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 9px;
}

.admin-security-note > .app-icon {
  width: 17px;
  height: 17px;
}

.admin-security-note p {
  display: grid;
  margin: 0;
}

.admin-security-note strong {
  font-size: 0.65rem;
}

.admin-security-note span {
  margin-top: 2px;
  color: #5d7e94;
  font-size: 0.57rem;
}

.admin-database-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(310px, 0.65fr);
  gap: 18px;
  padding: 18px;
}

.admin-database-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.admin-database-details > div {
  min-width: 0;
  padding: 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.admin-database-details > div:nth-child(2n) {
  border-right: 0;
}

.admin-database-details > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.admin-database-details dt {
  color: var(--muted);
  font-size: 0.59rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.055em;
}

.admin-database-details dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 680;
}

.admin-database-details code,
.admin-audit-table code {
  padding: 2px 5px;
  color: #5b5364;
  background: var(--purple-soft);
  border-radius: 4px;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 0.61rem;
}

.admin-database-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
}

.admin-database-caption {
  display: flex;
  gap: 7px;
  align-items: center;
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 0.61rem;
}

.admin-database-caption .app-icon {
  width: 14px;
  height: 14px;
  color: var(--blue);
}

.admin-database-counts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.admin-database-counts article {
  display: grid;
  grid-template-columns: 35px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 80px;
  padding: 12px;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.admin-database-counts article > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 9px;
}

.admin-database-counts article > span .app-icon {
  width: 16px;
  height: 16px;
}

.admin-database-counts article div {
  display: grid;
}

.admin-database-counts strong {
  font-size: 1rem;
  line-height: 1.1;
}

.admin-database-counts small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.58rem;
}

.admin-audit-scroll {
  overflow-x: auto;
}

.admin-audit-table {
  min-width: 980px;
}

.admin-audit-action {
  display: inline-flex;
  padding: 4px 7px;
  color: var(--purple);
  background: var(--purple-soft);
  border-radius: 6px;
  font-size: 0.62rem;
  font-weight: 700;
  white-space: nowrap;
}

.admin-audit-details {
  max-width: 330px;
  color: var(--muted);
  font-size: 0.68rem !important;
  line-height: 1.45;
}

.account-page-header {
  width: min(100%, 980px);
  margin-right: auto;
  margin-left: auto;
}

.account-password-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.62fr);
  gap: 18px;
  align-items: start;
  width: min(100%, 980px);
  margin: 0 auto;
}

.account-password-card {
  overflow: hidden;
}

.account-lock-mark,
.account-guidance-icon,
.account-denied-icon {
  display: grid;
  place-items: center;
  color: var(--brand);
  background: var(--brand-soft);
}

.account-lock-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.account-password-form {
  display: grid;
  gap: 15px;
  padding: 20px;
}

.account-password-input {
  position: relative;
  display: flex;
  align-items: center;
}

.account-password-input > .app-icon {
  position: absolute;
  z-index: 1;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--muted);
  pointer-events: none;
}

.account-password-input input {
  min-height: 46px;
  padding-right: 45px;
  padding-left: 39px;
}

.account-password-input button {
  position: absolute;
  right: 7px;
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 7px;
}

.account-password-input button:hover,
.account-password-input button.is-active {
  color: var(--brand);
  background: var(--brand-soft);
}

.account-password-input button .app-icon {
  width: 16px;
  height: 16px;
}

.account-password-guidance {
  padding: 20px;
}

.account-guidance-icon {
  width: 46px;
  height: 46px;
  margin-bottom: 15px;
  border-radius: 12px;
}

.account-guidance-icon .app-icon {
  width: 23px;
  height: 23px;
}

.account-password-guidance h2 {
  margin: 0;
  font-size: 1rem;
}

.account-password-guidance ul {
  display: grid;
  gap: 12px;
  margin: 17px 0;
  padding: 0;
  list-style: none;
}

.account-password-guidance li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 8px;
  color: var(--ink-soft);
  font-size: 0.68rem;
}

.account-password-guidance li .app-icon {
  width: 16px;
  height: 16px;
  color: var(--teal);
}

.account-password-guidance > p {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 11px;
  color: #5d7e94;
  background: var(--blue-soft);
  border-radius: 8px;
  font-size: 0.61rem;
}

.account-password-guidance > p .app-icon {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  color: var(--blue);
}

.account-denied-page {
  display: grid;
  place-items: center;
  min-height: calc(100vh - var(--topbar-height) - 80px);
}

.account-denied-card {
  width: min(100%, 580px);
  padding: clamp(26px, 5vw, 45px);
  text-align: center;
}

.account-denied-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 18px;
}

.account-denied-icon .app-icon {
  width: 31px;
  height: 31px;
}

.account-denied-card .eyebrow {
  justify-content: center;
}

.account-denied-card h1 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  letter-spacing: -0.04em;
}

.account-denied-card > p:not(.eyebrow) {
  max-width: 430px;
  margin: 10px auto 20px;
  color: var(--muted);
  font-size: 0.76rem;
}

.account-denied-role {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  max-width: 410px;
  margin: 0 auto;
  padding: 11px;
  color: #96600f;
  background: var(--amber-soft);
  border: 1px solid #f2ddb7;
  border-radius: 9px;
  text-align: left;
}

.account-denied-role > .app-icon {
  justify-self: center;
}

.account-denied-role span {
  display: grid;
}

.account-denied-role strong {
  font-size: 0.68rem;
}

.account-denied-role small {
  color: #846b45;
  font-size: 0.59rem;
}

.account-denied-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: center;
  margin-top: 22px;
}

@media (max-width: 1180px) {
  .admin-user-list__header {
    display: none;
  }

  .admin-user-card__summary {
    grid-template-columns: minmax(190px, 1.3fr) repeat(3, minmax(105px, 0.7fr));
  }

  .admin-user-field > small:first-child {
    display: block;
    margin-bottom: 3px;
  }

  .admin-user-card__summary > .admin-user-field:nth-child(5) {
    display: none;
  }

  .admin-settings-grid,
  .admin-database-layout {
    grid-template-columns: 1fr;
  }

  .admin-integration-summary {
    display: grid;
    grid-template-columns: minmax(220px, 0.45fr) minmax(0, 1fr);
  }

  .admin-integration-hero {
    border-right: 1px solid #f2ddb7;
    border-bottom: 0;
  }

  .admin-integration-hero.is-ready {
    border-right-color: #ccece5;
  }

  .admin-security-note {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .admin-role-guide,
  .admin-form-grid--three,
  .admin-user-action-panel,
  .account-password-layout {
    grid-template-columns: 1fr;
  }

  .admin-role-guide {
    gap: 7px;
  }

  .admin-user-card__summary {
    grid-template-columns: minmax(190px, 1fr) repeat(2, minmax(105px, 0.6fr));
  }

  .admin-user-card__summary > .admin-user-field:nth-child(4),
  .admin-user-card__summary > .admin-user-field:nth-child(5) {
    display: none;
  }
}

@media (max-width: 720px) {
  .mobile-bottom-nav--four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .admin-page .page-header__actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-section-nav {
    position: relative;
    top: auto;
    width: 100%;
  }

  .admin-role-guide,
  .admin-settings-body,
  .admin-database-layout {
    padding-right: 14px;
    padding-left: 14px;
  }

  .admin-create-user,
  .admin-user-list {
    margin-right: 14px;
    margin-left: 14px;
  }

  .admin-form-grid--two,
  .admin-action-form__fields,
  .admin-database-details,
  .admin-integration-summary {
    grid-template-columns: 1fr;
  }

  .admin-form-actions,
  .admin-settings-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-form-actions .button,
  .admin-settings-footer .button {
    width: 100%;
  }

  .admin-user-card__summary {
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 14px 14px 62px;
  }

  .admin-user-card__summary > .admin-user-field:nth-child(4) {
    display: grid;
  }

  .admin-user-manage > summary {
    top: auto;
    right: 14px;
    bottom: 13px;
    left: 14px;
    width: calc(100% - 28px);
  }

  .admin-user-manage[open] > summary {
    bottom: auto;
    top: 121px;
  }

  .admin-user-manage[open] .admin-user-action-panel,
  .admin-user-manage[open] .admin-current-user-note {
    margin-top: 48px;
  }

  .admin-action-form > .button {
    width: 100%;
    justify-self: stretch;
  }

  .admin-current-user-note {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .admin-current-user-note .button {
    grid-column: 1 / -1;
  }

  .admin-secret-field {
    grid-template-columns: 1fr;
  }

  .admin-secret-state {
    justify-content: center;
  }

  .admin-integration-hero {
    border-right: 0;
    border-bottom: 1px solid #f2ddb7;
  }

  .admin-integration-hero.is-ready {
    border-bottom-color: #ccece5;
  }

  .admin-database-details > div,
  .admin-database-details > div:nth-child(2n),
  .admin-database-details > div:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .admin-database-details > div:last-child {
    border-bottom: 0;
  }

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

  .admin-database-actions .button {
    width: 100%;
  }

  .account-page-header .button {
    width: 100%;
  }
}

@media (max-width: 430px) {
  .admin-database-counts {
    grid-template-columns: 1fr;
  }

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

@media print {
  .admin-section-nav,
  .admin-create-user,
  .admin-user-manage,
  .admin-database-actions,
  .admin-settings-footer {
    display: none !important;
  }
}
