:root {
  --ink: #15202b;
  --ink-soft: #566273;
  --ink-muted: #8792a2;
  --paper: #f2f5f7;
  --surface: #ffffff;
  --surface-soft: #f8fafb;
  --line: #e3e9ed;
  --line-strong: #d2dce2;
  --navy: #0d1f2d;
  --navy-soft: #132a3a;
  --navy-lift: #1b3547;
  --accent: #ff6d3a;
  --accent-soft: #fff0ea;
  --teal: #0b8f83;
  --teal-soft: #e7f6f3;
  --blue: #3972e6;
  --blue-soft: #edf2ff;
  --green: #17845f;
  --green-soft: #eaf7f1;
  --red: #d14848;
  --red-soft: #fdf0f0;
  --amber: #b27616;
  --amber-soft: #fff7e4;
  --purple: #7656c8;
  --purple-soft: #f2effc;
  --shadow-sm: 0 1px 2px rgba(12, 31, 45, 0.04), 0 4px 12px rgba(12, 31, 45, 0.035);
  --shadow-md: 0 16px 42px rgba(10, 34, 49, 0.11);
  --radius: 16px;
  --sidebar-width: 248px;
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  color-scheme: only light;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
}

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

button {
  color: inherit;
}

button,
select {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(57, 114, 230, 0.25);
  outline-offset: 2px;
}

a {
  color: inherit;
}

svg {
  display: block;
}

.login-screen {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(420px, 1.1fr) minmax(420px, 0.9fr);
  background: #f4f6f7;
}

body.authenticated .login-screen {
  display: none;
}

body:not(.authenticated) .app-shell {
  display: none;
}

.login-brand-panel {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(34px, 5vw, 70px);
  color: #fff;
  background:
    radial-gradient(circle at 82% 14%, rgba(49, 146, 168, 0.35), transparent 28%),
    radial-gradient(circle at 12% 84%, rgba(255, 109, 58, 0.2), transparent 28%),
    linear-gradient(145deg, #0c2535 0%, #0a1b28 62%, #102f40 100%);
}

.login-brand-panel::before,
.login-brand-panel::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  pointer-events: none;
}

.login-brand-panel::before {
  right: -190px;
  bottom: -180px;
  width: 620px;
  height: 620px;
  box-shadow: 0 0 0 80px rgba(255, 255, 255, 0.018), 0 0 0 160px rgba(255, 255, 255, 0.012);
}

.login-brand-panel::after {
  top: 22%;
  left: 52%;
  width: 210px;
  height: 210px;
}

.login-brand,
.login-brand-copy,
.login-feature-list,
.login-security-note {
  position: relative;
  z-index: 1;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.login-logo-card {
  display: grid;
  width: 62px;
  height: 62px;
  overflow: hidden;
  place-items: center;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 14px 28px rgba(4, 19, 29, 0.28);
}

.login-logo-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.login-brand strong {
  display: block;
  font-size: 20px;
  letter-spacing: 0.18em;
}

.login-brand span {
  display: block;
  margin-top: 4px;
  color: #90a7b4;
  font-size: 11px;
  letter-spacing: 0.14em;
}

.login-brand-copy {
  max-width: 620px;
  margin: auto 0;
  padding: 50px 0;
}

.login-brand-copy .eyebrow {
  margin-bottom: 17px;
  color: #6fc7b1;
}

.login-brand-copy h1 {
  margin-bottom: 20px;
  color: #fff;
  font-size: clamp(35px, 4.4vw, 58px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.26;
}

.login-brand-copy > p:last-child {
  max-width: 500px;
  margin: 0;
  color: #9eb2be;
  font-size: 13px;
  line-height: 1.9;
}

.login-feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
}

.login-feature-list span {
  padding: 7px 10px;
  color: #b9cad3;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  font-size: 9px;
}

.login-security-note {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #6e8897;
  font-size: 9px;
}

.login-security-note svg {
  width: 14px;
  height: 14px;
  color: #65c9ac;
}

.login-form-panel {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background:
    radial-gradient(circle at 80% 12%, rgba(11, 143, 131, 0.055), transparent 28%),
    #f4f6f7;
}

.login-card {
  width: min(420px, 100%);
  padding: 38px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #e3e9ed;
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(16, 47, 64, 0.11);
}

.login-kicker {
  display: block;
  margin-bottom: 10px;
  color: var(--teal);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.17em;
}

.login-card-heading h2 {
  margin-bottom: 7px;
  font-size: 25px;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.login-card-heading p {
  margin-bottom: 28px;
  color: var(--ink-muted);
  font-size: 11px;
}

.login-wecom {
  display: grid;
  width: 100%;
  min-height: 58px;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 11px;
  padding: 10px 13px;
  color: #17343d;
  background: linear-gradient(135deg, #eefaf6, #f7fcfa);
  border: 1px solid #b9ded5;
  border-radius: 11px;
  text-align: left;
  transition: border 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.login-wecom[hidden],
.login-manual-divider[hidden] {
  display: none !important;
}

.login-wecom:hover {
  border-color: #75b9ab;
  box-shadow: 0 8px 20px rgba(20, 103, 91, 0.1);
}

.login-wecom:active {
  transform: translateY(1px);
}

.login-wecom:disabled {
  cursor: wait;
  opacity: 0.66;
}

.login-wecom-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff;
  background: #15866f;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 700;
}

.login-wecom > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.login-wecom strong {
  font-size: 12px;
  font-weight: 650;
}

.login-wecom small {
  color: #688087;
  font-size: 9px;
  line-height: 1.4;
}

.login-wecom > svg {
  width: 16px;
  height: 16px;
  color: #17836e;
}

.login-manual-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 19px 0 16px;
  color: #8c9ba3;
  font-size: 9px;
}

.login-manual-divider::before,
.login-manual-divider::after {
  height: 1px;
  flex: 1;
  background: #e4eaed;
  content: "";
}

.login-field {
  margin-bottom: 16px;
}

.login-field > label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 500;
}

.login-input-wrap {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  background: #f8fafb;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  transition: border 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.login-input-wrap:focus-within {
  background: #fff;
  border-color: #5f9b91;
  box-shadow: 0 0 0 4px rgba(11, 143, 131, 0.08);
}

.login-input-wrap:has(input[aria-invalid="true"]) {
  border-color: rgba(194, 64, 45, 0.72);
  box-shadow: 0 0 0 4px rgba(194, 64, 45, 0.07);
}

.login-input-wrap > span,
.login-input-wrap svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: var(--ink-muted);
}

.login-input-wrap input {
  min-width: 0;
  flex: 1;
  padding: 12px 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 12px;
}

.password-toggle {
  padding: 4px;
  color: var(--teal);
  background: transparent;
  border: 0;
  font-size: 9px;
}

.login-caps-hint {
  display: block;
  margin-top: 5px;
  color: #a95b19;
  font-size: 9px;
  line-height: 1.4;
}

.login-caps-hint[hidden] {
  display: none;
}

.login-error {
  min-height: 20px;
  margin: 3px 0 8px;
  color: var(--red);
  font-size: 9px;
  line-height: 1.5;
}

.login-error.visible {
  padding: 7px 9px;
  background: #fff5f2;
  border-left: 3px solid var(--red);
  border-radius: 5px;
}

.login-submit {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  background: linear-gradient(135deg, #0d2b3c, #174a5c);
  border: 0;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(13, 43, 60, 0.18);
  font-size: 11px;
  font-weight: 600;
}

.login-submit:hover {
  background: linear-gradient(135deg, #14384c, #1b566a);
}

.login-submit:disabled {
  cursor: wait;
  opacity: 0.82;
}

.login-submit svg {
  width: 16px;
  height: 16px;
}

.login-help {
  margin-top: 20px;
  color: var(--ink-muted);
  font-size: 9px;
  line-height: 1.6;
  text-align: center;
}

.login-copyright {
  margin: 24px 0 0;
  color: #9aa6af;
  font-size: 8px;
}

.site-compliance-footer {
  display: flex;
  width: min(calc(100% - 56px), 1600px);
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 0 auto;
  padding: 15px 0 24px;
  color: #8b999d;
  border-top: 1px solid rgba(31, 66, 75, 0.08);
  font-size: 10px;
  line-height: 1.6;
}

.site-compliance-footer a {
  color: #52716d;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(82, 113, 109, 0.36);
  text-underline-offset: 3px;
}

.site-compliance-footer a:hover,
.site-compliance-footer a:focus-visible {
  color: #1d514b;
  text-decoration-color: currentColor;
}

.site-compliance-footer-login {
  width: min(420px, 100%);
  justify-content: center;
  margin-top: 12px;
  padding: 0;
  border-top: 0;
  font-size: 9px;
  text-align: center;
}

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

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  overflow-y: auto;
  color: #dce6ed;
  background:
    radial-gradient(circle at 0 0, rgba(38, 117, 142, 0.22), transparent 32%),
    linear-gradient(175deg, #0d202e 0%, #0a1a27 78%);
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 25px 22px 23px;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  box-shadow: 0 8px 18px rgba(4, 18, 29, 0.26);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-name {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.15em;
  line-height: 1.3;
}

.brand-subtitle {
  margin-top: 3px;
  color: #8fa4b3;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.mobile-close {
  display: none;
  margin-left: auto;
  color: #fff;
  background: transparent;
  border: 0;
  font-size: 24px;
}

.main-nav {
  padding: 2px 13px 20px;
}

.nav-group-label {
  padding: 17px 13px 7px;
  color: #617788;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.nav-item {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 43px;
  align-items: center;
  gap: 12px;
  padding: 0 13px;
  color: #aabac5;
  background: transparent;
  border: 0;
  border-radius: 10px;
  text-align: left;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

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

.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(255, 109, 58, 0.2), rgba(255, 109, 58, 0.06));
}

.nav-item.active::before {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 0;
  width: 3px;
  content: "";
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}

.nav-icon,
.icon-btn > span,
.button-icon,
.metric-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
}

.nav-icon svg,
.icon-btn svg,
.button-icon svg,
.metric-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
}

.nav-badge {
  min-width: 20px;
  margin-left: auto;
  padding: 2px 6px;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  font-size: 10px;
  text-align: center;
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px 15px 18px;
}

.system-health {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0 4px 13px;
  padding: 13px 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 11px;
}

.health-dot {
  width: 7px;
  height: 7px;
  margin-top: 5px;
  background: #63d6ac;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(99, 214, 172, 0.1);
}

.system-health strong,
.user-compact strong {
  display: block;
  color: #dce6ed;
  font-size: 11px;
  font-weight: 500;
}

.system-health span,
.user-compact span {
  color: #718797;
  font-size: 10px;
}

.user-compact {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.user-compact > div {
  min-width: 0;
  flex: 1;
}

.user-compact strong {
  margin-bottom: 2px;
  font-size: 12px;
}

.sidebar-version {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin-top: 10px;
  padding-top: 10px;
  color: #668091;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
  font-size: 9px;
  line-height: 1.45;
}

.sidebar-version strong {
  color: #9fb2bf;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.contract-flow-banner {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 16px;
  overflow: hidden;
  color: #dce9ef;
  background: #173749;
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}

.contract-flow-banner > div {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 18px 18px 17px 58px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent);
}

.contract-flow-banner > div + div {
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.contract-flow-banner span {
  position: absolute;
  top: 18px;
  left: 17px;
  color: #67d2b1;
  font-size: 12px;
  font-weight: 700;
}

.contract-flow-banner strong {
  color: #fff;
  font-size: 12px;
}

.contract-flow-banner small {
  color: #8fa9b8;
  font-size: 9px;
  line-height: 1.55;
}

.contract-summary-grid {
  margin-bottom: 16px;
}

.contract-panorama-list {
  display: grid;
  gap: 13px;
  padding: 14px;
}

.contract-panorama-card {
  display: grid;
  gap: 13px;
  overflow: hidden;
  background: linear-gradient(145deg, #fff, #f8fbfc);
  border: 1px solid #d5e2e7;
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(19, 52, 70, 0.06);
}

.contract-panorama-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 17px;
  background: linear-gradient(135deg, #123142, #174959);
}

.contract-panorama-identity {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.contract-panorama-identity > span {
  color: #70d5b5;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.contract-panorama-identity > strong {
  color: #fff;
  font-size: 18px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.contract-panorama-identity > small {
  color: #abc2cc;
  font-size: 10px;
  overflow-wrap: anywhere;
}

.contract-panorama-status {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
}

.contract-panorama-status > strong {
  color: #9edbc9;
  font-size: 12px;
}

.contract-panorama-info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 0 14px;
}

.contract-info-block {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 4px;
  padding: 13px 14px;
  background: #fff;
  border: 1px solid #dce7eb;
  border-radius: 11px;
}

.contract-info-block.customer {
  background: linear-gradient(145deg, #effaf6, #fff);
  border-color: #c6e6dc;
}

.contract-info-label {
  color: var(--ink-muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.contract-info-block > strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.contract-info-block.customer > strong {
  color: #0b5e52;
  font-size: 18px;
}

.contract-info-block > span:not(.contract-info-label) {
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.contract-info-block > small {
  color: var(--ink-muted);
  font-size: 9px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.contract-panorama-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 14px;
  padding: 0 15px;
}

.contract-panorama-meta > span {
  display: grid;
  gap: 2px;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.contract-panorama-meta b {
  color: var(--ink-muted);
  font-size: 8px;
  font-weight: 700;
}

.contract-panorama-actions {
  display: flex;
  justify-content: flex-end;
  padding: 11px 15px;
  background: #f5f9fa;
  border-top: 1px solid #e1eaee;
}

.contract-panorama-actions .inline-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.contract-table {
  min-width: 1220px;
}

.contract-table th:nth-child(3),
.contract-table td.contract-store-advisor-cell {
  width: 235px;
  min-width: 235px;
  white-space: normal;
}

.contract-table td.contract-store-advisor-cell strong {
  display: block;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.5;
}

.contract-table td.contract-store-advisor-cell small {
  display: block;
  margin-top: 4px;
  white-space: normal;
}

@media (max-width: 1350px) {
  .contract-panorama-info-grid,
  .contract-panorama-meta {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .contract-panorama-list {
    padding: 9px;
  }

  .contract-panorama-card-head {
    flex-direction: column;
  }

  .contract-panorama-info-grid,
  .contract-panorama-meta {
    grid-template-columns: 1fr;
  }

  .contract-panorama-actions {
    justify-content: stretch;
  }

  .contract-panorama-actions .inline-actions {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr 1fr;
  }

  .contract-panorama-actions .button {
    width: 100%;
    min-height: 42px;
  }
}

.vehicle-transfer-view-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(28, 111, 90, 0.08) 0 50%, rgba(219, 39, 119, 0.08) 50% 100%);
}

.vehicle-transfer-view-switch button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}

.vehicle-transfer-view-switch button[data-vehicle-transfer-view="internal"] {
  border-color: rgba(28, 111, 90, 0.2);
  background: rgba(255, 255, 255, 0.76);
}

.vehicle-transfer-view-switch button[data-vehicle-transfer-view="external"] {
  border-color: rgba(219, 39, 119, 0.24);
  background: rgba(255, 239, 247, 0.9);
}

.vehicle-transfer-view-switch button span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.vehicle-transfer-view-switch button small {
  font-size: 9px;
}

.vehicle-transfer-view-switch button.active {
  border-color: rgba(28, 111, 90, 0.2);
  background: #fff;
  box-shadow: 0 8px 22px rgba(28, 54, 46, 0.07);
}

.vehicle-transfer-view-switch button[data-vehicle-transfer-view="internal"].active {
  border-color: rgba(20, 128, 92, 0.5);
  background: linear-gradient(135deg, #ffffff, #e9f8f1);
  box-shadow: 0 8px 24px rgba(20, 128, 92, 0.14);
}

.vehicle-transfer-view-switch button[data-vehicle-transfer-view="external"] span {
  color: #b42368;
}

.vehicle-transfer-view-switch button[data-vehicle-transfer-view="external"].active {
  border-color: rgba(219, 39, 119, 0.55);
  background: linear-gradient(135deg, #fff5f9, #ffe0ee);
  box-shadow: 0 8px 24px rgba(219, 39, 119, 0.16);
}

.vehicle-transfer-view-switch button[data-vehicle-transfer-view="external"].active span {
  color: #a4135d;
}

.inventory-transfer-overview > div {
  border-color: rgba(28, 111, 90, 0.2);
  background:
    radial-gradient(circle at 100% 0%, rgba(28, 111, 90, 0.12), transparent 54%),
    linear-gradient(145deg, #fbfefc, #eef9f4);
}

.inventory-transfer-overview span,
.inventory-transfer-overview small {
  color: #437469;
}

.inventory-transfer-overview strong {
  color: #176b58;
}

.vehicle-transfer-view-switch button.active span {
  color: var(--green);
}

.external-transfer-intro {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 20px;
}

.external-transfer-intro > div {
  position: relative;
  padding: 13px 14px 13px 43px;
  border: 1px solid rgba(28, 111, 90, 0.14);
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(248, 252, 250, 0.98), rgba(238, 247, 242, 0.86));
}

.external-transfer-intro > div > span {
  position: absolute;
  top: 13px;
  left: 13px;
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 8px;
  font-weight: 800;
}

.external-transfer-intro strong,
.external-transfer-intro small {
  display: block;
}

.external-transfer-intro strong {
  color: var(--ink);
  font-size: 10px;
}

.external-transfer-intro small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
}

.external-transfer-table td {
  vertical-align: top;
}

.external-transfer-overview > div,
.external-finance-summary > div {
  border-color: rgba(219, 39, 119, 0.2);
  background:
    radial-gradient(circle at 100% 0%, rgba(236, 72, 153, 0.16), transparent 54%),
    linear-gradient(145deg, #fffafd, #fff0f7);
}

.external-transfer-overview span,
.external-transfer-overview small,
.external-finance-summary span,
.external-finance-summary small {
  color: #9c466e;
}

.external-transfer-overview strong,
.external-finance-summary strong {
  color: #a4135d;
}

.external-transfer-rule {
  border-color: rgba(219, 39, 119, 0.24);
  background: linear-gradient(135deg, #fff7fa, #ffe8f2);
  color: #8f1d55;
}

.external-transfer-rule strong {
  color: #a4135d;
}

.external-transfer-panel,
.external-finance-ledger {
  border-color: rgba(219, 39, 119, 0.23);
  box-shadow: inset 4px 0 0 rgba(219, 39, 119, 0.6);
}

.external-transfer-panel .toolbar,
.external-finance-ledger .toolbar {
  background: linear-gradient(90deg, rgba(255, 240, 247, 0.95), rgba(255, 255, 255, 0.82));
}

.external-transfer-table thead th {
  background: #fff0f7;
  color: #8f1d55;
}

.external-transfer-table tbody tr:hover {
  background: #fff7fb;
}

.external-payment-document .transfer-payment-document-head {
  border-bottom-color: #db2777;
  background:
    radial-gradient(circle at 100% 0%, rgba(236, 72, 153, 0.13), transparent 46%),
    #fffafd;
}

.external-payment-document .transfer-payment-document-head h2,
.external-payment-document .transfer-payment-document-summary > div:last-child strong {
  color: #a4135d;
}

.external-payment-document .transfer-payment-document-summary {
  background: #fff5f9;
}

.external-finance-summary {
  margin-top: 18px;
}

.external-finance-ledger {
  margin-top: 12px;
}

.external-stockin-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.external-stockin-summary > div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--soft);
}

.external-stockin-summary span,
.external-stockin-summary small {
  display: block;
  color: var(--muted);
  font-size: 9px;
}

.external-stockin-summary strong {
  display: block;
  margin: 5px 0 3px;
  color: var(--ink);
  font-size: 13px;
}

.external-payment-document .transfer-payment-document-summary {
  grid-template-columns: 0.85fr 1.1fr 1.25fr 1fr;
}

@media (max-width: 760px) {
  .vehicle-transfer-view-switch,
  .external-transfer-intro,
  .external-stockin-summary {
    grid-template-columns: 1fr;
  }

  .external-payment-document .transfer-payment-document-summary {
    grid-template-columns: 1fr;
  }
}

.invoice-transfer-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.invoice-transfer-summary-grid > div {
  padding: 16px 18px;
  border: 1px solid rgba(166, 96, 24, 0.2);
  border-radius: 14px;
  background:
    radial-gradient(circle at 100% 0%, rgba(217, 119, 6, 0.13), transparent 52%),
    linear-gradient(145deg, #fffdf8, #fff6e7);
}

.invoice-transfer-summary-grid span,
.invoice-transfer-summary-grid small {
  display: block;
  color: #87684a;
  font-size: 10px;
}

.invoice-transfer-summary-grid strong {
  display: block;
  margin: 7px 0 4px;
  color: #8b4b0d;
  font-size: 22px;
}

.invoice-transfer-summary-grid strong small {
  display: inline;
  margin-left: 3px;
  font-size: 9px;
}

.invoice-transfer-view-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
  padding: 6px;
  border: 1px solid rgba(166, 96, 24, 0.18);
  border-radius: 14px;
  background: linear-gradient(90deg, #fff9ef, #f8fbf8);
}

.invoice-transfer-view-switch button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
  color: #7d6c59;
  text-align: left;
  cursor: pointer;
}

.invoice-transfer-view-switch button span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.invoice-transfer-view-switch button small {
  font-size: 9px;
}

.invoice-transfer-view-switch button.active {
  border-color: rgba(166, 96, 24, 0.35);
  background: #fff7e9;
  box-shadow: 0 8px 22px rgba(142, 86, 22, 0.09);
}

.invoice-transfer-view-switch button.active span {
  color: #8b4b0d;
}

.invoice-partner-panel,
.invoice-application-panel {
  border-color: rgba(166, 96, 24, 0.2);
  box-shadow: inset 4px 0 0 rgba(180, 103, 20, 0.5);
}

.invoice-partner-panel .toolbar,
.invoice-application-panel .toolbar {
  background: linear-gradient(90deg, rgba(255, 249, 235, 0.94), rgba(255, 255, 255, 0.82));
}

.invoice-partner-workflow-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0 18px 16px;
  overflow: hidden;
  background: #eadcc5;
  border: 1px solid #eadcc5;
  border-radius: 11px;
}

.invoice-partner-workflow-strip > div {
  display: grid;
  min-height: 78px;
  grid-template-columns: 30px minmax(0, 1fr);
  align-content: center;
  gap: 3px 9px;
  padding: 12px;
  background: #fffdf8;
}

.invoice-partner-workflow-strip > div.attention {
  background: #fff7e9;
}

.invoice-partner-workflow-strip > div.active {
  background: linear-gradient(145deg, #fff5df, #fff);
}

.invoice-partner-workflow-strip > div > span {
  display: grid;
  width: 28px;
  height: 28px;
  grid-row: span 2;
  color: #fff;
  background: #a7651d;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  place-items: center;
}

.invoice-partner-workflow-strip strong,
.invoice-partner-workflow-strip small {
  display: block;
}

.invoice-partner-workflow-strip strong {
  color: var(--ink);
  font-size: 12px;
}

.invoice-partner-workflow-strip small {
  color: #8d7963;
  font-size: 9px;
  line-height: 1.45;
}

.invoice-partner-table thead th,
.invoice-application-table thead th {
  background: #fff7e9;
  color: #7a4a15;
}

.invoice-application-table td,
.invoice-partner-table td {
  vertical-align: top;
}

.invoice-partner-form-intro {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
  padding: 13px 15px;
  border: 1px solid rgba(166, 96, 24, 0.2);
  border-radius: 11px;
  background: #fffaf0;
}

.invoice-partner-form-intro > span {
  color: #a45e14;
}

.invoice-partner-form-intro strong {
  color: var(--ink);
  font-size: 12px;
}

.invoice-partner-form-intro p {
  margin: 4px 0 0;
  color: #7f705d;
  font-size: 9px;
  line-height: 1.65;
}

.invoice-partner-review {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.invoice-partner-review > div {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fffaf1;
}

.invoice-partner-review span,
.invoice-partner-review small {
  display: block;
  color: #8d7963;
  font-size: 9px;
}

.invoice-partner-review strong {
  display: block;
  margin: 4px 0;
  color: var(--ink);
  font-size: 13px;
}

.invoice-transfer-form-intro {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 18px;
}

.invoice-transfer-form-intro > div {
  padding: 13px;
  border: 1px solid rgba(166, 96, 24, 0.16);
  border-radius: 11px;
  background: #fffaf1;
}

.invoice-transfer-form-intro strong,
.invoice-transfer-form-intro span {
  display: block;
}

.invoice-transfer-form-intro strong {
  color: #7a4a15;
  font-size: 11px;
}

.invoice-transfer-form-intro span {
  margin-top: 3px;
  color: #85735e;
  font-size: 8px;
  line-height: 1.5;
}

.subsidy-disclaimer-check {
  align-items: flex-start;
  padding: 13px 15px;
  border: 1px solid rgba(180, 103, 20, 0.25);
  border-radius: 11px;
  background: #fff8ea;
  color: #6f5638;
  font-size: 9px;
  line-height: 1.7;
}

.subsidy-disclaimer-check .form-check-input {
  margin-top: 3px;
}

.subsidy-disclaimer-check strong {
  color: #7a4a15;
  font-size: 10px;
}

.invoice-transfer-approval-card,
.invoice-transfer-document {
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid rgba(166, 96, 24, 0.2);
  border-radius: 14px;
  background: #fff;
}

.invoice-transfer-approval-card > header {
  padding: 20px 24px;
  background: linear-gradient(120deg, #7d4a12, #b87325);
  color: #fff;
}

.invoice-transfer-approval-card > header span {
  font-size: 9px;
  opacity: 0.72;
}

.invoice-transfer-approval-card > header h3 {
  margin: 6px 0;
  font-size: 20px;
}

.invoice-transfer-approval-card > header em {
  font-size: 24px;
  font-style: normal;
  font-weight: 800;
}

.invoice-transfer-amount-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.invoice-transfer-amount-grid > div {
  padding: 12px 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.invoice-transfer-amount-grid span,
.invoice-transfer-amount-grid small {
  display: block;
  color: var(--muted);
  font-size: 9px;
}

.invoice-transfer-amount-grid strong {
  display: block;
  margin-top: 4px;
  color: #74400c;
  font-size: 13px;
}

.invoice-transfer-bank-line {
  padding: 12px 16px;
  color: var(--muted);
  font-size: 9px;
}

.invoice-transfer-bank-line strong {
  margin-right: 8px;
  color: var(--ink);
}

.invoice-transfer-return-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 15px;
}

.invoice-transfer-return-summary > div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffaf1;
}

.invoice-transfer-return-summary span,
.invoice-transfer-return-summary strong {
  display: block;
}

.invoice-transfer-return-summary span {
  color: var(--muted);
  font-size: 9px;
}

.invoice-transfer-return-summary strong {
  margin-top: 4px;
  color: #7a4a15;
  font-size: 14px;
}

.invoice-transfer-document .transfer-payment-document-head {
  border-bottom-color: #b87325;
  background:
    radial-gradient(circle at 100% 0%, rgba(217, 119, 6, 0.12), transparent 45%),
    #fffcf7;
}

.invoice-transfer-document .transfer-payment-document-head h2,
.invoice-transfer-document .transfer-payment-document-summary > div:last-child strong {
  color: #7a4a15;
}

@media (max-width: 900px) {
  .invoice-transfer-summary-grid,
  .invoice-transfer-return-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .invoice-transfer-amount-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .invoice-transfer-summary-grid,
  .invoice-transfer-view-switch,
  .invoice-transfer-form-intro,
  .invoice-partner-workflow-strip,
  .invoice-partner-review,
  .invoice-transfer-amount-grid,
  .invoice-transfer-return-summary {
    grid-template-columns: 1fr;
  }
}

.contract-detail-hero {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 16px;
  overflow: hidden;
  background: #dbe7ec;
  border-radius: 13px;
}

.contract-detail-hero > div {
  min-width: 0;
  padding: 16px;
  background: linear-gradient(135deg, #f7fbfc, #edf5f7);
}

.contract-detail-hero span,
.contract-detail-hero small {
  display: block;
  color: var(--ink-muted);
  font-size: 9px;
  line-height: 1.55;
}

.contract-detail-hero strong {
  display: block;
  margin: 4px 0;
  color: var(--ink);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.contract-detail-hero.compact > div {
  padding: 13px 14px;
}

.contract-signature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 16px 0;
}

.contract-signature-grid article {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 15px;
  background: linear-gradient(145deg, #fff, #f8fbfc);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.contract-signature-grid article > span {
  color: var(--ink-muted);
  font-size: 9px;
}

.contract-signature-grid img {
  width: 100%;
  height: 88px;
  object-fit: contain;
  background: #fff;
  border-bottom: 1px solid #ccd9df;
}

.contract-review-signature-note {
  display: grid;
  gap: 4px;
}

.contract-review-panorama {
  display: grid;
  grid-template-columns: minmax(560px, 1.55fr) minmax(400px, 0.85fr);
  gap: 14px;
  min-height: 660px;
}

.contract-review-document-panel,
.contract-review-side-panel {
  min-width: 0;
  overflow: hidden;
  background: #f8fbfc;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.contract-review-document-panel {
  display: flex;
  min-height: 0;
  flex-direction: column;
}

.contract-review-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.contract-review-panel-head > div {
  display: grid;
  gap: 3px;
}

.contract-review-panel-head strong {
  color: var(--ink);
  font-size: 13px;
}

.contract-review-panel-head small {
  color: var(--ink-muted);
  font-size: 10px;
}

.contract-review-document-panel iframe {
  width: 100%;
  min-height: 610px;
  flex: 1;
  background: #fff;
  border: 0;
}

.contract-review-side-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 13px;
}

.contract-review-signature-note strong,
.contract-review-signature-note span {
  display: block;
}

.contract-review-document {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.contract-review-document > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

.contract-review-document > summary::-webkit-details-marker {
  display: none;
}

.contract-review-document > summary > span:first-child {
  display: grid;
  gap: 3px;
}

.contract-review-document > summary strong {
  color: var(--ink);
  font-size: 12px;
}

.contract-review-document > summary small {
  color: var(--ink-muted);
  font-size: 10px;
}

.contract-review-document iframe {
  width: 100%;
  height: min(62vh, 680px);
  background: #fff;
  border: 0;
  border-top: 1px solid var(--line);
}

.contract-review-signatures article {
  min-height: 190px;
}

.contract-review-signatures img {
  height: 128px;
  padding: 8px;
  background:
    linear-gradient(to bottom, transparent calc(76% - 1px), #d4e1e6 calc(76% - 1px), #d4e1e6 76%, transparent 76%),
    #fff;
  border: 1px solid #d6e2e7;
  border-radius: 9px;
  image-rendering: auto;
}

@media (max-width: 1050px) {
  .contract-review-panorama {
    grid-template-columns: 1fr;
  }

  .contract-review-document-panel iframe {
    min-height: 58vh;
  }

  .contract-review-side-panel {
    overflow: visible;
  }
}

.contract-signature-grid strong {
  font-size: 11px;
}

.contract-signature-empty {
  display: grid;
  min-height: 88px;
  place-items: center;
  color: var(--ink-muted);
  background: #f7fafb;
  border: 1px dashed #ccd9df;
  border-radius: 8px;
  font-size: 10px;
}

.signature-pad-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.signature-pad-layout section {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 14px;
  background: #f8fbfc;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.signature-pad-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.signature-pad-head span {
  display: grid;
  gap: 2px;
}

.signature-pad-head small {
  color: var(--ink-muted);
  font-size: 8px;
}

.signature-name {
  width: 130px;
  padding: 7px;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 10px;
  text-align: right;
}

.signature-canvas {
  width: 100%;
  height: 180px;
  touch-action: none;
  background:
    linear-gradient(#fff, #fff) padding-box,
    repeating-linear-gradient(90deg, #d7e2e7 0 7px, transparent 7px 13px) border-box;
  border: 1px dashed #aebfc8;
  border-radius: 9px;
  cursor: crosshair;
}

.contract-confirm {
  margin-top: 14px;
  padding: 12px;
  background: var(--amber-soft);
  border: 1px solid #f0dfb4;
  border-radius: 9px;
}

.cashier-eligible-panel {
  margin-bottom: 16px;
}

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

.eligible-contract-grid article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  padding: 13px;
  background: linear-gradient(145deg, #f7fbfc, #fff);
  border: 1px solid var(--line);
  border-radius: 11px;
}

.eligible-contract-grid article > div {
  display: grid;
  min-width: 0;
}

.eligible-contract-grid article span,
.eligible-contract-grid article small {
  color: var(--ink-muted);
  font-size: 8px;
}

.eligible-contract-grid article strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eligible-contract-grid article em {
  grid-row: span 2;
  color: var(--green);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.eligible-contract-grid article .button {
  grid-column: 1 / -1;
  justify-self: end;
}

.toolbar-select {
  min-width: 118px;
  padding: 8px 28px 8px 10px;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 9px;
}

.icon-btn {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.icon-btn:hover {
  color: var(--ink);
  background: var(--surface-soft);
}

.icon-btn.compact {
  width: 28px;
  height: 28px;
  color: #6e8595;
  border: 0;
}

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

.follow-up-reminder {
  position: sticky;
  top: 88px;
  z-index: 20;
  margin: 14px 28px 0;
  padding: 17px 19px;
  color: #8f1717;
  background:
    linear-gradient(90deg, #d51f26 0 7px, transparent 7px),
    linear-gradient(135deg, #fff7f7, #ffe7e7);
  border: 2px solid #e13a3f;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(189, 29, 35, 0.2);
  animation: reminder-in 220ms ease both;
}

.follow-up-reminder[hidden] {
  display: none;
}

.follow-up-reminder-content,
.follow-up-reminder-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.follow-up-reminder-title {
  min-width: 0;
}

.follow-up-reminder-title > span {
  display: inline-block;
  margin-bottom: 5px;
  padding: 3px 7px;
  color: #fff;
  background: #d51f26;
  border-radius: 5px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.follow-up-reminder-title h2 {
  margin: 0 0 5px;
  color: #c51d24;
  font-size: clamp(17px, 1.6vw, 23px);
  font-weight: 750;
  letter-spacing: -0.025em;
}

.follow-up-reminder-title p {
  margin: 0;
  color: #8d4648;
  font-size: 9px;
  line-height: 1.6;
}

.follow-up-reminder-actions .button {
  color: #fff;
  background: #c92229;
  border-color: #c92229;
  white-space: nowrap;
}

.follow-up-reminder-list {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.follow-up-reminder-item {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(213, 31, 38, 0.13);
  border-radius: 9px;
}

.follow-up-reminder-item > div {
  min-width: 0;
  flex: 1;
}

.follow-up-reminder-item strong,
.follow-up-reminder-item span {
  display: block;
}

.follow-up-reminder-item > div > strong {
  margin-bottom: 3px;
  color: #9f1c21;
  font-size: 11px;
}

.follow-up-reminder-item > div > span {
  color: #8c6567;
  font-size: 8px;
}

.follow-up-reminder-time {
  flex: 0 0 auto;
  text-align: right;
}

.follow-up-reminder-time strong {
  color: #b71d23;
  font-size: 10px;
}

.follow-up-reminder-time span {
  color: #d12b31;
  font-size: 8px;
  font-weight: 650;
}

.follow-up-reminder-item .button {
  color: #a6191e;
  background: #fff;
  border-color: rgba(183, 29, 35, 0.28);
}

.follow-up-reminder-more {
  color: #a74a4e;
  font-size: 8px;
  text-align: right;
}

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

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

.topbar-left,
.topbar-actions,
.top-filters,
.profile-button {
  display: flex;
  align-items: center;
}

.topbar-left {
  gap: 12px;
}

.page-title-wrap {
  min-width: 165px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--ink-muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

h2 {
  margin-bottom: 6px;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

h3 {
  margin-bottom: 5px;
  font-size: 15px;
  font-weight: 600;
}

h4 {
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
}

.topbar-actions {
  gap: 10px;
}

.top-filters {
  gap: 8px;
}

.filter-field {
  display: flex;
  height: 37px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.filter-field span {
  color: var(--ink-muted);
  font-size: 10px;
  white-space: nowrap;
}

.filter-field select {
  max-width: 130px;
  padding: 0 17px 0 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 12px;
  font-weight: 500;
}

.notification-btn {
  position: relative;
}

.icon-btn.is-refreshing svg {
  animation: spin 0.65s linear infinite;
}

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

.notification-dot[hidden] {
  display: none;
}

.notification-dot.has-count {
  top: 1px;
  right: 1px;
  display: grid;
  width: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  color: #fff;
  background: #e45e36;
  border: 2px solid #fff;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
  place-items: center;
}

.notification-btn.has-todos {
  color: #c64f2c;
  background: #fff3eb;
  border-color: #f0c4b3;
}

.profile-button {
  gap: 8px;
  padding: 3px 6px;
  background: transparent;
  border: 0;
}

.profile-button > span:last-child svg {
  width: 14px;
  height: 14px;
}

.profile-text {
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
}

.profile-text small {
  display: block;
  margin-top: 2px;
  color: var(--ink-muted);
  font-size: 9px;
  font-weight: 400;
}

.profile-text > span {
  display: block;
}

.mobile-menu {
  display: none;
}

.workspace {
  max-width: 1600px;
  min-height: calc(100vh - 78px);
  margin: 0 auto;
  padding: 24px 28px 42px;
  animation: workspace-in 220ms ease both;
}

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

.loading-state {
  display: flex;
  min-height: 45vh;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--ink-muted);
}

.deferred-state-loading {
  flex-wrap: wrap;
  align-content: center;
}

.deferred-state-loading small {
  flex-basis: 100%;
  max-width: 520px;
  text-align: center;
  line-height: 1.6;
}

.deferred-state-error p {
  max-width: 620px;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

.page-head h2 {
  margin-bottom: 6px;
  font-size: 22px;
}

.page-head p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.7;
}

.page-head-actions,
.toolbar,
.toolbar-left,
.toolbar-right,
.inline-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

@media (max-width: 1100px) {
  .page-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .page-head > div:first-child {
    min-width: min(100%, 320px);
    flex: 1 1 420px;
  }

  .page-head-actions {
    flex-wrap: wrap;
  }
}

.permission-chip {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  color: var(--green);
  background: var(--green-soft);
  border: 1px solid #cce9dd;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 500;
  white-space: nowrap;
}

.permission-chip.denied {
  color: var(--red);
  background: var(--red-soft);
  border-color: #f1caca;
}

.permission-chip > span,
.permission-chip svg {
  width: 13px;
  height: 13px;
}

.button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: border 150ms ease, background 150ms ease, transform 150ms ease;
}

.button:hover {
  background: var(--surface-soft);
  border-color: #bcc9d1;
  transform: translateY(-1px);
}

.button:disabled {
  opacity: 0.45;
  pointer-events: none;
  transform: none;
}

.button.primary {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 7px 15px rgba(255, 109, 58, 0.18);
}

.button.primary:hover {
  background: #ed5e2d;
  border-color: #ed5e2d;
}

.button.dark {
  color: #fff;
  background: var(--navy);
  border-color: var(--navy);
}

.button.ghost {
  background: transparent;
  border-color: transparent;
}

.button.danger {
  color: var(--red);
  background: #fff;
  border-color: #f1caca;
}

.button.small {
  min-height: 31px;
  padding: 0 10px;
  font-size: 11px;
}

.button svg {
  width: 15px;
  height: 15px;
}

.selection-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-soft);
  font-size: 11px;
}

.selection-chip::before {
  width: 6px;
  height: 6px;
  content: "";
  background: var(--teal);
  border-radius: 50%;
}

.dashboard-todo-center {
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
  background: #fff;
  border: 1px solid #dbe5e8;
  border-radius: 18px;
  box-shadow: 0 16px 32px rgba(15, 43, 61, 0.09);
}

.dashboard-todo-center::after {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  content: "";
  background: linear-gradient(90deg, #ff6d3a, #efb84c 45%, #0b8f83);
}

.dashboard-todo-hero {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 21px 22px 20px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 6%, rgba(255, 143, 92, 0.27), transparent 32%),
    linear-gradient(120deg, #102b3d, #123747 60%, #174653);
}

.dashboard-todo-marker {
  position: relative;
  display: grid;
  width: 54px;
  height: 54px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 15px;
  place-items: center;
}

.dashboard-todo-marker > span {
  display: inline-flex;
}

.dashboard-todo-marker svg {
  width: 25px;
  height: 25px;
  stroke-width: 1.8;
}

.dashboard-todo-marker b {
  position: absolute;
  top: -6px;
  right: -7px;
  display: grid;
  min-width: 23px;
  height: 23px;
  padding: 0 5px;
  color: #fff;
  background: #ff6d3a;
  border: 2px solid #133846;
  border-radius: 999px;
  font-size: 10px;
  place-items: center;
}

.dashboard-todo-copy > span {
  display: block;
  margin-bottom: 5px;
  color: #94b0bb;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.dashboard-todo-copy h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(19px, 2vw, 25px);
  line-height: 1.25;
}

.dashboard-todo-copy p {
  margin: 6px 0 4px;
  color: #d2e0e5;
  font-size: 12px;
  line-height: 1.55;
}

.dashboard-todo-copy p strong {
  color: #fff;
  font-size: 16px;
}

.dashboard-todo-copy p em {
  color: #ffad8f;
  font-style: normal;
  font-weight: 700;
}

.dashboard-todo-copy small {
  color: #91a8b2;
  font-size: 9px;
}

.dashboard-todo-total {
  display: grid;
  min-width: 126px;
  align-content: center;
  justify-items: end;
  gap: 2px;
  padding-left: 20px;
  border-left: 1px solid rgba(255, 255, 255, 0.13);
}

.dashboard-todo-total > span,
.dashboard-todo-total > em {
  color: #9eb4bd;
  font-size: 9px;
  font-style: normal;
}

.dashboard-todo-total > strong {
  color: #fff;
  font-size: 30px;
  line-height: 1.1;
}

.dashboard-todo-total > strong small {
  margin-left: 3px;
  color: #a8bdc5;
  font-size: 10px;
}

.dashboard-todo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 15px 18px 18px;
}

.dashboard-todo-card {
  display: grid;
  min-height: 118px;
  grid-template-areas:
    "icon copy count"
    "icon action action";
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 7px 11px;
  align-items: start;
  padding: 13px 14px;
  color: var(--ink);
  background: linear-gradient(145deg, #f7fafb, #fff);
  border: 1px solid #dfe8ea;
  border-radius: 12px;
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.dashboard-todo-card:hover {
  border-color: #9fc4c8;
  box-shadow: 0 9px 20px rgba(18, 73, 86, 0.1);
  transform: translateY(-1px);
}

.dashboard-todo-card.urgent {
  background: linear-gradient(145deg, #fff8f3, #fff);
  border-color: #f2c7b7;
}

.dashboard-todo-card-icon {
  display: grid;
  width: 42px;
  height: 42px;
  grid-area: icon;
  color: #0b756e;
  background: #e6f4f1;
  border-radius: 11px;
  place-items: center;
}

.dashboard-todo-card.urgent .dashboard-todo-card-icon {
  color: #d75d34;
  background: #fff0e9;
}

.dashboard-todo-card-icon svg {
  width: 20px;
  height: 20px;
}

.dashboard-todo-card-copy {
  display: grid;
  min-width: 0;
  grid-area: copy;
  gap: 2px;
}

.dashboard-todo-card-copy em {
  overflow: hidden;
  color: #8a9ba2;
  font-size: 8px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-todo-card.urgent .dashboard-todo-card-copy em {
  color: #c26743;
}

.dashboard-todo-card-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-todo-card-copy small {
  overflow: hidden;
  color: var(--ink-muted);
  font-size: 9px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-todo-card-count {
  display: flex;
  grid-area: count;
  align-items: baseline;
  gap: 2px;
  color: #104b56;
}

.dashboard-todo-card-count strong {
  font-size: 24px;
  line-height: 1;
}

.dashboard-todo-card-count small {
  color: var(--ink-muted);
  font-size: 8px;
}

.dashboard-todo-card.urgent .dashboard-todo-card-count {
  color: #d75d34;
}

.dashboard-todo-card-action {
  display: inline-flex;
  grid-area: action;
  align-items: center;
  gap: 4px;
  color: #0b756e;
  font-size: 9px;
  font-weight: 700;
}

.dashboard-todo-card.urgent .dashboard-todo-card-action {
  color: #c95a35;
}

.dashboard-todo-card-action svg {
  width: 12px;
  height: 12px;
}

.dashboard-todo-clear {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 15px 18px 18px;
  padding: 16px;
  color: #176b5c;
  background: #edf8f4;
  border: 1px solid #cfe9df;
  border-radius: 12px;
}

.dashboard-todo-clear > span {
  display: inline-flex;
}

.dashboard-todo-clear svg {
  width: 25px;
  height: 25px;
}

.dashboard-todo-clear strong {
  display: block;
  color: #125e51;
  font-size: 12px;
}

.dashboard-todo-clear p {
  margin: 3px 0 0;
  color: #5d8279;
  font-size: 9px;
}

.dashboard-todo-more {
  margin: 0 18px 18px;
  border-top: 1px solid #e2eaec;
}

.dashboard-todo-more > summary {
  padding: 11px 2px 0;
  color: #44616b;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

.dashboard-todo-more .dashboard-todo-grid {
  padding: 12px 0 0;
}

.global-todo-reminder {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) minmax(250px, auto) auto;
  gap: 13px;
  align-items: center;
  margin-bottom: 14px;
  padding: 12px 14px;
  background: linear-gradient(100deg, #fff8f1, #fff 72%);
  border: 1px solid #f0d4c3;
  border-left: 4px solid #e46e45;
  border-radius: 13px;
  box-shadow: 0 8px 20px rgba(111, 67, 38, 0.07);
}

.global-todo-reminder.has-urgent {
  background: linear-gradient(100deg, #fff2eb, #fff 72%);
  border-color: #efc8b7;
  border-left-color: #dc5c33;
}

.global-todo-marker {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  color: #b84d2b;
  background: #fff;
  border: 1px solid #efc7b7;
  border-radius: 11px;
  place-items: center;
}

.global-todo-marker > span,
.global-todo-marker svg {
  display: inline-flex;
  width: 20px;
  height: 20px;
}

.global-todo-marker b {
  position: absolute;
  top: -7px;
  right: -7px;
  display: grid;
  min-width: 21px;
  height: 21px;
  padding: 0 4px;
  color: #fff;
  background: #e25f36;
  border: 2px solid #fff;
  border-radius: 999px;
  font-size: 8px;
  place-items: center;
}

.global-todo-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.global-todo-copy > span {
  color: #b27054;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.global-todo-copy > strong {
  overflow: hidden;
  color: #253f49;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-todo-copy > small {
  overflow: hidden;
  color: #7d817f;
  font-size: 9px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-todo-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-end;
}

.global-todo-quick-actions button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 29px;
  padding: 5px 8px;
  color: #47616b;
  background: #fff;
  border: 1px solid #e2d8d1;
  border-radius: 8px;
  font-size: 9px;
}

.global-todo-quick-actions button.urgent {
  color: #b64c2a;
  background: #fff5ef;
  border-color: #efc3b1;
}

.global-todo-quick-actions button b {
  color: #db5a31;
}

.global-todo-quick-actions button svg {
  width: 11px;
  height: 11px;
}

.global-todo-all {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 10px;
  color: #fff;
  background: #153b49;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.global-todo-all svg {
  width: 12px;
  height: 12px;
}

.dashboard-todo-modal-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 14px;
}

.dashboard-todo-modal-summary > div {
  padding: 12px 13px;
  background: #f7fafb;
  border: 1px solid #dfe8ea;
  border-radius: 10px;
}

.dashboard-todo-modal-summary > div.attention {
  background: #fff5ef;
  border-color: #efc8b7;
}

.dashboard-todo-modal-summary span,
.dashboard-todo-modal-summary small {
  display: block;
  color: #788d95;
  font-size: 9px;
}

.dashboard-todo-modal-summary strong {
  display: block;
  margin: 3px 0;
  color: #173d49;
  font-size: 19px;
}

.dashboard-todo-modal-summary strong small {
  display: inline;
  margin-left: 3px;
  font-size: 8px;
}

.dashboard-todo-modal-grid {
  padding: 0 0 4px;
}

@media (max-width: 1180px) {
  .dashboard-todo-grid {
    grid-template-columns: 1fr;
  }

  .global-todo-reminder {
    grid-template-columns: 44px minmax(0, 1fr) auto;
  }

  .global-todo-quick-actions {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    padding-left: 57px;
  }
}

@media (max-width: 720px) {
  .dashboard-todo-hero {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    padding: 17px 15px;
  }

  .dashboard-todo-marker {
    width: 46px;
    height: 46px;
  }

  .dashboard-todo-total {
    grid-column: 1 / -1;
    grid-template-columns: auto auto 1fr;
    align-items: baseline;
    gap: 6px;
    padding: 9px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.13);
    border-left: 0;
  }

  .dashboard-todo-total > strong {
    font-size: 24px;
  }

  .dashboard-todo-total > em {
    justify-self: end;
  }

  .dashboard-todo-grid {
    gap: 8px;
    padding: 12px;
  }

  .dashboard-todo-card {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    min-height: 108px;
    padding: 11px;
  }

  .dashboard-todo-card-icon {
    width: 38px;
    height: 38px;
  }

  .dashboard-todo-more {
    margin: 0 12px 12px;
  }

  .global-todo-reminder {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    padding: 11px 12px;
  }

  .global-todo-copy > strong,
  .global-todo-copy > small {
    white-space: normal;
  }

  .global-todo-quick-actions {
    grid-column: 1 / -1;
    grid-row: auto;
    padding-left: 0;
  }

  .global-todo-all {
    grid-column: 1 / -1;
    justify-self: stretch;
    justify-content: center;
  }

  .dashboard-todo-modal-summary {
    grid-template-columns: 1fr;
  }
}

.hero-panel {
  position: relative;
  display: grid;
  min-height: 162px;
  grid-template-columns: minmax(0, 1.3fr) minmax(370px, 0.7fr);
  gap: 24px;
  overflow: hidden;
  margin-bottom: 18px;
  padding: 25px 28px;
  color: #fff;
  background:
    radial-gradient(circle at 98% -10%, rgba(73, 155, 176, 0.58), transparent 42%),
    radial-gradient(circle at 55% 140%, rgba(255, 109, 58, 0.18), transparent 32%),
    linear-gradient(120deg, #102b3d, #0c202e 56%, #163b4c);
  border-radius: 20px;
  box-shadow: 0 18px 36px rgba(16, 47, 64, 0.14);
}

.hero-panel::after {
  position: absolute;
  top: -65px;
  right: 40%;
  width: 190px;
  height: 190px;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  box-shadow: 0 0 0 35px rgba(255, 255, 255, 0.025), 0 0 0 70px rgba(255, 255, 255, 0.018);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 11px;
  color: #a8bdc9;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  color: #a9efd9;
  background: rgba(99, 214, 172, 0.1);
  border: 1px solid rgba(99, 214, 172, 0.18);
  border-radius: 999px;
  font-size: 9px;
  letter-spacing: 0;
}

.live-pill::before {
  width: 5px;
  height: 5px;
  content: "";
  background: #6ee6bb;
  border-radius: 50%;
}

.hero-panel h2 {
  max-width: 620px;
  margin-bottom: 8px;
  font-size: clamp(20px, 2.1vw, 27px);
  line-height: 1.35;
}

.hero-panel h2 em {
  color: #ff9c79;
  font-style: normal;
}

.hero-copy > p {
  max-width: 630px;
  margin-bottom: 17px;
  color: #aabdc7;
  font-size: 11px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.hero-actions .button {
  min-height: 34px;
  color: #e5eef2;
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

.hero-actions .button.primary {
  color: #16252f;
  background: #f3f7f8;
  border-color: #f3f7f8;
}

.hero-side {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-content: center;
  gap: 10px;
}

.hero-stat {
  min-width: 0;
  padding: 14px 15px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  backdrop-filter: blur(5px);
}

.hero-stat span {
  display: block;
  margin-bottom: 8px;
  color: #8fa9b8;
  font-size: 10px;
}

.hero-stat strong {
  display: block;
  overflow: hidden;
  color: #f8fbfc;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-stat small {
  display: block;
  margin-top: 5px;
  color: #80c9b4;
  font-size: 9px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric-card,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.metric-card {
  position: relative;
  min-width: 0;
  padding: 17px 17px 15px;
  border-radius: 13px;
}

.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.metric-label {
  color: var(--ink-soft);
  font-size: 11px;
}

.metric-icon {
  width: 30px;
  height: 30px;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 9px;
}

.metric-icon.orange {
  color: var(--accent);
  background: var(--accent-soft);
}

.metric-icon.blue {
  color: var(--blue);
  background: var(--blue-soft);
}

.metric-icon.purple {
  color: var(--purple);
  background: var(--purple-soft);
}

.metric-value {
  margin: 12px 0 7px;
  color: var(--ink);
  font-size: clamp(19px, 1.6vw, 24px);
  font-weight: 650;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.metric-value .unit {
  margin-left: 3px;
  color: var(--ink-muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
}

.metric-bottom {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  color: var(--ink-muted);
  font-size: 9px;
}

.delta {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--green);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.delta.down {
  color: var(--red);
}

.delta.neutral {
  color: var(--ink-muted);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.72fr) minmax(295px, 0.78fr);
  gap: 16px;
  margin-bottom: 16px;
}

.panel {
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius);
}

.panel-header {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 19px 12px;
}

.panel-title {
  min-width: 0;
}

.panel-title h3 {
  margin-bottom: 4px;
}

.panel-title p {
  margin-bottom: 0;
  color: var(--ink-muted);
  font-size: 9px;
}

.panel-body {
  padding: 0 19px 19px;
}

.panel-body.flush {
  padding: 0;
}

.panel-header .icon-btn {
  width: 30px;
  height: 30px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-muted);
  font-size: 9px;
  white-space: nowrap;
}

.legend-dot {
  width: 7px;
  height: 7px;
  background: var(--teal);
  border-radius: 50%;
}

.legend-dot.orange {
  background: var(--accent);
}

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

.legend-dot.grey {
  background: #b6c2cb;
}

.chart-wrap {
  position: relative;
  width: 100%;
  min-height: 236px;
}

.chart-wrap svg {
  width: 100%;
  height: 236px;
  overflow: visible;
}

.chart-axis {
  fill: var(--ink-muted);
  font-family: var(--font);
  font-size: 9px;
}

.chart-grid-line {
  stroke: #edf1f3;
  stroke-width: 1;
}

.chart-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-area {
  opacity: 0.08;
}

.chart-tooltip {
  position: absolute;
  z-index: 3;
  min-width: 120px;
  padding: 9px 11px;
  color: #dce7ed;
  background: rgba(13, 31, 45, 0.95);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  font-size: 10px;
  line-height: 1.65;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -105%);
  transition: opacity 100ms ease;
}

.chart-tooltip.visible {
  opacity: 1;
}

.chart-tooltip strong {
  display: block;
  margin-bottom: 2px;
  color: #fff;
}

.chart-tooltip span {
  display: flex;
  justify-content: space-between;
  gap: 15px;
}

.chart-tooltip b {
  color: #fff;
  font-weight: 500;
}

.donut-wrap {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  min-height: 194px;
}

.donut-chart {
  position: relative;
  width: 130px;
  height: 130px;
}

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

.donut-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}

.donut-center span {
  color: var(--ink-muted);
  font-size: 9px;
}

.donut-center strong {
  margin-top: 2px;
  font-size: 17px;
  font-weight: 650;
}

.donut-legend {
  min-width: 0;
}

.donut-item {
  display: grid;
  grid-template-columns: 8px minmax(62px, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 8px 0;
  border-bottom: 1px solid #f0f3f5;
}

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

.donut-item .legend-dot {
  border-radius: 2px;
}

.donut-item span {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.donut-item strong {
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
}

.donut-item small {
  display: block;
  margin-top: 2px;
  color: var(--ink-muted);
  font-size: 8px;
  text-align: right;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  color: var(--ink);
  font-size: 12px;
}

.data-table th {
  padding: 11px 14px;
  color: var(--ink-muted);
  background: #fafbfc;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}

.data-table td {
  padding: 13px 14px;
  border-bottom: 1px solid #edf1f3;
  vertical-align: middle;
  white-space: nowrap;
}

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

.data-table tbody tr {
  transition: background 120ms ease;
}

.data-table tbody tr:hover {
  background: #f9fbfc;
}

.data-table tbody tr.clickable {
  cursor: pointer;
}

.data-table .num {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.data-table .muted {
  color: var(--ink-muted);
  font-size: 10px;
}

.data-table .strong {
  font-weight: 600;
}

.data-table .negative {
  color: var(--red);
}

.warning-text {
  color: var(--amber) !important;
}

.data-table .positive {
  color: var(--green);
}

.data-table tfoot td {
  padding: 11px 12px;
  color: var(--ink);
  background: #f7f9fa;
  border-top: 1px solid var(--line);
  font-weight: 600;
}

.store-cell {
  display: flex;
  align-items: center;
}

.store-cell strong {
  display: block;
  font-size: 10px;
  font-weight: 600;
}

.store-cell span {
  display: block;
  margin-top: 2px;
  color: var(--ink-muted);
  font-size: 8px;
}

.brand-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.brand-tag-list span {
  padding: 3px 6px;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 4px;
  font-size: 8px;
  white-space: nowrap;
}

.brand-directory-panel {
  margin-bottom: 16px;
}

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

.brand-directory-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  color: var(--ink);
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 9px;
  font: inherit;
  text-align: left;
}

.brand-directory-item:hover:not(:disabled) {
  background: #f5faf8;
  border-color: #c9e4de;
}

.brand-directory-mark {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #fff;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 600;
}

.brand-directory-item strong,
.brand-directory-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-directory-item strong {
  font-size: 9px;
  font-weight: 600;
}

.brand-directory-item small {
  margin-top: 2px;
  color: var(--ink-muted);
  font-size: 8px;
}

.brand-manager-list {
  display: grid;
  gap: 7px;
}

.brand-manager-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  color: var(--ink);
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 9px;
  font: inherit;
  text-align: left;
}

.brand-manager-row:hover {
  background: #f5faf8;
  border-color: #c9e4de;
}

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

.brand-manager-row strong {
  margin-bottom: 3px;
  font-size: 10px;
}

.brand-manager-row small {
  color: var(--ink-muted);
  font-size: 8px;
}

.store-address-cell {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 500;
}

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

.status.warning {
  color: var(--amber);
  background: var(--amber-soft);
}

.status.danger {
  color: var(--red);
  background: var(--red-soft);
}

.status.info {
  color: var(--blue);
  background: var(--blue-soft);
}

.status.neutral {
  color: var(--ink-muted);
  background: #f0f3f5;
}

.progress-cell {
  min-width: 92px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  gap: 7px;
  margin-bottom: 5px;
  color: var(--ink-muted);
  font-size: 8px;
}

.progress-track {
  height: 5px;
  overflow: hidden;
  background: #edf1f3;
  border-radius: 99px;
}

.progress-fill {
  height: 100%;
  background: var(--teal);
  border-radius: inherit;
}

.progress-fill.orange {
  background: var(--accent);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  background: #eef2f4;
  border-radius: 10px;
}

.tab-button {
  min-height: 31px;
  padding: 0 12px;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 500;
}

.tab-button.active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 2px 6px rgba(12, 31, 45, 0.08);
}

.analysis-hero {
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) minmax(0, 1.3fr);
  gap: 0;
  overflow: hidden;
  margin-bottom: 16px;
  background: linear-gradient(130deg, #102b3d, #1b4053);
  border-radius: 16px;
  box-shadow: 0 15px 34px rgba(16, 47, 64, 0.12);
}

.analysis-hero-main {
  padding: 23px 24px;
  color: #fff;
}

.analysis-hero-main .eyebrow {
  color: #89a4b3;
}

.analysis-hero-main h2 {
  margin-bottom: 8px;
  font-size: 18px;
}

.analysis-hero-main p {
  margin-bottom: 17px;
  color: #9fb4c0;
  font-size: 10px;
  line-height: 1.7;
}

.analysis-hero-value {
  font-size: 31px;
  font-weight: 650;
  letter-spacing: -0.04em;
}

.analysis-hero-value small {
  margin-left: 4px;
  color: #9fb4c0;
  font-size: 11px;
  letter-spacing: 0;
}

.analysis-hero-foot {
  display: flex;
  gap: 18px;
  margin-top: 12px;
  color: #acc0ca;
  font-size: 9px;
}

.analysis-hero-foot b {
  margin-left: 4px;
  color: #fff;
  font-weight: 500;
}

.analysis-hero-side {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: stretch;
  padding: 22px;
  background: rgba(255, 255, 255, 0.035);
}

.analysis-mini {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4px 17px;
  color: #dfe8ec;
  border-left: 1px solid rgba(255, 255, 255, 0.09);
}

.analysis-mini span {
  margin-bottom: 9px;
  color: #88a1af;
  font-size: 9px;
}

.analysis-mini strong {
  font-size: 17px;
  font-weight: 600;
}

.analysis-mini small {
  margin-top: 6px;
  color: #7fd1b6;
  font-size: 8px;
}

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

.sales-query-panel {
  margin-bottom: 16px;
}

.quality-filter-panel {
  margin-bottom: 14px;
}

.quality-filter-fields {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: end;
  gap: 12px;
  padding: 16px 18px 18px;
}

.quality-filter-actions {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}

.quality-filter-actions .button {
  width: 100%;
}

.quality-main-tabs {
  width: fit-content;
  margin-bottom: 16px;
}

.quality-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.quality-overview-grid {
  margin-bottom: 0;
}

.structure-bars {
  display: grid;
  gap: 13px;
}

.structure-bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px;
  align-items: center;
  gap: 5px 10px;
}

.structure-bar-button {
  width: 100%;
  padding: 4px 6px;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 7px;
  font: inherit;
  text-align: left;
  transition: background 140ms ease;
}

.structure-bar-button:hover {
  background: #f7fafb;
}

.structure-bar-label {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.structure-bar-label span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 9px;
}

.structure-bar-label i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
}

.structure-bar-label strong {
  font-size: 10px;
  font-weight: 600;
}

.structure-bar-track {
  height: 7px;
  overflow: hidden;
  background: #edf1f3;
  border-radius: 99px;
}

.structure-bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.structure-bar-row > small {
  color: var(--ink-muted);
  font-size: 8px;
  text-align: right;
}

.quality-insights {
  display: grid;
  gap: 0;
  padding-top: 0;
}

.quality-insights > div {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 0;
  border-bottom: 1px solid #edf1f3;
}

.quality-insights > div:last-child {
  border-bottom: 0;
}

.quality-insight-icon {
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 8px;
  font-size: 8px;
  font-weight: 600;
}

.quality-insight-icon.positive {
  color: var(--green);
  background: var(--green-soft);
}

.quality-insight-icon.warning {
  color: var(--red);
  background: var(--red-soft);
}

.quality-insights p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 9px;
  line-height: 1.7;
}

.quality-insights strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 10px;
}

.quality-dimension-tabs {
  background: transparent;
}

.quality-group-table {
  max-height: 470px;
}

.quality-group-table .data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.structure-component-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.structure-component-card {
  min-width: 0;
  padding: 14px 15px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: var(--shadow-sm);
  font: inherit;
  text-align: left;
  transition: border 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.structure-component-card:hover {
  border-color: #b7d4d0;
  box-shadow: 0 8px 20px rgba(11, 143, 131, 0.08);
  transform: translateY(-1px);
}

.structure-component-card > div {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-muted);
  font-size: 9px;
}

.structure-component-card strong {
  display: block;
  margin: 9px 0 5px;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.structure-component-card p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  color: var(--ink-muted);
  font-size: 8px;
}

.structure-component-card p span {
  color: var(--teal);
  white-space: nowrap;
}

.component-detail-context {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 13px;
  padding: 11px 12px;
  color: var(--ink-soft);
  background: #f7f9fa;
  border-radius: 9px;
}

.component-color-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin-top: 4px;
  border-radius: 2px;
}

.component-detail-context p {
  margin: 0;
  font-size: 9px;
  line-height: 1.65;
}

.component-store-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 13px;
}

.component-store-summary > div {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.component-store-summary span {
  color: var(--ink-muted);
  font-size: 8px;
}

.component-store-summary strong {
  font-size: 9px;
  font-weight: 600;
}

.component-detail-table {
  max-height: 350px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.component-detail-table .data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  border-top: 0;
}

.unit-bucket-list {
  display: grid;
  gap: 13px;
}

.unit-bucket > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  color: var(--ink-soft);
  font-size: 9px;
}

.unit-bucket > div:first-child span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.unit-bucket i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
}

.unit-bucket small {
  display: block;
  margin-top: 4px;
  color: var(--ink-muted);
  font-size: 8px;
  text-align: right;
}

.advisor-podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.advisor-card {
  position: relative;
  min-width: 0;
  padding: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0, rgba(11, 143, 131, 0.12), transparent 42%),
    #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: var(--shadow-sm);
}

.advisor-card.rank-1 {
  border-color: #b4ddd5;
  box-shadow: 0 10px 24px rgba(11, 143, 131, 0.1);
}

.rank-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  color: var(--teal);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.advisor-card h3 {
  margin-bottom: 8px;
}

.advisor-card > strong {
  display: block;
  color: var(--ink);
  font-size: 20px;
  font-weight: 650;
}

.advisor-card p {
  margin: 7px 0 0;
  color: var(--ink-muted);
  font-size: 8px;
}

.model-power-list {
  display: grid;
  gap: 13px;
}

.model-power-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
}

.model-rank {
  color: var(--ink-muted);
  font-size: 8px;
  font-variant-numeric: tabular-nums;
}

.model-power-main {
  min-width: 0;
}

.model-power-main > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
}

.model-power-main strong {
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-power-main span {
  color: var(--ink-muted);
  font-size: 8px;
  white-space: nowrap;
}

.model-power-track {
  height: 6px;
  overflow: hidden;
  background: #edf1f3;
  border-radius: 99px;
}

.model-power-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.model-power-row > strong {
  min-width: 70px;
  font-size: 10px;
  text-align: right;
}

.sales-query-fields {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: end;
  gap: 12px;
  padding: 17px 18px 18px;
}

.sales-query-fields .form-field {
  min-width: 0;
}

.sales-query-keyword {
  grid-column: span 2;
}

.sales-query-actions {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 8px;
}

.sales-query-actions .button {
  min-width: 76px;
}

.sales-query-metrics {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.sales-document-table {
  max-height: 560px;
  overflow: auto;
}

.sales-document-table .data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  border-top: 0;
}

.selection-column {
  width: 34px;
  padding-right: 5px !important;
  padding-left: 10px !important;
  text-align: center !important;
}

.selection-column .form-check {
  justify-content: center;
  margin: 0;
}

.sales-document-table tr.selected-row {
  background: #eef9f6;
}

.query-customer-link {
  padding: 0;
  color: #176b83;
  background: transparent;
  border: 0;
  border-bottom: 1px dashed currentColor;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.query-customer-link:hover {
  color: var(--accent);
  border-bottom-style: solid;
}

.customer-ledger-summary {
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) minmax(130px, 0.65fr) minmax(170px, 0.85fr) minmax(170px, 0.85fr);
  overflow: hidden;
  margin-bottom: 16px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: 0 8px 22px rgba(18, 52, 68, 0.07);
}

.customer-ledger-summary > div {
  min-height: 94px;
  padding: 16px 18px;
  background: #fff;
}

.customer-ledger-summary span,
.customer-ledger-summary strong,
.customer-ledger-summary small {
  display: block;
}

.customer-ledger-summary span {
  margin-bottom: 7px;
  color: var(--ink-muted);
  font-size: 9.5px;
}

.customer-ledger-summary strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 650;
}

.customer-ledger-summary small {
  margin-top: 5px;
  color: var(--ink-muted);
  font-size: 11px;
}

.customer-ledger-summary .customer-ledger-identity {
  color: #fff;
  background: linear-gradient(135deg, #0d3447, #176c72);
}

.customer-ledger-identity span,
.customer-ledger-identity small {
  color: #b8dfe1;
}

.customer-ledger-identity strong {
  color: #fff;
  font-size: 22px;
}

.customer-ledger-panel {
  border: 1px solid var(--line);
}

.customer-document-list {
  display: grid;
  gap: 15px;
  padding: 14px;
  background: #f6f9fa;
}

.customer-document-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: 0 5px 16px rgba(18, 52, 68, 0.05);
}

.customer-document-head {
  display: grid;
  grid-template-columns: minmax(280px, 1.35fr) auto auto;
  align-items: center;
  gap: 18px;
  padding: 14px 16px;
  background: linear-gradient(110deg, #f5f9fb, #fff);
  border-bottom: 1px solid var(--line);
}

.customer-document-title {
  min-width: 0;
}

.customer-document-title > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 7px;
}

.customer-document-title > strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
}

.customer-document-title > small {
  display: block;
  overflow: hidden;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.55;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-document-metrics {
  display: flex;
  align-items: stretch;
  gap: 18px;
}

.customer-document-metrics > span {
  color: var(--ink-muted);
  font-size: 11px;
  text-align: right;
  white-space: nowrap;
}

.customer-document-metrics strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 15px;
}

.customer-document-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

.customer-document-fields .ledger-readonly-grid {
  border-top: 0;
}

.customer-document-fields .ledger-readonly-field {
  padding: 17px 19px;
}

.customer-document-fields .ledger-readonly-field span {
  margin-bottom: 8px;
  font-size: 12px;
  line-height: 1.5;
}

.customer-document-fields .ledger-readonly-field strong {
  font-size: 15px;
  line-height: 1.7;
}

.related-ledger-empty {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px;
  padding: 14px 16px;
  color: var(--ink-soft);
  background: #f7fafb;
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
}

.related-ledger-empty > span {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  color: #4a7991;
  background: #fff;
  border-radius: 9px;
}

.related-ledger-empty p {
  margin: 0;
  font-size: 10px;
  line-height: 1.6;
}

.related-ledger-empty strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
}

.delete-warning-panel {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 13px;
  padding: 13px 14px;
  color: var(--red);
  background: var(--red-soft);
  border: 1px solid #f0cdcd;
  border-radius: 10px;
}

.delete-warning-icon {
  flex: 0 0 auto;
}

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

.delete-warning-panel strong {
  display: block;
  margin-bottom: 4px;
  font-size: 10px;
}

.delete-warning-panel p {
  margin: 0;
  color: var(--red);
  font-size: 9px;
  line-height: 1.6;
}

.delete-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  margin-bottom: 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.delete-summary-grid > div {
  min-width: 0;
  padding: 11px 12px;
  border-right: 1px solid var(--line);
}

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

.delete-summary-grid span {
  display: block;
  margin-bottom: 5px;
  color: var(--ink-muted);
  font-size: 8px;
}

.delete-summary-grid strong {
  display: block;
  overflow: hidden;
  font-size: 16px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delete-summary-grid small {
  margin-left: 2px;
  color: var(--ink-muted);
  font-size: 8px;
  font-weight: 400;
}

.delete-preview-table {
  max-height: 230px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.delete-preview-table .data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  border-top: 0;
}

.delete-more {
  padding: 8px 11px;
  color: var(--ink-muted);
  background: #fafbfc;
  border-top: 1px solid var(--line);
  font-size: 8px;
  text-align: center;
}

.delete-confirm-fields {
  margin-top: 14px;
}

.delete-confirm-fields .form-check {
  margin-top: 11px;
}

.delete-confirm-fields .form-check-label {
  font-size: 9px;
  line-height: 1.55;
}

.permission-layout {
  display: grid;
  grid-template-columns: 278px minmax(0, 1fr);
  gap: 16px;
}

.role-list {
  display: grid;
  gap: 5px;
  padding: 8px;
}

.role-list-item {
  display: grid;
  width: 100%;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 11px 10px;
  color: var(--ink);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  text-align: left;
}

.role-list-item:hover {
  background: #f8fafb;
}

.role-list-item.active {
  background: var(--teal-soft);
  border-color: #cae8e1;
}

.role-color-dot {
  width: 8px;
  height: 8px;
  border-radius: 3px;
}

.role-list-item strong,
.role-list-item small {
  display: block;
}

.role-list-item strong {
  margin-bottom: 3px;
  font-size: 10px;
  font-weight: 600;
}

.role-list-item small {
  overflow: hidden;
  color: var(--ink-muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-arrow {
  color: var(--ink-muted);
  font-size: 17px;
}

.role-editor-body {
  display: grid;
  gap: 20px;
  padding: 16px 18px 20px;
}

.permission-layout {
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 22px;
}

.permission-layout .role-list {
  gap: 9px;
  padding: 14px;
}

.permission-layout .role-list-item {
  grid-template-columns: 13px minmax(0, 1fr) auto;
  gap: 13px;
  padding: 16px 14px;
}

.permission-layout .role-color-dot {
  width: 11px;
  height: 11px;
}

.permission-layout .role-list-item strong {
  margin-bottom: 4px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
}

.permission-layout .role-list-item small {
  font-size: 13px;
  line-height: 1.45;
}

.permission-layout .role-arrow {
  font-size: 23px;
}

.permission-layout .role-editor-body {
  gap: 28px;
  padding: 24px 26px 30px;
}

.permission-layout .toolbar-title {
  font-size: 18px;
  line-height: 1.45;
}

.permission-layout .toolbar-subtitle {
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.5;
}

.permission-layout .section-heading h3 {
  font-size: 20px;
}

.permission-layout .section-heading p {
  font-size: 15px;
  line-height: 1.55;
}

.permission-layout .form-field label,
.permission-layout .form-field input {
  font-size: 16px;
}

.permission-layout .permission-filter-row input {
  min-height: 46px;
  font-size: 16px;
}

.permission-layout .permission-filter-row > span {
  font-size: 14px;
}

.permission-layout .permission-groups {
  gap: 14px;
}

.permission-layout .permission-group {
  padding: 18px 20px;
}

.permission-layout .permission-group h4 {
  margin-bottom: 14px;
  font-size: 17px;
  font-weight: 700;
}

.permission-layout .permission-check {
  padding: 8px 0;
  font-size: 16px;
}

.permission-layout .permission-check .form-check-label {
  font-size: 16px;
  line-height: 1.5;
}

.permission-layout .permission-check .form-check-input {
  width: 18px;
  height: 18px;
}

.permission-layout .store-permission-grid {
  gap: 14px;
}

.permission-layout .store-permission-check {
  padding: 15px 16px;
}

.permission-layout .store-permission-check strong {
  font-size: 16px;
  font-weight: 650;
}

.permission-layout .store-permission-check small {
  margin-top: 4px;
  font-size: 13px;
}

.permission-layout .button.small {
  min-height: 42px;
  padding-inline: 16px;
  font-size: 14px;
}

.renewal-gift-inventory-table {
  min-width: 1080px;
}

.renewal-gift-inventory-table th:nth-child(3),
.renewal-gift-inventory-table td:nth-child(3) {
  width: 260px;
  min-width: 260px;
}

.renewal-gift-inventory-table .renewal-gift-store-cell strong,
.renewal-gift-inventory-table .renewal-gift-store-cell small {
  display: block;
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.renewal-gift-inventory-table .renewal-gift-store-cell strong {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.renewal-gift-inventory-table .renewal-gift-store-cell small {
  margin-top: 3px;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.45;
}

.permission-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.permission-group {
  padding: 12px;
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.permission-group h4 {
  margin-bottom: 8px;
  color: var(--ink-soft);
  font-size: 9px;
}

.permission-check {
  padding: 5px 0;
  font-size: 9px;
}

.permission-check .form-check-label {
  font-size: 9px;
}

.store-permission-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.store-permission-check {
  min-width: 0;
  padding: 9px 10px;
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.store-permission-check .form-check-label {
  min-width: 0;
}

.store-permission-check strong,
.store-permission-check small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-permission-check strong {
  font-size: 9px;
  font-weight: 500;
}

.store-permission-check small {
  margin-top: 2px;
  color: var(--ink-muted);
  font-size: 8px;
}

.permission-layout .permission-module-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.permission-selection-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 18px 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #eef8f5, #f8fbfc);
  border: 1px solid #d2e8e1;
  border-radius: 10px;
}

.permission-selection-summary > div {
  display: grid;
  gap: 4px;
}

.permission-selection-summary > div:last-child {
  flex: 0 0 auto;
  text-align: right;
}

.permission-selection-summary strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
}

.permission-selection-summary > div:last-child strong {
  color: var(--teal);
  font-size: 18px;
}

.permission-selection-summary span {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.5;
}

.permission-module-stack {
  display: grid;
  gap: 12px;
  padding: 0 18px 18px;
}

.permission-module {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: 0 2px 8px rgba(16, 43, 61, 0.035);
}

.permission-module.is-open {
  border-color: #cfe3df;
  box-shadow: 0 5px 18px rgba(16, 43, 61, 0.07);
}

.permission-module-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
}

.permission-module-toggle {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: 42px minmax(0, 1fr) auto 24px;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  color: var(--ink);
  background: #fff;
  border: 0;
  text-align: left;
}

.permission-module-toggle:hover {
  background: #f8fbfa;
}

.permission-module-toggle:focus-visible {
  position: relative;
  z-index: 1;
  outline: 3px solid color-mix(in srgb, var(--teal) 28%, transparent);
  outline-offset: -3px;
}

.permission-module-index {
  display: grid;
  width: 38px;
  height: 38px;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 9px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  place-items: center;
}

.permission-module-title,
.permission-module-title strong,
.permission-module-title small,
.permission-module-count,
.permission-module-count strong,
.permission-module-count small {
  display: block;
}

.permission-module-title {
  min-width: 0;
}

.permission-module-title strong {
  margin-bottom: 3px;
  font-size: 17px;
  font-weight: 750;
  line-height: 1.4;
}

.permission-module-title small {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.permission-module-count {
  min-width: 76px;
  text-align: right;
}

.permission-module-count strong {
  color: var(--teal);
  font-size: 16px;
  line-height: 1.35;
}

.permission-module-count small {
  color: var(--ink-muted);
  font-size: 11px;
}

.permission-module-chevron {
  color: var(--ink-muted);
  font-size: 23px;
  line-height: 1;
  text-align: center;
  transform: rotate(0);
  transition: transform 160ms ease;
}

.permission-module-toggle[aria-expanded="true"] .permission-module-chevron {
  transform: rotate(180deg);
}

.permission-module-all,
.permission-group-all {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  background: #fbfcfd;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.permission-module-all {
  padding: 0 18px;
  border-left: 1px solid var(--line);
}

.permission-module-all .form-check-input,
.permission-group-all .form-check-input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin: 0;
}

.permission-module-body {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: #f6f9fa;
  border-top: 1px solid var(--line);
}

.permission-module-body[hidden] {
  display: none;
}

.permission-layout .permission-module .permission-group {
  padding: 16px 18px 18px;
  background: #fff;
  border: 1px solid #e3eaed;
  border-radius: 10px;
}

.permission-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 13px;
  padding-bottom: 11px;
  border-bottom: 1px solid #edf1f3;
}

.permission-group-heading > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.permission-layout .permission-module .permission-group h4 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 750;
  line-height: 1.4;
}

.permission-group-heading small {
  color: var(--ink-muted);
  font-size: 12px;
}

.permission-group-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 8px 12px;
}

.permission-layout .permission-module .permission-check {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 10px 12px;
  background: #fbfcfd;
  border: 1px solid #e7edef;
  border-radius: 8px;
}

.permission-layout .permission-module .permission-check:has(.form-check-input:checked) {
  background: #f1f9f6;
  border-color: #cce6df;
}

.permission-layout .permission-module .permission-check .form-check-input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin: 1px 0 0;
}

.permission-layout .permission-module .permission-check .form-check-label {
  min-width: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .permission-selection-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .permission-selection-summary > div:last-child {
    text-align: left;
  }

  .permission-module-head {
    grid-template-columns: 1fr;
  }

  .permission-module-all {
    justify-content: flex-end;
    padding: 10px 16px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .permission-module-toggle {
    grid-template-columns: 38px minmax(0, 1fr) auto 20px;
    gap: 10px;
    padding: 14px;
  }

  .permission-module-title small {
    white-space: normal;
  }

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

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

.role-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  color: var(--role-color);
  background: color-mix(in srgb, var(--role-color) 9%, #fff);
  border-radius: 5px;
  font-size: 9px;
}

.role-label::before {
  width: 5px;
  height: 5px;
  content: "";
  background: currentColor;
  border-radius: 50%;
}

.operator-switch-list {
  display: grid;
  gap: 7px;
}

.operator-switch-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  color: var(--ink);
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 9px;
  text-align: left;
}

.operator-switch-item:hover,
.operator-switch-item.active {
  background: var(--teal-soft);
  border-color: #c7e7e0;
}

.operator-switch-item > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.operator-switch-item strong,
.operator-switch-item small {
  display: block;
}

.operator-switch-item strong {
  margin-bottom: 3px;
  font-size: 10px;
}

.operator-switch-item small {
  overflow: hidden;
  color: var(--ink-muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.edit-section-title {
  margin-bottom: 13px;
}

.edit-section-title h3 {
  margin-bottom: 4px;
}

.edit-section-title p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 9px;
}

.edit-all-fields {
  margin-top: 16px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.edit-all-fields summary {
  display: flex;
  min-height: 45px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink-soft);
  list-style: none;
  font-size: 9px;
  cursor: pointer;
}

.edit-all-fields summary::-webkit-details-marker {
  display: none;
}

.edit-all-fields summary span {
  color: var(--ink-muted);
  font-size: 8px;
}

.edit-all-fields .form-grid {
  padding-bottom: 16px;
}

.pagination-bar {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 15px;
  color: var(--ink-muted);
  background: #fafbfc;
  border-top: 1px solid var(--line);
  font-size: 9px;
}

.pagination-bar > div {
  display: flex;
  align-items: center;
  gap: 7px;
}

.pagination-current {
  padding: 0 5px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

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

.brand-summary-card {
  min-width: 0;
  padding: 14px 15px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: var(--shadow-sm);
}

.brand-summary-card.total {
  background: linear-gradient(135deg, #f1f8f7, #fff);
  border-color: #b8ded8;
}

.brand-summary-head,
.brand-summary-card > div:last-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.brand-summary-head {
  margin-bottom: 9px;
  color: var(--ink-muted);
  font-size: 8px;
}

.brand-code {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 600;
}

.brand-summary-card > strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.brand-summary-card > div:last-child {
  color: var(--ink-muted);
  font-size: 8px;
}

.simple-stat {
  padding: 15px 17px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.simple-stat span {
  display: block;
  margin-bottom: 8px;
  color: var(--ink-muted);
  font-size: 9px;
}

.simple-stat strong {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.simple-stat small {
  margin-left: 4px;
  color: var(--ink-muted);
  font-size: 9px;
  font-weight: 400;
}

.toolbar {
  min-height: 52px;
  justify-content: space-between;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
}

.toolbar-title {
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.toolbar-subtitle {
  display: block;
  margin-top: 3px;
  color: var(--ink-muted);
  font-size: 8px;
  font-weight: 400;
}

.search-field {
  position: relative;
  display: flex;
  height: 33px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.search-field svg {
  width: 14px;
  height: 14px;
  color: var(--ink-muted);
}

.search-field input {
  width: 150px;
  min-width: 80px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 10px;
}

.empty-state {
  display: grid;
  min-height: 260px;
  place-items: center;
  padding: 40px;
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
}

.empty-state p {
  margin-bottom: 16px;
  color: var(--ink-muted);
  font-size: 10px;
}

.data-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: 16px;
}

.brand-entry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.ledger-flow-banner {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
  margin-bottom: 18px;
  background: linear-gradient(110deg, #102b3d, #183e50);
  border-radius: 13px;
  box-shadow: 0 12px 28px rgba(16, 47, 64, 0.1);
}

.sales-ledger-page-head {
  align-items: center;
  margin-bottom: 18px;
}

.sales-ledger-page-head > div:first-child {
  min-width: 0;
  flex: 1 1 560px;
}

.sales-ledger-page-head .page-head-actions {
  flex: 0 0 auto;
}

.sales-ledger-page-head .page-head-actions .button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.sales-ledger-page-head h2 {
  margin-bottom: 8px;
  font-size: 25px;
}

.sales-ledger-page-head p {
  max-width: 980px;
  color: #445366;
  font-size: 14px;
  line-height: 1.75;
}

.sales-ledger-access-note {
  margin: 0 0 16px;
  padding: 14px 17px;
  color: #b43838;
  background: var(--red-soft);
  border: 1px solid #f2d0d0;
  border-left: 4px solid var(--red);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.75;
}

.sales-ledger-access-note strong {
  display: block;
  margin-bottom: 3px;
  font-size: 14px;
}

.ledger-policy-note {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0;
  padding: 14px 16px;
  color: #2d5f72;
  background: #eef7fb;
  border: 1px solid #d9eaf1;
  border-radius: 9px;
}

.ledger-policy-note > span {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  color: #23708f;
  background: #fff;
  border-radius: 7px;
}

.ledger-policy-note p {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
}

.ledger-policy-note strong {
  margin-right: 8px;
  font-size: 14px;
}

.ledger-flow-banner.four-step {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ledger-flow-banner.three-step {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ledger-flow-banner > div {
  position: relative;
  min-width: 0;
  min-height: 96px;
  padding: 19px 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.ledger-flow-banner > div:last-child {
  border-right: 0;
}

.ledger-flow-banner span {
  display: block;
  margin-bottom: 8px;
  color: #ff9b77;
  font-size: 11px;
  font-weight: 600;
}

.ledger-flow-banner strong,
.ledger-flow-banner small {
  display: block;
}

.ledger-flow-banner strong {
  color: #eef5f7;
  font-size: 14px;
  font-weight: 600;
}

.ledger-flow-banner small {
  margin-top: 6px;
  color: #b0c3cc;
  font-size: 12px;
  line-height: 1.55;
}

.ledger-build-intro {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 13px 15px;
  color: #25586d;
  background: linear-gradient(115deg, #eef8fb, #f7fbfc);
  border: 1px solid #d8eaf0;
  border-radius: 11px;
}

.ledger-build-intro > span {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  color: #23708f;
  background: #fff;
  border: 1px solid #d5e7ed;
  border-radius: 9px;
}

.ledger-build-intro > div {
  min-width: 0;
  flex: 1;
}

.ledger-build-intro strong,
.ledger-build-intro p {
  display: block;
  margin: 0;
}

.ledger-build-intro strong {
  color: var(--ink);
  font-size: 11px;
}

.ledger-build-intro p {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.55;
}

.ledger-build-intro em {
  flex: 0 0 auto;
  padding: 6px 9px;
  color: #176a61;
  background: #fff;
  border: 1px solid #cfe6e1;
  border-radius: 999px;
  font-size: 8px;
  font-style: normal;
  font-weight: 600;
}

.ledger-create-attribution {
  margin-bottom: 14px;
  padding: 15px 18px;
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.ledger-create-attribution .section-heading {
  margin-bottom: 12px;
}

.ledger-create-identity {
  display: grid;
  grid-template-columns: minmax(220px, 1.45fr) minmax(190px, 1.2fr) minmax(150px, 0.9fr) minmax(145px, 0.8fr);
  overflow: hidden;
  margin-bottom: 12px;
  background: #fff;
  border: 1px solid #dbe5e9;
  border-radius: 11px;
  box-shadow: 0 8px 22px rgba(18, 52, 68, 0.06);
}

.ledger-create-identity > div {
  display: flex;
  min-height: 88px;
  flex-direction: column;
  justify-content: center;
  padding: 14px 17px;
  border-right: 1px solid var(--line);
}

.ledger-create-identity > div:last-child {
  border-right: 0;
}

.ledger-create-identity > div:first-child {
  color: #fff;
  background: linear-gradient(135deg, #0d3447, #176c72);
}

.ledger-create-identity span {
  margin-bottom: 6px;
  color: var(--ink-muted);
  font-size: 9.5px;
}

.ledger-create-identity > div:first-child span,
.ledger-create-identity > div:first-child small {
  color: #a9d8db;
}

.ledger-create-identity strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.35;
}

.ledger-create-identity > div:first-child strong {
  color: #fff;
  font-size: 18px;
}

.ledger-create-identity > div:nth-child(3) strong {
  color: var(--teal);
  font-size: 17px;
}

.ledger-create-identity small {
  margin-top: 4px;
  color: var(--ink-muted);
  font-size: 8.5px;
  line-height: 1.4;
}

.ledger-summary-grid .simple-stat {
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.ledger-summary-grid .simple-stat:hover {
  border-color: #bed9d4;
  box-shadow: 0 6px 18px rgba(11, 143, 131, 0.08);
}

.ledger-table {
  min-height: 420px;
  max-height: clamp(420px, calc(100vh - 370px), 900px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.ledger-toolbar-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ledger-search-form {
  display: flex;
  min-width: 290px;
  align-items: center;
  gap: 6px;
}

.ledger-search-form input {
  min-width: 190px;
  height: 32px;
  padding: 6px 9px;
  color: var(--ink);
  background: #fbfcfd;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  outline: 0;
  font-size: 9px;
}

.ledger-search-form input:focus {
  background: #fff;
  border-color: #78a5d4;
  box-shadow: 0 0 0 3px rgba(57, 114, 230, 0.09);
}

.ledger-cross-period-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 14px 12px;
  padding: 10px 12px;
  color: var(--amber);
  background: var(--amber-soft);
  border: 1px solid rgba(198, 155, 59, 0.22);
  border-radius: 8px;
  font-size: 9px;
}

.ledger-audit-detail-section {
  margin-top: 14px;
  overflow: hidden;
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.ledger-audit-detail-section > summary {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 15px;
  color: var(--ink);
  background: #f3f7f9;
  cursor: pointer;
  list-style: none;
}

.ledger-detail-section-title {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 15px;
  color: var(--ink);
  background: #f3f7f9;
}

.ledger-detail-section-title span > strong,
.ledger-detail-section-title span > small {
  display: block;
}

.ledger-detail-section-title span > strong {
  font-size: 13px;
}

.ledger-detail-section-title span > small {
  margin-top: 4px;
  color: var(--ink-muted);
  font-size: 10px;
}

.ledger-audit-detail-section > summary::-webkit-details-marker {
  display: none;
}

.ledger-audit-detail-section > summary strong,
.ledger-audit-detail-section > summary small {
  display: block;
}

.ledger-audit-detail-section > summary strong {
  font-size: 13px;
}

.ledger-audit-detail-section > summary small {
  margin-top: 4px;
  color: var(--ink-muted);
  font-size: 10px;
}

.ledger-readonly-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.ledger-readonly-field {
  min-width: 0;
  padding: 14px 16px;
  background: #fff;
}

.ledger-readonly-field span,
.ledger-readonly-field strong {
  display: block;
}

.ledger-readonly-field span {
  margin-bottom: 6px;
  overflow: hidden;
  color: var(--ink-muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ledger-readonly-field strong {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.ledger-audit-notes {
  display: grid;
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
}

.ledger-audit-notes > div {
  padding: 12px 15px;
  background: #fff;
}

.ledger-audit-notes span,
.ledger-audit-notes strong {
  display: block;
}

.ledger-audit-notes span {
  margin-bottom: 5px;
  color: var(--ink-muted);
  font-size: 10px;
}

.ledger-audit-notes strong {
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.6;
  white-space: pre-wrap;
}

.drawer-ledger-fields .ledger-readonly-grid {
  grid-template-columns: 1fr;
}

.modal.wide-modal .modal-header h2 {
  font-size: 20px;
}

.modal.wide-modal .modal-body {
  padding: 24px 26px;
}

.modal.wide-modal .detail-amount {
  padding: 21px 23px;
}

.modal.wide-modal .detail-amount span,
.modal.wide-modal .detail-amount small {
  font-size: 10.5px;
}

.modal.wide-modal .detail-amount strong {
  font-size: 30px;
}

.ledger-approval-customer-card {
  display: grid;
  grid-template-columns: minmax(240px, 1.3fr) repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 18px;
  background: #c9ded7;
  border: 2px solid #b6d4ca;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(23, 71, 63, 0.13);
}

.ledger-approval-customer-card > div {
  min-width: 0;
  padding: 22px 20px;
  background: #fff;
}

.ledger-approval-customer-card > div span,
.ledger-approval-customer-card > div strong,
.ledger-approval-customer-card > div small {
  display: block;
}

.ledger-approval-customer-card > div span {
  margin-bottom: 9px;
  color: #526b72;
  font-size: 14px;
  font-weight: 700;
}

.ledger-approval-customer-card > div strong {
  overflow-wrap: anywhere;
  color: #173840;
  font-size: 19px;
  font-weight: 720;
  line-height: 1.4;
}

.ledger-approval-customer-card > div small {
  margin-top: 8px;
  color: #536d75;
  font-size: 14px;
  font-weight: 550;
  line-height: 1.5;
}

.ledger-approval-customer-primary {
  color: #fff;
  background: linear-gradient(145deg, #103f37, #1c6654) !important;
}

.ledger-approval-customer-primary span {
  color: #d1f3e9 !important;
  font-size: 15px !important;
}

.ledger-approval-customer-primary strong {
  color: #fff !important;
  font-size: 32px !important;
  font-weight: 800 !important;
  letter-spacing: 0.01em;
  line-height: 1.25 !important;
}

.ledger-approval-customer-primary small {
  color: #fff !important;
  font-size: 17px !important;
  font-weight: 700;
}

.ledger-approval-amount small {
  color: #dff8ef !important;
  font-size: 16px !important;
  font-weight: 700 !important;
}

.modal.wide-modal .detail-field {
  padding: 14px 15px;
}

.modal.wide-modal .detail-field span {
  margin-bottom: 6px;
  font-size: 10.5px;
}

.modal.wide-modal .detail-field strong {
  font-size: 12.5px;
}

.modal.wide-modal .ledger-approval-route {
  gap: 8px;
}

.modal.wide-modal .ledger-approval-route span {
  padding: 7px 10px;
  font-size: 10.5px;
}

.modal.wide-modal .sensitivity-note {
  padding: 13px 15px;
  font-size: 11px;
  line-height: 1.65;
}

.modal.wide-modal .form-field > label {
  font-size: 10.5px;
}

.modal.wide-modal .form-field input,
.modal.wide-modal .form-field select,
.modal.wide-modal .form-field textarea {
  font-size: 12px;
}

.modal.wide-modal .modal-footer .button {
  min-height: 38px;
  font-size: 11px;
}

.drawer {
  width: min(560px, 96vw);
}

.drawer .ledger-detail-node span,
.drawer .ledger-detail-node small {
  font-size: 10px;
}

.drawer .ledger-detail-node strong {
  font-size: 12.5px;
}

.drawer .detail-field span {
  font-size: 10px;
}

.drawer .detail-field strong {
  font-size: 12px;
}

.drawer .ledger-approval-route span {
  padding: 6px 9px;
  font-size: 10px;
}

.drawer .ledger-timeline p {
  font-size: 10.5px;
}

.drawer .ledger-timeline strong {
  font-size: 10.5px;
}

.drawer .ledger-timeline small {
  font-size: 9px;
}

.ledger-table .data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  border-top: 0;
}

.ledger-table .data-table {
  min-width: 0;
  table-layout: fixed;
  font-size: 13px;
}

.ledger-table .data-table th:nth-child(1) { width: 12%; }
.ledger-table .data-table th:nth-child(2) { width: 7%; }
.ledger-table .data-table th:nth-child(3) { width: 8%; }
.ledger-table .data-table th:nth-child(4) { width: 7%; }
.ledger-table .data-table th:nth-child(5) { width: 12%; }
.ledger-table .data-table th:nth-child(6) { width: 10%; }
.ledger-table .data-table th:nth-child(7) { width: 7%; }
.ledger-table .data-table th:nth-child(8) { width: 7%; }
.ledger-table .data-table th:nth-child(9) { width: 5%; }
.ledger-table .data-table th:nth-child(10) { width: 8%; }
.ledger-table .data-table th:nth-child(11) { width: 17%; }

.ledger-table .data-table th {
  padding: 12px 14px;
  font-size: 11px;
  font-weight: 650;
}

.ledger-table .data-table td {
  min-height: 72px;
  padding: 15px 14px;
  font-size: 13px;
  line-height: 1.55;
}

.ledger-table .data-table td:first-child strong {
  color: #1b4359;
  font-size: 11.5px;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
}

.ledger-table .data-table td:first-child,
.ledger-table .data-table td:nth-child(2) {
  white-space: normal;
}

.ledger-table .data-table td:nth-child(2) {
  font-size: 12px;
}

.ledger-table .data-table .button.small {
  min-height: 35px;
  padding: 0 8px;
  font-size: 11.5px;
  font-weight: 550;
}

.ledger-table .inline-actions {
  display: flex;
  width: 100%;
  max-width: 100%;
  flex-wrap: wrap;
  gap: 5px;
}

.ledger-table .data-table td:last-child,
.ledger-table .data-table th:last-child {
  min-width: 0;
  white-space: normal;
}

.ledger-table .inline-actions .button {
  max-width: calc(50% - 3px);
  flex: 0 0 auto;
}

.ledger-customer-cell,
.ledger-model-cell {
  display: grid;
  justify-items: start;
  gap: 5px;
  min-width: 132px;
}

.ledger-customer-cell .query-customer-link,
.ledger-customer-cell > strong {
  color: #0e6076;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.25;
}

.ledger-customer-cell > small,
.ledger-model-cell > small {
  color: #647783;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
}

.ledger-customer-cell .status {
  margin-top: 1px;
  font-size: 10px;
}

.ledger-model-cell > strong {
  max-width: 100%;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
  white-space: normal;
}

.ledger-advisor-cell {
  color: #263d4b;
  font-size: 13.5px;
  font-weight: 600;
}

.ledger-amount-cell {
  color: #0e8b76;
  font-size: 12.5px;
  font-weight: 700;
}

.ledger-table .store-cell {
  min-width: 0;
  white-space: normal;
}

.ledger-table .store-cell strong {
  font-size: 12px;
  line-height: 1.4;
  white-space: normal;
}

.ledger-table .store-cell span span {
  font-size: 9.5px;
}

.ledger-record-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  margin-bottom: 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.rejected-ledger-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.8fr);
  gap: 14px;
  margin-bottom: 16px;
  padding: 15px 16px;
  background: linear-gradient(120deg, #fff3f1, #fffaf8);
  border: 1px solid #f0d2cc;
  border-radius: 11px;
}

.rejected-ledger-banner > div > strong,
.rejected-ledger-banner > div > small {
  display: block;
}

.rejected-ledger-banner > div > strong {
  margin-top: 8px;
  color: var(--red);
  font-size: 13px;
  line-height: 1.5;
}

.rejected-ledger-banner > div > small {
  margin-top: 5px;
  color: var(--ink-muted);
  font-size: 10px;
}

.rejected-ledger-banner p {
  margin: 0;
  align-self: center;
  color: var(--ink-soft);
  font-size: 10.5px;
  line-height: 1.7;
}

.modal-action-note {
  margin-right: auto;
  color: var(--ink-muted);
  font-size: 9.5px;
}

.ledger-record-summary > div {
  min-width: 0;
  padding: 11px 12px;
  border-right: 1px solid var(--line);
}

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

.ledger-core-summary {
  grid-template-columns: minmax(220px, 1.45fr) minmax(190px, 1.2fr) minmax(150px, 0.9fr) minmax(130px, 0.75fr);
  margin-bottom: 18px;
  box-shadow: 0 8px 22px rgba(18, 52, 68, 0.07);
}

.ledger-core-summary > div {
  display: flex;
  min-height: 92px;
  flex-direction: column;
  justify-content: center;
  padding: 16px 18px;
}

.ledger-core-summary > div > span {
  margin-bottom: 7px;
  color: var(--ink-muted);
  font-size: 9.5px;
  font-weight: 500;
}

.ledger-core-summary > div > strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.35;
}

.ledger-core-summary > div:nth-child(2) strong {
  color: #1f5878;
}

.ledger-core-summary > div:nth-child(2) {
  background: #f3f8fc;
}

.ledger-core-summary > div:nth-child(3) strong {
  color: var(--teal);
  font-size: 18px;
}

.ledger-core-summary > div:nth-child(3) {
  background: #f1faf7;
}

.ledger-core-summary > div:nth-child(4) strong {
  color: var(--red);
  font-size: 14px;
}

.ledger-core-summary > div:nth-child(4) {
  background: #fff6f3;
}

.ledger-core-summary .rejected-customer-highlight {
  color: #fff;
  background: linear-gradient(135deg, #0d3447, #176c72);
}

.ledger-core-summary .rejected-customer-highlight span {
  color: #a9d8db;
  font-size: 10px;
}

.ledger-core-summary .rejected-customer-highlight strong {
  margin-top: 5px;
  color: #fff;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
}

.ledger-core-summary .rejected-customer-highlight small {
  display: block;
  margin-top: 6px;
  color: #bfe7e4;
  font-size: 12px;
  font-weight: 550;
  letter-spacing: 0.02em;
}

.ledger-record-summary span,
.ledger-record-summary strong {
  display: block;
}

.ledger-record-summary span {
  margin-bottom: 5px;
  color: var(--ink-muted);
  font-size: 8px;
}

.ledger-record-summary strong {
  overflow: hidden;
  font-size: 9px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ledger-supplement-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(340px, 0.7fr);
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  padding: 12px 14px;
  background: linear-gradient(120deg, #edf8f5, #f8fbfa);
  border: 1px solid #d5ece5;
  border-radius: 10px;
}

.ledger-supplement-intro > div:first-child strong,
.ledger-supplement-intro > div:first-child span {
  display: block;
}

.ledger-supplement-intro > div:first-child strong {
  margin-bottom: 4px;
  font-size: 10px;
}

.ledger-supplement-intro > div:first-child span {
  color: var(--ink-muted);
  font-size: 8px;
}

.ledger-calc-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.ledger-calc-summary > div {
  padding: 8px;
  border-right: 1px solid var(--line);
}

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

.ledger-calc-summary span,
.ledger-calc-summary strong {
  display: block;
}

.ledger-calc-summary span {
  color: var(--ink-muted);
  font-size: 7px;
}

.ledger-calc-summary strong {
  margin-top: 3px;
  font-size: 10px;
  font-weight: 600;
}

.ledger-supplement-section .schema-fields {
  padding-top: 0;
}

.ledger-approval-route {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 14px 0;
}

.ledger-detail-node {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(110deg, #eef6fb, #f9fbfc);
  border: 1px solid #d9e6ee;
  border-radius: 9px;
}

.ledger-detail-node span,
.ledger-detail-node small {
  color: var(--ink-muted);
  font-size: 8px;
}

.ledger-detail-node strong {
  color: var(--ink);
  font-size: 11px;
}

.ledger-approval-route span {
  position: relative;
  padding: 5px 8px;
  color: var(--ink-muted);
  background: #f2f5f7;
  border-radius: 5px;
  font-size: 8px;
}

.ledger-approval-route span.complete {
  color: var(--green);
  background: var(--green-soft);
}

.ledger-approval-route span.active {
  color: #fff;
  background: var(--accent);
}

.ledger-approval-route span.complete::after,
.ledger-approval-route span.active::after {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-left: 5px;
  background: currentColor;
  border-radius: 50%;
  opacity: 0.7;
  vertical-align: middle;
}

.ledger-timeline {
  display: grid;
  gap: 0;
}

.ledger-timeline > div {
  position: relative;
  display: flex;
  gap: 10px;
  padding-bottom: 14px;
}

.ledger-timeline > div > span {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin-top: 4px;
  background: var(--teal);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--teal-soft);
}

.ledger-timeline p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.6;
}

.ledger-timeline strong,
.ledger-timeline small {
  display: block;
}

.ledger-timeline strong {
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 9px;
}

.ledger-timeline small {
  margin-top: 3px;
  color: var(--ink-muted);
  font-size: 8px;
}

.brand-entry-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 16px 17px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: var(--shadow-sm);
  text-align: left;
  transition: border 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.brand-entry-card:hover {
  border-color: #bdcbd3;
  transform: translateY(-1px);
}

.brand-entry-card.active {
  background:
    linear-gradient(135deg, rgba(11, 143, 131, 0.07), transparent 58%),
    #fff;
  border-color: var(--teal);
  box-shadow: 0 9px 25px rgba(11, 143, 131, 0.1);
}

.brand-entry-card.active::after {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 7px;
  height: 7px;
  content: "";
  background: var(--teal);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(11, 143, 131, 0.1);
}

.brand-entry-top,
.brand-rule-tags,
.brand-entry-foot,
.formula-live-status {
  display: flex;
  align-items: center;
}

.brand-entry-top {
  justify-content: space-between;
  gap: 10px;
  padding-right: 14px;
}

.brand-entry-top strong {
  font-size: 15px;
  font-weight: 650;
}

.brand-entry-summary {
  min-height: 34px;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.65;
}

.brand-rule-tags {
  flex-wrap: wrap;
  gap: 5px;
}

.brand-rule-tags em {
  padding: 3px 6px;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 5px;
  font-size: 8px;
  font-style: normal;
}

.brand-entry-foot {
  padding-top: 8px;
  color: var(--ink-muted);
  border-top: 1px solid #edf1f3;
  font-size: 8px;
}

.entry-identity-section {
  background: linear-gradient(115deg, rgba(11, 143, 131, 0.055), transparent 60%);
}

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

.schema-section {
  border-bottom: 1px solid var(--line);
}

.schema-section:last-of-type {
  border-bottom: 0;
}

.schema-section summary {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 19px;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

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

.schema-section summary::before {
  width: 18px;
  height: 18px;
  margin-right: -6px;
  content: "+";
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 5px;
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
  text-align: center;
}

.schema-section[open] summary::before {
  content: "−";
}

.schema-section summary > span:first-of-type {
  min-width: 0;
  flex: 1;
}

.schema-section summary strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.schema-section summary small {
  display: block;
  color: var(--ink-muted);
  font-size: 9px;
  line-height: 1.5;
}

.schema-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  padding: 2px 19px 20px;
}

.source-order-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
  padding: 2px 19px 20px;
}

.source-order-cell {
  position: relative;
  min-width: 0;
  padding-top: 8px;
}

.source-column-number {
  position: absolute;
  top: 0;
  right: 1px;
  z-index: 1;
  color: var(--ink-muted);
  font-size: 8px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.source-order-cell .schema-form-field {
  min-width: 0;
}

.ledger-source-order-page {
  padding: 14px 0 4px;
  border-top: 1px solid var(--line);
}

.ledger-source-order-page > .section-heading {
  padding: 0 18px;
}

.ledger-source-order-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px 13px;
  padding: 14px 18px 12px;
}

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

.sales-edit-source-item {
  position: relative;
  min-width: 0;
  padding-top: 9px;
}

.sales-review-opinion {
  margin: 16px 0 12px;
  padding: 15px 16px;
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.sales-review-opinion .section-heading {
  margin-bottom: 10px;
}

.sales-review-opinion textarea {
  width: 100%;
  min-height: 88px;
  resize: vertical;
}

.sales-level3-comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.sales-level3-comparison > div {
  display: flex;
  min-height: 86px;
  flex-direction: column;
  justify-content: center;
  padding: 13px 16px;
  background: #f9fbfc;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.sales-level3-comparison > div:first-child {
  background: #eff8f5;
  border-color: #d2e8e0;
}

.sales-level3-comparison > div:last-child {
  background: #f2f7fb;
  border-color: #d8e5ee;
}

.sales-level3-comparison span,
.sales-level3-comparison strong,
.sales-level3-comparison small {
  display: block;
}

.sales-level3-comparison span {
  color: var(--ink-muted);
  font-size: 9px;
}

.sales-level3-comparison strong {
  margin-top: 5px;
  font-size: 19px;
}

.sales-level3-comparison small {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 8.5px;
}

.ledger-source-order-item {
  position: relative;
  min-width: 0;
  padding-top: 9px;
}

.ledger-source-base-value {
  min-height: 38px;
  overflow: hidden;
  padding: 9px 10px;
  color: var(--ink-soft);
  background: #f1f5f8;
  border: 1px solid #dfe7eb;
  border-radius: 8px;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ledger-supplement-note-section {
  padding: 15px 0 4px;
  border-top: 1px solid var(--line);
}

.ledger-supplement-note-section > .section-heading {
  padding: 0 18px 9px;
}

.schema-form-field:has(input[readonly]),
.schema-form-field:has(select[readonly]),
.computed-field {
  padding: 9px;
  margin: -9px;
  background: rgba(237, 242, 255, 0.58);
  border-radius: 9px;
}

.schema-form-field:has(input[readonly]) input,
.schema-form-field:has(select[readonly]) select,
.computed-field input {
  color: var(--blue);
  background: #f4f7ff;
  border-color: #d8e2fa;
  font-weight: 600;
}

.formula-help {
  color: var(--blue);
}

.supplementary-cost-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  padding: 16px 19px;
  background: #fafbfc;
  border-top: 1px solid var(--line);
}

.brand-formula-note {
  margin-bottom: 13px;
  padding: 10px 11px;
  color: #a9bdc8;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  font-size: 8px;
  line-height: 1.6;
}

.formula-live-status {
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  color: #9fb3bf;
  font-size: 9px;
}

.approval-trigger-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 12px;
}

.approval-trigger-list::before {
  align-self: center;
  margin-right: 2px;
  color: #8fa8b6;
  content: "触发条件";
  font-size: 8px;
}

.approval-trigger-list span {
  padding: 3px 6px;
  color: #ffd0be;
  background: rgba(255, 109, 58, 0.11);
  border-radius: 5px;
  font-size: 8px;
}

.form-section {
  padding: 19px;
  border-bottom: 1px solid var(--line);
}

.form-section:last-child {
  border-bottom: 0;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 15px;
}

.section-heading h3 {
  margin-bottom: 4px;
}

.section-heading p {
  margin-bottom: 0;
  color: var(--ink-muted);
  font-size: 9px;
}

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

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

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

.form-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.form-field.span-2 {
  grid-column: span 2;
}

.form-field.span-3 {
  grid-column: span 3;
}

.form-field.span-all {
  grid-column: 1 / -1;
}

.form-field > label {
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 500;
}

.required {
  margin-left: 2px;
  color: var(--red);
}

.form-field input,
.form-field select,
.form-field textarea,
.modal .form-field input,
.modal .form-field select,
.modal .form-field textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fbfcfd;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  outline: 0;
  font-size: 11px;
  transition: border 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.form-field textarea {
  min-height: 72px;
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  background: #fff;
  border-color: #78a5d4;
  box-shadow: 0 0 0 3px rgba(57, 114, 230, 0.08);
}

.form-field input:disabled,
.form-field select:disabled {
  color: var(--ink-muted);
  background: #f1f4f6;
}

.form-help {
  color: var(--ink-muted);
  font-size: 8px;
  line-height: 1.5;
}

.input-with-prefix {
  position: relative;
}

.input-with-prefix > span {
  position: absolute;
  top: 50%;
  left: 10px;
  z-index: 1;
  color: var(--ink-muted);
  font-size: 10px;
  transform: translateY(-50%);
}

.input-with-prefix input {
  padding-left: 23px;
}

.form-summary {
  position: sticky;
  top: 98px;
  padding: 19px;
  background: linear-gradient(160deg, #102b3d, #173b4e);
  border-radius: var(--radius);
  color: #fff;
}

.form-summary .eyebrow {
  color: #8fa8b6;
}

.form-summary h3 {
  margin-bottom: 18px;
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  color: #9db2bf;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 9px;
}

.summary-row strong {
  color: #f5f9fa;
  font-size: 11px;
  font-weight: 500;
}

.summary-total {
  margin-top: 16px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 11px;
}

.summary-total span {
  display: block;
  margin-bottom: 7px;
  color: #90a9b7;
  font-size: 9px;
}

.summary-total strong {
  font-size: 23px;
  font-weight: 650;
}

.approval-path {
  margin-top: 17px;
}

.approval-path h4 {
  color: #dbe6eb;
  font-size: 10px;
}

.approval-step {
  position: relative;
  display: flex;
  gap: 9px;
  padding-bottom: 14px;
  color: #a4b9c4;
  font-size: 9px;
}

.approval-step:last-child {
  padding-bottom: 0;
}

.approval-step::before {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin-top: 2px;
  content: "";
  background: #526d7d;
  border: 2px solid #173b4e;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #526d7d;
}

.approval-step.active::before {
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 0 5px rgba(255, 109, 58, 0.1);
}

.approval-step.complete::before {
  background: #63d6ac;
  box-shadow: 0 0 0 1px #63d6ac;
}

.approval-step::after {
  position: absolute;
  top: 13px;
  bottom: 0;
  left: 3px;
  width: 1px;
  content: "";
  background: #365163;
}

.approval-step:last-child::after {
  content: none;
}

.approval-step strong {
  display: block;
  margin-bottom: 2px;
  color: #e3ebef;
  font-size: 9px;
  font-weight: 500;
}

.workflow-banner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  overflow: hidden;
  margin-bottom: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}

.workflow-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px 18px;
  border-right: 1px solid var(--line);
}

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

.workflow-item::after {
  position: absolute;
  top: 50%;
  right: -6px;
  z-index: 2;
  width: 10px;
  height: 10px;
  content: "";
  background: #fff;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  transform: translateY(-50%) rotate(45deg);
}

.workflow-item:last-child::after {
  content: none;
}

.workflow-number {
  display: grid;
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 600;
}

.workflow-item strong {
  display: block;
  margin-bottom: 3px;
  font-size: 10px;
}

.workflow-item span:last-child {
  color: var(--ink-muted);
  font-size: 8px;
}

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

.approval-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 15px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.approval-card-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--amber);
  background: var(--amber-soft);
  border-radius: 10px;
}

.approval-card-icon.critical {
  color: var(--red);
  background: var(--red-soft);
}

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

.approval-card-main {
  min-width: 0;
}

.approval-card-main h4 {
  margin-bottom: 4px;
  font-size: 11px;
}

.approval-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--ink-muted);
  font-size: 9px;
}

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

.approval-card-meta b {
  color: var(--ink-soft);
  font-weight: 500;
}

.approval-card-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.cost-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 16px;
}

.cost-group {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.cost-group:last-child {
  border-bottom: 0;
}

.cost-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.cost-group-title h4 {
  margin: 0;
  font-size: 11px;
}

.cost-group-title span {
  color: var(--ink-muted);
  font-size: 8px;
}

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

.cost-side-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.cost-summary-top {
  padding: 21px;
  color: #fff;
  background: linear-gradient(150deg, #102b3d, #1a4051);
}

.cost-summary-top span {
  color: #94acb9;
  font-size: 9px;
}

.cost-summary-top strong {
  display: block;
  margin: 10px 0 4px;
  font-size: 27px;
  font-weight: 650;
}

.cost-summary-top small {
  color: #87ccb7;
  font-size: 9px;
}

.cost-summary-body {
  padding: 17px 20px;
}

.cost-lines {
  margin-top: 6px;
}

.cost-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #edf1f3;
  color: var(--ink-soft);
  font-size: 9px;
}

.cost-line:last-child {
  border-bottom: 0;
}

.cost-line strong {
  color: var(--ink);
  font-size: 10px;
  font-weight: 500;
}

.sensitivity-note {
  margin-top: 14px;
  padding: 11px;
  color: var(--ink-soft);
  background: var(--amber-soft);
  border-radius: 9px;
  font-size: 8px;
  line-height: 1.6;
}

.data-source-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 16px;
}

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

.source-audit-metric {
  min-width: 0;
  padding: 16px 18px;
  border-right: 1px solid var(--line);
}

.source-audit-metric:last-child {
  border-right: 0;
}

.source-audit-metric > span {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-muted);
  font-size: 9px;
}

.source-audit-metric strong {
  display: block;
  margin-bottom: 4px;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.source-audit-metric strong small {
  margin-left: 3px;
  color: var(--ink-muted);
  font-size: 9px;
  font-weight: 400;
}

.source-audit-metric em {
  display: block;
  overflow: hidden;
  color: var(--ink-muted);
  font-size: 8px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-schema-table .data-table th {
  border-top: 0;
}

.data-audit-notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
}

.data-audit-notes > div {
  display: flex;
  gap: 9px;
  padding: 14px 17px;
  border-right: 1px solid var(--line);
}

.data-audit-notes > div:last-child {
  border-right: 0;
}

.audit-note-icon {
  flex: 0 0 auto;
  color: var(--blue);
}

.audit-note-icon.warning {
  color: var(--amber);
}

.audit-note-icon svg {
  width: 16px;
  height: 16px;
}

.data-audit-notes p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 8px;
  line-height: 1.65;
}

.data-audit-notes strong {
  color: var(--ink-soft);
  font-weight: 600;
}

.inventory-field-note {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 14px;
  padding: 15px 17px;
  background: #fafbfc;
  border-top: 1px solid var(--line);
}

.inventory-field-note > div strong,
.inventory-field-note > div span {
  display: block;
}

.inventory-field-note > div strong {
  margin-bottom: 4px;
  font-size: 9px;
}

.inventory-field-note > div span {
  color: var(--ink-muted);
  font-size: 8px;
}

.inventory-field-note p {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0;
}

.inventory-field-note em {
  padding: 3px 6px;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 8px;
  font-style: normal;
}

.source-card {
  position: relative;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: var(--shadow-sm);
}

.source-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 17px;
}

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

.source-icon.teal {
  color: var(--teal);
  background: var(--teal-soft);
}

.source-icon.orange {
  color: var(--accent);
  background: var(--accent-soft);
}

.source-icon.purple {
  color: var(--purple);
  background: var(--purple-soft);
}

.source-icon svg {
  width: 17px;
  height: 17px;
}

.source-card h3 {
  margin-bottom: 5px;
  font-size: 12px;
}

.source-card p {
  margin-bottom: 14px;
  color: var(--ink-muted);
  font-size: 9px;
  line-height: 1.6;
}

.source-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink-muted);
  font-size: 8px;
}

.source-meta strong {
  color: var(--ink-soft);
  font-weight: 500;
}

.upload-zone {
  display: grid;
  min-height: 162px;
  place-items: center;
  padding: 22px;
  text-align: center;
  background:
    linear-gradient(#fff, #fff) padding-box,
    repeating-linear-gradient(90deg, #c9d5dc 0 6px, transparent 6px 11px) border-box;
  border: 1px dashed #c9d5dc;
  border-radius: 12px;
}

.import-permission-panel,
.import-file-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 13px 14px;
  background: linear-gradient(120deg, #edf9f5, #f8fbfa);
  border: 1px solid #d5ece5;
  border-radius: 10px;
}

.import-permission-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: var(--green);
  background: #fff;
  border-radius: 9px;
  box-shadow: var(--shadow-sm);
}

.import-permission-icon svg,
.import-file-summary .source-icon svg {
  width: 17px;
  height: 17px;
}

.import-permission-panel strong,
.import-file-summary strong {
  display: block;
  margin-bottom: 3px;
  font-size: 10px;
}

.import-permission-panel p,
.import-file-summary div > span {
  margin: 0;
  color: var(--ink-muted);
  font-size: 8px;
}

.import-scope-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 14px;
}

.import-scope-list span {
  padding: 4px 7px;
  color: var(--ink-soft);
  background: #f2f5f7;
  border-radius: 5px;
  font-size: 8px;
}

.import-drop-zone {
  display: grid;
  min-height: 155px;
  place-items: center;
  padding: 20px;
  text-align: center;
  background: #fbfcfd;
  border: 1px dashed #bfcfd7;
  border-radius: 11px;
  cursor: pointer;
}

.import-drop-zone:hover {
  background: #f8fbfb;
  border-color: var(--teal);
}

.import-drop-zone strong {
  display: block;
  margin-bottom: 5px;
  font-size: 11px;
}

.import-drop-zone p {
  margin: 0 0 12px;
  color: var(--ink-muted);
  font-size: 9px;
}

.import-guide {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  padding: 12px 13px;
  color: var(--ink-muted);
  background: #f7f9fa;
  border-radius: 9px;
  font-size: 8px;
  line-height: 1.55;
}

.import-guide strong {
  color: var(--ink-soft);
  font-size: 9px;
}

.import-file-summary {
  margin-bottom: 14px;
}

.import-error-panel {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  padding: 13px;
  color: var(--red);
  background: var(--red-soft);
  border: 1px solid #f0cdcd;
  border-radius: 9px;
}

.import-error-panel > span svg {
  width: 17px;
  height: 17px;
}

.import-error-panel strong {
  display: block;
  margin-bottom: 4px;
  font-size: 10px;
}

.import-error-panel p,
.import-error-panel small {
  display: block;
  margin: 0;
  color: var(--red);
  font-size: 9px;
  line-height: 1.55;
}

.import-error-panel small {
  margin-top: 5px;
  opacity: 0.8;
}

.import-select-row {
  margin-bottom: 12px;
}

.import-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  margin-bottom: 13px;
  background: #fafbfc;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.import-summary-grid > div {
  min-width: 0;
  padding: 12px 13px;
  border-right: 1px solid var(--line);
}

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

.import-summary-grid span {
  display: block;
  margin-bottom: 5px;
  color: var(--ink-muted);
  font-size: 8px;
}

.import-summary-grid strong {
  display: block;
  overflow: hidden;
  font-size: 16px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.import-summary-grid strong small {
  margin-left: 2px;
  color: var(--ink-muted);
  font-size: 8px;
  font-weight: 400;
}

.import-mapping-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  margin-bottom: 12px;
  background: #f8fbfc;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.import-mapping-summary > div {
  min-width: 0;
  padding: 12px 14px;
  border-right: 1px solid var(--line);
}

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

.import-mapping-summary span,
.import-mapping-summary strong {
  display: block;
}

.import-mapping-summary span {
  margin-bottom: 5px;
  color: var(--ink-muted);
  font-size: 8.5px;
}

.import-mapping-summary strong {
  font-size: 16px;
  font-weight: 650;
}

.import-mapping-summary strong small {
  margin-left: 3px;
  color: var(--ink-muted);
  font-size: 8px;
  font-weight: 400;
}

.import-mapping-note {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
  padding: 11px 13px;
  color: #2d5f72;
  background: #eef7fb;
  border: 1px solid #d9eaf1;
  border-radius: 9px;
  font-size: 9px;
  line-height: 1.6;
}

.import-mapping-note strong {
  color: var(--ink);
  font-size: 10px;
}

.import-mapping-table {
  max-height: 430px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.import-mapping-table .data-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  border-top: 0;
}

.import-mapping-table .data-table td {
  vertical-align: middle;
}

.import-mapping-table .import-mapping-select {
  min-width: 210px;
  height: 34px;
  padding: 5px 30px 5px 9px;
  background: #fff;
  border: 1px solid #d7e2e7;
  border-radius: 7px;
  color: var(--ink);
  font-size: 9px;
}

.import-mapping-sample {
  max-width: 210px;
  overflow: hidden;
  color: var(--ink-soft);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.import-mapping-error {
  display: grid;
  gap: 5px;
  margin-top: 11px;
  padding: 10px 12px;
  color: var(--red);
  background: var(--red-soft);
  border: 1px solid #f1c9c9;
  border-radius: 8px;
  font-size: 9px;
  line-height: 1.55;
}

.import-mapping-confirmed {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 11px 13px;
  color: #24695d;
  background: #eff9f5;
  border: 1px solid #d4ebe3;
  border-radius: 10px;
}

.import-mapping-confirmed > span {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  background: var(--teal);
  border-radius: 50%;
}

.import-mapping-confirmed > div {
  min-width: 0;
  flex: 1;
}

.import-mapping-confirmed strong,
.import-mapping-confirmed small {
  display: block;
}

.import-mapping-confirmed strong {
  color: var(--ink);
  font-size: 10px;
}

.import-mapping-confirmed small {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 8.5px;
  line-height: 1.5;
}

.hidden {
  display: none !important;
}

.import-preview-table {
  max-height: 250px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.import-preview-table .data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  border-top: 0;
}

.duplicate-review-list {
  display: grid;
  gap: 9px;
  padding: 14px 16px 17px;
}

.duplicate-review-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 15px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.duplicate-review-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--amber);
  background: var(--amber-soft);
  border-radius: 10px;
}

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

.duplicate-review-main {
  min-width: 0;
}

.duplicate-review-main h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
  font-size: 11px;
}

.duplicate-review-card .approval-card-meta b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.duplicate-diff-table {
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.duplicate-diff-head,
.duplicate-diff-row {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) minmax(0, 1fr);
}

.duplicate-diff-head {
  color: var(--ink-muted);
  background: #f8fafb;
  border-bottom: 1px solid var(--line);
  font-size: 8px;
}

.duplicate-diff-head > span,
.duplicate-diff-row > * {
  min-width: 0;
  padding: 9px 10px;
  border-right: 1px solid #edf1f3;
}

.duplicate-diff-head > span:last-child,
.duplicate-diff-row > *:last-child {
  border-right: 0;
}

.duplicate-diff-row {
  border-bottom: 1px solid #edf1f3;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.5;
}

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

.duplicate-diff-row.different {
  background: #fffaf1;
}

.duplicate-diff-row.different > span:first-of-type {
  color: var(--amber);
  font-weight: 600;
}

.duplicate-diff-row span {
  overflow-wrap: anywhere;
}

.duplicate-diff-row strong {
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 500;
}

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

.empty-icon {
  display: grid;
  width: 42px;
  height: 42px;
  margin: 0 auto 12px;
  place-items: center;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 11px;
}

.empty-icon svg {
  width: 19px;
  height: 19px;
}

.upload-zone-icon {
  display: grid;
  width: 38px;
  height: 38px;
  margin: 0 auto 10px;
  place-items: center;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 10px;
}

.upload-zone strong {
  display: block;
  margin-bottom: 5px;
  font-size: 11px;
}

.upload-zone p {
  margin-bottom: 12px;
  color: var(--ink-muted);
  font-size: 9px;
}

.schema-list {
  display: grid;
  gap: 0;
}

.schema-item {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #edf1f3;
}

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

.schema-item strong {
  font-size: 10px;
  font-weight: 500;
}

.schema-item span {
  overflow: hidden;
  color: var(--ink-muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-tabs {
  margin-bottom: 16px;
}

.audit-table {
  min-width: 1280px;
}

.audit-table td {
  font-size: 10px;
}

.audit-table th {
  font-size: 9px;
}

.audit-table th:last-child,
.audit-table td:last-child {
  min-width: 270px;
  white-space: nowrap;
}

.audit-detail-cell {
  min-width: 220px;
  color: var(--ink-soft);
  line-height: 1.55;
  white-space: normal;
  overflow-wrap: anywhere;
}

.automatic-backup-panel {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
  padding: 20px;
  background:
    radial-gradient(circle at 100% 0%, rgba(102, 213, 180, 0.16), transparent 34%),
    linear-gradient(135deg, #0d2b3b, #133f4d 64%, #15624f);
  border: 0;
  color: #fff;
  box-shadow: 0 16px 36px rgba(9, 43, 58, 0.16);
}

.automatic-backup-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.automatic-backup-heading > div {
  display: grid;
  gap: 4px;
}

.automatic-backup-heading > div > span {
  color: #77dcbb;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.automatic-backup-heading h3 {
  margin: 0;
  color: #fff;
  font-size: 22px;
}

.automatic-backup-heading p {
  max-width: 760px;
  margin: 0;
  color: #bfd2da;
  font-size: 11px;
  line-height: 1.6;
}

.automatic-backup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.automatic-backup-grid > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 13px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
}

.automatic-backup-grid span,
.automatic-backup-grid small {
  color: #acc2cc;
  font-size: 9px;
  line-height: 1.45;
}

.automatic-backup-grid strong {
  color: #fff;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.automatic-backup-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.automatic-backup-foot > span {
  color: #9fb9c4;
  font-size: 9px;
  overflow-wrap: anywhere;
}

.automatic-backup-foot .button {
  flex: 0 0 auto;
}

.backup-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.backup-action-card {
  min-width: 0;
}

.backup-action-body {
  display: flex;
  min-height: 205px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
}

.backup-data-grid {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.backup-data-grid > div {
  padding: 12px;
  background: #fbfcfd;
}

.backup-data-grid span,
.backup-data-grid strong {
  display: block;
}

.backup-data-grid span {
  color: var(--ink-muted);
  font-size: 9px;
}

.backup-data-grid strong {
  margin-top: 4px;
  font-size: 16px;
}

.backup-data-grid small {
  margin-left: 2px;
  color: var(--ink-muted);
  font-size: 8px;
}

.backup-restore-copy {
  margin: 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.7;
}

.backup-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.architecture {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.architecture-step {
  position: relative;
  min-height: 90px;
  padding: 14px;
  background: #f7f9fa;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.architecture-step:not(:last-child)::after {
  position: absolute;
  top: 50%;
  right: -7px;
  z-index: 2;
  width: 12px;
  height: 12px;
  content: "";
  background: #f7f9fa;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  transform: translateY(-50%) rotate(45deg);
}

.architecture-step span {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 8px;
  font-weight: 600;
}

.architecture-step strong {
  display: block;
  margin-bottom: 5px;
  font-size: 10px;
}

.architecture-step p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 8px;
  line-height: 1.5;
}

.drawer-backdrop,
.modal-backdrop,
.sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(8, 25, 37, 0.38);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.drawer-backdrop.visible,
.modal-backdrop.visible,
.sidebar-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 90;
  display: flex;
  width: min(470px, 94vw);
  flex-direction: column;
  background: #fff;
  box-shadow: -14px 0 40px rgba(8, 25, 37, 0.18);
  transform: translateX(105%);
  transition: transform 220ms ease;
}

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

.drawer-header,
.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex: 0 0 auto;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

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

.modal-header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.modal-back-button {
  min-height: 36px;
  padding: 0 13px;
  color: #1d5266;
  background: #eef6f8;
  border-color: #cbdde3;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.modal-back-button:hover {
  color: #0d3f53;
  background: #e4f1f4;
  border-color: #aecbd4;
}

.drawer-body {
  overflow-y: auto;
  padding: 20px 22px 30px;
}

.modal-backdrop {
  z-index: 100;
  display: grid;
  padding: 20px;
  place-items: center;
}

.modal {
  display: flex;
  width: min(730px, 96vw);
  max-height: min(86vh, 800px);
  flex-direction: column;
  background: #fff;
  border-radius: 17px;
  box-shadow: 0 28px 70px rgba(8, 25, 37, 0.28);
  transform: translateY(8px) scale(0.99);
  transition: transform 180ms ease;
}

.modal.wide-modal {
  width: min(1180px, 97vw);
  max-height: min(92vh, 900px);
}

.modal-backdrop.visible .modal {
  transform: translateY(0) scale(1);
}

.modal-body {
  overflow-y: auto;
  padding: 20px 22px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 15px 22px;
  background: #f8fafb;
  border-top: 1px solid var(--line);
  border-radius: 0 0 17px 17px;
}

.detail-amount {
  margin-bottom: 18px;
  padding: 18px;
  color: #fff;
  background: linear-gradient(140deg, #102b3d, #1b4254);
  border-radius: 13px;
}

.detail-amount span {
  color: #97aebc;
  font-size: 9px;
}

.detail-amount strong {
  display: block;
  margin-top: 7px;
  font-size: 26px;
  font-weight: 650;
}

.detail-amount small {
  color: #8ed7bd;
  font-size: 9px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  margin-bottom: 18px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.detail-field {
  min-width: 0;
  padding: 11px 12px;
  background: #fff;
}

.detail-field span {
  display: block;
  margin-bottom: 5px;
  color: var(--ink-muted);
  font-size: 8px;
}

.detail-field strong {
  display: block;
  overflow: hidden;
  font-size: 10px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breakdown-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 0;
  color: var(--ink-soft);
  border-bottom: 1px solid #edf1f3;
  font-size: 10px;
}

.breakdown-row.total {
  color: var(--ink);
  font-weight: 600;
}

.breakdown-row strong {
  color: var(--ink);
  font-weight: 500;
}

.toast-stack {
  position: fixed;
  top: 92px;
  right: 24px;
  z-index: 130;
  display: grid;
  width: min(330px, calc(100vw - 32px));
  gap: 8px;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px 14px;
  color: #e9f0f3;
  background: rgba(13, 31, 45, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  font-size: 10px;
  line-height: 1.5;
  animation: toast-in 180ms ease both;
}

.toast.success::before,
.toast.warning::before {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  margin-top: 4px;
  content: "";
  background: #6ee6bb;
  border-radius: 50%;
}

.toast.warning::before {
  background: #ffc36a;
}

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

.operations-tabs {
  max-width: 100%;
}

.customer-operations-page {
  display: grid;
  gap: 0;
}

.customer-journey-list-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.operations-kpi-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.operations-analysis-tabs {
  width: fit-content;
}

.operations-analysis-table {
  min-width: 1320px;
}

.operations-share {
  display: grid;
  grid-template-columns: 110px 40px;
  align-items: center;
  gap: 6px;
}

.operations-share > span {
  display: block;
  width: 0;
  height: 6px;
  background: var(--teal);
  border-radius: 999px;
}

.operations-share::before {
  grid-row: 1;
  grid-column: 1;
  width: 100%;
  height: 6px;
  content: "";
  background: #e8eef1;
  border-radius: 999px;
}

.operations-share > span {
  grid-row: 1;
  grid-column: 1;
  position: relative;
  z-index: 1;
}

.operations-share small {
  color: var(--ink-muted);
  font-size: 8px;
}

.operations-insight-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.operations-insight-list > div {
  padding: 13px;
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.operations-insight-list span,
.operations-insight-list strong,
.operations-insight-list small {
  display: block;
}

.operations-insight-list span {
  margin-bottom: 7px;
  color: var(--ink-muted);
  font-size: 8px;
}

.operations-insight-list strong {
  margin-bottom: 4px;
  font-size: 13px;
}

.operations-insight-list small {
  color: var(--ink-soft);
  font-size: 8px;
}

.operations-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(330px, 0.85fr);
  gap: 0;
  overflow: hidden;
  margin-bottom: 16px;
  color: #fff;
  background:
    radial-gradient(circle at 78% 15%, rgba(74, 177, 157, 0.2), transparent 34%),
    linear-gradient(128deg, #102b3d, #173f51 62%, #1e4d5e);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 17px;
  box-shadow: 0 18px 42px rgba(15, 44, 59, 0.16);
}

.operations-hero-main {
  padding: 27px 29px;
}

.operations-hero-main .eyebrow {
  color: #79a7b7;
}

.operations-hero-main h2 {
  max-width: 680px;
  margin: 5px 0 10px;
  color: #fff;
  font-size: clamp(20px, 1.75vw, 28px);
  letter-spacing: -0.035em;
}

.operations-hero-main > p:not(.eyebrow) {
  max-width: 720px;
  margin-bottom: 18px;
  color: #a9bec8;
  font-size: 11px;
  line-height: 1.75;
}

.operations-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.operations-hero-actions .button:not(.primary) {
  color: #e7f0f3;
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.13);
}

.operations-hero-actions .button.primary {
  color: #14303b;
  background: #f1f8f7;
  border-color: #f1f8f7;
}

.operations-hero-score {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: center;
  gap: 1px;
  padding: 19px;
  background: rgba(255, 255, 255, 0.035);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.operations-hero-score > div {
  min-width: 0;
  padding: 15px 16px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 11px;
}

.operations-hero-score span {
  display: block;
  margin-bottom: 7px;
  color: #8faab6;
  font-size: 9px;
}

.operations-hero-score strong {
  display: block;
  overflow: hidden;
  color: #f6fbfc;
  font-size: 20px;
  font-weight: 620;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operations-hero-score small {
  margin-left: 3px;
  color: #88a4b0;
  font-size: 9px;
  font-weight: 400;
}

.operations-funnel-panel {
  margin-bottom: 16px;
}

.operations-stage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 9px;
  padding: 0 18px 18px;
}

.operation-stage-card {
  position: relative;
  min-width: 0;
  padding: 16px 14px 14px;
  overflow: hidden;
  color: inherit;
  background: linear-gradient(165deg, #f7fafb, #fff);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.operation-stage-card:hover {
  border-color: rgba(11, 143, 131, 0.35);
  box-shadow: 0 8px 18px rgba(11, 111, 100, 0.08);
  transform: translateY(-1px);
}

.operation-stage-card.is-active {
  background: linear-gradient(165deg, #eaf8f5, #fff);
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(11, 143, 131, 0.1);
}

.operation-stage-card::after {
  position: absolute;
  right: -18px;
  bottom: -22px;
  width: 72px;
  height: 72px;
  content: "";
  background: var(--teal-soft);
  border-radius: 50%;
  opacity: 0.65;
}

.operation-stage-index {
  display: inline-flex;
  margin-bottom: 11px;
  color: var(--teal);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.operation-stage-card > strong {
  display: block;
  font-size: 14px;
}

.operation-stage-card > em {
  position: relative;
  z-index: 1;
  display: block;
  margin: 9px 0 7px;
  color: var(--ink);
  font-size: 23px;
  font-style: normal;
  font-weight: 650;
}

.operation-stage-card > em small {
  margin-left: 2px;
  color: var(--ink-muted);
  font-size: 9px;
  font-weight: 400;
}

.operation-stage-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--ink-muted);
  font-size: 10px;
  line-height: 1.5;
}

.operations-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(315px, 0.7fr);
  gap: 16px;
}

.operations-closed-loop-panel {
  align-self: start;
}

.operations-loop-list {
  display: grid;
  gap: 0;
  padding: 0 17px 12px;
}

.operations-loop-list > div {
  display: grid;
  grid-template-columns: 35px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid #edf1f3;
}

.operations-loop-list > div:last-child {
  border-bottom: 0;
}

.operations-loop-list .source-icon {
  width: 32px;
  height: 32px;
}

.operations-loop-list strong,
.operations-loop-list small {
  display: block;
}

.operations-loop-list strong {
  margin-bottom: 4px;
  font-size: 10px;
}

.operations-loop-list small {
  overflow: hidden;
  color: var(--ink-muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operations-closed-loop-panel .sensitivity-note {
  margin: 4px 17px 17px;
}

.operations-config-section {
  padding: 18px;
  border-top: 1px solid var(--line);
}

.workflow-stage-editor {
  display: grid;
  gap: 8px;
}

.workflow-stage-row {
  display: grid;
  grid-template-columns: 34px minmax(130px, 1.2fr) minmax(130px, 1fr) 105px 72px 34px;
  align-items: end;
  gap: 10px;
  padding: 12px;
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.workflow-stage-order {
  align-self: center;
  color: var(--teal);
  font-size: 10px;
  font-weight: 700;
}

.workflow-stage-row .form-field > span {
  display: block;
  margin-bottom: 5px;
  color: var(--ink-muted);
  font-size: 8px;
}

.workflow-stage-row .form-field input {
  min-height: 35px;
}

.workflow-stage-row .form-check {
  min-height: 35px;
  align-self: end;
}

.workflow-stage-row .icon-btn {
  width: 34px;
  height: 35px;
  color: var(--red);
  background: var(--red-soft);
}

.workflow-approval-toggles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 14px;
}

.operations-governance {
  padding: 0 18px 18px;
}

.operations-commission-rules {
  display: grid;
  grid-template-columns: repeat(7, minmax(105px, 1fr));
  gap: 12px;
  padding: 17px 18px 20px;
}

.operations-inventory-hero {
  display: grid;
  grid-template-columns: minmax(280px, 1.5fr) repeat(3, minmax(150px, 0.72fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 16px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: var(--shadow-sm);
}

.operations-inventory-hero > div {
  padding: 21px;
  background: #fff;
}

.operations-inventory-hero > div:first-child {
  color: #fff;
  background: linear-gradient(132deg, #123142, #1a4a59);
}

.operations-inventory-hero span,
.operations-inventory-hero strong,
.operations-inventory-hero small {
  display: block;
}

.operations-inventory-hero span {
  margin-bottom: 7px;
  color: var(--ink-muted);
  font-size: 9px;
}

.operations-inventory-hero > div:first-child span,
.operations-inventory-hero > div:first-child p,
.operations-inventory-hero > div:first-child small {
  color: #9bb2be;
}

.operations-inventory-hero strong {
  margin-bottom: 6px;
  font-size: 18px;
}

.operations-inventory-hero > div:first-child strong {
  color: #fff;
  font-size: 21px;
}

.operations-inventory-hero p {
  max-width: 510px;
  margin: 0;
  font-size: 9px;
  line-height: 1.65;
}

.operations-inventory-hero small {
  color: var(--ink-muted);
  font-size: 8px;
}

.operations-inventory-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.55fr);
  gap: 16px;
}

.operations-inventory-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
  padding: 4px 18px 18px;
}

.operations-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  color: var(--ink-muted);
  background: #f8fafb;
  border-top: 1px solid var(--line);
  font-size: 9px;
}

.operations-metric-card {
  align-self: start;
}

.operations-metric-list {
  display: grid;
  gap: 0;
}

.operations-metric-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid #edf1f3;
}

.operations-metric-list span {
  color: var(--ink-muted);
  font-size: 9px;
}

.operations-metric-list strong {
  font-size: 11px;
}

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

.integration-card {
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}

.integration-card.is-enabled {
  border-color: rgba(23, 132, 109, 0.28);
  box-shadow: 0 10px 25px rgba(23, 132, 109, 0.07);
}

.integration-card-head {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
}

.integration-card-head > div > span {
  color: var(--ink-muted);
  font-size: 8px;
}

.integration-card-head h3 {
  margin: 3px 0 0;
  font-size: 14px;
}

.integration-card > p {
  min-height: 34px;
  margin: 14px 0;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.65;
}

.integration-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.integration-meta > div {
  min-width: 0;
  padding: 10px 11px;
  background: #f9fbfc;
}

.integration-meta span,
.integration-meta strong {
  display: block;
}

.integration-meta span {
  margin-bottom: 4px;
  color: var(--ink-muted);
  font-size: 8px;
}

.integration-meta strong {
  overflow: hidden;
  font-size: 9px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.integration-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 13px;
}

.operations-data-flow {
  display: grid;
  grid-template-columns: repeat(7, auto);
  align-items: center;
  gap: 8px;
}

.operations-data-flow > div {
  min-width: 0;
  padding: 13px;
  background: #f7fafb;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.operations-data-flow > div > span,
.operations-data-flow > div > strong,
.operations-data-flow > div > small {
  display: block;
}

.operations-data-flow > div > span {
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 8px;
  font-weight: 700;
}

.operations-data-flow > div > strong {
  margin-bottom: 5px;
  font-size: 10px;
}

.operations-data-flow > div > small {
  color: var(--ink-muted);
  font-size: 8px;
  line-height: 1.5;
}

.operations-data-flow > i {
  color: #9badb6;
  font-size: 14px;
  font-style: normal;
}

.operations-bi-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.operations-bi-files span {
  padding: 7px 9px;
  color: var(--ink-soft);
  background: #f5f8f9;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 8px;
}

.operations-inline-head {
  padding-top: 0;
}

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

.field-policy-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: 9px;
}

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

.field-policy-card strong {
  margin-bottom: 4px;
  font-size: 10px;
}

.field-policy-card small {
  color: var(--ink-muted);
  font-size: 8px;
  line-height: 1.5;
}

.field-policy-card select {
  min-width: 84px;
  min-height: 34px;
}

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

.journey-form-section,
.journey-detail-section {
  padding: 17px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.journey-form-section:nth-of-type(even) {
  background: #fbfcfd;
}

.journey-section-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 15px;
}

.journey-section-head > span:first-child {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 9px;
  place-items: center;
  font-size: 8px;
  font-weight: 700;
}

.journey-section-head > div {
  min-width: 0;
  flex: 1;
}

.journey-section-head h3 {
  margin: 1px 0 4px;
  font-size: 12px;
}

.journey-section-head p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 9px;
  line-height: 1.55;
}

.journey-section-head > .status {
  flex: 0 0 auto;
}

.journey-duration-field {
  min-height: 67px;
  padding: 9px 11px;
  background: linear-gradient(150deg, #f2faf8, #f8fbfa);
  border: 1px solid rgba(18, 135, 108, 0.15);
  border-radius: 9px;
}

.journey-duration-field > span,
.journey-duration-field > strong,
.journey-duration-field > small {
  display: block;
}

.journey-duration-field > span {
  margin-bottom: 4px;
  color: var(--ink-muted);
  font-size: 8px;
}

.journey-duration-field > strong {
  color: var(--teal);
  font-size: 13px;
}

.journey-duration-field > small {
  margin-top: 3px;
  color: #8aa09e;
  font-size: 7px;
}

.journey-focus-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(100px, 1fr));
  gap: 7px;
  margin-bottom: 14px;
}

.journey-focus-grid .form-check {
  min-height: 34px;
  padding: 7px 9px;
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.journey-description-grid textarea {
  min-height: 98px;
}

.journey-followup-section {
  background: linear-gradient(150deg, #f8fbfa, #f2f7f6);
  border-color: rgba(18, 135, 108, 0.14);
}

.journey-overview-table {
  min-width: 0;
  overflow-x: visible;
}

.journey-overview-table table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  font-size: 13px;
}

.journey-overview-table th:nth-child(1) { width: 16%; }
.journey-overview-table th:nth-child(2) { width: 13%; }
.journey-overview-table th:nth-child(3) { width: 11%; }
.journey-overview-table th:nth-child(4) { width: 21%; }
.journey-overview-table th:nth-child(5) { width: 27%; }
.journey-overview-table th:nth-child(6) { width: 12%; }

.journey-overview-table td {
  padding: 16px 14px;
  vertical-align: top;
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.55;
}

.journey-overview-table th {
  padding: 12px 14px;
  font-size: 11px;
  font-weight: 650;
}

.journey-overview-table .inline-actions {
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 7px;
}

.journey-overview-table .inline-actions .button {
  width: 100%;
  min-height: 36px;
  justify-content: center;
  font-size: 11.5px;
  white-space: nowrap;
}

.journey-customer-cell,
.journey-store-cell,
.journey-intent-cell {
  display: grid;
  justify-items: start;
  gap: 5px;
}

.journey-customer-cell .journey-customer-link {
  color: #0e6076;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.3;
}

.journey-customer-cell > span {
  color: #6b7e8a;
  font-size: 10.5px;
  line-height: 1.4;
}

.journey-store-cell > strong,
.journey-intent-cell > strong {
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 650;
}

.journey-store-cell > span:not(.status),
.journey-intent-cell > span:not(.journey-testdrive-summary) {
  color: #667985;
  font-size: 10.5px;
  line-height: 1.5;
}

.journey-store-cell .status {
  font-size: 9.5px;
}

.journey-status-track {
  display: flex;
  width: 100%;
  min-width: 0;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 2px;
}

.journey-status-track > span {
  position: relative;
  min-width: 36px;
  padding: 4px 5px;
  color: var(--ink-muted);
  background: #f6f8f9;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.journey-status-track > span:not(:last-child)::after {
  position: absolute;
  top: 50%;
  right: -4px;
  z-index: 2;
  content: "›";
  color: #9baab4;
  font-size: 9px;
  transform: translateY(-50%);
}

.journey-status-track b,
.journey-status-track small {
  display: block;
  white-space: nowrap;
}

.journey-status-track b {
  font-size: 9.5px;
  font-weight: 600;
}

.journey-status-track small {
  margin-top: 2px;
  font-size: 8px;
}

.journey-status-track > span.complete {
  color: var(--green);
  background: var(--green-soft);
  border-color: rgba(23, 132, 95, 0.18);
}

.journey-status-track > span.active {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
  box-shadow: 0 3px 8px rgba(11, 143, 131, 0.16);
}

.journey-followup-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 7px;
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
}

.journey-followup-inline strong {
  color: var(--ink-soft);
  font-size: 10.5px;
}

.journey-followup-inline span {
  color: var(--ink-muted);
  font-size: 9.5px;
}

.journey-description-snippet {
  display: -webkit-box;
  max-width: 300px;
  margin: 0 0 5px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.journey-customer-link {
  padding: 0;
  color: #176b83;
  background: transparent;
  border: 0;
  border-bottom: 1px dashed currentColor;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.journey-customer-link:hover,
.journey-customer-link:focus-visible {
  color: var(--accent);
  border-bottom-style: solid;
}

.journey-mini-tags,
.journey-focus-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.journey-mini-tags em,
.journey-focus-chips em {
  padding: 3px 6px;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 5px;
  font-size: 9px;
  font-style: normal;
}

.journey-testdrive-summary {
  display: block;
  margin-top: 6px;
  color: var(--purple);
  font-size: 8px;
  font-weight: 600;
}

.journey-detail-hero {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 13px;
}

.journey-detail-hero > div {
  min-width: 0;
  padding: 16px;
  background: linear-gradient(145deg, #123142, #1a4555);
}

.journey-detail-hero > div:first-child {
  background: linear-gradient(145deg, #17473f, #1a5b50);
}

.journey-detail-hero span,
.journey-detail-hero strong,
.journey-detail-hero small {
  display: block;
}

.journey-detail-hero span {
  margin-bottom: 7px;
  color: #9ab4bd;
  font-size: 8px;
}

.journey-detail-hero strong {
  overflow: hidden;
  color: #fff;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.journey-detail-hero small {
  margin-top: 5px;
  overflow: hidden;
  color: #a9c0c8;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.journey-detail-section {
  margin-bottom: 14px;
}

.journey-loss-detail-banner {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 0.7fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 14px;
  background: var(--line);
  border: 1px solid rgba(209, 72, 72, 0.2);
  border-radius: 11px;
}

.journey-loss-detail-banner > div {
  min-width: 0;
  padding: 13px;
  background: var(--red-soft);
}

.journey-loss-detail-banner span,
.journey-loss-detail-banner strong,
.journey-loss-detail-banner small {
  display: block;
}

.journey-loss-detail-banner span {
  margin-bottom: 6px;
  color: #a86060;
  font-size: 8px;
}

.journey-loss-detail-banner strong {
  margin-bottom: 5px;
  color: var(--red);
  font-size: 11px;
}

.journey-loss-detail-banner p,
.journey-loss-detail-banner small {
  margin: 0;
  color: #8e6060;
  font-size: 8px;
  line-height: 1.6;
}

#lostCustomerSearchForm .quality-filter-fields {
  grid-template-columns: minmax(260px, 1.4fr) minmax(180px, 0.7fr) 110px;
}

.journey-profile-summary {
  display: grid;
  gap: 10px;
}

.journey-profile-summary > div {
  padding: 12px 13px;
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.journey-profile-summary > div:first-child {
  background: #f5fbf9;
  border-color: rgba(18, 135, 108, 0.14);
}

.journey-profile-summary span {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-muted);
  font-size: 8px;
  font-weight: 600;
}

.journey-profile-summary p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.75;
  white-space: pre-wrap;
}

.journey-followup-note {
  display: grid;
  gap: 5px;
  margin: 0;
}

.journey-followup-note strong {
  font-size: 12px;
}

.journey-followup-note span {
  font-size: 9px;
}

.journey-followup-note p {
  margin: 4px 0 0;
  line-height: 1.65;
}

.journey-followup-note.is-overdue {
  color: var(--red);
  background: var(--red-soft);
}

.journey-followup-banner {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 13px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 11px;
}

.journey-followup-banner > div {
  min-width: 0;
  padding: 13px;
  background: #f8fbfa;
}

.journey-followup-banner span,
.journey-followup-banner strong,
.journey-followup-banner small {
  display: block;
}

.journey-followup-banner span {
  margin-bottom: 6px;
  color: var(--ink-muted);
  font-size: 8px;
}

.journey-followup-banner strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.journey-followup-banner strong small {
  display: inline;
  margin-left: 2px;
  font-size: 8px;
}

.journey-followup-banner > div > small {
  margin-top: 4px;
  color: var(--ink-muted);
  font-size: 7px;
}

.journey-followup-history {
  display: grid;
  gap: 8px;
  margin-top: 13px;
}

.journey-followup-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.journey-followup-history-head strong {
  font-size: 10px;
}

.journey-followup-history-head span {
  color: var(--teal);
  font-size: 9px;
}

.journey-followup-history-item {
  padding: 11px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.journey-followup-history-item > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.journey-followup-history-item strong {
  font-size: 9px;
}

.journey-followup-history-item span,
.journey-followup-history-item small {
  color: var(--ink-muted);
  font-size: 7px;
}

.journey-followup-history-item p {
  margin: 7px 0;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.journey-followup-history-empty {
  padding: 13px;
  color: var(--ink-muted);
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 9px;
  font-size: 8px;
}

.journey-behavior-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 14px 0 8px;
}

.journey-behavior-title strong {
  font-size: 10px;
}

.journey-behavior-title span {
  color: var(--ink-muted);
  font-size: 8px;
}

.test-drive-behavior-grid {
  grid-template-columns: repeat(5, minmax(105px, 1fr));
  margin-bottom: 12px;
}

.test-drive-rating-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.test-drive-rating-field {
  padding: 10px;
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.test-drive-rating-field label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-soft);
  font-size: 8px;
  font-weight: 600;
}

.test-drive-rating-field select {
  width: 100%;
  min-height: 34px;
}

.journey-testdrive-history {
  display: grid;
  gap: 9px;
}

.journey-testdrive-item {
  padding: 13px;
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.journey-testdrive-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.journey-testdrive-head strong,
.journey-testdrive-head span {
  display: block;
}

.journey-testdrive-head strong {
  margin-bottom: 4px;
  font-size: 10px;
}

.journey-testdrive-head span,
.journey-testdrive-item > small {
  color: var(--ink-muted);
  font-size: 7px;
  line-height: 1.5;
}

.journey-testdrive-head > em {
  color: var(--purple);
  font-size: 22px;
  font-style: normal;
  font-weight: 650;
  white-space: nowrap;
}

.journey-testdrive-head > em small {
  color: var(--ink-muted);
  font-size: 8px;
}

.journey-testdrive-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 9px 0;
}

.journey-testdrive-tags span {
  padding: 4px 7px;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 5px;
  font-size: 7px;
  font-weight: 600;
}

.journey-testdrive-tags em {
  padding: 4px 7px;
  color: var(--ink-soft);
  background: #eef2f4;
  border-radius: 5px;
  font-size: 7px;
  font-style: normal;
}

.journey-testdrive-item p {
  margin: 6px 0;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.journey-testdrive-item p b {
  color: var(--ink);
}

.journey-testdrive-empty {
  padding: 15px;
  background: var(--amber-soft);
  border: 1px dashed rgba(178, 118, 22, 0.25);
  border-radius: 9px;
}

.journey-testdrive-empty strong {
  display: block;
  margin-bottom: 5px;
  color: var(--amber);
  font-size: 10px;
}

.journey-testdrive-empty p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 8px;
  line-height: 1.6;
}

.journey-history {
  margin-bottom: 5px;
}

.journey-panorama-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.journey-panorama-field {
  min-width: 0;
  padding: 12px 13px;
  background: #fff;
}

.journey-panorama-field.is-wide {
  grid-column: 1 / -1;
  background: #f8fbfa;
}

.journey-panorama-field span,
.journey-panorama-field strong {
  display: block;
}

.journey-panorama-field span {
  margin-bottom: 5px;
  color: var(--ink-muted);
  font-size: 8px;
}

.journey-panorama-field strong {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.mobile-only {
  display: none;
}

@media (max-width: 900px) {
  .login-screen {
    grid-template-columns: 1fr;
  }

  .login-brand-panel {
    min-height: 280px;
    padding: 26px 24px 28px;
  }

  .login-brand-copy {
    margin: 34px 0 24px;
    padding: 0;
  }

  .login-brand-copy h1 {
    margin-bottom: 12px;
    font-size: 31px;
  }

  .login-brand-copy > p:last-child {
    font-size: 11px;
  }

  .login-feature-list {
    margin-bottom: 17px;
  }

  .login-form-panel {
    min-height: auto;
    padding: 22px 16px 30px;
  }

  .login-card {
    padding: 27px 23px;
    border-radius: 16px;
  }
}

@supports (-webkit-touch-callout: none) {
  @media (max-width: 900px) {
    .login-brand-panel {
      padding-top: max(118px, calc(env(safe-area-inset-top) + 56px));
    }

    .login-brand {
      margin-top: 10px;
    }

    .login-form-panel {
      padding-bottom: max(34px, calc(env(safe-area-inset-bottom) + 24px));
    }
  }
}

/* Readability pass for the renewal team tracking view. */
.renewal-tracking-content .renewal-tracking-hero > div:first-child > span {
  font-size: 11px;
}

.renewal-tracking-content .renewal-tracking-hero h3 {
  font-size: 24px;
}

.renewal-tracking-content .renewal-tracking-hero p {
  font-size: 13px;
  line-height: 1.65;
}

.renewal-tracking-content .renewal-tracking-hero-meta strong {
  font-size: 15px;
}

.renewal-tracking-content .renewal-tracking-hero-meta small {
  font-size: 11px;
}

.renewal-tracking-content .renewal-tracking-kpis .simple-stat {
  min-height: 122px;
  padding: 18px 20px;
}

.renewal-tracking-content .renewal-tracking-kpis .simple-stat span {
  margin-bottom: 10px;
  font-size: 12px;
}

.renewal-tracking-content .renewal-tracking-kpis .simple-stat strong {
  font-size: 28px;
}

.renewal-tracking-content .renewal-tracking-kpis .simple-stat small {
  font-size: 11px;
  line-height: 1.5;
}

.renewal-tracking-content .panel-header {
  padding: 18px 20px 15px;
}

.renewal-tracking-content .panel-title h3 {
  font-size: 18px;
}

.renewal-tracking-content .panel-title p {
  font-size: 12px;
  line-height: 1.6;
}

.renewal-tracking-content .status {
  font-size: 11px;
}

.renewal-tracking-content .data-table {
  font-size: 14px;
}

.renewal-tracking-content .data-table th {
  padding: 14px 16px;
  font-size: 12px;
}

.renewal-tracking-content .data-table td {
  padding: 16px;
  font-size: 14px;
}

.renewal-tracking-content .renewal-tracking-team-table {
  min-width: 1220px;
}

.renewal-tracking-content .renewal-tracking-team-table td:nth-child(2) {
  min-width: 250px;
  line-height: 1.6;
  white-space: normal;
  overflow-wrap: anywhere;
}

.renewal-tracking-content .renewal-tracking-team-table td:first-child strong,
.renewal-tracking-content .renewal-tracking-action-table td:nth-child(2) strong {
  font-size: 15px;
}

.renewal-tracking-content .renewal-tracking-team-table td small,
.renewal-tracking-content .renewal-tracking-action-table td:nth-child(2) small {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.5;
}

.renewal-tracking-content .renewal-tracking-no-action strong {
  font-size: 14px;
}

.renewal-tracking-content .renewal-tracking-no-action span {
  font-size: 11px;
  line-height: 1.55;
}

.renewal-tracking-content .renewal-tracking-idle summary,
.renewal-tracking-content .renewal-tracking-idle summary strong {
  font-size: 12px;
}

.renewal-tracking-content .renewal-tracking-idle-list strong {
  font-size: 12px;
}

.renewal-tracking-content .renewal-tracking-idle-list small {
  font-size: 11px;
  line-height: 1.6;
}

.renewal-tracking-content .renewal-tracking-switcher button > span {
  font-size: 14px;
}

.renewal-tracking-content .renewal-tracking-switcher button > strong {
  font-size: 28px;
}

.renewal-tracking-content .renewal-tracking-switcher button > small {
  font-size: 11px;
}

.renewal-tracking-content .renewal-tracking-controls label,
.renewal-tracking-content .renewal-tracking-controls > div strong {
  font-size: 11px;
}

.renewal-tracking-content .renewal-tracking-controls input,
.renewal-tracking-content .renewal-tracking-controls select {
  min-height: 40px;
  font-size: 12px;
}

.renewal-tracking-content .renewal-tracking-controls > div p {
  font-size: 11px;
  line-height: 1.6;
}

.renewal-tracking-content .renewal-tracking-action-table {
  width: 100%;
  min-width: 1760px;
  table-layout: fixed;
  font-size: 17px;
}

.renewal-tracking-content .renewal-tracking-action-table th {
  padding: 16px 18px;
  font-size: 15px;
  font-weight: 650;
  white-space: normal;
}

.renewal-tracking-content .renewal-tracking-action-table td {
  padding-top: 21px;
  padding-bottom: 21px;
  font-size: 17px;
  line-height: 1.62;
  vertical-align: top;
  white-space: normal;
  overflow-wrap: anywhere;
}

.renewal-tracking-content .renewal-tracking-action-table th:nth-child(1),
.renewal-tracking-content .renewal-tracking-action-table td:nth-child(1) {
  width: 92px;
}

.renewal-tracking-content .renewal-tracking-action-table th:nth-child(2),
.renewal-tracking-content .renewal-tracking-action-table td:nth-child(2) {
  width: 150px;
}

.renewal-tracking-content .renewal-tracking-action-table th:nth-child(3),
.renewal-tracking-content .renewal-tracking-action-table td:nth-child(3) {
  width: 300px;
}

.renewal-tracking-content .renewal-tracking-action-table th:nth-child(4),
.renewal-tracking-content .renewal-tracking-action-table td:nth-child(4) {
  width: 120px;
}

.renewal-tracking-content .renewal-tracking-action-table th:nth-child(5),
.renewal-tracking-content .renewal-tracking-action-table td:nth-child(5) {
  width: 210px;
}

.renewal-tracking-content .renewal-tracking-action-table th:nth-child(6),
.renewal-tracking-content .renewal-tracking-action-table td:nth-child(6) {
  width: 430px;
}

.renewal-tracking-content .renewal-tracking-action-table th:nth-child(7),
.renewal-tracking-content .renewal-tracking-action-table td:nth-child(7) {
  width: 220px;
}

.renewal-tracking-content .renewal-tracking-action-table th:nth-child(8),
.renewal-tracking-content .renewal-tracking-action-table td:nth-child(8) {
  width: 120px;
}

.renewal-tracking-content .renewal-tracking-action-table td > strong {
  font-size: 17px;
  line-height: 1.45;
}

.renewal-tracking-content .renewal-tracking-action-table .accident-customer-link {
  min-width: 280px;
  gap: 5px;
}

.renewal-tracking-content .renewal-tracking-action-table .accident-customer-link strong {
  font-size: 20px;
  font-weight: 750;
  line-height: 1.35;
}

.renewal-tracking-content .renewal-tracking-action-table .accident-customer-link span {
  color: #506970;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

.renewal-tracking-content .renewal-tracking-action-table .accident-customer-link small,
.renewal-tracking-content .renewal-tracking-action-table td small {
  margin-top: 3px;
  font-size: 14px;
  line-height: 1.5;
}

.renewal-tracking-content .renewal-tracking-action-table .status {
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 650;
}

.renewal-tracking-content .renewal-tracking-action-table .button.small {
  min-height: 44px;
  padding-inline: 18px;
  font-size: 14px;
  font-weight: 650;
}

.renewal-tracking-content .renewal-tracking-customer-table {
  min-width: 1580px;
  font-size: 15px;
}

.renewal-tracking-content .renewal-tracking-customer-table th {
  padding: 15px 17px;
  font-size: 14px;
  font-weight: 700;
}

.renewal-tracking-content .renewal-tracking-customer-table td {
  padding-top: 19px;
  padding-bottom: 19px;
  line-height: 1.58;
}

.renewal-tracking-content .renewal-tracking-customer-table td:first-child {
  min-width: 350px;
}

.renewal-tracking-content .renewal-tracking-customer-table .accident-customer-link {
  min-width: 330px;
  gap: 5px;
}

.renewal-tracking-content .renewal-tracking-customer-table .accident-customer-link strong {
  font-size: 19px;
  font-weight: 750;
  line-height: 1.4;
}

.renewal-tracking-content .renewal-tracking-customer-table .accident-customer-link span {
  color: #435d65;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
}

.renewal-tracking-content .renewal-tracking-customer-table .accident-customer-link small {
  margin-top: 3px;
  color: #6c8087;
  font-size: 14px;
  line-height: 1.5;
}

.renewal-tracking-content .renewal-tracking-action-table .renewal-tracking-note {
  max-width: none;
  white-space: normal;
}

.renewal-tracking-note-lines {
  display: grid;
  gap: 5px;
  max-width: 100%;
  white-space: normal;
}

.renewal-tracking-note-lines span {
  display: block;
  max-width: 100%;
  line-height: 1.6;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.renewal-tracking-content .renewal-tracking-action-table .renewal-tracking-next-cell strong,
.renewal-tracking-content .renewal-tracking-action-table .renewal-tracking-next-cell small {
  display: block;
  white-space: normal;
  overflow-wrap: anywhere;
}

.renewal-tracking-content .renewal-tracking-note {
  max-width: 360px;
  font-size: 14px;
  line-height: 1.65;
}

.renewal-tracking-content .renewal-tracking-customer-table .renewal-tracking-note {
  font-size: 11px;
}

.renewal-tracking-content .button.small {
  min-height: 34px;
  padding-inline: 12px;
  font-size: 12px;
}

.renewal-tracking-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 22px 24px;
  border: 1px solid rgba(47, 127, 118, 0.2);
  border-radius: 16px;
  background:
    radial-gradient(circle at 88% 20%, rgba(73, 159, 143, 0.18), transparent 30%),
    linear-gradient(132deg, #102e3a 0%, #173e46 58%, #235e5d 100%);
  color: #f4fbf9;
  box-shadow: 0 16px 34px rgba(22, 52, 57, 0.12);
}

.renewal-tracking-hero > div:first-child {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.renewal-tracking-hero > div:first-child > span {
  color: #a9dcd2;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.renewal-tracking-hero h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.3;
}

.renewal-tracking-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(237, 249, 246, 0.72);
  font-size: 10px;
  line-height: 1.7;
}

.renewal-tracking-hero-meta {
  display: grid;
  justify-items: end;
  gap: 4px;
  flex: 0 0 auto;
  text-align: right;
}

.renewal-tracking-hero-meta strong {
  font-size: 12px;
}

.renewal-tracking-hero-meta small {
  color: rgba(237, 249, 246, 0.64);
  font-size: 9px;
}

.renewal-tracking-kpis .simple-stat {
  min-height: 104px;
  border-top-color: #2f7f76;
  background: linear-gradient(180deg, #fbfefd 0%, #f4faf8 100%);
}

.renewal-tracking-team-panel .data-table td {
  vertical-align: middle;
}

.renewal-tracking-team-table tr.is-active td {
  background: rgba(39, 127, 108, 0.035);
}

.renewal-tracking-team-table td:first-child strong,
.renewal-tracking-action-table td:nth-child(2) strong {
  display: block;
  color: #18353d;
}

.renewal-tracking-team-table td small {
  display: block;
  margin-top: 2px;
  color: var(--ink-muted);
  font-size: 8px;
}

.renewal-tracking-team-table td:first-child small,
.renewal-tracking-action-table td:nth-child(2) small {
  display: block;
  margin-top: 2px;
  color: var(--ink-muted);
  font-size: 8px;
}

.renewal-tracking-no-action {
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 20px;
  color: var(--ink-muted);
  text-align: center;
}

.renewal-tracking-no-action strong {
  color: #29464d;
  font-size: 10px;
}

.renewal-tracking-no-action span {
  font-size: 8px;
}

.renewal-tracking-idle {
  border-top: 1px solid #e4ecea;
  background: #fbfdfc;
}

.renewal-tracking-idle summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  color: #4c666b;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.renewal-tracking-idle summary::-webkit-details-marker {
  display: none;
}

.renewal-tracking-idle summary::before {
  content: "+";
  width: 18px;
  height: 18px;
  border: 1px solid #bed5cf;
  border-radius: 50%;
  color: #2d786c;
  line-height: 16px;
  text-align: center;
}

.renewal-tracking-idle[open] summary::before {
  content: "−";
}

.renewal-tracking-idle summary span {
  flex: 1;
}

.renewal-tracking-idle summary strong {
  color: #2f7f76;
  font-size: 9px;
}

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

.renewal-tracking-idle-list > span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #e0eae7;
  border-radius: 8px;
  background: #fff;
}

.renewal-tracking-idle-list strong {
  color: #24454c;
  font-size: 9px;
}

.renewal-tracking-idle-list small {
  color: var(--ink-muted);
  font-size: 8px;
  line-height: 1.5;
}

.renewal-tracking-workspace {
  display: grid;
  gap: 14px;
}

.renewal-tracking-switcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.renewal-tracking-switcher button {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2px 10px;
  min-height: 70px;
  padding: 14px 18px;
  border: 1px solid #d6e4e1;
  border-radius: 12px;
  background: #fff;
  color: #203d44;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.renewal-tracking-switcher button:hover {
  transform: translateY(-1px);
  border-color: #78aaa0;
  box-shadow: 0 9px 22px rgba(35, 89, 81, 0.08);
}

.renewal-tracking-switcher button.active {
  border-color: #2f7f76;
  background: linear-gradient(120deg, #f1faf7 0%, #e7f5f1 100%);
  box-shadow: inset 3px 0 0 #2f7f76;
}

.renewal-tracking-switcher button > span {
  font-size: 11px;
  font-weight: 800;
}

.renewal-tracking-switcher button > strong {
  grid-row: 1 / span 2;
  grid-column: 2;
  color: #1e7466;
  font-size: 23px;
  line-height: 1;
}

.renewal-tracking-switcher button > small {
  color: var(--ink-muted);
  font-size: 8px;
}

.renewal-tracking-controls {
  display: grid;
  grid-template-columns: minmax(150px, 200px) minmax(170px, 220px) 1fr;
  align-items: end;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #dce8e5;
  border-radius: 12px;
  background: #f9fcfb;
}

.renewal-tracking-controls label {
  display: grid;
  gap: 5px;
  color: #4c656a;
  font-size: 8px;
  font-weight: 700;
}

.renewal-tracking-controls input,
.renewal-tracking-controls select {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #cbdcd8;
  border-radius: 7px;
  background: #fff;
  color: #20383e;
  font: inherit;
  font-size: 9px;
}

.renewal-tracking-controls > div {
  display: grid;
  gap: 2px;
  padding-left: 12px;
  border-left: 2px solid #9ec9bf;
}

.renewal-tracking-controls > div strong {
  color: #2b5d56;
  font-size: 9px;
}

.renewal-tracking-controls > div p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 8px;
  line-height: 1.55;
}

.renewal-tracking-action-table tr.is-operation td {
  background: #f8fafc;
}

.renewal-tracking-note {
  max-width: 280px;
  white-space: normal;
  line-height: 1.55;
}

.renewal-tracking-customer-table td:nth-child(3),
.renewal-tracking-customer-table td:nth-child(5) {
  min-width: 140px;
}

.renewal-tracking-content .renewal-tracking-customer-table th:nth-child(3),
.renewal-tracking-content .renewal-tracking-customer-table td:nth-child(3) {
  width: 240px;
  min-width: 240px;
}

.renewal-tracking-content .renewal-tracking-customer-table td:nth-child(3) > strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  white-space: normal;
}

.renewal-tracking-customer-table .renewal-tracking-note {
  display: block;
  margin-top: 2px;
  color: var(--ink-muted);
  font-size: 8px;
}

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

  .renewal-tracking-hero-meta {
    justify-items: start;
    text-align: left;
  }

  .renewal-tracking-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .renewal-tracking-idle-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .renewal-tracking-controls > div {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .renewal-tracking-hero {
    padding: 18px;
  }

  .renewal-tracking-switcher,
  .renewal-tracking-controls {
    grid-template-columns: 1fr;
  }

  .renewal-tracking-idle-list {
    grid-template-columns: 1fr;
  }

  .renewal-tracking-controls > div {
    grid-column: auto;
    padding: 10px 0 0;
    border-top: 1px solid #dce8e5;
    border-left: 0;
  }
}

@media (min-width: 901px) and (max-width: 1366px) {
  .login-screen {
    grid-template-columns: minmax(0, 1fr) minmax(440px, 0.82fr);
  }

  .login-brand-panel {
    padding: clamp(34px, 4vw, 58px);
  }

  .login-brand-copy h1 {
    font-size: clamp(34px, 4.2vw, 48px);
  }

  .login-form-panel {
    padding: 36px 30px;
  }

  .login-card {
    width: min(460px, 100%);
    padding: 36px;
  }

  .login-card-heading h2 {
    font-size: 28px;
  }

  .login-card-heading p,
  .login-field > label {
    font-size: 13px;
  }

  .login-input-wrap input,
  .login-submit {
    font-size: 16px;
  }
}

/* Readability pass for detailed journey and contract modals. */
.modal.wide-modal {
  width: min(1360px, 97vw);
  max-height: min(94vh, 960px);
}

.modal.wide-modal .modal-header {
  padding: 20px 28px 17px;
}

.modal.wide-modal .modal-header h2 {
  font-size: 24px;
  line-height: 1.35;
}

.modal.wide-modal .modal-body {
  padding: 28px 30px;
}

.modal.wide-modal h4 {
  margin: 20px 0 12px;
  font-size: 16px;
}

.modal.wide-modal .modal-footer {
  gap: 10px;
  padding: 17px 28px;
}

.modal.wide-modal .modal-footer .button {
  min-height: 42px;
  padding: 0 16px;
  font-size: 13px;
}

.modal.wide-modal .detail-field {
  padding: 16px 17px;
}

.modal.wide-modal .detail-field span {
  margin-bottom: 7px;
  font-size: 12px;
}

.modal.wide-modal .detail-field strong {
  font-size: 14px;
  line-height: 1.55;
  white-space: normal;
}

.journey-detail-hero > div {
  padding: 19px 20px;
}

.journey-detail-hero span {
  margin-bottom: 8px;
  font-size: 11px;
}

.journey-detail-hero strong {
  font-size: 16px;
  line-height: 1.4;
  white-space: normal;
}

.journey-detail-hero small {
  margin-top: 7px;
  font-size: 11px;
  line-height: 1.5;
  white-space: normal;
}

.journey-detail-section {
  margin-bottom: 18px;
  padding: 21px;
}

.journey-section-head {
  gap: 13px;
  margin-bottom: 18px;
}

.journey-section-head > span:first-child {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 11px;
}

.journey-section-head h3 {
  margin: 1px 0 5px;
  font-size: 16px;
}

.journey-section-head p {
  font-size: 12px;
  line-height: 1.65;
}

.journey-section-head > .status {
  min-height: 28px;
  padding: 0 10px;
  font-size: 10.5px;
}

.journey-profile-summary {
  gap: 12px;
}

.journey-profile-summary > div {
  padding: 15px 16px;
}

.journey-profile-summary span {
  margin-bottom: 8px;
  font-size: 11px;
}

.journey-profile-summary p {
  font-size: 14px;
  line-height: 1.8;
}

.journey-followup-note {
  gap: 8px;
  padding: 16px 17px;
}

.journey-followup-note strong {
  font-size: 15px;
}

.journey-followup-note span {
  font-size: 11px;
}

.journey-followup-note p {
  font-size: 13px;
  line-height: 1.75;
}

.journey-followup-history {
  gap: 10px;
  margin-top: 16px;
}

.journey-followup-history-head strong {
  font-size: 14px;
}

.journey-followup-history-head span {
  font-size: 11px;
}

.journey-followup-history-item {
  padding: 14px 15px;
}

.journey-followup-history-item strong {
  font-size: 12.5px;
}

.journey-followup-history-item span,
.journey-followup-history-item small {
  font-size: 10.5px;
}

.journey-followup-history-item p {
  margin: 9px 0;
  font-size: 13px;
  line-height: 1.75;
}

.journey-followup-history-empty {
  padding: 16px;
  font-size: 12px;
  line-height: 1.7;
}

.journey-testdrive-history {
  gap: 12px;
}

.journey-testdrive-item {
  padding: 17px;
}

.journey-testdrive-head strong {
  margin-bottom: 6px;
  font-size: 14px;
}

.journey-testdrive-head span,
.journey-testdrive-item > small {
  font-size: 10.5px;
  line-height: 1.65;
}

.journey-testdrive-head > em {
  font-size: 28px;
}

.journey-testdrive-head > em small {
  font-size: 11px;
}

.journey-testdrive-tags {
  gap: 7px;
  margin: 12px 0;
}

.journey-testdrive-tags span,
.journey-testdrive-tags em {
  padding: 5px 9px;
  font-size: 10px;
}

.journey-testdrive-item p {
  margin: 9px 0;
  font-size: 13px;
  line-height: 1.75;
}

.journey-testdrive-empty {
  padding: 18px;
}

.journey-testdrive-empty strong {
  font-size: 14px;
}

.journey-testdrive-empty p {
  font-size: 12px;
}

.journey-panorama-grid {
  border-radius: 11px;
}

.journey-panorama-field {
  padding: 15px 16px;
}

.journey-panorama-field span {
  margin-bottom: 7px;
  font-size: 10.5px;
}

.journey-panorama-field strong {
  font-size: 13px;
  line-height: 1.75;
}

.modal.wide-modal .ledger-timeline > div {
  gap: 12px;
  padding-bottom: 17px;
}

.modal.wide-modal .ledger-timeline p,
.modal.wide-modal .ledger-timeline strong {
  font-size: 12px;
}

.modal.wide-modal .ledger-timeline small {
  font-size: 10.5px;
}

@media (max-width: 900px) {
  .modal.wide-modal {
    width: 98vw;
  }

  .modal.wide-modal .modal-body {
    padding: 19px;
  }

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

  .journey-panorama-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .login-brand-panel {
    min-height: 240px;
    padding: 21px 19px 23px;
  }

  .login-logo-card {
    width: 50px;
    height: 50px;
  }

  .login-brand strong {
    font-size: 16px;
  }

  .login-brand-copy {
    margin: 25px 0 18px;
  }

  .login-brand-copy h1 {
    font-size: 27px;
  }

  .login-brand-copy > p:last-child {
    display: none;
  }

  .login-feature-list {
    display: none;
  }

  .login-security-note {
    display: none;
  }

  .login-form-panel {
    justify-content: flex-start;
  }
}

@media (max-width: 1280px) {
  :root {
    --sidebar-width: 224px;
  }

  .workspace {
    padding-right: 20px;
    padding-left: 20px;
  }

  .topbar {
    padding-right: 20px;
    padding-left: 20px;
  }

  .hero-panel {
    grid-template-columns: 1.15fr 0.85fr;
  }

  .top-filters .filter-field:nth-child(2) {
    display: none;
  }

  .ledger-source-order-fields {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1040px) {
  :root {
    --sidebar-width: 208px;
  }

  .brand-block {
    padding-right: 16px;
    padding-left: 16px;
  }

  .brand-name {
    font-size: 14px;
  }

  .top-filters .filter-field:nth-child(3) {
    display: none;
  }

  .ledger-source-order-fields,
  .sales-edit-source-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rejected-ledger-banner {
    grid-template-columns: 1fr;
  }

  .customer-ledger-summary {
    grid-template-columns: 1fr 1fr;
  }

  .customer-document-head {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .customer-document-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .profile-text {
    display: none;
  }

  .hero-panel {
    grid-template-columns: 1fr;
  }

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

  .metric-card:last-child {
    grid-column: 1 / -1;
  }

  .hero-side {
    grid-template-columns: repeat(4, 1fr);
  }

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

  .two-col,
  .data-layout,
  .cost-grid {
    grid-template-columns: 1fr;
  }

  .form-summary {
    position: static;
  }

  .data-source-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .permission-layout {
    grid-template-columns: 230px minmax(0, 1fr);
  }

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

  .source-audit-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .source-audit-metric:nth-child(2) {
    border-right: 0;
  }

  .source-audit-metric:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .data-audit-notes {
    grid-template-columns: 1fr;
  }

  .data-audit-notes > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .data-audit-notes > div:last-child {
    border-bottom: 0;
  }

  .inventory-field-note {
    grid-template-columns: 1fr;
  }

  .schema-fields,
  .source-order-grid,
  .supplementary-cost-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  :root {
    --sidebar-width: 248px;
  }

  .sales-ledger-page-head {
    display: flex;
    align-items: stretch;
    flex-direction: column;
  }

  .sales-ledger-page-head > div:first-child {
    width: 100%;
    flex: 0 0 auto;
  }

  .sales-ledger-page-head .page-head-actions {
    width: 100%;
  }

  .sidebar {
    transform: translateX(-105%);
    transition: transform 220ms ease;
  }

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

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

  body.mobile-nav-open {
    overflow: hidden;
  }

  body.mobile-nav-open .follow-up-reminder {
    display: none;
  }

  .mobile-menu,
  .mobile-close {
    display: grid;
  }

  .sidebar-overlay {
    z-index: 45;
  }

  .topbar {
    min-height: 68px;
  }

  .top-filters {
    display: none;
  }

  .workspace {
    min-height: calc(100vh - 68px);
    padding: 17px 14px 32px;
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .page-head h2 {
    font-size: 19px;
  }

  .page-head-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
  }

  .page-head-actions > .button,
  .page-head-actions > .filter-field {
    min-width: 0;
  }

  .hero-panel {
    padding: 21px;
  }

  .hero-side {
    grid-template-columns: 1fr 1fr;
  }

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

  .metric-card:last-child {
    grid-column: 1 / -1;
  }

  .analysis-hero {
    grid-template-columns: 1fr;
  }

  .analysis-hero-side {
    grid-template-columns: repeat(3, 1fr);
  }

  .metric-strip {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .sales-query-fields {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .toolbar-right {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

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

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

  .sales-query-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .brand-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .form-field.span-3 {
    grid-column: span 2;
  }

  .workflow-banner {
    grid-template-columns: 1fr;
  }

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

  .workflow-item::after {
    top: auto;
    right: auto;
    bottom: -6px;
    left: 31px;
    transform: rotate(135deg);
  }

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

  .permission-layout {
    grid-template-columns: 1fr;
  }

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

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

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

  .import-summary-grid,
  .import-mapping-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .delete-summary-grid {
    grid-template-columns: 1fr 1fr;
  }

  .delete-summary-grid > div:nth-child(2) {
    border-right: 0;
  }

  .delete-summary-grid > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .import-summary-grid > div:nth-child(2) {
    border-right: 0;
  }

  .import-summary-grid > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .import-mapping-summary > div:nth-child(2) {
    border-right: 0;
  }

  .import-mapping-summary > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

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

  .brand-entry-grid {
    grid-template-columns: 1fr;
  }

  .ledger-flow-banner,
  .ledger-flow-banner.four-step,
  .ledger-flow-banner.three-step {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ledger-record-summary {
    grid-template-columns: 1fr 1fr;
  }

  .ledger-create-identity {
    grid-template-columns: 1fr 1fr;
  }

  .ledger-create-identity > div:nth-child(2) {
    border-right: 0;
  }

  .ledger-create-identity > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .ledger-supplement-intro {
    grid-template-columns: 1fr;
  }

  .architecture {
    grid-template-columns: repeat(2, 1fr);
  }

  .architecture-step:nth-child(2)::after {
    content: none;
  }

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

  .approval-card-actions {
    grid-column: 2;
  }

  .duplicate-review-card {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .duplicate-review-card .approval-card-actions {
    grid-column: 2;
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: 17px;
  }

  .page-title-wrap {
    min-width: 0;
  }

  .eyebrow {
    font-size: 9px;
  }

  .topbar-actions {
    gap: 4px;
  }

  .profile-button > span:last-child,
  .notification-btn {
    display: none;
  }

  .workspace {
    padding-right: 11px;
    padding-left: 11px;
  }

  .page-head {
    display: block;
  }

  .page-head-actions {
    margin-top: 12px;
    flex-wrap: wrap;
  }

  .hero-panel {
    gap: 19px;
    padding: 19px;
    border-radius: 15px;
  }

  .hero-panel h2 {
    font-size: 19px;
  }

  .hero-actions .button {
    flex: 1;
  }

  .hero-side {
    gap: 7px;
  }

  .hero-stat {
    padding: 11px;
  }

  .hero-stat strong {
    font-size: 16px;
  }

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

  .metric-card:last-child {
    grid-column: auto;
  }

  .content-grid {
    gap: 12px;
  }

  .panel-header {
    min-height: 60px;
    padding-right: 14px;
    padding-left: 14px;
  }

  .panel-body {
    padding-right: 14px;
    padding-left: 14px;
  }

  .donut-wrap {
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 8px;
  }

  .donut-chart,
  .donut-chart svg {
    width: 118px;
    height: 118px;
  }

  .chart-wrap svg {
    height: 210px;
  }

  .analysis-hero-side {
    padding: 12px;
  }

  .analysis-mini {
    padding: 4px 9px;
  }

  .analysis-mini strong {
    font-size: 14px;
  }

  .metric-strip {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .sales-query-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .sales-query-fields {
    grid-template-columns: 1fr 1fr;
  }

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

  .structure-component-grid {
    grid-template-columns: 1fr 1fr;
  }

  .brand-directory {
    grid-template-columns: 1fr;
  }

  .object-editor-grid {
    grid-template-columns: 1fr;
  }

  .advisor-podium {
    grid-template-columns: 1fr;
  }

  .brand-summary-grid {
    grid-template-columns: 1fr;
  }

  .simple-stat {
    padding: 13px;
  }

  .simple-stat strong {
    font-size: 16px;
  }

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

  .toolbar-left,
  .toolbar-right {
    gap: 6px;
  }

  .toolbar-right .search-field {
    display: none;
  }

  .form-grid,
  .form-grid.two,
  .form-grid.four,
  .form-grid.three,
  .sales-query-fields,
  .quality-filter-fields,
  .cost-fields,
  .schema-fields,
  .source-order-grid,
  .ledger-source-order-fields,
  .sales-edit-source-fields,
  .sales-level3-comparison,
  .ledger-readonly-grid,
  .supplementary-cost-row {
    grid-template-columns: 1fr;
  }

  .structure-component-grid {
    grid-template-columns: 1fr;
  }

  .quality-main-tabs {
    width: 100%;
  }

  .automatic-backup-heading,
  .automatic-backup-foot {
    align-items: flex-start;
    flex-direction: column;
  }

  .automatic-backup-grid {
    grid-template-columns: 1fr;
  }

  .backup-layout {
    grid-template-columns: 1fr;
  }

  .sales-query-keyword {
    grid-column: auto;
  }

  .sales-query-actions {
    justify-content: stretch;
  }

  .sales-query-actions .button {
    flex: 1;
  }

  .form-field.span-2,
  .form-field.span-3 {
    grid-column: auto;
  }

  .cost-group {
    padding-right: 14px;
    padding-left: 14px;
  }

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

  .schema-item > span:last-child {
    display: none;
  }

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

  .ledger-flow-banner,
  .ledger-flow-banner.four-step,
  .ledger-flow-banner.three-step,
  .ledger-record-summary,
  .ledger-create-identity,
  .customer-ledger-summary {
    grid-template-columns: 1fr;
  }

  .customer-document-head {
    grid-template-columns: 1fr;
  }

  .customer-document-actions {
    grid-column: auto;
  }

  .customer-document-metrics {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .ledger-calc-summary {
    grid-template-columns: 1fr 1fr;
  }

  .role-list,
  .permission-groups,
  .store-permission-grid {
    grid-template-columns: 1fr;
  }

  .architecture-step::after {
    top: auto !important;
    right: auto !important;
    bottom: -7px !important;
    left: 50% !important;
    transform: translateX(-50%) rotate(135deg) !important;
  }

  .architecture-step:last-child::after {
    content: none !important;
  }

  .approval-card-actions {
    flex-wrap: wrap;
  }

  .drawer-body,
  .drawer-header,
  .modal-body,
  .modal-header {
    padding-right: 16px;
    padding-left: 16px;
  }

  .modal-backdrop {
    padding: 9px;
  }

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

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

@media (max-width: 1200px) {
  .operations-hero {
    grid-template-columns: 1fr;
  }

  .operations-hero-score {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 0;
  }

  .operations-commission-rules {
    grid-template-columns: repeat(4, minmax(110px, 1fr));
  }

  .operations-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .operations-inventory-hero {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workflow-stage-row {
    grid-template-columns: 30px minmax(120px, 1.2fr) minmax(120px, 1fr) 95px 66px 34px;
  }
}

@media (max-width: 1450px) {
  .operations-overview-grid {
    grid-template-columns: 1fr;
  }

  .journey-overview-table {
    min-width: 0;
  }
}

@media (max-width: 900px) {
  .follow-up-reminder {
    top: 78px;
    margin: 10px 14px 0;
  }

  .follow-up-reminder-content {
    align-items: stretch;
    flex-direction: column;
  }

  .follow-up-reminder-actions .button {
    width: 100%;
  }

  .follow-up-reminder-item {
    flex-wrap: wrap;
  }

  .operations-overview-grid,
  .operations-inventory-layout {
    grid-template-columns: 1fr;
  }

  .operations-hero-score {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .operations-commission-rules,
  .operations-inventory-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .workflow-stage-row {
    grid-template-columns: 30px repeat(2, minmax(0, 1fr));
  }

  .workflow-stage-row > .form-check,
  .workflow-stage-row > .icon-btn {
    grid-column: auto;
  }

  .operations-data-flow {
    grid-template-columns: 1fr;
  }

  .operations-data-flow > i {
    justify-self: center;
    transform: rotate(90deg);
  }

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

  .operations-insight-list {
    grid-template-columns: 1fr;
  }

  .journey-focus-grid,
  .journey-detail-hero,
  .journey-followup-banner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .journey-loss-detail-banner {
    grid-template-columns: 1fr;
  }

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

  .test-drive-behavior-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .test-drive-rating-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .follow-up-reminder {
    padding: 13px;
  }

  .follow-up-reminder-item {
    align-items: stretch;
    flex-direction: column;
  }

  .follow-up-reminder-time {
    text-align: left;
  }

  .operations-hero-main {
    padding: 22px 18px;
  }

  .operations-hero-score {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .operations-stage-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-right: 12px;
    padding-left: 12px;
  }

  .operations-kpi-grid {
    grid-template-columns: 1fr;
  }

  .operations-inventory-hero,
  .operations-commission-rules,
  .operations-inventory-form {
    grid-template-columns: 1fr;
  }

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

  .workflow-stage-row .form-field,
  .workflow-stage-row .form-check,
  .workflow-stage-row .icon-btn {
    grid-column: 2;
  }

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

  .integration-card-head {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .integration-card-head > .status {
    grid-column: 2;
    justify-self: start;
  }

  .operations-form-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .operations-form-footer .button {
    width: 100%;
  }

  .field-policy-card {
    align-items: stretch;
    flex-direction: column;
  }

  .field-policy-card select {
    width: 100%;
  }

  .journey-form-section,
  .journey-detail-section {
    padding: 13px;
  }

  .journey-section-head {
    flex-wrap: wrap;
  }

  .journey-focus-grid,
  .journey-detail-hero,
  .journey-followup-banner {
    grid-template-columns: 1fr;
  }

  .journey-panorama-grid {
    grid-template-columns: 1fr;
  }

  .test-drive-behavior-grid,
  .test-drive-rating-grid {
    grid-template-columns: 1fr;
  }
}

/* Vehicle archive form readability */
.vehicle-stock-modal .inventory-form-intro {
  margin-bottom: 20px;
}

.vehicle-stock-modal .inventory-form-intro > div {
  gap: 6px;
  padding: 15px 17px;
}

.modal.vehicle-stock-modal .inventory-form-intro strong {
  font-size: 16px;
  line-height: 1.4;
}

.modal.vehicle-stock-modal .inventory-form-intro span {
  font-size: 13px;
  line-height: 1.6;
}

.vehicle-stock-modal .form-grid {
  gap: 18px 16px;
}

.vehicle-stock-modal .form-field {
  gap: 8px;
}

.modal.vehicle-stock-modal .form-field > label {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

.modal.vehicle-stock-modal .required {
  font-size: 15px;
}

.modal.vehicle-stock-modal .form-field input,
.modal.vehicle-stock-modal .form-field select,
.modal.vehicle-stock-modal .form-field textarea {
  min-height: 46px;
  padding: 10px 12px;
  font-size: 16px;
  line-height: 1.45;
}

.modal.vehicle-stock-modal .form-field textarea {
  min-height: 92px;
}

.modal.vehicle-stock-modal .modal-action-note {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
}

.modal.vehicle-stock-modal .modal-footer .button {
  font-size: 16px;
}

/* Authenticated shell first, business data immediately afterwards. */
body.auth-loading .top-filters,
body.auth-loading #refreshDataButton {
  visibility: hidden;
}

body.auth-loading .workspace {
  padding-top: 20px;
}

.auth-loading-workspace {
  position: relative;
}

.auth-shell-loading {
  display: grid;
  min-height: min(720px, calc(100vh - 130px));
  align-content: start;
  gap: 18px;
  padding: 8px 0 24px;
}

.auth-shell-loading-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 24px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(246, 249, 251, 0.92));
  border: 1px solid rgba(221, 230, 235, 0.9);
  border-radius: 18px;
  box-shadow: 0 14px 40px rgba(24, 48, 64, 0.06);
}

.auth-shell-loader {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 3px solid #deE8ed;
  border-top-color: #ff6d3a;
  border-right-color: #0b8f83;
  border-radius: 50%;
  animation: auth-shell-spin 900ms linear infinite;
}

.auth-shell-loading-head span {
  color: #6c7d89;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.17em;
}

.auth-shell-loading-head h2 {
  margin: 4px 0 3px;
  color: var(--ink);
  font-size: clamp(19px, 2vw, 27px);
  letter-spacing: -0.025em;
}

.auth-shell-loading-head p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 11px;
}

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

.auth-shell-skeleton i {
  display: block;
  overflow: hidden;
  background: #e8eef2;
  border-radius: 999px;
}

.auth-shell-skeleton i::after {
  display: block;
  width: 42%;
  height: 100%;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
  animation: auth-skeleton-sheen 1.35s ease-in-out infinite;
}

.auth-skeleton-hero {
  min-height: 150px;
  padding: 26px;
  background: linear-gradient(135deg, #eef4f5, #f8fafb);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.auth-skeleton-hero i {
  height: 13px;
  margin-bottom: 14px;
}

.auth-skeleton-hero i:nth-child(1) {
  width: 32%;
}

.auth-skeleton-hero i:nth-child(2) {
  width: 62%;
  height: 25px;
}

.auth-skeleton-hero i:nth-child(3) {
  width: 45%;
  margin-bottom: 0;
}

.auth-skeleton-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.auth-skeleton-metrics i {
  height: 106px;
  background: #eef3f5;
  border: 1px solid var(--line);
  border-radius: 15px;
}

.auth-skeleton-panel {
  min-height: 260px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}

.auth-skeleton-panel i {
  height: 12px;
  margin-bottom: 20px;
}

.auth-skeleton-panel i:nth-child(1) {
  width: 28%;
  height: 19px;
}

.auth-skeleton-panel i:nth-child(2) {
  width: 92%;
}

.auth-skeleton-panel i:nth-child(3) {
  width: 76%;
}

.auth-skeleton-panel i:nth-child(4) {
  width: 85%;
}

.auth-skeleton-panel i:nth-child(5) {
  width: 64%;
  margin-bottom: 0;
}

@keyframes auth-shell-spin {
  to { transform: rotate(360deg); }
}

@keyframes auth-skeleton-sheen {
  from { transform: translateX(-120%); }
  to { transform: translateX(320%); }
}

@media (max-width: 760px) {
  .auth-shell-loading {
    min-height: calc(100vh - 110px);
  }

  .auth-shell-loading-head {
    padding: 18px;
  }

  .auth-skeleton-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-shell-loader,
  .auth-shell-skeleton i::after {
    animation: none;
  }
}

body.member-portal-mode .finance-member-portal-frame {
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
}

body.member-portal-mode .member-portal-return {
  top: auto;
  right: 20px;
  bottom: 20px;
  left: auto;
}

@media (max-width: 620px) {
  html[data-client-terminal="phone"] body.member-portal-mode .finance-member-portal-frame {
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
  }

  body.member-portal-mode .member-portal-return {
    top: auto;
    right: max(12px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
    left: auto;
  }
}

/* Renewal command dashboard */
.command-nav {
  display: none;
}

body.command-dashboard-mode {
  --command-ink: #1b292d;
  --command-muted: #819096;
  --command-line: #e7ecec;
  --command-paper: #f4f7f7;
  --command-sidebar: #11262d;
  --command-sidebar-deep: #0b1d23;
  --command-coral: #df6b4d;
  --command-gold: #c89b58;
  --command-mint: #2b9b7d;
  background: var(--command-paper);
}

body.command-dashboard-mode .sidebar {
  width: 236px;
  color: #e8eeee;
  background:
    radial-gradient(circle at -8% 24%, rgba(84, 127, 112, 0.19), transparent 29%),
    linear-gradient(165deg, var(--command-sidebar), var(--command-sidebar-deep));
  border-right: 0;
}

body.command-dashboard-mode .brand-block {
  gap: 13px;
  padding: 27px 22px 25px;
}

body.command-dashboard-mode .brand-mark {
  width: 42px;
  height: 42px;
  border: 3px solid rgba(255, 255, 255, 0.78);
  border-radius: 50%;
  box-shadow: 0 9px 22px rgba(0, 0, 0, 0.28);
}

body.command-dashboard-mode .brand-name {
  font-size: 17px;
  letter-spacing: 0.14em;
}

body.command-dashboard-mode .brand-subtitle {
  margin-top: 4px;
  color: #8ba0a0;
  font-size: 12px;
  letter-spacing: 0.04em;
}

body.command-dashboard-mode .command-nav {
  display: block;
  padding: 8px 13px 24px;
}

body.command-dashboard-mode .main-nav {
  display: block;
}

.renewal-nav-parent {
  position: relative;
}

.renewal-nav-parent .nav-caret {
  display: grid;
  width: 17px;
  height: 17px;
  margin-left: auto;
  color: #708697;
  place-items: center;
  transition: transform 160ms ease, color 160ms ease;
}

.renewal-nav-parent .nav-caret svg {
  width: 14px;
  height: 14px;
}

.renewal-nav-parent.has-active-child {
  color: #f5fafc;
  background: rgba(255, 255, 255, 0.035);
}

.renewal-nav-parent[aria-expanded="true"] .nav-caret {
  color: #f0a17f;
  transform: rotate(180deg);
}

.renewal-subnav {
  position: relative;
  display: grid;
  gap: 3px;
  margin: 3px 0 6px 24px;
  padding-left: 10px;
}

.renewal-subnav::before {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;
  width: 1px;
  content: "";
  background: rgba(255, 255, 255, 0.1);
}

.renewal-subnav[hidden] {
  display: none;
}

.renewal-subnav-item {
  min-height: 36px;
  padding: 0 10px;
  border-radius: 7px;
  color: #8fa4af;
  font-size: 12px;
}

.renewal-subnav-item .nav-icon {
  width: 16px;
}

.renewal-subnav-item .nav-icon svg {
  width: 15px;
  height: 15px;
}

.renewal-subnav-item.active::before {
  top: 8px;
  bottom: 8px;
}

body.command-dashboard-mode .command-nav-group-label {
  padding: 19px 14px 8px;
  color: #607679;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

body.command-dashboard-mode .command-nav-item {
  min-height: 48px;
  gap: 13px;
  padding: 0 14px;
  color: #cad5d5;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 650;
}

body.command-dashboard-mode .command-nav-item .nav-icon {
  width: 20px;
  color: #9bb0b0;
}

body.command-dashboard-mode .command-nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.055);
}

body.command-dashboard-mode .command-nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(97, 119, 100, 0.46), rgba(97, 119, 100, 0.16));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

body.command-dashboard-mode .command-nav-item.active::before {
  top: 7px;
  bottom: 7px;
  width: 3px;
  background: #f06b45;
  border-radius: 0;
}

body.command-dashboard-mode .command-nav-item.active .nav-icon {
  color: #f7b08d;
}

body.command-dashboard-mode .sidebar-footer {
  padding: 14px 16px 19px;
}

body.command-dashboard-mode .system-health {
  background: rgba(255, 255, 255, 0.025);
  border-color: rgba(255, 255, 255, 0.035);
}

body.command-dashboard-mode .main-area {
  margin-left: 236px;
}

body.command-dashboard-mode .topbar {
  min-height: 72px;
  padding: 12px 30px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom-color: #e7ebeb;
  box-shadow: 0 1px 0 rgba(18, 43, 48, 0.02);
}

body.command-dashboard-mode .page-title-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

body.command-dashboard-mode .page-title-wrap .eyebrow {
  order: 2;
  margin: 0;
  color: #a5afb1;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
}

body.command-dashboard-mode .page-title-wrap h1 {
  order: 1;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
}

body.command-dashboard-mode .top-filters {
  display: none;
}

body.command-dashboard-mode .topbar-actions {
  gap: 9px;
}

body.command-dashboard-mode .topbar-actions > .icon-btn {
  width: 34px;
  height: 34px;
  color: #617174;
  background: #f7f9f9;
  border-color: #eef1f1;
  border-radius: 7px;
}

body.command-dashboard-mode #changePasswordTopButton,
body.command-dashboard-mode #logoutButton {
  display: none;
}

body.command-dashboard-mode .profile-button {
  gap: 9px;
  margin-left: 5px;
  padding-left: 9px;
  border-left: 1px solid #e7ebeb;
}

body.command-dashboard-mode .profile-button::before {
  display: grid;
  width: 34px;
  height: 34px;
  content: "管";
  color: #fff5ee;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.3), transparent 28%),
    linear-gradient(145deg, #e4896d, #9c5848);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  place-items: center;
  box-shadow: 0 5px 14px rgba(128, 72, 55, 0.18);
}

body.command-dashboard-mode .workspace {
  max-width: 1650px;
  min-height: calc(100vh - 72px);
  padding: 26px 30px 38px;
}

body.command-dashboard-mode .site-compliance-footer {
  width: min(calc(100% - 60px), 1650px);
}

.command-dashboard {
  color: var(--command-ink);
}

.command-page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 21px;
}

.command-page-heading > div:first-child {
  min-width: 0;
}

.command-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: #9aa6a8;
  font-size: 12px;
}

.command-breadcrumb i {
  width: 3px;
  height: 3px;
  background: #c4cccc;
  border-radius: 50%;
}

.command-breadcrumb strong {
  color: #647477;
  font-weight: 600;
}

.command-title-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 11px;
}

.command-title-line h2 {
  margin: 0;
  color: #18282c;
  font-size: clamp(23px, 2vw, 30px);
  font-weight: 750;
  letter-spacing: -0.035em;
}

.command-health {
  display: inline-flex;
  height: 25px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  color: #566c60;
  background: #eaf1e9;
  border: 1px solid #dbe7dc;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.command-health i {
  width: 6px;
  height: 6px;
  background: #5b9975;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(91, 153, 117, 0.11);
}

.command-page-heading p {
  max-width: 760px;
  margin: 9px 0 0;
  color: #7b898d;
  font-size: 13px;
  line-height: 1.7;
}

.command-heading-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.command-store-filter {
  display: flex;
  width: 210px;
  height: 44px;
  align-items: center;
  gap: 9px;
  padding: 0 11px;
  color: #526164;
  background: #fff;
  border: 1px solid #e0e6e6;
  border-radius: 7px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.command-store-filter:hover,
.command-store-filter:focus-within {
  border-color: #cfdad7;
  box-shadow: 0 5px 14px rgba(25, 45, 48, 0.055);
}

.command-store-filter-icon {
  display: grid;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: #6f807c;
  place-items: center;
}

.command-store-filter-icon svg {
  width: 16px;
  height: 16px;
}

.command-store-filter-copy {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 1px;
}

.command-store-filter-copy small {
  color: #9aa5a7;
  font-size: 9px;
  line-height: 1.1;
}

.command-store-filter select {
  width: 100%;
  min-width: 0;
  padding: 0 16px 0 0;
  overflow: hidden;
  color: #384a4d;
  background: transparent;
  border: 0;
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
  appearance: none;
}

.command-store-filter-chevron {
  display: grid;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: #879497;
  pointer-events: none;
  place-items: center;
}

.command-store-filter-chevron svg {
  width: 14px;
  height: 14px;
}

.command-date-button,
.command-export-button {
  display: inline-flex;
  height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border-radius: 7px;
  font-size: 12px;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.command-date-button {
  color: #526164;
  background: #fff;
  border: 1px solid #e0e6e6;
}

.command-date-button strong {
  font-weight: 600;
}

.command-date-button span svg {
  width: 15px;
  height: 15px;
  color: #7c898b;
}

.command-export-button {
  color: #fff;
  background: linear-gradient(135deg, #1d413e, #112f30);
  border: 1px solid #112f30;
  box-shadow: 0 7px 16px rgba(17, 47, 48, 0.14);
}

.command-export-button span svg {
  width: 16px;
  height: 16px;
}

.command-date-button:hover,
.command-export-button:hover {
  transform: translateY(-1px);
}

.command-export-button:hover {
  background: linear-gradient(135deg, #27524d, #173a3a);
  box-shadow: 0 9px 20px rgba(17, 47, 48, 0.2);
}

.command-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 16px;
}

.command-metric-card {
  position: relative;
  min-height: 158px;
  overflow: hidden;
  padding: 18px 19px 16px;
  background: #fff;
  border: 1px solid var(--command-line);
  border-radius: 10px;
  box-shadow: 0 5px 18px rgba(25, 45, 48, 0.025);
}

.command-metric-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  content: "";
  opacity: 0.78;
}

.command-metric-sand::before {
  background: #d8b273;
}

.command-metric-mint::before {
  background: #6db29c;
}

.command-metric-coral::before {
  background: #e4886d;
}

.command-metric-top,
.command-metric-footer,
.command-panel-head,
.command-team-head,
.command-team-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.command-metric-label {
  color: #7b898c;
  font-size: 13px;
  font-weight: 600;
}

.command-metric-icon {
  display: grid;
  width: 31px;
  height: 31px;
  color: #6f7f82;
  background: #f6f8f8;
  border: 1px solid #edf0f0;
  border-radius: 7px;
  place-items: center;
}

.command-metric-icon svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.7;
}

.command-metric-value {
  position: relative;
  z-index: 1;
  margin: 16px 0 10px;
  color: #18272b;
  font-family: "DIN Alternate", "Avenir Next", var(--font);
  font-size: clamp(29px, 2.6vw, 38px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
}

.command-metric-value > span {
  margin-right: 4px;
  color: #899698;
  font-size: 14px;
  font-weight: 500;
}

.command-metric-value > small {
  margin-left: 4px;
  color: #6f7d80;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
}

.command-metric-footer {
  position: relative;
  z-index: 1;
  justify-content: flex-start;
  color: #9aa5a7;
  font-size: 11px;
}

.command-delta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 700;
}

.command-delta.positive {
  color: #3b967d;
}

.command-delta.negative {
  color: #d45f48;
}

.command-delta.neutral {
  color: #879497;
}

.command-delta b {
  font-size: 11px;
}

.command-sparkline {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 54px;
  opacity: 0.94;
  pointer-events: none;
}

.command-analysis-panel {
  margin-bottom: 16px;
}

.command-analysis-head {
  display: flex;
  min-height: 86px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 19px 14px;
  border-bottom: 1px solid #eef2f1;
}

.command-analysis-head > div:first-child {
  min-width: 0;
}

.command-analysis-head h3 {
  margin: 0 0 5px;
  color: #1a2b2f;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.015em;
}

.command-analysis-head p {
  margin: 0;
  color: #94a0a2;
  font-size: 11px;
}

.command-dimension-tabs {
  display: flex;
  flex: 0 0 auto;
  gap: 5px;
  padding: 4px;
  background: #f4f7f6;
  border: 1px solid #ebefee;
  border-radius: 8px;
}

.command-dimension-tabs button {
  display: grid;
  min-width: 88px;
  gap: 2px;
  padding: 7px 11px;
  color: #728083;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  text-align: left;
  transition: background 150ms ease, box-shadow 150ms ease, color 150ms ease;
}

.command-dimension-tabs button small {
  color: #a4adaf;
  font-family: "DIN Alternate", var(--font);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.command-dimension-tabs button strong {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.command-dimension-tabs button:hover {
  color: #47575a;
  background: rgba(255, 255, 255, 0.7);
}

.command-dimension-tabs button.active {
  color: #1d3b39;
  background: #fff;
  border-color: #e1e8e5;
  box-shadow: 0 3px 10px rgba(32, 59, 55, 0.07);
}

.command-dimension-tabs button.active small {
  color: #5f8f82;
}

.command-analysis-summary {
  display: grid;
  grid-template-columns: 0.7fr 1fr 1.25fr 1fr;
  margin: 13px 18px;
  overflow: hidden;
  background: linear-gradient(90deg, #f8faf9, #fbfcfc);
  border: 1px solid #edf1ef;
  border-radius: 8px;
}

.command-analysis-summary > div {
  min-width: 0;
  padding: 10px 13px;
}

.command-analysis-summary > div + div {
  border-left: 1px solid #e8edeb;
}

.command-analysis-summary span,
.command-analysis-summary strong,
.command-analysis-summary small {
  display: block;
}

.command-analysis-summary span {
  margin-bottom: 4px;
  color: #98a3a5;
  font-size: 10px;
}

.command-analysis-summary strong {
  overflow: hidden;
  color: #314548;
  font-family: "DIN Alternate", var(--font);
  font-size: 15px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-analysis-summary strong small {
  display: inline;
  margin-left: 2px;
  color: #879497;
  font-family: var(--font);
  font-size: 10px;
  font-weight: 500;
}

.command-analysis-summary > div > small {
  margin-top: 3px;
  color: #9aa5a7;
  font-family: var(--font);
  font-size: 9px;
  font-weight: 400;
}

.command-analysis-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

.command-analysis-table th {
  height: 36px;
  padding: 0 12px;
  color: #98a4a6;
  background: #fafbfb;
  border-top: 1px solid #f0f2f2;
  border-bottom: 1px solid #edf1f0;
  font-size: 10px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.command-analysis-table th:first-child,
.command-analysis-table td:first-child {
  padding-left: 18px;
}

.command-analysis-table th:last-child,
.command-analysis-table td:last-child {
  padding-right: 18px;
}

.command-analysis-table td {
  height: 60px;
  padding: 9px 12px;
  color: #536265;
  border-bottom: 1px solid #f0f3f2;
  font-size: 11px;
  vertical-align: middle;
}

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

.command-analysis-table tbody tr:hover {
  background: #fbfcfc;
}

.command-analysis-table .num {
  text-align: right;
  white-space: nowrap;
}

.command-analysis-table td > strong {
  display: block;
  color: #34474a;
  font-family: "DIN Alternate", var(--font);
  font-size: 12px;
}

.command-analysis-table td > small {
  display: block;
  margin-top: 3px;
  color: #98a4a6;
  font-size: 9px;
  white-space: nowrap;
}

.command-analysis-table .positive {
  color: #468d78;
}

.command-analysis-table .negative {
  color: #c85e48;
}

.command-analysis-entity {
  display: flex;
  min-width: 170px;
  align-items: center;
  gap: 9px;
}

.command-analysis-entity > div {
  min-width: 0;
}

.command-analysis-entity strong,
.command-analysis-entity small {
  display: block;
}

.command-analysis-entity strong {
  overflow: hidden;
  margin-bottom: 3px;
  color: #273a3d;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-analysis-entity small {
  overflow: hidden;
  max-width: 245px;
  color: #99a4a6;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-entity-mark {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  color: #fff;
  background: linear-gradient(145deg, #7ca99c, #477c70);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  place-items: center;
}

.command-entity-mark.insurer {
  background: linear-gradient(145deg, #cb9c75, #9b694b);
}

.command-entity-mark.customer {
  background: linear-gradient(145deg, #8294a3, #536c7b);
}

.command-analysis-money {
  color: #26383b !important;
  font-family: "DIN Alternate", var(--font);
  font-size: 12px !important;
  font-weight: 700;
}

.command-change {
  display: inline-flex;
  padding: 4px 6px;
  color: #718083;
  background: #f5f7f7;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 650;
  white-space: nowrap;
}

.command-change.positive {
  color: #3c8a72;
  background: #edf6f2;
}

.command-change.negative {
  color: #c55d46;
  background: #fdf1ed;
}

.command-change.neutral {
  color: #7b898c;
}

.command-drill-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 7px;
  color: #50766e;
  background: #fff;
  border: 1px solid #e2e9e6;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}

.command-drill-button span {
  transition: transform 150ms ease;
}

.command-drill-button:hover {
  color: #2d6258;
  background: #f7faf9;
  border-color: #cfddd8;
}

.command-drill-button:hover span {
  transform: translateX(2px);
}

.command-analysis-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 18px;
  padding: 11px 0 13px;
  color: #96a1a3;
  border-top: 1px dashed #e8ecec;
  font-size: 10px;
}

.command-analysis-foot button {
  flex: 0 0 auto;
  color: #58736d;
  background: transparent;
  border: 0;
  font-size: 10px;
  font-weight: 700;
}

.command-analysis-foot button span {
  display: inline-block;
  margin-left: 3px;
  transition: transform 150ms ease;
}

.command-analysis-foot button:hover span {
  transform: translateX(3px);
}

.command-main-grid,
.command-lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.78fr);
  gap: 16px;
  margin-bottom: 16px;
  content-visibility: auto;
  contain-intrinsic-block-size: 430px;
}

.command-panel {
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--command-line);
  border-radius: 10px;
  box-shadow: 0 5px 18px rgba(25, 45, 48, 0.025);
}

.command-panel-head {
  min-height: 73px;
  padding: 15px 18px 12px;
  border-bottom: 1px solid #f0f2f2;
}

.command-panel-head > div {
  min-width: 0;
}

.command-panel-kicker {
  display: block;
  margin-bottom: 5px;
  color: #9ba7a9;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.command-panel-head h3 {
  margin: 0 0 4px;
  color: #1a2b2f;
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -0.015em;
}

.command-panel-head p {
  margin: 0;
  color: #94a0a2;
  font-size: 11px;
}

.command-panel-tools {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
}

.command-period-label,
.command-current-tab {
  display: inline-flex;
  height: 27px;
  align-items: center;
  padding: 0 10px;
  color: #718083;
  background: #f5f7f7;
  border: 1px solid #ebefef;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 600;
}

.command-more-button {
  display: grid;
  width: 27px;
  height: 27px;
  color: #849194;
  background: #fff;
  border: 1px solid #e9eded;
  border-radius: 5px;
  place-items: center;
}

.command-more-button svg {
  width: 14px;
  height: 14px;
}

.command-funnel {
  display: grid;
  gap: 5px;
  padding: 18px 23px 11px;
}

.command-funnel-row {
  display: grid;
  min-height: 40px;
  grid-template-columns: 31px minmax(0, 1fr) 46px;
  align-items: center;
  gap: 11px;
  padding: 0;
  background: transparent;
  border: 0;
  text-align: left;
}

.command-funnel-index {
  color: #b0babc;
  font-family: "DIN Alternate", var(--font);
  font-size: 10px;
  font-weight: 700;
}

.command-funnel-shape {
  display: flex;
  height: 36px;
  align-items: center;
  justify-content: center;
  min-width: 250px;
  margin-inline: auto;
  clip-path: polygon(4% 0, 96% 0, 100% 100%, 0 100%);
}

.command-funnel-shape > span {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 0 18px;
}

.command-funnel-shape b {
  color: #556164;
  font-size: 12px;
  font-weight: 650;
}

.command-funnel-shape strong {
  color: #2c383b;
  font-family: "DIN Alternate", var(--font);
  font-size: 17px;
  font-weight: 700;
}

.command-funnel-shape small {
  margin-left: 3px;
  color: #768285;
  font-family: var(--font);
  font-size: 9px;
  font-weight: 500;
}

.command-funnel-row.sand .command-funnel-shape {
  background: linear-gradient(90deg, #f4efe4, #eee6d5);
}

.command-funnel-row.peach .command-funnel-shape {
  background: linear-gradient(90deg, #f7e9de, #f3decf);
}

.command-funnel-row.orange .command-funnel-shape {
  background: linear-gradient(90deg, #f4dfd5, #efcdbf);
}

.command-funnel-row.red .command-funnel-shape {
  background: linear-gradient(90deg, #edcbbf, #e7b7a7);
}

.command-funnel-row:hover .command-funnel-shape {
  filter: saturate(1.08) brightness(0.985);
}

.command-funnel-rate {
  color: #889497;
  font-family: "DIN Alternate", var(--font);
  font-size: 11px;
  font-weight: 650;
  text-align: right;
}

.command-funnel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 0 18px;
  padding: 11px 0 13px;
  color: #889497;
  border-top: 1px dashed #e8ecec;
  font-size: 10px;
}

.command-funnel-foot > span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.command-funnel-foot i {
  width: 6px;
  height: 6px;
  background: #5ca183;
  border-radius: 50%;
}

.command-funnel-foot button,
.command-link-button {
  color: #5e6f71;
  background: transparent;
  border: 0;
  font-size: 10px;
  font-weight: 650;
}

.command-funnel-foot button span,
.command-link-button span {
  display: inline-block;
  margin-left: 3px;
  transition: transform 150ms ease;
}

.command-funnel-foot button:hover span,
.command-link-button:hover span {
  transform: translateX(3px);
}

.command-profile-panel {
  display: flex;
  flex-direction: column;
}

.command-profile-visual {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  align-items: center;
  gap: 17px;
  padding: 20px 18px 16px;
}

.command-donut {
  position: relative;
  display: grid;
  width: 132px;
  height: 132px;
  place-items: center;
  background: conic-gradient(#d87050 0 38%, #5d8d84 38% 65%, #c7a466 65% 86%, #d9dfdc 86% 100%);
  border-radius: 50%;
  transform: rotate(-30deg);
}

.command-donut::before {
  position: absolute;
  width: 85px;
  height: 85px;
  content: "";
  background: #fff;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px #f3f5f4;
}

.command-donut > div {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 2px;
  text-align: center;
  transform: rotate(30deg);
}

.command-donut strong {
  color: #1d3033;
  font-family: "DIN Alternate", var(--font);
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.04em;
}

.command-donut span {
  color: #8c989a;
  font-size: 10px;
}

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

.command-profile-legend > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #738184;
  font-size: 11px;
}

.command-profile-legend span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.command-profile-legend i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
}

.command-profile-legend .price {
  background: #d87050;
}

.command-profile-legend .brand {
  background: #5d8d84;
}

.command-profile-legend .service {
  background: #c7a466;
}

.command-profile-legend .growth {
  background: #d9dfdc;
}

.command-profile-legend strong {
  color: #415155;
  font-family: "DIN Alternate", var(--font);
  font-size: 12px;
}

.command-profile-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: auto 16px 15px;
  padding: 11px 12px;
  background: #f6f8f7;
  border: 1px solid #edf0ee;
  border-radius: 7px;
}

.command-profile-note-icon {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  color: #6e8b81;
  background: #e9f0ed;
  border-radius: 50%;
  place-items: center;
}

.command-profile-note-icon svg {
  width: 14px;
  height: 14px;
}

.command-profile-note > div {
  min-width: 0;
}

.command-profile-note strong {
  display: block;
  margin-bottom: 3px;
  color: #4c5d5f;
  font-size: 11px;
}

.command-profile-note p {
  margin: 0;
  color: #8a9698;
  font-size: 10px;
  line-height: 1.5;
}

.command-profile-note b {
  color: #d16a4c;
}

.command-lower-grid {
  grid-template-columns: minmax(0, 1.36fr) minmax(330px, 0.72fr);
}

.command-team-panel {
  min-height: 318px;
}

.command-team-head {
  min-height: 70px;
}

.command-team-actions {
  gap: 11px;
}

.command-link-button {
  white-space: nowrap;
}

.command-team-table-wrap {
  overflow-x: auto;
}

.command-team-table {
  width: 100%;
  border-collapse: collapse;
}

.command-team-table th {
  height: 36px;
  padding: 0 12px;
  color: #9aa5a7;
  background: #fafbfb;
  border-bottom: 1px solid #eef1f1;
  font-size: 10px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.command-team-table th:first-child,
.command-team-table td:first-child {
  padding-left: 18px;
}

.command-team-table th:last-child,
.command-team-table td:last-child {
  padding-right: 18px;
}

.command-team-table td {
  height: 56px;
  padding: 8px 12px;
  color: #536164;
  border-bottom: 1px solid #f1f3f3;
  font-size: 11px;
}

.command-team-table tr:last-child td {
  border-bottom: 0;
}

.command-team-table tbody tr:hover {
  background: #fbfcfc;
}

.command-team-table .num {
  text-align: right;
}

.command-member {
  display: flex;
  min-width: 150px;
  align-items: center;
  gap: 9px;
}

.command-avatar {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  place-items: center;
}

.command-avatar.coral {
  background: linear-gradient(145deg, #e69a7d, #b8664e);
}

.command-avatar.mint {
  background: linear-gradient(145deg, #78b6a4, #3d7f70);
}

.command-avatar.blue {
  background: linear-gradient(145deg, #778f9c, #4e6976);
}

.command-avatar.gold {
  background: linear-gradient(145deg, #d6b478, #9b7b48);
}

.command-member > div {
  min-width: 0;
}

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

.command-member strong {
  margin-bottom: 2px;
  color: #27383b;
  font-size: 12px;
}

.command-member small {
  color: #9ca6a8;
  font-size: 9px;
}

.command-member em {
  margin-left: auto;
  color: #c3cbcc;
  font-family: "DIN Alternate", var(--font);
  font-size: 10px;
  font-style: normal;
}

.command-premium {
  color: #26373a !important;
  font-family: "DIN Alternate", var(--font);
  font-size: 13px !important;
  font-weight: 700;
  white-space: nowrap;
}

.command-rate {
  display: flex;
  min-width: 104px;
  align-items: center;
  gap: 8px;
}

.command-rate > div {
  width: 64px;
  height: 4px;
  overflow: hidden;
  background: #edf1f0;
  border-radius: 99px;
}

.command-rate > div span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #6da894, #468778);
  border-radius: inherit;
}

.command-rate strong {
  color: #607174;
  font-family: "DIN Alternate", var(--font);
  font-size: 11px;
}

.command-complete {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  color: #4f8174;
  background: #edf5f2;
  border-radius: 4px;
  font-family: "DIN Alternate", var(--font);
  font-size: 10px;
  font-weight: 700;
  place-items: center;
}

.command-trend-total {
  color: #c76549;
  font-family: "DIN Alternate", var(--font);
  font-size: 16px;
  font-weight: 700;
}

.command-trend-chart {
  position: relative;
  padding: 14px 16px 4px 38px;
}

.command-chart-axis {
  position: absolute;
  top: 18px;
  bottom: 33px;
  left: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #b0b9bb;
  font-family: "DIN Alternate", var(--font);
  font-size: 9px;
}

.command-trend-chart svg {
  width: 100%;
  height: 130px;
  overflow: visible;
}

.command-chart-labels {
  display: flex;
  justify-content: space-between;
  padding-top: 6px;
  color: #a5afb1;
  font-size: 9px;
}

.command-trend-foot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 11px 16px 14px;
  overflow: hidden;
  background: #f7f9f8;
  border: 1px solid #edf0ef;
  border-radius: 7px;
}

.command-trend-foot > div {
  padding: 9px 11px;
}

.command-trend-foot > div + div {
  border-left: 1px solid #e9eded;
}

.command-trend-foot span,
.command-trend-foot strong {
  display: block;
}

.command-trend-foot span {
  margin-bottom: 3px;
  color: #9aa5a7;
  font-size: 9px;
}

.command-trend-foot strong {
  color: #394b4e;
  font-family: "DIN Alternate", var(--font);
  font-size: 14px;
}

@media (max-width: 1200px) {
  body.command-dashboard-mode .workspace {
    padding: 22px;
  }

  .command-main-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(285px, 0.74fr);
  }

  .command-lower-grid {
    grid-template-columns: minmax(0, 1.22fr) minmax(300px, 0.78fr);
  }

  .command-profile-visual {
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 10px;
  }

  .command-analysis-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .command-dimension-tabs {
    width: 100%;
  }

  .command-dimension-tabs button {
    min-width: 0;
    flex: 1;
  }

  .command-donut {
    width: 112px;
    height: 112px;
  }

  .command-donut::before {
    width: 72px;
    height: 72px;
  }
}

@media (max-width: 980px) {
  .command-page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .command-heading-actions {
    width: 100%;
  }

  .command-store-filter {
    width: 210px;
  }

  .command-date-button,
  .command-export-button {
    flex: 1;
  }

  .command-metric-grid {
    grid-template-columns: 1fr;
  }

  .command-analysis-summary {
    grid-template-columns: 1fr 1fr;
  }

  .command-analysis-summary > div:nth-child(3) {
    border-left: 0;
    border-top: 1px solid #e8edeb;
  }

  .command-analysis-summary > div:nth-child(4) {
    border-top: 1px solid #e8edeb;
  }

  .command-main-grid,
  .command-lower-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body.command-dashboard-mode .topbar {
    padding-inline: 16px;
  }

  body.command-dashboard-mode .page-title-wrap .eyebrow,
  body.command-dashboard-mode .profile-button {
    display: none;
  }

  body.command-dashboard-mode .workspace {
    min-height: calc(100vh - 72px);
    padding: 18px 14px 92px;
  }

  .command-title-line h2 {
    font-size: 24px;
  }

  .command-health {
    margin-top: 2px;
  }

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

  .command-store-filter {
    width: 100%;
    grid-column: 1 / -1;
  }

  .command-analysis-head {
    padding-inline: 14px;
  }

  .command-dimension-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .command-dimension-tabs button {
    min-width: 0;
  }

  .command-analysis-summary {
    margin-inline: 12px;
  }

  .command-analysis-foot {
    align-items: flex-start;
    flex-direction: column;
    margin-inline: 12px;
  }

  .command-date-button,
  .command-export-button {
    min-width: 0;
    padding-inline: 10px;
  }

  .command-metric-card {
    min-height: 145px;
  }

  .command-funnel {
    padding-inline: 12px;
  }

  .command-funnel-row {
    grid-template-columns: 20px minmax(0, 1fr) 38px;
    gap: 6px;
  }

  .command-funnel-shape {
    min-width: 0;
  }

  .command-funnel-shape > span {
    padding-inline: 10px;
  }

  .command-profile-visual {
    grid-template-columns: 126px minmax(0, 1fr);
  }

  .command-panel-head {
    padding-inline: 14px;
  }

  .command-team-actions .command-current-tab {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .command-date-button,
  .command-export-button,
  .command-funnel-foot button span,
  .command-link-button span {
    transition: none;
  }
}

.member-portal-actions {
  position: fixed;
  z-index: 90;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px;
  background: rgba(12, 34, 47, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  box-shadow: 0 14px 36px rgba(7, 25, 35, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px) saturate(1.25);
}

.member-portal-actions .member-portal-return,
.member-portal-actions .member-portal-refresh {
  position: static;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  height: 38px;
  flex: 0 0 auto;
  box-shadow: none;
}

.member-portal-actions .member-portal-return {
  padding-right: 16px;
}

.member-portal-actions .member-portal-refresh {
  padding-right: 14px;
}

.member-portal-actions .member-portal-return:hover,
.member-portal-actions .member-portal-refresh:hover {
  transform: translateY(-1px);
}

body.member-portal-mode .toast-stack {
  top: auto;
  right: max(24px, env(safe-area-inset-right));
  bottom: max(82px, calc(env(safe-area-inset-bottom) + 82px));
  justify-items: end;
}

body.member-portal-mode .toast {
  width: min(330px, calc(100vw - 32px));
  animation-name: member-toast-in;
}

@keyframes member-toast-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 620px) {
  .member-portal-actions {
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 5px;
    border-radius: 22px;
  }

  .member-portal-actions .member-portal-return,
  .member-portal-actions .member-portal-refresh {
    width: 100%;
    height: 36px;
    padding-right: 12px;
    font-size: 11px;
  }

  body.member-portal-mode .toast-stack {
    right: max(12px, env(safe-area-inset-right));
    bottom: max(106px, calc(env(safe-area-inset-bottom) + 106px));
  }
}

html[data-client-terminal="phone"] body.member-portal-mode .finance-member-portal-frame {
  inset: 50px 0 0;
  width: 100%;
  height: calc(100% - 50px);
  margin: 0;
}

.cashier-ledger-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  padding: 15px;
}

.cashier-ledger-grid article {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(135px, 0.75fr) auto;
  align-items: center;
  gap: 13px;
  min-width: 0;
  padding: 14px 15px;
  background: linear-gradient(145deg, #f8fbfc, #fff);
  border: 1px solid var(--line);
  border-radius: 11px;
}

.cashier-ledger-main,
.cashier-ledger-amount {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.cashier-ledger-main > span,
.cashier-ledger-main > small,
.cashier-ledger-amount > span,
.cashier-ledger-amount > small {
  color: var(--ink-muted);
  font-size: 9px;
  line-height: 1.45;
}

.cashier-customer-link {
  justify-self: start;
  padding: 0;
  color: #0e6076;
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.45;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: rgba(14, 96, 118, 0.28);
  text-underline-offset: 3px;
  cursor: pointer;
}

.cashier-customer-link:hover,
.cashier-customer-link:focus-visible {
  color: #b44322;
  text-decoration-color: currentColor;
  outline: none;
}

.cashier-customer-link-inverse {
  display: block;
  color: #fff;
  font-size: 15px;
  text-decoration-color: rgba(255, 255, 255, 0.5);
}

.cashier-customer-link-inverse:hover,
.cashier-customer-link-inverse:focus-visible {
  color: #ffd5c7;
  text-decoration-color: currentColor;
}

.cashier-linked-section .detail-field .cashier-customer-link {
  display: block;
  margin-bottom: 4px;
  color: #0e6076;
  font-size: 13px;
}

.cashier-linked-section .detail-field .cashier-customer-link + small {
  display: block;
  color: var(--ink-muted);
  font-size: 11px;
}

.cashier-ledger-amount {
  justify-items: end;
  text-align: right;
}

.cashier-ledger-amount > strong {
  color: var(--green);
  font-size: 14px;
}

.cashier-receipt-table {
  min-width: 1580px;
  font-size: 12px;
}

.cashier-receipt-table th {
  padding: 12px;
  font-size: 10px;
}

.cashier-receipt-table td {
  padding: 13px 12px;
  line-height: 1.5;
}

.cashier-receipt-table td:nth-child(3) > .cashier-customer-link {
  display: block;
  color: #0e6076;
  font-size: 13px;
}

.cashier-receipt-table td:nth-child(3) > small {
  display: block;
  margin-top: 3px;
  color: var(--ink-muted);
  font-size: 9px;
}

.cashier-total-cell {
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

.cashier-full-hero {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 18px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 13px;
}

.cashier-full-hero > div {
  min-width: 0;
  padding: 18px;
  background: linear-gradient(145deg, #123142, #1a4555);
}

.cashier-full-hero > div:first-child {
  background: linear-gradient(145deg, #17473f, #1a5b50);
}

.cashier-full-hero span,
.cashier-full-hero strong,
.cashier-full-hero small {
  display: block;
}

.cashier-full-hero span {
  margin-bottom: 7px;
  color: #9ab4bd;
  font-size: 10px;
}

.cashier-full-hero strong {
  color: #fff;
  font-size: 15px;
  line-height: 1.4;
  white-space: normal;
}

.cashier-full-hero small {
  margin-top: 6px;
  color: #b2c8d0;
  font-size: 10px;
  line-height: 1.5;
}

.cashier-form-section,
.cashier-linked-section {
  margin-bottom: 17px;
  padding: 19px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.cashier-total-field {
  min-height: 72px;
  padding: 11px 13px;
  background: linear-gradient(145deg, #eef9f5, #f9fdfb);
  border: 1px solid #cce7de;
  border-radius: 9px;
}

.cashier-total-field > strong {
  display: block;
  margin-bottom: 4px;
  color: var(--green);
  font-size: 22px;
}

.cashier-total-field > small {
  color: var(--ink-muted);
  font-size: 9px;
}

.cashier-ledger-panorama {
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.cashier-ledger-panorama summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 17px;
  background: #f7fafb;
  cursor: pointer;
  list-style: none;
}

.cashier-ledger-panorama summary::-webkit-details-marker {
  display: none;
}

.cashier-ledger-panorama summary strong,
.cashier-ledger-panorama summary small {
  display: block;
}

.cashier-ledger-panorama summary strong {
  font-size: 14px;
}

.cashier-ledger-panorama summary small {
  margin-top: 3px;
  color: var(--ink-muted);
  font-size: 10px;
}

.cashier-ledger-panorama .ledger-readonly-grid {
  padding: 14px;
}

@media (max-width: 1200px) {
  .cashier-ledger-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .cashier-full-hero {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cashier-ledger-grid article {
    grid-template-columns: 1fr;
  }

  .cashier-ledger-amount {
    justify-items: start;
    text-align: left;
  }
}

.customer-ledger-panorama-hero {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 18px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 13px;
}

.customer-ledger-panorama-hero > div {
  min-width: 0;
  padding: 18px;
  background: linear-gradient(145deg, #123142, #1a4555);
}

.customer-ledger-panorama-hero > div:first-child {
  background: linear-gradient(145deg, #17473f, #1a5b50);
}

.customer-ledger-panorama-hero span,
.customer-ledger-panorama-hero strong,
.customer-ledger-panorama-hero small {
  display: block;
}

.customer-ledger-panorama-hero span {
  margin-bottom: 7px;
  color: #9ab4bd;
  font-size: 10px;
}

.customer-ledger-panorama-hero strong {
  color: #fff;
  font-size: 17px;
  line-height: 1.4;
}

.customer-ledger-panorama-hero strong small {
  display: inline;
  margin-left: 3px;
  color: #b7d0d7;
  font-size: 11px;
}

.customer-ledger-panorama-hero > div > small {
  margin-top: 6px;
  color: #b2c8d0;
  font-size: 10px;
  line-height: 1.5;
}

.customer-ledger-history {
  margin-bottom: 17px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.customer-ledger-history-list {
  display: grid;
  gap: 9px;
}

.customer-ledger-history-item {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(230px, 1.2fr) minmax(190px, 0.9fr);
  align-items: center;
  gap: 15px;
  width: 100%;
  padding: 14px 15px;
  color: var(--ink);
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease;
}

.customer-ledger-history-item:hover {
  background: #f1f8f6;
  border-color: rgba(18, 135, 108, 0.28);
}

.customer-ledger-history-item.active {
  background: #eef8f5;
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(11, 143, 131, 0.08);
}

.customer-ledger-history-item > span {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.customer-ledger-history-item strong {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.45;
}

.customer-ledger-history-item small {
  color: var(--ink-muted);
  font-size: 10px;
  line-height: 1.5;
}

.customer-ledger-current-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 17px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.customer-ledger-current-summary > div {
  min-width: 0;
  padding: 16px;
  background: #f9fbfc;
}

.customer-ledger-current-summary span,
.customer-ledger-current-summary strong,
.customer-ledger-current-summary small {
  display: block;
}

.customer-ledger-current-summary span {
  margin-bottom: 6px;
  color: var(--ink-muted);
  font-size: 10px;
}

.customer-ledger-current-summary strong {
  font-size: 14px;
  line-height: 1.45;
}

.customer-ledger-current-summary small {
  margin-top: 4px;
  color: var(--ink-muted);
  font-size: 10px;
}

.customer-sales-fields {
  margin-top: 0;
}

.customer-ledger-panorama-hero span {
  font-size: 14px;
}

.customer-ledger-panorama-hero strong {
  font-size: 22px;
  line-height: 1.45;
}

.customer-ledger-panorama-hero strong small {
  font-size: 14px;
}

.customer-ledger-panorama-hero > div > small {
  font-size: 13px;
  line-height: 1.55;
}

.customer-ledger-history-item {
  padding: 18px 19px;
}

.customer-ledger-history-item strong {
  font-size: 16px;
  line-height: 1.5;
}

.customer-ledger-history-item small {
  font-size: 13px;
  line-height: 1.55;
}

.customer-ledger-current-summary span {
  font-size: 14px;
}

.customer-ledger-current-summary strong {
  font-size: 19px;
  line-height: 1.5;
}

.customer-ledger-current-summary small {
  font-size: 13px;
  line-height: 1.5;
}

.customer-sales-fields summary {
  padding: 19px 21px;
}

.customer-sales-fields summary strong {
  font-size: 18px;
  line-height: 1.45;
}

.customer-sales-fields summary small {
  margin-top: 5px;
  font-size: 14px;
  line-height: 1.55;
}

.customer-sales-fields summary > .status {
  font-size: 13px;
}

.customer-sales-fields .ledger-readonly-grid {
  padding: 16px;
  gap: 1px;
}

.customer-sales-fields .ledger-readonly-field {
  min-height: 88px;
  padding: 18px 20px;
}

.customer-sales-fields .ledger-readonly-field span {
  margin-bottom: 8px;
  overflow: visible;
  font-size: 15px;
  line-height: 1.45;
  text-overflow: clip;
  white-space: normal;
}

.customer-sales-fields .ledger-readonly-field strong {
  overflow: visible;
  color: var(--ink);
  font-size: 20px;
  font-weight: 650;
  line-height: 1.55;
}

@media (max-width: 1000px) {
  .ledger-approval-customer-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ledger-approval-customer-primary {
    grid-column: span 2;
  }

  .customer-ledger-panorama-hero,
  .customer-ledger-current-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-ledger-history-item {
    grid-template-columns: 1fr;
  }

  .customer-sales-fields .ledger-readonly-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .ledger-approval-customer-card {
    grid-template-columns: 1fr;
  }

  .ledger-approval-customer-primary {
    grid-column: auto;
  }

  .ledger-approval-customer-card > div {
    padding: 17px;
  }

  .ledger-approval-customer-primary strong {
    font-size: 28px !important;
  }
}

.contract-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-bottom: 12px;
  padding: 12px 14px;
  color: var(--ink-soft);
  background: #f5faf8;
  border: 1px solid #d8e9e3;
  border-radius: 9px;
  font-size: 11px;
}

.contract-preview-frame {
  width: 100%;
  height: min(68vh, 760px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.pad-contract-flow {
  display: grid;
  gap: 16px;
}

.modal.pad-signature-modal {
  width: min(1520px, 98vw);
  max-height: min(96vh, 1040px);
}

.modal.pad-signature-modal .modal-body {
  overflow: hidden;
  padding: 16px 18px;
}

.pad-contract-unified {
  display: grid;
  grid-template-columns: minmax(520px, 1.55fr) minmax(360px, 0.8fr);
  gap: 14px;
  height: min(78vh, 860px);
  min-height: 620px;
}

.pad-contract-edit-drawer {
  grid-column: 1 / -1;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.pad-contract-edit-drawer > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 15px;
  cursor: pointer;
  list-style: none;
}

.pad-contract-edit-drawer > summary::-webkit-details-marker {
  display: none;
}

.pad-contract-edit-drawer > summary::before {
  content: "+";
  color: var(--teal);
  font-size: 18px;
  font-weight: 800;
}

.pad-contract-edit-drawer[open] > summary::before {
  content: "−";
}

.pad-contract-edit-drawer > summary > span:first-of-type {
  display: grid;
  flex: 1;
  gap: 3px;
}

.pad-contract-edit-drawer > summary strong {
  color: var(--ink);
  font-size: 13px;
}

.pad-contract-edit-drawer > summary small {
  color: var(--ink-muted);
  font-size: 10px;
}

.pad-contract-edit-drawer[open] .pad-contract-editor-form {
  max-height: 38vh;
  border-top: 1px solid var(--line);
}

.pad-contract-document-panel {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  background: #f8fbfc;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.pad-document-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pad-contract-preview-full {
  width: 100%;
  min-height: 0;
  flex: 1;
}

.pad-contract-document-panel > .pad-contract-preview-frame.pad-contract-preview-full {
  min-height: 0;
  height: auto;
  flex: 1;
}

.pad-signature-workbench {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 15px;
  background: linear-gradient(160deg, #f5faf8, #eef5f7);
  border: 1px solid #cfdee4;
  border-radius: 12px;
}

.pad-signature-workbench .pad-handwriting-heading {
  align-items: flex-start;
  padding: 0;
}

.pad-signature-workbench .pad-signature-layout {
  grid-template-columns: 1fr;
  gap: 11px;
}

.pad-signature-card {
  gap: 11px !important;
  padding: 14px !important;
  border: 1px solid #bcd3db !important;
  box-shadow: 0 7px 20px rgba(16, 47, 67, 0.07);
}

.signature-canvas-wrap {
  position: relative;
  min-width: 0;
}

.signature-canvas-hint {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #8ca1aa;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: 0.12em;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.signature-canvas[data-drawn="true"] + .signature-canvas-hint,
.signature-canvas.is-signing + .signature-canvas-hint {
  opacity: 0;
}

.pad-signature-workbench .signature-pad-actions {
  align-items: flex-start;
}

.pad-signature-workbench .signature-pad-actions > .inline-actions {
  flex-wrap: nowrap;
  gap: 6px;
}

.pad-signature-workbench .signature-pad-actions .button {
  min-height: 36px;
  padding: 0 12px;
  font-size: 11px;
  white-space: nowrap;
}

.pad-signing-photo-workflow {
  display: grid;
  gap: 10px;
  padding: 13px;
  background: linear-gradient(145deg, #fff, #f4f9fb);
  border: 1px solid #bdd4dd;
  border-radius: 12px;
}

.pad-signing-photo-requirement {
  display: grid;
  gap: 5px;
  padding: 13px 15px;
  color: #9e332e;
  background: #fff0ee;
  border: 2px solid #e38d84;
  border-radius: 11px;
}

.pad-signing-photo-requirement strong {
  color: #8c221d;
  font-size: 15px;
}

.pad-signing-photo-requirement span {
  color: #7c4c48;
  font-size: 11px;
  line-height: 1.55;
}

.pad-signing-photo-requirement.complete {
  color: #075f4c;
  background: #e9f8f2;
  border-color: #8acbb9;
}

.pad-signing-photo-requirement.complete strong {
  color: #075f4c;
}

.signature-canvas[data-photo-ready="false"] {
  cursor: not-allowed;
  opacity: 0.48;
}

.pad-signing-photo-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.pad-signing-photo-heading > div {
  display: grid;
  gap: 3px;
}

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

.pad-signing-photo-heading small {
  color: var(--ink-muted);
  font-size: 10px;
  line-height: 1.5;
}

.pad-signing-photo-heading > span {
  flex: 0 0 auto;
  padding: 5px 9px;
  color: #936d22;
  background: #fff4d8;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 700;
}

.pad-signing-photo-heading > span.complete {
  color: #0d735d;
  background: #ddf5ed;
}

.pad-signing-photo-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.pad-signing-photo-card {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 11px;
  background: #fff;
  border: 1px solid #cbdde4;
  border-radius: 11px;
}

.pad-signing-photo-card.has-photo {
  border-color: #7dc7b2;
  box-shadow: 0 5px 16px rgba(13, 115, 93, 0.08);
}

.pad-signing-photo-title,
.pad-signing-photo-title > span {
  display: flex;
  align-items: center;
}

.pad-signing-photo-title {
  justify-content: space-between;
  gap: 10px;
}

.pad-signing-photo-title > span {
  min-width: 0;
  gap: 8px;
}

.pad-signing-photo-title b {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  color: #fff;
  background: #153446;
  border-radius: 7px;
  font-size: 10px;
}

.pad-signing-photo-title strong {
  color: var(--ink);
  font-size: 12px;
}

.pad-signing-photo-title em {
  color: #936d22;
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
}

.pad-signing-photo-title em.ready {
  color: #0d735d;
}

.pad-signing-photo-title em.processing {
  color: #2d69a1;
}

.pad-signing-photo-preview {
  position: relative;
  display: grid;
  min-height: 132px;
  place-content: center;
  gap: 5px;
  overflow: hidden;
  padding: 16px;
  color: var(--ink-soft);
  background:
    linear-gradient(145deg, rgba(240, 247, 249, 0.92), rgba(255, 255, 255, 0.96)),
    repeating-linear-gradient(45deg, #f3f8fa 0 8px, #fff 8px 16px);
  border: 1px dashed #a9c1cb;
  border-radius: 9px;
  text-align: center;
}

.pad-signing-photo-preview strong {
  color: var(--ink);
  font-size: 12px;
}

.pad-signing-photo-preview span {
  font-size: 10px;
  line-height: 1.5;
}

.pad-signing-photo-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pad-signing-photo-preview .pad-signing-photo-captured {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 4px 7px;
  color: #fff;
  background: rgba(7, 30, 43, 0.78);
  border-radius: 6px;
  font-size: 9px;
  font-weight: 700;
}

.pad-signing-photo-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
}

.pad-signing-photo-actions .button {
  min-height: 40px;
  padding: 0 11px;
  font-size: 11px;
}

.pad-signing-photo-consent {
  padding: 9px 10px;
  background: #f4f8fa;
  border: 1px solid #d7e3e8;
  border-radius: 8px;
  font-size: 10px;
}

.signing-session-idle,
.signing-session-live {
  display: grid;
  gap: 11px;
}

.signing-session-idle[hidden],
.signing-session-live[hidden] {
  display: none;
}

.signing-session-idle {
  padding: 13px;
  background: #fff;
  border: 1px dashed #9ebbc7;
  border-radius: 10px;
}

.signing-session-steps {
  display: grid;
  gap: 7px;
}

.signing-session-steps span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.5;
}

.signing-session-steps b {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  background: #153446;
  border-radius: 6px;
  font-size: 9px;
}

.signing-session-idle > small {
  color: var(--ink-muted);
  font-size: 9px;
  line-height: 1.5;
}

.signing-camera-scan-warning,
.signing-ip-scan-warning,
.capture-browser-required {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  color: #7b4e0e;
  background: #fff7e3;
  border: 1px solid #edcf8d;
  border-radius: 9px;
}

.signing-camera-scan-warning strong,
.signing-ip-scan-warning strong,
.capture-browser-required strong {
  font-size: 11px;
}

.signing-camera-scan-warning span,
.signing-ip-scan-warning span,
.capture-browser-required p {
  margin: 0;
  font-size: 9px;
  line-height: 1.55;
}

.capture-browser-required {
  color: #87321e;
  background: #fff0ec;
  border-color: #edbbae;
}

.capture-browser-required strong {
  font-size: 14px;
}

.capture-browser-required p {
  font-size: 11px;
}

.signing-session-live-head,
.signing-session-pairing,
.signing-session-photo-card-head,
.capture-photo-heading,
.capture-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.signing-session-live-head > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.signing-session-live-head span,
.signing-session-live-head small {
  color: var(--ink-muted);
  font-size: 9px;
}

.signing-session-live-head strong {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 11px;
}

.signing-session-pairing {
  align-items: stretch;
  padding: 11px;
  background: #fff;
  border: 1px solid #cadce3;
  border-radius: 10px;
}

.signing-session-qr {
  display: grid;
  width: 186px;
  flex: 0 0 186px;
  place-items: center;
  gap: 5px;
  padding: 8px;
  background: #fff;
  border: 1px solid #dbe5e9;
  border-radius: 9px;
  text-align: center;
}

.signing-session-qr canvas {
  display: block;
  width: 154px;
  height: 154px;
}

.signing-session-qr strong {
  color: var(--ink);
  font-size: 11px;
}

.signing-session-qr small {
  color: var(--ink-muted);
  font-size: 8px;
  line-height: 1.4;
}

.signing-session-instructions {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 7px;
}

.signing-session-instructions > strong {
  color: var(--ink);
  font-size: 12px;
}

.signing-session-instructions > span {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.45;
}

.signing-session-instructions > span b {
  display: grid;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  background: #17845f;
  border-radius: 50%;
  font-size: 8px;
}

.signing-session-instructions label {
  display: grid;
  gap: 4px;
  color: var(--ink-muted);
  font-size: 9px;
}

.signing-session-instructions input {
  width: 100%;
  min-width: 0;
  padding: 7px 8px;
  color: var(--ink-soft);
  background: #f7fafb;
  border: 1px solid #d5e2e7;
  border-radius: 7px;
  font-size: 8px;
}

.signing-session-instructions > small {
  color: #0d735d;
  font-size: 9px;
  font-weight: 700;
}

.signing-session-photo-grid,
.capture-photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.signing-session-photo-card,
.capture-photo-card {
  display: grid;
  min-width: 0;
  gap: 8px;
  padding: 10px;
  background: #fff;
  border: 1px solid #cadce3;
  border-radius: 10px;
}

.signing-session-photo-card.has-photo,
.capture-photo-card.has-photo {
  border-color: #78c7b2;
  box-shadow: 0 5px 15px rgba(13, 115, 93, 0.07);
}

.capture-photo-card.has-draft {
  border-color: #edb64b;
  box-shadow: 0 6px 18px rgba(176, 109, 33, 0.1);
}

.capture-photo-card.has-draft .capture-photo-heading em {
  color: #936d22;
}

.capture-photo-draft-meta {
  padding: 9px 10px;
  background: #fff8e8;
  border: 1px solid #f0dfb4;
  border-radius: 8px;
}

.capture-photo-draft-meta strong {
  color: #795816;
}

.signing-session-photo-card-head strong {
  color: var(--ink);
  font-size: 10px;
}

.signing-session-photo-card-head em {
  color: #936d22;
  font-size: 8px;
  font-style: normal;
  font-weight: 700;
}

.signing-session-photo-card.has-photo em {
  color: #0d735d;
}

.signing-session-photo-success,
.capture-upload-success {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  color: #075f4c;
  background: #e9f8f2;
  border: 1px solid #9cd8c7;
  border-radius: 9px;
}

.signing-session-photo-success > span,
.capture-upload-success > span {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  place-items: center;
  color: #fff;
  background: #0d8065;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 900;
}

.signing-session-photo-success > strong,
.capture-upload-success strong {
  color: #075f4c;
  font-size: 10px;
  line-height: 1.4;
}

.capture-upload-success {
  align-items: flex-start;
}

.capture-upload-success > div {
  display: grid;
  gap: 2px;
}

.capture-upload-success strong {
  font-size: 12px;
}

.capture-upload-success small {
  color: #4e756b;
  font-size: 9px;
  line-height: 1.4;
}

.signing-session-photo-card > a,
.capture-photo-preview {
  display: grid;
  min-height: 138px;
  overflow: hidden;
  height: auto;
  place-items: center;
  background: #eef4f6;
  border-radius: 8px;
}

.signing-session-photo-card > a img,
.capture-photo-preview img {
  width: 100%;
  height: auto;
  max-height: 360px;
  object-fit: contain;
}

.signing-session-photo-placeholder,
.capture-photo-placeholder {
  display: grid;
  min-height: 118px;
  place-content: center;
  gap: 5px;
  padding: 12px;
  color: var(--ink-muted);
  background: #f8fafb;
  border: 1px dashed #cbd9df;
  border-radius: 8px;
  text-align: center;
}

.signing-session-photo-placeholder strong,
.capture-photo-placeholder strong {
  color: var(--ink-soft);
  font-size: 10px;
}

.signing-session-photo-placeholder span,
.capture-photo-placeholder span {
  font-size: 8px;
  line-height: 1.45;
}

.signing-session-photo-meta,
.capture-photo-meta {
  display: grid;
  gap: 2px;
}

.signing-session-photo-meta strong,
.capture-photo-meta strong {
  color: var(--ink);
  font-size: 9px;
}

.signing-session-photo-meta span,
.signing-session-photo-meta small,
.capture-photo-meta span,
.capture-photo-meta small {
  color: var(--ink-muted);
  font-size: 8px;
  line-height: 1.4;
}

.signing-session-expired {
  display: grid;
  gap: 4px;
  padding: 12px;
  color: #9e332e;
  background: #fff1ef;
  border: 1px solid #efcbc7;
  border-radius: 9px;
}

.signing-session-expired strong {
  font-size: 11px;
}

.signing-session-expired span {
  font-size: 9px;
  line-height: 1.5;
}

body.signing-capture-mode {
  background: #edf4f6;
}

body.signing-capture-mode .sidebar {
  display: none;
}

body.signing-capture-mode .main-area {
  width: 100%;
  margin-left: 0;
}

body.signing-capture-mode .topbar {
  padding-left: 24px;
}

body.signing-capture-mode .topbar-actions .top-filters,
body.signing-capture-mode #refreshDataButton,
body.signing-capture-mode .notification-btn,
body.signing-capture-mode #changePasswordTopButton {
  display: none !important;
}

body.signing-capture-mode .workspace {
  max-width: 1120px;
  padding: 22px 24px 40px;
  margin: 0 auto;
}

.signing-capture-shell {
  display: grid;
  gap: 14px;
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
}

.capture-page-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  overflow: hidden;
  padding: 26px 28px;
  color: #fff;
  background:
    radial-gradient(circle at 90% 10%, rgba(102, 213, 180, 0.2), transparent 34%),
    linear-gradient(135deg, #0b2636, #173f50 68%, #176552);
  border-radius: 18px;
  box-shadow: 0 18px 42px rgba(10, 39, 54, 0.17);
}

.capture-page-hero > div:first-child {
  display: grid;
  gap: 6px;
  max-width: 680px;
}

.capture-page-hero > div:first-child > span {
  color: #79ddbd;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.capture-page-hero h2 {
  margin: 0;
  color: #fff;
  font-size: 27px;
  letter-spacing: 0.02em;
}

.capture-build-version {
  display: inline-flex;
  margin-top: 8px;
  padding: 4px 8px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  font-size: 9px;
  letter-spacing: 0.02em;
}

.capture-page-hero p {
  max-width: 690px;
  margin: 0;
  color: #c9dae2;
  font-size: 12px;
  line-height: 1.65;
}

.capture-session-badge {
  display: grid;
  min-width: 208px;
  gap: 5px;
  padding: 13px 15px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
}

.capture-session-badge span {
  color: #83debf;
  font-size: 10px;
  font-weight: 800;
}

.capture-session-badge strong {
  color: #fff;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.capture-session-badge small {
  color: #b8ccd5;
  font-size: 9px;
}

.capture-session-brief {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.capture-session-brief > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 13px 15px;
  background: #fff;
  border: 1px solid #d4e2e7;
  border-radius: 11px;
}

.capture-session-brief span {
  color: var(--ink-muted);
  font-size: 9px;
}

.capture-session-brief strong {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.capture-guidance,
.capture-signature-state,
.capture-completed,
.capture-privacy-note {
  display: grid;
  gap: 5px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #d7e4e8;
  border-radius: 11px;
}

.capture-guidance {
  border-left: 4px solid #17845f;
}

.capture-guidance strong,
.capture-signature-state strong,
.capture-completed strong {
  color: var(--ink);
  font-size: 12px;
}

.capture-guidance span,
.capture-signature-state span,
.capture-signature-state small,
.capture-completed p {
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.55;
}

.capture-signature-state {
  grid-template-columns: auto 1fr;
  align-items: center;
  background: #f4faf7;
  border-color: #cde5da;
}

.capture-signature-state small {
  grid-column: 1 / -1;
}

.capture-completed {
  color: #0d735d;
  background: #eaf9f3;
  border-color: #a9ddcc;
}

.capture-mode-bar {
  display: grid;
  grid-template-columns: auto 240px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #d4e2e7;
  border-radius: 11px;
}

.capture-mode-bar label {
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}

.capture-mode-bar select {
  min-height: 38px;
  padding: 0 10px;
  color: var(--ink);
  background: #f8fbfc;
  border: 1px solid #c8d8df;
  border-radius: 8px;
  font-size: 11px;
}

.capture-mode-bar small {
  color: var(--ink-muted);
  font-size: 9px;
  line-height: 1.5;
}

.capture-photo-grid {
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.capture-photo-card {
  gap: 11px;
  padding: 15px;
  border-radius: 13px;
  box-shadow: 0 7px 20px rgba(20, 51, 68, 0.06);
}

.capture-photo-heading > span {
  display: flex;
  align-items: center;
  gap: 9px;
}

.capture-photo-heading b {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #fff;
  background: #153446;
  border-radius: 8px;
  font-size: 10px;
}

.capture-photo-heading strong {
  color: var(--ink);
  font-size: 13px;
}

.capture-photo-heading em {
  color: #936d22;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.capture-photo-card.has-photo .capture-photo-heading em {
  color: #0d735d;
}

.capture-photo-preview {
  min-height: 260px;
  height: auto;
}

.capture-photo-placeholder {
  min-height: 210px;
}

.capture-photo-placeholder strong {
  font-size: 12px;
}

.capture-photo-placeholder span {
  font-size: 10px;
}

.capture-photo-meta strong {
  font-size: 11px;
}

.capture-photo-meta span,
.capture-photo-meta small {
  font-size: 9px;
}

.capture-photo-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.capture-photo-actions .button {
  min-height: 44px;
  font-size: 11px;
}

.capture-native-control {
  position: relative;
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 9px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  overflow: hidden;
}

.capture-native-control.secondary {
  color: var(--ink);
  background: #fff;
  border-color: #c8d8df;
}

.capture-native-control input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.capture-native-control:focus-within {
  outline: 2px solid rgba(13, 128, 101, 0.45);
  outline-offset: 2px;
}

.capture-photo-actions .capture-upload-standby {
  grid-column: 1 / -1;
  color: #5d727c;
  background: #eef4f6;
  border-color: #d3dfe3;
  cursor: not-allowed;
}

.capture-photo-actions .button.is-disabled {
  opacity: 0.48;
  pointer-events: none;
}

.capture-native-control.is-disabled {
  opacity: 0.48;
  pointer-events: none;
}

.capture-upload-error {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  color: #8f2722;
  background: #fff0ee;
  border: 1px solid #efc3be;
  border-radius: 9px;
}

.capture-upload-error strong {
  font-size: 11px;
}

.capture-upload-error span {
  font-size: 10px;
  line-height: 1.5;
}

.capture-upload-error small {
  color: #87524f;
  font-size: 9px;
  line-height: 1.4;
}

.capture-upload-progress {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  color: #155d80;
  background: #edf7fc;
  border: 1px solid #add4e7;
  border-radius: 9px;
}

.capture-upload-progress .spinner {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.capture-upload-progress strong {
  font-size: 11px;
  line-height: 1.4;
}

.capture-photo-card.is-uploading {
  opacity: 0.62;
  pointer-events: none;
}

.capture-signature-state strong {
  color: #0d735d;
}

.capture-privacy-note {
  color: #5f747e;
  background: #eef5f7;
  font-size: 10px;
  line-height: 1.6;
  text-align: center;
}

.capture-page-error,
.capture-page-loading {
  display: grid;
  min-height: 320px;
  place-content: center;
  justify-items: center;
  gap: 10px;
  padding: 32px;
  background: #fff;
  border: 1px solid #d6e2e7;
  border-radius: 16px;
  text-align: center;
}

.capture-page-error strong,
.capture-page-loading strong {
  color: var(--ink);
  font-size: 16px;
}

.capture-page-error p,
.capture-page-loading small {
  max-width: 560px;
  margin: 0;
  color: var(--ink-muted);
  font-size: 11px;
  line-height: 1.6;
}

.capture-page-error.compact {
  min-height: 0;
  justify-items: start;
  text-align: left;
}

.contract-signing-photos-panorama {
  display: grid;
  gap: 10px;
  margin: 14px 0;
  padding: 13px;
  background: linear-gradient(145deg, #f6fbfa, #f5f9fb);
  border: 1px solid #c8dbe1;
  border-radius: 12px;
}

.contract-signing-photos-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.contract-signing-photos-heading > div {
  display: grid;
  gap: 3px;
}

.contract-signing-photos-heading strong {
  color: var(--ink);
  font-size: 13px;
}

.contract-signing-photos-heading small {
  color: var(--ink-muted);
  font-size: 9px;
  line-height: 1.45;
}

.contract-signing-photos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.contract-signing-photos-panorama.compact .contract-signing-photos-grid {
  grid-template-columns: 1fr;
}

.contract-signing-photo-card {
  display: grid;
  min-width: 0;
  gap: 8px;
  padding: 10px;
  background: #fff;
  border: 1px solid #d3e0e5;
  border-radius: 10px;
}

.contract-signing-photo-card.missing {
  border-style: dashed;
}

.contract-signing-photo-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.contract-signing-photo-card-head span {
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}

.contract-signing-photo-card-head em {
  color: #936d22;
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
}

.contract-signing-photo-card.has-photo .contract-signing-photo-card-head em {
  color: #0d735d;
}

.contract-signing-photo-preview {
  display: flex;
  min-height: 178px;
  height: auto;
  align-items: center;
  justify-content: center;
  padding: 6px;
  overflow: visible;
  background: #eef4f6;
  border-radius: 8px;
}

.contract-signing-photo-preview img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 560px;
  object-fit: contain;
}

.contract-signing-photo-preview:hover img {
  transform: none;
}

.contract-signing-photo-meta {
  display: grid;
  gap: 2px;
}

.contract-signing-photo-meta strong {
  color: var(--ink);
  font-size: 10px;
}

.contract-signing-photo-meta span,
.contract-signing-photo-meta small {
  color: var(--ink-muted);
  font-size: 9px;
  line-height: 1.45;
}

.contract-signing-photo-empty {
  display: grid;
  min-height: 112px;
  place-content: center;
  gap: 5px;
  padding: 14px;
  color: var(--ink-muted);
  background: #f8fafb;
  border: 1px dashed #cbd9df;
  border-radius: 8px;
  text-align: center;
}

.contract-signing-photo-empty strong {
  color: var(--ink-soft);
  font-size: 10px;
}

.contract-signing-photo-empty span {
  font-size: 9px;
}

.pad-contract-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  background: #153446;
  border-radius: 12px;
}

.pad-contract-steps > div {
  position: relative;
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 14px 16px 14px 52px;
}

.pad-contract-steps > div + div {
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.pad-contract-steps > div.active {
  background: linear-gradient(135deg, rgba(26, 158, 130, 0.22), rgba(255, 255, 255, 0.04));
}

.pad-contract-steps span {
  position: absolute;
  top: 15px;
  left: 16px;
  color: #66d5b4;
  font-size: 12px;
  font-weight: 800;
}

.pad-contract-steps strong {
  color: #fff;
  font-size: 12px;
}

.pad-contract-steps small {
  overflow: hidden;
  color: #9eb4c0;
  font-size: 9px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pad-contract-workspace {
  display: grid;
  grid-template-columns: minmax(420px, 0.9fr) minmax(480px, 1.1fr);
  gap: 14px;
  min-height: 540px;
}

.pad-contract-editor-panel,
.pad-contract-preview-panel {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  background: #f8fbfc;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.pad-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.pad-panel-heading > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.pad-panel-heading strong {
  color: var(--ink);
  font-size: 12px;
}

.pad-panel-heading small {
  color: var(--ink-muted);
  font-size: 9px;
  line-height: 1.45;
}

.pad-contract-editor-form {
  display: grid;
  gap: 10px;
  overflow-y: auto;
  max-height: 610px;
  padding: 12px;
}

.contract-editor-group {
  overflow: hidden;
  background: #fff;
  border: 1px solid #dbe7ec;
  border-radius: 10px;
}

.contract-editor-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  color: var(--ink);
  background: #f4f9f7;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  list-style: none;
}

.contract-editor-group > summary::-webkit-details-marker {
  display: none;
}

.contract-editor-group > summary::before {
  content: "+";
  margin-right: 8px;
  color: var(--teal);
  font-size: 15px;
}

.contract-editor-group[open] > summary::before {
  content: "−";
}

.contract-editor-group > summary span {
  flex: 1;
}

.contract-editor-group > summary small {
  color: var(--ink-muted);
  font-size: 9px;
  font-weight: 500;
}

.contract-editor-group-fields {
  padding: 12px;
}

.pad-contract-terms {
  padding: 2px;
}

.pad-contract-preview-frame {
  width: 100%;
  min-height: 560px;
  flex: 1;
  background: #fff;
  border: 0;
}

.pad-handwriting-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding: 4px 2px 0;
}

.pad-handwriting-heading > div {
  display: grid;
  gap: 3px;
}

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

.pad-handwriting-heading small,
.pad-handwriting-heading > span {
  color: var(--ink-muted);
  font-size: 10px;
  line-height: 1.45;
}

.pad-signature-layout section {
  background: linear-gradient(145deg, #fff, #f2f8fa);
  border-color: #cfdee4;
}

.pad-signature-canvas {
  height: clamp(210px, 23vh, 270px);
  background:
    linear-gradient(to bottom, transparent calc(68% - 1px), #d4e1e6 calc(68% - 1px), #d4e1e6 68%, transparent 68%),
    #fff;
  border: 2px solid #9db5bf;
  border-radius: 12px;
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.82), 0 4px 12px rgba(16, 47, 67, 0.05);
}

.signature-state {
  padding: 4px 8px;
  color: #936d22;
  background: #fff4d8;
  border-radius: 99px;
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
}

.signature-state.signed {
  color: #0d735d;
  background: #ddf5ed;
}

.signature-pad-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

@media (max-width: 1040px) {
  .modal.pad-signature-modal .modal-body {
    overflow-y: auto;
  }

  .pad-contract-unified {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
  }

  .pad-contract-document-panel {
    min-height: min(68vh, 680px);
  }

  .pad-contract-preview-full {
    min-height: min(62vh, 620px);
  }

  .pad-signature-workbench {
    overflow: visible;
  }

  .pad-signature-workbench .pad-signature-layout {
    grid-template-columns: 1fr 1fr;
  }

  .pad-signing-photo-grid {
    grid-template-columns: 1fr 1fr;
  }

  .signing-session-photo-grid {
    grid-template-columns: 1fr;
  }

  .capture-session-brief {
    grid-template-columns: 1fr 1fr;
  }

  .pad-contract-workspace {
    grid-template-columns: 1fr;
  }

  .pad-contract-preview-panel {
    min-height: 480px;
  }

  .pad-contract-preview-frame {
    min-height: 460px;
  }

  .pad-contract-editor-form {
    max-height: 520px;
  }
}

@media (max-width: 720px) {
  .modal.pad-signature-modal .modal-body {
    overflow-y: auto;
    padding: 10px;
  }

  .pad-contract-unified {
    gap: 10px;
  }

  .pad-contract-document-panel {
    min-height: 64vh;
  }

  .pad-contract-preview-full {
    min-height: 58vh;
  }

  .pad-signature-workbench {
    padding: 10px;
  }

  .pad-signature-workbench .pad-signature-layout {
    grid-template-columns: 1fr;
  }

  .pad-signing-photo-grid,
  .contract-signing-photos-grid {
    grid-template-columns: 1fr;
  }

  .signing-session-pairing {
    align-items: center;
    flex-direction: column;
  }

  .signing-session-qr {
    width: 100%;
    flex-basis: auto;
  }

  .signing-session-photo-grid,
  .capture-photo-grid {
    grid-template-columns: 1fr;
  }

  .capture-page-hero {
    flex-direction: column;
    padding: 20px;
  }

  .capture-page-hero h2 {
    font-size: 23px;
  }

  .capture-session-badge {
    width: 100%;
    min-width: 0;
  }

  .capture-session-brief,
  .capture-mode-bar {
    grid-template-columns: 1fr;
  }

  .capture-photo-preview {
    min-height: 220px;
    height: auto;
  }

  body.signing-capture-mode .topbar {
    padding-left: 12px;
  }

  body.signing-capture-mode .workspace {
    padding: 14px 12px 30px;
  }

  .pad-signing-photo-heading,
  .contract-signing-photos-heading {
    flex-direction: column;
  }

  .pad-signing-photo-actions {
    grid-template-columns: 1fr;
  }

  .pad-signature-canvas {
    height: 230px;
  }

  .pad-signature-workbench .signature-pad-actions {
    flex-direction: column;
    gap: 8px;
  }

  .pad-signature-workbench .signature-pad-actions > .inline-actions {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr 1fr;
  }

  .pad-signature-workbench .signature-pad-actions .button {
    width: 100%;
    min-height: 42px;
  }

  .pad-contract-steps,
  .pad-signature-layout {
    grid-template-columns: 1fr;
  }

  .pad-contract-steps > div + div {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 0;
  }

  .pad-contract-steps small {
    white-space: normal;
  }

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

.journey-row-overdue > td {
  background: linear-gradient(90deg, rgba(213, 31, 38, 0.07), rgba(255, 255, 255, 0.96) 28%);
}

.journey-row-overdue > td:first-child {
  box-shadow: inset 4px 0 0 #d51f26;
}

.journey-row-overdue .journey-customer-link {
  color: #b51e24;
}

.journey-followup-inline.is-overdue {
  color: #b51e24;
  border-top-color: rgba(213, 31, 38, 0.3);
}

.journey-followup-inline.is-overdue strong {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #b51e24;
  font-weight: 750;
}

.journey-followup-inline.is-overdue span {
  color: #9a5053;
}

.followup-due-badge {
  padding: 2px 6px;
  color: #fff;
  background: #d51f26;
  border-radius: 999px;
  font-size: 8px;
  font-style: normal;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.journey-row-overdue.reminder-focus > td {
  animation: journey-due-focus 1.8s ease;
}

@keyframes journey-due-focus {
  0%,
  100% {
    background-color: transparent;
  }
  25%,
  65% {
    background-color: #ffe1e2;
  }
}

.cashier-audit-strip {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) repeat(2, minmax(220px, 1fr));
  gap: 1px;
  margin-bottom: 16px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 11px;
}

.cashier-audit-strip > div {
  display: grid;
  align-content: center;
  gap: 5px;
  min-width: 0;
  min-height: 76px;
  padding: 13px 15px;
  background: #fff;
}

.cashier-audit-strip span,
.cashier-audit-strip strong,
.cashier-audit-strip small {
  display: block;
}

.cashier-audit-strip > div > span:first-child {
  color: var(--ink-muted);
  font-size: 10px;
}

.cashier-audit-strip strong {
  color: var(--ink);
  font-size: 12.5px;
  line-height: 1.45;
}

.cashier-audit-strip small {
  color: var(--ink-muted);
  font-size: 10px;
  line-height: 1.5;
}

.cashier-review-rejected {
  margin-bottom: 16px;
  padding: 13px 15px;
  color: #8e2529;
  background: #fff1f1;
  border: 1px solid #f0c4c6;
  border-radius: 10px;
}

.cashier-review-rejected strong {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
}

.cashier-review-rejected p {
  margin: 0;
  font-size: 11px;
  line-height: 1.6;
}

.cashier-margin-test-head {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 16px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 13px;
}

.cashier-margin-test-head > div {
  min-width: 0;
  padding: 17px;
  background: linear-gradient(145deg, #123142, #1a4555);
}

.cashier-margin-test-head > div:first-child {
  background: linear-gradient(145deg, #17473f, #1a5b50);
}

.cashier-margin-test-head span,
.cashier-margin-test-head strong,
.cashier-margin-test-head small {
  display: block;
}

.cashier-margin-test-head span {
  margin-bottom: 6px;
  color: #9ab4bd;
  font-size: 10px;
}

.cashier-margin-test-head strong {
  color: #fff;
  font-size: 18px;
  line-height: 1.35;
}

.cashier-margin-test-head strong.positive,
.cashier-margin-test-head strong.negative {
  color: #fff;
}

.cashier-margin-test-head small {
  margin-top: 5px;
  color: #b2c8d0;
  font-size: 9px;
  line-height: 1.5;
}

.cashier-margin-test-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 14px;
  margin-bottom: 16px;
}

.cashier-margin-breakdown,
.cashier-margin-cash,
.cashier-margin-records {
  padding: 17px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.cashier-margin-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.cashier-margin-breakdown-grid > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 11px 12px;
  background: #f9fbfc;
}

.cashier-margin-breakdown-grid span {
  color: var(--ink-muted);
  font-size: 9px;
}

.cashier-margin-breakdown-grid strong {
  color: var(--ink-soft);
  font-size: 12px;
}

.cashier-margin-cash-list {
  display: grid;
  gap: 8px;
}

.cashier-margin-cash-list > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 12px;
  padding: 11px 12px;
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.cashier-margin-cash-list span,
.cashier-margin-cash-list small {
  color: var(--ink-muted);
  font-size: 9px;
}

.cashier-margin-cash-list strong {
  grid-row: span 2;
  align-self: center;
  color: var(--ink);
  font-size: 14px;
}

.cashier-margin-cash-list .current {
  background: #fff8eb;
  border-color: #efd8ad;
}

.cashier-margin-cash-list .current strong {
  color: #a36b14;
}

.cashier-margin-cash-list .projected {
  background: #edf9f5;
  border-color: #c9e7dc;
}

.cashier-margin-cash-list .projected strong {
  color: var(--green);
}

.cashier-margin-records {
  padding: 0;
  overflow: hidden;
}

.cashier-margin-records > .section-heading {
  padding: 16px 17px 12px;
}

.modal-footer {
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .cashier-audit-strip,
  .cashier-margin-test-head,
  .cashier-margin-test-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .cashier-audit-strip,
  .cashier-margin-test-head,
  .cashier-margin-test-grid,
  .cashier-margin-breakdown-grid {
    grid-template-columns: 1fr;
  }
}

.cashier-declared-field > small {
  display: block;
  margin-top: 5px;
  color: var(--ink-muted);
  font-size: 9px;
  line-height: 1.5;
}

.cashier-amount-check {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  border: 1px solid;
  border-radius: 9px;
}

.cashier-amount-check.is-matched {
  color: #0d735d;
  background: #edf9f5;
  border-color: #c8e6da;
}

.cashier-amount-check.is-different {
  color: #9e2429;
  background: #fff2f2;
  border-color: #efc6c8;
}

.cashier-amount-check strong {
  font-size: 11px;
}

.cashier-amount-check span {
  font-size: 10px;
}

.cashier-contract-review-head {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 13px;
}

.cashier-contract-review-head > div {
  min-width: 0;
  padding: 17px;
  background: linear-gradient(145deg, #123142, #1a4555);
}

.cashier-contract-review-head > div:first-child {
  background: linear-gradient(145deg, #17473f, #1a5b50);
}

.cashier-contract-review-head span,
.cashier-contract-review-head strong,
.cashier-contract-review-head small {
  display: block;
}

.cashier-contract-review-head span {
  margin-bottom: 6px;
  color: #9ab4bd;
  font-size: 10px;
}

.cashier-contract-review-head strong {
  color: #fff;
  font-size: 17px;
  line-height: 1.4;
}

.cashier-contract-review-head small {
  margin-top: 5px;
  color: #b2c8d0;
  font-size: 9px;
  line-height: 1.5;
}

.cashier-reconciliation-verdict {
  display: grid;
  gap: 5px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid;
  border-radius: 11px;
}

.cashier-reconciliation-verdict span {
  font-size: 10px;
  font-weight: 700;
}

.cashier-reconciliation-verdict strong {
  font-size: 14px;
}

.cashier-reconciliation-verdict small {
  font-size: 10px;
  line-height: 1.55;
}

.cashier-reconciliation-verdict.is-valid {
  color: #0d735d;
  background: #edf9f5;
  border-color: #c8e6da;
}

.cashier-reconciliation-verdict.is-invalid {
  color: #9e2429;
  background: #fff2f2;
  border-color: #efc6c8;
}

.cashier-contract-review-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(350px, 0.9fr);
  gap: 14px;
  margin-bottom: 14px;
}

.cashier-contract-panel {
  padding: 17px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.cashier-channel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.cashier-channel-grid > div {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  background: #f9fbfc;
}

.cashier-channel-grid span {
  color: var(--ink-muted);
  font-size: 9px;
}

.cashier-channel-grid strong {
  color: var(--ink);
  font-size: 12px;
}

.cashier-channel-grid .total {
  background: #eef5f7;
}

.cashier-channel-grid .declared {
  background: #fff8eb;
}

.cashier-channel-grid .match {
  color: var(--green);
  background: #edf9f5;
}

.cashier-channel-grid .difference {
  color: var(--red);
  background: #fff2f2;
}

.cashier-channel-grid .match strong {
  color: var(--green);
}

.cashier-channel-grid .difference strong {
  color: var(--red);
}

.cashier-receipt-history-panel {
  padding: 0;
  overflow: hidden;
}

.cashier-receipt-history-panel > .section-heading {
  padding: 16px 17px 12px;
}

.cashier-receipt-history-empty {
  padding: 18px;
  color: var(--ink-muted);
  background: #f9fbfc;
  border-top: 1px solid var(--line);
  font-size: 11px;
  text-align: center;
}

@media (max-width: 1000px) {
  .cashier-contract-review-head {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cashier-contract-review-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .cashier-contract-review-head,
  .cashier-channel-grid {
    grid-template-columns: 1fr;
  }

  .cashier-amount-check {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 820px) {
  .modal-backdrop {
    align-items: stretch;
    padding: 0;
  }

  .modal,
  .modal.wide-modal {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }

  .modal-header {
    padding-top: max(18px, env(safe-area-inset-top));
  }

  .modal-header > div {
    min-width: 0;
  }

  .modal-header-actions {
    gap: 6px;
  }

  .modal-back-button {
    min-height: 40px;
    padding: 0 12px;
    font-size: 13px;
  }

  .modal.wide-modal .modal-header h2,
  #modalTitle {
    overflow-wrap: anywhere;
  }

  .modal.wide-modal .modal-body {
    padding: 14px;
  }

  .modal-header {
    gap: 10px;
    padding-top: max(18px, calc(env(safe-area-inset-top) + 10px));
  }

  .accident-capture-form {
    scroll-margin-top: 8px;
  }

  .accident-capture-form select,
  .accident-capture-form input,
  .accident-capture-form textarea {
    touch-action: manipulation;
  }

  .modal-footer {
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  .modal-footer .button {
    flex: 1 1 auto;
    min-width: min(100%, 150px);
  }

  .contract-preview-meta {
    gap: 6px 12px;
    padding: 10px 12px;
    font-size: 10px;
  }

  .contract-preview-frame {
    height: calc(100dvh - 230px);
    min-height: 420px;
  }
}

@supports (-webkit-touch-callout: none) {
  @media (max-width: 820px) {
    .modal-header {
      padding-top: max(34px, calc(env(safe-area-inset-top) + 14px));
      padding-right: 14px;
      padding-left: 16px;
    }

    .modal-header-actions {
      align-self: flex-start;
    }
  }
}

.ledger-supplement-review .ledger-supplement-summary {
  margin-bottom: 18px;
  border-color: #d3e1e7;
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(18, 52, 68, 0.08);
}

.ledger-supplement-review .ledger-supplement-summary > div {
  display: flex;
  min-height: 98px;
  flex-direction: column;
  justify-content: center;
  padding: 18px 20px;
}

.ledger-supplement-review .ledger-supplement-summary > div:first-child {
  color: #fff;
  background: linear-gradient(135deg, #0d3447, #176c72);
}

.ledger-supplement-review .ledger-supplement-summary > div:nth-child(3) strong {
  color: var(--teal);
}

.ledger-supplement-review .ledger-supplement-summary > div > span {
  margin-bottom: 7px;
  color: var(--ink-muted);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.ledger-supplement-review .ledger-supplement-summary > div:first-child > span {
  color: #b9e0e1;
}

.ledger-supplement-review .ledger-supplement-summary > div > strong {
  overflow: visible;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

.ledger-supplement-review .ledger-supplement-summary > div:first-child > strong {
  color: #fff;
  font-size: 18px;
}

.ledger-supplement-review .ledger-supplement-intro {
  margin-bottom: 18px;
  padding: 16px 18px;
}

.ledger-supplement-review .ledger-supplement-intro > div:first-child strong {
  margin-bottom: 6px;
  font-size: 14px;
}

.ledger-supplement-review .ledger-supplement-intro > div:first-child span {
  font-size: 11px;
  line-height: 1.65;
}

.ledger-supplement-review .ledger-calc-summary {
  border-radius: 10px;
}

.ledger-supplement-review .ledger-calc-summary > div {
  padding: 12px 14px;
}

.ledger-supplement-review .ledger-calc-summary span {
  font-size: 10.5px;
}

.ledger-supplement-review .ledger-calc-summary strong {
  margin-top: 5px;
  font-size: 14px;
}

.ledger-supplement-review .ledger-source-order-page > .section-heading,
.ledger-supplement-review .ledger-supplement-note-section > .section-heading {
  padding-right: 18px;
  padding-left: 18px;
}

.ledger-supplement-review .ledger-source-order-fields {
  gap: 18px 15px;
}

.ledger-supplement-review .ledger-source-order-item .form-field {
  gap: 8px;
}

.ledger-supplement-review .ledger-source-order-item .form-field > label,
.ledger-supplement-review .ledger-supplement-note-section .form-field > label {
  color: #425965;
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.45;
}

.ledger-supplement-review .form-field input,
.ledger-supplement-review .form-field select,
.ledger-supplement-review .form-field textarea {
  min-height: 44px;
  font-size: 13px;
  line-height: 1.5;
}

.ledger-supplement-review .ledger-source-base-value {
  min-height: 44px;
  padding: 11px 12px;
  font-size: 12.5px;
  line-height: 1.5;
}

.ledger-supplement-review .source-column-number {
  font-size: 10px;
  font-weight: 700;
}

.ledger-supplement-review .form-help {
  color: #637a86;
  font-size: 10px;
  line-height: 1.55;
}

@media (max-width: 1040px) {
  .ledger-supplement-review .ledger-supplement-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ledger-supplement-review .ledger-supplement-summary > div:nth-child(2) {
    border-right: 0;
  }

  .ledger-supplement-review .ledger-supplement-summary > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 600px) {
  .ledger-supplement-review .ledger-supplement-summary {
    grid-template-columns: 1fr;
  }

  .ledger-supplement-review .ledger-supplement-summary > div {
    min-height: 82px;
    padding: 15px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .ledger-supplement-review .ledger-supplement-summary > div:last-child {
    border-bottom: 0;
  }
}

.role-identity-settings {
  padding: 14px;
  background: linear-gradient(135deg, #f3f9f7, #f8fbfc);
  border: 1px solid #d7e8e3;
  border-radius: 11px;
}

.permission-store-people-panel {
  margin-top: 16px;
  overflow: hidden;
}

.permission-store-selector {
  min-width: 220px;
  background: #fff;
}

.permission-store-selector select {
  width: 100%;
}

.permission-filter-row,
.operator-directory-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px 12px;
}

.permission-filter-row input,
.operator-directory-filters input,
.operator-directory-filters select {
  min-height: 36px;
  padding: 7px 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font-size: 11px;
}

.permission-filter-row input,
.operator-directory-filters input {
  min-width: 220px;
  flex: 1;
}

.operator-directory-filters select {
  min-width: 130px;
}

.operator-store-scope-header,
.operator-store-scope-cell {
  min-width: 280px;
  white-space: normal;
}

.operator-store-scope-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 7px;
}

.operator-store-scope-chip {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 4px 9px;
  color: #22564d;
  background: #edf8f4;
  border: 1px solid #cfe8df;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.4;
  white-space: normal;
}

.operator-store-effective {
  display: block;
  color: #526b72;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.5;
}

.operator-store-effective.is-empty {
  color: var(--red);
}

.operator-store-scope-policy {
  display: grid;
  gap: 4px;
  margin-bottom: 11px;
}

.operator-store-scope-policy strong,
.operator-store-scope-policy span {
  display: block;
}

.operator-store-scope-policy strong {
  color: var(--ink);
  font-size: 11px;
}

.operator-store-scope-policy span {
  color: var(--ink-soft);
  font-size: 10.5px;
  line-height: 1.6;
}

.permission-filter-row > span,
.operator-directory-filters > span {
  flex: 0 0 auto;
  padding: 5px 8px;
  color: var(--ink-muted);
  background: #f4f7f8;
  border-radius: 7px;
  font-size: 9px;
  white-space: nowrap;
}

body.permissions-mode .operator-directory-filters {
  flex-wrap: wrap;
  gap: 10px;
}

body.permissions-mode .operator-directory-filters input,
body.permissions-mode .operator-directory-filters select {
  min-height: 42px;
  font-size: 14px;
}

body.permissions-mode .operator-directory-filters > span {
  padding: 7px 10px;
  font-size: 12px;
}

body.permissions-mode #refreshDataButton {
  display: none;
}

#roleEditorForm[inert],
#operatorEditorForm[inert] {
  opacity: 0.72;
  cursor: progress;
  pointer-events: none;
}

body.permissions-saving .permission-layout,
body.permissions-saving .modal {
  cursor: progress;
}

.operator-store-groups {
  display: grid;
  gap: 14px;
  padding: 0 16px 18px;
}

.operator-store-group {
  overflow: hidden;
  background: #fff;
  border: 1px solid #dfe7ea;
  border-radius: 11px;
  box-shadow: 0 3px 12px rgba(22, 49, 67, 0.04);
}

.operator-store-group[hidden] {
  display: none;
}

.operator-store-group > summary {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  color: var(--ink);
  background: linear-gradient(135deg, #f3f9f7, #fbfcfd);
  border-bottom: 1px solid #e1ebe8;
  cursor: pointer;
  list-style: none;
}

.operator-store-group > summary::-webkit-details-marker {
  display: none;
}

.operator-store-group > summary::before {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  content: "";
  background: var(--teal);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(20, 127, 115, 0.1);
}

.operator-store-group-title {
  min-width: 0;
  flex: 1 1 auto;
}

.operator-store-group-title strong,
.operator-store-group-title small {
  display: block;
}

.operator-store-group-title strong {
  font-size: 16px;
  font-weight: 750;
  line-height: 1.4;
}

.operator-store-group-title small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--ink-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operator-store-group-count {
  flex: 0 0 auto;
  padding: 5px 10px;
  color: #1d675a;
  background: #e8f6f2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.operator-store-group-toolbar {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 16px;
  color: var(--ink-muted);
  background: #fbfcfd;
  border-bottom: 1px solid #edf1f3;
  font-size: 12px;
}

.operator-store-group-toolbar .button {
  min-height: 34px;
  flex: 0 0 auto;
  font-size: 12px;
}

.operator-store-empty {
  display: grid;
  min-height: 92px;
  place-content: center;
  gap: 5px;
  color: var(--ink-muted);
  text-align: center;
}

.operator-store-empty strong {
  color: var(--ink);
  font-size: 14px;
}

.operator-store-empty span {
  font-size: 12px;
}

@media (max-width: 700px) {
  .operator-store-group-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .operator-store-group-toolbar .button {
    width: 100%;
  }
}

.operator-store-group .data-table {
  min-width: 1120px;
  font-size: 14px;
}

.operator-store-group .data-table th {
  font-size: 13px;
  font-weight: 650;
}

.operator-store-group .data-table td {
  font-size: 14px;
  line-height: 1.55;
}

.operator-store-group .store-cell strong {
  font-size: 15px;
}

.operator-store-group .store-cell span span,
.operator-store-group .store-cell b {
  font-size: 12px;
}

.operator-permission-cell {
  min-width: 310px;
  white-space: normal;
}

.operator-permission-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.operator-permission-summary span {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 3px 7px;
  color: #40566a;
  background: #f3f6f8;
  border: 1px solid #e2e9ed;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.35;
}

.operator-permission-summary .operator-permission-more {
  color: #1d675a;
  background: #eaf7f3;
  border-color: #cfe8df;
  font-weight: 700;
}

.operator-permission-cell > small {
  display: block;
  margin-top: 6px;
  color: var(--ink-muted);
  font-size: 11px;
}

.operator-directory-empty {
  min-height: 130px;
}

.operator-directory-empty[hidden] {
  display: none;
}

.permission-roster-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  padding: 0 15px 14px;
}

.permission-roster-summary > div {
  padding: 13px 15px;
  background: #f8fafb;
  border: 1px solid var(--line);
}

.permission-roster-summary > div:first-child {
  border-radius: 9px 0 0 9px;
}

.permission-roster-summary > div:last-child {
  border-radius: 0 9px 9px 0;
}

.permission-roster-summary span,
.permission-roster-summary strong,
.permission-roster-summary small {
  display: block;
}

.permission-roster-summary span {
  margin-bottom: 5px;
  color: var(--ink-muted);
  font-size: 9px;
}

.permission-roster-summary strong {
  color: var(--ink);
  font-size: 15px;
}

.permission-roster-summary strong small {
  display: inline;
  margin-left: 3px;
  font-size: 9px;
}

.permission-roster-summary small {
  margin-top: 4px;
  color: var(--ink-muted);
  font-size: 9px;
}

.permission-role-roster {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
  padding: 0 15px 16px;
}

.permission-role-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 9px;
  padding: 13px;
  background: linear-gradient(145deg, #fff, #f8fbfc);
  border: 1px solid var(--line);
  border-radius: 11px;
}

.permission-role-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.permission-role-head > strong {
  color: var(--ink);
  font-size: 18px;
}

.permission-role-head > strong small {
  margin-left: 2px;
  color: var(--ink-muted);
  font-size: 9px;
}

.permission-role-card > p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 9px;
  line-height: 1.55;
}

.permission-role-members {
  display: grid;
  gap: 6px;
}

.permission-role-member {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 9px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.permission-role-member > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.permission-role-member strong,
.permission-role-member small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.permission-role-member strong {
  font-size: 10px;
}

.permission-role-member small {
  color: var(--ink-muted);
  font-size: 8px;
}

.permission-role-member .inline-actions {
  flex: 0 0 auto;
  gap: 4px;
}

.permission-role-member .button {
  min-height: 28px;
  padding: 0 7px;
  font-size: 9px;
}

.permission-role-empty {
  padding: 12px 8px;
  color: var(--ink-muted);
  background: #f7fafb;
  border: 1px dashed #d7e2e7;
  border-radius: 8px;
  font-size: 9px;
  text-align: center;
}

.role-member-add {
  justify-content: center;
  margin-top: auto;
}

.sales-hub-head p {
  max-width: 920px;
}

.sales-hub-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.sales-hub-overview > div {
  display: grid;
  min-height: 118px;
  align-content: center;
  gap: 6px;
  padding: 17px 19px;
  background:
    linear-gradient(145deg, rgba(15, 104, 110, 0.05), rgba(255, 255, 255, 0.98) 58%),
    #fff;
  border: 1px solid #d9e5e8;
  border-radius: 13px;
}

.sales-hub-overview span {
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 650;
}

.sales-hub-overview strong {
  color: var(--ink);
  font-size: 27px;
  line-height: 1;
}

.sales-hub-overview strong small {
  margin-left: 4px;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 600;
}

.sales-hub-overview em {
  color: var(--ink-muted);
  font-size: 10px;
  font-style: normal;
}

.sales-hub-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 16px;
  overflow: hidden;
  background: #d7e2e6;
  border: 1px solid #d7e2e6;
  border-radius: 12px;
}

.sales-hub-tabs button {
  display: grid;
  min-height: 78px;
  align-content: center;
  gap: 4px;
  padding: 12px 11px;
  color: var(--ink-soft);
  background: #fff;
  border: 0;
  cursor: pointer;
  text-align: left;
}

.sales-hub-tabs button:first-child {
  border-radius: 11px 0 0 11px;
}

.sales-hub-tabs button:last-child {
  border-radius: 0 11px 11px 0;
}

.sales-hub-tabs button strong {
  color: var(--ink);
  font-size: 13px;
}

.sales-hub-tabs button span {
  font-size: 9px;
  line-height: 1.45;
}

.sales-hub-tabs button.active {
  color: #fff;
  background: linear-gradient(145deg, #123d4b, #176b70);
  box-shadow: inset 0 -3px 0 #f68a56;
}

.sales-hub-tabs button.active strong,
.sales-hub-tabs button.active span {
  color: #fff;
}

.sales-hub-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 16px;
  margin-bottom: 16px;
}

.sales-funnel {
  display: grid;
  gap: 9px;
  padding: 16px 18px 19px;
}

.sales-funnel-stage {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 12px;
}

.sales-funnel-stage > span {
  color: var(--ink-muted);
  font-size: 9px;
  font-weight: 700;
}

.sales-funnel-stage > div {
  position: relative;
  display: flex;
  min-height: 36px;
  align-items: center;
  overflow: hidden;
  padding: 0 12px;
  background: #f2f6f7;
  border-radius: 8px;
}

.sales-funnel-stage > div strong {
  position: relative;
  z-index: 1;
  font-size: 11px;
}

.sales-funnel-stage > div em {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, rgba(22, 120, 118, 0.24), rgba(85, 174, 153, 0.08));
  border-right: 2px solid #2a8e85;
}

.sales-funnel-stage > b {
  color: var(--ink);
  font-size: 16px;
  text-align: right;
}

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

.sales-source-grid > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 8px;
  padding: 10px;
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.sales-source-grid span {
  color: var(--ink-soft);
  font-size: 10px;
}

.sales-source-grid strong {
  color: var(--ink);
  font-size: 17px;
}

.sales-source-grid small {
  grid-column: 1 / -1;
  color: var(--ink-muted);
  font-size: 8px;
}

.sales-hub-form-intro {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 16px;
  overflow: hidden;
  background: #d6e3e7;
  border: 1px solid #d6e3e7;
  border-radius: 10px;
}

.sales-hub-form-intro > div {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 3px 9px;
  padding: 12px 14px;
  background: #f7fafb;
}

.sales-hub-form-intro > div > span {
  grid-row: 1 / 3;
  color: #377d79;
  font-size: 10px;
  font-weight: 750;
}

.sales-hub-form-intro strong {
  color: var(--ink);
  font-size: 11px;
}

.sales-hub-form-intro small {
  color: var(--ink-muted);
  font-size: 9px;
  line-height: 1.5;
}

.sales-agreement-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 14px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.sales-agreement-panel > div {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  background: #f8fafb;
}

.sales-agreement-panel span,
.sales-agreement-panel small {
  color: var(--ink-muted);
  font-size: 9px;
}

.sales-agreement-panel strong {
  color: var(--ink);
  font-size: 13px;
}

.sales-agreement-terms {
  margin-bottom: 14px;
  padding: 15px 16px;
  color: var(--ink-soft);
  background: #fffaf3;
  border: 1px solid #f0dfc4;
  border-radius: 10px;
}

.sales-agreement-terms strong {
  color: var(--ink);
  font-size: 12px;
}

.sales-agreement-terms p {
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.8;
}

.sales-agreement-consent {
  margin-top: 12px;
  padding: 12px 14px;
  background: #f3f9f7;
  border: 1px solid #d5e9e2;
  border-radius: 9px;
}

.sales-pdi-checks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-top: 7px;
}

.sales-pdi-checks .form-check {
  min-height: 38px;
  padding: 8px 10px;
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.sales-quote-floor {
  display: flex;
  min-height: 42px;
  align-items: center;
  padding: 8px 11px;
  color: #14655e;
  background: #eff8f5;
  border: 1px solid #cfe6df;
  border-radius: 8px;
  font-size: 15px;
}

.quote-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 15px;
}

.quote-card {
  display: grid;
  gap: 12px;
  padding: 15px;
  background: linear-gradient(145deg, #fff, #f7fafb);
  border: 1px solid #d9e3e7;
  border-radius: 12px;
}

.quote-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.quote-card-head > div {
  display: grid;
  gap: 3px;
}

.quote-card-head span,
.quote-card-head small,
.quote-card-foot > span {
  color: var(--ink-muted);
  font-size: 9px;
}

.quote-card-head strong {
  color: var(--ink);
  font-size: 16px;
}

.quote-card-head em {
  flex: 0 0 auto;
  font-style: normal;
}

.quote-price-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.quote-price-band > div {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  background: #fff;
}

.quote-price-band span {
  color: var(--ink-muted);
  font-size: 8px;
}

.quote-price-band strong {
  color: var(--ink);
  font-size: 12px;
}

.quote-plan-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.quote-plan-strip > span {
  display: grid;
  align-content: start;
  gap: 4px;
  min-height: 67px;
  padding: 9px;
  background: #f1f7f6;
  border: 1px solid #d7e8e3;
  border-radius: 8px;
}

.quote-plan-strip b {
  color: #176b69;
  font-size: 10px;
}

.quote-plan-strip small {
  color: var(--ink-soft);
  font-size: 8.5px;
  line-height: 1.45;
}

.quote-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

@media (max-width: 1366px) {
  .renewal-filter-panel,
  .renewal-keyword-matches,
  .renewal-keyword-matches > .table-responsive,
  #insuranceCustomerSearchResults {
    min-width: 0;
    max-width: 100%;
  }

  .insurance-customer-search-table,
  .insurance-customer-search-table tbody {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .insurance-customer-search-table thead {
    display: none;
  }

  .insurance-customer-search-table tbody {
    display: grid;
    gap: 11px;
  }

  .insurance-customer-search-table tr {
    display: grid;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #dce7e4;
    border-radius: 12px;
  }

  .insurance-customer-search-table td {
    display: block;
    min-width: 0;
    max-width: 100%;
    padding: 10px 13px;
    overflow-wrap: anywhere;
    border: 0;
    border-bottom: 1px dashed #e5ecea;
    text-align: left !important;
  }

  .insurance-customer-search-table td:nth-child(1),
  .insurance-customer-search-table td:nth-child(9) {
    grid-column: 1 / -1;
  }

  .insurance-customer-search-table td:nth-child(1) {
    background: linear-gradient(135deg, #f2faf7, #fbfdfc);
    border-bottom-style: solid;
  }

  .insurance-customer-search-table td:nth-child(9) {
    border-top: 1px solid #dbe8e4;
    border-bottom: 0;
    background: #f8fbfa;
  }

  .insurance-customer-search-table td::before {
    display: block;
    margin-bottom: 5px;
    color: #738a91;
    font-size: 8px;
    font-weight: 700;
    content: "";
  }

  .insurance-customer-search-table td:nth-child(1)::before { content: "客户 / 车辆"; }
  .insurance-customer-search-table td:nth-child(2)::before { content: "动力类型"; }
  .insurance-customer-search-table td:nth-child(3)::before { content: "保险公司"; }
  .insurance-customer-search-table td:nth-child(4)::before { content: "最新报价"; }
  .insurance-customer-search-table td:nth-child(5)::before { content: "保费拆分"; }
  .insurance-customer-search-table td:nth-child(6)::before { content: "保单到期"; }
  .insurance-customer-search-table td:nth-child(7)::before { content: "保险记录"; }
  .insurance-customer-search-table td:nth-child(8)::before { content: "客户状态"; }
  .insurance-customer-search-table td:nth-child(9)::before { content: "操作"; }

  .insurance-customer-search-table td:nth-child(9) .inline-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .insurance-customer-search-table td:nth-child(9) .button {
    min-width: 0;
    min-height: 38px;
    flex: 1 1 150px;
    white-space: normal;
  }
}

@media (max-width: 1180px) {
  .sales-hub-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sales-hub-tabs button:nth-child(n) {
    border-radius: 0;
  }

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

  .sales-pdi-checks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .sales-hub-grid {
    grid-template-columns: 1fr;
  }

  .sales-hub-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .sales-hub-overview {
    grid-template-columns: 1fr;
  }

  .sales-hub-tabs {
    grid-template-columns: 1fr;
  }

  .sales-hub-tabs button {
    min-height: 64px;
  }

  .sales-hub-form-intro,
  .sales-agreement-panel,
  .quote-price-band,
  .quote-plan-strip {
    grid-template-columns: 1fr;
  }

  .sales-source-grid,
  .sales-pdi-checks {
    grid-template-columns: 1fr;
  }

  .quote-card-foot {
    align-items: stretch;
    flex-direction: column;
  }

  .quote-card-foot .inline-actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 1180px) {
  .permission-role-roster {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .permission-roster-summary,
  .permission-role-roster {
    grid-template-columns: 1fr;
  }

  .permission-roster-summary {
    padding-right: 10px;
    padding-left: 10px;
  }

  .permission-roster-summary > div {
    border-radius: 9px;
  }

  .permission-store-people-panel > .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .permission-store-people-panel > .toolbar .toolbar-right,
  .permission-store-people-panel > .toolbar .toolbar-right .button {
    width: 100%;
  }

  .permission-filter-row,
  .operator-directory-filters {
    align-items: stretch;
    flex-direction: column;
    padding-right: 10px;
    padding-left: 10px;
  }

  .permission-filter-row input,
  .operator-directory-filters input,
  .operator-directory-filters select {
    width: 100%;
  }

  .permission-role-roster {
    padding-right: 10px;
    padding-left: 10px;
  }
}

.accident-overdue-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 15px 18px;
  color: #8f1f1a;
  background: linear-gradient(135deg, #fff0ee, #fff7f5);
  border: 2px solid #e58e84;
  border-radius: 13px;
}

.accident-overdue-banner > div {
  display: grid;
  gap: 4px;
}

.accident-overdue-banner strong {
  font-size: 16px;
}

.accident-overdue-banner span {
  color: #7e4d49;
  font-size: 10px;
}

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

.accident-source-card {
  display: grid;
  gap: 5px;
  min-height: 94px;
  align-content: center;
  padding: 15px 17px;
  color: #fff;
  background: linear-gradient(145deg, #183d4d, #276779);
  border-radius: 12px;
}

.accident-source-insurer_push { background: linear-gradient(145deg, #24518c, #3677ba); }
.accident-source-broker_referral { background: linear-gradient(145deg, #8c5e24, #c58a39); }
.accident-source-existing_customer_internal { background: linear-gradient(145deg, #17624f, #2a9676); }

.accident-source-card span {
  font-size: 10px;
  font-weight: 700;
}

.accident-source-card strong {
  font-size: 25px;
}

.accident-source-card small {
  margin-left: 4px;
  font-size: 9px;
}

.accident-batch-panel {
  margin-bottom: 14px;
}

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

.accident-batch-grid > div {
  display: grid;
  gap: 4px;
  padding: 11px;
  border-radius: 9px;
  border: 1px solid var(--line);
}

.accident-batch-grid > div.complete {
  color: #075f4c;
  background: #ecf8f3;
  border-color: #9fd7c6;
}

.accident-batch-grid > div.pending {
  color: #8b5f1f;
  background: #fff8e8;
  border-color: #ecd5a1;
}

.accident-batch-grid strong { font-size: 11px; }
.accident-batch-grid span { font-size: 10px; font-weight: 700; }
.accident-batch-grid small { font-size: 8px; line-height: 1.45; }

.accident-comparison-panel {
  margin-bottom: 14px;
  overflow: hidden;
}

.accident-analysis-toolbar {
  align-items: flex-start;
}

.accident-analysis-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.accident-analysis-filters label {
  display: grid;
  gap: 4px;
  color: var(--ink-muted);
  font-size: 9px;
  font-weight: 700;
}

.accident-analysis-filters select {
  min-height: 34px;
  min-width: 94px;
  padding: 0 9px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cad9df;
  border-radius: 8px;
  font-size: 10px;
}

.accident-comparison-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 0 16px 14px;
}

.accident-comparison-kpis .simple-stat {
  min-height: 106px;
  padding: 14px 15px;
  background: linear-gradient(145deg, #f8fbfc, #eef5f7);
  border: 1px solid #dbe7eb;
  border-radius: 11px;
}

.accident-comparison-kpis .simple-stat > span {
  color: #526872;
  font-size: 10px;
  font-weight: 700;
}

.accident-comparison-kpis .simple-stat > strong {
  margin-top: 7px;
  font-size: 27px;
  line-height: 1;
}

.accident-comparison-kpis .simple-stat > small {
  margin-top: 7px;
  color: var(--ink-muted);
  font-size: 9px;
  line-height: 1.5;
}

.accident-comparison-kpis .simple-stat > small b {
  font-size: inherit;
}

.accident-comparison-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin: 0 16px 10px;
  padding: 9px 11px;
  color: var(--ink-muted);
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 9px;
}

.accident-comparison-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.accident-comparison-legend i {
  display: inline-block;
  width: 18px;
  height: 6px;
  border-radius: 99px;
}

.accident-comparison-legend span:last-child {
  margin-left: auto;
}

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

.accident-chart-card,
.accident-person-panel {
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.accident-chart-card {
  padding: 13px;
}

.accident-chart-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 11px;
  padding-bottom: 8px;
  border-bottom: 1px solid #edf2f4;
}

.accident-chart-title strong {
  color: var(--ink);
  font-size: 12px;
}

.accident-chart-title span {
  color: var(--ink-muted);
  font-size: 9px;
}

.accident-chart-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 70px;
  align-items: center;
  gap: 8px;
  min-height: 38px;
}

.accident-chart-row > strong {
  overflow: hidden;
  color: #40545d;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.accident-comparison-lines {
  display: grid;
  gap: 3px;
}

.accident-comparison-lines > span {
  display: block;
  height: 7px;
  overflow: hidden;
  background: #edf2f4;
  border-radius: 99px;
}

.accident-bar-previous,
.accident-bar-current {
  display: block;
  height: 100%;
  border-radius: 99px;
}

.accident-bar-previous {
  background: linear-gradient(90deg, #9fb0b7, #c5d0d4);
}

.accident-bar-current {
  background: linear-gradient(90deg, #0d8a76, #45b79f);
}

.accident-chart-row > small {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  color: var(--ink-muted);
  font-size: 8px;
  text-align: right;
}

.accident-chart-row > small b:last-child {
  color: var(--brand-dark);
}

.accident-chart-empty {
  display: grid;
  min-height: 92px;
  place-items: center;
  color: var(--ink-muted);
  font-size: 10px;
}

.accident-insurer-analysis-table {
  margin: 0 16px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.accident-insurer-analysis-table .data-table {
  min-width: 900px;
}

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

.accident-person-panel .panel-header {
  padding: 12px 13px 8px;
  border-bottom: 1px solid var(--line);
}

.accident-person-panel .data-table {
  min-width: 510px;
}

.accident-operation-kpis {
  margin-bottom: 14px;
}

.accident-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.accident-filters select,
.accident-filters input {
  min-height: 36px;
  padding: 0 9px;
  background: #fff;
  border: 1px solid #cad9df;
  border-radius: 8px;
  font-size: 10px;
}

.accident-filters input {
  min-width: 190px;
}

.accident-table td {
  vertical-align: top;
}

.accident-table td > strong,
.accident-table td > span,
.accident-table td > small {
  display: block;
}

.accident-table td > span,
.accident-table td > small {
  margin-top: 3px;
  color: var(--ink-muted);
  font-size: 9px;
}

.accident-customer-link {
  display: grid;
  gap: 2px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  text-align: left;
}

.accident-customer-link strong {
  color: var(--brand-dark);
  font-size: 12px;
}

.accident-customer-link span,
.accident-customer-link small {
  color: var(--ink-muted);
  font-size: 9px;
}

.accident-callback-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  color: #823a20;
  background: #fff7e9;
  border: 1px solid #e7c892;
  border-radius: 10px;
}

.accident-callback-alert > div {
  display: grid;
  gap: 3px;
}

.accident-callback-alert span {
  font-size: 9px;
}

.accident-capture-intro {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 16px;
  overflow: hidden;
  background: #d9e5e4;
  border: 1px solid #d9e5e4;
  border-radius: 10px;
}

.accident-capture-intro > div {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  background: #f5faf8;
}

.accident-capture-intro strong {
  color: var(--ink);
  font-size: 11px;
}

.accident-capture-intro span {
  color: var(--ink-muted);
  font-size: 9px;
  line-height: 1.5;
}

.accident-capture-image-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  background: #f3f9fd;
  border: 1px dashed #bad2df;
  border-radius: 10px;
  transition: border-color 140ms ease, background 140ms ease;
}

.accident-capture-image-panel.is-dragging {
  background: #eaf6fb;
  border-color: #4e92b0;
}

.accident-capture-image-copy {
  display: flex;
  align-items: center;
  gap: 10px;
}

.accident-capture-image-copy > span {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  color: #2f7795;
  background: #e5f2f7;
  border-radius: 8px;
}

.accident-capture-image-copy > div {
  display: grid;
  gap: 3px;
}

.accident-capture-image-copy strong {
  color: var(--ink);
  font-size: 11px;
}

.accident-capture-image-copy small {
  color: var(--ink-muted);
  font-size: 9px;
}

.accident-capture-image-copy small.is-warning {
  color: #9b651b;
}

.accident-capture-image-status {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: #28615a;
  background: #effaf6;
  border: 1px solid #cde8df;
  border-radius: 8px;
}

.accident-capture-image-status[hidden] {
  display: none;
}

.accident-capture-image-status.is-error {
  color: #9d4035;
  background: #fff1ef;
  border-color: #ebc6bf;
}

.accident-capture-image-status > div {
  display: grid;
  gap: 2px;
}

.accident-capture-image-status strong {
  font-size: 10px;
}

.accident-capture-image-status small {
  color: var(--ink-muted);
  font-size: 9px;
}

.accident-ocr-config {
  width: 100%;
  padding-top: 12px;
  border-top: 1px solid #d7e7ec;
}

.accident-capture-result {
  display: grid;
  gap: 13px;
  margin-top: 17px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.accident-capture-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  background: #f3faf8;
  border: 1px solid #d6e9e3;
  border-radius: 10px;
}

.accident-capture-result-head > div {
  display: grid;
  gap: 3px;
}

.accident-capture-result-head span,
.accident-capture-result-head small {
  color: var(--ink-muted);
  font-size: 9px;
}

.accident-capture-result-head strong {
  color: var(--ink);
  font-size: 14px;
}

.accident-capture-warnings {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 10px 12px;
  background: #fff9ed;
  border: 1px solid #ead6ad;
  border-radius: 9px;
}

.accident-capture-warnings span {
  padding: 4px 7px;
  color: #8c5d1d;
  background: #fff;
  border: 1px solid #ecd9b6;
  border-radius: 99px;
  font-size: 9px;
}

.accident-capture-duplicate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  color: #8f3c2b;
  background: #fff2ef;
  border: 1px solid #eac3ba;
  border-radius: 10px;
}

.accident-capture-duplicate > div:first-child {
  display: grid;
  gap: 3px;
}

.accident-capture-duplicate strong {
  font-size: 12px;
}

.accident-capture-duplicate span {
  color: #a86b5f;
  font-size: 9px;
}

.accident-contact-methods {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  background: #f7fafb;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.accident-contact-methods .form-check {
  display: flex;
  min-width: 0;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #d8e2e6;
  border-radius: 9px;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.accident-contact-methods .form-check:hover {
  background: #f3f9f8;
  border-color: #a9cbc2;
}

.accident-contact-methods .form-check:has(.form-check-input:checked) {
  color: #125f57;
  background: #edf9f6;
  border-color: #76b9aa;
  box-shadow: inset 0 0 0 1px rgba(38, 134, 116, 0.12);
}

.accident-contact-methods .form-check-input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  flex: 0 0 18px;
  accent-color: #178a7b;
}

.accident-contact-methods .form-check-label {
  min-width: 0;
  color: inherit;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.button.accident-capture-entry-button {
  color: #fff;
  background: linear-gradient(135deg, #159a7f, #0b7064);
  border-color: #09685d;
  box-shadow: 0 7px 16px rgba(10, 111, 98, 0.2);
  font-weight: 750;
}

.button.accident-capture-entry-button:hover {
  color: #fff;
  background: linear-gradient(135deg, #0f8b74, #075e55);
  border-color: #07564e;
  box-shadow: 0 9px 20px rgba(8, 96, 85, 0.26);
}

.button.accident-capture-entry-button:focus-visible {
  outline: 3px solid rgba(21, 154, 127, 0.28);
  outline-offset: 2px;
}

.accident-detail-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 17px;
  color: #fff;
  background: linear-gradient(145deg, #102f41, #245669);
  border-radius: 12px;
}

.accident-detail-hero > div {
  display: grid;
  gap: 4px;
}

.accident-detail-hero span,
.accident-detail-hero small {
  color: #bed3dc;
  font-size: 9px;
}

.accident-detail-contact {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px 12px;
  margin-top: 5px;
}

.accident-detail-phone {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  color: #fff;
  font: inherit;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 11px;
  text-decoration: none;
}

.accident-detail-phone > span {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  color: #81e1cb;
}

.accident-detail-phone svg {
  width: 19px;
  height: 19px;
  stroke-width: 2;
}

.accident-detail-phone strong {
  color: #fff;
  font-size: 21px;
  font-weight: 750;
  letter-spacing: 0.02em;
  line-height: 1.15;
}

.accident-detail-phone small {
  color: #bde9df;
  font-size: 9px;
  white-space: nowrap;
}

.accident-detail-phone:active {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(0.985);
}

.accident-detail-store,
.accident-detail-no-phone {
  font-size: 10px;
  line-height: 1.4;
}

.accident-detail-no-phone {
  padding: 6px 9px;
  color: #d9e5e9;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 7px;
}

.accident-detail-hero strong { font-size: 21px; }

.accident-detail-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  margin-top: 13px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.accident-detail-grid > div {
  display: grid;
  gap: 5px;
  min-height: 78px;
  align-content: center;
  padding: 11px;
  background: #fff;
}

.accident-detail-grid .span-all {
  grid-column: 1 / -1;
}

.accident-detail-grid span {
  color: var(--ink-muted);
  font-size: 8px;
}

.accident-detail-grid strong {
  color: var(--ink);
  font-size: 10px;
  line-height: 1.5;
}

.accident-history {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.accident-history > div {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  background: #f7fafb;
  border-left: 3px solid #2a947c;
  border-radius: 6px;
}

.accident-history span,
.accident-history small {
  color: var(--ink-muted);
  font-size: 8px;
}

.accident-history strong { font-size: 10px; }

.renewal-overview-grid {
  align-items: start;
}

.renewal-allocation-list {
  display: grid;
  gap: 11px;
  padding: 14px;
}

.renewal-allocation-row {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) 58px;
  align-items: center;
  gap: 8px;
}

.renewal-allocation-row strong { font-size: 10px; }
.renewal-allocation-row span { color: var(--ink-muted); font-size: 9px; }
.renewal-allocation-row em { color: var(--ink); font-size: 10px; font-style: normal; text-align: right; }

.renewal-allocation-row > small {
  grid-column: 1 / -1;
  color: var(--ink-muted);
  font-size: 8px;
}

.renewal-allocation-row > div {
  grid-column: 1 / -1;
  height: 6px;
  overflow: hidden;
  background: #e8eff2;
  border-radius: 99px;
}

.renewal-allocation-list i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #2a947c, #69c5aa);
}

.renewal-allocation-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 13px 0;
}

.renewal-allocation-editor > div {
  display: grid;
  grid-template-columns: 70px repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 6px;
  padding: 10px;
  background: #f7fafb;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.renewal-allocation-editor strong { font-size: 10px; }
.renewal-allocation-editor label { display: grid; gap: 3px; color: var(--ink-muted); font-size: 8px; }
.renewal-allocation-editor input { min-height: 32px; padding: 0 6px; border: 1px solid #cad9df; border-radius: 6px; font-size: 9px; }

.renewal-filter-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.renewal-date-scope-note {
  margin: 10px 2px 0;
  color: var(--ink-muted);
  font-size: 9px;
  line-height: 1.65;
}

.renewal-date-scope-note strong {
  color: #2d625a;
}

.renewal-query-workbench {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.renewal-date-query-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 2px solid #c9d9de;
  border-top-width: 5px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(26, 55, 64, 0.05);
}

.renewal-date-query-card.expiry {
  border-color: #63ad9b;
  background: linear-gradient(145deg, #dff3eb, #eff9f5);
  box-shadow: 0 10px 24px rgba(28, 123, 104, 0.12);
}

.renewal-date-query-card.deal {
  border-color: #dc7162;
  background: linear-gradient(145deg, #fde1db, #fff1ed);
  box-shadow: 0 10px 24px rgba(190, 63, 50, 0.12);
}

.renewal-date-query-heading {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.renewal-date-query-heading h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
}

.renewal-date-query-card.expiry .renewal-date-query-heading h3 {
  color: #135f4f;
}

.renewal-date-query-card.deal .renewal-date-query-heading h3 {
  color: #a63228;
}

.renewal-date-query-heading p {
  margin: 4px 0 0;
  color: #667985;
  font-size: 10px;
  line-height: 1.55;
}

.renewal-query-badge {
  flex: 0 0 auto;
  padding: 4px 7px;
  color: #176b59;
  background: #dff4ed;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
}

.renewal-date-query-card.deal .renewal-query-badge {
  color: #a63f35;
  background: #fde5df;
}

.renewal-date-query-card.expiry .renewal-query-badge {
  color: #fff;
  background: #1c7b68;
}

.renewal-date-query-card.deal .renewal-query-badge {
  color: #fff;
  background: #c4473b;
}

.renewal-date-query-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  align-items: end;
}

.renewal-date-query-card.deal .renewal-date-query-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(150px, 1.1fr);
}

.renewal-date-query-fields label {
  display: grid;
  gap: 5px;
  color: var(--ink-muted);
  font-size: 9px;
  font-weight: 600;
}

.renewal-date-query-card.expiry .renewal-date-query-fields label {
  color: #24695b;
}

.renewal-date-query-card.deal .renewal-date-query-fields label {
  color: #91483f;
}

.renewal-date-query-fields input,
.renewal-date-query-fields select {
  width: 100%;
  min-height: 38px;
  padding: 0 9px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cbd9df;
  border-radius: 7px;
  font: inherit;
  font-size: 10px;
}

.renewal-query-caliber-note {
  align-self: stretch;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  color: #7a5a52;
  background: rgba(255, 255, 255, 0.7);
  border: 1px dashed #e4bdb4;
  border-radius: 7px;
  font-size: 9px;
  line-height: 1.5;
}

.renewal-date-query-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.renewal-date-query-footer > span {
  color: #71818a;
  font-size: 9px;
}

.renewal-date-query-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.renewal-query-clear.button {
  min-width: 82px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid #b7c9ce;
  box-shadow: none;
  font-weight: 700;
}

.renewal-query-clear.expiry.button {
  color: #176b59;
  border-color: #86bcae;
}

.renewal-query-clear.deal.button {
  color: #a63f35;
  border-color: #dfa096;
}

.renewal-query-clear.button:hover {
  background: #fff;
}

.renewal-expiry-query.button,
.renewal-deal-query.button {
  min-width: 138px;
  color: #fff;
  border: 0;
  font-weight: 700;
}

.renewal-expiry-query.button {
  background: #1c7b68;
  box-shadow: 0 7px 15px rgba(28, 123, 104, 0.2);
}

.renewal-deal-query.button {
  background: var(--red);
  box-shadow: 0 7px 15px rgba(209, 72, 72, 0.2);
}

.renewal-expiry-query.button:hover,
.renewal-deal-query.button:hover {
  color: #fff;
  filter: brightness(0.94);
}

.renewal-common-filters {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: #f7fafb;
  border: 1px solid #dbe6e9;
  border-radius: 10px;
}

.renewal-common-filter-heading {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.renewal-common-filter-heading strong {
  color: #38545c;
  font-size: 11px;
}

.renewal-common-filter-heading span {
  color: #74868d;
  font-size: 9px;
}

.renewal-filter-grid.renewal-common-filter-grid {
  grid-template-columns: repeat(6, minmax(120px, 1fr));
}

.renewal-deal-evidence-panel {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #d8e5e2;
  border-radius: 10px;
  background: #f8fcfb;
}

.renewal-filter-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(108px, 1fr)) minmax(190px, 1.7fr);
  gap: 9px;
  align-items: end;
}

.renewal-filter-actions {
  display: flex;
  min-width: 0;
  align-items: flex-end;
  justify-content: flex-end;
}

.renewal-filter-query.button {
  width: 100%;
  min-width: 108px;
  color: #fff;
  background: var(--red);
  border-color: var(--red);
  font-weight: 600;
  box-shadow: 0 7px 15px rgba(209, 72, 72, 0.2);
}

.renewal-filter-query.button:hover {
  color: #fff;
  background: #bd3838;
  border-color: #bd3838;
}

.renewal-query-results {
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e7caca;
  border-top: 3px solid var(--red);
  border-radius: 11px;
  box-shadow: 0 8px 22px rgba(132, 45, 45, 0.08);
}

.renewal-expiry-query-results {
  border: 2px solid #73bdaa;
  border-top: 5px solid #1c7b68;
  box-shadow: 0 10px 26px rgba(28, 123, 104, 0.13);
}

.renewal-query-results.renewal-expiry-query-results .toolbar {
  background: #dff3eb;
  border-bottom: 1px solid #b6dbd1;
}

.renewal-deal-query-results {
  border: 2px solid #e18a7d;
  border-top: 5px solid var(--red);
  box-shadow: 0 10px 26px rgba(190, 63, 50, 0.12);
}

.renewal-query-results.renewal-deal-query-results .toolbar {
  background: #fde1db;
  border-bottom: 1px solid #efbcb3;
}

.renewal-expiry-query-results .renewal-query-result-table th {
  background: #edf8f4;
}

.renewal-deal-query-results .renewal-query-result-table th {
  background: #fff0ec;
}

.renewal-query-results .toolbar {
  background: #fffafa;
}

.renewal-query-results .toolbar-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}

.renewal-query-results .toolbar-subtitle {
  margin-top: 4px;
  color: #5f6b7b;
  font-size: 11.5px;
  line-height: 1.55;
}

.renewal-query-results .table-responsive {
  max-height: 430px;
  overflow: auto;
}

.renewal-query-results .renewal-query-result-table {
  min-width: 1120px;
  font-size: 13px;
}

.renewal-query-results .renewal-query-result-table th {
  padding: 12px 14px;
  color: #5f6b7b;
  font-size: 11px;
  font-weight: 600;
}

.renewal-query-results .renewal-query-result-table td {
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.55;
  vertical-align: top;
}

.renewal-query-results .renewal-query-result-table td small {
  display: block;
  margin-top: 3px;
  color: #718092;
  font-size: 10.5px;
  line-height: 1.5;
}

.renewal-query-results .status {
  font-size: 10px;
}

.renewal-expiry-detail-dialog {
  display: grid;
  gap: 16px;
}

.renewal-expiry-detail-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.renewal-expiry-detail-summary > div {
  display: grid;
  min-height: 82px;
  align-content: center;
  gap: 7px;
  padding: 14px 16px;
  background: linear-gradient(145deg, #f2faf7, #fbfdfc);
  border: 1px solid #cfe5df;
  border-radius: 10px;
}

.renewal-expiry-detail-summary span {
  color: #637c77;
  font-size: 11px;
  font-weight: 600;
}

.renewal-expiry-detail-summary strong {
  color: #17493f;
  font-size: 17px;
  line-height: 1.35;
}

.renewal-expiry-detail-summary strong small {
  margin: 0 5px;
  color: #75908a;
  font-size: 11px;
  font-weight: 500;
}

.renewal-expiry-detail-caption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 0 2px;
}

.renewal-expiry-detail-caption strong {
  color: #183f39;
  font-size: 16px;
}

.renewal-expiry-detail-caption span {
  color: #6c7d84;
  font-size: 11px;
  line-height: 1.55;
  text-align: right;
}

.renewal-expiry-detail-table {
  max-height: min(61vh, 660px);
  overflow: auto;
  border: 1px solid #d5e5e1;
  border-radius: 10px;
}

.renewal-expiry-detail-table .renewal-query-result-table {
  min-width: 1120px;
  font-size: 13px;
}

.renewal-expiry-detail-table .renewal-query-result-table th {
  padding: 12px 14px;
  color: #5f6b7b;
  font-size: 11px;
  font-weight: 600;
}

.renewal-expiry-detail-table .renewal-query-result-table td {
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.55;
  vertical-align: top;
  background: #fff;
}

.renewal-expiry-detail-table .renewal-query-result-table td small {
  display: block;
  margin-top: 3px;
  color: #718092;
  font-size: 10.5px;
  line-height: 1.5;
}

.renewal-expiry-detail-table .status {
  font-size: 10px;
}

.renewal-expiry-detail-table .renewal-query-result-table th {
  position: sticky;
  z-index: 2;
  top: 0;
  background: #eaf6f2;
  box-shadow: inset 0 -1px 0 #bedbd3;
}

.renewal-expiry-detail-table .renewal-query-result-table tr:hover td {
  background: #f5fbf9;
}

.renewal-filter-grid label {
  display: grid;
  gap: 5px;
  color: var(--ink-muted);
  font-size: 9px;
  font-weight: 600;
}

.renewal-filter-grid input,
.renewal-filter-grid select {
  width: 100%;
  min-height: 36px;
  padding: 0 9px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cbd9df;
  border-radius: 7px;
  font: inherit;
  font-size: 10px;
}

.renewal-smart-keyword {
  display: grid;
  grid-column: 1 / -1;
  gap: 6px;
  padding: 15px;
  background:
    linear-gradient(135deg, rgba(230, 247, 241, 0.95), rgba(245, 250, 249, 0.9));
  border: 1px solid #b9dcd2;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(17, 112, 94, 0.08);
}

.renewal-smart-keyword > label {
  color: #1f5d52;
  font-size: 12px;
  font-weight: 700;
}

.renewal-smart-keyword-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px 7px 11px;
  background: #fff;
  border: 1px solid #a9cec5;
  border-radius: 9px;
  min-height: 48px;
}

.renewal-smart-keyword-box:focus-within {
  border-color: #298d7b;
  box-shadow: 0 0 0 4px rgba(21, 134, 111, 0.08);
}

.renewal-smart-keyword-box > svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: #21836f;
}

.renewal-smart-keyword-box > input {
  min-width: 0;
  min-height: 34px;
  flex: 1;
  padding: 0;
  border: 0;
  outline: 0;
  box-shadow: none;
}

.renewal-smart-keyword > small {
  color: #6e858c;
  font-size: 8px;
  line-height: 1.5;
}

.renewal-customer-dimension-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(118px, 1fr));
  gap: 9px;
}

.renewal-customer-dimension-grid label {
  display: grid;
  gap: 5px;
  color: #35655c;
  font-size: 9px;
  font-weight: 650;
}

.renewal-customer-dimension-grid input,
.renewal-customer-dimension-grid select {
  width: 100%;
  min-height: 36px;
  padding: 0 9px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #b8d8d0;
  border-radius: 7px;
  font: inherit;
  font-size: 10px;
}

.renewal-keyword-matches {
  padding: 2px 0 0;
}

.renewal-keyword-matches .toolbar {
  margin-bottom: 7px;
}

.renewal-keyword-matches .insurance-customer-search-empty {
  min-height: 52px;
}

.renewal-store-base-panel {
  overflow: hidden;
}

.renewal-base-query {
  display: grid;
  grid-template-columns: auto minmax(320px, 720px) minmax(180px, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #f5faf8;
  border-block: 1px solid #dcebe7;
}

.renewal-base-query > label {
  color: #234f48;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.renewal-base-query > small {
  color: #627b81;
  font-size: 9px;
  line-height: 1.5;
}

.renewal-base-query-box {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 4px 4px 4px 11px;
  background: #fff;
  border: 1px solid #a9ccc3;
  border-radius: 9px;
}

.renewal-base-query-box > svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: #21836f;
}

.renewal-base-query-box > input {
  min-width: 0;
  min-height: 34px;
  flex: 1;
  padding: 0;
  border: 0;
  outline: 0;
  box-shadow: none;
}

.renewal-store-base-table-wrap {
  padding: 0 16px 16px;
}

.renewal-store-base-table {
  min-width: 980px;
}

.renewal-store-base-table th {
  color: #617b82;
  font-size: 9px;
  white-space: nowrap;
}

.renewal-store-base-table td {
  font-size: 11px;
}

.renewal-store-base-table td > strong {
  color: #173b48;
  font-size: 12px;
}

.renewal-store-base-table td > small {
  display: block;
  margin-top: 2px;
  color: #758b91;
  font-size: 8px;
}

.renewal-store-base-table .renewal-store-base-total {
  background: #eef7f4;
}

.renewal-store-base-table tr.is-active {
  background: #eef8f5;
  box-shadow: inset 3px 0 #21836f;
}

.renewal-alert {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  color: #6c4a12;
  background: #fff8e8;
  border: 1px solid #f0d99d;
  border-radius: 8px;
}

.renewal-alert.danger {
  color: #842c24;
  background: #fff1ef;
  border-color: #f0b8b0;
}

.renewal-alert.success {
  color: #1f6c57;
  background: #edf9f4;
  border-color: #b7dfd0;
}

.renewal-alert span { font-size: 9px; }

.renewal-expiry-reminders {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.renewal-expiry-reminders button {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 10px;
  min-height: 72px;
  padding: 11px 13px;
  text-align: left;
  background: #fff;
  border: 1px solid #dce5e8;
  border-radius: 9px;
  cursor: pointer;
}

.renewal-expiry-reminders button span {
  font-size: 10px;
  font-weight: 700;
}

.renewal-expiry-reminders button strong {
  grid-row: 1 / 3;
  grid-column: 2;
  font-size: 24px;
  line-height: 1;
}

.renewal-expiry-reminders button small {
  color: var(--ink-muted);
  font-size: 8px;
}

.renewal-expiry-reminders .expiry-7 {
  color: #9d2e24;
  background: #fff3f1;
  border-color: #efb8ae;
}

.renewal-expiry-reminders .expiry-15 {
  color: #a36213;
  background: #fff8ea;
  border-color: #efd19a;
}

.renewal-expiry-reminders .expiry-30 {
  color: #24627b;
  background: #eff8fb;
  border-color: #bddde8;
}

.renewal-expiry-reminders .expiry-expired {
  color: #6e3b67;
  background: #fbf2fa;
  border-color: #ddbed8;
}

.renewal-expiry-reminders button.active {
  box-shadow: 0 0 0 2px currentColor inset;
}

.renewal-tabs {
  display: flex;
  gap: 5px;
  padding: 4px;
  overflow-x: auto;
  background: #eaf0f2;
  border-radius: 9px;
}

.renewal-tabs button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 15px;
  color: #526b77;
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}

.renewal-tabs button.active {
  color: #fff;
  background: #122f40;
  box-shadow: 0 3px 10px rgba(15, 46, 62, .18);
}

.renewal-tab-content,
.renewal-tab-content > section,
.renewal-tab-content > div {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

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

.renewal-state-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0 14px 14px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.renewal-state-grid > div {
  display: grid;
  gap: 6px;
  padding: 14px;
  background: #fbfcfc;
}

.renewal-state-grid span,
.renewal-forecast-list span,
.renewal-forecast-list em,
.renewal-battle-list span,
.renewal-battle-list strong {
  color: var(--ink-muted);
  font-size: 9px;
  font-style: normal;
}

.renewal-state-grid strong {
  color: var(--ink);
  font-size: 22px;
}

.renewal-forecast-list {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.renewal-forecast-list > div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  background: #f7fafb;
  border-left: 3px solid #2b8f79;
  border-radius: 7px;
}

.renewal-forecast-list em { color: #1f725f; }

.renewal-battle-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.renewal-battle-list > div {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) auto;
  gap: 5px 12px;
  align-items: center;
}

.renewal-battle-list i {
  grid-column: 1 / -1;
  height: 6px;
  overflow: hidden;
  background: #e8eff2;
  border-radius: 99px;
}

.renewal-battle-list b {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #c9684d, #e6ae67);
}

.renewal-battle-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
}

.renewal-battle-grid > div {
  display: grid;
  gap: 8px;
  padding: 14px;
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.renewal-battle-grid span { color: var(--ink-muted); font-size: 9px; }
.renewal-battle-grid strong { color: var(--ink); font-size: 20px; }

.renewal-escalated { background: #fff4f2 !important; }
.renewal-overdue { background: #fffaf0 !important; }

.renewal-task-table td:first-child,
.renewal-customer-table td:nth-child(4) {
  min-width: 92px;
}

.renewal-owner-column {
  min-width: 210px;
  white-space: normal;
}

.renewal-owner-cell {
  display: grid;
  min-width: 0;
  gap: 3px;
  align-content: center;
}

.renewal-owner-cell strong,
.renewal-owner-cell small {
  display: block;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.renewal-owner-cell strong {
  font-size: 12.5px;
  line-height: 1.35;
}

.renewal-owner-cell small {
  color: #526b77;
  font-size: 11.2px;
  font-weight: 600;
  line-height: 1.55;
}

.renewal-task-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr));
  gap: 14px;
  padding: 14px;
  background: #f5f9fa;
}

.renewal-task-card {
  display: grid;
  min-width: 0;
  gap: 14px;
  padding: 18px;
  background: #fff;
  border: 1px solid #dbe6e9;
  border-left: 5px solid #2b8f79;
  border-radius: 13px;
  box-shadow: 0 8px 22px rgba(16, 50, 66, 0.06);
}

.renewal-task-card.is-escalated {
  background: linear-gradient(135deg, #fff7f5, #fff);
  border-color: #efb8ae;
  border-left-color: #c64234;
}

.renewal-task-card.is-overdue {
  background: linear-gradient(135deg, #fffaf0, #fff);
  border-color: #efd7a8;
  border-left-color: #c17b18;
}

.renewal-task-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.renewal-task-card-head .status {
  min-height: 29px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
}

.renewal-task-card-expiry {
  color: #526b77;
  font-size: 12px;
  font-weight: 600;
  text-align: right;
}

.renewal-task-card-customer {
  display: grid;
  min-width: 0;
  gap: 5px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
}

.renewal-task-card-customer strong {
  font-size: 18px;
  line-height: 1.35;
}

.renewal-task-card-contact {
  color: #176f62;
  font-size: 14px;
  font-weight: 700;
}

.renewal-task-card-vehicle {
  color: #334f5a;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.renewal-task-card-customer small {
  color: #647b84;
  font-size: 12px;
  line-height: 1.5;
}

.renewal-task-card-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: #dfe9e7;
  border: 1px solid #dfe9e7;
  border-radius: 10px;
}

.renewal-task-card-metrics > div {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 4px;
  padding: 12px 13px;
  background: #f9fbfb;
}

.renewal-task-card-metrics span {
  color: #667d86;
  font-size: 11px;
  font-weight: 650;
}

.renewal-task-card-metrics strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.renewal-task-card-metrics small {
  color: #526b77;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.renewal-task-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid #e2eaec;
}

.renewal-task-card-actions .button {
  min-height: 40px;
  padding-right: 16px;
  padding-left: 16px;
  font-size: 12px;
}

@media (max-width: 760px) {
  .renewal-task-card-grid {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .renewal-task-card {
    padding: 15px;
  }

  .renewal-task-card-metrics {
    grid-template-columns: 1fr;
  }

  .renewal-task-card-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .renewal-task-card-actions .button {
    width: 100%;
  }
}

.renewal-period-value {
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-size: 16px !important;
}

.renewal-period-value small { font-size: 8px !important; }

.renewal-follow-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 14px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.renewal-follow-summary > div {
  display: grid;
  gap: 5px;
  padding: 12px;
  background: #f7fafb;
}

.renewal-follow-summary span { color: var(--ink-muted); font-size: 8px; }
.renewal-follow-summary strong { font-size: 11px; }

.renewal-customer-info-card {
  grid-template-columns: minmax(190px, 1.25fr) repeat(4, minmax(145px, 1fr));
}

.renewal-customer-info-card > div {
  align-content: start;
  padding: 18px 19px;
}

.renewal-customer-info-card small {
  overflow-wrap: anywhere;
}

.renewal-customer-info-card span {
  font-size: 12px;
}

.renewal-customer-info-card strong {
  font-size: 18px;
}

.renewal-customer-info-card small {
  font-size: 12px;
}

.renewal-customer-info-card strong.negative {
  color: #ffc0b8;
}

.renewal-detail-hero {
  padding: 20px 22px;
}

.renewal-detail-hero > div:first-child {
  min-width: 0;
}

.renewal-detail-hero span,
.renewal-detail-hero small {
  font-size: 12px;
  line-height: 1.5;
}

.renewal-detail-hero > div > strong {
  font-size: 24px;
}

.renewal-detail-hero .accident-detail-phone small {
  font-size: 12px;
}

.renewal-detail-hero .accident-detail-phone strong {
  font-size: 24px;
}

.renewal-detail-hero > div:first-child > small:last-child {
  overflow-wrap: anywhere;
}

.renewal-detail-hero .status {
  min-height: 28px;
  padding: 5px 10px;
  font-size: 11px;
}

.modal.wide-modal .renewal-detail-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 16px;
}

.modal.wide-modal .renewal-detail-grid > div {
  min-height: 92px;
  padding: 15px 17px;
}

.modal.wide-modal .renewal-detail-grid span {
  font-size: 11px;
}

.modal.wide-modal .renewal-detail-grid strong {
  font-size: 15px;
  line-height: 1.55;
}

.renewal-follow-presets {
  display: flex;
  gap: 7px;
  margin: 10px 0;
}

.renewal-coupon-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 75px 100px 34px;
  gap: 6px;
  margin-bottom: 7px;
}

.renewal-coupon-row input {
  width: 100%;
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid #cad9df;
  border-radius: 6px;
  font-size: 9px;
}

.renewal-profit-preview {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  background: #f2f7f5;
  border: 1px solid #d5e5df;
  border-radius: 8px;
}

.renewal-profit-preview > div {
  display: grid;
  gap: 5px;
}

.renewal-profit-preview span { color: var(--ink-muted); font-size: 8px; }
.renewal-profit-preview strong { color: var(--ink); font-size: 12px; }
.renewal-profit-preview .positive { color: #18745a; }
.renewal-profit-preview .negative { color: #b44134; }

.renewal-readonly-value {
  min-height: 36px;
  padding: 9px 10px;
  color: var(--ink);
  background: #eef4f5;
  border: 1px solid #d4e0e3;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
}

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

.renewal-settings-rates label {
  display: grid;
  gap: 5px;
  color: var(--ink-muted);
  font-size: 8px;
}

.renewal-settings-rates input {
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid #cad9df;
  border-radius: 6px;
  font-size: 9px;
}

.renewal-coupon-summary {
  margin: 12px 0;
  padding: 12px;
  background: #f7fafb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.renewal-coupon-summary h3 { margin-bottom: 9px; font-size: 11px; }

.renewal-coupon-summary > span {
  display: inline-grid;
  gap: 3px;
  margin: 0 6px 6px 0;
  padding: 7px 9px;
  background: #fff;
  border: 1px solid #dce5e8;
  border-radius: 7px;
  font-size: 9px;
}

.renewal-coupon-summary small { color: var(--ink-muted); font-size: 8px; }

.renewal-coupon-summary > a {
  display: grid;
  gap: 2px;
  min-width: 130px;
  padding: 8px 10px;
  border: 1px solid #d6e4e0;
  border-radius: 8px;
  background: #f8fcfb;
  color: #256c61;
  font-size: 9px;
  text-decoration: none;
}

.renewal-import-sheet-picker {
  display: flex;
  align-items: end;
  gap: 12px;
  margin: 10px 0;
  padding: 10px 12px;
  background: #f5f9fa;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.renewal-import-sheet-picker .filter-field {
  flex: 0 0 280px;
}

.renewal-import-sheet-picker > span {
  color: var(--ink-muted);
  font-size: 9px;
}

.renewal-insurance-history {
  margin: 12px 0;
}

.renewal-insurance-history h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.renewal-insurance-history .data-table {
  font-size: 13px;
}

.renewal-insurance-history .data-table th {
  padding: 13px 15px;
  font-size: 11px;
}

.renewal-insurance-history .data-table td {
  padding: 15px;
  font-size: 13px;
  white-space: normal;
}

.renewal-insurance-history .data-table strong {
  font-size: 13px;
}

.renewal-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
}

.renewal-pagination > span {
  color: var(--ink-muted);
  font-size: 9px;
}

.renewal-pagination > div {
  display: flex;
  gap: 7px;
}

.renewal-source-sync-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.renewal-source-sync-summary article {
  display: grid;
  gap: 5px;
  min-height: 112px;
  padding: 16px 18px;
  background: #f6fafb;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.renewal-source-sync-summary span,
.renewal-source-sync-summary small {
  color: var(--ink-muted);
  font-size: 10px;
  line-height: 1.5;
}

.renewal-source-sync-summary strong {
  color: var(--ink);
  font-size: 28px;
  line-height: 1.1;
}

.renewal-source-note {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 18px 20px;
}

.renewal-source-note strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 14px;
}

.renewal-source-note p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 11px;
  line-height: 1.7;
}

.renewal-copy-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
}

.renewal-copy-field .button {
  min-width: 48px;
  padding-inline: 10px;
}

.vehicle-archive-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

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

.vehicle-archive-link-health {
  grid-column: 1 / -1;
}

.vehicle-archive-health-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0 14px 14px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.vehicle-archive-health-grid > div {
  display: grid;
  gap: 6px;
  padding: 14px;
  background: #fff;
}

.vehicle-archive-health-grid span,
.vehicle-archive-health-grid small {
  color: var(--ink-muted);
  font-size: 8px;
  line-height: 1.55;
}

.vehicle-archive-health-grid strong {
  color: var(--ink);
  font-size: 16px;
}

.vehicle-archive-filter-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.vehicle-archive-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 7px 8px 7px 12px;
  background: linear-gradient(135deg, rgba(230, 247, 241, .95), rgba(245, 250, 249, .9));
  border: 1px solid #b9dcd2;
  border-radius: 10px;
}

.vehicle-archive-search > svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: #21836f;
}

.vehicle-archive-search input {
  min-width: 0;
  min-height: 34px;
  flex: 1;
  padding: 0;
  border: 0;
  outline: 0;
  box-shadow: none;
  background: transparent;
}

.vehicle-archive-table td {
  vertical-align: middle;
}

.vehicle-archive-table .muted,
.vehicle-archive-detail-grid span {
  display: block;
}

.vehicle-archive-detail-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  margin: 12px 0 16px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.vehicle-archive-detail-grid > div {
  display: grid;
  align-content: center;
  gap: 5px;
  min-height: 72px;
  padding: 10px;
  background: #fff;
}

.vehicle-archive-detail-grid span {
  color: var(--ink-muted);
  font-size: 8px;
}

.vehicle-archive-detail-grid strong {
  color: var(--ink);
  font-size: 10px;
  line-height: 1.5;
}

.vehicle-archive-source-note {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) minmax(220px, 1.5fr);
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  background: #f5f9fa;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.vehicle-archive-source-note span,
.vehicle-archive-source-note small {
  color: var(--ink-muted);
  font-size: 8px;
}

.vehicle-archive-source-note strong {
  font-size: 10px;
}

.vehicle-archive-import-intro {
  margin-bottom: 12px;
  padding: 14px;
  color: #1f5d52;
  background: linear-gradient(135deg, rgba(230, 247, 241, .95), rgba(245, 250, 249, .9));
  border: 1px solid #b9dcd2;
  border-radius: 11px;
}

.vehicle-archive-import-intro > div {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 4px 10px;
}

.vehicle-archive-import-icon {
  display: block;
  width: 24px;
  min-width: 24px;
  max-width: 24px;
  height: 24px;
  grid-row: 1 / 3;
}

.vehicle-archive-import-icon svg {
  width: 24px;
  min-width: 24px;
  max-width: 24px;
  height: 24px;
}

.vehicle-archive-import-intro strong {
  font-size: 11px;
}

.vehicle-archive-import-intro p {
  margin: 0;
  color: #5b7475;
  font-size: 9px;
  line-height: 1.55;
}

.vehicle-archive-import-controls {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.vehicle-archive-import-summary {
  margin: 12px 0;
}

.vehicle-archive-import-preview {
  max-height: 330px;
  margin-top: 12px;
}

@media (max-width: 1100px) {
  .vehicle-archive-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .vehicle-archive-detail-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .renewal-filter-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .renewal-filter-keyword {
    grid-column: span 2;
  }

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

  .renewal-expiry-reminders {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .renewal-customer-info-card {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .modal.wide-modal .renewal-detail-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .renewal-profit-preview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .renewal-source-sync-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .vehicle-archive-overview-grid,
  .vehicle-archive-health-grid,
  .vehicle-archive-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vehicle-archive-link-health {
    grid-column: 1 / -1;
  }

  .vehicle-archive-health-grid > div:last-child {
    grid-column: 1 / -1;
  }

  .vehicle-archive-search {
    flex-wrap: wrap;
  }

  .vehicle-archive-search input {
    flex-basis: calc(100% - 30px);
  }

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

  .renewal-filter-grid,
  .renewal-month-grid,
  .renewal-follow-summary,
  .renewal-settings-rates {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .renewal-expiry-reminders {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .renewal-customer-info-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .modal.wide-modal .renewal-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .renewal-filter-keyword {
    grid-column: 1 / -1;
  }

  .renewal-smart-keyword-box {
    flex-wrap: wrap;
  }

  .renewal-smart-keyword-box > input {
    flex-basis: calc(100% - 30px);
  }

  .renewal-alert {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .renewal-alert .button {
    justify-self: start;
  }

  .renewal-tabs button {
    min-height: 34px;
    padding: 0 12px;
  }

  .renewal-battle-grid,
  .renewal-profit-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .renewal-source-sync-summary,
  .renewal-source-note {
    grid-template-columns: 1fr;
  }

  .renewal-coupon-row {
    grid-template-columns: minmax(0, 1fr) 72px;
  }

  .renewal-import-sheet-picker {
    align-items: stretch;
    flex-direction: column;
  }

  .renewal-import-sheet-picker .filter-field {
    flex-basis: auto;
  }

  .renewal-coupon-row input:nth-child(3) {
    grid-column: 1;
  }
}

@media (max-width: 460px) {
  .vehicle-archive-overview-grid,
  .vehicle-archive-health-grid,
  .vehicle-archive-metrics,
  .vehicle-archive-detail-grid {
    grid-template-columns: 1fr;
  }

  .vehicle-archive-health-grid > div:last-child {
    grid-column: auto;
  }

  .renewal-filter-grid,
  .renewal-follow-summary,
  .renewal-settings-rates {
    grid-template-columns: 1fr;
  }

  .renewal-expiry-reminders {
    grid-template-columns: 1fr;
  }

  .renewal-customer-info-card {
    grid-template-columns: 1fr;
  }

  .modal.wide-modal .renewal-detail-grid {
    grid-template-columns: 1fr;
  }

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

  .renewal-battle-grid,
  .renewal-profit-preview {
    grid-template-columns: 1fr;
  }

  .renewal-forecast-list > div {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .accident-source-grid,
  .accident-batch-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .accident-comparison-kpis,
  .accident-chart-grid,
  .accident-person-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .accident-analysis-filters {
    justify-content: flex-start;
  }

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

  .renewal-allocation-editor {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .accident-overdue-banner {
    align-items: stretch;
    flex-direction: column;
  }

  .accident-source-grid,
  .accident-batch-grid,
  .accident-detail-grid,
  .accident-comparison-kpis,
  .accident-chart-grid,
  .accident-person-grid {
    grid-template-columns: 1fr;
  }

  .accident-analysis-filters,
  .accident-comparison-legend {
    display: grid;
    grid-template-columns: 1fr;
  }

  .accident-analysis-filters label,
  .accident-analysis-filters select {
    width: 100%;
  }

  .accident-comparison-legend span:last-child {
    margin-left: 0;
  }

  .accident-filters {
    justify-content: stretch;
  }

  .accident-filters select,
  .accident-filters input {
    width: 100%;
  }

  .renewal-allocation-editor > div {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .topbar {
    min-height: 48px;
    gap: 6px;
    padding: 5px 10px;
  }

  .topbar-left {
    min-width: 0;
    gap: 7px;
  }

  .topbar-left .mobile-menu {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
  }

  .page-title-wrap {
    min-width: 0;
    overflow: hidden;
  }

  #pageEyebrow,
  #profileButton,
  #changePasswordTopButton {
    display: none !important;
  }

  #pageTitle {
    overflow: hidden;
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar-actions {
    flex: 0 0 auto;
    gap: 2px;
  }

  .topbar-actions .icon-btn {
    width: 32px;
    height: 32px;
  }

  .workspace {
    min-height: calc(100vh - 48px);
    padding-top: 8px;
  }

  body.signing-capture-mode .topbar {
    display: none;
  }

  body.signing-capture-mode .main-area {
    min-height: 100vh;
  }

  body.signing-capture-mode .workspace {
    min-height: 100vh;
    padding: 8px 10px 26px;
  }
}

.finance-hub-head p {
  max-width: 930px;
}

.finance-hub-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.finance-hub-overview > div {
  display: grid;
  min-height: 116px;
  align-content: center;
  gap: 6px;
  padding: 17px 19px;
  background: linear-gradient(145deg, #fff9f1, #fff 58%);
  border: 1px solid #eadfce;
  border-radius: 13px;
}

.finance-hub-overview span,
.finance-hub-overview small {
  color: var(--ink-muted);
  font-size: 10px;
}

.renewal-smart-keyword-box .renewal-search-submit {
  min-width: 76px;
  min-height: 36px;
  color: #fff;
  background: #138a70;
  border: 1px solid #0d755f;
  box-shadow: 0 7px 16px rgba(15, 126, 103, 0.23);
  font-size: 11px;
  font-weight: 700;
}

.renewal-smart-keyword-box .renewal-search-submit:hover {
  background: #0e7963;
}

.renewal-smart-keyword-box .renewal-search-clear {
  min-height: 36px;
  color: #315f58;
  background: #fff;
  border: 1px solid #c7dad5;
}

.finance-hub-overview strong {
  color: var(--ink);
  font-size: 25px;
  line-height: 1.15;
}

.finance-hub-overview strong small {
  margin: 0 2px;
  font-size: 10px;
}

.finance-hub-tabs {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 16px;
  overflow: hidden;
  background: #ded8ce;
  border: 1px solid #ded8ce;
  border-radius: 12px;
}

.finance-hub-tabs button {
  display: grid;
  min-height: 78px;
  align-content: center;
  gap: 4px;
  padding: 11px 9px;
  color: var(--ink-soft);
  background: #fff;
  border: 0;
  cursor: pointer;
  text-align: left;
}

.finance-hub-tabs button strong {
  color: var(--ink);
  font-size: 12px;
}

.finance-hub-tabs button span {
  font-size: 8.5px;
  line-height: 1.45;
}

.finance-hub-tabs button.active {
  color: #fff;
  background: linear-gradient(145deg, #5d411f, #a66c25);
  box-shadow: inset 0 -3px 0 #f3b35d;
}

.finance-hub-tabs button.active strong,
.finance-hub-tabs button.active span {
  color: #fff;
}

.finance-member-portal {
  display: flex;
  min-height: 0;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background: #fff;
}

.finance-member-page-head .button {
  min-width: 142px;
  text-decoration: none;
}

.finance-member-portal-notice {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  margin: 14px 18px;
  padding: 10px 13px;
  color: #315f58;
  background: #edf8f4;
  border: 1px solid #cfe8df;
  border-radius: 9px;
  font-size: 10.5px;
}

.finance-member-portal-status {
  display: inline-flex;
  min-width: 0;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.finance-member-portal-status::before {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  content: "";
  background: #16a47b;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(22, 164, 123, 0.12);
}

.finance-member-portal-status strong {
  flex: 0 0 auto;
  color: #1d675a;
}

.finance-member-portal-copy {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-member-portal-new-window,
.finance-member-portal a[target="_blank"],
.finance-member-portal a[data-action*="new-window"] {
  display: none !important;
}

.finance-member-portal-frame {
  display: block;
  width: 100%;
  min-height: 820px;
  flex: 1 1 auto;
  background: #f5f7fb;
  border: 0;
  border-top: 1px solid var(--line);
}

body.member-portal-mode {
  overflow: hidden;
}

body.member-portal-mode .workspace {
  display: flex;
  width: 100%;
  max-width: none;
  height: calc(100vh - 78px);
  height: calc(100dvh - 78px);
  min-height: 0;
  flex-direction: column;
  padding: 14px 18px 16px;
}

body.member-portal-mode .finance-member-page-head {
  flex: 0 0 auto;
  flex-direction: row;
  align-items: center;
  margin-bottom: 10px;
}

body.member-portal-mode .finance-member-page-head h2 {
  margin-bottom: 3px;
  font-size: 19px;
}

body.member-portal-mode .finance-member-page-head p {
  max-width: 780px;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.member-portal-mode .finance-member-page-head .button {
  min-width: 0;
  height: 36px;
  padding: 0 14px;
  font-size: 11px;
}

body.member-portal-mode .finance-member-portal {
  flex: 1 1 auto;
  min-height: 0;
  border-radius: 14px;
}

body.member-portal-mode .finance-member-portal-notice {
  min-height: 36px;
  flex: 0 0 auto;
  margin: 8px 10px;
  padding: 7px 10px;
  font-size: 10px;
}

body.member-portal-mode .finance-member-portal-frame {
  width: calc(100% - 20px);
  height: 100%;
  min-height: 0;
  margin: 0 10px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

body.member-portal-mode .top-filters,
body.member-portal-mode #refreshDataButton,
body.member-portal-mode #mobileCaptureQuickButton {
  display: none !important;
}

.voucher-workflow-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 14px;
  overflow: hidden;
  background: #d7e4e1;
  border: 1px solid #d7e4e1;
  border-radius: 12px;
}

.voucher-workflow-strip > div {
  display: grid;
  min-height: 92px;
  grid-template-columns: 32px minmax(0, 1fr);
  align-content: center;
  gap: 2px 10px;
  padding: 14px;
  background: linear-gradient(145deg, #f2fbf8, #fff);
}

.voucher-workflow-strip span {
  display: grid;
  width: 30px;
  height: 30px;
  grid-row: span 2;
  color: #fff;
  background: linear-gradient(145deg, #0b8f83, #146d70);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  place-items: center;
}

.voucher-workflow-strip strong {
  color: var(--ink);
  font-size: 13px;
}

.voucher-workflow-strip small {
  color: var(--ink-muted);
  font-size: 10px;
  line-height: 1.4;
}

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

.voucher-summary-grid > div {
  display: grid;
  min-height: 94px;
  align-content: center;
  gap: 5px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.voucher-summary-grid > div.attention {
  background: #fff7f5;
  border-color: #edc6c0;
}

.voucher-summary-grid span {
  color: var(--ink-muted);
  font-size: 11px;
}

.voucher-summary-grid strong {
  color: var(--ink);
  font-size: 25px;
}

.voucher-summary-grid strong small {
  margin-left: 3px;
  color: var(--ink-muted);
  font-size: 10px;
}

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

.voucher-tabs button {
  display: grid;
  min-height: 70px;
  align-content: center;
  gap: 4px;
  padding: 12px 14px;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-align: left;
}

.voucher-tabs button strong {
  color: var(--ink);
  font-size: 13px;
}

.voucher-tabs button span {
  color: var(--ink-muted);
  font-size: 10px;
}

.voucher-tabs button.active {
  color: #fff;
  background: linear-gradient(145deg, #0c3445, #126c70);
  border-color: #126c70;
}

.voucher-tabs button.active strong,
.voucher-tabs button.active span {
  color: #fff;
}

.voucher-panel {
  overflow: hidden;
}

.voucher-request-table,
.voucher-issued-table {
  min-width: 1220px;
}

.voucher-request-table td,
.voucher-issued-table td {
  vertical-align: top;
}

.voucher-request-table td > span,
.voucher-request-table td > small,
.voucher-issued-table td > span,
.voucher-issued-table td > small {
  display: block;
  margin-top: 3px;
  line-height: 1.45;
}

.voucher-channel-grid {
  display: grid;
  gap: 14px;
}

.voucher-channel-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0 18px 18px;
}

.voucher-channel-features > div,
.voucher-integration-note {
  padding: 15px;
  background: #f6faf9;
  border: 1px solid #dfeae7;
  border-radius: 10px;
}

.voucher-channel-features strong,
.voucher-integration-note strong {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
}

.voucher-channel-features span,
.voucher-integration-note p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.65;
}

.voucher-integration-note {
  margin: 0 18px 18px;
}

.voucher-application-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 12px;
  padding: 12px 14px;
  background: #f1f9f6;
  border: 1px solid #d5e8e2;
  border-radius: 10px;
}

.voucher-application-heading:first-child {
  margin-top: 0;
}

.voucher-application-heading > span {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  color: #fff;
  background: var(--teal);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  place-items: center;
}

.voucher-application-heading > div {
  min-width: 0;
  flex: 1;
}

.voucher-application-heading strong,
.voucher-application-heading p {
  display: block;
  margin: 0;
}

.voucher-application-heading strong {
  font-size: 14px;
}

.voucher-application-heading p {
  margin-top: 3px;
  color: var(--ink-muted);
  font-size: 11px;
}

.voucher-item-editor {
  display: grid;
  gap: 9px;
}

.voucher-item-row {
  display: grid;
  grid-template-columns: 130px minmax(220px, 1fr) 90px 120px auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.voucher-item-row input,
.voucher-item-row select {
  min-width: 0;
  min-height: 38px;
}

.voucher-application-total {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: 11px 0 16px;
  padding: 12px 14px;
  background: #fff8ec;
  border: 1px solid #ecd9b9;
  border-radius: 9px;
}

.voucher-application-total span {
  color: var(--ink-soft);
  font-size: 12px;
}

.voucher-application-total strong {
  color: #a56612;
  font-size: 20px;
}

.voucher-action-summary,
.voucher-detail-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 16px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.voucher-action-summary {
  grid-template-columns: 1fr;
}

.voucher-action-summary > *,
.voucher-detail-summary > div {
  padding: 12px 14px;
  background: #fff;
}

.voucher-detail-summary span,
.voucher-detail-summary strong,
.voucher-detail-summary small {
  display: block;
}

.voucher-detail-summary span,
.voucher-detail-summary small {
  color: var(--ink-muted);
  font-size: 11px;
}

.voucher-detail-summary strong {
  margin: 4px 0;
  font-size: 15px;
}

.voucher-detail-section {
  margin-top: 16px;
  padding: 16px;
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.voucher-detail-section h3 {
  margin: 0 0 12px;
  font-size: 15px;
}

.voucher-detail-items,
.voucher-detail-vouchers,
.voucher-timeline {
  display: grid;
  gap: 8px;
}

.voucher-detail-items > div,
.voucher-detail-vouchers > div,
.voucher-timeline > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  padding: 11px 12px;
  background: #fff;
  border: 1px solid #e7edef;
  border-radius: 8px;
}

.voucher-detail-items em {
  color: var(--ink);
  font-style: normal;
  font-weight: 700;
}

.voucher-detail-items span,
.voucher-detail-items em {
  align-self: center;
}

.voucher-timeline > div {
  grid-template-columns: 150px minmax(0, 1fr);
}

.voucher-timeline span {
  color: var(--ink-muted);
  font-size: 11px;
}

.voucher-timeline strong,
.voucher-timeline small {
  grid-column: 2;
}

.voucher-timeline small {
  color: var(--ink-soft);
  line-height: 1.55;
}

.voucher-customer-card {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}

.voucher-customer-qr {
  display: grid;
  padding: 18px;
  text-align: center;
  background: #f5faf8;
  border: 1px solid #d8e8e3;
  border-radius: 12px;
  place-items: center;
}

.voucher-customer-qr canvas {
  width: 250px !important;
  height: 250px !important;
  background: #fff;
}

.voucher-customer-qr strong,
.voucher-customer-qr small {
  display: block;
}

.voucher-customer-qr strong {
  margin-top: 10px;
}

.voucher-customer-qr small {
  margin-top: 5px;
  color: var(--ink-muted);
  font-size: 10px;
}

.voucher-customer-card-info {
  display: grid;
  gap: 5px;
}

.voucher-customer-card-info > span {
  color: var(--ink-muted);
  font-size: 11px;
}

.voucher-customer-card-info > strong {
  margin-bottom: 8px;
  font-size: 18px;
}

.voucher-access-link {
  max-height: 100px;
  margin-top: 12px;
  padding: 11px;
  overflow: auto;
  color: #486368;
  background: #f5f8f9;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.voucher-redeem-panel {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  padding: 15px;
  color: #21645d;
  background: #eff9f6;
  border: 1px solid #cfe8e1;
  border-radius: 10px;
}

.voucher-redeem-panel > span {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
}

.voucher-redeem-panel strong,
.voucher-redeem-panel p {
  display: block;
  margin: 0;
}

.voucher-redeem-panel p {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.6;
}

@media (max-width: 1100px) {
  .voucher-workflow-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .voucher-channel-features {
    grid-template-columns: 1fr;
  }

  .voucher-item-row {
    grid-template-columns: 120px minmax(0, 1fr) 80px 110px;
  }

  .voucher-item-row [data-voucher-item-remove] {
    grid-column: 1 / -1;
    justify-self: end;
  }
}

@media (max-width: 760px) {
  .voucher-workflow-strip,
  .voucher-summary-grid,
  .voucher-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .voucher-detail-summary,
  .voucher-customer-card,
  .voucher-detail-items > div,
  .voucher-detail-vouchers > div,
  .voucher-timeline > div {
    grid-template-columns: 1fr;
  }

  .voucher-timeline strong,
  .voucher-timeline small {
    grid-column: auto;
  }

  .voucher-item-row {
    grid-template-columns: 1fr 1fr;
  }

  .voucher-item-row [data-voucher-item-name] {
    grid-column: 1 / -1;
  }

  .voucher-item-row [data-voucher-item-remove] {
    grid-column: 1 / -1;
  }

  .voucher-customer-qr canvas {
    width: min(250px, 72vw) !important;
    height: min(250px, 72vw) !important;
  }
}

.finance-channel-summary,
.finance-reconcile-strip,
.finance-loan-summary,
.finance-invoice-summary,
.finance-payable-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 16px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 11px;
}

.finance-channel-summary > div,
.finance-reconcile-strip > div,
.finance-loan-summary > div,
.finance-invoice-summary > div,
.finance-payable-summary > div {
  display: grid;
  align-content: center;
  gap: 5px;
  min-height: 82px;
  padding: 14px 16px;
  background: #fff;
}

.finance-channel-summary span,
.finance-reconcile-strip span,
.finance-loan-summary span,
.finance-invoice-summary span,
.finance-payable-summary span {
  color: var(--ink-muted);
  font-size: 9px;
}

.finance-channel-summary strong,
.finance-reconcile-strip strong,
.finance-loan-summary strong,
.finance-invoice-summary strong,
.finance-payable-summary strong {
  color: var(--ink);
  font-size: 18px;
}

.finance-channel-summary small,
.finance-reconcile-strip small,
.finance-loan-summary small,
.finance-invoice-summary small,
.finance-payable-summary small {
  margin-left: 3px;
  color: var(--ink-muted);
  font-size: 9px;
}

.finance-form-intro {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 16px;
  overflow: hidden;
  background: #e3ded5;
  border: 1px solid #e3ded5;
  border-radius: 10px;
}

.finance-form-intro > div {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  background: #fffaf3;
}

.finance-form-intro strong {
  color: var(--ink);
  font-size: 11px;
}

.finance-form-intro span {
  color: var(--ink-muted);
  font-size: 9px;
  line-height: 1.5;
}

.finance-live-difference {
  display: flex;
  min-height: 42px;
  align-items: center;
  padding: 8px 11px;
  color: #156a58;
  background: #eff8f5;
  border: 1px solid #cfe6df;
  border-radius: 8px;
  font-size: 15px;
}

.finance-live-difference.negative {
  color: #b72828;
  background: #fff2f2;
  border-color: #f1cccc;
}

.finance-budget-total {
  display: flex;
  min-height: 42px;
  align-items: center;
  padding: 8px 11px;
  color: #7c4c16;
  background: #fff8ed;
  border: 1px solid #ead7ba;
  border-radius: 8px;
  font-size: 17px;
}

.budget-usage {
  position: relative;
  min-width: 120px;
  overflow: hidden;
  padding: 7px 9px;
  background: #f1f5f6;
  border-radius: 7px;
}

.budget-usage > span {
  position: absolute;
  inset: 0 auto 0 0;
  background: #85cbbb;
}

.budget-usage > span.warning {
  background: #e8b35b;
}

.budget-usage > span.over {
  background: #dc7373;
}

.budget-usage strong {
  position: relative;
  z-index: 1;
  font-size: 10px;
}

.budget-command-center {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 28px;
  margin-bottom: 14px;
  padding: 25px 27px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 88% 8%, rgba(204, 157, 76, 0.28), transparent 31%),
    linear-gradient(125deg, #102e2c 0%, #163b38 55%, #1b4943 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 17px;
  box-shadow: 0 16px 38px rgba(18, 47, 44, 0.15);
}

.budget-command-center::after {
  position: absolute;
  right: 305px;
  bottom: -92px;
  width: 240px;
  height: 240px;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  box-shadow:
    0 0 0 34px rgba(255, 255, 255, 0.025),
    0 0 0 70px rgba(255, 255, 255, 0.018);
  pointer-events: none;
}

.budget-hero-copy,
.budget-hero-score {
  position: relative;
  z-index: 1;
}

.budget-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #dcb977;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.budget-eyebrow::before {
  width: 22px;
  height: 1px;
  content: "";
  background: #dcb977;
}

.budget-hero-copy h3 {
  max-width: 820px;
  margin: 10px 0 8px;
  color: #fff;
  font-size: clamp(20px, 2vw, 29px);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.budget-hero-copy > p {
  max-width: 880px;
  margin: 0;
  color: rgba(237, 248, 245, 0.72);
  font-size: 11px;
  line-height: 1.75;
}

.budget-source-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 17px;
}

.budget-source-tags > span,
.budget-source-tags > button {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  padding: 0 10px;
  color: rgba(231, 245, 241, 0.82);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  font-size: 9px;
}

.budget-source-tags > button {
  color: #f4d391;
  cursor: pointer;
}

.budget-source-tags > button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.budget-hero-score {
  display: grid;
  min-height: 146px;
  align-content: center;
  justify-items: end;
  padding: 18px 20px;
  text-align: right;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 13px;
  backdrop-filter: blur(8px);
}

.budget-hero-score > span {
  color: rgba(237, 248, 245, 0.66);
  font-size: 10px;
}

.budget-hero-score strong {
  margin: 6px 0 7px;
  color: #fff;
  font-size: 22px;
  line-height: 1.28;
}

.budget-hero-score.good strong {
  color: #9fe2c9;
}

.budget-hero-score.attention strong {
  color: #ffc29e;
}

.budget-hero-score small {
  max-width: 230px;
  color: rgba(237, 248, 245, 0.66);
  font-size: 9px;
  line-height: 1.55;
}

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

.budget-view-tabs button {
  position: relative;
  display: grid;
  min-height: 74px;
  grid-template-columns: 31px minmax(0, 1fr);
  align-content: center;
  gap: 2px 9px;
  padding: 12px 14px;
  color: var(--ink-muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.budget-view-tabs button:hover {
  border-color: #bcd6cf;
  transform: translateY(-1px);
}

.budget-view-tabs button > span {
  display: grid;
  width: 29px;
  height: 29px;
  grid-row: span 2;
  align-self: center;
  color: #7b684d;
  background: #f5efe5;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 800;
  place-items: center;
}

.budget-view-tabs button strong {
  align-self: end;
  color: var(--ink);
  font-size: 12px;
}

.budget-view-tabs button small {
  align-self: start;
  color: var(--ink-muted);
  font-size: 9px;
}

.budget-view-tabs button.active {
  background: linear-gradient(145deg, #f8fcfb, #fff);
  border-color: #7dbbb0;
  box-shadow: 0 8px 22px rgba(25, 102, 88, 0.1);
}

.budget-view-tabs button.active::after {
  position: absolute;
  right: 13px;
  bottom: 10px;
  width: 18px;
  height: 3px;
  content: "";
  background: #17a084;
  border-radius: 99px;
}

.budget-view-tabs button.active > span {
  color: #fff;
  background: #157d6c;
}

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

.budget-kpi-card {
  position: relative;
  display: grid;
  min-height: 144px;
  align-content: center;
  gap: 6px;
  padding: 17px 18px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.budget-kpi-card.featured {
  background:
    linear-gradient(150deg, rgba(231, 247, 242, 0.92), #fff 65%),
    #fff;
  border-color: #c9dfda;
}

.budget-kpi-card.attention {
  background: linear-gradient(150deg, #fff9f2, #fff 66%);
  border-color: #ead8bf;
}

.budget-kpi-card.stable {
  background: linear-gradient(150deg, #f2faf6, #fff 66%);
  border-color: #d4e6df;
}

.budget-kpi-card > span {
  color: var(--ink-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.budget-kpi-card > strong {
  color: var(--ink);
  font-size: clamp(19px, 1.8vw, 25px);
  line-height: 1.18;
}

.budget-kpi-card > p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 9px;
  line-height: 1.5;
}

.budget-kpi-accent {
  margin-top: 3px;
  color: #326c61;
  font-size: 9px;
  font-weight: 700;
}

.budget-mini-progress {
  height: 4px;
  margin-top: 4px;
  overflow: hidden;
  background: #e8efed;
  border-radius: 99px;
}

.budget-mini-progress > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #168e78, #6cbca9);
  border-radius: inherit;
}

.budget-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(300px, 0.8fr);
  gap: 14px;
  margin-bottom: 14px;
}

.budget-panel-head {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.budget-panel-head > div:first-child {
  min-width: 0;
}

.budget-panel-head > div > span {
  display: block;
  margin-bottom: 4px;
  color: #a17a3f;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.budget-panel-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
}

.budget-panel-head p {
  margin: 4px 0 0;
  color: var(--ink-muted);
  font-size: 9px;
  line-height: 1.55;
}

.budget-trend-panel,
.budget-result-panel {
  padding: 18px 19px 15px;
}

.budget-chart-legend {
  display: flex;
  flex: 0 0 auto;
  gap: 12px;
  color: var(--ink-muted);
  font-size: 9px;
}

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

.budget-chart-legend i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.budget-chart-legend i.planned {
  background: #d8dedd;
}

.budget-chart-legend i.actual {
  background: #168e78;
}

.budget-month-chart {
  display: grid;
  min-height: 190px;
  grid-template-columns: repeat(12, minmax(44px, 1fr));
  gap: 7px;
  padding: 10px 2px 0;
  overflow-x: auto;
}

.budget-chart-column {
  display: grid;
  min-width: 44px;
  grid-template-rows: 140px auto auto;
  align-items: end;
  justify-items: center;
  gap: 4px;
}

.budget-chart-bars {
  display: flex;
  width: 100%;
  height: 140px;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  padding: 0 3px;
  border-bottom: 1px solid #e5ebe9;
}

.budget-chart-bars i {
  display: block;
  width: min(14px, 38%);
  min-height: 3px;
  border-radius: 3px 3px 0 0;
}

.budget-chart-bars i.planned {
  background: #dce2e0;
}

.budget-chart-bars i.actual {
  background: linear-gradient(180deg, #3cb39b, #117c69);
}

.budget-chart-bars i.actual.over {
  background: linear-gradient(180deg, #f09b74, #cf5e4e);
}

.budget-chart-column strong {
  color: var(--ink-soft);
  font-size: 9px;
}

.budget-chart-column small {
  color: var(--ink-muted);
  font-size: 8px;
}

.budget-chart-column.future {
  opacity: 0.45;
}

.budget-chart-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 13px;
  padding-top: 11px;
  color: var(--ink-muted);
  border-top: 1px solid #edf1f0;
  font-size: 9px;
}

.budget-chart-foot strong {
  margin-left: 3px;
  color: var(--ink);
}

.budget-result-list {
  display: grid;
  gap: 1px;
  overflow: hidden;
  background: #e8edeb;
  border: 1px solid #e8edeb;
  border-radius: 10px;
}

.budget-result-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 12px;
  align-items: center;
  padding: 11px 12px;
  background: #fff;
}

.budget-result-list > div > span {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
}

.budget-result-list small {
  display: block;
  margin-top: 2px;
  color: var(--ink-muted);
  font-size: 8px;
  font-weight: 400;
}

.budget-result-list strong {
  color: var(--ink);
  font-size: 12px;
  text-align: right;
}

.budget-result-list em {
  grid-column: 2;
  font-size: 8px;
  font-style: normal;
  font-weight: 700;
  text-align: right;
}

.budget-department-panel,
.budget-detail-panel,
.budget-operations-panel {
  padding: 18px 19px;
}

.budget-department-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
}

.budget-department-card {
  position: relative;
  display: grid;
  min-height: 180px;
  align-content: start;
  gap: 3px;
  padding: 15px 14px 13px;
  color: var(--ink-soft);
  background: linear-gradient(155deg, #fbfdfc, #fff);
  border: 1px solid #e2e9e7;
  border-radius: 11px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.budget-department-card:hover {
  border-color: #8fc6bb;
  transform: translateY(-2px);
}

.budget-department-index {
  color: #b89a6d;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.budget-department-card > strong {
  color: var(--ink);
  font-size: 14px;
}

.budget-department-card > small {
  color: var(--ink-muted);
  font-size: 8px;
}

.budget-department-value {
  display: grid;
  margin: 12px 0 2px;
}

.budget-department-value b {
  color: var(--ink);
  font-size: 16px;
}

.budget-department-value span {
  color: var(--ink-muted);
  font-size: 8px;
}

.budget-department-meta {
  display: grid;
  gap: 4px;
  margin-top: 7px;
  font-size: 8px;
}

.budget-department-meta span {
  color: var(--ink-muted);
}

.budget-department-meta em {
  font-style: normal;
  font-weight: 700;
}

.budget-utility-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 14px;
  padding: 17px 19px;
  background: linear-gradient(145deg, #fffaf1, #fff);
  border-color: #e7dccb;
}

.budget-utility-panel > div:first-child {
  min-width: 0;
}

.budget-utility-panel span,
.budget-utility-panel strong,
.budget-utility-panel p {
  display: block;
}

.budget-utility-panel span {
  color: #a17a3f;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.budget-utility-panel strong {
  margin: 4px 0;
  color: var(--ink);
  font-size: 13px;
}

.budget-utility-panel p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 9px;
  line-height: 1.55;
}

.budget-view-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
  padding: 16px 18px;
  background: linear-gradient(145deg, #f7fbfa, #fff);
  border: 1px solid #dce8e5;
  border-radius: 12px;
}

.budget-view-toolbar > div:first-child {
  min-width: 0;
}

.budget-view-toolbar > div:first-child > span {
  display: block;
  color: #16826f;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.budget-view-toolbar > div:first-child > strong {
  display: block;
  margin: 4px 0;
  color: var(--ink);
  font-size: 14px;
}

.budget-view-toolbar > div:first-child > p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 9px;
  line-height: 1.55;
}

.budget-filter-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.budget-filter-pills button,
.budget-source-chip {
  min-height: 31px;
  padding: 0 11px;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-size: 9px;
}

.budget-filter-pills button.active {
  color: #fff;
  background: #176f62;
  border-color: #176f62;
}

.budget-source-chip {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  cursor: default;
}

.budget-department-detail-grid {
  display: grid;
  gap: 11px;
  margin-bottom: 14px;
}

.budget-department-detail {
  padding: 17px 18px;
}

.budget-department-detail > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.budget-department-detail > header span {
  color: var(--ink-muted);
  font-size: 8px;
}

.budget-department-detail > header h3 {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 15px;
}

.budget-department-detail-numbers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 14px 0 10px;
  overflow: hidden;
  background: #e6ecea;
  border: 1px solid #e6ecea;
  border-radius: 9px;
}

.budget-department-detail-numbers > div {
  display: grid;
  gap: 4px;
  padding: 10px 11px;
  background: #fafcfc;
}

.budget-department-detail-numbers span {
  color: var(--ink-muted);
  font-size: 8px;
}

.budget-department-detail-numbers strong {
  color: var(--ink);
  font-size: 13px;
}

.budget-department-detail-bar {
  height: 5px;
  overflow: hidden;
  background: #e6eeeb;
  border-radius: 99px;
}

.budget-department-detail-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #158975, #70bfa9);
  border-radius: inherit;
}

.budget-department-detail > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  color: var(--ink-muted);
  font-size: 9px;
}

.budget-detail-toolbar {
  align-items: flex-end;
}

.budget-toolbar-controls {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-end;
  gap: 7px;
}

.budget-toolbar-controls label {
  display: grid;
  gap: 4px;
}

.budget-toolbar-controls label > span {
  color: var(--ink-muted);
  font-size: 8px;
  font-weight: 700;
}

.budget-toolbar-controls select,
.budget-toolbar-controls input {
  min-width: 104px;
  height: 35px;
  padding: 0 9px;
  background: #fff;
  border: 1px solid #d4e0dd;
  border-radius: 8px;
  font-size: 10px;
}

.budget-search-field input {
  width: 210px;
}

.budget-line-table {
  min-width: 1120px;
}

.budget-line-table td {
  vertical-align: top;
}

.budget-line-table td > span,
.budget-line-table td > small {
  display: block;
  margin-top: 3px;
  line-height: 1.45;
}

.budget-line-table-wrap {
  margin: 0 -19px -18px;
}

.budget-line-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 0;
  color: var(--ink-muted);
  font-size: 9px;
}

.budget-line-pagination > div {
  display: flex;
  gap: 7px;
}

.budget-line-pagination .button[disabled] {
  cursor: default;
  opacity: 0.42;
}

.budget-operation-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 14px;
  overflow: hidden;
  background: #dfe8e5;
  border: 1px solid #dfe8e5;
  border-radius: 12px;
}

.budget-operation-summary > div {
  display: grid;
  min-height: 100px;
  align-content: center;
  gap: 5px;
  padding: 14px 16px;
  background: linear-gradient(145deg, #fbfdfc, #fff);
}

.budget-operation-summary span {
  color: var(--ink-muted);
  font-size: 9px;
}

.budget-operation-summary strong {
  color: var(--ink);
  font-size: 19px;
}

.budget-operation-summary strong small {
  margin-left: 3px;
  color: var(--ink-muted);
  font-size: 8px;
}

.budget-operation-summary p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 8px;
}

.budget-operation-groups {
  display: grid;
  gap: 15px;
}

.budget-operation-groups > section {
  overflow: hidden;
  border: 1px solid #e2e9e7;
  border-radius: 10px;
}

.budget-operation-groups h4 {
  margin: 0;
  padding: 10px 13px;
  color: #315f58;
  background: #f2f8f6;
  border-bottom: 1px solid #e2ebe8;
  font-size: 11px;
}

.budget-operation-table {
  min-width: 780px;
}

.budget-operation-table td > span,
.budget-operation-table td > small {
  display: block;
  margin-top: 3px;
}

.budget-verification-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 13px;
  padding: 18px 20px;
  background:
    radial-gradient(circle at 94% 10%, rgba(40, 151, 126, 0.12), transparent 28%),
    linear-gradient(145deg, #f5fbf9, #fff);
  border: 1px solid #d8e8e3;
  border-radius: 13px;
}

.budget-verification-head > div:first-child {
  min-width: 0;
}

.budget-verification-head span {
  color: #188370;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.budget-verification-head h3 {
  margin: 5px 0 4px;
  color: var(--ink);
  font-size: 17px;
}

.budget-verification-head p {
  max-width: 860px;
  margin: 0;
  color: var(--ink-muted);
  font-size: 10px;
  line-height: 1.65;
}

.budget-verification-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 13px;
  overflow: hidden;
  background: #e0e9e6;
  border: 1px solid #e0e9e6;
  border-radius: 12px;
}

.budget-verification-kpis > div {
  display: grid;
  min-height: 96px;
  align-content: center;
  gap: 5px;
  padding: 14px 16px;
  background: linear-gradient(145deg, #fff, #fbfdfc);
}

.budget-verification-kpis > div.attention {
  background: linear-gradient(145deg, #fff9f1, #fff);
}

.budget-verification-kpis span,
.budget-verification-kpis small {
  color: var(--ink-muted);
  font-size: 8px;
}

.budget-verification-kpis strong {
  color: var(--ink);
  font-size: 19px;
}

.budget-verification-kpis strong small {
  margin-left: 3px;
  font-size: 8px;
}

.budget-verification-scope {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  padding: 11px 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.budget-verification-scope > span {
  max-width: 560px;
  color: var(--ink-muted);
  font-size: 8.5px;
  line-height: 1.55;
  text-align: right;
}

.budget-store-scope {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  color: var(--ink-muted);
  font-size: 8px;
  font-weight: 700;
}

.budget-store-scope select {
  min-width: 190px;
  height: 32px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cdded9;
  border-radius: 8px;
  font-size: 9px;
}

.budget-store-scope-large {
  align-items: flex-start;
  flex-direction: column;
  gap: 5px;
}

.budget-store-scope-large select {
  min-width: 280px;
}

.budget-missing-store-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
  padding: 20px;
  background:
    radial-gradient(circle at 92% 5%, rgba(204, 157, 76, 0.14), transparent 30%),
    linear-gradient(145deg, #fbfaf6, #fff);
  border: 1px solid #e5ddce;
  border-radius: 13px;
}

.budget-missing-store-head > div {
  min-width: 0;
}

.budget-missing-store-head > div > span {
  color: #9c7234;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.budget-missing-store-head h3 {
  margin: 5px 0 4px;
  color: var(--ink);
  font-size: 17px;
}

.budget-missing-store-head p {
  max-width: 790px;
  margin: 0;
  color: var(--ink-muted);
  font-size: 10px;
  line-height: 1.65;
}

.budget-missing-store-panel {
  display: flex;
  min-height: 240px;
  align-items: center;
  gap: 20px;
  padding: 30px;
}

.budget-missing-store-icon {
  display: grid;
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  color: #a16f2b;
  background: #fff5e5;
  border: 1px solid #ecd7b5;
  border-radius: 16px;
  font-size: 28px;
  font-weight: 800;
  place-items: center;
}

.budget-missing-store-panel > div:last-child {
  min-width: 0;
}

.budget-missing-store-panel span {
  color: var(--ink-muted);
  font-size: 9px;
}

.budget-missing-store-panel h3 {
  margin: 6px 0;
  color: var(--ink);
  font-size: 22px;
}

.budget-missing-store-panel p {
  margin: 0 0 8px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.7;
}

.budget-missing-store-panel small {
  color: var(--ink-muted);
  font-size: 9px;
}

.budget-verification-departments {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 14px;
}

.budget-verification-dept-card {
  display: grid;
  min-height: 186px;
  align-content: start;
  gap: 12px;
  padding: 14px;
  color: var(--ink-soft);
  background: linear-gradient(150deg, #fbfdfc, #fff);
  border: 1px solid #dde7e4;
  border-radius: 11px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.budget-verification-dept-card:hover {
  border-color: #8cc5b8;
  transform: translateY(-2px);
}

.budget-verification-dept-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
}

.budget-verification-dept-card > header span,
.budget-verification-dept-card > header strong {
  display: block;
}

.budget-verification-dept-card > header span {
  color: var(--ink-muted);
  font-size: 7.5px;
  line-height: 1.35;
}

.budget-verification-dept-card > header strong {
  margin-top: 4px;
  color: var(--ink);
  font-size: 14px;
}

.budget-verification-dept-card > header em {
  flex: 0 0 auto;
  padding: 4px 6px;
  font-size: 7.5px;
  font-style: normal;
}

.budget-verification-dept-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
}

.budget-verification-dept-grid > div {
  display: grid;
  gap: 3px;
}

.budget-verification-dept-grid span {
  color: var(--ink-muted);
  font-size: 7.5px;
}

.budget-verification-dept-grid b {
  color: var(--ink);
  font-size: 12px;
}

.budget-verification-dept-card > footer {
  position: relative;
  display: grid;
  gap: 7px;
  margin-top: auto;
  padding-top: 9px;
  overflow: hidden;
  color: var(--ink-muted);
  border-top: 1px solid #edf1f0;
  font-size: 8px;
  line-height: 1.4;
}

.budget-verification-dept-card > footer i {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  content: "";
  background: linear-gradient(90deg, #158b76, #69bfa9);
  border-radius: 99px;
}

.budget-review-queue {
  margin-bottom: 14px;
  padding: 17px 19px;
  border-color: #ead8bd;
}

.budget-review-queue .budget-panel-head > strong {
  color: #a36520;
  font-size: 24px;
}

.budget-review-queue .budget-panel-head > strong small {
  margin-left: 3px;
  color: var(--ink-muted);
  font-size: 8px;
}

.budget-review-list {
  display: grid;
  gap: 7px;
}

.budget-review-list > div {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 110px auto;
  gap: 10px;
  align-items: center;
  padding: 10px 11px;
  background: #fffaf3;
  border: 1px solid #eee0cd;
  border-radius: 8px;
}

.budget-review-list > div > span {
  color: #8d672e;
  font-size: 9px;
  font-weight: 700;
}

.budget-review-list > div > div {
  min-width: 0;
}

.budget-review-list strong,
.budget-review-list small {
  display: block;
}

.budget-review-list strong {
  color: var(--ink);
  font-size: 10px;
}

.budget-review-list small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--ink-muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.budget-review-list b {
  color: var(--ink);
  font-size: 12px;
  text-align: right;
}

.budget-comparison-panel {
  padding: 17px 19px;
}

.budget-comparison-table {
  min-width: 1180px;
}

.budget-comparison-table td {
  vertical-align: top;
}

.budget-comparison-table td > span,
.budget-comparison-table td > small {
  display: block;
  margin-top: 3px;
  line-height: 1.45;
}

.budget-comparison-table-wrap {
  margin: 0 -19px;
}

.budget-entry-intro {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 15px;
  overflow: hidden;
  background: #dce7e4;
  border: 1px solid #dce7e4;
  border-radius: 10px;
}

.budget-entry-intro > div {
  display: grid;
  gap: 4px;
  padding: 11px 13px;
  background: #f5faf8;
}

.budget-entry-intro span {
  color: var(--ink-muted);
  font-size: 8px;
}

.budget-entry-intro strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 10px;
  text-overflow: ellipsis;
}

.budget-entry-detail {
  display: grid;
  gap: 1px;
  margin-bottom: 15px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.budget-entry-detail > div {
  display: grid;
  gap: 4px;
  padding: 11px 13px;
  background: #fbfcfc;
}

.budget-entry-detail span {
  color: var(--ink-muted);
  font-size: 8px;
}

.budget-entry-detail strong,
.budget-entry-detail p {
  margin: 0;
  color: var(--ink);
  font-size: 11px;
  line-height: 1.65;
}

.budget-source-modal-summary,
.budget-line-detail-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 15px;
  overflow: hidden;
  background: #e3eae8;
  border: 1px solid #e3eae8;
  border-radius: 10px;
}

.budget-line-detail-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.budget-source-modal-summary > div,
.budget-line-detail-summary > div {
  display: grid;
  gap: 4px;
  padding: 12px 13px;
  background: #fbfcfc;
}

.budget-source-modal-summary span,
.budget-line-detail-summary span {
  color: var(--ink-muted);
  font-size: 9px;
}

.budget-source-modal-summary strong,
.budget-line-detail-summary strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  text-overflow: ellipsis;
}

.budget-source-modal-summary small,
.budget-line-detail-summary small {
  color: var(--ink-muted);
  font-size: 8px;
}

.budget-source-sheet-list {
  display: grid;
  gap: 7px;
}

.budget-source-sheet-list > div {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.budget-source-sheet-list span {
  display: grid;
  width: 30px;
  height: 30px;
  color: #fff;
  background: #1a776a;
  border-radius: 7px;
  font-size: 8px;
  font-weight: 800;
  place-items: center;
}

.budget-source-sheet-list strong {
  color: var(--ink);
  font-size: 11px;
}

.budget-source-sheet-list small {
  color: var(--ink-muted);
  font-size: 9px;
}

.budget-detail-panel .budget-line-table-wrap {
  margin-bottom: -18px;
}

@media (max-width: 1180px) {
  .budget-command-center {
    grid-template-columns: minmax(0, 1fr) 240px;
  }

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

  .budget-main-grid {
    grid-template-columns: 1fr;
  }

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

  .budget-verification-departments {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .budget-command-center {
    grid-template-columns: 1fr;
  }

  .budget-hero-score {
    min-height: 105px;
    justify-items: start;
    text-align: left;
  }

  .budget-view-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .budget-department-grid,
  .budget-operation-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .budget-verification-kpis,
  .budget-verification-departments {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .budget-verification-head,
  .budget-verification-scope,
  .budget-missing-store-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .budget-verification-scope > span {
    text-align: left;
  }

  .budget-review-list > div {
    grid-template-columns: 66px minmax(0, 1fr) auto;
  }

  .budget-review-list b {
    grid-column: 2;
  }

  .budget-review-list button {
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  .budget-view-toolbar,
  .budget-utility-panel,
  .budget-detail-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .budget-filter-pills {
    justify-content: flex-start;
  }

  .budget-toolbar-controls {
    width: 100%;
    flex-wrap: wrap;
  }

  .budget-toolbar-controls label {
    flex: 1 1 130px;
  }

  .budget-search-field {
    flex-basis: 100% !important;
  }

  .budget-search-field input {
    width: 100%;
  }

  .budget-source-modal-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .budget-entry-intro {
    grid-template-columns: 1fr;
  }

  .budget-missing-store-panel {
    align-items: flex-start;
  }
}

@media (max-width: 620px) {
  .budget-command-center {
    padding: 20px 17px;
  }

  .budget-source-tags > span:nth-child(1) {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .budget-view-tabs,
  .budget-kpi-grid,
  .budget-department-grid,
  .budget-operation-summary,
  .budget-verification-kpis,
  .budget-verification-departments,
  .budget-source-modal-summary,
  .budget-line-detail-summary {
    grid-template-columns: 1fr;
  }

  .budget-review-list > div {
    grid-template-columns: 1fr auto;
  }

  .budget-review-list > div > span,
  .budget-review-list > div > div,
  .budget-review-list b {
    grid-column: 1;
  }

  .budget-review-list button {
    grid-column: 2;
    grid-row: 1 / span 3;
  }

  .budget-month-chart {
    grid-template-columns: repeat(12, 54px);
  }

  .budget-panel-head {
    flex-direction: column;
  }

  .budget-missing-store-panel {
    flex-direction: column;
  }

  .budget-store-scope-large,
  .budget-store-scope-large select {
    width: 100%;
  }
}

.finance-expense-review {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 14px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.finance-expense-review > div {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  background: #f8fafb;
}

.finance-expense-review span,
.finance-expense-review small {
  color: var(--ink-muted);
  font-size: 9px;
  line-height: 1.45;
}

.finance-expense-review strong {
  color: var(--ink);
  font-size: 13px;
}

@media (max-width: 1180px) {
  .finance-hub-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .finance-hub-overview,
  .finance-channel-summary,
  .finance-reconcile-strip,
  .finance-loan-summary,
  .finance-invoice-summary,
  .finance-payable-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finance-hub-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finance-member-portal-frame {
    min-height: 680px;
  }
}

@media (max-width: 1100px) {
  body.member-portal-mode .workspace {
    height: calc(100vh - 68px);
    height: calc(100dvh - 68px);
  }
}

@media (max-width: 620px) {
  .finance-hub-overview,
  .finance-channel-summary,
  .finance-reconcile-strip,
  .finance-loan-summary,
  .finance-invoice-summary,
  .finance-payable-summary,
  .finance-hub-tabs,
  .finance-form-intro,
  .finance-expense-review {
    grid-template-columns: 1fr;
  }

  .finance-hub-tabs button {
    min-height: 64px;
  }

  .finance-member-portal-notice {
    align-items: flex-start;
    flex-direction: column;
  }

  body.member-portal-mode .workspace {
    padding: 8px 10px 10px;
  }

  body.member-portal-mode .finance-member-page-head {
    align-items: flex-start;
    gap: 7px;
  }

  body.member-portal-mode .finance-member-page-head p {
    display: none;
  }

  body.member-portal-mode .finance-member-page-head .button {
    height: 32px;
  }

  body.member-portal-mode .finance-member-portal-notice {
    flex-direction: row;
    gap: 5px;
    align-items: center;
    margin: 6px 8px;
  }

  body.member-portal-mode .finance-member-portal-copy {
    display: none;
  }

  body.member-portal-mode .finance-member-portal-frame {
    width: calc(100% - 16px);
    margin: 0 8px 8px;
  }
}

@media (max-width: 560px) {
  body.member-portal-mode .workspace {
    height: calc(100vh - 48px);
    height: calc(100dvh - 48px);
  }
}

html[data-client-terminal="tablet"] body.member-portal-mode .finance-member-page-head p,
html[data-client-terminal="tablet"] body.member-portal-mode .finance-member-portal-copy,
html[data-client-terminal="phone"] body.member-portal-mode .finance-member-portal-copy {
  display: none;
}

html[data-client-terminal="phone"] body.member-portal-mode .workspace {
  padding: 6px 8px 8px;
}

html[data-client-terminal="phone"] body.member-portal-mode .finance-member-page-head {
  display: none;
}

html[data-client-terminal="phone"] body.member-portal-mode .finance-member-portal-notice {
  margin: 6px 7px;
}

html[data-client-terminal="phone"] body.member-portal-mode .finance-member-portal-frame {
  width: calc(100% - 14px);
  margin: 0 7px 7px;
}

@media (max-height: 620px) {
  html[data-client-terminal="tablet"] body.member-portal-mode .finance-member-page-head {
    display: none;
  }

  html[data-client-terminal="tablet"] body.member-portal-mode .workspace {
    padding-top: 8px;
  }
}

.inventory-hub-head p {
  max-width: 940px;
}

.inventory-hub-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.inventory-hub-overview > div {
  display: grid;
  min-height: 116px;
  align-content: center;
  gap: 6px;
  padding: 17px 19px;
  background: linear-gradient(145deg, #f3faf8, #fff 60%);
  border: 1px solid #d9e8e4;
  border-radius: 13px;
}

.inventory-hub-overview span,
.inventory-hub-overview small {
  color: var(--ink-muted);
  font-size: 10px;
}

.inventory-hub-overview strong {
  color: var(--ink);
  font-size: 25px;
  line-height: 1.1;
}

.inventory-hub-overview strong small {
  margin: 0 2px;
  font-size: 10px;
}

.inventory-hub-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 16px;
  overflow: hidden;
  background: #d5e3e0;
  border: 1px solid #d5e3e0;
  border-radius: 12px;
}

.inventory-hub-tabs button {
  display: grid;
  min-height: 76px;
  align-content: center;
  gap: 4px;
  padding: 11px 12px;
  color: var(--ink-soft);
  background: #fff;
  border: 0;
  cursor: pointer;
  text-align: left;
}

.inventory-hub-tabs button strong {
  color: var(--ink);
  font-size: 12px;
}

.inventory-hub-tabs button span {
  font-size: 8.5px;
  line-height: 1.45;
}

.inventory-hub-tabs button.active {
  color: #fff;
  background: linear-gradient(145deg, #153e47, #287d77);
  box-shadow: inset 0 -3px 0 #ef995e;
}

.inventory-hub-tabs button.active strong,
.inventory-hub-tabs button.active span {
  color: #fff;
}

.inventory-form-intro {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 16px;
  overflow: hidden;
  background: #d8e4e2;
  border: 1px solid #d8e4e2;
  border-radius: 10px;
}

.inventory-form-intro > div {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  background: #f5faf8;
}

.inventory-form-intro strong {
  color: var(--ink);
  font-size: 11px;
}

.inventory-form-intro span {
  color: var(--ink-muted);
  font-size: 9px;
  line-height: 1.5;
}

.inventory-age-bands {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.inventory-age-bands > div {
  display: grid;
  min-height: 100px;
  align-content: center;
  gap: 5px;
  padding: 15px 17px;
  background: #f4faf8;
  border: 1px solid #d9e8e4;
  border-radius: 11px;
}

.inventory-age-bands span,
.inventory-age-bands small {
  color: var(--ink-muted);
  font-size: 9px;
}

.inventory-age-bands strong {
  color: var(--ink);
  font-size: 25px;
}

.inventory-age-bands .attention {
  background: #fffaf0;
  border-color: #ecdfc5;
}

.inventory-age-bands .warning {
  background: #fff7e9;
  border-color: #efd7b5;
}

.inventory-age-bands .critical {
  background: #fff1f1;
  border-color: #f1cece;
}

.inventory-promotion-head,
.inventory-reserve-vehicle {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 14px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.inventory-promotion-head > div,
.inventory-reserve-vehicle > div {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  background: #f8fafb;
}

.inventory-promotion-head span,
.inventory-promotion-head small,
.inventory-reserve-vehicle span {
  color: var(--ink-muted);
  font-size: 9px;
}

.inventory-promotion-head strong,
.inventory-reserve-vehicle strong {
  color: var(--ink);
  font-size: 13px;
}

.inventory-readonly-value {
  display: flex;
  min-height: 42px;
  align-items: center;
  padding: 8px 11px;
  background: #f4f7f8;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
}

body.inventory-panorama-mode .sidebar {
  display: none;
}

body.inventory-panorama-mode .main-area {
  margin-left: 0;
}

body.inventory-panorama-mode .workspace {
  max-width: none;
  padding: 14px 18px 26px;
}

body.inventory-panorama-mode .inventory-hub-head,
body.inventory-panorama-mode .inventory-hub-overview,
body.inventory-panorama-mode .inventory-hub-tabs {
  display: none;
}

.inventory-vehicle-toolbar {
  align-items: flex-start;
}

.inventory-vehicle-toolbar .toolbar-title {
  min-width: 0;
}

.inventory-vehicle-table-wrap {
  width: 100%;
  max-height: calc(100vh - 330px);
  min-height: 420px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable both-edges;
  background: #fff;
  border-top: 1px solid var(--line);
}

body.inventory-panorama-mode .inventory-vehicle-table-wrap {
  max-height: calc(100vh - 170px);
}

.inventory-vehicle-table {
  width: 100%;
  min-width: 980px;
  table-layout: fixed;
  font-size: 11px;
}

.inventory-vehicle-table th,
.inventory-vehicle-table td {
  padding: 10px 9px;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.inventory-vehicle-table th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #f7f9fa;
  white-space: nowrap;
}

.inventory-vehicle-table th:nth-child(1) { width: 15%; }
.inventory-vehicle-table th:nth-child(2) { width: 22%; }
.inventory-vehicle-table th:nth-child(3) { width: 10%; }
.inventory-vehicle-table th:nth-child(4) { width: 8%; }
.inventory-vehicle-table th:nth-child(5) { width: 8%; }
.inventory-vehicle-table th:nth-child(6) { width: 5%; }
.inventory-vehicle-table th:nth-child(7) { width: 8%; }
.inventory-vehicle-table th:nth-child(8) { width: 7%; }
.inventory-vehicle-table th:nth-child(9) { width: 16%; }

.inventory-vehicle-table td > strong,
.inventory-vehicle-table td > .muted {
  display: block;
}

.inventory-vehicle-model-cell strong,
.inventory-transfer-model-cell strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.4;
}

.inventory-vehicle-table .inventory-vehicle-model-cell .muted,
.inventory-transfer-model-cell .muted {
  display: -webkit-box;
  max-height: calc(1.45em * 3 + 14px);
  overflow: hidden;
  margin-top: 6px;
  padding: 7px 9px;
  color: #fff;
  background: linear-gradient(135deg, #075e68 0%, #0d8a7d 58%, #159d71 100%);
  border-radius: 10px;
  box-shadow: 0 5px 12px rgba(7, 94, 104, 0.2);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.14);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.inventory-vehicle-table td:first-child,
.inventory-vehicle-table th:first-child {
  position: sticky;
  left: 0;
  z-index: 3;
  background: #fff;
  box-shadow: 5px 0 8px -7px rgba(12, 31, 45, 0.35);
}

.inventory-vehicle-table thead th:first-child {
  z-index: 6;
  background: #f7f9fa;
}

.inventory-vehicle-table td.inventory-actions-column,
.inventory-vehicle-table th.inventory-actions-column {
  position: sticky;
  right: 0;
  z-index: 3;
  background: #fff;
  box-shadow: -5px 0 8px -7px rgba(12, 31, 45, 0.35);
}

.inventory-vehicle-table thead th.inventory-actions-column {
  z-index: 6;
  background: #f7f9fa;
}

.inventory-vehicle-table .inventory-actions-column .inline-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.inventory-vehicle-table .inventory-actions-column .button.small {
  min-height: 30px;
  padding-right: 9px;
  padding-left: 9px;
  font-size: 10px;
}

.inventory-vehicle-table tbody tr:hover td:first-child,
.inventory-vehicle-table tbody tr:hover td.inventory-actions-column {
  background: #f9fbfc;
}

.inventory-table-scroll-note {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  padding: 10px 13px;
  color: var(--ink-muted);
  background: #f8fafb;
  border-top: 1px solid var(--line);
  font-size: 9px;
}

.inventory-table-scroll-note span::before {
  margin-right: 5px;
  color: var(--teal);
  content: "•";
}

.parking-space-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 15px;
}

.parking-space-card {
  display: grid;
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.parking-space-card.available {
  background: linear-gradient(145deg, #f3fbf8, #fff);
  border-color: #d2e8e1;
}

.parking-space-card.occupied {
  background: linear-gradient(145deg, #fff9ed, #fff);
  border-color: #ead9ba;
}

.parking-space-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.parking-space-head > div {
  display: grid;
  gap: 3px;
}

.parking-space-head span,
.parking-space-head em,
.parking-space-body span,
.parking-space-body small {
  color: var(--ink-muted);
  font-size: 9px;
  font-style: normal;
}

.parking-space-head strong {
  color: var(--ink);
  font-size: 15px;
}

.parking-space-head em {
  padding: 3px 7px;
  color: #287767;
  background: #e8f5f0;
  border-radius: 99px;
  white-space: nowrap;
}

.parking-space-card.occupied .parking-space-head em {
  color: #8d5a1f;
  background: #fff0d6;
}

.parking-space-body {
  display: grid;
  gap: 4px;
}

.parking-space-body strong {
  color: var(--ink);
  font-size: 12px;
}

.parking-space-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.warning-text {
  color: #bd7626;
  font-weight: 700;
}

@media (max-width: 1180px) {
  .inventory-hub-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 900px) {
  .inventory-hub-overview,
  .inventory-age-bands {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inventory-hub-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inventory-vehicle-table-wrap {
    max-height: calc(100vh - 260px);
  }
}

@media (max-width: 620px) {
  .inventory-hub-overview,
  .inventory-age-bands,
  .inventory-hub-tabs,
  .inventory-form-intro,
  .inventory-promotion-head,
  .inventory-reserve-vehicle,
  .parking-space-grid {
    grid-template-columns: 1fr;
  }

  .inventory-hub-tabs button {
    min-height: 64px;
  }

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

  .inventory-vehicle-toolbar > .inline-actions {
    justify-content: stretch;
  }

  .inventory-vehicle-toolbar > .inline-actions .button {
    flex: 1;
  }

  .inventory-vehicle-table {
    min-width: 980px;
  }

  .accident-capture-intro {
    grid-template-columns: 1fr;
  }

  .accident-capture-duplicate {
    align-items: stretch;
    flex-direction: column;
  }
}

.marketing-hub-head p {
  max-width: 900px;
}

.marketing-hub-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.marketing-hub-overview > div {
  display: grid;
  min-height: 116px;
  align-content: center;
  gap: 6px;
  padding: 17px 19px;
  background: linear-gradient(145deg, #fff6f1, #fff 60%);
  border: 1px solid #ecddd5;
  border-radius: 13px;
}

.marketing-hub-overview span,
.marketing-hub-overview small {
  color: var(--ink-muted);
  font-size: 11px;
}

.marketing-hub-overview strong {
  color: var(--ink);
  font-size: 25px;
  line-height: 1.1;
}

.marketing-hub-overview strong small {
  margin-left: 3px;
  font-size: 10px;
}

.marketing-hub-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  margin-bottom: 16px;
  overflow: hidden;
  background: #e3d8d2;
  border: 1px solid #e3d8d2;
  border-radius: 12px;
}

.marketing-hub-tabs button {
  display: grid;
  min-height: 76px;
  align-content: center;
  gap: 4px;
  padding: 11px 13px;
  color: var(--ink-soft);
  background: #fff;
  border: 0;
  cursor: pointer;
  text-align: left;
}

.marketing-hub-tabs button strong {
  color: var(--ink);
  font-size: 13px;
}

.marketing-hub-tabs button span {
  font-size: 9.5px;
  line-height: 1.45;
}

.marketing-hub-tabs button.active {
  color: #fff;
  background: linear-gradient(145deg, #713f31, #c36d4f);
  box-shadow: inset 0 -3px 0 #f0b46c;
}

.marketing-hub-tabs button.active strong,
.marketing-hub-tabs button.active span {
  color: #fff;
}

.marketing-campaign-grid,
.marketing-asset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.marketing-campaign-card,
.marketing-asset-card {
  display: grid;
  gap: 11px;
  padding: 15px;
  background: linear-gradient(145deg, #fff, #fbf8f6);
  border: 1px solid #e3dbd5;
  border-radius: 12px;
}

.marketing-campaign-head,
.marketing-asset-head,
.marketing-campaign-foot,
.marketing-asset-foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.marketing-campaign-head > div {
  display: grid;
  gap: 3px;
}

.marketing-campaign-head span,
.marketing-campaign-head small,
.marketing-campaign-dates,
.marketing-campaign-card > p,
.marketing-campaign-foot > span,
.marketing-asset-card > p,
.marketing-asset-meta,
.marketing-asset-foot {
  color: var(--ink-muted);
  font-size: 9px;
  line-height: 1.5;
}

.marketing-campaign-head strong,
.marketing-asset-card > strong {
  color: var(--ink);
  font-size: 16px;
}

.marketing-campaign-head em,
.marketing-asset-head em {
  flex: 0 0 auto;
  font-style: normal;
}

.marketing-campaign-dates {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.marketing-campaign-budget {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.marketing-campaign-budget > div {
  display: grid;
  gap: 3px;
  padding: 9px;
  background: #fff;
}

.marketing-campaign-budget span,
.marketing-campaign-metrics {
  color: var(--ink-muted);
  font-size: 8.5px;
}

.marketing-campaign-budget strong {
  color: var(--ink);
  font-size: 12px;
}

.marketing-campaign-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.marketing-campaign-metrics span {
  padding: 8px;
  background: #f8f3f0;
  border-radius: 7px;
  text-align: center;
}

.marketing-campaign-metrics b {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 12px;
}

.marketing-campaign-card > p {
  margin: 0;
}

.marketing-campaign-foot,
.marketing-asset-foot {
  align-items: center;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.marketing-roi-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 16px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 11px;
}

.marketing-roi-summary > div {
  display: grid;
  gap: 5px;
  min-height: 82px;
  align-content: center;
  padding: 14px 16px;
  background: #fff;
}

.marketing-roi-summary span {
  color: var(--ink-muted);
  font-size: 9px;
}

.marketing-roi-summary strong {
  color: var(--ink);
  font-size: 18px;
}

.marketing-income-summary,
.marketing-newmedia-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 14px;
  overflow: hidden;
  background: #dfd5cf;
  border: 1px solid #dfd5cf;
  border-radius: 12px;
}

.marketing-support-rule-panel {
  margin-bottom: 14px;
}

.marketing-support-rule-table td,
.marketing-support-rule-table th {
  font-size: 10.5px;
}

.marketing-support-rule-table .status {
  white-space: nowrap;
}

.form-field.is-disabled {
  opacity: .58;
}

.marketing-income-summary > div,
.marketing-newmedia-summary > div {
  display: grid;
  gap: 6px;
  min-height: 100px;
  align-content: center;
  padding: 15px 17px;
  background: linear-gradient(145deg, #fff, #fbf7f4);
}

.marketing-income-summary span,
.marketing-income-summary small,
.marketing-newmedia-summary span,
.marketing-newmedia-summary small {
  color: var(--ink-muted);
  font-size: 10.5px;
}

.marketing-income-summary strong,
.marketing-newmedia-summary strong {
  color: var(--ink);
  font-size: 21px;
}

.marketing-income-summary strong small,
.marketing-newmedia-summary strong small {
  font-size: 11px;
}

.marketing-accounting-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 14px;
  padding: 11px 14px;
  color: #68483a;
  background: #fff8ef;
  border: 1px solid #eed9c4;
  border-radius: 10px;
  font-size: 11px;
  line-height: 1.65;
}

.marketing-accounting-note strong {
  flex: 0 0 auto;
}

.marketing-income-table td,
.marketing-income-table th {
  font-size: 11px;
}

.marketing-score-rule {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
  gap: 1px;
  margin-bottom: 14px;
  overflow: hidden;
  background: #e5d8d1;
  border: 1px solid #e5d8d1;
  border-radius: 11px;
}

.marketing-score-rule > div {
  display: grid;
  gap: 4px;
  padding: 11px 13px;
  background: #fff;
}

.marketing-score-rule span {
  color: var(--ink-muted);
  font-size: 9.5px;
}

.marketing-score-rule strong {
  color: #8c5038;
  font-size: 15px;
}

.marketing-score-rule > button {
  align-self: stretch;
  margin: 8px;
}

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

.marketing-newmedia-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(150deg, #fff, #fbf8f5);
  border: 1px solid #dfd7d1;
  border-radius: 13px;
}

.marketing-newmedia-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.marketing-newmedia-head > div {
  display: grid;
  gap: 4px;
}

.marketing-newmedia-head span,
.marketing-newmedia-head small {
  color: var(--ink-muted);
  font-size: 10px;
}

.marketing-newmedia-head strong {
  color: var(--ink);
  font-size: 17px;
}

.marketing-newmedia-head em {
  flex: 0 0 auto;
  font-style: normal;
}

.marketing-support-banner {
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  border-radius: 9px;
}

.marketing-support-banner.achieved {
  color: #185c50;
  background: #ecf8f5;
  border: 1px solid #c7e7df;
}

.marketing-support-banner.gap {
  color: #855031;
  background: #fff7ec;
  border: 1px solid #efd7bd;
}

.marketing-support-banner.missing {
  color: #7e3434;
  background: #fff3f3;
  border: 1px solid #ead0d0;
}

.marketing-support-banner strong {
  font-size: 12px;
}

.marketing-support-banner span {
  font-size: 9.5px;
}

.marketing-support-track {
  height: 6px;
  overflow: hidden;
  background: rgba(106, 76, 61, .13);
  border-radius: 99px;
}

.marketing-support-track i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #c36d4f, #e2a65d);
  border-radius: inherit;
}

.marketing-newmedia-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.marketing-newmedia-kpis > div {
  display: grid;
  gap: 4px;
  min-height: 62px;
  align-content: center;
  padding: 9px;
  background: #f7f3f0;
  border-radius: 8px;
}

.marketing-newmedia-kpis span {
  color: var(--ink-muted);
  font-size: 8.5px;
}

.marketing-newmedia-kpis strong {
  color: var(--ink);
  font-size: 12px;
}

.marketing-newmedia-kpis strong small {
  color: var(--ink-muted);
  font-size: 9px;
  font-weight: 500;
}

.marketing-performance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.marketing-performance-row > div:first-child {
  display: grid;
  gap: 3px;
}

.marketing-performance-row span,
.marketing-performance-row small {
  color: var(--ink-muted);
  font-size: 9px;
}

.marketing-performance-row strong {
  color: #7f4935;
  font-size: 14px;
}

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

.marketing-asset-head span {
  color: #a95e43;
  font-size: 9px;
  font-weight: 700;
}

.marketing-asset-card > p {
  min-height: 38px;
  margin: 0;
}

.marketing-asset-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.marketing-asset-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.marketing-asset-tags em,
.marketing-segment-rules em {
  padding: 3px 7px;
  color: #9d604b;
  background: #fff0e9;
  border-radius: 99px;
  font-size: 8px;
  font-style: normal;
}

.marketing-segment-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 14px;
}

.marketing-segment-list,
.marketing-segment-detail {
  align-self: start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.marketing-segment-list {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.marketing-segment-card {
  display: grid;
  gap: 4px;
  padding: 11px;
  color: var(--ink-soft);
  background: #fafbfc;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
  text-align: left;
}

.marketing-segment-card > span,
.marketing-segment-card > small {
  color: var(--ink-muted);
  font-size: 8.5px;
  line-height: 1.45;
}

.marketing-segment-card strong {
  color: var(--ink);
  font-size: 12px;
}

.marketing-segment-card em {
  color: #9a5a3e;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}

.marketing-segment-card.active {
  background: #fff4ed;
  border-color: #dbb7a7;
  box-shadow: inset 3px 0 0 #c36d4f;
}

.marketing-segment-detail {
  overflow: hidden;
}

.marketing-segment-rules {
  display: grid;
  gap: 7px;
  margin: 0 15px 13px;
  padding: 11px 13px;
  color: var(--ink-soft);
  background: #fff9f4;
  border: 1px solid #efddd2;
  border-radius: 9px;
  font-size: 9px;
  line-height: 1.6;
}

.marketing-segment-rules strong small {
  color: var(--ink-muted);
  font-weight: 400;
}

.marketing-push-empty {
  padding: 16px;
  color: var(--ink-muted);
  font-size: 10px;
  text-align: center;
}

.marketing-form-intro {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 16px;
  overflow: hidden;
  background: #e6dbd5;
  border: 1px solid #e6dbd5;
  border-radius: 10px;
}

.marketing-form-intro > div {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  background: #fff9f5;
}

.marketing-form-intro strong {
  color: var(--ink);
  font-size: 11px;
}

.marketing-form-intro span {
  color: var(--ink-muted);
  font-size: 9px;
}

.marketing-store-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-top: 7px;
}

.marketing-store-options .form-check {
  padding: 8px 9px;
  background: #faf8f6;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.marketing-live-preview {
  display: flex;
  min-height: 42px;
  align-items: center;
  padding: 8px 11px;
  color: #884728;
  background: #fff3eb;
  border: 1px solid #ecd3c2;
  border-radius: 8px;
  font-size: 14px;
}

.marketing-push-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 14px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.marketing-push-summary > div {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  background: #faf8f7;
}

.marketing-push-summary span,
.marketing-push-summary small {
  color: var(--ink-muted);
  font-size: 9px;
  line-height: 1.45;
}

.marketing-push-summary strong {
  color: var(--ink);
  font-size: 13px;
}

@media (max-width: 1180px) {
  .marketing-asset-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .marketing-segment-layout {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .marketing-store-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .marketing-hub-overview,
  .marketing-roi-summary,
  .marketing-income-summary,
  .marketing-newmedia-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .marketing-campaign-grid,
  .marketing-asset-grid,
  .marketing-segment-layout,
  .marketing-newmedia-grid {
    grid-template-columns: 1fr;
  }

  .marketing-score-rule {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .marketing-score-rule > button {
    grid-column: 1 / -1;
    min-height: 42px;
  }

  .marketing-segment-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .marketing-hub-overview,
  .marketing-roi-summary,
  .marketing-income-summary,
  .marketing-newmedia-summary,
  .marketing-hub-tabs,
  .marketing-form-intro,
  .marketing-segment-list,
  .marketing-store-options,
  .marketing-push-summary,
  .marketing-score-rule,
  .marketing-newmedia-kpis {
    grid-template-columns: 1fr;
  }

  .marketing-hub-tabs button {
    min-height: 64px;
  }

  .marketing-campaign-foot,
  .marketing-asset-foot,
  .marketing-performance-row,
  .marketing-accounting-note {
    align-items: stretch;
    flex-direction: column;
  }

  .marketing-performance-row > .inline-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

.marketing-campaign-form {
  max-width: 1180px;
  margin: 0 auto;
}

.marketing-campaign-form .marketing-form-intro {
  margin-bottom: 14px;
}

.marketing-campaign-form .form-grid {
  gap: 14px 15px;
}

.marketing-campaign-form .form-field > label,
.marketing-campaign-form .form-label {
  color: #40555f;
  font-size: 11px;
  font-weight: 680;
}

.marketing-campaign-form .form-field input,
.marketing-campaign-form .form-field select {
  min-height: 42px;
  font-size: 12px;
}

.marketing-plan-editor {
  min-height: 122px;
  resize: vertical;
  line-height: 1.7;
}

.marketing-campaign-form .marketing-store-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.marketing-campaign-form .marketing-store-options .form-check {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  background: #fbfaf9;
  border: 1px solid #e4ded9;
  border-radius: 8px;
}

.marketing-campaign-form .marketing-store-options .form-check:hover {
  background: #fff8f3;
  border-color: #dab8a7;
}

.marketing-campaign-form .marketing-store-options .form-check-input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  flex: 0 0 18px;
  border-radius: 5px;
}

.marketing-campaign-form .marketing-store-options .form-check-label {
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 550;
  line-height: 1.4;
}

.marketing-attachment-panel {
  padding: 13px 14px;
  background: linear-gradient(145deg, #f7faf9, #fffaf6);
  border: 1px solid #dce7e2;
  border-radius: 10px;
}

.marketing-attachment-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.marketing-attachment-heading > div {
  display: grid;
  gap: 3px;
}

.marketing-attachment-heading strong {
  color: var(--ink);
  font-size: 11px;
}

.marketing-attachment-heading span {
  color: var(--ink-muted);
  font-size: 9px;
  line-height: 1.5;
}

.marketing-attachment-preview {
  margin-bottom: 9px;
}

.marketing-attachment-empty {
  padding: 13px;
  color: var(--ink-muted);
  background: rgba(255, 255, 255, 0.78);
  border: 1px dashed #cddbd7;
  border-radius: 8px;
  font-size: 9px;
  text-align: center;
}

.marketing-attachment-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  background: #fff;
  border: 1px solid #d8e5e0;
  border-radius: 8px;
}

.marketing-attachment-file > div:first-child {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.marketing-attachment-file strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marketing-attachment-file span,
.marketing-attachment-actions > span {
  color: var(--ink-muted);
  font-size: 8.5px;
}

.marketing-attachment-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

@media (max-width: 760px) {
  .marketing-campaign-form .marketing-store-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .marketing-attachment-file,
  .marketing-attachment-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .marketing-campaign-form .marketing-store-options {
    grid-template-columns: 1fr;
  }
}

.group-control-head p {
  max-width: 920px;
}

.group-control-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.group-control-overview > div {
  display: grid;
  min-height: 112px;
  align-content: center;
  gap: 6px;
  padding: 17px 19px;
  background: linear-gradient(145deg, #f1f7fa, #fff 60%);
  border: 1px solid #d8e4e9;
  border-radius: 13px;
}

.group-control-overview span,
.group-control-overview small {
  color: var(--ink-muted);
  font-size: 9px;
}

.group-control-overview strong {
  color: var(--ink);
  font-size: 23px;
}

.group-control-overview strong small {
  margin: 0 2px;
  font-size: 9px;
}

.group-control-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 16px;
  overflow: hidden;
  background: #d7e2e8;
  border: 1px solid #d7e2e8;
  border-radius: 12px;
}

.group-control-tabs button {
  display: grid;
  min-height: 76px;
  align-content: center;
  gap: 4px;
  padding: 11px 13px;
  color: var(--ink-soft);
  background: #fff;
  border: 0;
  cursor: pointer;
  text-align: left;
}

.group-control-tabs button strong {
  color: var(--ink);
  font-size: 12px;
}

.group-control-tabs button span {
  font-size: 8.5px;
  line-height: 1.45;
}

.group-control-tabs button.active {
  color: #fff;
  background: linear-gradient(145deg, #18394c, #28728b);
  box-shadow: inset 0 -3px 0 #f1a05f;
}

.group-control-tabs button.active strong,
.group-control-tabs button.active span {
  color: #fff;
}

.group-report-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.group-report-modes {
  display: flex;
  gap: 6px;
}

.group-report-toolbar > span {
  color: var(--ink-muted);
  font-size: 9px;
}

.group-report-summary,
.group-approval-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 16px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 11px;
}

.group-report-summary > div,
.group-approval-summary > div {
  display: grid;
  min-height: 82px;
  align-content: center;
  gap: 5px;
  padding: 14px 16px;
  background: #fff;
}

.group-report-summary span,
.group-approval-summary span {
  color: var(--ink-muted);
  font-size: 9px;
}

.group-report-summary strong,
.group-approval-summary strong {
  color: var(--ink);
  font-size: 18px;
}

.group-report-summary strong small,
.group-approval-summary strong small {
  margin-left: 3px;
  color: var(--ink-muted);
  font-size: 9px;
}

.group-kpi-preview {
  display: flex;
  min-height: 42px;
  align-items: center;
  padding: 8px 11px;
  color: #1c6171;
  background: #eef7f9;
  border: 1px solid #cfe3e8;
  border-radius: 8px;
  font-size: 18px;
}

.group-approval-list {
  display: grid;
  gap: 8px;
  padding: 14px 16px 17px;
}

.group-approval-list > div {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) minmax(200px, auto);
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.group-approval-list span,
.group-approval-list small {
  color: var(--ink-muted);
  font-size: 9px;
}

.group-approval-list strong {
  color: var(--ink);
  font-size: 11px;
}

.group-approval-empty {
  padding: 18px;
  color: var(--ink-muted);
  font-size: 10px;
  text-align: center;
}

.group-claim-review {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 14px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.group-claim-review > div {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  background: #f8fafb;
}

.group-claim-review span,
.group-claim-review small {
  color: var(--ink-muted);
  font-size: 9px;
  line-height: 1.45;
}

.group-claim-review strong {
  color: var(--ink);
  font-size: 13px;
}

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

@media (max-width: 900px) {
  .group-control-overview,
  .group-report-summary,
  .group-approval-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .group-approval-list > div {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .group-control-overview,
  .group-report-summary,
  .group-approval-summary,
  .group-control-tabs,
  .group-claim-review {
    grid-template-columns: 1fr;
  }

  .group-control-tabs button {
    min-height: 64px;
  }

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

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

.after-sales-daily-panel {
  margin-bottom: 16px;
}

.after-sales-daily-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  padding: 0 15px 14px;
  background: var(--line);
}

.after-sales-daily-summary > div {
  display: grid;
  gap: 5px;
  min-height: 72px;
  align-content: center;
  padding: 12px 14px;
  background: #f8fafb;
}

.after-sales-daily-summary span {
  color: var(--ink-muted);
  font-size: 9px;
}

.after-sales-daily-summary strong {
  color: var(--ink);
  font-size: 17px;
}

.after-sales-daily-summary strong small {
  margin-left: 3px;
  color: var(--ink-muted);
  font-size: 9px;
}

.insurance-premium-head p {
  max-width: 980px;
}

.insurance-customer-search-panel {
  overflow: hidden;
  margin-bottom: 16px;
  padding: 0;
  border-color: #bfdcd5;
  box-shadow: 0 14px 38px rgba(13, 94, 82, 0.08);
}

.insurance-customer-search-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px 16px;
  color: #f7fffc;
  background:
    radial-gradient(circle at 88% 10%, rgba(101, 201, 172, 0.24), transparent 34%),
    linear-gradient(135deg, #0b3540, #0f5d58);
}

.insurance-customer-search-head > div:first-child {
  min-width: 0;
}

.insurance-customer-search-head span,
.insurance-customer-search-head p {
  color: rgba(237, 255, 250, 0.72);
}

.insurance-customer-search-head span {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.insurance-customer-search-head h2 {
  margin: 5px 0 6px;
  font-size: 19px;
  line-height: 1.3;
}

.insurance-customer-search-head p {
  margin: 0;
  font-size: 10px;
  line-height: 1.65;
}

.insurance-customer-search-example {
  display: grid;
  min-width: 190px;
  grid-template-columns: auto 1fr;
  gap: 4px 9px;
  padding: 11px 13px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
}

.insurance-customer-search-example span {
  grid-column: 1 / -1;
}

.insurance-customer-search-example strong {
  font-size: 10px;
}

.insurance-customer-search-example small {
  color: rgba(237, 255, 250, 0.62);
  font-size: 8px;
}

.insurance-customer-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 15px 20px 12px;
  padding: 8px 9px 8px 13px;
  background: #f7fbfa;
  border: 1px solid #aed2ca;
  border-radius: 11px;
}

.insurance-customer-search-box:focus-within {
  background: #fff;
  border-color: #2f9483;
  box-shadow: 0 0 0 4px rgba(21, 134, 111, 0.09);
}

.insurance-customer-search-box > svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: #1a826f;
}

.insurance-customer-search-box input {
  min-width: 0;
  flex: 1;
  padding: 6px 0;
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 12px;
}

.insurance-customer-search-box .insurance-search-submit {
  min-width: 76px;
  min-height: 36px;
  color: #fff;
  background: #138a70;
  border: 1px solid #0d755f;
  box-shadow: 0 7px 16px rgba(15, 126, 103, 0.23);
  font-size: 11px;
  font-weight: 700;
}

.insurance-customer-search-box .insurance-search-submit:hover {
  background: #0e7963;
}

#insuranceCustomerSearchResults {
  padding: 0 20px 18px;
}

.insurance-customer-search-empty {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 13px 15px;
  color: #627881;
  background: #f7faf9;
  border: 1px dashed #c8d9d4;
  border-radius: 10px;
}

.insurance-customer-search-empty > svg {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  color: #78a99f;
}

.insurance-customer-search-empty strong {
  color: #29454d;
  font-size: 11px;
}

.insurance-customer-search-empty p {
  margin: 4px 0 0;
  font-size: 9px;
  line-height: 1.55;
}

.insurance-customer-search-table {
  min-width: 1260px;
}

/* The compact card layout is declared earlier in the file. This later
   override is required because the desktop table minimum width would
   otherwise win by source order on 1000–1366px foldable/tablet screens. */
@media (max-width: 1366px) {
  .insurance-customer-search-table {
    min-width: 0;
  }
}

.insurance-customer-search-table td small {
  display: block;
}

.insurance-customer-search-table td .renewal-lost-search-chip {
  width: max-content;
  margin-top: 6px;
  padding: 3px 7px;
  color: #a63228;
  background: #fde8e3;
  border: 1px solid #f0b9af;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
}

.insurance-energy-chip {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding: 3px 7px;
  color: #46616a;
  background: #eef3f4;
  border: 1px solid #d8e2e4;
  border-radius: 999px;
  font-size: 8px;
  font-style: normal;
  font-weight: 650;
  line-height: 1.2;
}

.insurance-energy-chip.electric {
  color: #0b6e5e;
  background: #e9f8f3;
  border-color: #b8dfd4;
}

.insurance-energy-chip.fuel {
  color: #87551e;
  background: #fff6e9;
  border-color: #efd6b3;
}

.insurance-energy-chip.unknown {
  color: #91582a;
  background: #fff3ea;
  border-color: #efceb8;
}

.insurance-quote-coverage-head,
.insurance-quote-coverage-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) minmax(160px, 1fr) minmax(120px, 0.7fr) 32px;
  gap: 8px;
  align-items: center;
}

.insurance-quote-coverage-head {
  margin-top: 4px;
  padding: 8px 10px;
  color: #637980;
  background: #eef4f3;
  border: 1px solid #d9e4e1;
  border-radius: 8px 8px 0 0;
  font-size: 8px;
  font-weight: 700;
}

.insurance-quote-coverage-row {
  padding: 7px 10px;
  border-right: 1px solid #e1e9e7;
  border-bottom: 1px solid #e1e9e7;
  border-left: 1px solid #e1e9e7;
}

.insurance-quote-coverage-row:nth-child(odd) {
  background: #fbfcfc;
}

.insurance-quote-coverage-row input {
  min-width: 0;
}

.renewal-quote-attachment-panel {
  display: grid;
  gap: 11px;
  margin: 14px 0;
  padding: 14px;
  background: linear-gradient(145deg, #f4faf8, #fbfdfc);
  border: 1px solid #cfe2dc;
  border-radius: 12px;
}

.renewal-quote-attachment-heading,
.renewal-quote-attachment-upload,
.renewal-quote-ocr-result-head,
.renewal-quote-ocr-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.renewal-quote-attachment-heading > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.renewal-quote-attachment-heading > div > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #18725f;
  background: #e4f5ef;
  border: 1px solid #b9dfd4;
  border-radius: 9px;
}

.renewal-quote-attachment-heading svg {
  width: 18px;
  height: 18px;
}

.renewal-quote-attachment-heading strong,
.renewal-quote-attachment-upload strong,
.renewal-quote-ocr-result-head strong {
  display: block;
  color: var(--ink);
  font-size: 11px;
}

.renewal-quote-attachment-heading small,
.renewal-quote-attachment-upload span,
.renewal-quote-ocr-result-head span,
.renewal-quote-ocr-raw,
.renewal-quote-ocr-groups small {
  color: var(--ink-muted);
  font-size: 8px;
  line-height: 1.55;
}

.renewal-quote-attachment-upload {
  padding: 11px 12px;
  background: #fff;
  border: 1px dashed #b7d7ce;
  border-radius: 9px;
}

.renewal-quote-attachment-upload > div {
  display: grid;
  gap: 3px;
}

.renewal-quote-ocr-opt-in {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 12px;
  color: #445f5a;
  background: #fff;
  border: 1px solid #d8e6e1;
  border-radius: 9px;
  cursor: pointer;
}

.renewal-quote-ocr-opt-in input {
  margin-top: 2px;
}

.renewal-quote-ocr-opt-in span {
  display: grid;
  gap: 3px;
}

.renewal-quote-ocr-opt-in strong {
  font-size: 9px;
}

.renewal-quote-ocr-opt-in small {
  color: var(--ink-muted);
  font-size: 8px;
  line-height: 1.5;
}

.renewal-quote-data-clean-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #fff5f3;
  border: 1px solid #edc6bd;
  border-radius: 9px;
}

.renewal-quote-data-clean-row > span {
  color: #7a4a42;
  font-size: 8px;
  line-height: 1.5;
}

.button.danger.renewal-quote-data-clean-button {
  min-width: 112px;
  min-height: 36px;
  color: #fff;
  background: linear-gradient(135deg, #c9342e, #e15448);
  border-color: #c9342e;
  box-shadow: 0 7px 18px rgba(196, 53, 46, .22);
  font-weight: 700;
}

.button.primary.renewal-quote-upload-button {
  min-width: 164px;
  min-height: 42px;
  padding-inline: 18px;
  color: #fff;
  background: linear-gradient(135deg, #138a68, #20a67c);
  border-color: #138a68;
  box-shadow: 0 8px 20px rgba(19, 138, 104, .24);
  font-weight: 700;
}

.button.primary.renewal-quote-upload-button:hover {
  background: linear-gradient(135deg, #0f795b, #188f6b);
  border-color: #0f795b;
}

.renewal-quote-attachment-list {
  display: grid;
  gap: 7px;
}

.renewal-quote-attachment-list > div:not(.renewal-quote-attachment-empty) {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  background: #fff;
  border: 1px solid #dce8e4;
  border-radius: 8px;
}

.renewal-quote-attachment-list > div > span {
  color: #1c7d69;
}

.renewal-quote-attachment-list > div > span svg {
  width: 18px;
  height: 18px;
}

.renewal-quote-attachment-list strong {
  min-width: 0;
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.renewal-quote-attachment-list small {
  color: var(--ink-muted);
  font-size: 8px;
}

.renewal-quote-attachment-empty {
  padding: 12px;
  color: var(--ink-muted);
  text-align: center;
  background: #fff;
  border: 1px dashed #d4e2de;
  border-radius: 8px;
  font-size: 9px;
}

.renewal-quote-ocr-status {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 10px 12px;
  color: #245c53;
  background: #eaf7f3;
  border: 1px solid #c5e3da;
  border-radius: 9px;
}

.renewal-quote-ocr-status.is-error {
  color: #8b3228;
  background: #fff2ef;
  border-color: #ecc4bd;
}

.renewal-quote-ocr-status > svg,
.renewal-quote-ocr-status .spinner {
  flex: 0 0 auto;
}

.renewal-quote-ocr-status strong {
  display: block;
  font-size: 10px;
}

.renewal-quote-ocr-status small {
  display: block;
  margin-top: 2px;
  color: inherit;
  opacity: .8;
  font-size: 8px;
  line-height: 1.45;
}

.renewal-quote-ocr-admin {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.renewal-quote-ocr-admin > div {
  flex: 1;
  padding: 10px;
  background: #fff;
  border: 1px solid #dfe8e5;
  border-radius: 9px;
}

.renewal-quote-ocr-admin > div > small {
  display: block;
  margin-top: 7px;
  color: var(--ink-muted);
  font-size: 8px;
}

#renewalQuoteOcrResult {
  display: grid;
  gap: 11px;
  padding: 12px;
  background: #fff;
  border: 1px solid #d7e5e1;
  border-radius: 10px;
}

#renewalQuoteOcrResult[hidden] {
  display: none;
}

.renewal-quote-ocr-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: #e1eae7;
  border: 1px solid #e1eae7;
  border-radius: 8px;
}

.renewal-quote-ocr-identity {
  display: grid;
  gap: 9px;
  padding: 11px;
  border: 1px solid;
  border-radius: 9px;
}

.renewal-quote-ocr-identity.is-match {
  color: #176a56;
  background: #ecf8f3;
  border-color: #b8dfd0;
}

.renewal-quote-ocr-identity.is-mismatch {
  color: #8a3027;
  background: #fff2ef;
  border-color: #e9bdb5;
}

.renewal-quote-ocr-identity-head {
  display: flex;
  align-items: center;
  gap: 9px;
}

.renewal-quote-ocr-identity-head > span {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
}

.renewal-quote-ocr-identity-head svg {
  width: 20px;
  height: 20px;
}

.renewal-quote-ocr-identity-head strong {
  display: block;
  font-size: 10px;
}

.renewal-quote-ocr-identity-head small {
  display: block;
  margin-top: 2px;
  color: inherit;
  opacity: .82;
  font-size: 8px;
  line-height: 1.5;
}

.renewal-quote-ocr-identity-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.renewal-quote-ocr-identity-grid > div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, .82);
  border-left: 3px solid #b8c7c3;
  border-radius: 6px;
}

.renewal-quote-ocr-identity-grid > div.pass {
  border-left-color: #24936f;
}

.renewal-quote-ocr-identity-grid > div.fail {
  border-left-color: #c94e42;
}

.renewal-quote-ocr-identity-grid > div.warning {
  border-left-color: #d39439;
}

.renewal-quote-ocr-identity-grid span,
.renewal-quote-ocr-identity-grid small {
  overflow: hidden;
  color: var(--ink-muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.renewal-quote-ocr-identity-grid strong {
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.renewal-quote-ocr-kpis > div {
  display: grid;
  gap: 4px;
  padding: 9px;
  background: #f9fcfb;
}

.renewal-quote-ocr-kpis span {
  color: var(--ink-muted);
  font-size: 8px;
}

.renewal-quote-ocr-kpis strong {
  font-size: 10px;
}

.renewal-quote-ocr-groups {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.renewal-quote-ocr-groups label {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  min-height: 58px;
  padding: 9px;
  background: #f7fbfa;
  border: 1px solid #dde9e5;
  border-radius: 8px;
}

.renewal-quote-ocr-groups label span {
  display: grid;
  gap: 3px;
}

.renewal-quote-ocr-groups strong {
  font-size: 9px;
}

.renewal-quote-ocr-groups input {
  margin-top: 2px;
}

.renewal-quote-ocr-raw summary {
  color: #246c5e;
  font-size: 9px;
  cursor: pointer;
}

.renewal-quote-ocr-raw textarea {
  width: 100%;
  margin: 8px 0;
  padding: 9px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  line-height: 1.55;
}

.renewal-quote-ocr-manual-text {
  width: 100%;
  padding: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  line-height: 1.6;
}

.quote-attachment-link {
  display: block;
  max-width: 180px;
  overflow: hidden;
  color: #1b786a;
  font-size: 8px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

button.quote-attachment-link {
  padding: 0;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
}

body.renewal-quote-preview-open {
  overflow: hidden;
}

.renewal-quote-preview-overlay {
  display: grid;
  position: fixed;
  z-index: 180;
  inset: 0;
  place-items: center;
  padding: 22px;
  background: rgba(10, 26, 31, .58);
  backdrop-filter: blur(5px);
}

.renewal-quote-preview-shell {
  display: grid;
  width: min(1480px, 96vw);
  height: min(920px, 93vh);
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 16px;
  box-shadow: 0 28px 80px rgba(4, 20, 25, .35);
}

.renewal-quote-preview-header,
.renewal-quote-preview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
}

.renewal-quote-preview-header {
  border-bottom: 1px solid var(--line);
}

.renewal-quote-preview-header span {
  color: var(--ink-muted);
  font-size: 8px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.renewal-quote-preview-header h2 {
  margin: 3px 0 0;
  font-size: 17px;
}

.renewal-quote-preview-footer {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
}

.renewal-quote-preview-shell > .renewal-quote-attachment-preview {
  min-height: 0;
  padding: 12px 16px;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.renewal-quote-preview-shell .renewal-quote-image-viewport {
  height: auto;
  min-height: 0;
}

.renewal-quote-attachment-preview {
  display: grid;
  gap: 10px;
  justify-items: stretch;
  background: #fff;
}

.renewal-quote-image-toolbar {
  display: flex;
  position: sticky;
  z-index: 2;
  top: 0;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 10px;
  background: rgba(247, 251, 249, .96);
  border: 1px solid #dce8e3;
  border-radius: 9px;
  backdrop-filter: blur(8px);
}

.renewal-quote-image-toolbar strong {
  min-width: 54px;
  color: #1d6759;
  text-align: center;
  font-size: 10px;
}

.renewal-quote-image-viewport {
  width: 100%;
  height: max(360px, calc(100vh - 300px));
  padding: 12px;
  overflow: auto;
  text-align: center;
  background:
    linear-gradient(45deg, #f2f5f4 25%, transparent 25%),
    linear-gradient(-45deg, #f2f5f4 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f2f5f4 75%),
    linear-gradient(-45deg, transparent 75%, #f2f5f4 75%);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.renewal-quote-image-viewport img {
  display: block;
  margin: 0 auto;
  width: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(17, 52, 45, .12);
}

.renewal-quote-attachment-preview:fullscreen {
  padding: 14px;
  overflow: auto;
  background: #f5f8f7;
}

.renewal-quote-attachment-preview:fullscreen .renewal-quote-image-viewport {
  height: calc(100vh - 120px);
}

.renewal-quote-attachment-preview > div:last-child {
  display: grid;
  gap: 3px;
  justify-self: stretch;
  padding: 9px 11px;
  background: #f6faf8;
  border: 1px solid #dce9e4;
  border-radius: 8px;
}

.renewal-quote-attachment-preview span {
  font-size: 9px;
  font-weight: 650;
}

.renewal-quote-attachment-preview small {
  color: var(--ink-muted);
  font-size: 8px;
}

@media (max-width: 1100px) {
  .renewal-quote-ocr-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .renewal-quote-ocr-identity-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .renewal-quote-ocr-groups {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .renewal-quote-preview-overlay {
    padding: 0;
  }

  .renewal-quote-preview-shell {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
  }

  .renewal-quote-preview-header,
  .renewal-quote-preview-footer {
    padding: 10px 12px;
  }

  .renewal-quote-preview-shell > .renewal-quote-attachment-preview {
    padding: 8px;
  }

  .renewal-quote-image-toolbar {
    flex-wrap: wrap;
  }

  .renewal-quote-image-viewport {
    height: max(320px, calc(100vh - 320px));
  }

  .renewal-quote-attachment-heading,
  .renewal-quote-attachment-upload,
  .renewal-quote-ocr-result-head,
  .renewal-quote-ocr-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .renewal-quote-attachment-list > div:not(.renewal-quote-attachment-empty) {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .renewal-quote-attachment-list > div > small,
  .renewal-quote-attachment-list > div > .inline-actions {
    grid-column: 2;
  }

  .renewal-quote-ocr-kpis,
  .renewal-quote-ocr-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .renewal-quote-ocr-identity-grid {
    grid-template-columns: 1fr;
  }

  .renewal-quote-ocr-admin {
    flex-direction: column;
  }

  .renewal-quote-ocr-admin > div {
    width: 100%;
  }
}

@media (max-width: 460px) {
  .renewal-quote-ocr-kpis,
  .renewal-quote-ocr-groups {
    grid-template-columns: 1fr;
  }
}

.renewal-insurance-history details {
  min-width: 220px;
  color: #617780;
  font-size: 9px;
}

.renewal-insurance-history details summary {
  color: #1b786a;
  cursor: pointer;
  font-weight: 650;
}

.renewal-insurance-history details div {
  padding: 3px 0;
}

.insurance-premium-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.insurance-premium-kpis > div {
  display: grid;
  min-height: 116px;
  align-content: center;
  gap: 6px;
  padding: 18px 19px;
  background: linear-gradient(145deg, #f4faf8, #fff);
  border: 1px solid #d8e8e3;
  border-radius: 13px;
}

.insurance-premium-kpis > div:nth-child(2) {
  background: linear-gradient(145deg, #f3f7fd, #fff);
  border-color: #dbe5f2;
}

.insurance-premium-kpis > div:nth-child(3) {
  background: linear-gradient(145deg, #fff8ec, #fff);
  border-color: #eddfc5;
}

.insurance-premium-kpis > div:nth-child(4) {
  background: linear-gradient(145deg, #f2f9f6, #fff);
  border-color: #cfe5dd;
}

.insurance-premium-kpis span,
.insurance-premium-kpis small {
  color: var(--ink-muted);
  font-size: 10px;
}

.insurance-premium-kpis strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1.15;
}

.insurance-allocation-insights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.insurance-allocation-insights article {
  display: grid;
  gap: 5px;
  padding: 15px 17px;
  background: #0e3140;
  border: 1px solid #1f4c5b;
  border-radius: 12px;
}

.insurance-allocation-insights article:nth-child(2) {
  background: #193f3b;
  border-color: #2d5d56;
}

.insurance-allocation-insights article:nth-child(3) {
  background: #493924;
  border-color: #665337;
}

.insurance-allocation-insights span,
.insurance-allocation-insights small {
  color: rgba(255, 255, 255, 0.68);
  font-size: 9px;
  line-height: 1.55;
}

.insurance-allocation-insights strong {
  color: #fff;
  font-size: 16px;
}

.insurance-allocation-table {
  min-width: 1040px;
}

.insurance-allocation-table td {
  vertical-align: top;
}

.insurance-allocation-table tr.insurance-under-renewal {
  background: #fffbf2;
}

.insurance-share-cell {
  display: grid;
  grid-template-columns: minmax(64px, 1fr) minmax(54px, auto);
  align-items: center;
  gap: 9px;
  min-width: 130px;
  margin-top: 7px;
}

.insurance-share-cell > span {
  height: 7px;
  overflow: hidden;
  background: #edf1f3;
  border-radius: 99px;
}

.insurance-share-cell > span i {
  display: block;
  height: 100%;
  background: #3972e6;
  border-radius: inherit;
}

.insurance-share-cell.renewal > span i {
  background: #0b8f83;
}

.insurance-share-cell.repair > span i {
  background: #ef8b4f;
}

.insurance-share-cell.combined > span i {
  background: #7656c8;
}

.insurance-share-cell strong {
  min-width: 54px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
  text-align: right;
}

.insurance-satisfaction-rate {
  display: block;
  margin-top: 7px;
  color: var(--teal);
  font-size: 15px;
  font-weight: 700;
}

.insurance-allocation-table tr.insurance-total-row {
  background: #eef8f5;
  border-top: 2px solid #b9dcd2;
}

.insurance-allocation-table tr.insurance-total-row td {
  padding-top: 14px;
  padding-bottom: 14px;
  background: #eef8f5;
}

.insurance-allocation-table tr.insurance-total-row td:first-child strong {
  font-size: 13px;
}

.insurance-premium-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.insurance-premium-detail-grid .panel {
  min-width: 0;
  overflow: hidden;
}

.insurance-premium-detail-grid .panel-header {
  min-height: 78px;
}

.insurance-method-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 14px;
  color: var(--ink-muted);
  background: #f7f9fa;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 9px;
  line-height: 1.65;
}

.insurance-method-note strong {
  flex: 0 0 auto;
  color: var(--ink);
}

@media (max-width: 1180px) {
  .insurance-premium-kpis,
  .insurance-allocation-insights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .insurance-premium-detail-grid {
    grid-template-columns: 1fr;
  }

  .insurance-customer-search-head {
    flex-direction: column;
  }

  .insurance-customer-search-example {
    width: 100%;
    grid-template-columns: auto minmax(0, 1fr);
  }
}

@media (max-width: 620px) {
  .insurance-premium-kpis,
  .insurance-allocation-insights {
    grid-template-columns: 1fr;
  }

  .insurance-method-note {
    flex-direction: column;
  }

  .insurance-customer-search-head,
  #insuranceCustomerSearchResults {
    padding-right: 13px;
    padding-left: 13px;
  }

  .insurance-customer-search-box {
    margin-right: 13px;
    margin-left: 13px;
  }

  .insurance-quote-coverage-head {
    display: none;
  }

  .insurance-quote-coverage-row {
    grid-template-columns: 1fr 1fr 30px;
    border-top: 1px solid #e1e9e7;
  }

  .insurance-quote-coverage-row [data-insurance-coverage-name] {
    grid-column: 1 / -1;
  }

  .insurance-customer-search-table,
  .insurance-customer-search-table tbody,
  .insurance-customer-search-table tr,
  .insurance-customer-search-table td {
    display: block;
    width: 100%;
  }

  .insurance-customer-search-table thead {
    display: none;
  }

  .insurance-customer-search-table tbody {
    display: grid;
    gap: 10px;
  }

  .insurance-customer-search-table tr {
    overflow: hidden;
    background: #fff;
    border: 1px solid #dce7e4;
    border-radius: 11px;
  }

  .insurance-customer-search-table td {
    padding: 8px 12px;
    border: 0;
    border-bottom: 1px dashed #e5ecea;
    text-align: left !important;
  }

  .insurance-customer-search-table td:last-child {
    border-bottom: 0;
  }

  .insurance-customer-search-table td::before {
    display: inline-block;
    min-width: 76px;
    margin-right: 8px;
    color: #789097;
    font-size: 8px;
    font-weight: 650;
    content: "";
  }

  .insurance-customer-search-table td:nth-child(1)::before { content: "客户 / 车辆"; }
  .insurance-customer-search-table td:nth-child(2)::before { content: "动力类型"; }
  .insurance-customer-search-table td:nth-child(3)::before { content: "保险公司"; }
  .insurance-customer-search-table td:nth-child(4)::before { content: "最新报价"; }
  .insurance-customer-search-table td:nth-child(5)::before { content: "保费拆分"; }
  .insurance-customer-search-table td:nth-child(6)::before { content: "保单到期"; }
  .insurance-customer-search-table td:nth-child(7)::before { content: "保险记录"; }
  .insurance-customer-search-table td:nth-child(8)::before { content: "客户状态"; }
  .insurance-customer-search-table td:nth-child(9)::before { content: "操作"; }
}

.after-sales-daily-intro {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 15px;
  overflow: hidden;
  background: #d9e5e4;
  border: 1px solid #d9e5e4;
  border-radius: 10px;
}

.after-sales-daily-intro > div {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  background: #f6faf9;
}

.after-sales-daily-intro strong {
  color: var(--ink);
  font-size: 11px;
}

.after-sales-daily-intro span {
  color: var(--ink-muted);
  font-size: 9px;
  line-height: 1.5;
}

.after-sales-daily-section {
  margin-top: 15px;
  padding: 15px;
  background: #fbfcfc;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.after-sales-daily-section:first-of-type {
  margin-top: 0;
}

.after-sales-system-cost-heading {
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px dashed #cbdcd7;
}

.after-sales-cost-confirm {
  min-height: 42px;
  padding: 9px 11px;
  background: #f5faf8;
  border: 1px solid #d6e6e0;
  border-radius: 8px;
}

.after-sales-daily-live {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 12px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.after-sales-daily-live > div {
  display: grid;
  gap: 4px;
  padding: 11px 13px;
  background: #f2f9f7;
}

.after-sales-daily-live span {
  color: var(--ink-muted);
  font-size: 9px;
}

.after-sales-daily-live strong {
  color: #17685c;
  font-size: 16px;
}

.after-sales-oem-kpis {
  margin-bottom: 14px;
}

.after-sales-oem-link-panel {
  margin-bottom: 14px;
  overflow: hidden;
}

.after-sales-oem-link-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  padding: 13px 16px;
}

.after-sales-oem-link-grid > div {
  display: grid;
  gap: 5px;
  min-height: 102px;
  align-content: center;
  padding: 13px 15px;
  background: linear-gradient(145deg, #f7fbfc, #eef5f6);
  border: 1px solid #dbe7ea;
  border-radius: 10px;
}

.after-sales-oem-link-grid span,
.after-sales-oem-link-grid small {
  color: var(--ink-muted);
  font-size: 9px;
}

.after-sales-oem-link-grid strong {
  color: var(--brand-dark);
  font-size: 24px;
}

.after-sales-oem-link-grid strong small {
  margin-left: 4px;
  color: inherit;
  font-size: 10px;
}

.after-sales-oem-form-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 16px 16px;
}

.after-sales-oem-rule-panel {
  margin-bottom: 14px;
  overflow: hidden;
}

.after-sales-oem-rule-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.after-sales-oem-rule-grid > div {
  display: grid;
  gap: 6px;
  min-height: 104px;
  align-content: start;
  padding: 13px 14px;
  background: #f9fbfb;
}

.after-sales-oem-rule-grid strong {
  color: var(--brand-dark);
  font-size: 12px;
}

.after-sales-oem-rule-grid span {
  color: var(--ink-muted);
  font-size: 10px;
  line-height: 1.65;
}

.after-sales-oem-record-table td {
  vertical-align: middle;
}

.after-sales-oem-form-intro {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.after-sales-oem-form-intro > div {
  display: grid;
  gap: 4px;
  padding: 12px 13px;
  background: #f7fafb;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.after-sales-oem-form-intro strong {
  color: var(--brand-dark);
  font-size: 11px;
}

.after-sales-oem-form-intro span {
  color: var(--ink-muted);
  font-size: 9px;
}

.after-sales-oem-category-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.after-sales-oem-category-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--line-color);
  border-radius: 10px;
}

.after-sales-oem-category-title {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 7px;
  border-bottom: 1px solid #edf2f4;
}

.after-sales-oem-category-title strong {
  color: var(--brand-dark);
  font-size: 12px;
}

.after-sales-oem-category-title span {
  color: var(--ink-muted);
  font-size: 8px;
}

.after-sales-oem-category-live {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 8px 9px;
  color: var(--ink-muted);
  background: #f7fafb;
  border-radius: 7px;
  font-size: 8px;
}

.after-sales-oem-category-live b {
  color: var(--ink);
}

.after-sales-oem-base-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.after-sales-oem-base-store-table {
  max-height: 58vh;
  margin-top: 12px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.after-sales-oem-base-store-table table {
  min-width: 1120px;
}

.after-sales-oem-base-store-table th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.after-sales-oem-base-store-table th:first-child,
.after-sales-oem-base-store-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
}

.after-sales-oem-base-store-table th:first-child {
  z-index: 3;
}

.after-sales-oem-base-store-table tr.is-excluded {
  opacity: .58;
  background: #f7f9f9;
}

.after-sales-oem-store-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 145px;
}

.after-sales-oem-store-check input {
  margin-top: 3px;
}

.after-sales-oem-store-check span {
  display: grid;
  gap: 3px;
}

.after-sales-oem-store-check strong {
  color: var(--brand-dark);
  font-size: 10px;
}

.after-sales-oem-store-check small {
  color: var(--ink-muted);
  font-size: 8px;
}

.after-sales-oem-base-store-table [data-base-value] {
  min-width: 68px;
}

.after-sales-oem-base-inline-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(62px, 1fr));
  gap: 6px;
  min-width: 138px;
}

.after-sales-oem-base-inline-fields.five {
  grid-template-columns: repeat(5, minmax(44px, 1fr));
  min-width: 290px;
}

.after-sales-oem-base-inline-fields label {
  display: grid;
  gap: 3px;
}

.after-sales-oem-base-inline-fields span {
  color: var(--ink-muted);
  font-size: 8px;
}

.after-sales-oem-base-inline-fields input {
  min-width: 42px;
  min-height: 32px;
  padding: 5px 7px;
  font-size: 9px;
}

.after-sales-oem-base-model-cell {
  min-width: 260px;
}

.after-sales-oem-base-model-cell [data-base-model-list] {
  display: grid;
  gap: 5px;
}

.after-sales-oem-base-model-row {
  display: grid;
  grid-template-columns: minmax(105px, 1fr) 62px auto;
  align-items: center;
  gap: 6px;
}

.after-sales-oem-base-model-row input {
  min-height: 32px;
  padding: 5px 7px;
  font-size: 9px;
}

.after-sales-oem-model-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

.after-sales-oem-model-actions small {
  color: var(--ink-muted);
  font-size: 8px;
}

.after-sales-oem-model-actions b {
  color: var(--brand-dark);
}

.after-sales-oem-base-group {
  display: grid;
  gap: 9px;
  padding: 12px;
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.after-sales-oem-group-total {
  color: var(--ink-muted);
  font-size: 9px;
  text-align: right;
}

.after-sales-oem-group-total b {
  color: var(--brand-dark);
  font-size: 12px;
}

.after-sales-oem-advisor-block {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.after-sales-oem-advisor-block > .button {
  justify-self: start;
}

.after-sales-oem-advisor-table input {
  min-width: 92px;
  min-height: 32px;
  padding: 6px 8px;
  font-size: 10px;
}

.after-sales-oem-advisor-table td:first-child input {
  min-width: 130px;
}

.after-sales-oem-detail-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 17px;
  color: #fff;
  background: linear-gradient(145deg, #102f41, #245669);
  border-radius: 12px;
}

.after-sales-oem-detail-hero > div {
  display: grid;
  gap: 4px;
}

.after-sales-oem-detail-hero span,
.after-sales-oem-detail-hero small {
  color: #bed3dc;
  font-size: 9px;
}

.after-sales-oem-detail-hero strong {
  font-size: 21px;
}

.after-sales-oem-detail-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.after-sales-oem-detail-kpis > div {
  display: grid;
  gap: 4px;
  padding: 11px;
  background: #f6fafb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.after-sales-oem-detail-kpis span {
  color: var(--ink-muted);
  font-size: 8px;
}

.after-sales-oem-detail-kpis strong {
  color: var(--brand-dark);
  font-size: 15px;
}

.after-sales-oem-detail-kpis strong small {
  margin-left: 4px;
  color: var(--ink-muted);
  font-size: 9px;
}

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

.after-sales-oem-benchmark-section {
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.after-sales-oem-benchmark-section .journey-section-head {
  padding: 12px 13px 8px;
  margin: 0;
}

.after-sales-oem-operations-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.after-sales-oem-operations-grid > div {
  display: grid;
  gap: 5px;
  min-height: 92px;
  align-content: center;
  padding: 12px 13px;
  background: #f8fbfb;
}

.after-sales-oem-operations-grid span,
.after-sales-oem-operations-grid small {
  color: var(--ink-muted);
  font-size: 9px;
}

.after-sales-oem-operations-grid strong {
  color: var(--brand-dark);
  font-size: 19px;
}

.after-sales-oem-operations-grid strong small {
  margin-left: 3px;
  color: inherit;
  font-size: 9px;
}

.after-sales-oem-base-detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  padding: 12px;
}

.after-sales-oem-base-detail section {
  display: grid;
  gap: 5px;
  padding: 11px;
  background: #f7fafb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.after-sales-oem-base-detail section > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
}

.after-sales-oem-base-detail section > div span {
  color: var(--ink-muted);
  font-size: 8px;
}

.after-sales-oem-base-detail p {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px 52px;
  gap: 8px;
  margin: 0;
  padding: 5px 0;
  border-top: 1px solid #e8eff2;
  font-size: 9px;
}

.after-sales-oem-base-detail p b,
.after-sales-oem-base-detail p em {
  color: var(--ink);
  font-style: normal;
  text-align: right;
}

.after-sales-oem-issues {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.after-sales-oem-issue {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  color: #7c421f;
  background: #fff8e8;
  border-left: 3px solid #d69b3f;
  border-radius: 7px;
}

.after-sales-oem-issue.healthy {
  color: #075f4c;
  background: #ecf8f3;
  border-left-color: #2a947c;
}

.after-sales-oem-issue strong {
  font-size: 10px;
}

.after-sales-oem-issue span {
  color: inherit;
  opacity: .78;
  font-size: 8px;
}

@media (max-width: 900px) {
  .after-sales-daily-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .after-sales-oem-link-grid,
  .after-sales-oem-form-intro,
  .after-sales-oem-detail-kpis,
  .after-sales-oem-rule-grid,
  .after-sales-oem-operations-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .after-sales-oem-category-form-grid,
  .after-sales-oem-base-groups,
  .after-sales-oem-base-detail {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .after-sales-daily-summary,
  .after-sales-daily-intro,
  .after-sales-daily-live {
    grid-template-columns: 1fr;
  }

  .after-sales-daily-section {
    padding: 12px;
  }

  .after-sales-oem-link-grid,
  .after-sales-oem-form-intro,
  .after-sales-oem-detail-kpis,
  .after-sales-oem-detail-grid,
  .after-sales-oem-category-form,
  .after-sales-oem-base-detail,
  .after-sales-oem-rule-grid,
  .after-sales-oem-operations-grid {
    grid-template-columns: 1fr;
  }

  .after-sales-oem-form-actions {
    display: grid;
  }
}

.after-sales-import-head,
.after-sales-import-confirmed {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: #f5faf8;
  border: 1px solid #d8e6e1;
  border-radius: 10px;
}

.after-sales-import-head > div,
.after-sales-import-confirmed > div {
  display: grid;
  gap: 3px;
}

.after-sales-import-head strong,
.after-sales-import-confirmed strong {
  color: var(--ink);
  font-size: 12px;
}

.after-sales-import-head span,
.after-sales-import-confirmed small {
  color: var(--ink-muted);
  font-size: 9px;
  line-height: 1.5;
}

.after-sales-import-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.after-sales-import-mapping-table {
  max-height: 52vh;
  margin-top: 12px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.after-sales-import-mapping-table .data-table td:nth-child(3) {
  max-width: 260px;
  overflow: hidden;
  color: var(--ink-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.after-sales-import-mapping-table select {
  min-width: 180px;
  min-height: 34px;
  padding: 6px 8px;
  font-size: 10px;
}

.after-sales-import-confirmed {
  margin: 13px 0;
}

.after-sales-import-confirmed > span {
  display: flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: #36947f;
  border-radius: 50%;
}

.after-sales-import-review-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 13px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.after-sales-import-review-summary > div {
  display: grid;
  gap: 5px;
  min-height: 76px;
  align-content: center;
  padding: 12px 14px;
  background: #f9fbfb;
}

.after-sales-import-review-summary span {
  color: var(--ink-muted);
  font-size: 9px;
}

.after-sales-import-review-summary strong {
  color: var(--ink);
  font-size: 18px;
}

.after-sales-import-review-summary strong small {
  margin-left: 3px;
  color: var(--ink-muted);
  font-size: 9px;
}

.after-sales-import-review-table {
  max-height: 55vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
}

@media (max-width: 760px) {
  .after-sales-import-head,
  .after-sales-import-confirmed {
    align-items: stretch;
    flex-direction: column;
  }

  .after-sales-import-controls,
  .after-sales-import-review-summary {
    grid-template-columns: 1fr;
  }
}

.mobile-capture-quick,
.mobile-capture-entry {
  display: none !important;
}

.accident-capture-import-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  color: #8b4d16;
  background: #fff7ea;
  border: 1px solid #ead1a8;
  border-radius: 9px;
  line-height: 1.5;
}

.accident-capture-import-check strong {
  flex: 0 0 auto;
  color: inherit;
  font-size: 11px;
}

.accident-capture-import-check span {
  font-size: 10px;
}

.accident-capture-import-check.is-ready {
  color: #1e665d;
  background: #effaf6;
  border-color: #c7e5dc;
}

.accident-capture-paste-guide {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 14px;
  color: #235b6c;
  background: #f1f8fa;
  border: 1px solid #cfe2e8;
  border-radius: 10px;
}

.accident-capture-paste-guide > span {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  color: #2f7795;
  background: #e4f1f5;
  border-radius: 8px;
  place-items: center;
}

.accident-capture-paste-guide > div {
  display: grid;
  gap: 3px;
}

.accident-capture-paste-guide strong {
  color: var(--ink);
  font-size: 12px;
}

.accident-capture-paste-guide small {
  color: var(--ink-muted);
  font-size: 10px;
  line-height: 1.5;
}

.mobile-capture-quick[hidden] {
  display: none !important;
}

@media (max-width: 820px) {
  .mobile-capture-quick:not([hidden]) {
    display: grid !important;
    color: #0b665e;
    background: #e8f7f4;
    border-color: #bedfd9;
  }

  .mobile-capture-entry {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
    padding: 15px;
    background: linear-gradient(135deg, #eff9f7, #f5fbfd);
    border: 1px solid #cfe4df;
    border-radius: 13px;
    box-shadow: 0 8px 22px rgba(18, 65, 74, 0.07);
  }

  .mobile-capture-entry > div {
    display: grid;
    gap: 4px;
    min-width: 0;
  }

  .mobile-capture-entry span {
    color: #0b776c;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 0.08em;
  }

  .mobile-capture-entry strong {
    color: var(--ink);
    font-size: 14px;
  }

  .mobile-capture-entry small {
    color: var(--ink-muted);
    font-size: 10px;
    line-height: 1.5;
  }

  .mobile-capture-entry .button {
    min-height: 44px;
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .accident-capture-intro {
    grid-template-columns: 1fr;
  }

  .accident-capture-intro > div + div {
    border-top: 1px solid #d9e5e4;
  }

  .accident-capture-form input,
  .accident-capture-form select,
  .accident-capture-form textarea {
    min-height: 44px;
    font-size: 16px;
  }

  .accident-capture-form textarea[name="text"] {
    min-height: 210px;
    line-height: 1.55;
  }

  .accident-capture-paste-guide {
    align-items: flex-start;
  }

  .accident-capture-image-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .accident-capture-image-panel > .inline-actions {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .accident-capture-image-panel > .inline-actions .button {
    min-height: 44px;
  }
}

@media (max-width: 560px) {
  .mobile-capture-entry {
    align-items: stretch;
    flex-direction: column;
  }

  .mobile-capture-entry .button {
    width: 100%;
  }

  .accident-capture-image-panel > .inline-actions {
    grid-template-columns: 1fr;
  }

  .accident-capture-result-head,
  .accident-capture-duplicate {
    align-items: stretch;
    flex-direction: column;
  }

  .accident-capture-result-head .status,
  .accident-capture-duplicate .inline-actions {
    align-self: flex-start;
  }

  .accident-capture-warnings {
    align-items: stretch;
    flex-direction: column;
  }

  .accident-capture-warnings span {
    border-radius: 7px;
  }

  .accident-capture-import-check {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }
}

.mobile-accident-priority {
  display: none;
}

@media (max-width: 820px) {
  .mobile-accident-priority {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
    padding: 14px;
    background: #fff7f3;
    border: 1px solid #edc7b9;
    border-radius: 14px;
    box-shadow: 0 9px 24px rgba(111, 43, 27, 0.08);
  }

  .mobile-priority-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
  }

  .mobile-priority-head > div {
    display: grid;
    gap: 4px;
  }

  .mobile-priority-head span {
    color: #a14731;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 0.07em;
  }

  .mobile-priority-head strong {
    color: #652d21;
    font-size: 17px;
  }

  .mobile-priority-head small {
    color: #98695c;
    font-size: 10px;
    line-height: 1.5;
  }

  .mobile-priority-head > .button {
    min-height: 38px;
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .mobile-priority-list {
    display: grid;
    gap: 9px;
  }

  .mobile-priority-card {
    display: grid;
    gap: 9px;
    padding: 13px;
    background: #fff;
    border: 1px solid #edd8d0;
    border-radius: 11px;
  }

  .mobile-priority-person {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 9px;
    align-items: center;
  }

  .mobile-priority-person strong {
    min-width: 0;
    overflow: hidden;
    color: var(--ink);
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-priority-person p,
  .mobile-priority-person small {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--ink-muted);
    font-size: 10px;
    overflow-wrap: anywhere;
  }

  .mobile-priority-person p {
    color: #425d68;
    font-size: 12px;
    font-weight: 650;
  }

  .mobile-priority-reasons,
  .mobile-priority-meta,
  .mobile-priority-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .mobile-priority-reasons span {
    padding: 4px 7px;
    color: #a33d2d;
    background: #fff0ec;
    border: 1px solid #efc9be;
    border-radius: 99px;
    font-size: 9px;
    font-weight: 650;
  }

  .mobile-priority-meta {
    color: #7d6660;
    font-size: 9px;
  }

  .mobile-priority-meta span + span::before {
    margin-right: 6px;
    content: "·";
  }

  .mobile-priority-actions {
    padding-top: 2px;
  }

  .mobile-priority-actions .button {
    min-height: 40px;
    flex: 1 1 110px;
  }
}

@media (max-width: 600px) {
  .accident-overdue-banner {
    display: none !important;
  }

  .mobile-priority-head {
    align-items: stretch;
    flex-direction: column;
  }

  .mobile-priority-head > .button {
    width: 100%;
  }

  .accident-contact-methods {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 9px;
  }

  .accident-contact-methods .form-check {
    min-height: 46px;
    padding: 9px 11px;
  }

  .accident-contact-methods .form-check:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .accident-contact-methods .form-check-label {
    font-size: 13px;
  }
}

@media (max-width: 600px) {
  .accident-detail-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .accident-detail-hero > div:last-child {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .accident-detail-phone {
    width: fit-content;
    max-width: 100%;
  }

  .accident-detail-phone strong {
    font-size: 22px;
  }
}

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

@media (max-width: 820px) {
  .topbar {
    min-height: 56px;
    gap: 8px;
    padding: max(8px, env(safe-area-inset-top)) 12px 8px;
  }

  .topbar-left {
    min-width: 0;
    flex: 1 1 auto;
    gap: 0;
    overflow: hidden;
  }

  .topbar-left .mobile-menu {
    display: none !important;
  }

  .page-title-wrap {
    min-width: 0;
    width: 100%;
    overflow: hidden;
  }

  #pageTitle {
    max-width: 100%;
    overflow: hidden;
    font-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar-actions {
    flex: 0 0 auto;
    gap: 5px;
  }

  .topbar-actions .icon-btn {
    width: 34px;
    height: 34px;
  }

  .workspace {
    padding-bottom: calc(88px + env(safe-area-inset-bottom));
  }

  .sidebar {
    width: min(88vw, 360px);
    padding-top: env(safe-area-inset-top);
  }

  .sidebar .nav-item {
    min-height: 48px;
    font-size: 13px;
  }

  body.authenticated .mobile-bottom-nav {
    position: fixed;
    z-index: 60;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: stretch;
    gap: 2px;
    padding: 6px 8px max(6px, env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid #dbe4e8;
    box-shadow: 0 -8px 22px rgba(16, 43, 61, 0.09);
    backdrop-filter: blur(16px);
  }

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

  .mobile-bottom-nav-item {
    display: flex;
    min-width: 0;
    min-height: 52px;
    flex: 1 1 0;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex-direction: column;
    padding: 4px 2px;
    color: #647983;
    background: transparent;
    border: 0;
    border-radius: 11px;
    font-size: 9px;
    font-weight: 650;
  }

  .mobile-bottom-nav-item[hidden] {
    display: none !important;
  }

  .mobile-bottom-nav-item > span:first-child {
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
  }

  .mobile-bottom-nav-item svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.8;
  }

  .mobile-bottom-nav-item.active {
    color: #0c7063;
    background: #eaf7f3;
  }

  .mobile-bottom-nav-item:active {
    transform: scale(0.97);
  }
}

@media (max-width: 430px) {
  .topbar {
    padding-right: 9px;
    padding-left: 9px;
  }

  .topbar-actions {
    gap: 3px;
  }

  .topbar-actions .icon-btn {
    width: 32px;
    height: 32px;
  }

  .mobile-bottom-nav {
    padding-right: 5px;
    padding-left: 5px;
  }

  .mobile-bottom-nav-item {
    font-size: 8.5px;
  }
}

@media (display-mode: standalone) {
  .mobile-bottom-nav {
    padding-bottom: max(8px, env(safe-area-inset-bottom));
  }
}

/* Touch tablets and foldable phones use bottom navigation in every
   orientation. Mouse-driven desktops keep the left navigation rail. */
@media (max-width: 1100px),
  (max-width: 1366px) and (hover: none) and (pointer: coarse) {
  :root {
    --sidebar-width: 260px;
  }

  .sidebar {
    width: min(76vw, 360px);
    padding-top: env(safe-area-inset-top);
    transform: translateX(-105%);
    transition: transform 220ms ease;
  }

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

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

  .mobile-menu {
    display: none !important;
  }

  .mobile-close {
    display: grid;
  }

  .sidebar-overlay {
    z-index: 45;
  }

  body.mobile-nav-open {
    overflow: hidden;
  }

  body.mobile-nav-open .follow-up-reminder {
    display: none;
  }

  .workspace {
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
  }

  body.authenticated .mobile-bottom-nav {
    position: fixed;
    z-index: 60;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: stretch;
    gap: 2px;
    padding: 6px 8px max(6px, env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid #dbe4e8;
    box-shadow: 0 -8px 22px rgba(16, 43, 61, 0.09);
    backdrop-filter: blur(16px);
  }

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

  .mobile-bottom-nav-item {
    display: flex;
    min-width: 0;
    min-height: 52px;
    flex: 1 1 0;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex-direction: column;
    padding: 4px 2px;
    color: #647983;
    background: transparent;
    border: 0;
    border-radius: 11px;
    font-size: 9px;
    font-weight: 650;
  }

  .mobile-bottom-nav-item[hidden] {
    display: none !important;
  }

  .mobile-bottom-nav-item > span:first-child {
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
  }

  .mobile-bottom-nav-item svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.8;
  }

  .mobile-bottom-nav-item.active {
    color: #0c7063;
    background: #eaf7f3;
  }

  .mobile-bottom-nav-item:active {
    transform: scale(0.97);
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column;
    justify-content: flex-start;
    gap: 14px;
  }

  .page-head > div:first-child {
    width: 100%;
    min-width: 0;
    flex: 0 0 auto;
  }

  .page-head-actions {
    max-width: 100%;
    flex-wrap: wrap;
  }
}

/* Reliable touch-tablet fallback for embedded WeCom browsers which may
   incorrectly report a mouse-like pointer while running on a PAD. */
html.touch-shell .sidebar {
  width: min(76vw, 360px);
  padding-top: env(safe-area-inset-top);
  visibility: hidden;
  transform: translateX(-105%);
  transition: transform 220ms ease, visibility 0s linear 220ms;
}

html.touch-shell .sidebar.open {
  visibility: visible;
  transform: translateX(0);
  transition-delay: 0s;
}

html.touch-shell .main-area {
  width: 100%;
  margin-left: 0;
}

html.touch-shell .mobile-menu {
  display: none !important;
}

html.touch-shell .mobile-close {
  display: grid;
}

html.touch-shell .sidebar-overlay {
  z-index: 45;
}

html.touch-shell body.mobile-nav-open {
  overflow: hidden;
}

html.touch-shell body.mobile-nav-open .follow-up-reminder {
  display: none;
}

html.touch-shell .workspace {
  padding-bottom: calc(92px + env(safe-area-inset-bottom));
}

html.touch-shell body.authenticated .mobile-bottom-nav {
  position: fixed;
  z-index: 60;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: stretch;
  gap: 2px;
  padding: 6px 8px max(6px, env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid #dbe4e8;
  box-shadow: 0 -8px 22px rgba(16, 43, 61, 0.09);
  backdrop-filter: blur(16px);
}

html.touch-shell body.mobile-nav-open .mobile-bottom-nav {
  display: none;
}

html.touch-shell .mobile-bottom-nav-item {
  display: flex;
  min-width: 0;
  min-height: 52px;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex-direction: column;
  padding: 4px 2px;
  color: #647983;
  background: transparent;
  border: 0;
  border-radius: 11px;
  font-size: 9px;
  font-weight: 650;
}

html.touch-shell .mobile-bottom-nav-item[hidden] {
  display: none !important;
}

html.touch-shell .mobile-bottom-nav-item > span:first-child {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
}

html.touch-shell .mobile-bottom-nav-item svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.8;
}

html.touch-shell .mobile-bottom-nav-item.active {
  color: #0c7063;
  background: #eaf7f3;
}

html.touch-shell .page-head {
  align-items: flex-start;
  flex-direction: column;
  justify-content: flex-start;
  gap: 14px;
}

html.touch-shell .page-head > div:first-child {
  width: 100%;
  min-width: 0;
  flex: 0 0 auto;
}

html.touch-shell .page-head-actions {
  max-width: 100%;
  flex-wrap: wrap;
}

html.touch-shell .renewal-filter-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

html.touch-shell .renewal-smart-keyword {
  grid-column: 1 / -1;
}

@media (max-width: 760px) {
  html.touch-shell .renewal-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .login-brand-panel::before,
  .login-brand-panel::after {
    display: none;
  }

  .login-input-wrap {
    cursor: text;
    touch-action: manipulation;
  }

  .login-input-wrap input {
    pointer-events: auto;
    caret-color: var(--teal);
  }
}

@supports (-webkit-touch-callout: none) {
  @media (max-width: 900px) {
    body:not(.authenticated) .login-brand-panel {
      padding-top: max(126px, calc(env(safe-area-inset-top) + 64px)) !important;
      background:
        radial-gradient(circle at 88% 16%, rgba(30, 104, 126, 0.22), transparent 34%),
        linear-gradient(160deg, #0c2535 0%, #0a1b28 68%, #102f40 100%) !important;
    }

    body:not(.authenticated) .login-brand-panel::before,
    body:not(.authenticated) .login-brand-panel::after {
      display: none !important;
    }

    body:not(.authenticated) .login-brand {
      margin-top: 10px;
    }
  }
}

/* System-wide readability pass: keep dense operating data scannable on large displays. */
body {
  font-size: 14px;
}

.nav-group-label {
  font-size: 10px;
}

.nav-item {
  min-height: 46px;
  font-size: 13px;
}

.nav-badge,
.profile-text small {
  font-size: 10px;
}

.profile-text {
  font-size: 13px;
}

.filter-field span {
  font-size: 11px;
}

.filter-field select {
  font-size: 12px;
}

.page-head h2 {
  font-size: 21px;
}

.page-head p {
  font-size: 13px;
  line-height: 1.65;
}

.button {
  min-height: 40px;
  font-size: 12px;
}

.button.small {
  min-height: 34px;
  font-size: 11px;
}

.panel-title h3 {
  font-size: 16px;
}

.panel-title p {
  font-size: 11px;
  line-height: 1.6;
}

.simple-stat {
  padding: 15px 17px;
}

.simple-stat span {
  font-size: 11px;
}

.simple-stat strong {
  font-size: 22px;
}

.simple-stat small {
  font-size: 10px;
}

.data-table {
  font-size: 13px;
}

.data-table th {
  padding: 12px 14px;
  font-size: 11px;
}

.data-table td {
  padding: 13px 14px;
  font-size: 13px;
}

.data-table .muted {
  font-size: 11px;
}

.status {
  padding: 4px 7px;
  font-size: 10px;
}

.toolbar-title {
  font-size: 13px;
}

.toolbar-subtitle,
.form-help {
  font-size: 10px;
  line-height: 1.55;
}

.search-field input {
  font-size: 12px;
}

.empty-state strong {
  font-size: 15px;
}

.empty-state p {
  font-size: 12px;
  line-height: 1.6;
}

.form-field > label {
  font-size: 11px;
}

.form-field input,
.form-field select,
.form-field textarea,
.modal .form-field input,
.modal .form-field select,
.modal .form-field textarea {
  min-height: 40px;
  font-size: 13px;
}

.renewal-filter-grid label {
  font-size: 10px;
}

.renewal-filter-grid input,
.renewal-filter-grid select {
  min-height: 38px;
  font-size: 11px;
}

.renewal-date-scope-note,
.renewal-smart-keyword > small,
.renewal-alert span {
  font-size: 11px;
}

.renewal-tabs button {
  min-height: 40px;
  font-size: 12px;
}

/* Readability pass for operating-detail modals. */
.modal.wide-modal {
  width: min(1480px, 97vw);
  max-height: min(94vh, 980px);
}

.modal .modal-header {
  padding: 23px 28px 19px;
}

.modal .modal-header h2 {
  font-size: 29px;
  line-height: 1.35;
}

.modal .modal-header .eyebrow {
  font-size: 12px;
}

.modal .modal-body {
  padding: 25px 29px;
  font-size: 14px;
}

.modal .modal-body h3 {
  margin-bottom: 13px;
  font-size: 21px;
  line-height: 1.4;
}

.modal .modal-body h4 {
  font-size: 16px;
}

.modal .modal-footer {
  gap: 10px;
  padding: 17px 28px;
}

.modal .modal-footer .button {
  min-height: 44px;
  padding-inline: 17px;
  font-size: 15px;
}

.modal .accident-history {
  gap: 11px;
}

.modal .accident-history > div {
  gap: 6px;
  padding: 15px 17px;
  border-left-width: 4px;
  border-radius: 9px;
}

.modal .accident-history span,
.modal .accident-history small {
  font-size: 13px;
  line-height: 1.65;
}

.modal .accident-history strong {
  font-size: 15px;
  line-height: 1.55;
}

.modal .renewal-coupon-summary {
  padding: 16px 17px;
}

.modal .renewal-coupon-summary h3 {
  margin-bottom: 12px;
  font-size: 19px;
}

.modal .renewal-coupon-summary > span {
  gap: 5px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.45;
}

.modal .renewal-coupon-summary small,
.modal .renewal-coupon-summary > a {
  font-size: 13px;
}

.modal .renewal-coupon-summary > a {
  min-width: 170px;
  padding: 11px 13px;
}

.modal .detail-field span {
  font-size: 14px;
}

.modal .detail-field strong {
  font-size: 16px;
  line-height: 1.6;
}

.modal .sensitivity-note {
  font-size: 13px;
  line-height: 1.7;
}

.modal .status {
  min-height: 27px;
  padding: 5px 9px;
  font-size: 13px;
}

.modal .renewal-detail-grid span {
  font-size: 13px;
}

.modal .renewal-detail-grid strong {
  font-size: 17px;
}

.modal.wide-modal .renewal-detail-grid > div {
  min-height: 116px;
  padding: 20px 22px;
}

.modal.wide-modal .renewal-detail-grid > div > span {
  color: #5d737b;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
}

.modal.wide-modal .renewal-detail-grid > div > strong {
  font-size: 21px;
  font-weight: 750;
  line-height: 1.45;
}

.modal.wide-modal .renewal-detail-grid > div > strong small {
  display: block;
  margin-top: 7px;
  color: #6f838a;
  font-size: 14px;
  font-weight: 550;
  line-height: 1.5;
}

.modal.wide-modal .vehicle-archive-detail-grid > div {
  min-height: 96px;
  gap: 8px;
  padding: 16px 18px;
}

.modal.wide-modal .vehicle-archive-detail-grid span {
  color: #526a73;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}

.modal.wide-modal .vehicle-archive-detail-grid strong {
  font-size: 17px;
  font-weight: 750;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.modal.wide-modal .vehicle-archive-source-note {
  gap: 12px;
  padding: 14px 18px;
}

.modal.wide-modal .vehicle-archive-source-note span,
.modal.wide-modal .vehicle-archive-source-note small {
  font-size: 13px;
  line-height: 1.6;
}

.modal.wide-modal .vehicle-archive-source-note strong {
  font-size: 15px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

/* High-resolution workstation layout: use the available canvas and scale type with it. */
@media (min-width: 1500px) {
  :root {
    --sidebar-width: 280px;
  }

  .topbar {
    min-height: 84px;
    padding: 13px 34px;
  }

  .page-title-wrap h1 {
    font-size: 25px;
  }

  .workspace {
    width: 100%;
    max-width: none;
    padding: 32px 38px 58px;
  }

  .brand-name {
    font-size: 17px;
  }

  .nav-group-label {
    font-size: 13px;
  }

  .nav-item {
    min-height: 52px;
    font-size: 16px;
  }

  .filter-field {
    height: 40px;
  }

  .filter-field span {
    font-size: 14px;
  }

  .filter-field select {
    font-size: 15px;
  }

  .page-head h2 {
    font-size: 30px;
  }

  .page-head p {
    max-width: 1100px;
    font-size: 16px;
  }

  .button {
    min-height: 44px;
    font-size: 15px;
  }

  .button.small {
    min-height: 38px;
    font-size: 14px;
  }

  .hero-panel h2 {
    font-size: 31px;
  }

  .hero-copy > p {
    font-size: 14px;
  }

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

  .metric-card {
    padding: 20px 19px 17px;
  }

  .metric-label {
    font-size: 14px;
  }

  .metric-value {
    font-size: 32px;
  }

  .metric-value .unit {
    font-size: 14px;
  }

  .metric-bottom,
  .delta {
    font-size: 12px;
  }

  .panel-header {
    min-height: 74px;
    padding: 18px 21px 14px;
  }

  .panel-title h3 {
    font-size: 22px;
  }

  .panel-title p {
    font-size: 14px;
  }

  .simple-stat {
    padding: 19px 21px;
  }

  .simple-stat span {
    font-size: 14px;
  }

  .simple-stat strong {
    font-size: 32px;
  }

  .simple-stat small,
  .data-table .muted {
    font-size: 13px;
  }

  .data-table {
    font-size: 17px;
  }

  .data-table th {
    padding: 15px 17px;
    font-size: 14px;
  }

  .data-table td {
    padding: 17px;
    font-size: 17px;
  }

  .status {
    font-size: 13px;
  }

  .toolbar-title {
    font-size: 16px;
  }

  .toolbar-subtitle,
  .form-help,
  .empty-state p {
    font-size: 14px;
  }

  .form-field > label {
    font-size: 14px;
  }

  .form-field input,
  .form-field select,
  .form-field textarea,
  .modal .form-field input,
  .modal .form-field select,
  .modal .form-field textarea {
    min-height: 48px;
    font-size: 16px;
  }

  .renewal-smart-keyword > label {
    font-size: 17px;
  }

  .renewal-smart-keyword-box input {
    font-size: 16px;
  }

  .renewal-smart-keyword > small,
  .renewal-date-scope-note,
  .renewal-alert span {
    font-size: 14px;
  }

  .renewal-filter-grid label {
    font-size: 14px;
  }

  .renewal-filter-grid input,
  .renewal-filter-grid select {
    min-height: 48px;
    font-size: 16px;
  }

  .renewal-expiry-reminders button span {
    font-size: 14px;
  }

  .renewal-expiry-reminders button strong {
    font-size: 30px;
  }

  .renewal-expiry-reminders button small {
    font-size: 12px;
  }

  .renewal-tabs button {
    min-height: 44px;
    font-size: 14px;
  }

  .modal.wide-modal {
    width: min(1760px, 96vw);
  }

  .insurance-share-cell {
    grid-template-columns: minmax(72px, 1fr) minmax(62px, auto);
    gap: 10px;
    min-width: clamp(150px, 7vw, 210px);
  }

  .insurance-share-cell > span {
    height: clamp(7px, 0.26vw, 10px);
  }

  .insurance-share-cell strong {
    min-width: 62px;
    font-size: clamp(13px, 0.2vw + 11px, 18px);
    line-height: 1.4;
  }

  .insurance-satisfaction-rate {
    font-size: clamp(15px, 0.18vw + 13px, 19px);
  }
}

@media (min-width: 2100px) {
  :root {
    --sidebar-width: 318px;
  }

  .workspace {
    padding: 38px 48px 68px;
  }

  .topbar {
    min-height: 98px;
    padding: 16px 48px;
  }

  .nav-item {
    min-height: 56px;
    font-size: 17px;
  }

  .page-head h2 {
    font-size: 34px;
  }

  .page-head p {
    font-size: 17px;
  }

  .metric-value {
    font-size: 36px;
  }

  .panel-title h3 {
    font-size: 24px;
  }

  .panel-title p {
    font-size: 16px;
  }

  .data-table {
    font-size: 18px;
  }

  .data-table th {
    font-size: 15px;
  }

  .data-table td {
    padding: 19px;
    font-size: 18px;
  }

  .renewal-filter-grid label {
    font-size: 17px;
  }

  .renewal-filter-grid input,
  .renewal-filter-grid select {
    min-height: 52px;
    font-size: 18px;
  }

  .renewal-smart-keyword > label {
    font-size: 19px;
  }

  .renewal-smart-keyword-box input {
    font-size: 18px;
  }
}

@media (min-width: 2600px) {
  :root {
    --sidebar-width: 360px;
  }

  .topbar {
    min-height: 106px;
    padding: 18px 56px;
  }

  .workspace {
    padding: 44px 56px 76px;
  }

  .nav-group-label {
    font-size: 16px;
  }

  .nav-item {
    min-height: 62px;
    font-size: 20px;
  }

  .filter-field {
    height: 48px;
  }

  .filter-field span {
    font-size: 17px;
  }

  .filter-field select {
    font-size: 18px;
  }

  .page-head h2 {
    font-size: 38px;
  }

  .page-head p {
    font-size: 20px;
  }

  .button {
    min-height: 50px;
    font-size: 18px;
  }

  .button.small {
    min-height: 42px;
    font-size: 16px;
  }

  .panel-title h3 {
    font-size: 28px;
  }

  .panel-title p {
    font-size: 18px;
  }

  .simple-stat span {
    font-size: 18px;
  }

  .simple-stat strong {
    font-size: 40px;
  }

  .simple-stat small,
  .data-table .muted {
    font-size: 16px;
  }

  .data-table {
    font-size: 21px;
  }

  .data-table th {
    padding: 18px 20px;
    font-size: 18px;
  }

  .data-table td {
    padding: 21px 20px;
    font-size: 21px;
  }

  .status {
    padding: 7px 10px;
    font-size: 16px;
  }

  .renewal-smart-keyword > label {
    font-size: 22px;
  }

  .renewal-smart-keyword-box input {
    font-size: 20px;
  }

  .renewal-smart-keyword > small,
  .renewal-date-scope-note,
  .renewal-alert span {
    font-size: 16px;
  }

  .renewal-filter-grid label {
    font-size: 19px;
  }

  .renewal-filter-grid input,
  .renewal-filter-grid select {
    min-height: 56px;
    font-size: 20px;
  }

  .renewal-expiry-reminders button span {
    font-size: 18px;
  }

  .renewal-expiry-reminders button strong {
    font-size: 38px;
  }

  .renewal-expiry-reminders button small {
    font-size: 15px;
  }

  .renewal-tabs button {
    min-height: 50px;
    font-size: 18px;
  }
}

@media (min-width: 4000px) {
  :root {
    --sidebar-width: 460px;
  }

  .workspace {
    padding: 56px 72px 96px;
  }

  .nav-group-label {
    font-size: 19px;
  }

  .nav-item {
    min-height: 72px;
    font-size: 24px;
  }

  .page-head h2 {
    font-size: 46px;
  }

  .page-head p {
    font-size: 24px;
  }

  .renewal-filter-grid label {
    font-size: 22px;
  }

  .renewal-filter-grid input,
  .renewal-filter-grid select {
    min-height: 64px;
    font-size: 24px;
  }

  .data-table {
    font-size: 24px;
  }

  .data-table th {
    font-size: 20px;
  }

  .data-table td {
    font-size: 24px;
  }
}

.renewal-tracking-kpis .renewal-metric-button {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.renewal-tracking-kpis .renewal-metric-button:hover,
.renewal-tracking-kpis .renewal-metric-button:focus-visible {
  border-color: #67a99e;
  box-shadow: 0 9px 24px rgba(30, 107, 94, 0.12);
  transform: translateY(-1px);
}

.renewal-tracking-kpis .renewal-metric-button small:last-child {
  display: block;
  margin-top: 7px;
  color: #2f7f76;
  font-weight: 650;
}

.renewal-deals-controls {
  grid-template-columns: minmax(190px, 250px) minmax(280px, 1fr);
  margin: 0 16px 15px;
}

.renewal-deals-table {
  min-width: 1380px;
}

.renewal-deals-table td:nth-child(2),
.renewal-deals-table td:nth-child(3),
.renewal-deals-table td:nth-child(8) {
  white-space: normal;
  line-height: 1.55;
}

.renewal-deals-table td:nth-child(2) {
  min-width: 220px;
}

.renewal-deals-table td:nth-child(3),
.renewal-deals-table td:nth-child(8) {
  min-width: 150px;
}

.renewal-deals-table td small {
  display: block;
  margin-top: 4px;
  color: var(--ink-muted);
  font-size: 11px;
}

.renewal-tracking-content .data-table.renewal-deals-table {
  font-size: 14px;
}

.renewal-tracking-content .renewal-deals-table th {
  font-size: 13px;
}

.renewal-tracking-content .renewal-deals-table td {
  padding-top: 18px;
  padding-bottom: 18px;
  line-height: 1.6;
}

.renewal-deals-table .accident-customer-link {
  min-width: 240px;
  gap: 4px;
}

.renewal-deals-table .accident-customer-link strong {
  font-size: 16px;
  font-weight: 750;
  line-height: 1.35;
}

.renewal-deals-table .accident-customer-link span {
  color: #506970;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}

.renewal-deals-table .accident-customer-link small,
.renewal-deals-table td small {
  font-size: 12px;
  line-height: 1.5;
}

.renewal-tracking-content .renewal-deals-table td > strong {
  font-size: 14px;
  line-height: 1.45;
}

/* Harmonized large-screen typography: smooth scale with consistent hierarchy. */
@media (min-width: 1500px) {
  :root {
    --sidebar-width: clamp(260px, 10vw, 300px);
  }

  .topbar {
    min-height: clamp(82px, 4.5vw, 96px);
    padding: 14px clamp(30px, 1.4vw, 46px);
  }

  .page-title-wrap h1 {
    font-size: clamp(18px, 0.15vw + 16px, 23px);
  }

  .workspace {
    width: 100%;
    max-width: none;
    padding: clamp(28px, 1.25vw, 42px) clamp(32px, 1.5vw, 48px)
      clamp(50px, 2vw, 70px);
  }

  .brand-name {
    font-size: clamp(16px, 0.12vw + 14px, 19px);
  }

  .nav-group-label {
    font-size: clamp(10px, 0.1vw + 9px, 13px);
  }

  .nav-item {
    min-height: clamp(46px, 1.5vw, 54px);
    font-size: clamp(13px, 0.1vw + 12px, 16px);
  }

  .filter-field {
    height: clamp(38px, 1.25vw, 44px);
  }

  .filter-field span {
    font-size: clamp(11px, 0.1vw + 10px, 13px);
  }

  .filter-field select {
    font-size: clamp(12px, 0.12vw + 11px, 14px);
  }

  .page-head h2 {
    font-size: clamp(20px, 0.1vw + 18px, 25px);
    letter-spacing: -0.025em;
  }

  .page-head p {
    max-width: min(1180px, 75vw);
    font-size: clamp(12px, 0.08vw + 10px, 14px);
    line-height: 1.6;
  }

  .button {
    min-height: clamp(40px, 1.25vw, 46px);
    font-size: clamp(12px, 0.1vw + 11px, 14px);
  }

  .button.small {
    min-height: clamp(34px, 1.05vw, 40px);
    font-size: clamp(11px, 0.1vw + 10px, 13px);
  }

  .hero-panel h2 {
    font-size: clamp(29px, 0.6vw + 21px, 36px);
  }

  .hero-copy > p {
    font-size: clamp(13px, 0.16vw + 12px, 16px);
  }

  .metrics-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: clamp(12px, 0.65vw, 18px);
  }

  .metric-card {
    padding: clamp(17px, 0.7vw, 22px);
  }

  .metric-label {
    font-size: clamp(11px, 0.1vw + 10px, 13px);
  }

  .metric-value {
    font-size: clamp(22px, 0.3vw + 18px, 28px);
  }

  .metric-value .unit,
  .metric-bottom,
  .delta {
    font-size: clamp(10px, 0.1vw + 9px, 12px);
  }

  .panel-header {
    min-height: clamp(70px, 3.4vw, 82px);
    padding: clamp(16px, 0.7vw, 21px) clamp(19px, 0.8vw, 24px);
  }

  .panel-title h3 {
    font-size: clamp(14px, 0.1vw + 13px, 18px);
  }

  .panel-title p {
    font-size: clamp(10px, 0.08vw + 9px, 13px);
    line-height: 1.6;
  }

  .simple-stat {
    padding: clamp(13px, 0.6vw, 20px);
  }

  .simple-stat span {
    font-size: clamp(9.5px, 0.05vw + 9px, 11px);
  }

  .simple-stat strong {
    font-size: clamp(19px, 0.15vw + 17px, 23px);
  }

  .simple-stat small,
  .data-table .muted {
    font-size: clamp(9px, 0.04vw + 9px, 11px);
  }

  .data-table {
    font-size: clamp(12px, 0.1vw + 11px, 14px);
  }

  .data-table th {
    padding: clamp(11px, 0.4vw, 15px) clamp(13px, 0.5vw, 18px);
    font-size: clamp(9.5px, 0.05vw + 9px, 11px);
  }

  .data-table td {
    padding: clamp(11px, 0.5vw, 17px) clamp(13px, 0.5vw, 18px);
    font-size: clamp(12px, 0.1vw + 11px, 14px);
  }

  .status {
    font-size: clamp(9.5px, 0.05vw + 9px, 11px);
  }

  .toolbar-title {
    font-size: clamp(11.5px, 0.06vw + 11px, 13px);
  }

  .toolbar-subtitle,
  .form-help,
  .empty-state p {
    font-size: clamp(9.5px, 0.05vw + 9px, 11px);
  }

  .form-field > label {
    font-size: clamp(10px, 0.1vw + 9px, 13px);
  }

  .form-field input,
  .form-field select,
  .form-field textarea,
  .modal .form-field input,
  .modal .form-field select,
  .modal .form-field textarea {
    min-height: clamp(40px, 1.2vw, 46px);
    font-size: clamp(12px, 0.12vw + 11px, 15px);
  }

  .renewal-smart-keyword > label {
    font-size: clamp(16px, 0.3vw + 13px, 20px);
  }

  .renewal-smart-keyword-box {
    min-height: clamp(48px, 1.7vw, 58px);
  }

  .renewal-smart-keyword-box input {
    font-size: clamp(14px, 0.22vw + 13px, 18px);
  }

  .renewal-smart-keyword > small,
  .renewal-date-scope-note,
  .renewal-alert span {
    font-size: clamp(12px, 0.18vw + 11px, 16px);
    line-height: 1.65;
  }

  .renewal-filter-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 13px 15px;
  }

  .renewal-filter-grid label {
    gap: 7px;
    font-size: clamp(12px, 0.2vw + 11px, 16px);
    line-height: 1.4;
  }

  .renewal-filter-grid input,
  .renewal-filter-grid select {
    min-height: clamp(44px, 1.55vw, 54px);
    padding-inline: 12px;
    font-size: clamp(14px, 0.24vw + 13px, 18px);
  }

  .renewal-expiry-reminders button {
    min-height: clamp(76px, 3vw, 92px);
    padding: clamp(12px, 0.55vw, 17px);
  }

  .renewal-expiry-reminders button span {
    font-size: clamp(13px, 0.18vw + 12px, 16px);
  }

  .renewal-expiry-reminders button strong {
    font-size: clamp(27px, 0.5vw + 20px, 36px);
  }

  .renewal-expiry-reminders button small {
    font-size: clamp(11px, 0.14vw + 10px, 14px);
  }

  .renewal-tabs button {
    min-height: clamp(40px, 1.45vw, 48px);
    font-size: clamp(13px, 0.18vw + 12px, 16px);
  }

  .modal.wide-modal {
    width: min(1760px, 96vw);
  }
}

@media (max-width: 1100px) {
  .renewal-query-workbench {
    grid-template-columns: 1fr;
  }

  .renewal-base-query {
    grid-template-columns: 1fr;
  }

  .renewal-customer-dimension-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

@media (max-width: 760px) {
  .renewal-customer-dimension-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .renewal-date-query-fields,
  .renewal-date-query-card.deal .renewal-date-query-fields {
    grid-template-columns: 1fr;
  }

  .renewal-date-query-footer,
  .renewal-common-filter-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .renewal-date-query-footer .button {
    width: 100%;
  }

  .renewal-filter-grid.renewal-common-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Keep renewal customer identity information legible and visually balanced. */
.renewal-customer-table {
  --renewal-customer-font-size: clamp(13.5px, 0.3vw + 11px, 24px);
  font-size: var(--renewal-customer-font-size);
}

.renewal-customer-table td {
  line-height: 1.5;
}

.renewal-customer-table th {
  font-size: 0.82em;
  line-height: 1.4;
}

.renewal-customer-table td > strong {
  font-size: 1.04em;
  line-height: 1.45;
}

.renewal-customer-table td > small,
.renewal-customer-table .renewal-owner-cell small {
  margin-top: 3px;
  font-size: 0.86em;
  line-height: 1.5;
}

.renewal-customer-table .renewal-owner-cell strong {
  font-size: 0.96em;
  line-height: 1.45;
}

.renewal-customer-table .status,
.renewal-customer-table .button.small {
  font-size: 0.8em;
  line-height: 1.35;
}

.renewal-customer-table .accident-customer-link {
  min-width: 240px;
  gap: 4px;
}

.renewal-customer-table .accident-customer-link strong {
  font-size: 1.1em;
  font-weight: 700;
  line-height: 1.35;
}

.renewal-customer-table .accident-customer-link span,
.renewal-customer-table .accident-customer-link small {
  display: block;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.renewal-customer-table .accident-customer-link span {
  color: #526b73;
  font-size: 0.88em;
  font-weight: 550;
  line-height: 1.5;
}

.renewal-customer-table .accident-customer-link small {
  color: #71858c;
  font-size: 0.78em;
  font-weight: 500;
  line-height: 1.5;
}

.renewal-customer-table .insurance-energy-chip {
  margin-top: 2px;
  padding: 4px 9px;
  font-size: 0.72em;
  line-height: 1.3;
}

/* Renewal daily report */
.renewal-filter-panel.is-report-hidden {
  display: none !important;
}

.renewal-report-shell {
  --report-ink: #18333c;
  --report-muted: #657b82;
  --report-line: #dce8e5;
  --report-teal: #257d70;
  --report-gold: #d59a42;
  display: grid;
  gap: 14px;
  color: var(--report-ink);
}

.renewal-report-hero {
  position: relative;
  display: flex;
  min-height: 168px;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  overflow: hidden;
  padding: 26px 30px;
  color: #f4fbf9;
  background:
    radial-gradient(circle at 82% 8%, rgba(105, 212, 183, 0.23), transparent 27%),
    radial-gradient(circle at 98% 110%, rgba(228, 176, 93, 0.2), transparent 35%),
    linear-gradient(125deg, #102b38 0%, #153b43 54%, #265e59 100%);
  border: 1px solid rgba(57, 137, 121, 0.28);
  border-radius: 18px;
  box-shadow: 0 18px 38px rgba(20, 49, 56, 0.16);
}

.renewal-report-hero::after {
  position: absolute;
  top: -48px;
  right: 170px;
  width: 170px;
  height: 170px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  box-shadow:
    0 0 0 28px rgba(255, 255, 255, 0.025),
    0 0 0 58px rgba(255, 255, 255, 0.018);
  content: "";
  pointer-events: none;
}

.renewal-report-title,
.renewal-report-hero-meta {
  position: relative;
  z-index: 1;
}

.renewal-report-title {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.renewal-report-title > span,
.renewal-report-card-heading > div > span,
.renewal-report-section-heading > div > span {
  color: #76c9b7;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.renewal-report-title h3 {
  margin: 0;
  font-size: clamp(24px, 2vw, 34px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.renewal-report-title p {
  max-width: 700px;
  margin: 0;
  color: rgba(235, 248, 244, 0.72);
  font-size: 11px;
  line-height: 1.7;
}

.renewal-report-scope-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 5px;
}

.renewal-report-scope-chips span {
  padding: 5px 9px;
  color: #d7f1ea;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(181, 230, 219, 0.15);
  border-radius: 99px;
  font-size: 9px;
  font-weight: 650;
}

.renewal-report-hero-meta {
  display: grid;
  flex: 0 0 auto;
  justify-items: end;
  gap: 7px;
  max-width: 390px;
  text-align: right;
}

.renewal-report-hero-meta strong {
  font-size: 15px;
  line-height: 1.4;
}

.renewal-report-hero-meta small {
  color: rgba(235, 248, 244, 0.65);
  font-size: 9px;
  line-height: 1.6;
}

.renewal-report-filterbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 15px;
  background: #f8fbfa;
  border: 1px solid var(--report-line);
  border-radius: 13px;
}

.renewal-report-filter-fields {
  display: grid;
  flex: 1;
  grid-template-columns: minmax(150px, 0.72fr) minmax(190px, 1.2fr) minmax(135px, 0.8fr) minmax(150px, 0.9fr);
  gap: 10px;
}

.renewal-report-filter-fields label {
  display: grid;
  gap: 5px;
  color: #516a71;
  font-size: 9px;
  font-weight: 700;
}

.renewal-report-filter-fields input,
.renewal-report-filter-fields select {
  min-width: 0;
  min-height: 38px;
  padding: 0 11px;
  color: var(--report-ink);
  background: #fff;
  border: 1px solid #cbdcd8;
  border-radius: 8px;
  font: inherit;
  font-size: 11px;
}

.renewal-report-quick-dates {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px;
  background: #e9f2f0;
  border-radius: 9px;
}

.renewal-report-quick-dates button {
  min-height: 30px;
  padding: 0 11px;
  color: #506970;
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.renewal-report-quick-dates button:hover,
.renewal-report-quick-dates button.active {
  color: #fff;
  background: #1c4650;
}

.renewal-report-kpis {
  margin-bottom: 0;
}

.renewal-report-kpis .simple-stat {
  position: relative;
  min-height: 105px;
  overflow: hidden;
  border-top: 3px solid #2a8073;
  background: linear-gradient(180deg, #fff 0%, #f6fbfa 100%);
}

.renewal-report-kpis .simple-stat::after {
  position: absolute;
  right: -24px;
  bottom: -42px;
  width: 92px;
  height: 92px;
  background: rgba(43, 133, 117, 0.045);
  border-radius: 50%;
  content: "";
}

.renewal-report-kpis .simple-stat > * {
  position: relative;
  z-index: 1;
}

.renewal-report-kpis .simple-stat > span {
  color: #597178;
  font-size: 10px;
  font-weight: 650;
}

.renewal-report-kpis .simple-stat > strong {
  color: #153841;
  font-size: 25px;
}

.renewal-report-kpis .simple-stat > strong small {
  font-size: 10px;
}

.renewal-report-kpis .simple-stat > small {
  display: block;
  margin: 7px 0 0;
  color: #71858b;
  font-size: 9px;
  line-height: 1.5;
}

.renewal-report-kpis .report-kpi-primary {
  color: #f6fffc;
  background: linear-gradient(145deg, #194957, #246e67);
  border-color: #246e67;
  box-shadow: 0 11px 24px rgba(28, 93, 84, 0.17);
}

.renewal-report-kpis .report-kpi-primary::after {
  background: rgba(255, 255, 255, 0.06);
}

.renewal-report-kpis .report-kpi-primary > span,
.renewal-report-kpis .report-kpi-primary > small {
  color: rgba(239, 251, 247, 0.72);
}

.renewal-report-kpis .report-kpi-primary > strong {
  color: #fff;
}

.renewal-report-pulse {
  display: grid;
  grid-template-columns: minmax(300px, 1.02fr) minmax(360px, 1.27fr) minmax(280px, 0.88fr);
  gap: 14px;
}

.renewal-report-target-card,
.renewal-report-trend-card,
.renewal-report-attention-card {
  display: grid;
  min-width: 0;
  gap: 13px;
  padding: 17px;
  background: #fff;
  border: 1px solid var(--report-line);
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(27, 76, 70, 0.055);
}

.renewal-report-card-heading,
.renewal-report-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.renewal-report-card-heading > div,
.renewal-report-section-heading > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.renewal-report-card-heading h4,
.renewal-report-section-heading h3 {
  margin: 0;
  color: #193942;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.38;
}

.renewal-report-section-heading h3 {
  font-size: 15px;
}

.renewal-report-section-heading p {
  margin: 0;
  color: var(--report-muted);
  font-size: 9px;
  line-height: 1.6;
}

.renewal-report-target-main {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  align-items: center;
  gap: 17px;
}

.renewal-report-target-ring {
  display: grid;
  width: 118px;
  height: 118px;
  place-items: center;
  background: conic-gradient(#39a38e calc(var(--report-progress, 0) * 1%), #e8f0ee 0);
  border-radius: 50%;
}

.renewal-report-target-ring::before {
  position: absolute;
  width: 88px;
  height: 88px;
  background: #fff;
  border-radius: 50%;
  content: "";
}

.renewal-report-target-ring {
  position: relative;
}

.renewal-report-target-ring > span {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 2px;
}

.renewal-report-target-ring strong {
  color: #1a665b;
  font-size: 22px;
  line-height: 1;
}

.renewal-report-target-ring small {
  color: #74878c;
  font-size: 8px;
}

.renewal-report-target-numbers {
  display: grid;
  gap: 10px;
}

.renewal-report-target-numbers > div {
  display: grid;
  gap: 3px;
  padding-bottom: 9px;
  border-bottom: 1px solid #edf2f1;
}

.renewal-report-target-numbers > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.renewal-report-target-numbers span {
  color: #71858a;
  font-size: 8px;
}

.renewal-report-target-numbers strong {
  color: #173d45;
  font-size: 17px;
  line-height: 1.25;
}

.renewal-report-target-numbers strong small {
  color: #70858a;
  font-size: 8px;
  font-weight: 500;
}

.renewal-report-target-numbers small {
  color: #687c81;
  font-size: 8px;
  line-height: 1.45;
}

.renewal-report-dual-bars {
  display: grid;
  gap: 8px;
}

.renewal-report-dual-bars > div {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 46px;
  align-items: center;
  gap: 7px;
}

.renewal-report-dual-bars span,
.renewal-report-dual-bars em {
  color: #718389;
  font-size: 8px;
  font-style: normal;
}

.renewal-report-dual-bars em {
  color: #287668;
  font-weight: 700;
  text-align: right;
}

.renewal-report-dual-bars i {
  height: 7px;
  overflow: hidden;
  background: #e9f0ef;
  border-radius: 99px;
}

.renewal-report-dual-bars i b {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #318677, #73c6ae);
  border-radius: inherit;
}

.renewal-report-target-card > .button {
  justify-self: start;
}

.renewal-report-legend {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-top: 3px;
}

.renewal-report-legend span {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #71858a;
  font-size: 8px;
}

.renewal-report-legend i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
}

.renewal-report-legend i.followup {
  background: #52a996;
}

.renewal-report-legend i.deal {
  background: #d8a04d;
}

.renewal-report-trend {
  display: grid;
  min-height: 150px;
  grid-template-columns: repeat(7, minmax(25px, 1fr));
  align-items: end;
  gap: 7px;
  padding-top: 4px;
}

.renewal-report-trend-day {
  display: grid;
  min-width: 0;
  justify-items: center;
  gap: 4px;
  padding: 5px 2px 3px;
  border-radius: 7px;
}

.renewal-report-trend-day.is-selected {
  background: #eef8f5;
  box-shadow: inset 0 -2px 0 #49a58f;
}

.renewal-report-trend-bars {
  display: flex;
  width: 100%;
  height: 92px;
  align-items: end;
  justify-content: center;
  gap: 4px;
  border-bottom: 1px solid #e3ebe9;
}

.renewal-report-trend-bars i {
  width: min(12px, 38%);
  min-height: 2px;
  border-radius: 4px 4px 1px 1px;
}

.renewal-report-trend-bars i.followup {
  background: linear-gradient(180deg, #79c5b2, #318e7e);
}

.renewal-report-trend-bars i.deal {
  background: linear-gradient(180deg, #ebc27b, #cf8c30);
}

.renewal-report-trend-day > strong {
  color: #415c63;
  font-size: 8px;
  line-height: 1.2;
}

.renewal-report-trend-day > small {
  color: #7b8d92;
  font-size: 7px;
  white-space: nowrap;
}

.renewal-report-trend-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 9px;
  color: #6c8085;
  border-top: 1px solid #edf2f1;
  font-size: 8px;
}

.renewal-report-attention-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: #e5edeb;
  border: 1px solid #e5edeb;
  border-radius: 9px;
}

.renewal-report-attention-metrics > div {
  display: grid;
  grid-template-columns: auto auto;
  align-items: end;
  justify-content: center;
  gap: 1px 3px;
  padding: 10px 5px;
  background: #f8fbfa;
  text-align: center;
}

.renewal-report-attention-metrics span {
  grid-column: 1 / -1;
  color: #6d8187;
  font-size: 8px;
}

.renewal-report-attention-metrics strong {
  color: #1c4b52;
  font-size: 17px;
  line-height: 1.1;
}

.renewal-report-attention-metrics small {
  color: #829297;
  font-size: 7px;
}

.renewal-report-attention-list {
  display: grid;
  gap: 6px;
}

.renewal-report-attention-list > button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 3px 7px;
  padding: 7px 8px;
  color: #243e45;
  background: #fbfcfc;
  border: 1px solid #e4ecea;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
}

.renewal-report-attention-list > button:hover {
  border-color: #91bdb4;
  background: #f5fbf9;
}

.renewal-report-attention-list > button .status {
  grid-row: 1 / span 2;
}

.renewal-report-attention-list > button strong {
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.renewal-report-attention-list > button small {
  overflow: hidden;
  color: #728489;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.renewal-report-attention-card > .button {
  align-self: end;
  justify-self: start;
}

.renewal-report-team-panel,
.renewal-report-store-panel,
.renewal-report-insurer-panel,
.renewal-report-focus-panel,
.renewal-report-activity-panel {
  overflow: hidden;
  background: #fff;
  border-color: var(--report-line);
  box-shadow: 0 8px 22px rgba(27, 76, 70, 0.05);
}

.renewal-report-section-heading {
  min-height: 76px;
  padding: 16px 18px;
  border-bottom: 1px solid #e6eeec;
  background:
    linear-gradient(90deg, rgba(47, 135, 118, 0.035), transparent 40%),
    #fff;
}

.renewal-report-section-heading.compact {
  min-height: 70px;
  padding: 14px 16px;
}

.renewal-report-section-heading > div > span {
  color: #318376;
}

.renewal-report-section-meta,
.renewal-report-activity-summary {
  display: grid;
  flex: 0 0 auto;
  justify-items: end;
  gap: 1px;
  text-align: right;
}

.renewal-report-section-meta strong,
.renewal-report-activity-summary strong {
  color: #267568;
  font-size: 20px;
  line-height: 1;
}

.renewal-report-section-meta span,
.renewal-report-activity-summary span {
  color: #718489;
  font-size: 8px;
}

.renewal-report-team-table th,
.renewal-report-store-table th {
  background: #f5f9f8;
  color: #5f747a;
  font-size: 9px;
  white-space: nowrap;
}

.renewal-report-team-table td,
.renewal-report-store-table td {
  padding-top: 12px;
  padding-bottom: 12px;
  color: #2b454c;
  font-size: 10px;
  vertical-align: middle;
}

.renewal-report-team-table tr.is-star td {
  background: #fdfbf6;
}

.renewal-report-team-table td small,
.renewal-report-store-table td small {
  display: block;
  margin-top: 2px;
  color: #7a8c91;
  font-size: 8px;
  line-height: 1.4;
}

.renewal-report-person-link,
.renewal-report-store-link {
  display: flex;
  min-width: 120px;
  align-items: center;
  gap: 9px;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
}

.renewal-report-person-link > span {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  place-items: center;
  color: #2c7367;
  background: #eaf6f2;
  border: 1px solid #cce7df;
  border-radius: 7px;
  font-size: 9px;
  font-weight: 800;
}

.renewal-report-person-link > div,
.renewal-report-store-link {
  display: grid;
  gap: 1px;
}

.renewal-report-person-link strong,
.renewal-report-store-link strong {
  color: #183b43;
  font-size: 10px;
}

.renewal-report-person-link small,
.renewal-report-store-link small {
  color: #71858a;
  font-size: 8px;
}

.renewal-report-person-link:hover strong,
.renewal-report-store-link:hover strong {
  color: #1c7668;
}

.renewal-report-rate-pill {
  display: inline-flex;
  min-width: 48px;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  padding: 3px 7px;
  border-radius: 99px;
  font-size: 8px;
  font-weight: 750;
}

.renewal-report-rate-pill.good {
  color: #246c60;
  background: #eaf7f3;
  border: 1px solid #c5e4dc;
}

.renewal-report-rate-pill.watch {
  color: #8a6529;
  background: #fff8e9;
  border: 1px solid #edddb9;
}

.renewal-report-rate-pill.risk {
  color: #a74739;
  background: #fff1ee;
  border: 1px solid #efc8c0;
}

.renewal-report-lower-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(430px, 1.28fr);
  gap: 14px;
}

.renewal-report-insurer-list {
  display: grid;
  gap: 13px;
  padding: 15px 16px 17px;
}

.renewal-report-insurer-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 12px;
}

.renewal-report-insurer-name,
.renewal-report-insurer-value {
  display: grid;
  gap: 2px;
}

.renewal-report-insurer-name strong {
  color: #203f47;
  font-size: 10px;
}

.renewal-report-insurer-name span,
.renewal-report-insurer-value span,
.renewal-report-insurer-list small {
  color: #71858a;
  font-size: 8px;
}

.renewal-report-insurer-value {
  justify-items: end;
  text-align: right;
}

.renewal-report-insurer-value strong {
  color: #1c675c;
  font-size: 11px;
}

.renewal-report-insurer-list i {
  grid-column: 1 / -1;
  height: 7px;
  overflow: hidden;
  background: #eaf1ef;
  border-radius: 99px;
}

.renewal-report-insurer-list i b {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #318979, #77c7b4);
  border-radius: inherit;
}

.renewal-report-insurer-list small {
  grid-column: 1 / -1;
}

.renewal-report-focus-list {
  display: grid;
}

.renewal-report-focus-list > div {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  border-bottom: 1px solid #edf2f1;
}

.renewal-report-focus-list > div:last-child {
  border-bottom: 0;
}

.renewal-report-focus-rank {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #866126;
  background: #fff7e7;
  border: 1px solid #efdcb5;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 800;
}

.renewal-report-focus-rank.risk {
  color: #a6483a;
  background: #fff0ed;
  border-color: #efc7bf;
}

.renewal-report-focus-list button[data-renewal-detail] {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
}

.renewal-report-focus-list button[data-renewal-detail] strong {
  color: #1e3d45;
  font-size: 10px;
}

.renewal-report-focus-list button[data-renewal-detail] small {
  overflow: hidden;
  color: #72858a;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.renewal-report-focus-list button[data-renewal-detail] em {
  color: #97672a;
  font-size: 8px;
  font-style: normal;
}

.renewal-report-inline-empty {
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 13px;
  color: #72858a;
  background: #f8fbfa;
  border: 1px dashed #d4e2df;
  border-radius: 8px;
  text-align: center;
}

.renewal-report-inline-empty.large {
  min-height: 160px;
  align-content: center;
  margin: 14px;
}

.renewal-report-inline-empty strong {
  color: #38545a;
  font-size: 10px;
}

.renewal-report-inline-empty span {
  font-size: 8px;
  line-height: 1.5;
}

.renewal-report-activity-list {
  display: grid;
}

.renewal-report-activity-list > button {
  display: grid;
  grid-template-columns: 64px minmax(120px, 0.72fr) minmax(180px, 1fr) minmax(220px, 1.4fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  color: #29434a;
  background: #fff;
  border: 0;
  border-bottom: 1px solid #edf2f1;
  text-align: left;
  cursor: pointer;
}

.renewal-report-activity-list > button:last-child {
  border-bottom: 0;
}

.renewal-report-activity-list > button:hover {
  background: #f8fbfa;
}

.renewal-report-activity-list time {
  color: #335e65;
  font-size: 10px;
  font-weight: 750;
}

.renewal-report-activity-owner,
.renewal-report-activity-customer,
.renewal-report-activity-result {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.renewal-report-activity-list strong {
  overflow: hidden;
  color: #24434a;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.renewal-report-activity-list small {
  overflow: hidden;
  color: #72858a;
  font-size: 8px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.renewal-report-activity-result small {
  max-width: 380px;
}

.renewal-report-activity-list > button > i {
  min-width: 42px;
  padding: 4px 7px;
  border-radius: 99px;
  font-size: 8px;
  font-style: normal;
  font-weight: 750;
  text-align: center;
}

.renewal-report-activity-list > button > i.followup {
  color: #267366;
  background: #eaf7f3;
}

.renewal-report-activity-list > button > i.deal {
  color: #886224;
  background: #fff7e5;
}

.renewal-report-activity-list > button > i.lost {
  color: #a74435;
  background: #fff0ed;
}

.renewal-report-activity-list > button > i.operation {
  color: #556a70;
  background: #eff3f4;
}

.renewal-report-footnote {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 16px;
  color: #6e8287;
  background: #f7faf9;
  border-top: 1px solid #e7eeec;
  font-size: 8px;
}

.renewal-report-footnote strong {
  color: #296f64;
}

@media (max-width: 1280px) {
  .renewal-report-pulse {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .renewal-report-attention-card {
    grid-column: 1 / -1;
    grid-template-columns: minmax(220px, 0.72fr) minmax(260px, 1fr);
    align-items: start;
  }

  .renewal-report-attention-card > .renewal-report-card-heading,
  .renewal-report-attention-card > .button {
    grid-column: 1 / -1;
  }

  .renewal-report-attention-list {
    align-self: stretch;
  }

  .renewal-report-filterbar {
    align-items: stretch;
    flex-direction: column;
  }

  .renewal-report-quick-dates {
    align-self: flex-start;
  }
}

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

  .renewal-report-hero-meta {
    justify-items: start;
    text-align: left;
  }

  .renewal-report-filter-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .renewal-report-pulse,
  .renewal-report-lower-grid {
    grid-template-columns: 1fr;
  }

  .renewal-report-attention-card {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .renewal-report-activity-list > button {
    grid-template-columns: 54px minmax(100px, 0.7fr) minmax(150px, 1fr) auto;
  }

  .renewal-report-activity-result {
    display: none;
  }
}

@media (max-width: 640px) {
  .renewal-report-hero {
    min-height: 0;
    padding: 20px 18px;
  }

  .renewal-report-filter-fields {
    grid-template-columns: 1fr;
  }

  .renewal-report-quick-dates {
    width: 100%;
  }

  .renewal-report-quick-dates button {
    flex: 1;
  }

  .renewal-report-target-main {
    grid-template-columns: 105px minmax(0, 1fr);
    gap: 12px;
  }

  .renewal-report-target-ring {
    width: 105px;
    height: 105px;
  }

  .renewal-report-target-ring::before {
    width: 78px;
    height: 78px;
  }

  .renewal-report-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .renewal-report-section-meta,
  .renewal-report-activity-summary {
    justify-items: start;
    text-align: left;
  }

  .renewal-report-focus-list > div {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .renewal-report-focus-list > div > .button {
    grid-column: 2;
    justify-self: start;
  }

  .renewal-report-activity-list > button {
    grid-template-columns: 50px minmax(0, 1fr) auto;
  }

  .renewal-report-activity-customer {
    grid-column: 2;
  }

  .renewal-report-activity-owner {
    display: none;
  }

  .renewal-report-footnote {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Renewal daily report readability: larger type without flattening hierarchy. */
.renewal-report-shell .renewal-report-title > span {
  font-size: clamp(11px, 0.15vw + 8px, 13px);
  letter-spacing: 0.11em;
}

.renewal-report-shell .renewal-report-title h3 {
  font-size: clamp(30px, 0.7vw + 20px, 38px);
}

.renewal-report-shell .renewal-report-title p {
  font-size: clamp(13px, 0.2vw + 10px, 15px);
  line-height: 1.75;
}

.renewal-report-shell .renewal-report-scope-chips span {
  padding: 6px 11px;
  font-size: clamp(11px, 0.12vw + 9px, 13px);
}

.renewal-report-shell .renewal-report-hero-meta strong {
  font-size: clamp(16px, 0.25vw + 12px, 19px);
}

.renewal-report-shell .renewal-report-hero-meta small {
  font-size: clamp(11px, 0.12vw + 9px, 13px);
}

.renewal-report-shell .renewal-report-filterbar {
  padding: 16px 18px;
}

.renewal-report-shell .renewal-report-filter-fields label {
  gap: 7px;
  font-size: clamp(11px, 0.12vw + 9px, 13px);
}

.renewal-report-shell .renewal-report-filter-fields input,
.renewal-report-shell .renewal-report-filter-fields select {
  min-height: 44px;
  font-size: clamp(13px, 0.16vw + 10px, 15px);
}

.renewal-report-shell .renewal-report-quick-dates button {
  min-height: 36px;
  padding-inline: 13px;
  font-size: clamp(11px, 0.12vw + 9px, 13px);
}

.renewal-report-shell .renewal-report-kpis .simple-stat {
  min-height: 126px;
  padding: 18px 19px;
}

.renewal-report-shell .renewal-report-kpis .simple-stat > span {
  font-size: clamp(12px, 0.12vw + 10px, 14px);
}

.renewal-report-shell .renewal-report-kpis .simple-stat > strong {
  font-size: clamp(29px, 0.45vw + 22px, 35px);
}

.renewal-report-shell .renewal-report-kpis .simple-stat > strong small {
  font-size: clamp(11px, 0.1vw + 9px, 13px);
}

.renewal-report-shell .renewal-report-kpis .simple-stat > small {
  font-size: clamp(10.5px, 0.1vw + 8px, 12.5px);
  line-height: 1.6;
}

.renewal-report-shell .renewal-report-target-card,
.renewal-report-shell .renewal-report-trend-card,
.renewal-report-shell .renewal-report-attention-card {
  gap: 16px;
  padding: 20px;
}

.renewal-report-shell .renewal-report-card-heading > div > span,
.renewal-report-shell .renewal-report-section-heading > div > span {
  font-size: clamp(10px, 0.1vw + 8px, 12px);
}

.renewal-report-shell .renewal-report-card-heading h4 {
  font-size: clamp(16px, 0.18vw + 13px, 18px);
}

.renewal-report-shell .renewal-report-section-heading h3 {
  font-size: clamp(18px, 0.22vw + 14px, 21px);
}

.renewal-report-shell .renewal-report-section-heading p {
  font-size: clamp(11.5px, 0.12vw + 9px, 13px);
  line-height: 1.65;
}

.renewal-report-shell .renewal-report-target-main {
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 20px;
}

.renewal-report-shell .renewal-report-target-ring {
  width: 132px;
  height: 132px;
}

.renewal-report-shell .renewal-report-target-ring::before {
  width: 98px;
  height: 98px;
}

.renewal-report-shell .renewal-report-target-ring strong {
  font-size: clamp(26px, 0.35vw + 21px, 31px);
}

.renewal-report-shell .renewal-report-target-ring small {
  font-size: clamp(10px, 0.1vw + 8px, 12px);
}

.renewal-report-shell .renewal-report-target-numbers {
  gap: 13px;
}

.renewal-report-shell .renewal-report-target-numbers > div {
  gap: 5px;
  padding-bottom: 11px;
}

.renewal-report-shell .renewal-report-target-numbers span {
  font-size: clamp(11px, 0.1vw + 9px, 13px);
}

.renewal-report-shell .renewal-report-target-numbers strong {
  font-size: clamp(21px, 0.25vw + 17px, 24px);
}

.renewal-report-shell .renewal-report-target-numbers strong small,
.renewal-report-shell .renewal-report-target-numbers small {
  font-size: clamp(10.5px, 0.1vw + 8px, 12.5px);
  line-height: 1.55;
}

.renewal-report-shell .renewal-report-dual-bars {
  gap: 10px;
}

.renewal-report-shell .renewal-report-dual-bars > div {
  grid-template-columns: 70px minmax(0, 1fr) 56px;
  gap: 9px;
}

.renewal-report-shell .renewal-report-dual-bars span,
.renewal-report-shell .renewal-report-dual-bars em {
  font-size: clamp(10.5px, 0.1vw + 8px, 12.5px);
}

.renewal-report-shell .renewal-report-dual-bars i {
  height: 9px;
}

.renewal-report-shell .renewal-report-legend span {
  font-size: clamp(10.5px, 0.1vw + 8px, 12.5px);
}

.renewal-report-shell .renewal-report-trend {
  min-height: 185px;
  gap: 9px;
}

.renewal-report-shell .renewal-report-trend-bars {
  height: 118px;
}

.renewal-report-shell .renewal-report-trend-bars i {
  width: min(16px, 40%);
}

.renewal-report-shell .renewal-report-trend-day > strong {
  font-size: clamp(10.5px, 0.1vw + 8px, 12.5px);
}

.renewal-report-shell .renewal-report-trend-day > small {
  font-size: clamp(9.5px, 0.08vw + 8px, 11.5px);
}

.renewal-report-shell .renewal-report-trend-foot {
  padding-top: 11px;
  font-size: clamp(10.5px, 0.1vw + 8px, 12.5px);
}

.renewal-report-shell .renewal-report-attention-metrics > div {
  padding: 13px 7px;
}

.renewal-report-shell .renewal-report-attention-metrics span {
  font-size: clamp(10.5px, 0.1vw + 8px, 12.5px);
}

.renewal-report-shell .renewal-report-attention-metrics strong {
  font-size: clamp(21px, 0.25vw + 17px, 24px);
}

.renewal-report-shell .renewal-report-attention-metrics small {
  font-size: clamp(9.5px, 0.08vw + 8px, 11.5px);
}

.renewal-report-shell .renewal-report-attention-list > button {
  gap: 4px 9px;
  padding: 9px 10px;
}

.renewal-report-shell .renewal-report-attention-list > button strong {
  font-size: clamp(11.5px, 0.12vw + 9px, 13.5px);
}

.renewal-report-shell .renewal-report-attention-list > button small {
  font-size: clamp(10px, 0.1vw + 8px, 12px);
}

.renewal-report-shell .renewal-report-section-heading {
  min-height: 88px;
  padding: 18px 20px;
}

.renewal-report-shell .renewal-report-section-heading.compact {
  min-height: 80px;
  padding: 16px 18px;
}

.renewal-report-shell .renewal-report-section-meta strong,
.renewal-report-shell .renewal-report-activity-summary strong {
  font-size: clamp(22px, 0.25vw + 18px, 26px);
}

.renewal-report-shell .renewal-report-section-meta span,
.renewal-report-shell .renewal-report-activity-summary span {
  font-size: clamp(10.5px, 0.1vw + 8px, 12.5px);
}

.renewal-report-shell .renewal-report-team-table {
  min-width: 1540px;
}

.renewal-report-shell .renewal-report-team-table th:nth-child(2),
.renewal-report-shell .renewal-report-team-table td:nth-child(2) {
  width: 360px;
  min-width: 320px;
  max-width: 420px;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.75;
}

.renewal-report-shell .renewal-report-store-table {
  min-width: 1260px;
}

.renewal-report-shell .renewal-report-team-table th,
.renewal-report-shell .renewal-report-store-table th {
  padding: 13px 14px;
  font-size: clamp(11px, 0.1vw + 9px, 13px);
  line-height: 1.45;
}

.renewal-report-shell .renewal-report-team-table td,
.renewal-report-shell .renewal-report-store-table td {
  padding: 15px 14px;
  font-size: clamp(12px, 0.12vw + 10px, 14px);
  line-height: 1.5;
}

.renewal-report-shell .renewal-report-team-table td small,
.renewal-report-shell .renewal-report-store-table td small {
  margin-top: 4px;
  font-size: clamp(10.5px, 0.1vw + 8px, 12.5px);
  line-height: 1.55;
}

.renewal-report-shell .renewal-report-person-link,
.renewal-report-shell .renewal-report-store-link {
  gap: 11px;
}

.renewal-report-shell .renewal-report-person-link > span {
  width: 30px;
  height: 30px;
  font-size: 11px;
}

.renewal-report-shell .renewal-report-person-link strong,
.renewal-report-shell .renewal-report-store-link strong {
  font-size: clamp(12px, 0.12vw + 10px, 14px);
  line-height: 1.45;
}

.renewal-report-shell .renewal-report-person-link small,
.renewal-report-shell .renewal-report-store-link small {
  font-size: clamp(10.5px, 0.1vw + 8px, 12.5px);
  line-height: 1.5;
}

.renewal-report-shell .renewal-report-rate-pill {
  min-width: 58px;
  min-height: 28px;
  padding-inline: 9px;
  font-size: clamp(10.5px, 0.1vw + 8px, 12.5px);
}

.renewal-report-shell .renewal-report-insurer-list {
  gap: 16px;
  padding: 18px;
}

.renewal-report-shell .renewal-report-insurer-name strong {
  font-size: clamp(12px, 0.12vw + 10px, 14px);
}

.renewal-report-shell .renewal-report-insurer-name span,
.renewal-report-shell .renewal-report-insurer-value span,
.renewal-report-shell .renewal-report-insurer-list small {
  font-size: clamp(10.5px, 0.1vw + 8px, 12.5px);
  line-height: 1.55;
}

.renewal-report-shell .renewal-report-insurer-value strong {
  font-size: clamp(13px, 0.12vw + 11px, 15px);
}

.renewal-report-shell .renewal-report-insurer-list i {
  height: 9px;
}

.renewal-report-shell .renewal-report-focus-list > div {
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 13px 17px;
}

.renewal-report-shell .renewal-report-focus-rank {
  width: 34px;
  height: 34px;
  font-size: 11px;
}

.renewal-report-shell .renewal-report-focus-list button[data-renewal-detail] {
  gap: 3px;
}

.renewal-report-shell .renewal-report-focus-list button[data-renewal-detail] strong {
  font-size: clamp(12px, 0.12vw + 10px, 14px);
}

.renewal-report-shell .renewal-report-focus-list button[data-renewal-detail] small,
.renewal-report-shell .renewal-report-focus-list button[data-renewal-detail] em {
  font-size: clamp(10.5px, 0.1vw + 8px, 12.5px);
  line-height: 1.5;
}

.renewal-report-shell .renewal-report-inline-empty {
  gap: 5px;
  padding: 16px;
}

.renewal-report-shell .renewal-report-inline-empty strong {
  font-size: clamp(12px, 0.12vw + 10px, 14px);
}

.renewal-report-shell .renewal-report-inline-empty span {
  font-size: clamp(10.5px, 0.1vw + 8px, 12.5px);
  line-height: 1.6;
}

.renewal-report-shell .renewal-report-activity-list > button {
  grid-template-columns: 72px minmax(130px, 0.72fr) minmax(190px, 1fr) minmax(240px, 1.4fr) auto;
  gap: 14px;
  padding: 14px 18px;
}

.renewal-report-shell .renewal-report-activity-list time {
  font-size: clamp(12px, 0.12vw + 10px, 14px);
}

.renewal-report-shell .renewal-report-activity-list strong {
  font-size: clamp(11.5px, 0.12vw + 9px, 13.5px);
}

.renewal-report-shell .renewal-report-activity-list small {
  font-size: clamp(10.5px, 0.1vw + 8px, 12.5px);
  line-height: 1.5;
}

.renewal-report-shell .renewal-report-activity-list > button > i {
  min-width: 50px;
  padding: 5px 9px;
  font-size: clamp(10px, 0.1vw + 8px, 12px);
}

.renewal-report-shell .renewal-report-footnote {
  padding: 12px 18px;
  font-size: clamp(10.5px, 0.1vw + 8px, 12.5px);
}

.modal.wide-modal .modal-footer {
  flex-wrap: wrap;
}

.modal-footer .renewal-insurance-quick-quote {
  order: -1;
  min-width: 178px;
  margin-right: auto;
  color: #fff;
  background: linear-gradient(135deg, #bf272d, #e44238);
  border-color: #b32228;
  box-shadow: 0 8px 20px rgba(191, 39, 45, 0.25);
  font-weight: 750;
}

.modal-footer .renewal-insurance-quick-quote:hover {
  color: #fff;
  background: linear-gradient(135deg, #a91f25, #d9362d);
  border-color: #9f1d22;
}

.modal-footer .renewal-insurance-quick-quote:disabled {
  color: #fff;
  background: linear-gradient(135deg, #bf272d, #e44238);
  opacity: 0.78;
}

.modal-footer .renewal-insurance-quick-quote .button-icon,
.modal-footer .renewal-insurance-quick-quote .button-icon svg {
  color: #fff;
}

@media (max-width: 980px) {
  .renewal-report-shell .renewal-report-target-main {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 14px;
  }

  .renewal-report-shell .renewal-report-target-ring {
    width: 112px;
    height: 112px;
  }

  .renewal-report-shell .renewal-report-target-ring::before {
    width: 84px;
    height: 84px;
  }
}

@media (max-width: 640px) {
  .renewal-report-shell .renewal-report-title h3 {
    font-size: 29px;
  }

  .renewal-report-shell .renewal-report-title p {
    font-size: 13px;
  }

  .renewal-report-shell .renewal-report-kpis .simple-stat > strong {
    font-size: 29px;
  }

  .renewal-report-shell .renewal-report-section-heading h3 {
    font-size: 18px;
  }

  .renewal-report-shell .renewal-report-activity-list > button {
    grid-template-columns: 58px minmax(0, 1fr) auto;
  }
}

@media (max-width: 820px) {
  .renewal-expiry-detail-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .renewal-expiry-detail-summary > div {
    min-height: 72px;
    padding: 12px;
  }

  .renewal-expiry-detail-caption {
    display: grid;
  }

  .renewal-expiry-detail-caption span {
    text-align: left;
  }

  .renewal-expiry-detail-table {
    max-height: none;
    overflow: auto;
  }
}

/* Member operations is an immersive hand-off: the embedded member application
   owns the screen, with only the return-to-group action rendered by the shell. */
body.member-portal-mode,
body.member-portal-mode .app-shell,
body.member-portal-mode .main-area {
  width: 100%;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background: #0d1f2d;
}

body.member-portal-mode .sidebar,
body.member-portal-mode .sidebar-overlay,
body.member-portal-mode .topbar,
body.member-portal-mode .mobile-bottom-nav,
body.member-portal-mode .follow-up-reminder {
  display: none !important;
}

body.member-portal-mode .main-area {
  margin-left: 0;
}

body.member-portal-mode .workspace {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: block;
  width: 100%;
  max-width: none;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  animation: none;
}

body.member-portal-mode .finance-member-portal {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: #0d1f2d;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body.member-portal-mode .finance-member-portal-frame {
  position: absolute;
  inset: 56px 0 0;
  width: 100%;
  height: calc(100% - 56px);
  min-height: 0;
  margin: 0;
  background: #f5f7fb;
  border: 0;
  border-radius: 0;
}

.member-portal-return {
  position: fixed;
  z-index: 90;
  top: 9px;
  left: 14px;
  display: inline-flex;
  height: 38px;
  align-items: center;
  gap: 9px;
  padding: 0 17px 0 8px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #ff8a45 0%, #ff653d 45%, #e94f68 100%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(239, 91, 62, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.34);
  font: inherit;
  font-size: 12px;
  font-weight: 720;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
  backdrop-filter: blur(14px) saturate(1.2);
}

.member-portal-refresh {
  position: fixed;
  z-index: 90;
  top: 9px;
  right: 14px;
  display: inline-flex;
  height: 38px;
  align-items: center;
  gap: 8px;
  padding: 0 15px 0 8px;
  color: #163a44;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(122, 155, 170, 0.28);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(10, 37, 52, 0.2), inset 0 1px 0 #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
  backdrop-filter: blur(14px) saturate(1.15);
}

.member-portal-refresh:hover {
  background: #fff;
  box-shadow: 0 11px 28px rgba(10, 37, 52, 0.26), inset 0 1px 0 #fff;
  transform: translateY(-1px);
}

.member-portal-refresh:active {
  transform: translateY(0);
}

.member-portal-refresh:focus-visible {
  outline: 3px solid rgba(20, 127, 115, 0.35);
  outline-offset: 3px;
}

.member-portal-refresh:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}

.member-portal-refresh-icon {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #23b49a, #147f73);
  border-radius: 50%;
  box-shadow: 0 3px 9px rgba(20, 127, 115, 0.25);
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
}

.member-portal-return::before {
  position: absolute;
  inset: 1px 1px auto;
  height: 46%;
  content: "";
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.24), transparent);
  border-radius: 999px 999px 40% 40%;
  pointer-events: none;
}

.member-portal-return:hover {
  filter: brightness(1.06);
  box-shadow: 0 12px 30px rgba(239, 91, 62, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.42);
  transform: translateY(-1px);
}

.member-portal-return:active {
  transform: translateY(0);
}

.member-portal-return:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.82);
  outline-offset: 3px;
}

.member-portal-return-arrow {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  color: #ff6b48;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 7px rgba(119, 35, 25, 0.2);
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
}

.member-portal-live-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 620px) {
  body.member-portal-mode .finance-member-portal-frame {
    inset: 50px 0 0;
    height: calc(100% - 50px);
  }

  .member-portal-return {
    top: 6px;
    left: max(8px, env(safe-area-inset-left));
    height: 36px;
    padding-right: 14px;
    font-size: 11px;
  }

  .member-portal-refresh {
    top: 6px;
    right: max(8px, env(safe-area-inset-right));
    height: 36px;
    padding-right: 12px;
    font-size: 11px;
  }
}

body.member-portal-mode .finance-member-portal-frame {
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
}

body.member-portal-mode .member-portal-return {
  top: auto;
  right: 20px;
  bottom: 20px;
  left: auto;
}

@media (max-width: 620px) {
  html[data-client-terminal="phone"] body.member-portal-mode .finance-member-portal-frame {
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
  }

  body.member-portal-mode .member-portal-return {
    top: auto;
    right: max(12px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
    left: auto;
  }
}

@media (max-width: 820px) {
  .site-compliance-footer {
    width: calc(100% - 28px);
    flex-direction: column;
    gap: 4px;
    padding: 14px 0 calc(78px + env(safe-area-inset-bottom));
    text-align: center;
  }

  .site-compliance-footer-login {
    width: min(420px, 100%);
    margin-top: 12px;
    padding: 0;
  }
}

body.member-portal-mode .site-compliance-footer {
  display: none;
}

/* Vehicle transfer pricing and payment workflow */
.finance-transfer-payment-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.finance-transfer-payment-summary > div {
  position: relative;
  overflow: hidden;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    radial-gradient(circle at 100% 0%, rgba(28, 111, 90, 0.1), transparent 52%),
    var(--panel);
  box-shadow: 0 8px 24px rgba(27, 45, 42, 0.05);
}

.finance-transfer-payment-summary span,
.finance-transfer-payment-summary small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.finance-transfer-payment-summary strong {
  display: block;
  margin: 7px 0 4px;
  color: var(--ink);
  font-size: 22px;
  letter-spacing: -0.02em;
}

.finance-transfer-payment-summary strong small {
  display: inline;
  margin-left: 3px;
  font-size: 10px;
}

.transfer-bank-account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
}

.transfer-bank-account-card {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(0, 1.4fr) auto;
  align-items: center;
  gap: 16px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(245, 249, 247, 0.9));
}

.transfer-bank-account-card.missing {
  border-color: rgba(198, 128, 42, 0.34);
  background: linear-gradient(145deg, rgba(255, 253, 245, 0.95), rgba(253, 245, 226, 0.72));
}

.transfer-bank-account-card > div:first-child > span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 9px;
}

.transfer-bank-account-card > div:first-child > strong {
  color: var(--ink);
  font-size: 13px;
}

.transfer-bank-account-card dl {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 4px 8px;
  margin: 0;
  font-size: 10px;
}

.transfer-bank-account-card dt {
  color: var(--muted);
}

.transfer-bank-account-card dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transfer-bank-account-empty {
  display: grid;
  gap: 3px;
  color: #8b651f;
  font-size: 10px;
}

.transfer-bank-account-empty strong {
  color: #6f5017;
  font-size: 12px;
}

.transfer-payment-table td:nth-child(3) .store-cell,
.transfer-workflow-table td:nth-child(2) .store-cell {
  min-width: 130px;
}

.transfer-payment-direction {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.transfer-workflow-table td {
  vertical-align: top;
}

.workflow-operator-chip {
  display: block;
  width: max-content;
  max-width: 190px;
  margin: 0 0 4px;
  padding: 3px 7px;
  overflow: hidden;
  border: 1px solid rgba(28, 111, 90, 0.14);
  border-radius: 999px;
  background: rgba(28, 111, 90, 0.06);
  color: var(--green);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transfer-pricing-summary,
.transfer-incoming-confirm,
.transfer-payment-confirm-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.transfer-incoming-confirm,
.transfer-payment-confirm-card {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.transfer-pricing-summary > div,
.transfer-incoming-confirm > div,
.transfer-payment-confirm-card > div {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--soft);
}

.transfer-pricing-summary span,
.transfer-incoming-confirm span,
.transfer-payment-confirm-card span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 9px;
}

.transfer-pricing-summary strong,
.transfer-incoming-confirm strong,
.transfer-payment-confirm-card strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
}

.transfer-pricing-summary small,
.transfer-payment-confirm-card small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.transfer-payee-preview {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1.4fr;
  gap: 12px;
  padding: 13px;
  border: 1px solid rgba(28, 111, 90, 0.18);
  border-radius: 11px;
  background: rgba(28, 111, 90, 0.045);
}

.transfer-payee-preview span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 9px;
}

.transfer-payee-preview strong {
  color: var(--ink);
  font-size: 11px;
  word-break: break-all;
}

.transfer-approval-sheet,
.transfer-payment-document {
  overflow: hidden;
  border: 1px solid rgba(31, 54, 48, 0.18);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 45px rgba(24, 45, 39, 0.08);
}

.transfer-approval-sheet > header {
  padding: 23px 26px;
  background:
    linear-gradient(125deg, rgba(15, 76, 66, 0.98), rgba(31, 111, 88, 0.92)),
    #174f44;
  color: #fff;
}

.transfer-approval-sheet > header span,
.transfer-payment-document-head span {
  font-size: 9px;
  letter-spacing: 0.18em;
  opacity: 0.68;
}

.transfer-approval-sheet > header h3 {
  margin: 7px 0 3px;
  font-size: 20px;
}

.transfer-approval-sheet > header em {
  font-style: normal;
  font-size: 27px;
  font-weight: 800;
}

.transfer-approval-grid,
.transfer-payment-document-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.transfer-approval-grid > div,
.transfer-payment-document-grid > div {
  padding: 12px 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.transfer-approval-grid > div:nth-child(even),
.transfer-payment-document-grid > div:nth-child(even) {
  border-right: 0;
}

.transfer-approval-grid .span-2,
.transfer-payment-document-grid .span-2 {
  grid-column: span 2;
}

.transfer-approval-grid span,
.transfer-payment-document-grid span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 9px;
}

.transfer-approval-grid strong,
.transfer-payment-document-grid strong {
  color: var(--ink);
  font-size: 11px;
  line-height: 1.55;
}

.transfer-approval-sheet > .form-field {
  padding: 16px 18px;
}

.transfer-payment-document-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 30px 24px;
  border-bottom: 4px solid var(--green);
  background:
    radial-gradient(circle at 100% 0%, rgba(36, 120, 94, 0.09), transparent 44%),
    #fbfdfc;
}

.transfer-payment-document-head h2 {
  margin: 8px 0 4px;
  color: #173c33;
  font-size: 25px;
  letter-spacing: 0.08em;
}

.transfer-payment-document-head p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.transfer-payment-document-summary {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr 1fr;
  border-bottom: 1px solid var(--line);
  background: #f6faf8;
}

.transfer-payment-document-summary > div {
  padding: 15px 18px;
  border-right: 1px solid var(--line);
}

.transfer-payment-document-summary > div:last-child {
  border-right: 0;
}

.transfer-payment-document-summary span,
.transfer-payment-document-summary small {
  display: block;
  color: var(--muted);
  font-size: 9px;
}

.transfer-payment-document-summary strong {
  display: block;
  margin: 5px 0 3px;
  color: var(--ink);
  font-size: 14px;
}

.transfer-payment-document-summary > div:last-child strong {
  color: var(--green);
  font-size: 21px;
}

.transfer-payment-document-approval {
  padding: 20px 22px;
}

.transfer-payment-document-approval h3 {
  margin: 0 0 13px;
  color: var(--ink);
  font-size: 13px;
}

.transfer-payment-document-timeline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.transfer-payment-document-timeline > div {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.transfer-payment-document-timeline > div.done {
  border-color: rgba(28, 111, 90, 0.2);
  background: rgba(28, 111, 90, 0.035);
}

.transfer-payment-document-timeline i {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #edf2f0;
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.done .transfer-payment-document-timeline i,
.transfer-payment-document-timeline > div.done i {
  background: var(--green);
  color: #fff;
}

.transfer-payment-document-timeline span strong,
.transfer-payment-document-timeline span small {
  display: block;
}

.transfer-payment-document-timeline span strong {
  color: var(--ink);
  font-size: 10px;
}

.transfer-payment-document-timeline span small,
.transfer-payment-document-timeline em,
.transfer-payment-document-timeline p {
  color: var(--muted);
  font-size: 8px;
  font-style: normal;
}

.transfer-payment-document-timeline p {
  grid-column: 2 / -1;
  margin: 0;
}

.transfer-payment-document-note {
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: #faf8f1;
}

.transfer-payment-document-note strong {
  color: #715a2a;
  font-size: 10px;
}

.transfer-payment-document-note p {
  margin: 5px 0 0;
  color: #776d57;
  font-size: 9px;
  line-height: 1.65;
}

.transfer-account-form-intro {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
  padding: 13px 15px;
  border: 1px solid rgba(28, 111, 90, 0.18);
  border-radius: 11px;
  background: rgba(28, 111, 90, 0.045);
}

.transfer-account-form-intro > span {
  color: var(--green);
}

.transfer-account-form-intro strong {
  color: var(--ink);
  font-size: 12px;
}

.transfer-account-form-intro p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

@media (max-width: 1100px) {
  .finance-transfer-payment-summary,
  .transfer-payment-document-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .transfer-bank-account-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .finance-transfer-payment-summary,
  .transfer-pricing-summary,
  .transfer-incoming-confirm,
  .transfer-payment-confirm-card,
  .transfer-payee-preview,
  .transfer-payment-document-summary,
  .transfer-payment-document-grid,
  .transfer-payment-document-timeline {
    grid-template-columns: 1fr;
  }

  .transfer-bank-account-card {
    grid-template-columns: 1fr;
  }

  .transfer-approval-grid .span-2,
  .transfer-payment-document-grid .span-2 {
    grid-column: auto;
  }

  .transfer-approval-grid > div,
  .transfer-payment-document-grid > div {
    border-right: 0;
  }

  .transfer-payment-document-timeline p {
    grid-column: auto;
  }
}

/* Finance center: youthful electric blue-violet palette */
.finance-hub-page {
  --finance-ink: #1c2450;
  --finance-copy: #687293;
  --finance-muted: #8a93ad;
  --finance-line: #e5e8f8;
  --finance-primary: #5964ee;
  --finance-primary-deep: #4551dc;
  --finance-cyan: #13b9d0;
  --finance-violet: #8258ea;
  --finance-mint: #18ad84;
  --finance-coral: #ff6b87;
  --finance-paper: #f6f7ff;
  position: relative;
  isolation: isolate;
}

.finance-hub-page::before {
  position: absolute;
  z-index: -1;
  top: -22px;
  right: -24px;
  left: -24px;
  height: 250px;
  content: "";
  background:
    radial-gradient(circle at 9% 4%, rgba(89, 100, 238, 0.13), transparent 31%),
    radial-gradient(circle at 72% 0%, rgba(19, 185, 208, 0.1), transparent 26%),
    linear-gradient(180deg, rgba(246, 247, 255, 0.96), rgba(246, 247, 255, 0));
  border-radius: 24px;
  pointer-events: none;
}

.finance-hub-page .finance-hub-head {
  position: relative;
  min-height: 122px;
  align-items: center;
  overflow: hidden;
  margin-bottom: 16px;
  padding: 22px 24px;
  background:
    radial-gradient(circle at 82% 8%, rgba(81, 224, 230, 0.18), transparent 27%),
    radial-gradient(circle at 98% 100%, rgba(130, 88, 234, 0.12), transparent 30%),
    linear-gradient(118deg, #ffffff 0%, #f5f6ff 52%, #eefbff 100%);
  border: 1px solid #dfe3fa;
  border-radius: 19px;
  box-shadow: 0 14px 34px rgba(61, 72, 157, 0.08);
}

.finance-hub-page .finance-hub-head::after {
  position: absolute;
  top: -45px;
  right: 25%;
  width: 150px;
  height: 150px;
  content: "";
  background: linear-gradient(135deg, rgba(89, 100, 238, 0.11), rgba(19, 185, 208, 0.02));
  border: 1px solid rgba(89, 100, 238, 0.09);
  border-radius: 44px;
  transform: rotate(24deg);
  pointer-events: none;
}

.finance-hub-page .finance-hub-head > div {
  position: relative;
  z-index: 1;
}

.finance-hub-page .finance-hub-head h2,
.finance-hub-page .finance-hub-head p {
  max-width: 940px;
}

.finance-hub-page .finance-hub-head h2 {
  position: relative;
  padding-left: 16px;
  color: var(--finance-ink);
  font-size: 25px;
  font-weight: 750;
  letter-spacing: -0.035em;
}

.finance-hub-page .finance-hub-head h2::before {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 5px;
  content: "";
  background: linear-gradient(180deg, var(--finance-primary), var(--finance-cyan));
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(89, 100, 238, 0.07);
}

.finance-hub-page .finance-hub-head p {
  padding-left: 16px;
  color: var(--finance-copy);
  font-size: 12px;
  line-height: 1.75;
}

.finance-hub-page .finance-hub-head .page-head-actions {
  padding-left: 18px;
}

.finance-hub-page .button {
  border-color: #dfe3f4;
  border-radius: 10px;
  box-shadow: 0 5px 14px rgba(50, 61, 128, 0.045);
}

.finance-hub-page .button:hover {
  color: var(--finance-primary-deep);
  background: #f7f8ff;
  border-color: #cfd5f2;
}

.finance-hub-page .button.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--finance-primary), #7861ea);
  border-color: transparent;
  box-shadow: 0 9px 20px rgba(89, 100, 238, 0.24);
}

.finance-hub-page .button.primary:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--finance-primary-deep), #6e50df);
  border-color: transparent;
}

.finance-hub-page .button.danger {
  color: #c83d59;
  background: #fff;
  border-color: #f1cbd4;
}

.finance-hub-page .finance-hub-overview {
  gap: 12px;
}

.finance-hub-page .finance-hub-overview > div {
  --metric-accent: var(--finance-primary);
  --metric-ink: #3540c7;
  position: relative;
  overflow: hidden;
  min-height: 118px;
  gap: 7px;
  background:
    radial-gradient(circle at 100% 0%, rgba(89, 100, 238, 0.14), transparent 52%),
    linear-gradient(145deg, #eef0ff, #fbfbff 68%);
  border: 1px solid #dde1fb;
  border-radius: 16px;
  box-shadow: 0 10px 26px rgba(65, 76, 158, 0.07);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.finance-hub-page .finance-hub-overview > div:nth-child(2) {
  --metric-accent: var(--finance-cyan);
  --metric-ink: #077f97;
  background:
    radial-gradient(circle at 100% 0%, rgba(19, 185, 208, 0.16), transparent 52%),
    linear-gradient(145deg, #e9fbff, #fbffff 68%);
  border-color: #d3f2f7;
}

.finance-hub-page .finance-hub-overview > div:nth-child(3) {
  --metric-accent: var(--finance-violet);
  --metric-ink: #6c46d4;
  background:
    radial-gradient(circle at 100% 0%, rgba(130, 88, 234, 0.15), transparent 52%),
    linear-gradient(145deg, #f3edff, #fcfbff 68%);
  border-color: #e6dcfb;
}

.finance-hub-page .finance-hub-overview > div:nth-child(4) {
  --metric-accent: var(--finance-mint);
  --metric-ink: #078565;
  background:
    radial-gradient(circle at 100% 0%, rgba(24, 173, 132, 0.14), transparent 52%),
    linear-gradient(145deg, #eafaf4, #fbfffd 68%);
  border-color: #d6f1e7;
}

.finance-hub-page .finance-hub-overview > div::before {
  position: absolute;
  top: 0;
  left: 19px;
  width: 46px;
  height: 3px;
  content: "";
  background: var(--metric-accent);
  border-radius: 0 0 999px 999px;
}

.finance-hub-page .finance-hub-overview > div::after {
  position: absolute;
  right: -28px;
  bottom: -39px;
  width: 108px;
  height: 108px;
  content: "";
  background: var(--metric-accent);
  border-radius: 38px;
  opacity: 0.055;
  transform: rotate(22deg);
}

.finance-hub-page .finance-hub-overview span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #6e7898;
  font-size: 10px;
  font-weight: 650;
}

.finance-hub-page .finance-hub-overview span::before {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  content: "";
  background: var(--metric-accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--metric-accent) 10%, transparent);
}

.finance-hub-page .finance-hub-overview strong {
  color: var(--metric-ink);
  font-size: 26px;
  font-weight: 760;
  letter-spacing: -0.025em;
}

.finance-hub-page .finance-hub-overview small {
  color: var(--finance-muted);
  font-size: 10px;
}

.finance-hub-page .finance-hub-tabs {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.finance-hub-page .finance-hub-tabs button {
  position: relative;
  overflow: hidden;
  min-height: 82px;
  gap: 5px;
  padding: 12px 11px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #e3e7f6;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(54, 64, 126, 0.045);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.finance-hub-page .finance-hub-tabs button::before {
  position: absolute;
  top: 0;
  right: 12px;
  left: 12px;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(89, 100, 238, 0.32), transparent);
  opacity: 0;
  transition: opacity 150ms ease;
}

.finance-hub-page .finance-hub-tabs button:hover {
  border-color: #cfd5f3;
  box-shadow: 0 10px 24px rgba(67, 76, 154, 0.09);
  transform: translateY(-2px);
}

.finance-hub-page .finance-hub-tabs button:hover::before {
  opacity: 1;
}

.finance-hub-page .finance-hub-tabs button strong {
  color: #29335f;
  font-size: 12px;
  font-weight: 720;
}

.finance-hub-page .finance-hub-tabs button span {
  color: #7d86a3;
  font-size: 8.5px;
  line-height: 1.5;
}

.finance-hub-page .finance-hub-tabs button.active {
  color: #fff;
  background:
    radial-gradient(circle at 100% 0%, rgba(79, 229, 230, 0.34), transparent 44%),
    linear-gradient(145deg, #4f5be8 0%, #6c5ce9 58%, #8258ea 100%);
  border-color: transparent;
  box-shadow: 0 12px 25px rgba(83, 82, 213, 0.28), inset 0 -3px 0 rgba(99, 227, 231, 0.85);
  transform: translateY(-2px);
}

.finance-hub-page .finance-hub-tabs button.active::before {
  right: -22px;
  bottom: -48px;
  left: auto;
  top: auto;
  width: 108px;
  height: 108px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 36px;
  opacity: 1;
  transform: rotate(24deg);
}

.finance-hub-page .finance-hub-tabs button.active strong,
.finance-hub-page .finance-hub-tabs button.active span {
  position: relative;
  z-index: 1;
  color: #fff;
}

.finance-hub-page .finance-hub-tabs button.active span {
  color: rgba(255, 255, 255, 0.8);
}

.finance-hub-page .panel {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--finance-line);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(56, 66, 134, 0.06);
}

.finance-hub-page .panel .toolbar {
  background: linear-gradient(90deg, rgba(245, 246, 255, 0.94), rgba(255, 255, 255, 0.82));
}

.finance-hub-page .data-table th {
  color: #7c85a1;
  background: #f7f8ff;
  border-color: #e8eaf7;
}

.finance-hub-page .data-table td {
  border-bottom-color: #edf0f8;
}

.finance-hub-page .data-table tbody tr:hover {
  background: #f8f9ff;
}

.finance-hub-page .finance-channel-summary,
.finance-hub-page .finance-reconcile-strip,
.finance-hub-page .finance-loan-summary,
.finance-hub-page .finance-invoice-summary,
.finance-hub-page .finance-payable-summary,
.finance-hub-page .finance-transfer-payment-summary,
.finance-hub-page .invoice-transfer-summary-grid {
  gap: 10px;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.finance-hub-page .finance-channel-summary > div,
.finance-hub-page .finance-reconcile-strip > div,
.finance-hub-page .finance-loan-summary > div,
.finance-hub-page .finance-invoice-summary > div,
.finance-hub-page .finance-payable-summary > div,
.finance-hub-page .finance-transfer-payment-summary > div,
.finance-hub-page .invoice-transfer-summary-grid > div {
  background:
    radial-gradient(circle at 100% 0%, rgba(89, 100, 238, 0.08), transparent 48%),
    #fff;
  border: 1px solid #e5e8f6;
  border-radius: 13px;
  box-shadow: 0 7px 20px rgba(57, 67, 134, 0.045);
}

.finance-hub-page .finance-channel-summary span,
.finance-hub-page .finance-reconcile-strip span,
.finance-hub-page .finance-loan-summary span,
.finance-hub-page .finance-invoice-summary span,
.finance-hub-page .finance-payable-summary span,
.finance-hub-page .finance-transfer-payment-summary span,
.finance-hub-page .finance-transfer-payment-summary small,
.finance-hub-page .invoice-transfer-summary-grid span,
.finance-hub-page .invoice-transfer-summary-grid small {
  color: #7b849f;
}

.finance-hub-page .finance-channel-summary strong,
.finance-hub-page .finance-reconcile-strip strong,
.finance-hub-page .finance-loan-summary strong,
.finance-hub-page .finance-invoice-summary strong,
.finance-hub-page .finance-payable-summary strong,
.finance-hub-page .finance-transfer-payment-summary strong,
.finance-hub-page .invoice-transfer-summary-grid strong {
  color: #3540a1;
}

.finance-hub-page .external-finance-summary > div {
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 107, 135, 0.14), transparent 52%),
    linear-gradient(145deg, #fff7fa, #fff 72%);
  border-color: #f5dce4;
}

.finance-hub-page .external-finance-summary span,
.finance-hub-page .external-finance-summary small {
  color: #8c6171;
}

.finance-hub-page .external-finance-summary strong {
  color: #b52e55;
}

.finance-hub-page .invoice-transfer-summary-grid > div {
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 183, 77, 0.15), transparent 52%),
    linear-gradient(145deg, #fffaf2, #fff 70%);
  border-color: #f3e3c9;
}

.finance-hub-page .invoice-transfer-summary-grid span,
.finance-hub-page .invoice-transfer-summary-grid small {
  color: #88745c;
}

.finance-hub-page .invoice-transfer-summary-grid strong {
  color: #98601e;
}

.finance-hub-page .invoice-transfer-view-switch {
  background: #f5f6ff;
  border-color: #e1e5f7;
}

.finance-hub-page .invoice-transfer-view-switch button {
  color: #7e87a1;
  background: #fff;
}

.finance-hub-page .invoice-transfer-view-switch button.active {
  background: linear-gradient(135deg, #eef0ff, #f1fbff);
  border-color: #cfd5f3;
  box-shadow: 0 8px 20px rgba(74, 84, 165, 0.08);
}

.finance-hub-page .invoice-transfer-view-switch button.active span {
  color: var(--finance-primary-deep);
}

.finance-hub-page .finance-form-intro {
  gap: 8px;
  overflow: visible;
  background: transparent;
  border: 0;
}

.finance-hub-page .finance-form-intro > div {
  background: linear-gradient(145deg, #f8f9ff, #fff);
  border: 1px solid #e5e8f6;
  border-radius: 11px;
}

.finance-hub-page .finance-live-difference {
  color: #067c70;
  background: #eefcf8;
  border-color: #ccefe4;
}

.finance-hub-page .finance-budget-total {
  color: #5f3cc7;
  background: #f5f0ff;
  border-color: #e2d8fb;
}

@media (hover: hover) {
  .finance-hub-page .finance-hub-overview > div:hover {
    border-color: color-mix(in srgb, var(--metric-accent) 35%, #e5e8f8);
    box-shadow: 0 14px 30px rgba(65, 76, 158, 0.11);
    transform: translateY(-2px);
  }
}

.global-todo-reminder.finance-context {
  background:
    radial-gradient(circle at 93% 0%, rgba(19, 185, 208, 0.11), transparent 27%),
    linear-gradient(100deg, #fff7fa 0%, #f7f7ff 52%, #effcff 100%);
  border-color: #e5e3f6;
  border-left-color: var(--finance-coral, #ff6b87);
  box-shadow: 0 10px 26px rgba(79, 73, 151, 0.08);
}

.global-todo-reminder.finance-context.has-urgent {
  background:
    radial-gradient(circle at 93% 0%, rgba(19, 185, 208, 0.1), transparent 27%),
    linear-gradient(100deg, #fff2f6 0%, #f8f6ff 52%, #effcff 100%);
  border-color: #f0d5df;
  border-left-color: #ff607f;
}

.global-todo-reminder.finance-context .global-todo-marker {
  color: #5964ee;
  background: rgba(255, 255, 255, 0.92);
  border-color: #dadff7;
  box-shadow: 0 6px 16px rgba(67, 77, 159, 0.08);
}

.global-todo-reminder.finance-context .global-todo-marker b {
  background: linear-gradient(135deg, #ff6684, #ff8867);
  box-shadow: 0 4px 10px rgba(238, 91, 121, 0.2);
}

.global-todo-reminder.finance-context .global-todo-copy > span {
  color: #e35574;
}

.global-todo-reminder.finance-context .global-todo-copy > strong {
  color: #29335f;
}

.global-todo-reminder.finance-context .global-todo-copy > small {
  color: #7b849f;
}

.global-todo-reminder.finance-context .global-todo-quick-actions button {
  color: #596988;
  border-color: #e0e4f4;
}

.global-todo-reminder.finance-context .global-todo-quick-actions button.urgent {
  color: #c44562;
  background: #fff6f8;
  border-color: #f2cfd9;
}

.global-todo-reminder.finance-context .global-todo-quick-actions button b {
  color: #e35472;
}

.global-todo-reminder.finance-context .global-todo-all {
  background: linear-gradient(135deg, #29335f, #414b8e);
  box-shadow: 0 6px 15px rgba(41, 51, 95, 0.18);
}

@media (max-width: 1180px) {
  .finance-hub-page .finance-hub-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .finance-hub-page .finance-hub-overview,
  .finance-hub-page .finance-channel-summary,
  .finance-hub-page .finance-reconcile-strip,
  .finance-hub-page .finance-loan-summary,
  .finance-hub-page .finance-invoice-summary,
  .finance-hub-page .finance-payable-summary,
  .finance-hub-page .finance-transfer-payment-summary,
  .finance-hub-page .invoice-transfer-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finance-hub-page .finance-hub-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .finance-hub-page .finance-hub-head {
    min-height: 0;
    padding: 18px;
  }

  .finance-hub-page .finance-hub-head h2 {
    font-size: 22px;
  }

  .finance-hub-page .finance-hub-head p,
  .finance-hub-page .finance-hub-head .page-head-actions {
    padding-left: 16px;
  }

  .finance-hub-page .finance-hub-overview,
  .finance-hub-page .finance-channel-summary,
  .finance-hub-page .finance-reconcile-strip,
  .finance-hub-page .finance-loan-summary,
  .finance-hub-page .finance-invoice-summary,
  .finance-hub-page .finance-payable-summary,
  .finance-hub-page .finance-transfer-payment-summary,
  .finance-hub-page .invoice-transfer-summary-grid,
  .finance-hub-page .finance-hub-tabs,
  .finance-hub-page .finance-form-intro {
    grid-template-columns: 1fr;
  }
}

/* High-clarity VIN inventory rows */
.inventory-vehicle-table {
  min-width: 1440px;
  font-size: 13px;
}

.inventory-vehicle-table th {
  font-size: 13px;
  font-weight: 600;
}

.inventory-vehicle-table td {
  padding: 14px 12px;
}

.inventory-vehicle-table td:first-child > strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.inventory-vehicle-table td:first-child > .muted {
  margin-top: 5px;
  color: #50636d;
  font-size: 12px;
  line-height: 1.5;
}

/* Coordinated readability for the customer journey form */
.modal.customer-journey-modal .ledger-build-intro {
  gap: 15px;
  padding: 16px 18px;
  border-radius: 13px;
}

.modal.customer-journey-modal .ledger-build-intro > span {
  width: 42px;
  height: 42px;
  border-radius: 11px;
}

.modal.customer-journey-modal .ledger-build-intro > span svg {
  width: 21px;
  height: 21px;
}

.modal.customer-journey-modal .ledger-build-intro strong {
  font-size: 16px;
  line-height: 1.45;
}

.modal.customer-journey-modal .ledger-build-intro p {
  margin-top: 5px;
  font-size: 13px;
  line-height: 1.65;
}

.modal.customer-journey-modal .ledger-build-intro em {
  padding: 7px 11px;
  font-size: 12px;
}

.modal.customer-journey-modal .journey-profile-form {
  gap: 18px;
}

.modal.customer-journey-modal .journey-form-section {
  padding: 22px;
  border-radius: 15px;
}

.modal.customer-journey-modal .journey-section-head {
  gap: 14px;
  margin-bottom: 20px;
}

.modal.customer-journey-modal .journey-section-head > span:first-child {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  font-size: 12px;
}

.modal.customer-journey-modal .journey-section-head h3 {
  margin-bottom: 5px;
  font-size: 20px;
  line-height: 1.35;
}

.modal.customer-journey-modal .journey-section-head p {
  font-size: 14px;
  line-height: 1.65;
}

.modal.customer-journey-modal .journey-section-head > .status {
  min-height: 30px;
  padding-inline: 11px;
  font-size: 12px;
}

.modal.customer-journey-modal .form-grid {
  gap: 18px 20px;
}

.modal.customer-journey-modal .form-field {
  gap: 9px;
}

.modal.customer-journey-modal .form-field > label {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

.modal.customer-journey-modal .required {
  font-size: 15px;
}

.modal.customer-journey-modal .form-field input,
.modal.customer-journey-modal .form-field select,
.modal.customer-journey-modal .form-field textarea {
  min-height: 50px;
  padding: 11px 13px;
  font-size: 16px;
  line-height: 1.45;
}

.modal.customer-journey-modal .form-field input::placeholder,
.modal.customer-journey-modal .form-field textarea::placeholder {
  color: #7a8993;
  opacity: 1;
}

.modal.customer-journey-modal .form-field textarea,
.modal.customer-journey-modal .journey-description-grid textarea {
  min-height: 120px;
  line-height: 1.65;
}

.modal.customer-journey-modal .form-help {
  font-size: 12px;
  line-height: 1.6;
}

.modal.customer-journey-modal .journey-duration-field {
  min-height: 92px;
  padding: 13px 15px;
}

.modal.customer-journey-modal .journey-duration-field > span {
  margin-bottom: 5px;
  font-size: 13px;
}

.modal.customer-journey-modal .journey-duration-field > strong {
  font-size: 20px;
  line-height: 1.35;
}

.modal.customer-journey-modal .journey-duration-field > small {
  margin-top: 5px;
  font-size: 11px;
  line-height: 1.5;
}

.modal.customer-journey-modal .journey-focus-grid {
  gap: 10px;
  margin-bottom: 18px;
}

.modal.customer-journey-modal .journey-focus-grid .form-check {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
}

.modal.customer-journey-modal .journey-focus-grid .form-check-input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.modal.customer-journey-modal .journey-focus-grid .form-check-label {
  font-size: 14px;
  line-height: 1.4;
}

.modal.customer-journey-modal .modal-action-note {
  font-size: 13px;
  line-height: 1.55;
}

.modal.customer-journey-modal .modal-footer .button {
  font-size: 16px;
}

/* Youthful, high-contrast inventory presentation */
.inventory-hub-head {
  overflow: hidden;
  padding: 22px 24px;
  color: #fff;
  background:
    radial-gradient(circle at 90% 15%, rgba(255, 151, 94, 0.28), transparent 28%),
    linear-gradient(115deg, #102d38 0%, #144e55 52%, #167b73 100%);
  border: 1px solid rgba(90, 210, 191, 0.35);
  border-radius: 18px;
  box-shadow: 0 16px 36px rgba(15, 61, 69, 0.2);
}

.inventory-hub-head h2,
.inventory-hub-head p,
.inventory-hub-head .eyebrow {
  color: #fff;
}

.inventory-hub-head p {
  color: #d3ebe8;
}

.inventory-hub-tabs {
  background: #cde3de;
  border-color: #cde3de;
  border-radius: 15px;
}

.inventory-hub-tabs button {
  background: linear-gradient(145deg, #fff, #f4faf8);
}

.inventory-hub-tabs button.active {
  background: linear-gradient(135deg, #103f4a, #0c8c7a 70%, #ef945b 155%);
  box-shadow: inset 0 -4px 0 #ffb27b, 0 8px 18px rgba(12, 140, 122, 0.18);
}

.inventory-vehicle-panel {
  overflow: hidden;
  background: #fff;
  border: 1px solid #b9ddd6;
  border-radius: 18px;
  box-shadow: 0 18px 42px rgba(22, 88, 83, 0.13);
}

.inventory-vehicle-toolbar {
  padding: 17px 19px;
  background:
    radial-gradient(circle at 92% 0%, rgba(255, 156, 100, 0.2), transparent 30%),
    linear-gradient(115deg, #eefaf7, #fff8f1);
  border-bottom: 1px solid #d3e9e4;
}

.inventory-vehicle-toolbar .toolbar-title {
  color: #123e49;
  font-size: 17px;
  font-weight: 700;
}

.inventory-vehicle-toolbar .toolbar-subtitle {
  color: #4e6d74;
  font-size: 12px;
}

.inventory-vehicle-table {
  border-collapse: separate;
  border-spacing: 0;
}

.inventory-vehicle-table th {
  color: #fff;
  background: linear-gradient(135deg, #173f4a, #226a69);
  border-color: rgba(255, 255, 255, 0.13);
  font-size: 13px;
  font-weight: 700;
}

.inventory-vehicle-table thead th:first-child,
.inventory-vehicle-table thead th.inventory-actions-column {
  color: #fff;
  background: linear-gradient(135deg, #173f4a, #226a69);
}

.inventory-vehicle-table tbody tr:nth-child(even) td {
  background-color: #f7fcfa;
}

.inventory-vehicle-table tbody tr:hover td {
  background-color: #edf9f6;
}

.inventory-vehicle-table td.inventory-vehicle-model-cell {
  background:
    linear-gradient(135deg, rgba(224, 250, 244, 0.92), rgba(255, 246, 235, 0.72));
  box-shadow: inset 4px 0 0 #0b8b7b;
}

.inventory-vehicle-table tbody tr:hover td.inventory-vehicle-model-cell {
  background:
    linear-gradient(135deg, rgba(212, 247, 240, 0.98), rgba(255, 238, 220, 0.82));
}

.inventory-table-scroll-note {
  color: #315d65;
  background: linear-gradient(90deg, #ecf9f6, #fff8f0);
}

@media (max-width: 620px) {
  .inventory-vehicle-model-cell strong,
  .inventory-transfer-model-cell strong {
    font-size: 14px;
    line-height: 1.38;
  }

  .inventory-vehicle-table .inventory-vehicle-model-cell .muted,
  .inventory-transfer-model-cell .muted {
    margin-top: 5px;
    padding: 6px 8px;
    border-radius: 9px;
    font-size: 12px;
    line-height: 1.42;
  }
}

/* Renewal command dashboard visual refresh */
body.command-dashboard-mode {
  --command-ink: #20213e;
  --command-muted: #777b9b;
  --command-line: rgba(113, 106, 176, 0.17);
  --command-paper: #f4f5fc;
  --command-sidebar: #18172f;
  --command-sidebar-deep: #111124;
  --command-coral: #ff6f79;
  --command-gold: #ffb15c;
  --command-mint: #20c8b5;
  --command-violet: #765ff0;
  --command-blue: #4c82f7;
  --command-cyan: #25c8c4;
  background:
    radial-gradient(circle at 8% -4%, rgba(120, 94, 240, 0.13), transparent 30%),
    radial-gradient(circle at 96% 8%, rgba(39, 201, 190, 0.1), transparent 29%),
    linear-gradient(180deg, #f8f8ff 0%, #f4f5fc 48%, #f5f8fd 100%);
  color: var(--command-ink);
}

body.command-dashboard-mode .sidebar {
  color: #f5f3ff;
  background:
    radial-gradient(circle at 4% 10%, rgba(126, 99, 242, 0.34), transparent 30%),
    radial-gradient(circle at 95% 72%, rgba(31, 193, 182, 0.16), transparent 36%),
    linear-gradient(168deg, var(--command-sidebar), var(--command-sidebar-deep));
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 14px 0 40px rgba(31, 29, 78, 0.08);
}

body.command-dashboard-mode .brand-mark {
  border-color: rgba(255, 255, 255, 0.84);
  box-shadow: 0 10px 24px rgba(4, 2, 30, 0.28), 0 0 0 5px rgba(120, 96, 240, 0.13);
}

body.command-dashboard-mode .brand-subtitle {
  color: #a7a2c9;
}

body.command-dashboard-mode .command-nav-group-label {
  color: #77749e;
}

body.command-dashboard-mode .command-nav-item {
  color: #c9c6de;
  border-radius: 12px;
}

body.command-dashboard-mode .command-nav-item .nav-icon {
  color: #9995bd;
}

body.command-dashboard-mode .command-nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

body.command-dashboard-mode .command-nav-item.active {
  color: #fff;
  background: linear-gradient(100deg, rgba(119, 94, 238, 0.46), rgba(111, 86, 220, 0.13));
  box-shadow: inset 0 0 0 1px rgba(178, 164, 255, 0.12), 0 7px 18px rgba(7, 5, 36, 0.16);
}

body.command-dashboard-mode .command-nav-item.active::before {
  width: 3px;
  background: linear-gradient(180deg, #9f8dff, #28d2c2);
  border-radius: 99px;
}

body.command-dashboard-mode .command-nav-item.active .nav-icon {
  color: #bdb2ff;
}

body.command-dashboard-mode .renewal-nav-parent[aria-expanded="true"] .nav-caret {
  color: #9edbd5;
}

body.command-dashboard-mode .renewal-subnav-item.active::before {
  background: #39d1c1;
}

body.command-dashboard-mode .topbar {
  background: rgba(255, 255, 255, 0.82);
  border-bottom-color: rgba(119, 112, 177, 0.13);
  box-shadow: 0 10px 30px rgba(49, 45, 105, 0.04);
  backdrop-filter: blur(20px) saturate(1.3);
}

body.command-dashboard-mode .page-title-wrap h1 {
  color: #242443;
}

body.command-dashboard-mode .page-title-wrap .eyebrow {
  color: #9193ad;
}

body.command-dashboard-mode .topbar-actions > .icon-btn {
  color: #6f6f91;
  background: rgba(246, 246, 253, 0.9);
  border-color: rgba(118, 111, 170, 0.13);
  border-radius: 11px;
}

body.command-dashboard-mode .profile-button {
  border-left-color: rgba(118, 111, 170, 0.14);
}

body.command-dashboard-mode .profile-button::before {
  color: #fff;
  background:
    radial-gradient(circle at 30% 23%, rgba(255, 255, 255, 0.38), transparent 28%),
    linear-gradient(145deg, #8a70ff, #f06fa7);
  box-shadow: 0 7px 18px rgba(109, 78, 218, 0.25);
}

body.command-dashboard-mode .workspace {
  padding-top: 24px;
}

body.command-dashboard-mode .global-todo-reminder {
  position: relative;
  overflow: hidden;
  padding: 13px 15px;
  background:
    radial-gradient(circle at 94% 8%, rgba(255, 144, 137, 0.14), transparent 23%),
    linear-gradient(110deg, #fff8f7 0%, #fbf9ff 48%, #f4fcfb 100%);
  border: 1px solid rgba(232, 194, 188, 0.58);
  border-left: 1px solid rgba(232, 194, 188, 0.58);
  border-radius: 17px;
  box-shadow: 0 12px 30px rgba(77, 62, 122, 0.07);
}

body.command-dashboard-mode .global-todo-reminder::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  content: "";
  background: linear-gradient(90deg, #ff877c, #ffc06a 34%, #7c67ef 68%, #2bcbbb);
}

body.command-dashboard-mode .global-todo-reminder.has-urgent {
  background:
    radial-gradient(circle at 94% 8%, rgba(255, 130, 118, 0.18), transparent 24%),
    linear-gradient(110deg, #fff5f3 0%, #fbf8ff 50%, #f3fcfa 100%);
  border-color: rgba(239, 184, 174, 0.7);
}

body.command-dashboard-mode .global-todo-marker {
  color: #fff;
  background: linear-gradient(145deg, #ff8a70, #f56491);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 13px;
  box-shadow: 0 7px 18px rgba(233, 100, 124, 0.22);
}

body.command-dashboard-mode .global-todo-marker b {
  border-color: #fff9f7;
  background: #775ee8;
}

body.command-dashboard-mode .global-todo-copy > span {
  color: #b16a79;
}

body.command-dashboard-mode .global-todo-copy > strong {
  color: #292943;
}

body.command-dashboard-mode .global-todo-copy p em {
  color: #d24e6e;
}

body.command-dashboard-mode .global-todo-copy > small {
  color: #7e7e95;
}

body.command-dashboard-mode .global-todo-quick-actions button {
  color: #5d5d7c;
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(130, 119, 168, 0.16);
  border-radius: 10px;
  box-shadow: 0 3px 9px rgba(64, 57, 107, 0.035);
}

body.command-dashboard-mode .global-todo-quick-actions button.urgent {
  color: #ac5265;
  background: rgba(255, 245, 245, 0.92);
  border-color: rgba(235, 161, 171, 0.5);
}

body.command-dashboard-mode .global-todo-quick-actions button b {
  color: #765ee5;
}

body.command-dashboard-mode .global-todo-all {
  color: #fff;
  background: linear-gradient(135deg, #7963ed, #4e72db);
  border-radius: 10px;
  box-shadow: 0 6px 14px rgba(100, 81, 205, 0.2);
}

.command-breadcrumb {
  color: #999ab1;
}

.command-breadcrumb strong {
  color: #656682;
}

.command-title-line h2 {
  color: #20213e;
  font-weight: 800;
}

.command-health {
  color: #276e68;
  background: linear-gradient(135deg, #e8faf6, #f5fffb);
  border-color: #ccefe9;
  box-shadow: 0 4px 10px rgba(35, 177, 163, 0.08);
}

.command-health i {
  background: linear-gradient(135deg, #21c9b3, #5bdf98);
  box-shadow: 0 0 0 3px rgba(34, 198, 180, 0.14);
}

.command-page-heading p {
  color: #73768f;
}

.command-store-filter,
.command-date-button {
  color: #555773;
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(112, 105, 163, 0.17);
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(46, 42, 92, 0.035);
}

.command-store-filter:hover,
.command-store-filter:focus-within,
.command-date-button:hover {
  border-color: rgba(118, 95, 237, 0.38);
  box-shadow: 0 7px 18px rgba(74, 61, 147, 0.09);
}

.command-store-filter-copy small {
  color: #9a9ab0;
}

.command-store-filter select {
  color: #353653;
}

.command-export-button {
  background: linear-gradient(120deg, #7c62ef 0%, #526ee5 62%, #22beb8 125%);
  border-color: transparent;
  border-radius: 12px;
  box-shadow: 0 9px 22px rgba(101, 82, 213, 0.24);
}

.command-export-button:hover {
  background: linear-gradient(120deg, #846bf4 0%, #5c78e9 60%, #2ac9c0 122%);
  box-shadow: 0 12px 27px rgba(101, 82, 213, 0.3);
}

.command-metric-grid {
  gap: 16px;
}

.command-metric-card {
  isolation: isolate;
  min-height: 164px;
  padding: 19px 20px 17px;
  border-color: rgba(122, 113, 177, 0.15);
  border-radius: 19px;
  box-shadow: 0 12px 32px rgba(57, 49, 113, 0.07);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.command-metric-card:hover {
  border-color: rgba(117, 94, 230, 0.28);
  box-shadow: 0 17px 38px rgba(57, 49, 113, 0.11);
  transform: translateY(-2px);
}

.command-metric-card::before {
  top: -62px;
  right: -35px;
  bottom: auto;
  left: auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  opacity: 0.82;
  z-index: -1;
}

.command-metric-sand {
  background:
    radial-gradient(circle at 6% 104%, rgba(255, 193, 109, 0.16), transparent 35%),
    linear-gradient(135deg, #fff9f0 0%, #fff 52%, #fff4f3 100%);
}

.command-metric-sand::before {
  background: radial-gradient(circle, rgba(255, 170, 89, 0.2), rgba(255, 220, 176, 0.09) 48%, transparent 72%);
}

.command-metric-mint {
  background:
    radial-gradient(circle at 3% 104%, rgba(37, 200, 180, 0.13), transparent 34%),
    linear-gradient(135deg, #f0fffb 0%, #fff 52%, #f2f9ff 100%);
}

.command-metric-mint::before {
  background: radial-gradient(circle, rgba(35, 202, 183, 0.2), rgba(134, 236, 225, 0.09) 48%, transparent 72%);
}

.command-metric-coral {
  background:
    radial-gradient(circle at 4% 104%, rgba(120, 94, 238, 0.13), transparent 36%),
    linear-gradient(135deg, #f8f4ff 0%, #fff 50%, #f2f6ff 100%);
}

.command-metric-coral::before {
  background: radial-gradient(circle, rgba(124, 96, 240, 0.2), rgba(176, 157, 255, 0.08) 48%, transparent 72%);
}

.command-metric-label {
  color: #555775;
  font-weight: 650;
}

.command-metric-icon {
  width: 35px;
  height: 35px;
  color: #fff;
  border: 0;
  border-radius: 12px;
}

.command-metric-sand .command-metric-icon {
  background: linear-gradient(145deg, #ffb15c, #ff7f72);
  box-shadow: 0 7px 16px rgba(255, 136, 91, 0.22);
}

.command-metric-mint .command-metric-icon {
  background: linear-gradient(145deg, #29cdb7, #49a8f4);
  box-shadow: 0 7px 16px rgba(41, 190, 191, 0.2);
}

.command-metric-coral .command-metric-icon {
  background: linear-gradient(145deg, #8a70f4, #637bec);
  box-shadow: 0 7px 16px rgba(116, 95, 229, 0.21);
}

.command-metric-value {
  margin-top: 17px;
  color: #20213e;
  font-weight: 760;
}

.command-metric-value > span,
.command-metric-value > small {
  color: #74758f;
}

.command-metric-footer {
  color: #8a8ba1;
}

.command-delta.negative {
  color: #e35469;
}

.command-delta.positive {
  color: #138d7d;
}

.command-sparkline {
  height: 58px;
  opacity: 0.82;
}

.command-analysis-panel,
.command-panel {
  background: rgba(255, 255, 255, 0.91);
  border-color: rgba(113, 105, 169, 0.16);
  border-radius: 20px;
  box-shadow: 0 13px 36px rgba(51, 44, 105, 0.065);
  backdrop-filter: blur(12px);
}

.command-analysis-head {
  min-height: 94px;
  padding: 18px 20px 16px;
  border-bottom-color: rgba(115, 107, 168, 0.11);
}

.command-panel-kicker {
  color: #8878ce;
  letter-spacing: 0.16em;
}

.command-analysis-head h3,
.command-panel-head h3 {
  color: #242440;
  font-weight: 800;
}

.command-analysis-head p,
.command-panel-head p {
  color: #8b8ca2;
}

.command-dimension-tabs {
  padding: 5px;
  background: #f4f3fb;
  border-color: rgba(117, 107, 174, 0.13);
  border-radius: 14px;
}

.command-dimension-tabs button {
  min-width: 91px;
  padding: 8px 12px;
  border-radius: 10px;
}

.command-dimension-tabs button small {
  color: #9a96b0;
}

.command-dimension-tabs button strong {
  color: #66687f;
}

.command-dimension-tabs button:hover {
  color: #3f3e5e;
  background: rgba(255, 255, 255, 0.76);
}

.command-dimension-tabs button.active {
  color: #fff;
  background: linear-gradient(135deg, #7c64ef, #5d74e7 68%, #4a92e6 125%);
  border-color: transparent;
  box-shadow: 0 7px 16px rgba(102, 83, 213, 0.2);
}

.command-dimension-tabs button.active small,
.command-dimension-tabs button.active strong {
  color: #fff;
}

.command-analysis-summary {
  gap: 7px;
  margin: 14px 18px;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.command-analysis-summary > div {
  padding: 11px 13px;
  background: linear-gradient(135deg, #f7f3ff, #fbfaff);
  border: 1px solid rgba(120, 107, 175, 0.1);
  border-radius: 12px;
}

.command-analysis-summary > div:nth-child(2) {
  background: linear-gradient(135deg, #effcfa, #f8fffe);
}

.command-analysis-summary > div:nth-child(3) {
  background: linear-gradient(135deg, #f4f6ff, #fbfcff);
}

.command-analysis-summary > div:nth-child(4) {
  background: linear-gradient(135deg, #fff7f2, #fffafc);
}

.command-analysis-summary > div + div,
.command-analysis-summary > div:nth-child(3),
.command-analysis-summary > div:nth-child(4) {
  border-top: 1px solid rgba(120, 107, 175, 0.1);
  border-left: 1px solid rgba(120, 107, 175, 0.1);
}

.command-analysis-summary span {
  color: #9393aa;
}

.command-analysis-summary strong {
  color: #292a49;
  font-weight: 730;
}

.command-analysis-summary > div > small {
  color: #8e8fa5;
}

.command-analysis-table {
  border-collapse: separate;
  border-spacing: 0;
}

.command-analysis-table th {
  height: 39px;
  color: #777a94;
  background: linear-gradient(90deg, #f5f3fc, #f8f8fe);
  border-top-color: rgba(119, 109, 172, 0.1);
  border-bottom-color: rgba(119, 109, 172, 0.11);
  font-weight: 650;
}

.command-analysis-table td {
  height: 64px;
  color: #5e6079;
  border-bottom-color: rgba(116, 108, 161, 0.09);
}

.command-analysis-table tbody tr:hover {
  background: linear-gradient(90deg, rgba(247, 244, 255, 0.74), rgba(248, 253, 252, 0.72));
}

.command-analysis-table td > strong,
.command-analysis-entity strong {
  color: #2c2d4b;
}

.command-analysis-table td > small,
.command-analysis-entity small {
  color: #9495aa;
}

.command-analysis-table .positive {
  color: #158d7c;
}

.command-analysis-table .negative {
  color: #d64f69;
}

.command-entity-mark {
  width: 32px;
  height: 32px;
  background: linear-gradient(145deg, #35cbbb, #4c8dec);
  border-radius: 11px;
  box-shadow: 0 5px 13px rgba(63, 163, 195, 0.16);
}

.command-entity-mark.insurer {
  background: linear-gradient(145deg, #ffb35f, #ee7886);
  box-shadow: 0 5px 13px rgba(230, 123, 104, 0.16);
}

.command-entity-mark.customer {
  background: linear-gradient(145deg, #8b70f2, #6279e8);
  box-shadow: 0 5px 13px rgba(115, 94, 220, 0.16);
}

.command-analysis-money,
.command-premium {
  color: #242541 !important;
}

.command-change {
  padding: 5px 8px;
  color: #70728d;
  background: #f4f3fa;
  border-radius: 999px;
}

.command-change.positive {
  color: #168a7b;
  background: #eafaf6;
}

.command-change.negative {
  color: #c84964;
  background: #fff0f3;
}

.command-drill-button {
  padding: 6px 9px;
  color: #6555bd;
  background: #f8f6ff;
  border-color: rgba(120, 99, 218, 0.16);
  border-radius: 8px;
}

.command-drill-button:hover {
  color: #4e3ad3;
  background: #f0ebff;
  border-color: rgba(118, 94, 231, 0.3);
}

.command-analysis-foot {
  color: #9697aa;
  border-top-color: rgba(118, 109, 171, 0.12);
}

.command-analysis-foot button,
.command-funnel-foot button,
.command-link-button {
  color: #6653c9;
}

.command-panel-head {
  border-bottom-color: rgba(116, 107, 165, 0.1);
}

.command-period-label,
.command-current-tab {
  color: #6d6e87;
  background: #f5f4fb;
  border-color: rgba(117, 108, 167, 0.12);
  border-radius: 8px;
}

.command-more-button {
  color: #6e67a1;
  background: #f9f8ff;
  border-color: rgba(115, 101, 181, 0.14);
  border-radius: 9px;
}

.command-funnel {
  gap: 6px;
}

.command-funnel-index {
  color: #a29eb6;
}

.command-funnel-shape {
  border-radius: 3px;
}

.command-funnel-row.sand .command-funnel-shape {
  background: linear-gradient(90deg, #dffbf4, #dff4ff);
}

.command-funnel-row.peach .command-funnel-shape {
  background: linear-gradient(90deg, #dbefff, #dce8ff);
}

.command-funnel-row.orange .command-funnel-shape {
  background: linear-gradient(90deg, #e8e1ff, #dedcff);
}

.command-funnel-row.red .command-funnel-shape {
  background: linear-gradient(90deg, #fde1ed, #ffddd9);
}

.command-funnel-shape b {
  color: #4e5070;
}

.command-funnel-shape strong {
  color: #292a47;
}

.command-funnel-shape small,
.command-funnel-rate,
.command-funnel-foot {
  color: #85869d;
}

.command-funnel-foot {
  border-top-color: rgba(116, 107, 165, 0.12);
}

.command-funnel-foot i {
  background: linear-gradient(135deg, #26c8b5, #6bdd9a);
  box-shadow: 0 0 0 3px rgba(38, 200, 181, 0.11);
}

.command-donut::before {
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(117, 106, 170, 0.1), 0 8px 22px rgba(78, 67, 146, 0.07);
}

.command-donut strong {
  color: #262743;
}

.command-profile-legend > div {
  color: #6e7089;
}

.command-profile-legend i {
  border-radius: 50%;
}

.command-profile-legend strong {
  color: #373854;
}

.command-profile-note {
  margin-bottom: 16px;
  background: linear-gradient(120deg, #f5f2ff, #f0fbfa);
  border-color: rgba(114, 105, 173, 0.12);
  border-radius: 12px;
}

.command-profile-note-icon {
  color: #fff;
  background: linear-gradient(145deg, #8b70f3, #4f93e9);
  box-shadow: 0 5px 12px rgba(113, 91, 218, 0.18);
}

.command-profile-note strong {
  color: #444561;
}

.command-profile-note p {
  color: #85869d;
}

.command-profile-note b {
  color: #dc5e7b;
}

.command-team-table th {
  height: 39px;
  color: #777a94;
  background: linear-gradient(90deg, #f5f3fc, #f8f8fe);
  border-bottom-color: rgba(119, 109, 172, 0.11);
}

.command-team-table td {
  height: 60px;
  color: #5e6079;
  border-bottom-color: rgba(116, 108, 161, 0.09);
}

.command-team-table tbody tr:hover {
  background: linear-gradient(90deg, rgba(247, 244, 255, 0.72), rgba(248, 253, 252, 0.7));
}

.command-avatar.coral {
  background: linear-gradient(145deg, #ff9c7c, #f06f9c);
}

.command-avatar.mint {
  background: linear-gradient(145deg, #33d1b7, #3aa7e9);
}

.command-avatar.blue {
  background: linear-gradient(145deg, #7a68ed, #5c8ee8);
}

.command-avatar.gold {
  background: linear-gradient(145deg, #ffc666, #f59a68);
}

.command-member strong {
  color: #30314e;
}

.command-member small {
  color: #9697aa;
}

.command-member em {
  color: #b3b1c2;
}

.command-rate > div {
  background: #eeecf5;
}

.command-rate > div span {
  background: linear-gradient(90deg, #38cbb8, #7963ee);
}

.command-complete {
  color: #6448d3;
  background: #f0ecff;
  border-radius: 7px;
}

.command-trend-total {
  color: #6952d6;
}

.command-trend-chart {
  background: radial-gradient(circle at 86% 18%, rgba(119, 96, 238, 0.08), transparent 32%);
}

.command-chart-axis,
.command-chart-labels {
  color: #a3a2b3;
}

.command-trend-foot {
  background: linear-gradient(120deg, #f6f3ff, #f3fbf9);
  border-color: rgba(115, 106, 166, 0.11);
  border-radius: 11px;
}

.command-trend-foot > div + div {
  border-left-color: rgba(115, 106, 166, 0.11);
}

.command-trend-foot span {
  color: #9394a7;
}

.command-trend-foot strong {
  color: #33344f;
}

@media (max-width: 980px) {
  .command-analysis-summary > div + div,
  .command-analysis-summary > div:nth-child(3),
  .command-analysis-summary > div:nth-child(4) {
    border: 1px solid rgba(120, 107, 175, 0.1);
  }
}

@media (max-width: 760px) {
  body.command-dashboard-mode .workspace {
    padding-inline: 14px;
  }

  body.command-dashboard-mode .global-todo-reminder {
    padding: 12px;
    border-radius: 15px;
  }

  .command-analysis-panel,
  .command-panel {
    border-radius: 17px;
  }

  .command-metric-card {
    border-radius: 17px;
  }

  .command-analysis-summary {
    gap: 6px;
  }

  .command-dimension-tabs button {
    padding-inline: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .command-metric-card {
    transition: none;
  }
}

/* Youthful operating-system refresh */
:root {
  --ink: #20223e;
  --ink-soft: #5f6383;
  --ink-muted: #8d90aa;
  --paper: #f5f6fc;
  --surface: #ffffff;
  --surface-soft: #f8f8ff;
  --line: #e7e6f2;
  --line-strong: #d9d7e9;
  --navy: #1c1b39;
  --navy-soft: #27244c;
  --navy-lift: #332f61;
  --accent: #745cf0;
  --accent-soft: #f1edff;
  --teal: #18b8a6;
  --teal-soft: #e9fbf7;
  --blue: #4d79f6;
  --blue-soft: #edf2ff;
  --green: #159b7e;
  --green-soft: #e8faf4;
  --red: #e75d78;
  --red-soft: #fff0f3;
  --amber: #e79231;
  --amber-soft: #fff6e8;
  --purple: #745cf0;
  --purple-soft: #f1edff;
  --brand-dark: #292b50;
  --shadow-sm: 0 2px 5px rgba(44, 38, 94, 0.035), 0 10px 24px rgba(44, 38, 94, 0.045);
  --shadow-md: 0 20px 52px rgba(50, 42, 111, 0.13);
  --radius: 18px;
}

body:not(.command-dashboard-mode) {
  background:
    radial-gradient(circle at 3% 2%, rgba(139, 116, 245, 0.09), transparent 27%),
    radial-gradient(circle at 96% 8%, rgba(35, 199, 181, 0.075), transparent 25%),
    radial-gradient(circle at 78% 96%, rgba(255, 144, 158, 0.055), transparent 27%),
    linear-gradient(180deg, #fcfbff 0%, #f8f8fd 48%, #f7fbff 100%);
}

body:not(.command-dashboard-mode) button:focus-visible,
body:not(.command-dashboard-mode) input:focus-visible,
body:not(.command-dashboard-mode) select:focus-visible,
body:not(.command-dashboard-mode) textarea:focus-visible,
body:not(.command-dashboard-mode) a:focus-visible {
  outline-color: rgba(116, 92, 240, 0.28);
}

body .sidebar {
  color: #cdced7;
  background:
    radial-gradient(circle at 2% 0%, rgba(130, 119, 205, 0.15), transparent 28%),
    radial-gradient(circle at 100% 58%, rgba(75, 155, 158, 0.09), transparent 34%),
    linear-gradient(180deg, rgba(79, 79, 96, 0.98) 0%, rgba(67, 70, 86, 0.98) 55%, rgba(69, 84, 95, 0.98) 100%);
  border-right-color: rgba(255, 255, 255, 0.09);
  box-shadow:
    12px 0 34px rgba(35, 35, 48, 0.13),
    inset -1px 0 0 rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(24px) saturate(1.12);
}

body .brand-block {
  padding-top: 27px;
}

body .brand-mark {
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow:
    0 9px 22px rgba(21, 21, 31, 0.24),
    0 0 0 4px rgba(255, 255, 255, 0.08);
}

body .brand-name {
  color: #fff;
  letter-spacing: 0.13em;
}

body .brand-subtitle {
  color: #b5b6c1;
}

body .nav-group-label {
  color: #9294a3;
  letter-spacing: 0.16em;
}

body .nav-item {
  color: #c8c9d3;
  border-radius: 11px;
}

body .nav-item .nav-icon {
  color: #a9abb8;
  transition: color 160ms ease, transform 160ms ease;
}

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

body .nav-item:hover .nav-icon {
  color: #d9dcff;
  transform: translateX(1px);
}

body .nav-item.active {
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.075));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.105),
    0 7px 16px rgba(18, 18, 28, 0.12);
}

body .nav-item.active::before {
  top: 11px;
  bottom: 11px;
  width: 3px;
  background: linear-gradient(180deg, #a9b8ff, #7e8fff);
  border-radius: 99px;
}

body .nav-item.active .nav-icon {
  color: #c4cdff;
}

body .nav-badge {
  background: linear-gradient(135deg, #ff8a8f, #ed5d9a);
  box-shadow: 0 4px 12px rgba(228, 85, 135, 0.2);
}

body .system-health {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.07);
  border-radius: 12px;
}

body .system-health strong {
  color: #f1eff8;
}

body .system-health span {
  color: #a8a9b5;
}

body .health-dot {
  background: #45d8bd;
  box-shadow: 0 0 0 4px rgba(69, 216, 189, 0.12);
}

body .user-compact {
  border-top-color: rgba(255, 255, 255, 0.075);
}

body .user-compact strong {
  color: #f4f2fb;
}

body .user-compact span {
  color: #a9aab6;
}

body .sidebar-version {
  color: #9294a1;
  border-top-color: rgba(255, 255, 255, 0.065);
}

body .sidebar-version strong {
  color: #bfc0ca;
}

body .mobile-close {
  color: #fff;
}

body .sidebar .icon-btn.compact {
  color: #c7c3d8;
}

body .sidebar .icon-btn.compact:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

body:not(.command-dashboard-mode) .main-area {
  position: relative;
  background:
    radial-gradient(circle at 20% -8%, rgba(119, 94, 239, 0.075), transparent 27%),
    radial-gradient(circle at 100% 2%, rgba(37, 200, 185, 0.065), transparent 24%);
}

body:not(.command-dashboard-mode) .topbar {
  min-height: 80px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.9), rgba(252, 251, 255, 0.82), rgba(248, 254, 253, 0.84));
  border-bottom-color: rgba(116, 107, 171, 0.13);
  box-shadow: 0 10px 32px rgba(52, 45, 108, 0.04);
  backdrop-filter: blur(20px) saturate(1.25);
}

body:not(.command-dashboard-mode) .topbar::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, transparent 2%, rgba(132, 104, 246, 0.5) 22%, rgba(77, 145, 244, 0.3) 58%, rgba(44, 205, 188, 0.42) 82%, transparent 98%);
  pointer-events: none;
}

body:not(.command-dashboard-mode) .page-title-wrap .eyebrow {
  color: #9693b0;
}

body:not(.command-dashboard-mode) .page-title-wrap h1 {
  color: #242541;
}

body:not(.command-dashboard-mode) .filter-field {
  background: rgba(247, 246, 253, 0.88);
  border-color: rgba(119, 108, 171, 0.14);
  border-radius: 11px;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

body:not(.command-dashboard-mode) .filter-field:focus-within,
body:not(.command-dashboard-mode) .filter-field:hover {
  background: #fff;
  border-color: rgba(116, 92, 240, 0.31);
  box-shadow: 0 5px 15px rgba(90, 72, 174, 0.07);
}

body:not(.command-dashboard-mode) .topbar-actions > .icon-btn {
  color: #706f91;
  background: rgba(248, 247, 254, 0.92);
  border-color: rgba(119, 108, 171, 0.14);
  border-radius: 11px;
}

body:not(.command-dashboard-mode) .topbar-actions > .icon-btn:hover {
  color: #5e4bcb;
  background: #fff;
  border-color: rgba(116, 92, 240, 0.28);
}

body:not(.command-dashboard-mode) .notification-btn.has-todos {
  color: #d35b77;
  background: linear-gradient(145deg, #fff5f6, #fff9f3);
  border-color: rgba(237, 145, 162, 0.45);
}

body:not(.command-dashboard-mode) .notification-dot.has-count {
  background: linear-gradient(135deg, #ff7f88, #e95d99);
  border-color: #fffafb;
}

body:not(.command-dashboard-mode) .profile-button {
  gap: 9px;
  padding-left: 9px;
  border-left: 1px solid rgba(118, 109, 168, 0.14);
}

body:not(.command-dashboard-mode) .profile-button::before {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  content: "管";
  color: #fff;
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.36), transparent 30%),
    linear-gradient(145deg, #8b70f4, #4e83ef 64%, #2ec8b8);
  border-radius: 50%;
  box-shadow: 0 7px 18px rgba(106, 85, 218, 0.23);
  font-size: 13px;
  font-weight: 750;
  place-items: center;
}

body:not(.command-dashboard-mode) .profile-text {
  color: #313251;
}

body:not(.command-dashboard-mode) .profile-text small {
  color: #9291aa;
}

body:not(.command-dashboard-mode) .workspace {
  padding-top: 22px;
}

body:not(.command-dashboard-mode) .page-head {
  margin-bottom: 18px;
}

body:not(.command-dashboard-mode) .page-head h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #262643;
  font-weight: 760;
  letter-spacing: -0.025em;
}

body:not(.command-dashboard-mode) .page-head h2::before {
  width: 7px;
  height: 21px;
  flex: 0 0 auto;
  content: "";
  background: linear-gradient(180deg, #8468f3, #4d85f3 58%, #28cbb9);
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(103, 87, 218, 0.16);
}

body:not(.command-dashboard-mode) .page-head p {
  color: #686b87;
}

body:not(.command-dashboard-mode) .global-todo-reminder {
  position: relative;
  overflow: hidden;
  padding: 13px 15px;
  background:
    radial-gradient(circle at 91% 8%, rgba(255, 136, 127, 0.14), transparent 23%),
    radial-gradient(circle at 65% 100%, rgba(131, 101, 241, 0.1), transparent 28%),
    linear-gradient(110deg, #fff8f6 0%, #fbf9ff 48%, #f2fcf9 100%);
  border: 1px solid rgba(222, 196, 223, 0.62);
  border-left: 1px solid rgba(222, 196, 223, 0.62);
  border-radius: 17px;
  box-shadow: 0 12px 30px rgba(72, 57, 124, 0.065);
}

body:not(.command-dashboard-mode) .global-todo-reminder::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  content: "";
  background: linear-gradient(90deg, #ff8b80, #ffc368 32%, #7f66ef 68%, #2ccdbb);
}

body:not(.command-dashboard-mode) .global-todo-reminder.has-urgent {
  background:
    radial-gradient(circle at 91% 8%, rgba(255, 120, 130, 0.17), transparent 24%),
    radial-gradient(circle at 66% 100%, rgba(127, 101, 240, 0.11), transparent 28%),
    linear-gradient(110deg, #fff4f3 0%, #fbf8ff 50%, #f1fcfa 100%);
  border-color: rgba(236, 185, 188, 0.7);
}

body:not(.command-dashboard-mode) .global-todo-marker {
  color: #fff;
  background: linear-gradient(145deg, #ff8b74, #f26494);
  border-color: rgba(255, 255, 255, 0.74);
  border-radius: 13px;
  box-shadow: 0 7px 18px rgba(221, 91, 133, 0.21);
}

body:not(.command-dashboard-mode) .global-todo-marker b {
  background: linear-gradient(145deg, #8369ef, #606fe5);
  border-color: #fffafb;
}

body:not(.command-dashboard-mode) .global-todo-copy > span {
  color: #a86683;
}

body:not(.command-dashboard-mode) .global-todo-copy > strong {
  color: #2d2e4c;
}

body:not(.command-dashboard-mode) .global-todo-copy > small {
  color: #797b94;
}

body:not(.command-dashboard-mode) .global-todo-quick-actions button {
  color: #5f6080;
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(127, 115, 170, 0.16);
  border-radius: 9px;
  box-shadow: 0 3px 10px rgba(66, 57, 112, 0.035);
}

body:not(.command-dashboard-mode) .global-todo-quick-actions button.urgent {
  color: #b05270;
  background: rgba(255, 246, 247, 0.92);
  border-color: rgba(231, 167, 179, 0.5);
}

body:not(.command-dashboard-mode) .global-todo-quick-actions button b {
  color: #7158dc;
}

body:not(.command-dashboard-mode) .global-todo-all {
  background: linear-gradient(135deg, #7f65ef, #526fe4 62%, #24bdb7 130%);
  border-radius: 10px;
  box-shadow: 0 6px 15px rgba(96, 78, 201, 0.2);
}

body:not(.command-dashboard-mode) .dashboard-todo-center {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(117, 107, 170, 0.15);
  border-radius: 20px;
  box-shadow: 0 16px 42px rgba(51, 43, 105, 0.075);
}

body:not(.command-dashboard-mode) .dashboard-todo-center::after {
  background: linear-gradient(90deg, #ff897f, #ffc368 34%, #7e66ef 68%, #2bcbb9);
}

body:not(.command-dashboard-mode) .dashboard-todo-hero {
  background:
    radial-gradient(circle at 92% 0%, rgba(255, 161, 177, 0.2), transparent 31%),
    radial-gradient(circle at 8% 112%, rgba(63, 218, 197, 0.18), transparent 31%),
    linear-gradient(120deg, #f2edff 0%, #faf8ff 52%, #eafbf8 100%);
  border-bottom: 1px solid rgba(124, 110, 176, 0.1);
  color: #30304f;
}

body:not(.command-dashboard-mode) .dashboard-todo-marker {
  color: #fff;
  background: linear-gradient(145deg, #9b83f4, #718fea 66%, #57cdbf);
  border-color: rgba(255, 255, 255, 0.82);
  border-radius: 16px;
  box-shadow: 0 8px 19px rgba(102, 83, 211, 0.16);
}

body:not(.command-dashboard-mode) .dashboard-todo-marker b {
  background: linear-gradient(135deg, #ff8a81, #ed6397);
  border-color: #fff;
}

body:not(.command-dashboard-mode) .dashboard-todo-copy > span {
  color: #8d7ab9;
}

body:not(.command-dashboard-mode) .dashboard-todo-copy h2 {
  color: #302f51;
}

body:not(.command-dashboard-mode) .dashboard-todo-copy p {
  color: #65657f;
}

body:not(.command-dashboard-mode) .dashboard-todo-copy p strong {
  color: #2d2d4c;
}

body:not(.command-dashboard-mode) .dashboard-todo-copy p em {
  color: #d45f80;
}

body:not(.command-dashboard-mode) .dashboard-todo-copy small {
  color: #8b8aa1;
}

body:not(.command-dashboard-mode) .dashboard-todo-total {
  border-left-color: rgba(117, 105, 165, 0.16);
}

body:not(.command-dashboard-mode) .dashboard-todo-total > span,
body:not(.command-dashboard-mode) .dashboard-todo-total > em {
  color: #8a88a0;
}

body:not(.command-dashboard-mode) .dashboard-todo-total > strong {
  color: #383659;
}

body:not(.command-dashboard-mode) .dashboard-todo-total > strong small {
  color: #8a87a1;
}

body:not(.command-dashboard-mode) .dashboard-todo-card {
  background:
    radial-gradient(circle at 100% 0, rgba(127, 100, 240, 0.055), transparent 38%),
    linear-gradient(145deg, #faf9ff, #fff);
  border-color: rgba(122, 111, 174, 0.14);
  border-radius: 14px;
}

body:not(.command-dashboard-mode) .dashboard-todo-card:hover {
  border-color: rgba(116, 92, 240, 0.28);
  box-shadow: 0 10px 24px rgba(64, 53, 126, 0.09);
}

body:not(.command-dashboard-mode) .dashboard-todo-card.urgent {
  background:
    radial-gradient(circle at 100% 0, rgba(255, 121, 139, 0.08), transparent 38%),
    linear-gradient(145deg, #fff9f6, #fff);
  border-color: rgba(237, 183, 169, 0.55);
}

body:not(.command-dashboard-mode) .dashboard-todo-card-icon {
  color: #177f75;
  background: linear-gradient(145deg, #e3fbf5, #eaf6ff);
  border-radius: 12px;
}

body:not(.command-dashboard-mode) .dashboard-todo-card.urgent .dashboard-todo-card-icon {
  color: #d75d77;
  background: linear-gradient(145deg, #fff0ed, #fff3fa);
}

body:not(.command-dashboard-mode) .dashboard-todo-card-copy em,
body:not(.command-dashboard-mode) .dashboard-todo-card.urgent .dashboard-todo-card-copy em {
  color: #8b7cac;
}

body:not(.command-dashboard-mode) .dashboard-todo-card-count {
  color: #5e4acb;
}

body:not(.command-dashboard-mode) .dashboard-todo-card.urgent .dashboard-todo-card-count {
  color: #db6382;
}

body:not(.command-dashboard-mode) .dashboard-todo-card-action {
  color: #6551cf;
}

body:not(.command-dashboard-mode) .dashboard-todo-card.urgent .dashboard-todo-card-action {
  color: #c95b78;
}

body:not(.command-dashboard-mode) .hero-panel {
  background:
    radial-gradient(circle at 96% -8%, rgba(86, 222, 205, 0.22), transparent 38%),
    radial-gradient(circle at 58% 145%, rgba(255, 151, 169, 0.16), transparent 32%),
    radial-gradient(circle at 8% 108%, rgba(150, 125, 245, 0.16), transparent 34%),
    linear-gradient(120deg, #fbfaff 0%, #f3efff 53%, #edfbfa 100%);
  border: 1px solid rgba(139, 122, 208, 0.15);
  color: #30304f;
  border-radius: 22px;
  box-shadow: 0 18px 42px rgba(67, 54, 126, 0.08);
}

body:not(.command-dashboard-mode) .hero-panel::after {
  border-color: rgba(112, 92, 201, 0.08);
  box-shadow:
    0 0 0 35px rgba(255, 255, 255, 0.2),
    0 0 0 70px rgba(255, 255, 255, 0.13);
}

body:not(.command-dashboard-mode) .hero-label {
  color: #8b83a8;
}

body:not(.command-dashboard-mode) .live-pill {
  color: #278f82;
  background: rgba(231, 252, 247, 0.82);
  border-color: rgba(113, 212, 197, 0.28);
}

body:not(.command-dashboard-mode) .live-pill::before {
  background: #35c8b3;
  box-shadow: 0 0 0 4px rgba(96, 229, 205, 0.1);
}

body:not(.command-dashboard-mode) .hero-panel h2 {
  color: #2f2e51;
  font-weight: 730;
}

body:not(.command-dashboard-mode) .hero-panel h2 em {
  color: #6950d1;
}

body:not(.command-dashboard-mode) .hero-copy > p {
  color: #6d6d87;
}

body:not(.command-dashboard-mode) .hero-actions .button {
  color: #565472;
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(124, 110, 174, 0.16);
}

body:not(.command-dashboard-mode) .hero-actions .button:hover {
  color: #5844bd;
  background: #fff;
  border-color: rgba(116, 92, 240, 0.28);
}

body:not(.command-dashboard-mode) .hero-actions .button.primary {
  color: #fff;
  background: linear-gradient(135deg, #8368f3, #5f75e8 68%, #32beb9 130%);
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(102, 81, 207, 0.18);
}

body:not(.command-dashboard-mode) .hero-stat {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.54));
  border-color: rgba(126, 112, 181, 0.13);
  border-radius: 14px;
  box-shadow: 0 6px 16px rgba(70, 57, 133, 0.045);
}

body:not(.command-dashboard-mode) .hero-stat span {
  color: #777791;
}

body:not(.command-dashboard-mode) .hero-stat strong {
  color: #343354;
}

body:not(.command-dashboard-mode) .hero-stat small {
  color: #268f83;
}

body:not(.command-dashboard-mode) .metric-card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0, rgba(126, 99, 240, 0.07), transparent 42%),
    linear-gradient(145deg, #fff, #fbfaff);
  border-color: rgba(118, 109, 168, 0.14);
  border-radius: 16px;
  box-shadow: 0 9px 25px rgba(51, 43, 103, 0.055);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

body:not(.command-dashboard-mode) .metric-card::before {
  position: absolute;
  top: 0;
  right: 17px;
  left: 17px;
  height: 3px;
  content: "";
  background: linear-gradient(90deg, #7f66ef, #4f82ef);
  border-radius: 0 0 999px 999px;
}

body:not(.command-dashboard-mode) .metric-card:nth-child(2) {
  background:
    radial-gradient(circle at 100% 0, rgba(255, 130, 139, 0.1), transparent 42%),
    linear-gradient(145deg, #fff9f8, #fff);
}

body:not(.command-dashboard-mode) .metric-card:nth-child(2)::before {
  background: linear-gradient(90deg, #ff8b81, #f06b99);
}

body:not(.command-dashboard-mode) .metric-card:nth-child(3) {
  background:
    radial-gradient(circle at 100% 0, rgba(31, 198, 177, 0.1), transparent 42%),
    linear-gradient(145deg, #f5fffc, #fff);
}

body:not(.command-dashboard-mode) .metric-card:nth-child(3)::before {
  background: linear-gradient(90deg, #25c9b5, #48a7ec);
}

body:not(.command-dashboard-mode) .metric-card:nth-child(4) {
  background:
    radial-gradient(circle at 100% 0, rgba(255, 184, 86, 0.1), transparent 42%),
    linear-gradient(145deg, #fffcf5, #fff);
}

body:not(.command-dashboard-mode) .metric-card:nth-child(4)::before {
  background: linear-gradient(90deg, #ffc064, #f08b62);
}

body:not(.command-dashboard-mode) .metric-card:nth-child(5) {
  background:
    radial-gradient(circle at 100% 0, rgba(76, 128, 245, 0.09), transparent 42%),
    linear-gradient(145deg, #f8faff, #fff);
}

body:not(.command-dashboard-mode) .metric-card:nth-child(5)::before {
  background: linear-gradient(90deg, #5783f2, #856ff1);
}

body:not(.command-dashboard-mode) .metric-card:nth-child(6) {
  background:
    radial-gradient(circle at 100% 0, rgba(136, 96, 229, 0.09), transparent 42%),
    linear-gradient(145deg, #fbf8ff, #fff);
}

body:not(.command-dashboard-mode) .metric-card:nth-child(6)::before {
  background: linear-gradient(90deg, #896af0, #5b83ec);
}

body:not(.command-dashboard-mode) .metric-card:hover {
  border-color: rgba(116, 92, 240, 0.24);
  box-shadow: 0 14px 30px rgba(57, 46, 116, 0.085);
  transform: translateY(-2px);
}

body:not(.command-dashboard-mode) .metric-label {
  color: #676a86;
  font-weight: 600;
}

body:not(.command-dashboard-mode) .metric-value {
  color: #272844;
  font-weight: 760;
}

body:not(.command-dashboard-mode) .metric-icon {
  color: #fff;
  background: linear-gradient(145deg, #8065f1, #4d82ee);
  border-radius: 10px;
  box-shadow: 0 6px 14px rgba(102, 83, 211, 0.18);
}

body:not(.command-dashboard-mode) .metric-icon.orange {
  background: linear-gradient(145deg, #ff9881, #ed6a9a);
  box-shadow: 0 6px 14px rgba(227, 103, 130, 0.18);
}

body:not(.command-dashboard-mode) .metric-icon.blue {
  background: linear-gradient(145deg, #2acdb9, #49a6ec);
  box-shadow: 0 6px 14px rgba(55, 167, 197, 0.17);
}

body:not(.command-dashboard-mode) .metric-icon.purple {
  background: linear-gradient(145deg, #8c70f2, #5c7fe8);
  box-shadow: 0 6px 14px rgba(111, 91, 218, 0.18);
}

body:not(.command-dashboard-mode) .button {
  min-height: 40px;
  color: #373956;
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(117, 109, 166, 0.2);
  border-radius: 11px;
  box-shadow: 0 3px 10px rgba(59, 50, 102, 0.025);
}

body:not(.command-dashboard-mode) .button:hover {
  color: #5140b5;
  background: #fff;
  border-color: rgba(116, 92, 240, 0.3);
  box-shadow: 0 7px 18px rgba(69, 54, 141, 0.075);
}

body:not(.command-dashboard-mode) .button.primary {
  color: #fff;
  background: linear-gradient(125deg, #7c60ef 0%, #5d72e7 62%, #28bdb8 130%);
  border-color: transparent;
  box-shadow: 0 9px 22px rgba(98, 77, 209, 0.23);
}

body:not(.command-dashboard-mode) .button.primary:hover {
  color: #fff;
  background: linear-gradient(125deg, #876cf5 0%, #6980ec 62%, #32cbc4 130%);
  box-shadow: 0 12px 27px rgba(98, 77, 209, 0.29);
}

body:not(.command-dashboard-mode) .button.dark {
  color: #fff;
  background: linear-gradient(135deg, #282449, #3a356b);
  border-color: transparent;
}

body:not(.command-dashboard-mode) .selection-chip {
  min-height: 32px;
  padding: 0 11px;
  color: #666984;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(117, 108, 167, 0.13);
  border-radius: 999px;
}

body:not(.command-dashboard-mode) .selection-chip::before {
  background: linear-gradient(135deg, #7b63ee, #25c6b6);
  box-shadow: 0 0 0 3px rgba(37, 198, 182, 0.1);
}

body:not(.command-dashboard-mode) .panel {
  background: rgba(255, 255, 255, 0.93);
  border-color: rgba(116, 107, 167, 0.15);
  border-radius: 18px;
  box-shadow: 0 12px 34px rgba(52, 44, 105, 0.06);
  backdrop-filter: blur(12px);
}

body:not(.command-dashboard-mode) .panel-header {
  background: linear-gradient(90deg, rgba(250, 248, 255, 0.86), rgba(255, 255, 255, 0.56));
}

body:not(.command-dashboard-mode) .panel-title h3 {
  color: #2a2b49;
  font-weight: 740;
}

body:not(.command-dashboard-mode) .toolbar {
  background:
    linear-gradient(90deg, rgba(249, 247, 255, 0.9), rgba(255, 255, 255, 0.66) 58%, rgba(247, 255, 252, 0.76));
  border-bottom-color: rgba(116, 107, 167, 0.11);
}

body:not(.command-dashboard-mode) .toolbar-title {
  color: #2a2b49;
  font-weight: 700;
}

body:not(.command-dashboard-mode) .toolbar-subtitle {
  color: #8789a1;
}

body:not(.command-dashboard-mode) .quality-summary-grid {
  gap: 12px;
}

body:not(.command-dashboard-mode) .simple-stat {
  position: relative;
  overflow: hidden;
  padding: 17px 17px 16px;
  background:
    radial-gradient(circle at 100% 0, rgba(124, 95, 239, 0.065), transparent 42%),
    linear-gradient(145deg, #fff 0%, #fbfaff 100%);
  border-color: rgba(118, 109, 169, 0.14);
  border-radius: 16px;
  box-shadow: 0 9px 25px rgba(51, 43, 103, 0.055);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

body:not(.command-dashboard-mode) .simple-stat::before {
  position: absolute;
  top: 0;
  right: 18px;
  left: 18px;
  height: 3px;
  content: "";
  background: linear-gradient(90deg, #7f66ef, #4e82ef);
  border-radius: 0 0 999px 999px;
  opacity: 0.86;
}

body:not(.command-dashboard-mode) .simple-stat:hover {
  border-color: rgba(116, 92, 240, 0.25);
  box-shadow: 0 14px 30px rgba(57, 46, 116, 0.085);
  transform: translateY(-2px);
}

body:not(.command-dashboard-mode) .simple-stat span {
  color: #696c87;
  font-weight: 600;
}

body:not(.command-dashboard-mode) .simple-stat strong {
  color: #262743;
  font-weight: 760;
}

body:not(.command-dashboard-mode) .simple-stat small {
  color: #9091a6;
}

body:not(.command-dashboard-mode) .quality-summary-grid .simple-stat:nth-child(6n + 2),
body:not(.command-dashboard-mode) .after-sales-oem-kpis .simple-stat:nth-child(6n + 2) {
  background:
    radial-gradient(circle at 100% 0, rgba(30, 196, 176, 0.11), transparent 42%),
    linear-gradient(145deg, #f8fffc 0%, #fff 100%);
}

body:not(.command-dashboard-mode) .quality-summary-grid .simple-stat:nth-child(6n + 2)::before,
body:not(.command-dashboard-mode) .after-sales-oem-kpis .simple-stat:nth-child(6n + 2)::before {
  background: linear-gradient(90deg, #20c9b6, #46a8ee);
}

body:not(.command-dashboard-mode) .quality-summary-grid .simple-stat:nth-child(6n + 3),
body:not(.command-dashboard-mode) .after-sales-oem-kpis .simple-stat:nth-child(6n + 3) {
  background:
    radial-gradient(circle at 100% 0, rgba(255, 131, 137, 0.1), transparent 42%),
    linear-gradient(145deg, #fff9f8 0%, #fff 100%);
}

body:not(.command-dashboard-mode) .quality-summary-grid .simple-stat:nth-child(6n + 3)::before,
body:not(.command-dashboard-mode) .after-sales-oem-kpis .simple-stat:nth-child(6n + 3)::before {
  background: linear-gradient(90deg, #ff8b83, #f16b9b);
}

body:not(.command-dashboard-mode) .quality-summary-grid .simple-stat:nth-child(6n + 4),
body:not(.command-dashboard-mode) .after-sales-oem-kpis .simple-stat:nth-child(6n + 4) {
  background:
    radial-gradient(circle at 100% 0, rgba(255, 183, 85, 0.1), transparent 42%),
    linear-gradient(145deg, #fffcf5 0%, #fff 100%);
}

body:not(.command-dashboard-mode) .quality-summary-grid .simple-stat:nth-child(6n + 4)::before,
body:not(.command-dashboard-mode) .after-sales-oem-kpis .simple-stat:nth-child(6n + 4)::before {
  background: linear-gradient(90deg, #ffbf62, #f18c61);
}

body:not(.command-dashboard-mode) .quality-summary-grid .simple-stat:nth-child(6n + 5),
body:not(.command-dashboard-mode) .after-sales-oem-kpis .simple-stat:nth-child(6n + 5) {
  background:
    radial-gradient(circle at 100% 0, rgba(75, 128, 245, 0.09), transparent 42%),
    linear-gradient(145deg, #f8faff 0%, #fff 100%);
}

body:not(.command-dashboard-mode) .quality-summary-grid .simple-stat:nth-child(6n + 5)::before,
body:not(.command-dashboard-mode) .after-sales-oem-kpis .simple-stat:nth-child(6n + 5)::before {
  background: linear-gradient(90deg, #5583f2, #8470f2);
}

body:not(.command-dashboard-mode) .quality-summary-grid .simple-stat:nth-child(6n),
body:not(.command-dashboard-mode) .after-sales-oem-kpis .simple-stat:nth-child(6n) {
  background:
    radial-gradient(circle at 100% 0, rgba(134, 95, 229, 0.09), transparent 42%),
    linear-gradient(145deg, #fbf8ff 0%, #fff 100%);
}

body:not(.command-dashboard-mode) .quality-summary-grid .simple-stat:nth-child(6n)::before,
body:not(.command-dashboard-mode) .after-sales-oem-kpis .simple-stat:nth-child(6n)::before {
  background: linear-gradient(90deg, #8a6cf0, #5c83ed);
}

body:not(.command-dashboard-mode) .after-sales-oem-link-grid {
  gap: 11px;
  padding: 14px 16px;
}

body:not(.command-dashboard-mode) .after-sales-oem-link-grid > div {
  min-height: 108px;
  padding: 15px 16px;
  background:
    radial-gradient(circle at 100% 0, rgba(126, 101, 240, 0.09), transparent 38%),
    linear-gradient(145deg, #faf9ff, #fff);
  border-color: rgba(118, 108, 169, 0.13);
  border-radius: 14px;
}

body:not(.command-dashboard-mode) .after-sales-oem-link-grid > div:nth-child(2) {
  background:
    radial-gradient(circle at 100% 0, rgba(31, 198, 177, 0.11), transparent 38%),
    linear-gradient(145deg, #f3fffb, #fff);
}

body:not(.command-dashboard-mode) .after-sales-oem-link-grid > div:nth-child(3) {
  background:
    radial-gradient(circle at 100% 0, rgba(255, 129, 139, 0.11), transparent 38%),
    linear-gradient(145deg, #fff8f8, #fff);
}

body:not(.command-dashboard-mode) .after-sales-oem-link-grid > div:nth-child(4) {
  background:
    radial-gradient(circle at 100% 0, rgba(255, 184, 88, 0.12), transparent 38%),
    linear-gradient(145deg, #fffbf3, #fff);
}

body:not(.command-dashboard-mode) .after-sales-oem-link-grid strong {
  color: #292a49;
  font-weight: 760;
}

body:not(.command-dashboard-mode) .after-sales-oem-rule-grid {
  gap: 10px;
  padding: 14px 16px 16px;
  background: transparent;
}

body:not(.command-dashboard-mode) .after-sales-oem-rule-grid > div {
  min-height: 110px;
  padding: 14px 15px;
  background: linear-gradient(145deg, #faf9ff, #fff);
  border: 1px solid rgba(118, 109, 168, 0.12);
  border-radius: 13px;
}

body:not(.command-dashboard-mode) .after-sales-oem-rule-grid > div:nth-child(2) {
  background: linear-gradient(145deg, #f3fffb, #fff);
}

body:not(.command-dashboard-mode) .after-sales-oem-rule-grid > div:nth-child(3) {
  background: linear-gradient(145deg, #fff9f8, #fff);
}

body:not(.command-dashboard-mode) .after-sales-oem-rule-grid > div:nth-child(4) {
  background: linear-gradient(145deg, #fffbf3, #fff);
}

body:not(.command-dashboard-mode) .after-sales-oem-rule-grid strong {
  color: #30314f;
  font-weight: 720;
}

body:not(.command-dashboard-mode) .data-table {
  color: #41435e;
}

body:not(.command-dashboard-mode) .data-table th {
  color: #73758f;
  background: linear-gradient(90deg, #f7f5fd, #f9f9fe 54%, #f4fbfa);
  border-top-color: rgba(118, 108, 167, 0.1);
  border-bottom-color: rgba(118, 108, 167, 0.11);
  font-weight: 650;
}

body:not(.command-dashboard-mode) .data-table td {
  border-bottom-color: rgba(117, 108, 164, 0.085);
}

body:not(.command-dashboard-mode) .data-table tbody tr:hover {
  background: linear-gradient(90deg, rgba(248, 245, 255, 0.72), rgba(247, 255, 252, 0.68));
}

body:not(.command-dashboard-mode) .status {
  font-weight: 650;
}

body:not(.command-dashboard-mode) .status.info {
  color: #6553c7;
  background: #f0edff;
}

body:not(.command-dashboard-mode) .status.warning {
  color: #b56f22;
  background: #fff4df;
}

body:not(.command-dashboard-mode) .status.danger {
  color: #cf536c;
  background: #ffedf1;
}

body:not(.command-dashboard-mode) .link-button,
body:not(.command-dashboard-mode) .accident-customer-link strong {
  color: #5b49c4;
}

body:not(.command-dashboard-mode) .login-screen {
  background:
    radial-gradient(circle at 18% 10%, rgba(131, 102, 243, 0.14), transparent 30%),
    radial-gradient(circle at 92% 86%, rgba(35, 201, 184, 0.1), transparent 32%),
    #f7f7fd;
}

body:not(.command-dashboard-mode) .login-brand-panel {
  color: #30304f;
  background:
    radial-gradient(circle at 82% 14%, rgba(45, 205, 187, 0.22), transparent 29%),
    radial-gradient(circle at 12% 84%, rgba(255, 143, 158, 0.16), transparent 31%),
    radial-gradient(circle at 16% 12%, rgba(138, 112, 243, 0.16), transparent 28%),
    linear-gradient(145deg, #faf8ff 0%, #f0ecff 55%, #eafaf8 100%);
}

body:not(.command-dashboard-mode) .login-brand-panel::before,
body:not(.command-dashboard-mode) .login-brand-panel::after {
  border-color: rgba(112, 91, 199, 0.07);
}

body:not(.command-dashboard-mode) .login-brand strong {
  color: #302f51;
}

body:not(.command-dashboard-mode) .login-brand span {
  color: #8d8ba4;
}

body:not(.command-dashboard-mode) .login-logo-card {
  box-shadow: 0 12px 28px rgba(67, 53, 127, 0.13);
}

body:not(.command-dashboard-mode) .login-brand-copy h1 {
  color: #2e2d4e;
}

body:not(.command-dashboard-mode) .login-brand-copy .eyebrow,
body:not(.command-dashboard-mode) .login-kicker {
  color: #6b53cf;
}

body:not(.command-dashboard-mode) .login-brand-copy > p:last-child {
  color: #6f6e87;
}

body:not(.command-dashboard-mode) .login-feature-list span {
  color: #68667f;
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(125, 110, 181, 0.13);
  border-radius: 8px;
}

body:not(.command-dashboard-mode) .login-security-note {
  color: #89879e;
}

body:not(.command-dashboard-mode) .login-security-note svg {
  color: #2aaf9d;
}

body:not(.command-dashboard-mode) .login-form-panel {
  background:
    radial-gradient(circle at 82% 10%, rgba(117, 92, 240, 0.08), transparent 28%),
    radial-gradient(circle at 10% 90%, rgba(27, 190, 172, 0.07), transparent 28%),
    #f7f7fd;
}

body:not(.command-dashboard-mode) .login-card {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(117, 107, 168, 0.16);
  border-radius: 22px;
  box-shadow: 0 28px 76px rgba(47, 39, 101, 0.12);
  backdrop-filter: blur(18px);
}

body:not(.command-dashboard-mode) .login-input-wrap {
  background: #faf9ff;
  border-color: rgba(118, 109, 168, 0.2);
  border-radius: 11px;
}

body:not(.command-dashboard-mode) .login-input-wrap:focus-within {
  border-color: rgba(116, 92, 240, 0.55);
  box-shadow: 0 0 0 4px rgba(116, 92, 240, 0.09);
}

body:not(.command-dashboard-mode) .login-wecom {
  color: #2c3550;
  background: linear-gradient(135deg, #edfdf9, #f7f9ff);
  border-color: #c7eee7;
  border-radius: 12px;
}

body:not(.command-dashboard-mode) .login-wecom-mark {
  background: linear-gradient(145deg, #21c8b3, #3c9ce5);
}

body:not(.command-dashboard-mode) .login-submit {
  background: linear-gradient(125deg, #7d62ef, #5b74e7 64%, #2abeb8 130%);
  border-radius: 11px;
  box-shadow: 0 11px 26px rgba(99, 78, 210, 0.22);
}

body:not(.command-dashboard-mode) .login-submit:hover {
  background: linear-gradient(125deg, #876df6, #6881ec 64%, #34cbc5 130%);
}

@media (min-width: 1320px) {
  body:not(.command-dashboard-mode) .metrics-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  body:not(.command-dashboard-mode) .profile-button::before {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 760px) {
  body:not(.command-dashboard-mode) .workspace {
    padding-inline: 14px;
  }

  body:not(.command-dashboard-mode) .topbar {
    min-height: 70px;
    padding-inline: 14px;
  }

  body:not(.command-dashboard-mode) .global-todo-reminder {
    padding: 12px;
    border-radius: 15px;
  }

  body:not(.command-dashboard-mode) .panel {
    border-radius: 17px;
  }

  body:not(.command-dashboard-mode) .simple-stat {
    border-radius: 15px;
  }

  body:not(.command-dashboard-mode) .metric-card {
    border-radius: 15px;
  }

  body:not(.command-dashboard-mode) .page-head h2::before {
    height: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body:not(.command-dashboard-mode) .nav-item,
  body:not(.command-dashboard-mode) .nav-item .nav-icon,
  body:not(.command-dashboard-mode) .simple-stat,
  body:not(.command-dashboard-mode) .metric-card,
  body:not(.command-dashboard-mode) .button {
    transition: none;
  }
}

/* 门店流量管理：多品牌企微客流统一汇总 */
.traffic-page-head p {
  max-width: 920px;
}

.traffic-store-query-strip {
  --traffic-query-control-height: 44px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin: -2px 0 16px;
  padding: 14px 16px;
  background: linear-gradient(90deg, rgba(236, 248, 245, 0.96), rgba(242, 246, 255, 0.96));
  border: 1px solid rgba(49, 126, 117, 0.16);
  border-radius: 13px;
}

.traffic-store-query-field {
  display: grid;
  flex: 1 1 380px;
  min-width: 260px;
  max-width: 620px;
  grid-template-rows: 18px var(--traffic-query-control-height);
  gap: 6px;
}

.traffic-store-select-field {
  display: grid;
  flex: 0 1 300px;
  min-width: 220px;
  grid-template-rows: 18px var(--traffic-query-control-height);
  gap: 6px;
}

.traffic-month-select-field {
  display: grid;
  flex: 0 0 170px;
  grid-template-rows: 18px var(--traffic-query-control-height);
  gap: 6px;
}

.traffic-store-query-field span,
.traffic-store-select-field span,
.traffic-month-select-field span {
  display: flex;
  height: 18px;
  align-items: center;
  color: #356067;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.traffic-store-query-field input,
.traffic-store-select-field select,
.traffic-month-select-field select {
  width: 100%;
  height: var(--traffic-query-control-height);
  min-height: var(--traffic-query-control-height);
  padding: 0 13px;
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(70, 124, 134, 0.32);
  border-radius: 9px;
  box-shadow: 0 3px 10px rgba(25, 73, 79, 0.04);
}

.traffic-store-query-field input:focus,
.traffic-store-select-field select:focus,
.traffic-month-select-field select:focus {
  border-color: #2f8e83;
  box-shadow: 0 0 0 3px rgba(47, 142, 131, 0.12);
  outline: none;
}

.traffic-store-query-submit {
  min-height: var(--traffic-query-control-height);
  height: var(--traffic-query-control-height);
  flex: 0 0 auto;
  padding: 0 18px;
  white-space: nowrap;
}

.traffic-store-query-result {
  margin-left: auto;
  min-height: var(--traffic-query-control-height);
  display: flex;
  align-items: center;
  color: #557178;
  font-size: 11px;
  white-space: nowrap;
}

.traffic-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(430px, 0.9fr);
  overflow: hidden;
  margin-bottom: 16px;
  color: #fff;
  background:
    radial-gradient(circle at 82% 20%, rgba(57, 114, 230, 0.28), transparent 34%),
    radial-gradient(circle at 16% 105%, rgba(255, 109, 58, 0.19), transparent 36%),
    linear-gradient(128deg, #102e35, #164d55 58%, #173f5a);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  box-shadow: 0 18px 42px rgba(15, 44, 59, 0.16);
}

.traffic-hero-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 29px 31px;
}

.traffic-hero-main .eyebrow {
  margin: 0 0 6px;
  color: #78c9c1;
}

.traffic-hero-main h2 {
  margin: 0 0 10px;
  color: #fff;
  font-size: clamp(21px, 1.8vw, 29px);
  letter-spacing: -0.035em;
}

.traffic-hero-main > p:not(.eyebrow) {
  max-width: 760px;
  margin: 0;
  color: #aec5cb;
  font-size: 12px;
  line-height: 1.8;
}

.traffic-sync-state {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  color: #87a7b1;
  font-size: 11px;
}

.traffic-sync-state span {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
}

.traffic-sync-state i {
  width: 7px;
  height: 7px;
  background: #d19043;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(209, 144, 67, 0.11);
}

.traffic-sync-state .online i {
  background: #66d4b7;
  box-shadow: 0 0 0 4px rgba(102, 212, 183, 0.12);
}

.traffic-hero-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: center;
  gap: 1px;
  padding: 19px;
  background: rgba(255, 255, 255, 0.035);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.traffic-hero-kpis > div {
  min-width: 0;
  padding: 16px 17px;
  background: rgba(255, 255, 255, 0.052);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
}

.traffic-hero-kpis span,
.traffic-hero-kpis em {
  display: block;
}

.traffic-hero-kpis span {
  margin-bottom: 8px;
  color: #91afb8;
  font-size: 11px;
}

.traffic-hero-kpis strong {
  display: block;
  color: #f7fbfc;
  font-size: 26px;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}

.traffic-hero-kpis small {
  margin-left: 4px;
  color: #8ba8b1;
  font-size: 11px;
  font-weight: 500;
}

.traffic-hero-kpis em {
  margin-top: 8px;
  color: #91adb6;
  font-size: 10px;
  font-style: normal;
  line-height: 1.5;
}

.traffic-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 16px;
  overflow: hidden;
  background: #d7e3e6;
  border: 1px solid #d7e3e6;
  border-radius: 13px;
}

.traffic-tabs button {
  display: grid;
  min-height: 72px;
  align-content: center;
  gap: 4px;
  padding: 13px 16px;
  color: var(--ink-soft);
  background: #fff;
  border: 0;
  text-align: left;
}

.traffic-tabs button span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.traffic-tabs button small {
  color: var(--ink-muted);
  font-size: 10px;
}

.traffic-tabs button.active {
  color: #fff;
  background: linear-gradient(135deg, #153d49, #1a746f);
  box-shadow: inset 0 -3px 0 var(--accent);
}

.traffic-tabs button.active span,
.traffic-tabs button.active small {
  color: #fff;
}

.traffic-schema-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1.3fr);
  gap: 20px;
  margin-bottom: 16px;
  padding: 18px 20px;
  background:
    linear-gradient(120deg, rgba(11, 143, 131, 0.055), rgba(57, 114, 230, 0.035) 60%, transparent),
    #fff;
  border: 1px solid #d9e6e6;
  border-radius: 15px;
  box-shadow: var(--shadow-sm);
}

.traffic-schema-head {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.traffic-schema-head > div {
  min-width: 0;
}

.traffic-schema-head span {
  display: block;
  margin-bottom: 5px;
  color: var(--teal);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.traffic-schema-head h3 {
  margin: 0 0 5px;
  font-size: 16px;
}

.traffic-schema-head p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.65;
}

.traffic-schema-head > strong {
  display: grid;
  flex: 0 0 auto;
  min-width: 72px;
  height: 64px;
  place-content: center;
  color: var(--teal);
  background: var(--teal-soft);
  border: 1px solid #cbe8e1;
  border-radius: 12px;
  font-size: 22px;
  text-align: center;
}

.traffic-schema-head > strong small {
  margin-top: 2px;
  color: #5d8c85;
  font-size: 9px;
  font-weight: 500;
}

.traffic-schema-fields {
  display: grid;
  grid-template-columns: repeat(7, minmax(88px, 1fr));
  gap: 6px;
}

.traffic-schema-fields > div {
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 8px 9px;
  background: #f7f9fa;
  border: 1px dashed #d8e2e6;
  border-radius: 8px;
}

.traffic-schema-fields > div.matched {
  background: #eff9f6;
  border-color: #bfe1d8;
  border-style: solid;
}

.traffic-schema-fields > div.extended {
  background: #f7f5fd;
  border-color: #d8d0f0;
}

.traffic-schema-fields b {
  color: var(--ink-muted);
  font-size: 8px;
  font-weight: 650;
}

.traffic-schema-fields span {
  overflow: hidden;
  color: var(--ink);
  font-size: 10px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.traffic-schema-fields small {
  overflow: hidden;
  color: var(--ink-muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.traffic-schema-fields > .matched small {
  color: var(--green);
}

.traffic-source-registry {
  display: grid;
  grid-template-columns: minmax(235px, 0.55fr) minmax(0, 1.45fr);
  gap: 18px;
  margin-bottom: 16px;
  padding: 17px 19px;
  background: #fff;
  border: 1px solid #dce6ea;
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}

.traffic-registry-head {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.traffic-registry-head > div {
  min-width: 0;
}

.traffic-registry-head span {
  display: block;
  margin-bottom: 4px;
  color: var(--blue);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.traffic-registry-head h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.traffic-registry-head p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 9px;
  line-height: 1.55;
}

.traffic-registry-head > strong {
  flex: 0 0 auto;
  color: var(--blue);
  font-size: 21px;
  text-align: right;
}

.traffic-registry-head > strong small {
  display: block;
  color: var(--ink-muted);
  font-size: 8px;
  font-weight: 500;
}

.traffic-document-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.traffic-document-grid article {
  display: grid;
  min-width: 0;
  gap: 7px;
  padding: 11px 12px;
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.traffic-document-grid article > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
}

.traffic-document-grid article > div > b {
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #28a997, #3972e6);
  border-radius: 7px;
  font-size: 11px;
}

.traffic-document-grid article > div span,
.traffic-document-grid article > div strong,
.traffic-document-grid article > div small {
  display: block;
  min-width: 0;
}

.traffic-document-grid article strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.traffic-document-grid article small {
  overflow: hidden;
  color: var(--ink-muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.traffic-document-grid article p {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
}

.traffic-document-grid article em {
  padding: 3px 6px;
  color: #176e65;
  background: var(--teal-soft);
  border-radius: 999px;
  font-size: 8px;
  font-style: normal;
}

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

.traffic-report-grid > .panel {
  min-width: 0;
}

.traffic-day-chart {
  display: grid;
  height: 222px;
  grid-template-columns: repeat(auto-fit, minmax(27px, 1fr));
  align-items: end;
  gap: 7px;
  padding: 22px 19px 16px;
  overflow-x: auto;
}

.traffic-day-column {
  display: flex;
  height: 178px;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.traffic-day-column b {
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 650;
}

.traffic-day-column span {
  display: block;
  width: min(24px, 70%);
  min-height: 5px;
  background: linear-gradient(180deg, #25a695, #3972e6);
  border-radius: 5px 5px 2px 2px;
  box-shadow: 0 7px 16px rgba(57, 114, 230, 0.13);
}

.traffic-day-column small {
  color: var(--ink-muted);
  font-size: 8px;
  white-space: nowrap;
}

.traffic-empty-inline {
  display: grid;
  min-height: 150px;
  place-content: center;
  gap: 5px;
  padding: 18px;
  color: var(--ink-muted);
  text-align: center;
}

.traffic-empty-inline strong {
  color: var(--ink);
  font-size: 13px;
}

.traffic-empty-inline span {
  font-size: 10px;
}

.traffic-funnel {
  display: grid;
  gap: 8px;
  padding: 16px 18px 18px;
}

.traffic-funnel > div {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) minmax(72px, auto);
  align-items: center;
  gap: 11px;
}

.traffic-funnel > div > span {
  color: var(--ink-muted);
  font-size: 9px;
  font-weight: 700;
}

.traffic-funnel > div > div {
  position: relative;
  display: grid;
  min-height: 48px;
  align-content: center;
  gap: 2px;
  overflow: hidden;
  padding: 8px 12px;
  background: #f3f7f8;
  border: 1px solid #e5ecee;
  border-radius: 8px;
}

.traffic-funnel > div > div strong,
.traffic-funnel > div > div small {
  position: relative;
  z-index: 1;
}

.traffic-funnel > div > div strong {
  color: var(--ink);
  font-size: 11px;
}

.traffic-funnel > div > div small {
  color: var(--ink-muted);
  font-size: 8px;
}

.traffic-funnel > div > div em {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, rgba(34, 155, 140, 0.2), rgba(57, 114, 230, 0.06));
  border-right: 2px solid #299d91;
}

.traffic-funnel > div > b {
  color: var(--ink);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.traffic-funnel > div > b small {
  display: block;
  margin-top: 2px;
  color: var(--ink-muted);
  font-size: 9px;
  font-weight: 500;
}

.traffic-ranking,
.traffic-store-ranking {
  display: grid;
  gap: 10px;
  padding: 15px 18px 18px;
}

.traffic-ranking > div,
.traffic-store-ranking > div {
  display: grid;
  grid-template-columns: minmax(130px, 0.8fr) minmax(80px, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.traffic-store-ranking > div {
  grid-template-columns: minmax(150px, 0.8fr) minmax(80px, 1fr) auto auto;
}

.traffic-ranking span,
.traffic-ranking strong,
.traffic-ranking small,
.traffic-store-ranking span,
.traffic-store-ranking strong,
.traffic-store-ranking small {
  display: block;
  min-width: 0;
}

.traffic-ranking strong,
.traffic-store-ranking strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.traffic-ranking small,
.traffic-store-ranking small {
  margin-top: 2px;
  color: var(--ink-muted);
  font-size: 8px;
}

.traffic-ranking > div > div,
.traffic-store-ranking > div > div {
  height: 8px;
  overflow: hidden;
  background: #edf2f4;
  border-radius: 999px;
}

.traffic-ranking i,
.traffic-store-ranking i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #2a9f92, #6f90e7);
  border-radius: inherit;
}

.traffic-ranking > div > b {
  min-width: 46px;
  color: var(--ink);
  font-size: 11px;
  text-align: right;
}

.traffic-store-ranking > div > b,
.traffic-store-ranking > div > em {
  color: var(--ink);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-style: normal;
  text-align: right;
}

.traffic-store-ranking > div > b small {
  display: inline;
  margin-left: 2px;
}

.traffic-store-ranking > div > em {
  min-width: 72px;
  color: var(--teal);
  font-size: 10px;
}

.traffic-insight-strip, .traffic-coaching-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 16px;
  overflow: hidden;
  background: #dde6e9;
  border: 1px solid #dde6e9;
  border-radius: 13px;
}

.traffic-insight-strip > div,
.traffic-coaching-strip > div {
  display: grid;
  gap: 5px;
  padding: 15px 17px;
  background: #fff;
}

.traffic-insight-strip span,
.traffic-insight-strip small,
.traffic-coaching-strip span,
.traffic-coaching-strip small {
  color: var(--ink-muted);
  font-size: 9px;
  line-height: 1.5;
}

.traffic-insight-strip strong,
.traffic-coaching-strip strong {
  color: var(--ink);
  font-size: 14px;
}

.traffic-source-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  padding: 15px 17px;
}

.traffic-source-card-grid article {
  display: grid;
  gap: 7px;
  padding: 14px 15px;
  background: linear-gradient(145deg, #f8fbfb, #fff);
  border: 1px solid var(--line);
  border-radius: 11px;
}

.traffic-source-card-grid article > span {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 650;
}

.traffic-source-card-grid article > strong {
  color: var(--ink);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

.traffic-source-card-grid article > strong small {
  margin-left: 3px;
  color: var(--ink-muted);
  font-size: 10px;
  font-weight: 500;
}

.traffic-source-card-grid article > div {
  height: 5px;
  overflow: hidden;
  background: #edf2f3;
  border-radius: 999px;
}

.traffic-source-card-grid article > div em {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--blue));
  border-radius: inherit;
}

.traffic-source-card-grid article p,
.traffic-source-card-grid article > small {
  margin: 0;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.5;
}

.traffic-source-card-grid article > small {
  color: var(--ink-muted);
}

.traffic-source-analysis-table {
  max-height: 460px;
  overflow: auto;
}

.traffic-source-analysis-table .data-table th,
.traffic-source-matrix .data-table th,
.traffic-advisor-table .data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.traffic-source-matrix {
  overflow-x: auto;
}

.traffic-source-matrix .data-table td:first-child {
  min-width: 180px;
}

.traffic-source-matrix .data-table strong,
.traffic-source-matrix .data-table .muted {
  display: block;
}

.traffic-advisor-hero {
  display: grid;
  grid-template-columns: minmax(260px, 1.45fr) repeat(3, minmax(140px, 0.72fr));
  gap: 1px;
  margin-bottom: 16px;
  overflow: hidden;
  background: #d9e4e7;
  border: 1px solid #d9e4e7;
  border-radius: 15px;
}

.traffic-advisor-hero > div {
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 19px 21px;
  background: #fff;
}

.traffic-advisor-hero > div:first-child {
  background:
    radial-gradient(circle at 90% 20%, rgba(57, 114, 230, 0.12), transparent 36%),
    linear-gradient(145deg, #f1faf8, #fff);
}

.traffic-advisor-hero span,
.traffic-advisor-hero small {
  color: var(--ink-muted);
  font-size: 9px;
}

.traffic-advisor-hero strong {
  color: var(--ink);
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.traffic-advisor-hero strong small {
  margin-left: 3px;
  font-size: 10px;
}

.traffic-advisor-hero p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.65;
}

.traffic-score {
  display: inline-grid;
  min-width: 42px;
  height: 27px;
  place-items: center;
  color: #126f65;
  background: var(--teal-soft);
  border-radius: 999px;
  font-weight: 700;
}

.traffic-inline-bar {
  width: 100px;
  height: 7px;
  overflow: hidden;
  background: #edf2f4;
  border-radius: 999px;
}

.traffic-inline-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #2a9e92, #6f8fe4);
  border-radius: inherit;
}

.traffic-coaching-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: #efe4d5;
  border-color: #efe4d5;
}

.traffic-coaching-strip > div {
  background: #fffaf3;
}

.traffic-coaching-strip strong {
  color: #9a6322;
}

.traffic-detail-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  padding: 13px 17px;
  background: #f8fafb;
  border-bottom: 1px solid var(--line);
}

.traffic-search-field {
  display: grid;
  min-width: min(320px, 100%);
  gap: 5px;
}

.traffic-search-field span {
  color: var(--ink-soft);
  font-size: 10px;
}

.traffic-search-field input {
  min-height: 38px;
  padding: 0 11px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}

.traffic-detail-table {
  max-height: 680px;
  overflow: auto;
}

.traffic-detail-table .data-table th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.traffic-detail-table .data-table td:nth-child(9),
.traffic-detail-table .data-table td:nth-child(10),
.traffic-detail-table .data-table td:nth-child(15),
.traffic-detail-table .data-table td:nth-child(16) {
  white-space: normal;
}

@media (max-width: 760px) {
  .traffic-store-query-strip {
    align-items: stretch;
  }

  .traffic-store-query-field {
    flex-basis: 100%;
    max-width: none;
  }

  .traffic-store-select-field {
    flex-basis: 100%;
    max-width: none;
  }

  .traffic-month-select-field {
    flex-basis: 100%;
  }

  .traffic-store-query-submit {
    width: 100%;
  }

  .traffic-store-query-strip [data-traffic-store-clear] {
    width: 100%;
  }

  .traffic-store-query-result {
    margin-left: 0;
    min-height: 24px;
  }
}

.traffic-table-note {
  padding: 11px 17px;
  color: var(--ink-muted);
  background: #f8fafb;
  border-top: 1px solid var(--line);
  font-size: 10px;
}

.traffic-import-pending {
  display: flex;
  min-height: 140px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
  color: var(--ink-muted);
  background: #f8fafb;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
}

.traffic-import-progress {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  padding: 13px 15px;
  background: #f5faf9;
  border: 1px solid #cde6df;
  border-radius: 11px;
}

.traffic-import-progress[hidden] {
  display: none;
}

.traffic-import-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.traffic-import-progress-head strong {
  color: var(--ink);
  font-size: 12px;
}

.traffic-import-progress-head span {
  color: var(--teal);
  font-size: 13px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.traffic-import-progress-track {
  height: 8px;
  overflow: hidden;
  background: #dfece9;
  border-radius: 999px;
}

.traffic-import-progress-track i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #17a18f, #3972e6);
  border-radius: inherit;
  transition: width 180ms ease;
}

.traffic-import-progress small {
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.55;
}

.traffic-import-progress[data-state="success"] {
  background: var(--green-soft);
  border-color: #c8e8da;
}

.traffic-import-progress[data-state="error"] {
  background: var(--red-soft);
  border-color: #f0caca;
}

.traffic-import-progress[data-state="error"] .traffic-import-progress-track i {
  background: var(--red);
}

.traffic-import-pending > span {
  width: 24px;
  height: 24px;
  color: var(--teal);
}

.traffic-import-pending strong,
.traffic-import-pending small {
  display: block;
}

.traffic-import-pending strong {
  color: var(--ink);
  font-size: 13px;
}

.traffic-import-pending small {
  margin-top: 4px;
  font-size: 10px;
}

.traffic-import-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 14px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 11px;
}

.traffic-import-summary > div {
  display: grid;
  gap: 4px;
  padding: 13px 15px;
  background: #f8fafb;
}

.traffic-import-summary span,
.traffic-import-summary small {
  color: var(--ink-muted);
  font-size: 9px;
}

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

.traffic-import-candidates {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.traffic-import-candidates article {
  display: grid;
  grid-template-columns: minmax(170px, 1.2fr) 100px minmax(130px, 0.7fr) minmax(180px, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.traffic-import-candidates article.invalid {
  opacity: 0.62;
  background: #fafbfc;
}

.traffic-import-candidates article > div strong,
.traffic-import-candidates article > div span {
  display: block;
}

.traffic-import-candidates article > div strong {
  color: var(--ink);
  font-size: 18px;
}

.traffic-import-candidates article > div strong small {
  margin-left: 3px;
  color: var(--ink-muted);
  font-size: 9px;
}

.traffic-import-candidates article > div span {
  margin-top: 2px;
  color: var(--ink-muted);
  font-size: 9px;
}

.traffic-import-candidates article .form-field {
  min-width: 0;
}

.traffic-import-candidates article .form-field > span {
  font-size: 9px;
}

.traffic-import-candidates article .form-field select {
  min-height: 36px;
}

@media (max-width: 1280px) {
  .traffic-hero {
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  }

  .traffic-schema-fields {
    grid-template-columns: repeat(5, minmax(86px, 1fr));
  }
}

@media (max-width: 1100px) {
  .traffic-hero {
    grid-template-columns: 1fr;
  }

  .traffic-hero-kpis {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 0;
  }

  .traffic-schema-panel {
    grid-template-columns: 1fr;
  }

  .traffic-source-registry {
    grid-template-columns: 1fr;
  }

  .traffic-import-candidates article {
    grid-template-columns: minmax(160px, 1fr) 90px minmax(130px, 0.8fr) auto;
  }

  .traffic-import-candidates article .form-field:last-of-type {
    grid-column: 1 / 3;
  }

  .traffic-advisor-hero {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .traffic-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .traffic-report-grid {
    grid-template-columns: 1fr;
  }

  .traffic-insight-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .traffic-schema-fields {
    grid-template-columns: repeat(3, minmax(84px, 1fr));
  }
}

@media (max-width: 620px) {
  .traffic-hero-main {
    padding: 22px 19px;
  }

  .traffic-hero-kpis {
    padding: 13px;
  }

  .traffic-hero-kpis > div {
    padding: 13px;
  }

  .traffic-hero-kpis strong {
    font-size: 21px;
  }

  .traffic-tabs button {
    min-height: 64px;
    padding: 11px 12px;
  }

  .traffic-schema-panel {
    padding: 15px;
  }

  .traffic-source-registry {
    padding: 15px;
  }

  .traffic-schema-head {
    align-items: flex-start;
  }

  .traffic-schema-head > strong {
    min-width: 60px;
    height: 56px;
    font-size: 18px;
  }

  .traffic-schema-fields {
    grid-template-columns: repeat(2, minmax(100px, 1fr));
  }

  .traffic-advisor-hero,
  .traffic-insight-strip,
  .traffic-coaching-strip {
    grid-template-columns: 1fr;
  }

  .traffic-import-summary,
  .traffic-import-candidates article {
    grid-template-columns: 1fr;
  }

  .traffic-import-candidates article .form-field:last-of-type {
    grid-column: auto;
  }

  .traffic-ranking > div,
  .traffic-store-ranking > div {
    grid-template-columns: minmax(120px, 1fr) auto;
  }

  .traffic-ranking > div > div,
  .traffic-store-ranking > div > div {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .traffic-store-ranking > div > em {
    display: none;
  }

  .traffic-funnel > div {
    grid-template-columns: 20px minmax(0, 1fr) 64px;
  }
}
