:root {
  --ink: #162235;
  --muted: #66758a;
  --paper: #f7f9fc;
  --card: #ffffff;
  --line: #e1e8f0;
  --line-strong: #ccd8e5;
  --forest: #245f91;
  --forest-2: #286898;
  --forest-soft: #eaf2fa;
  --lime: #c3e7ff;
  --accent: #2f7fd4;
  --accent-soft: #eaf4ff;
  --danger: #b5443f;
  --shadow: 0 10px 30px rgba(28, 52, 84, 0.08);
  --shadow-soft: 0 4px 14px rgba(28, 52, 84, 0.06);
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(121, 177, 228, 0.1), transparent 22rem),
    linear-gradient(180deg, #ffffff 0%, var(--paper) 100%);
  font-family:
    Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC",
    sans-serif;
  font-size: 14px;
  line-height: 1.55;
}

button,
input,
select {
  letter-spacing: 0;
}

button,
.button,
.ghost-button,
.primary-link,
.small-button,
.page-button {
  border-radius: 9px;
  font-weight: 700;
}

.button,
.ghost-button,
.primary-link {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

.topbar {
  min-height: 62px;
  padding: 10px clamp(18px, 2.5vw, 36px);
  border-bottom-color: var(--line);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px);
}

.topbar .brand {
  gap: 9px;
  font-size: 15px;
  letter-spacing: -0.015em;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  font-size: 13px;
}

.top-actions {
  gap: 8px;
}

.user-chip {
  font-size: 12px;
}

.user-avatar {
  width: 27px;
  height: 27px;
  border-radius: 8px;
  font-size: 11px;
}

main {
  width: min(1440px, calc(100% - 32px));
  padding: 26px 0 56px;
}

h1,
.hero h1 {
  font-family: "Aptos Display", "Segoe UI", "PingFang SC", "Microsoft YaHei",
    sans-serif;
  font-size: clamp(34px, 4.2vw, 50px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

h2,
.panel-head h2,
.modal-title {
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.015em;
}

.eyebrow {
  margin-bottom: 9px;
  color: var(--forest-2);
  font-size: 11px;
  letter-spacing: 0.14em;
}

.hero {
  margin-bottom: 20px;
}

.hero p {
  margin-top: 11px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.panel,
.stat-card,
.summary-card,
.status-card {
  border-color: var(--line);
  border-radius: 15px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  backdrop-filter: none;
}

.stat-card {
  min-height: 132px;
  padding: 18px 19px;
}

.stat-card::after {
  top: -42px;
  right: -38px;
  width: 104px;
  height: 104px;
  background: rgba(105, 169, 230, 0.18);
}

.stat-card.accent {
  border-color: #bed8ef;
  background: #ffffff;
  color: var(--ink);
}

.stat-card.accent::after {
  background: rgba(96, 164, 226, 0.13);
}

.stat-card.accent .stat-label,
.stat-card.accent .stat-note {
  color: var(--muted);
}

.stat-card.accent .stat-value {
  color: var(--accent);
}

.stat-value {
  margin-top: 12px;
  font-family: "Segoe UI", "PingFang SC", sans-serif;
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.stat-label {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.035em;
}

.stat-note {
  margin-top: 8px;
  font-size: 11px;
}

.panel-head {
  padding: 17px 19px;
  border-bottom-color: var(--line);
}

.panel-subtitle {
  margin-top: 4px;
  font-size: 12px;
}

.panel-head p {
  font-size: 12px;
}

table {
  font-size: 13px;
}

th,
td {
  padding: 14px 16px;
  border-bottom-color: var(--line);
}

th {
  background: #f7f9fc;
  color: #6d7d8f;
  font-size: 11px;
  letter-spacing: 0.035em;
  text-transform: none;
}

tbody tr:hover {
  background: #f5f9ff;
}

.customer-cell strong,
.vehicle-cell strong {
  margin-bottom: 2px;
  font-size: 13px;
  font-weight: 750;
}

.muted {
  color: var(--muted);
  font-size: 11px;
}

.status,
.role,
.active {
  border-radius: 6px;
  font-size: 11px;
}

.search-input,
input,
select {
  height: 40px;
  border-color: var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}

label {
  font-size: 12px;
}

.hint {
  font-size: 11px;
}

.search-input:focus,
input:focus,
select:focus {
  border-color: rgba(47, 127, 212, 0.5);
  box-shadow: 0 0 0 3px rgba(47, 127, 212, 0.09);
}

.table-footer {
  padding: 13px 17px;
  font-size: 12px;
}

.page-button {
  height: 31px;
  min-width: 31px;
  font-size: 12px;
}

.workspace-tabs {
  top: 62px;
  gap: 0;
  margin-bottom: 17px;
  padding: 0;
  overflow-x: auto;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.workspace-tab {
  min-width: 116px;
  height: 41px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-bottom-color: transparent;
  border-radius: 0;
  background: #fff;
  color: #69798b;
  font-size: 13px;
  font-weight: 650;
}

.workspace-tab + .workspace-tab {
  border-left: 0;
}

.workspace-tab.active {
  position: relative;
  z-index: 1;
  border-color: #a9cfee;
  border-bottom-color: #fff;
  background: var(--accent-soft);
  color: var(--accent);
}

.tab-close {
  border-radius: 3px;
  font-size: 14px;
}

.lead-window-frame {
  border-color: var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
}

.recent-item {
  padding: 13px 18px;
}

.recent-customer strong {
  font-size: 14px;
}

.app-sidebar {
  width: 214px;
  padding: 21px 15px 15px;
  border-right: 1px solid var(--line);
  background: #ffffff;
  box-shadow: 6px 0 24px rgba(28, 52, 84, 0.06);
}

body.with-sidebar {
  padding-left: 214px;
}

.sidebar-brand {
  padding: 0 7px 20px;
  color: var(--ink);
  font-size: 13px;
}

.sidebar-mark {
  width: 33px;
  height: 33px;
  border-radius: 9px;
  background: #dceeff;
  color: #24649b;
  font-size: 12px;
}

.sidebar-label {
  padding-bottom: 8px;
  color: #8795a6;
  font-size: 10px;
}

.sidebar-nav {
  gap: 5px;
}

.sidebar-nav a {
  min-height: 41px;
  padding: 0 10px;
  border-radius: 9px;
  color: #5f7085;
  font-size: 12px;
}

.sidebar-nav a:hover {
  border-color: #dce7f2;
  background: #f4f8fc;
  color: var(--ink);
}

.sidebar-nav a.active {
  border-color: #c5dcf1;
  background: var(--accent-soft);
  color: var(--accent);
}

.nav-index {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #f2f6fa;
  color: #6d7e91;
  font-size: 8px;
}

.sidebar-nav a.active .nav-index {
  background: #d7eaff;
  color: #24649b;
}

.auth-page .shell,
.shell {
  border-radius: 20px;
}

.intro {
  border-right: 1px solid var(--line);
  background:
    radial-gradient(circle at 95% 86%, rgba(118, 176, 228, 0.16), transparent 19rem),
    linear-gradient(145deg, #ffffff 0%, #f0f7fe 100%);
  color: var(--ink);
}

.intro h1 {
  max-width: 430px;
  font-size: clamp(34px, 4vw, 42px);
  line-height: 1.16;
}

.intro::after {
  border-color: rgba(68, 135, 195, 0.16);
  box-shadow:
    0 0 0 46px rgba(68, 135, 195, 0.035),
    0 0 0 92px rgba(68, 135, 195, 0.025);
}

.intro-copy p {
  color: var(--muted);
}

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

.security-item {
  color: var(--muted);
}

.security-item::before {
  background: var(--accent);
}

.login-pane {
  background: #ffffff;
}

.login-pane {
  padding: 46px;
}

.login-pane h2 {
  font-size: 29px;
}

.hero-meta {
  font-size: 13px;
}

.summary-card span {
  font-size: 11px;
}

.summary-card strong {
  font-size: 16px;
}

.status-card span {
  font-size: 12px;
}

.status-card strong {
  font-size: 22px;
}

.content-grid .panel-head p {
  font-size: 12px;
}

.content-grid .field dt {
  font-size: 12px;
}

.content-grid .field dd {
  font-size: 15px;
}

.security-item,
.footnote {
  font-size: 12px;
}

.field input,
.create-panel input,
.create-panel select {
  font-size: 12px;
}

.lead-detail .summary-card strong,
.summary-card strong {
  font-size: 14px;
}

.lead-detail dd,
.field dd {
  font-size: 13px;
}

.toast,
.message {
  font-size: 12px;
}

@media (max-width: 1000px) and (min-width: 641px) {
  body.with-sidebar {
    padding-left: 214px;
  }
}

@media (max-width: 850px) {
  .toolbar {
    width: 100%;
  }

  .toolbar .search-input {
    width: auto;
    min-width: 0;
    flex: 1 1 auto;
  }

  .toolbar .ghost-button {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

@media (max-width: 1200px) {
  .lead-table th:nth-child(5),
  .lead-table td:nth-child(5),
  .lead-table th:nth-child(7),
  .lead-table td:nth-child(7) {
    display: none;
  }

  .lead-table th,
  .lead-table td {
    padding-right: 13px;
    padding-left: 13px;
  }
}

@media (max-width: 640px) {
  body.with-sidebar {
    padding-left: 0;
  }

  main {
    width: min(100% - 20px, 1440px);
    padding-top: 20px;
  }

  h1,
  .hero h1 {
    font-size: 32px;
  }
}
