:root {
  --ink: #182420;
  --ink-soft: #56615c;
  --forest: #173d32;
  --forest-light: #245847;
  --mint: #d8eadf;
  --mint-strong: #b8ddc8;
  --cream: #f4f0e6;
  --paper: #fbfaf6;
  --white: #ffffff;
  --coral: #e7785d;
  --coral-light: #f9e7e1;
  --blue: #4f7191;
  --blue-light: #e5eef4;
  --line: #e4e6e1;
  --line-dark: #d4d8d2;
  --success: #267a57;
  --danger: #b64c3e;
  --warning: #a35a25;
  --shadow-sm: 0 1px 2px rgba(25, 42, 35, 0.04), 0 6px 16px rgba(25, 42, 35, 0.04);
  --shadow-md: 0 18px 50px rgba(23, 61, 50, 0.11);
  --shadow-lg: 0 28px 80px rgba(23, 61, 50, 0.16);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --sidebar-width: 244px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.drawer-open,
body.dialog-open {
  overflow: hidden;
}

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

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

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
}

[hidden] {
  display: none !important;
}

.public-shell {
  min-height: 100vh;
  overflow: hidden;
}

.site-header {
  position: relative;
  z-index: 10;
  width: min(1180px, calc(100% - 56px));
  height: 88px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.brand-mark {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  color: var(--paper);
  background: var(--forest);
  border-radius: 12px 12px 12px 5px;
}

.brand-mark svg {
  width: 24px;
  height: 24px;
}

.brand > span:last-child {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand strong {
  font-size: 17px;
  letter-spacing: 0.03em;
}

.brand small {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 10px;
  letter-spacing: 0.15em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 27px;
  font-size: 14px;
}

.nav-link {
  position: relative;
  color: #46544e;
  transition: color 160ms ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--forest);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  right: 25%;
  bottom: -12px;
  left: 25%;
  height: 2px;
  background: var(--coral);
  border-radius: 99px;
}

.header-cta {
  padding: 11px 20px;
  color: var(--white);
  background: var(--forest);
  border-radius: 999px;
  transition: background 160ms ease, transform 160ms ease;
}

.header-cta:hover {
  background: var(--forest-light);
  transform: translateY(-1px);
}

.landing {
  position: relative;
  min-height: calc(100vh - 88px);
  background:
    radial-gradient(circle at 16% 20%, rgba(227, 236, 224, 0.9), transparent 31%),
    radial-gradient(circle at 91% 14%, rgba(246, 229, 219, 0.72), transparent 29%),
    linear-gradient(135deg, #f9f8f2 0%, #f5f2e9 50%, #f8f7f1 100%);
}

.landing::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background-image: radial-gradient(rgba(23, 61, 50, 0.2) 0.7px, transparent 0.7px);
  background-size: 18px 18px;
  mask-image: linear-gradient(to right, black, transparent 36%, transparent 70%, black);
}

.landing-container {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 56px));
  margin: 0 auto;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 510px;
  gap: 76px;
  align-items: center;
  padding: 58px 0 74px;
}

.hero-copy {
  padding-bottom: 12px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--forest);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow {
  padding: 7px 12px 7px 8px;
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid rgba(23, 61, 50, 0.1);
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  background: var(--coral);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(231, 120, 93, 0.13);
}

.hero-copy h1 {
  margin: 24px 0 20px;
  color: var(--forest);
  font-family: "STSong", "Songti SC", "SimSun", serif;
  font-size: clamp(44px, 5.1vw, 66px);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 1.16;
}

.hero-copy h1 em {
  position: relative;
  z-index: 0;
  color: var(--coral);
  font-style: normal;
}

.hero-copy h1 em::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: 0;
  bottom: 4px;
  left: 0;
  height: 10px;
  background: rgba(231, 120, 93, 0.12);
  border-radius: 50%;
  transform: rotate(-1.2deg);
}

.hero-lead {
  max-width: 520px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.85;
}

.feature-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 30px 0 38px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #38473f;
  font-size: 13px;
  font-weight: 600;
}

.feature-icon {
  display: grid;
  width: 29px;
  height: 29px;
  color: var(--forest);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(23, 61, 50, 0.1);
  border-radius: 50%;
  place-items: center;
}

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

.social-proof {
  display: flex;
  align-items: center;
  gap: 16px;
}

.avatar-stack {
  display: flex;
  padding-left: 7px;
}

.avatar-stack span {
  display: grid;
  width: 34px;
  height: 34px;
  margin-left: -7px;
  color: var(--white);
  background: var(--forest-light);
  border: 2px solid #f6f3e9;
  border-radius: 50%;
  font-family: "STSong", "Songti SC", serif;
  font-size: 12px;
  place-items: center;
}

.avatar-stack span:nth-child(2) {
  background: #8f6a55;
}

.avatar-stack span:nth-child(3) {
  background: var(--blue);
}

.avatar-stack span:nth-child(4) {
  color: var(--forest);
  background: var(--mint);
}

.social-proof p {
  margin: 0;
  color: #7b847f;
  font-size: 11px;
  line-height: 1.55;
}

.social-proof strong {
  color: #435149;
  font-size: 12px;
}

.lead-card-card {
  position: relative;
}

.lead-card-card::before {
  content: "";
  position: absolute;
  inset: 18px -14px -14px 18px;
  border: 1px solid rgba(23, 61, 50, 0.12);
  border-radius: 28px;
  transform: rotate(1.1deg);
}

.lead-form {
  position: relative;
  padding: 29px 31px 23px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(14px);
}

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

.step-label {
  display: inline-block;
  color: var(--coral);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.form-heading h2 {
  margin: 5px 0 3px;
  color: var(--forest);
  font-family: "STSong", "Songti SC", serif;
  font-size: 25px;
  line-height: 1.3;
}

.form-heading p {
  max-width: 360px;
  margin: 0;
  color: #7b847f;
  font-size: 12px;
}

.form-time {
  flex: none;
  padding: 4px 9px;
  color: #7b847f;
  background: #f6f5f0;
  border-radius: 7px;
  font-size: 10px;
}

.form-fields {
  display: grid;
  gap: 13px;
  padding-top: 19px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
}

.field > span,
.field > legend {
  padding: 0;
  color: #46534d;
  font-size: 12px;
  font-weight: 600;
}

.field b,
.consent-box b {
  color: var(--coral);
  font-weight: 600;
}

.field input,
.field select,
.field textarea,
.filter-bar select,
.search-box {
  width: 100%;
  color: var(--ink);
  background-color: #fbfbf8;
  border: 1px solid #dfe3de;
  border-radius: 9px;
  outline: none;
  transition: border 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field input,
.field select {
  height: 40px;
  padding: 0 11px;
}

.field select {
  padding-right: 30px;
  cursor: pointer;
}

.field textarea {
  min-height: 62px;
  padding: 9px 11px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #adb4af;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.filter-bar select:focus,
.search-box:focus-within {
  background-color: var(--white);
  border-color: var(--forest-light);
  box-shadow: 0 0 0 3px rgba(36, 88, 71, 0.09);
}

.field.invalid input,
.field.invalid select {
  border-color: var(--coral);
  background: #fffaf8;
}

.field-error {
  min-height: 0;
  color: var(--danger);
  font-size: 10px;
  line-height: 1.35;
}

.field-error:empty {
  display: none;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.choice {
  cursor: pointer;
}

.choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.choice span {
  display: grid;
  height: 36px;
  color: #606b65;
  background: #fbfbf8;
  border: 1px solid #dfe3de;
  border-radius: 8px;
  font-size: 11px;
  place-items: center;
  transition: all 160ms ease;
}

.choice input:checked + span {
  color: var(--forest);
  background: #edf5ef;
  border-color: #8cb9a2;
  box-shadow: inset 0 0 0 1px #8cb9a2;
  font-weight: 700;
}

.choice input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(36, 88, 71, 0.14);
}

.consent-box {
  display: grid;
  gap: 7px;
  padding: 12px;
  background: #f7f7f2;
  border-radius: 9px;
}

.checkline {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 8px;
  align-items: start;
  color: #59645e;
  cursor: pointer;
  font-size: 10px;
  line-height: 1.6;
}

.checkline input {
  width: 14px;
  height: 14px;
  margin: 1px 0 0;
  accent-color: var(--forest);
  cursor: pointer;
}

.checkline.optional {
  color: #858d88;
}

.text-button {
  display: inline;
  padding: 0;
  color: var(--forest);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(23, 61, 50, 0.35);
  text-underline-offset: 2px;
}

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

.text-button.strong {
  font-weight: 700;
  text-decoration: none;
}

.primary-submit {
  display: flex;
  height: 46px;
  align-items: center;
  justify-content: center;
  gap: 11px;
  color: var(--white);
  background: var(--forest);
  border: 0;
  border-radius: 9px;
  box-shadow: 0 9px 20px rgba(23, 61, 50, 0.18);
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.05em;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.primary-submit:hover {
  background: var(--forest-light);
  box-shadow: 0 12px 24px rgba(23, 61, 50, 0.22);
  transform: translateY(-1px);
}

.primary-submit:active {
  transform: translateY(0);
}

.primary-submit svg {
  width: 18px;
  height: 18px;
}

.form-footnote {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: -4px 0 0;
  color: #949b97;
  font-size: 9px;
}

.form-footnote svg {
  width: 13px;
  height: 13px;
}

.form-success {
  padding: 55px 8px 50px;
  text-align: center;
}

.success-check {
  display: grid;
  width: 76px;
  height: 76px;
  margin: 0 auto 22px;
  color: var(--white);
  background: var(--forest);
  border-radius: 50%;
  box-shadow: 0 0 0 10px var(--mint);
  place-items: center;
}

.success-check svg {
  width: 49px;
  height: 49px;
}

.form-success h2 {
  margin: 7px 0 6px;
  font-family: "STSong", "Songti SC", serif;
  font-size: 31px;
}

.form-success > p {
  margin: 0 auto;
  color: var(--ink-soft);
}

.success-reference {
  display: inline-flex;
  gap: 6px;
  margin: 20px 0 24px;
  padding: 9px 14px;
  color: #727c76;
  background: #f5f5ef;
  border-radius: 8px;
  font-size: 12px;
}

.success-reference strong {
  color: var(--forest);
  letter-spacing: 0.05em;
}

.success-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.landing-orb {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(1px);
}

.landing-orb-one {
  top: 8%;
  left: -130px;
  width: 330px;
  height: 330px;
  border: 1px solid rgba(23, 61, 50, 0.09);
}

.landing-orb-two {
  right: -100px;
  bottom: 110px;
  width: 240px;
  height: 240px;
  background: rgba(232, 218, 196, 0.2);
  border: 1px solid rgba(231, 120, 93, 0.08);
}

.process-section {
  position: relative;
  padding: 74px 0 84px;
  background: var(--white);
  border-top: 1px solid rgba(23, 61, 50, 0.08);
}

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

.section-intro h2 {
  margin: 7px 0 0;
  color: var(--forest);
  font-family: "STSong", "Songti SC", serif;
  font-size: 33px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.section-intro > p {
  max-width: 350px;
  margin: 0 0 5px;
  color: #7c8680;
  font-size: 13px;
  text-align: right;
}

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

.process-card {
  position: relative;
  overflow: hidden;
  min-height: 215px;
  padding: 26px;
  background: #f8f8f3;
  border: 1px solid #ecece5;
  border-radius: var(--radius-md);
}

.process-card:nth-child(2) {
  background: #f3f7f3;
}

.process-card:nth-child(3) {
  background: #fcf6f3;
}

.process-number {
  position: absolute;
  top: 18px;
  right: 23px;
  color: rgba(23, 61, 50, 0.17);
  font-family: Georgia, serif;
  font-size: 33px;
  font-style: italic;
}

.process-icon {
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: 21px;
  color: var(--forest);
  background: var(--white);
  border-radius: 13px;
  box-shadow: var(--shadow-sm);
  place-items: center;
}

.process-icon svg {
  width: 26px;
  height: 26px;
}

.process-card h3 {
  margin: 0 0 6px;
  color: var(--forest);
  font-family: "STSong", "Songti SC", serif;
  font-size: 21px;
}

.process-card p {
  max-width: 290px;
  margin: 0;
  color: #717b75;
  font-size: 13px;
}

.site-footer {
  background: var(--forest);
}

.footer-inner {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 11px;
}

.footer-inner p {
  margin: 0;
}

.footer-inner > div {
  display: flex;
  gap: 22px;
}

.footer-inner a,
.footer-inner .text-button {
  color: rgba(255, 255, 255, 0.76);
  text-decoration: none;
}

.footer-inner a:hover,
.footer-inner .text-button:hover {
  color: var(--white);
}

/* Admin */
.admin-shell {
  display: flex;
  min-height: 100vh;
  background: #f4f5f1;
}

.admin-sidebar {
  position: fixed;
  z-index: 30;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  width: var(--sidebar-width);
  padding: 25px 17px 20px;
  flex-direction: column;
  color: rgba(255, 255, 255, 0.8);
  background: var(--forest);
}

.admin-brand {
  padding: 0 9px 24px;
  color: var(--white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.admin-brand .brand-mark {
  color: var(--forest);
  background: #e1ecdf;
}

.admin-brand small {
  color: rgba(255, 255, 255, 0.49);
}

.admin-nav {
  display: flex;
  padding-top: 22px;
  flex-direction: column;
  gap: 4px;
}

.nav-caption {
  margin: 14px 11px 5px;
  color: rgba(255, 255, 255, 0.32);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.17em;
}

.admin-nav-link {
  display: flex;
  min-height: 42px;
  padding: 0 12px;
  align-items: center;
  gap: 11px;
  color: rgba(255, 255, 255, 0.66);
  border-radius: 9px;
  font-size: 13px;
  transition: color 160ms ease, background 160ms ease;
}

.admin-nav-link:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.06);
}

.admin-nav-link.active {
  color: var(--forest);
  background: #e8eee3;
  font-weight: 700;
}

.admin-nav-link svg {
  width: 19px;
  height: 19px;
}

.nav-count {
  min-width: 21px;
  height: 19px;
  margin-left: auto;
  padding: 0 6px;
  color: var(--forest);
  background: #dce8d9;
  border-radius: 999px;
  font-size: 9px;
  line-height: 19px;
  text-align: center;
}

.admin-nav-link:not(.active) .nav-count {
  color: rgba(255, 255, 255, 0.68);
  background: rgba(255, 255, 255, 0.11);
}

.nav-count.alert {
  color: var(--white);
  background: var(--coral);
}

.sidebar-bottom {
  display: grid;
  gap: 12px;
  margin-top: auto;
}

.compliance-card {
  display: flex;
  padding: 13px;
  gap: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

.compliance-icon {
  flex: none;
  color: #bed9c8;
}

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

.compliance-card strong {
  display: block;
  color: rgba(255, 255, 255, 0.87);
  font-size: 11px;
}

.compliance-card p {
  margin: 3px 0 0;
  color: rgba(255, 255, 255, 0.42);
  font-size: 9px;
  line-height: 1.55;
}

.back-to-site {
  display: flex;
  padding: 8px 11px;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
}

.back-to-site:hover {
  color: var(--white);
}

.back-to-site svg {
  width: 15px;
  height: 15px;
}

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

.admin-topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  height: 82px;
  padding: 0 34px;
  align-items: center;
  justify-content: space-between;
  background: rgba(250, 250, 247, 0.92);
  border-bottom: 1px solid #e7e9e3;
  backdrop-filter: blur(15px);
}

.topbar-left,
.topbar-actions {
  display: flex;
  align-items: center;
}

.topbar-left {
  gap: 12px;
}

.topbar-date {
  margin: 0 0 2px;
  color: #8b938e;
  font-size: 10px;
}

.admin-topbar h1 {
  margin: 0;
  color: var(--forest);
  font-family: "STSong", "Songti SC", serif;
  font-size: 22px;
  font-weight: 600;
}

.topbar-actions {
  gap: 9px;
}

.outline-button,
.primary-button,
.soft-button,
.danger-button {
  display: inline-flex;
  min-height: 36px;
  padding: 0 14px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: background 160ms ease, border 160ms ease, color 160ms ease, transform 160ms ease;
}

.outline-button {
  color: #3f4f47;
  background: var(--white);
  border: 1px solid #dce0da;
}

.outline-button:hover {
  border-color: #aeb8b1;
}

.primary-button {
  color: var(--white);
  background: var(--forest);
  border: 1px solid var(--forest);
}

.primary-button:hover {
  background: var(--forest-light);
  border-color: var(--forest-light);
}

.soft-button {
  color: var(--forest);
  background: #e9f0e8;
  border: 1px solid #dce7db;
}

.soft-button:hover {
  background: #dfeadd;
}

.danger-button {
  color: var(--danger);
  background: #fff7f5;
  border: 1px solid #efcec6;
}

.danger-button:hover {
  background: #fbeae6;
}

.outline-button svg,
.primary-button svg,
.soft-button svg,
.danger-button svg {
  width: 15px;
  height: 15px;
}

.avatar-button {
  display: grid;
  width: 34px;
  height: 34px;
  margin-left: 3px;
  color: var(--forest);
  background: var(--cream);
  border: 1px solid #e0d8c7;
  border-radius: 50%;
  cursor: pointer;
  font-family: "STSong", "Songti SC", serif;
  font-size: 13px;
  place-items: center;
}

.logout-button {
  width: 32px;
  height: 32px;
  margin-left: 2px;
}

.logout-button:hover {
  color: var(--danger);
  background: #fff1ed;
}

.icon-button {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  color: #66716b;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  place-items: center;
}

.icon-button:hover {
  background: #eff1ec;
}

.icon-button svg {
  width: 20px;
  height: 20px;
}

.mobile-menu-button {
  display: none;
}

.admin-content {
  width: min(1410px, 100%);
  margin: 0 auto;
  padding: 28px 34px 56px;
}

.admin-view {
  animation: view-enter 250ms ease both;
}

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

.welcome-row,
.view-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.welcome-row {
  margin: 4px 0 23px;
}

.welcome-row h2,
.view-heading h2 {
  margin: 0;
  color: var(--forest);
  font-family: "STSong", "Songti SC", serif;
  font-size: 25px;
  font-weight: 600;
}

.welcome-row p,
.view-heading p {
  margin: 4px 0 0;
  color: #818984;
  font-size: 12px;
}

.view-heading {
  margin: 3px 0 22px;
}

.heading-actions {
  display: flex;
  gap: 8px;
}

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

.stat-card {
  min-width: 0;
  padding: 19px;
  background: var(--white);
  border: 1px solid #e7e9e3;
  border-radius: 13px;
  box-shadow: 0 1px 2px rgba(23, 61, 50, 0.02);
}

.stat-card.emphasis {
  background: #fffdf8;
  border-color: #e9e0cd;
}

.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}

.stat-icon {
  display: grid;
  width: 33px;
  height: 33px;
  border-radius: 9px;
  place-items: center;
}

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

.stat-icon.mint {
  color: #336f58;
  background: #e5f1e9;
}

.stat-icon.coral {
  color: #b55d48;
  background: var(--coral-light);
}

.stat-icon.cream {
  color: #8b6b30;
  background: #f4ecda;
}

.stat-icon.blue {
  color: #52718d;
  background: var(--blue-light);
}

.stat-trend {
  padding: 2px 7px;
  color: #71817a;
  background: #f2f4f0;
  border-radius: 999px;
  font-size: 9px;
}

.stat-trend.positive {
  color: var(--success);
  background: #edf7f1;
}

.stat-trend.warning {
  color: var(--warning);
  background: #fff4e7;
}

.stat-label {
  margin: 0;
  color: #78817c;
  font-size: 11px;
}

.stat-value {
  display: block;
  margin: 2px 0 1px;
  color: var(--forest);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 31px;
  font-weight: 500;
  line-height: 1.2;
}

.stat-note {
  overflow: hidden;
  margin: 0;
  color: #a0a6a2;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.panel {
  background: var(--white);
  border: 1px solid #e7e9e3;
  border-radius: 13px;
  box-shadow: 0 1px 2px rgba(23, 61, 50, 0.02);
}

.source-panel,
.funnel-panel {
  min-height: 265px;
  padding: 20px;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.panel-header h3 {
  margin: 0;
  color: #2b3c34;
  font-size: 14px;
  font-weight: 700;
}

.panel-header p {
  margin: 3px 0 0;
  color: #9aa19c;
  font-size: 11px;
}

.panel-tag {
  padding: 3px 8px;
  color: #7d8781;
  background: #f5f6f2;
  border-radius: 6px;
  font-size: 9px;
}

.panel-link {
  color: var(--forest);
  font-size: 10px;
  font-weight: 700;
}

.panel-link:hover {
  text-decoration: underline;
}

.source-chart-wrap {
  display: flex;
  min-height: 174px;
  padding-top: 18px;
  align-items: center;
  justify-content: center;
  gap: 40px;
}

.donut-chart {
  position: relative;
  display: grid;
  width: 136px;
  height: 136px;
  flex: none;
  background: var(--segments);
  border-radius: 50%;
  place-items: center;
}

.donut-chart::after {
  content: "";
  position: absolute;
  width: 86px;
  height: 86px;
  background: var(--white);
  border-radius: 50%;
}

.donut-chart > div {
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.donut-chart strong {
  color: var(--forest);
  font-family: Georgia, serif;
  font-size: 25px;
  font-weight: 500;
  line-height: 1.2;
}

.donut-chart span {
  color: #949c97;
  font-size: 9px;
}

.legend-list {
  display: grid;
  min-width: 145px;
  gap: 10px;
}

.legend-item {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  gap: 8px;
  align-items: center;
  color: #69736e;
  font-size: 10px;
}

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

.legend-item strong {
  color: #36453e;
  font-size: 11px;
}

.empty-inline {
  color: #9ca39f;
  font-size: 11px;
  text-align: center;
}

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

.funnel-row {
  display: grid;
  grid-template-columns: 56px minmax(50px, 1fr) 25px;
  align-items: center;
  gap: 10px;
  color: #67716c;
  font-size: 11px;
}

.funnel-track {
  overflow: hidden;
  height: 8px;
  background: #f1f3ef;
  border-radius: 99px;
}

.funnel-bar {
  height: 100%;
  min-width: 0;
  background: var(--bar-color);
  border-radius: 99px;
  transition: width 400ms ease;
}

.funnel-row strong {
  color: #34443c;
  font-family: Georgia, serif;
  font-size: 13px;
  font-weight: 500;
  text-align: right;
}

.recent-panel {
  margin-top: 14px;
  padding: 20px 20px 7px;
}

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

.recent-panel .table-scroll {
  margin-top: 11px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.data-table th {
  padding: 10px 12px;
  color: #9aa19d;
  border-bottom: 1px solid #eceee9;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-align: left;
  white-space: nowrap;
}

.data-table td {
  padding: 12px;
  color: #4f5b55;
  border-bottom: 1px solid #f0f1ed;
  font-size: 11px;
  vertical-align: middle;
}

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

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

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

.data-table tbody tr.clickable-row:hover {
  background: #fafbf8;
}

.customer-cell {
  display: flex;
  min-width: 116px;
  align-items: center;
  gap: 9px;
}

.customer-avatar {
  display: grid;
  width: 31px;
  height: 31px;
  flex: none;
  color: #3f6758;
  background: #e7efe8;
  border-radius: 9px;
  font-family: "STSong", "Songti SC", serif;
  font-size: 12px;
  place-items: center;
}

.customer-avatar.tone-2 {
  color: #8e5a4a;
  background: #f7e9e4;
}

.customer-avatar.tone-3 {
  color: #4c6c86;
  background: #e8eff4;
}

.customer-avatar.tone-4 {
  color: #7b6b38;
  background: #f6efdd;
}

.customer-cell strong {
  display: block;
  color: #2c3b34;
  font-size: 12px;
}

.customer-cell small {
  display: block;
  color: #9ba29e;
  font-size: 10px;
}

.needs-cell {
  min-width: 147px;
}

.needs-cell strong {
  display: block;
  color: #43514a;
  font-size: 11px;
  font-weight: 600;
}

.needs-cell small {
  color: #9da49f;
  font-size: 10px;
}

.source-pill,
.stage-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border-radius: 5px;
  font-size: 10px;
  white-space: nowrap;
}

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

.source-pill.xhs {
  color: #b8493e;
  background: #fbeceb;
}

.source-pill.douyin {
  color: #42525a;
  background: #edf1f2;
}

.source-pill.channels {
  color: #34735b;
  background: #eaf4ee;
}

.source-pill.referral {
  color: #80672b;
  background: #f8f1df;
}

.source-pill.other {
  color: #707972;
  background: #f1f2ef;
}

.stage-pill {
  padding: 4px 8px;
  border: 1px solid transparent;
  font-weight: 600;
}

.stage-pill.new {
  color: #b25541;
  background: #fff1ed;
  border-color: #f5d8d0;
}

.stage-pill.contacted {
  color: #536f8a;
  background: #eef3f8;
  border-color: #dce7f0;
}

.stage-pill.visited {
  color: #75662a;
  background: #fbf5df;
  border-color: #eee3bf;
}

.stage-pill.proposal {
  color: #6b5a90;
  background: #f3eff9;
  border-color: #e5dcf3;
}

.stage-pill.won {
  color: #2f7557;
  background: #e9f6ef;
  border-color: #d1eadc;
}

.stage-pill.lost {
  color: #7c8580;
  background: #f1f2f0;
  border-color: #e4e6e2;
}

.row-action {
  display: grid;
  width: 28px;
  height: 28px;
  color: #7b847f;
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  place-items: center;
}

.row-action:hover {
  color: var(--forest);
  background: #f0f3ed;
}

.row-action svg {
  width: 16px;
  height: 16px;
}

.empty-table-cell {
  padding: 38px 20px !important;
  text-align: center;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.empty-state-icon {
  display: grid;
  width: 47px;
  height: 47px;
  margin-bottom: 10px;
  color: #70877c;
  background: #edf2ec;
  border-radius: 14px;
  place-items: center;
}

.empty-state-icon svg {
  width: 24px;
  height: 24px;
}

.empty-state strong {
  color: #48574f;
  font-size: 12px;
}

.empty-state p {
  margin: 3px 0 12px;
  color: #9ca39f;
  font-size: 10px;
}

/* Leads page */
.filter-bar {
  display: flex;
  margin-bottom: 13px;
  gap: 8px;
}

.search-box {
  display: flex;
  max-width: 330px;
  height: 37px;
  padding: 0 11px;
  flex: 1;
  align-items: center;
  gap: 7px;
}

.search-box svg {
  width: 16px;
  height: 16px;
  flex: none;
  color: #98a19c;
}

.search-box input {
  width: 100%;
  height: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  outline: none;
  font-size: 11px;
}

.filter-bar > select {
  width: 123px;
  height: 37px;
  padding: 0 28px 0 10px;
  font-size: 10px;
  cursor: pointer;
}

.filter-bar > select:last-child {
  margin-left: auto;
}

.active-filters {
  display: flex;
  margin-bottom: 12px;
  align-items: center;
  gap: 7px;
  color: #8a938e;
  font-size: 10px;
}

.filter-chip {
  padding: 3px 9px;
  color: var(--forest);
  background: #e8f0e7;
  border-radius: 999px;
}

.leads-table-panel {
  padding: 5px 18px 0;
}

.leads-table {
  min-width: 900px;
}

.leads-table th {
  padding-top: 14px;
  padding-bottom: 14px;
}

.leads-table td {
  padding-top: 13px;
  padding-bottom: 13px;
}

.followup-date {
  color: #626e68;
  font-size: 10px;
  white-space: nowrap;
}

.followup-date.overdue {
  color: var(--danger);
  font-weight: 700;
}

.followup-date.today {
  color: var(--warning);
  font-weight: 700;
}

.followup-date.none {
  color: #a5aca8;
}

.owner-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.owner-dot {
  display: grid;
  width: 22px;
  height: 22px;
  color: #52705f;
  background: #edf3ec;
  border-radius: 50%;
  font-size: 8px;
  place-items: center;
}

.table-footer {
  display: flex;
  min-height: 53px;
  align-items: center;
  justify-content: space-between;
  color: #949c97;
  font-size: 10px;
}

.table-footer p {
  margin: 0;
}

.pagination {
  display: flex;
  gap: 4px;
}

.page-button {
  display: grid;
  min-width: 27px;
  height: 27px;
  padding: 0 7px;
  color: #6d7771;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-size: 10px;
  place-items: center;
}

.page-button:hover {
  background: #f3f5f1;
}

.page-button.active {
  color: var(--white);
  background: var(--forest);
}

.page-button:disabled {
  color: #c5cac7;
  cursor: default;
}

/* Followups */
.followup-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

.mini-stat {
  position: relative;
  overflow: hidden;
  padding: 16px 18px;
  background: var(--white);
  border: 1px solid #e7e9e3;
  border-radius: 12px;
}

.mini-stat::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: var(--accent);
}

.mini-stat.overdue { --accent: var(--coral); }
.mini-stat.today { --accent: #cf9b47; }
.mini-stat.upcoming { --accent: #769784; }
.mini-stat.unscheduled { --accent: #9da6a0; }

.mini-stat span {
  color: #77817b;
  font-size: 10px;
}

.mini-stat strong {
  display: block;
  margin: 3px 0 1px;
  color: var(--forest);
  font-family: Georgia, serif;
  font-size: 26px;
  font-weight: 500;
}

.mini-stat small {
  color: #a3aaa6;
  font-size: 9px;
}

.followup-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 285px;
  gap: 14px;
}

.followup-panel {
  min-height: 430px;
  padding: 20px;
}

.followup-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.followup-item {
  display: grid;
  grid-template-columns: 44px minmax(120px, 1fr) minmax(180px, 1.4fr) auto;
  gap: 13px;
  align-items: center;
  padding: 12px;
  background: #fafbf8;
  border: 1px solid #edf0ea;
  border-radius: 10px;
  cursor: pointer;
  transition: border 160ms ease, background 160ms ease;
}

.followup-item:hover {
  background: var(--white);
  border-color: #ced9d0;
}

.followup-day {
  display: flex;
  width: 42px;
  height: 42px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #7c8781;
  background: var(--white);
  border: 1px solid #e4e8e2;
  border-radius: 9px;
  line-height: 1.15;
}

.followup-day strong {
  color: var(--forest);
  font-family: Georgia, serif;
  font-size: 16px;
  font-weight: 500;
}

.followup-day span {
  font-size: 8px;
}

.followup-item.overdue .followup-day {
  color: var(--danger);
  background: #fff5f2;
  border-color: #f1d8d1;
}

.followup-item.overdue .followup-day strong {
  color: var(--danger);
}

.followup-main strong {
  display: block;
  color: #35443c;
  font-size: 11px;
}

.followup-main small {
  display: block;
  color: #99a09c;
  font-size: 9px;
}

.followup-need {
  color: #75807a;
  font-size: 10px;
}

.followup-need small {
  display: block;
  color: #a1a8a4;
  font-size: 9px;
}

.followup-tip {
  align-self: start;
  padding: 24px;
  background: #fbfaf6;
  border-color: #eae5d9;
}

.tip-icon {
  display: grid;
  width: 46px;
  height: 46px;
  color: #826b39;
  background: #f3ead5;
  border-radius: 13px;
  place-items: center;
}

.tip-icon svg {
  width: 27px;
  height: 27px;
}

.followup-tip h3 {
  margin: 17px 0 6px;
  color: var(--forest);
  font-family: "STSong", "Songti SC", serif;
  font-size: 19px;
}

.followup-tip > p {
  margin: 0;
  color: #7b837e;
  font-size: 10px;
  line-height: 1.75;
}

.followup-tip ol {
  margin: 16px 0 20px;
  padding-left: 18px;
  color: #69736d;
  font-size: 10px;
}

.followup-tip li {
  margin-bottom: 6px;
}

.followup-tip .soft-button {
  width: 100%;
}

/* Data page */
.data-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
}

.data-card {
  padding: 22px;
}

.data-card-icon {
  display: grid;
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  border-radius: 11px;
  place-items: center;
}

.data-card-icon svg {
  width: 21px;
  height: 21px;
}

.data-card-icon.mint {
  color: #356b55;
  background: #e6f1e9;
}

.data-card-icon.blue {
  color: #4e6f8a;
  background: #e7eff5;
}

.data-card-icon.coral {
  color: #a85a45;
  background: #f8e9e4;
}

.data-card-icon.cream {
  color: #846b37;
  background: #f2e9d6;
}

.data-card h3,
.security-note h3,
.danger-zone h3 {
  margin: 0;
  color: #324239;
  font-size: 13px;
}

.data-card > p {
  min-height: 49px;
  margin: 6px 0 16px;
  color: #888f8b;
  font-size: 10px;
  line-height: 1.7;
}

.data-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.import-preview {
  margin-top: 13px;
  padding: 10px;
  background: #f7f9f5;
  border: 1px solid #e6eee5;
  border-radius: 8px;
  color: #6d7871;
  font-size: 9px;
}

.import-preview strong {
  color: var(--forest);
}

.import-preview .data-actions {
  margin-top: 8px;
}

.import-preview .primary-button,
.import-preview .outline-button {
  min-height: 28px;
  padding: 0 9px;
  font-size: 9px;
}

.security-note {
  margin-top: 13px;
  padding: 22px;
  background: #fffdf8;
  border-color: #e9e3d5;
}

.security-note-heading {
  display: flex;
  gap: 13px;
}

.security-note-heading .data-card-icon {
  flex: none;
  margin: 0;
}

.security-note-heading p {
  margin: 4px 0 0;
  color: #858c87;
  font-size: 10px;
}

.security-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
  padding-top: 17px;
  border-top: 1px solid #eee9df;
}

.security-grid div {
  display: flex;
  flex-direction: column;
}

.security-grid strong {
  color: #4b5b52;
  font-size: 10px;
}

.security-grid span {
  margin-top: 3px;
  color: #969d98;
  font-size: 9px;
}

.danger-zone {
  display: flex;
  margin-top: 13px;
  padding: 18px 22px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.danger-zone p {
  margin: 3px 0 0;
  color: #9aa19c;
  font-size: 9px;
}

/* Drawer */
.auth-overlay {
  position: fixed;
  z-index: 75;
  inset: 0;
  display: grid;
  overflow-y: auto;
  padding: 26px;
  background:
    radial-gradient(circle at 16% 18%, rgba(182, 216, 196, 0.32), transparent 30%),
    radial-gradient(circle at 86% 82%, rgba(244, 217, 203, 0.42), transparent 31%),
    #f5f5ef;
  place-items: center;
}

.auth-panel {
  position: relative;
  width: min(420px, 100%);
  padding: 26px 29px 22px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 22px;
  box-shadow: 0 28px 90px rgba(23, 61, 50, 0.18);
  backdrop-filter: blur(14px);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-brand > span:last-child {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.auth-brand strong {
  color: var(--forest);
  font-size: 15px;
}

.auth-brand small {
  margin-top: 3px;
  color: #9aa19c;
  font-size: 9px;
  letter-spacing: 0.12em;
}

.auth-lock {
  display: grid;
  width: 60px;
  height: 60px;
  margin: 29px 0 16px;
  color: var(--forest);
  background: #e9f1e8;
  border-radius: 18px;
  place-items: center;
}

.auth-lock svg {
  width: 31px;
  height: 31px;
}

.auth-kicker {
  color: var(--coral);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.auth-panel h2 {
  margin: 3px 0 5px;
  color: var(--forest);
  font-family: "STSong", "Songti SC", serif;
  font-size: 27px;
  font-weight: 600;
}

.auth-panel > p {
  margin: 0 0 21px;
  color: #7d8681;
  font-size: 11px;
  line-height: 1.7;
}

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

.auth-field {
  display: grid;
  gap: 5px;
}

.auth-field span {
  color: #56625b;
  font-size: 11px;
  font-weight: 600;
}

.auth-field small {
  color: #9aa19c;
  font-size: 9px;
  line-height: 1.55;
}

.auth-field input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  color: var(--ink);
  background: #fafbf8;
  border: 1px solid #dde2dc;
  border-radius: 9px;
  outline: none;
  transition: border 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.auth-field input:focus {
  background: var(--white);
  border-color: var(--forest-light);
  box-shadow: 0 0 0 3px rgba(36, 88, 71, 0.1);
}

.auth-error {
  min-height: 17px;
  margin: 0;
  color: var(--danger);
  font-size: 10px;
}

.auth-submit {
  display: flex;
  height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--white);
  background: var(--forest);
  border: 0;
  border-radius: 9px;
  box-shadow: 0 9px 22px rgba(23, 61, 50, 0.17);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.auth-submit:hover {
  background: var(--forest-light);
}

.auth-submit:disabled {
  cursor: wait;
  opacity: 0.65;
}

.auth-submit svg {
  width: 17px;
  height: 17px;
}

.auth-foot {
  display: flex;
  margin-top: 20px;
  padding-top: 14px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #929994;
  border-top: 1px solid #eceee9;
  font-size: 9px;
}

.auth-foot a {
  color: var(--forest);
  font-weight: 600;
}

.connection-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.connection-indicator i {
  width: 6px;
  height: 6px;
  background: #c2a055;
  border-radius: 50%;
}

.connection-indicator.online i {
  background: #4a9a72;
  box-shadow: 0 0 0 3px rgba(74, 154, 114, 0.12);
}

.connection-indicator.offline i {
  background: var(--coral);
}

.drawer-backdrop,
.confirm-backdrop {
  position: fixed;
  z-index: 80;
  inset: 0;
  background: rgba(18, 32, 26, 0.34);
  backdrop-filter: blur(2px);
  animation: fade-in 160ms ease;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lead-drawer {
  position: fixed;
  z-index: 90;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  width: min(510px, 100%);
  flex-direction: column;
  background: var(--white);
  box-shadow: -20px 0 60px rgba(18, 36, 28, 0.18);
  animation: drawer-in 220ms ease;
}

@keyframes drawer-in {
  from { transform: translateX(30px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.drawer-header {
  display: flex;
  padding: 25px 26px 20px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.drawer-kicker {
  color: var(--coral);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.drawer-header h2 {
  margin: 3px 0 1px;
  color: var(--forest);
  font-family: "STSong", "Songti SC", serif;
  font-size: 25px;
  font-weight: 600;
}

.drawer-header p {
  margin: 0;
  color: #8b938e;
  font-size: 10px;
}

.drawer-body {
  overflow-y: auto;
  padding: 21px 26px 30px;
}

.drawer-contact-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-bottom: 20px;
}

.contact-action {
  display: flex;
  padding: 11px 12px;
  align-items: center;
  gap: 9px;
  background: #f8f9f5;
  border: 1px solid #eaede7;
  border-radius: 9px;
}

.contact-action-icon {
  display: grid;
  width: 30px;
  height: 30px;
  flex: none;
  color: #426d59;
  background: #e7f0e8;
  border-radius: 8px;
  place-items: center;
}

.contact-action-icon svg {
  width: 16px;
  height: 16px;
}

.contact-action small {
  display: block;
  color: #9ba29e;
  font-size: 8px;
}

.contact-action strong {
  display: block;
  overflow: hidden;
  max-width: 130px;
  color: #33443b;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-section {
  padding: 18px 0;
  border-top: 1px solid #eef0eb;
}

.drawer-section:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.drawer-section-title {
  display: flex;
  margin-bottom: 12px;
  align-items: center;
  justify-content: space-between;
}

.drawer-section-title h3 {
  margin: 0;
  color: #3d4d44;
  font-size: 12px;
}

.drawer-section-title span {
  color: #9aa19d;
  font-size: 9px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}

.detail-item {
  padding: 9px 10px;
  background: #fafbf8;
  border-radius: 7px;
}

.detail-item span {
  display: block;
  color: #9da49f;
  font-size: 8px;
}

.detail-item strong {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: #4c5b53;
  font-size: 10px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.drawer-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.drawer-field.full {
  grid-column: 1 / -1;
}

.drawer-field span {
  color: #7f8883;
  font-size: 9px;
}

.drawer-field select,
.drawer-field input,
.drawer-field textarea {
  width: 100%;
  min-height: 36px;
  padding: 7px 9px;
  color: #35443c;
  background: #fbfcf9;
  border: 1px solid #dfe4de;
  border-radius: 7px;
  outline: none;
  font-size: 10px;
}

.drawer-field textarea {
  min-height: 72px;
  resize: vertical;
}

.drawer-field select:focus,
.drawer-field input:focus,
.drawer-field textarea:focus {
  background: var(--white);
  border-color: #87ac97;
  box-shadow: 0 0 0 3px rgba(36, 88, 71, 0.08);
}

.drawer-save-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.note-composer {
  display: flex;
  gap: 7px;
}

.note-composer input {
  min-width: 0;
  height: 37px;
  padding: 0 10px;
  flex: 1;
  background: #fafbf8;
  border: 1px solid #dfe4de;
  border-radius: 7px;
  outline: none;
  font-size: 10px;
}

.note-composer input:focus {
  background: var(--white);
  border-color: #87ac97;
}

.activity-list {
  position: relative;
  display: grid;
  gap: 0;
  padding-top: 2px;
}

.activity-item {
  position: relative;
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  padding-bottom: 15px;
}

.activity-item:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 0;
  left: 10px;
  width: 1px;
  background: #e6eae4;
}

.activity-dot {
  position: relative;
  z-index: 1;
  display: grid;
  width: 21px;
  height: 21px;
  color: #6e8b7c;
  background: #edf3ed;
  border: 2px solid var(--white);
  border-radius: 50%;
  place-items: center;
}

.activity-dot svg {
  width: 10px;
  height: 10px;
}

.activity-item strong {
  display: block;
  color: #4b5a52;
  font-size: 10px;
  font-weight: 600;
}

.activity-item p {
  margin: 1px 0 2px;
  color: #7d8680;
  font-size: 9px;
  line-height: 1.55;
}

.activity-item time {
  color: #a3aaa6;
  font-size: 8px;
}

.drawer-consent {
  padding: 11px 12px;
  color: #7b847f;
  background: #f7f8f4;
  border-radius: 8px;
  font-size: 9px;
  line-height: 1.6;
}

.drawer-consent strong {
  color: #59675f;
}

/* Privacy and dialogs */
.privacy-dialog {
  width: min(610px, calc(100% - 30px));
  max-height: calc(100vh - 44px);
  padding: 0;
  color: var(--ink);
  background: var(--paper);
  border: 0;
  border-radius: 18px;
  box-shadow: 0 30px 90px rgba(17, 35, 27, 0.28);
}

.privacy-dialog::backdrop {
  background: rgba(18, 32, 26, 0.45);
  backdrop-filter: blur(3px);
}

.dialog-heading {
  display: flex;
  padding: 22px 25px 17px;
  align-items: flex-start;
  justify-content: space-between;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.dialog-heading h2 {
  margin: 3px 0 0;
  color: var(--forest);
  font-family: "STSong", "Songti SC", serif;
  font-size: 24px;
  font-weight: 600;
}

.privacy-content {
  overflow-y: auto;
  max-height: calc(100vh - 220px);
  padding: 22px 25px;
}

.privacy-intro {
  margin-top: 0;
  padding: 11px 13px;
  color: #6a756f;
  background: #f3f5ef;
  border-radius: 8px;
  font-size: 10px;
}

.privacy-content h3 {
  margin: 17px 0 5px;
  color: #3c4d43;
  font-size: 12px;
}

.privacy-content p {
  margin: 0;
  color: #727c76;
  font-size: 10px;
  line-height: 1.8;
}

.dialog-footer {
  display: flex;
  padding: 13px 25px;
  justify-content: flex-end;
  background: var(--white);
  border-top: 1px solid var(--line);
}

.confirm-backdrop {
  z-index: 120;
  display: grid;
  padding: 20px;
  place-items: center;
}

.confirm-dialog {
  width: min(390px, 100%);
  padding: 24px;
  background: var(--white);
  border-radius: 15px;
  box-shadow: var(--shadow-lg);
}

.confirm-dialog h3 {
  margin: 0;
  color: var(--forest);
  font-family: "STSong", "Songti SC", serif;
  font-size: 20px;
}

.confirm-dialog p {
  margin: 8px 0 22px;
  color: #747e78;
  font-size: 11px;
}

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

.toast-region {
  position: fixed;
  z-index: 200;
  right: 22px;
  bottom: 22px;
  display: flex;
  width: min(340px, calc(100% - 34px));
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  padding: 12px 14px;
  align-items: flex-start;
  gap: 9px;
  color: #f8faf7;
  background: #234438;
  border-radius: 9px;
  box-shadow: 0 12px 30px rgba(17, 35, 27, 0.22);
  font-size: 11px;
  animation: toast-in 220ms ease both;
}

.toast.error {
  background: #8e4036;
}

.toast.warning {
  background: #7e632e;
}

.toast svg {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 1px;
}

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

.sidebar-overlay {
  display: none;
}

@media (max-width: 1120px) {
  .hero-layout {
    grid-template-columns: minmax(0, 0.9fr) 470px;
    gap: 42px;
  }

  .hero-copy h1 {
    font-size: 49px;
  }

  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .data-card:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 940px) {
  .site-header {
    width: min(100% - 36px, 760px);
  }

  .site-nav {
    gap: 17px;
  }

  .hero-layout {
    grid-template-columns: 1fr;
    padding-top: 36px;
  }

  .hero-copy {
    max-width: 650px;
  }

  .hero-copy h1 {
    font-size: clamp(42px, 8vw, 60px);
  }

  .lead-card-card {
    width: min(100%, 600px);
    margin: 0 auto;
  }

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

  .process-card:last-child {
    grid-column: 1 / -1;
  }

  .admin-sidebar {
    transform: translateX(-100%);
    transition: transform 220ms ease;
  }

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

  .sidebar-overlay {
    position: fixed;
    z-index: 25;
    inset: 0;
    display: block;
    background: rgba(17, 32, 26, 0.34);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
  }

  .sidebar-overlay.open {
    opacity: 1;
    pointer-events: auto;
  }

  .admin-main {
    width: 100%;
    margin-left: 0;
  }

  .mobile-menu-button {
    display: grid;
  }

  .followup-layout {
    grid-template-columns: 1fr;
  }

  .followup-tip {
    display: none;
  }
}

@media (max-width: 700px) {
  body {
    font-size: 13px;
  }

  .site-header {
    width: calc(100% - 28px);
    height: 72px;
  }

  .brand-mark {
    width: 35px;
    height: 35px;
    border-radius: 10px 10px 10px 4px;
  }

  .brand strong {
    font-size: 15px;
  }

  .site-nav .nav-link {
    display: none;
  }

  .site-nav .nav-link.active {
    display: block;
  }

  .site-nav {
    gap: 12px;
    font-size: 12px;
  }

  .header-cta {
    padding: 9px 13px;
  }

  .landing-container {
    width: calc(100% - 28px);
  }

  .hero-layout {
    padding: 31px 0 55px;
  }

  .hero-copy h1 {
    margin-top: 18px;
    font-size: 42px;
  }

  .hero-lead {
    font-size: 14px;
  }

  .feature-row {
    gap: 12px;
    margin: 24px 0 28px;
  }

  .feature-item {
    font-size: 11px;
  }

  .social-proof {
    margin-bottom: 12px;
  }

  .lead-form {
    padding: 22px 18px 19px;
    border-radius: 18px;
  }

  .lead-card-card::before {
    inset: 12px -7px -9px 12px;
  }

  .form-heading h2 {
    font-size: 23px;
  }

  .form-time {
    display: none;
  }

  .field-row {
    grid-template-columns: 1fr;
    gap: 11px;
  }

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

  .choice span {
    height: 38px;
  }

  .process-section {
    padding: 53px 0;
  }

  .section-intro {
    display: block;
  }

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

  .section-intro > p {
    margin-top: 10px;
    text-align: left;
  }

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

  .process-card:last-child {
    grid-column: auto;
  }

  .footer-inner {
    padding: 19px 0;
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-topbar {
    height: 70px;
    padding: 0 16px;
  }

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

  .desktop-only {
    display: none !important;
  }

  .logout-button {
    margin-left: 0;
  }

  .admin-content {
    padding: 20px 14px 42px;
  }

  .welcome-row,
  .view-heading {
    display: block;
  }

  .welcome-row h2,
  .view-heading h2 {
    font-size: 23px;
  }

  .welcome-row .soft-button,
  .view-heading .heading-actions {
    margin-top: 14px;
  }

  .heading-actions {
    display: flex;
  }

  .stat-grid {
    gap: 9px;
  }

  .stat-card {
    padding: 15px;
  }

  .stat-value {
    font-size: 27px;
  }

  .dashboard-grid,
  .data-grid,
  .security-grid {
    grid-template-columns: 1fr;
  }

  .source-chart-wrap {
    gap: 28px;
  }

  .data-card:last-child {
    grid-column: auto;
  }

  .filter-bar {
    flex-wrap: wrap;
  }

  .search-box {
    width: 100%;
    max-width: none;
    flex-basis: 100%;
  }

  .filter-bar > select {
    width: calc(33.33% - 6px);
  }

  .filter-bar > select:last-child {
    margin-left: 0;
  }

  .leads-table-panel {
    padding: 3px 12px 0;
  }

  .followup-summary {
    grid-template-columns: 1fr 1fr;
  }

  .followup-item {
    grid-template-columns: 42px 1fr auto;
  }

  .followup-need {
    display: none;
  }

  .followup-panel {
    padding: 15px;
  }

  .security-note,
  .danger-zone {
    padding: 18px;
  }

  .danger-zone {
    align-items: flex-start;
    flex-direction: column;
  }

  .drawer-header,
  .drawer-body {
    padding-right: 18px;
    padding-left: 18px;
  }

  .auth-overlay {
    padding: 14px;
  }

  .auth-panel {
    padding: 22px 20px 19px;
    border-radius: 18px;
  }

  .toast-region {
    right: 17px;
    bottom: 17px;
  }
}

@media (max-width: 420px) {
  .hero-copy h1 {
    font-size: 37px;
  }

  .eyebrow {
    font-size: 10px;
  }

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

  .stat-trend {
    display: none;
  }

  .source-chart-wrap {
    gap: 17px;
  }

  .donut-chart {
    width: 120px;
    height: 120px;
  }

  .donut-chart::after {
    width: 77px;
    height: 77px;
  }

  .legend-list {
    min-width: 120px;
  }

  .drawer-contact-row,
  .detail-grid,
  .drawer-field-grid {
    grid-template-columns: 1fr;
  }

  .drawer-field.full {
    grid-column: auto;
  }
}

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