:root {
  --brand: #0891b2;
  --brand-dark: #0e7490;
  --brand-soft: #e4f7fb;
  --nav: #071521;
  --nav-hover: #0d293a;
  --page-bg: #eef5f9;
  --surface: #ffffff;
  --surface-muted: #f5f9fc;
  --border: #d6e3ea;
  --border-strong: #b9cdd8;
  --text: #102531;
  --text-soft: #4f6471;
  --muted: #708591;
  --success: #138a68;
  --success-soft: #e6f7f1;
  --warning: #a76913;
  --warning-soft: #fff5df;
  --danger: #c2424d;
  --danger-soft: #fdeced;
  --info: #176fc1;
  --info-soft: #e7f2fc;
  --purple: #6558c7;
  --purple-soft: #efedff;
  --shadow-sm: 0 1px 2px rgba(7, 30, 45, 0.035), 0 7px 22px rgba(13, 70, 100, 0.045);
  --shadow-md: 0 18px 46px rgba(10, 49, 72, 0.12);
  --radius: 8px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #eef5f9;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  background-color: var(--page-bg);
  background-image:
    linear-gradient(rgba(9, 103, 135, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(9, 103, 135, 0.032) 1px, transparent 1px);
  background-size: 34px 34px;
  font: 15px/1.65 "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

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

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

:focus-visible {
  outline: 3px solid rgba(8, 145, 178, 0.22);
  outline-offset: 2px;
}

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

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: 236px;
  color: #e7f5fb;
  background:
    linear-gradient(180deg, rgba(8, 145, 178, 0.09), transparent 28%),
    var(--nav);
  border-right: 1px solid rgba(56, 189, 248, 0.14);
  box-shadow: 12px 0 34px rgba(4, 25, 39, 0.16);
}

.brand {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 18px;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0;
  border-bottom: 1px solid rgba(125, 211, 252, 0.12);
}

.brand::before {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  border: 1px solid rgba(125, 211, 252, 0.42);
  border-radius: 8px;
  box-shadow: 0 0 22px rgba(34, 211, 238, 0.22);
  font-size: 15px;
  content: "线";
}

.nav {
  display: grid;
  gap: 4px;
  padding: 14px 10px;
}

.nav a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 45px;
  padding: 10px 13px;
  color: #aec3cf;
  border-radius: 7px;
  font-size: 15px;
  transition: color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.nav a:hover {
  color: #fff;
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.13), var(--nav-hover));
}

.nav a.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(8, 145, 178, 0.22), rgba(37, 99, 235, 0.09));
  box-shadow: inset 3px 0 0 #22d3ee, 0 8px 22px rgba(5, 46, 68, 0.24);
}

.main {
  min-height: 100vh;
  margin-left: 236px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 26px;
  background: rgba(248, 252, 254, 0.9);
  border-bottom: 1px solid rgba(119, 163, 184, 0.32);
  box-shadow: 0 8px 28px rgba(15, 65, 91, 0.045);
  backdrop-filter: blur(18px);
}

.topbar-user,
.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-user {
  color: var(--text-soft);
  font-size: 14px;
}

.topbar-user > span:first-child {
  color: var(--text);
  font-weight: 700;
}

.nav-toggle {
  display: none;
}

.page {
  width: min(100%, 1640px);
  min-height: calc(100vh - 72px);
  padding: 26px;
  margin: 0 auto;
}

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

.page-header h1 {
  margin: 0;
  color: #0d2633;
  font-size: 26px;
  line-height: 1.3;
  font-weight: 750;
  letter-spacing: 0;
}

.page-header p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.card {
  padding: 20px;
  background: var(--surface);
  border: 1px solid rgba(187, 211, 223, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card + .card {
  margin-top: 16px;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 17px;
  color: #153441;
  font-size: 17px;
  font-weight: 750;
}

.card-title::before {
  width: 4px;
  height: 18px;
  background: linear-gradient(180deg, #22d3ee, #2563eb);
  border-radius: 2px;
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.3);
  content: "";
}

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

.metric {
  position: relative;
  min-height: 126px;
  padding: 19px 20px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(236, 249, 252, 0.72), transparent 48%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.metric-link {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.metric-link:hover {
  color: inherit;
  border-color: rgba(34, 211, 238, 0.7);
  box-shadow: 0 14px 30px rgba(6, 86, 118, 0.12), 0 0 0 1px rgba(34, 211, 238, 0.08);
  text-decoration: none;
  transform: translateY(-2px);
}

.metric-link:active {
  box-shadow: var(--shadow-sm);
  transform: translateY(0);
}

.metric::before {
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #06b6d4, #0ea5e9);
  content: "";
}

.metric:nth-child(2)::before {
  background: linear-gradient(90deg, #2563eb, #4f46e5);
}

.metric:nth-child(3)::before {
  background: linear-gradient(90deg, #0891b2, #14b8a6);
}

.metric:nth-child(4)::before {
  background: linear-gradient(90deg, #7c3aed, #4f46e5);
}

.metric-label {
  color: var(--muted);
  font-size: 14px;
}

.metric-value {
  margin-top: 13px;
  color: #0b2633;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.metric-note {
  margin-top: 10px;
  color: #87949b;
  font-size: 13px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 16px;
  margin-bottom: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  color: #40515b;
  font-size: 14px;
  font-weight: 650;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--text);
  background: #fff;
  border: 1px solid #b9ced9;
  border-radius: 7px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.textarea {
  min-height: 96px;
  resize: vertical;
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: #7fa9bb;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: #06b6d4;
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.13), 0 0 18px rgba(14, 165, 233, 0.07);
}

.input[readonly],
.input[disabled],
.select[disabled] {
  color: #63737c;
  background: #f3f6f7;
}

.input.is-duplicate,
.input.is-duplicate:hover,
.input.is-duplicate:focus {
  background: #fff8f8;
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(184, 68, 68, 0.12);
}

.field-hint {
  min-height: 18px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.field-hint.error {
  color: var(--danger);
  font-weight: 650;
}

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

.form-grid .full,
.description .full {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding-top: 4px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 16px;
  color: #284653;
  background: #fff;
  border: 1px solid #bad0da;
  border-radius: 7px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}

.btn:hover {
  color: #0f3445;
  background: #f2f9fc;
  border-color: #83b8cb;
  box-shadow: 0 6px 16px rgba(11, 91, 124, 0.1);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  cursor: not-allowed;
  box-shadow: none;
  opacity: 0.55;
  transform: none;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #0891b2, #2563eb);
  border-color: #0e85ad;
  box-shadow: 0 8px 20px rgba(8, 145, 178, 0.22);
}

.btn-primary:hover {
  color: #fff;
  background: linear-gradient(135deg, #0e7490, #1d4ed8);
  border-color: #0e7490;
  box-shadow: 0 10px 24px rgba(8, 120, 170, 0.28);
}

.btn-success {
  color: #fff;
  background: var(--success);
  border-color: var(--success);
}

.btn-danger {
  color: #fff;
  background: var(--danger);
  border-color: var(--danger);
}

.btn-small {
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 5px;
  font-size: 12px;
}

.btn-link {
  min-height: auto;
  padding: 3px 5px;
  color: #087fa2;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.btn-link:hover {
  color: #075e7a;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 7px;
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}

.table th,
.table td {
  padding: 13px 14px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid #e8edef;
  white-space: nowrap;
}

.table th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: #436477;
  background: #f2f8fb;
  font-size: 13px;
  font-weight: 750;
}

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

.table tbody tr:hover td {
  background: #f2fbfd;
}

.table td .money,
.money {
  color: #0b6f95;
  font-weight: 750;
}

.money-negative,
.metric-value.money-negative {
  color: var(--danger) !important;
}

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

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  color: #4e6875;
  background: #edf4f7;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.badge.info {
  color: #185f9c;
  background: var(--info-soft);
}

.badge.success {
  color: #1d684b;
  background: var(--success-soft);
}

.badge.warning {
  color: #865813;
  background: var(--warning-soft);
}

.badge.danger {
  color: #993a3a;
  background: var(--danger-soft);
}

.badge.purple {
  color: #5242ad;
  background: var(--purple-soft);
}

.flash-list {
  margin-bottom: 16px;
}

.flash {
  padding: 11px 14px;
  margin-bottom: 8px;
  border: 1px solid;
  border-radius: 7px;
  box-shadow: var(--shadow-sm);
}

.flash.success {
  color: #176444;
  background: var(--success-soft);
  border-color: #bee2d1;
}

.flash.error {
  color: #953737;
  background: var(--danger-soft);
  border-color: #ecc4c4;
}

.flash.warning {
  color: #7b5317;
  background: var(--warning-soft);
  border-color: #ecd4a8;
}

.empty {
  padding: 42px 20px;
  color: var(--muted);
  text-align: center;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  margin-top: 16px;
}

.pagination a,
.pagination span {
  min-width: 34px;
  padding: 6px 9px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.pagination .active {
  color: #fff;
  background: linear-gradient(135deg, #0891b2, #2563eb);
  border-color: #0e85ad;
}

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

.description-item {
  min-width: 0;
  padding: 10px 0;
  border-bottom: 1px solid #e9eef0;
}

.description-item span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
}

.description-item strong {
  display: block;
  overflow-wrap: anywhere;
  color: #263740;
  font-size: 15px;
  font-weight: 650;
}

.timeline {
  padding-left: 8px;
}

.timeline-item {
  position: relative;
  padding: 0 0 20px 22px;
  border-left: 2px solid #d4e9f0;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  position: absolute;
  top: 5px;
  left: -7px;
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #a5d9e8, 0 0 12px rgba(34, 211, 238, 0.24);
  content: "";
}

.timeline-item p {
  margin: 7px 0;
}

.timeline-meta {
  color: var(--muted);
  font-size: 12px;
}

.dialog {
  width: min(580px, calc(100vw - 28px));
  max-height: 92vh;
  padding: 0;
  overflow: auto;
  background: #fff;
  border: 0;
  border-radius: 10px;
  box-shadow: 0 24px 80px rgba(15, 30, 40, 0.28);
}

.dialog[open] {
  animation: dialog-in 0.18s ease-out;
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.dialog::backdrop {
  background: rgba(15, 27, 32, 0.48);
  backdrop-filter: blur(3px);
}

.dialog-header,
.dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 19px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.dialog-header {
  position: sticky;
  top: 0;
  z-index: 2;
}

.dialog-header h3 {
  margin: 0;
  font-size: 17px;
}

.dialog-body {
  padding: 19px;
}

.dialog-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  justify-content: flex-end;
  gap: 9px;
  border-top: 1px solid var(--border);
  border-bottom: 0;
}

.login-page {
  --login-brand: #0891b2;
  --login-brand-dark: #0e7490;
  --login-ink: #102b39;
  --login-muted: #647b87;
  --login-line: #d5e4ea;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(520px, 1.12fr) minmax(480px, 0.88fr);
  background: #eef5f9;
}

.login-showcase {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  overflow: hidden;
  color: #fff;
  background-color: #071827;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.075) 1px, transparent 1px);
  background-position: -1px -1px;
  background-size: 46px 46px;
}

.login-showcase::after {
  position: absolute;
  right: -5%;
  bottom: 17%;
  z-index: -1;
  width: 68%;
  height: 1px;
  background: rgba(34, 211, 238, 0.34);
  box-shadow:
    0 86px 0 rgba(37, 99, 235, 0.12),
    0 -86px 0 rgba(34, 211, 238, 0.08);
  content: "";
  transform: rotate(-31deg);
  transform-origin: right center;
}

.login-showcase--company {
  background-color: #0a2030;
}

.login-showcase-inner {
  display: flex;
  flex-direction: column;
  width: min(100%, 820px);
  min-height: 100vh;
  padding: 56px clamp(48px, 6vw, 88px) 42px;
}

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

.login-brand-mark {
  display: inline-grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.28), rgba(37, 99, 235, 0.32));
  border: 1px solid rgba(125, 211, 252, 0.34);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 24px rgba(34, 211, 238, 0.14);
  font-size: 18px;
  font-weight: 760;
}

.login-brand-copy {
  display: grid;
  gap: 1px;
}

.login-brand-copy strong {
  font-size: 15px;
  line-height: 1.4;
  font-weight: 720;
  letter-spacing: 0.04em;
}

.login-brand-copy small {
  color: rgba(186, 230, 253, 0.62);
  font-size: 9px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: 0.18em;
}
.login-brand-note {
  max-width: 520px;
  margin: 18px 0 0;
  color: rgba(226, 242, 247, 0.8);
  font-size: 14px;
  line-height: 1.8;
}

.login-showcase-main {
  max-width: 620px;
  margin: auto 0;
  padding: 54px 0;
}

.login-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  color: #67e8f9;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.login-kicker::before {
  width: 22px;
  height: 2px;
  background: linear-gradient(90deg, #22d3ee, #3b82f6);
  border-radius: 999px;
  content: "";
}

.login-showcase-main h1 {
  max-width: 620px;
  margin: 0;
  color: #fff;
  font-size: 48px;
  line-height: 1.22;
  font-weight: 760;
  letter-spacing: 0;
}

.login-showcase-main p {
  max-width: 520px;
  margin: 22px 0 0;
  color: #b9d7e7;
  font-size: 16px;
  line-height: 1.9;
}

.login-workflow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.login-workflow-item {
  min-width: 0;
  padding: 15px 14px 14px;
  background: rgba(8, 145, 178, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.16);
  border-radius: 8px;
  backdrop-filter: blur(8px);
}

.login-workflow-item > span {
  display: block;
  margin-bottom: 13px;
  color: #38bdf8;
  font-size: 11px;
  line-height: 1;
  font-weight: 750;
  letter-spacing: 0.12em;
}

.login-workflow-item strong,
.login-workflow-item small {
  display: block;
}

.login-workflow-item strong {
  overflow: hidden;
  color: #f6fbfa;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-workflow-item small {
  overflow: hidden;
  margin-top: 5px;
  color: rgba(186, 220, 235, 0.62);
  font-size: 11px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-showcase-footer {
  margin: 36px 0 0;
  color: rgba(148, 197, 220, 0.5);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.login-form-wrap {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 48px;
  background:
    linear-gradient(rgba(8, 145, 178, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8, 145, 178, 0.025) 1px, transparent 1px),
    #f2f8fb;
  background-size: 32px 32px;
}

.login-form-panel {
  width: min(100%, 430px);
  padding: 36px;
  background: #fff;
  border: 1px solid #d5e5ec;
  border-radius: 8px;
  box-shadow: 0 24px 64px rgba(10, 58, 83, 0.12), 0 0 0 1px rgba(14, 165, 233, 0.025);
}

.login-form-heading {
  margin-bottom: 27px;
}

.login-form-eyebrow {
  display: inline-flex;
  margin-bottom: 9px;
  color: var(--login-brand);
  font-size: 12px;
  line-height: 1.4;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.login-form-heading h2 {
  margin: 0;
  color: var(--login-ink);
  font-size: 28px;
  line-height: 1.3;
  font-weight: 760;
  letter-spacing: 0;
}

.login-form-heading .login-hint {
  margin: 8px 0 0;
  color: var(--login-muted);
  font-size: 13px;
  line-height: 1.7;
}

.login-form {
  width: 100%;
}

.login-form .field {
  margin-bottom: 18px;
}

.login-form .field label {
  margin-bottom: 8px;
  color: #304f5e;
  font-size: 13px;
  font-weight: 700;
}

.login-input-wrap {
  position: relative;
}

.login-input-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  z-index: 1;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  color: #819ba8;
  pointer-events: none;
  transform: translateY(-50%);
  transition: color 0.16s ease;
}

.login-input-icon svg {
  display: block;
  width: 18px;
  height: 18px;
}

.login-input-wrap .input {
  min-height: 48px;
  padding: 11px 14px 11px 44px;
  color: var(--login-ink);
  background: #f9fcfd;
  border-color: #cbdee7;
  border-radius: 7px;
}

.login-input-wrap .input::placeholder {
  color: #9aafb9;
}

.login-input-wrap .input:hover {
  border-color: #8fb8c9;
}

.login-input-wrap .input:focus {
  background: #fff;
  border-color: var(--login-brand);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.login-input-wrap:focus-within .login-input-icon {
  color: var(--login-brand);
}

.login-form .flash-list {
  margin-bottom: 18px;
}

.login-form .login-submit {
  width: 100%;
  align-items: center;
  min-height: 48px;
  margin-top: 4px;
  background: linear-gradient(135deg, #0891b2, #2563eb);
  border-color: #0e85ad;
  border-radius: 7px;
  box-shadow: 0 12px 26px rgba(8, 145, 178, 0.24);
  font-size: 15px;
  font-weight: 720;
  letter-spacing: 0.08em;
}

.login-form .login-submit:hover {
  background: linear-gradient(135deg, #0e7490, #1d4ed8);
  border-color: #0e7490;
  box-shadow: 0 14px 30px rgba(8, 120, 170, 0.3);
  transform: translateY(-1px);
}

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

.login-form-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 20px;
  color: var(--login-muted);
  font-size: 13px;
}

.login-form-footer a {
  color: var(--login-brand);
  font-weight: 700;
}

.login-form-footer a:hover {
  color: var(--login-brand-dark);
}

.login-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding-top: 24px;
  margin-top: 27px;
  color: #7d8e91;
  border-top: 1px solid #e0edf2;
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}

.login-trust svg {
  flex: 0 0 15px;
  width: 15px;
  height: 15px;
  color: #0891b2;
}

.company-header {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 22px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(8, 145, 178, 0.16), transparent 42%),
    linear-gradient(180deg, #081a28, #0b2b3d);
  border-bottom: 1px solid rgba(56, 189, 248, 0.2);
  box-shadow: 0 10px 30px rgba(2, 24, 39, 0.2);
}

.company-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 750;
}

.company-brand::before {
  display: grid;
  flex: 0 0 31px;
  width: 31px;
  height: 31px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  border-radius: 7px;
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.24);
  font-size: 14px;
  content: "企";
}

.company-user {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.company-user a,
.company-user .btn-link {
  color: #dff6ff;
}

.company-main {
  width: min(100%, 1240px);
  min-height: calc(100vh - 66px);
  padding: 20px;
  margin: 0 auto;
}

.mobile-only {
  display: none;
}

.company-lead-list {
  display: none;
}

.lead-card {
  padding: 13px 14px;
  background: #fff;
  border: 1px solid rgba(183, 211, 223, 0.95);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.16s ease, transform 0.16s ease;
}

.lead-card:hover {
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 12px 28px rgba(6, 83, 116, 0.12);
  transform: translateY(-1px);
}

.lead-card-head,
.lead-card-owner,
.lead-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.lead-card-no {
  overflow: hidden;
  color: #283a43;
  font-size: 15px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-card-owner {
  justify-content: flex-start;
  flex: 1;
  min-width: 0;
  margin-top: 0;
}

.lead-card-owner strong {
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-card-owner a {
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
}

.lead-card-summary {
  margin-top: 8px;
}

.lead-card-community {
  display: block;
  overflow: hidden;
  margin-top: 0;
  color: #40525c;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-card-summary span {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-card-foot {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px solid #edf1f2;
}

.lead-card-cost {
  display: flex;
  align-items: baseline;
  gap: 4px;
  white-space: nowrap;
}

.lead-card-cost span {
  color: var(--muted);
  font-size: 11px;
}

.lead-card-cost strong {
  font-size: 13px;
}

.lead-card-meta {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-card-foot .btn {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 12px;
}

.mobile-action-bar {
  display: none;
}

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

.required::after {
  margin-left: 3px;
  color: var(--danger);
  content: "*";
}

.section-gap {
  margin-top: 16px;
}

.company-main > .card {
  box-shadow: 0 8px 24px rgba(10, 71, 99, 0.06);
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-thumb {
  background: #c5d0d4;
  border-radius: 999px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

@media (max-width: 1100px) {
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .login-page {
    grid-template-columns: minmax(460px, 1fr) minmax(430px, 0.9fr);
  }

  .login-showcase-inner {
    padding-right: 48px;
    padding-left: 48px;
  }

  .login-showcase-main h1 {
    font-size: 42px;
  }
}

@media (max-width: 900px) {
  .login-page {
    display: block;
    background: #071827;
  }

  .login-showcase,
  .login-showcase--company {
    min-height: auto;
    background-color: #071827;
  }

  .login-showcase-inner {
    width: 100%;
    min-height: 278px;
    padding: 34px 30px 30px;
  }

  .login-showcase-main {
    margin: 42px 0 0;
    padding: 0;
  }

  .login-showcase-main h1 {
    font-size: 32px;
  }

  .login-showcase-main p {
    max-width: 540px;
    margin-top: 13px;
    font-size: 14px;
    line-height: 1.7;
  }

  .login-workflow,
  .login-showcase-footer {
    display: none;
  }

  .login-form-wrap {
    min-height: calc(100vh - 278px);
    align-items: flex-start;
    padding: 34px 24px;
  }

  .login-form-panel {
    max-width: 470px;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

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

  .mobile-only {
    display: block;
  }

  .sidebar {
    left: -236px;
    transition: left 0.2s ease;
  }

  body.nav-open::after {
    position: fixed;
    inset: 0;
    z-index: 25;
    background: rgba(10, 24, 30, 0.38);
    content: "";
  }

  body.nav-open .sidebar {
    left: 0;
  }

  .main {
    margin-left: 0;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .topbar {
    height: 60px;
    padding: 0 14px;
  }

  .topbar-user > span:first-child,
  .topbar-user .badge {
    display: none;
  }

  .page {
    padding: 16px 14px calc(24px + env(safe-area-inset-bottom));
  }

  .page-header {
    flex-direction: column;
    gap: 12px;
    margin-bottom: 14px;
  }

  .page-header h1,
  .company-main .page-header h1 {
    font-size: 23px;
  }

  .page-header .btn,
  .page-header > a {
    width: 100%;
  }

  .metrics,
  .company-main .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .metric,
  .company-main .metric {
    min-height: 110px;
    padding: 15px;
  }

  .metric-value,
  .company-main .metric-value {
    font-size: 25px;
  }

  .company-list-page .metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .company-list-page .metric {
    min-height: 92px;
    padding: 10px 6px;
    text-align: center;
  }

  .company-list-page .metric-label {
    display: flex;
    min-height: 30px;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1.35;
  }

  .company-list-page .metric-value {
    margin-top: 4px;
    font-size: 25px;
  }

  .company-list-page .metric-note {
    display: none;
  }

  .company-list-page .metric-lead-cost .metric-note {
    display: block;
    margin-top: 4px;
    font-size: 9px;
    line-height: 1.3;
  }

  .company-list-page .metric-cost .metric-value {
    font-size: 16px;
  }

  .company-list-page .metric-cost .metric-note {
    display: block;
    margin-top: 4px;
    font-size: 9px;
    line-height: 1.3;
  }

  .form-grid,
  .description {
    grid-template-columns: 1fr;
  }

  .company-detail-page .description {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 14px;
  }

  .company-detail-page .description-item.full {
    grid-column: 1 / -1;
  }

  .filters {
    gap: 9px;
    padding: 12px;
  }

  .filters > * {
    width: 100% !important;
  }

  .company-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .company-filters .filter-keyword {
    grid-column: 1 / -1;
  }

  .input,
  .select,
  .textarea {
    min-height: 48px;
    font-size: 16px;
  }

  .btn {
    min-height: 46px;
    padding: 10px 14px;
  }

  .table-wrap {
    border-radius: 7px;
  }

  .company-table-view {
    display: none;
  }

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

  .company-main > .card {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .company-main > .card > .empty {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
  }

  .company-main .card {
    padding: 15px;
  }

  .company-detail-page .company-main {
    padding-bottom: calc(94px + env(safe-area-inset-bottom));
  }

  .mobile-action-bar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 25;
    display: grid;
    grid-template-columns: 0.8fr 1.5fr;
    gap: 9px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid var(--border);
    box-shadow: 0 -8px 24px rgba(20, 35, 50, 0.08);
    backdrop-filter: blur(12px);
  }

  .dialog {
    width: 100vw;
    max-width: none;
    max-height: 92dvh;
    margin: auto 0 0;
    border-radius: 15px 15px 0 0;
  }

  .dialog-body {
    padding-bottom: calc(19px + env(safe-area-inset-bottom));
  }

  .company-header {
    min-height: 60px;
    padding: calc(8px + env(safe-area-inset-top)) 12px 8px;
  }

  .company-brand {
    overflow: hidden;
    font-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .company-user {
    gap: 10px;
    font-size: 14px;
  }

  .company-user-name {
    display: none;
  }

  .company-user .account-action {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    padding: 0 2px;
    white-space: nowrap;
  }

  .company-main {
    padding: 15px 12px calc(22px + env(safe-area-inset-bottom));
  }

  .login-page {
    min-height: 100dvh;
  }

  .login-showcase-inner {
    min-height: 205px;
    padding: calc(26px + env(safe-area-inset-top)) 22px 24px;
  }

  .login-brand-mark {
    flex-basis: 38px;
    width: 38px;
    height: 38px;
    font-size: 16px;
  }

  .login-brand-copy strong {
    font-size: 14px;
  }

  .login-brand-copy small {
    display: none;
  }

  .login-showcase-main {
    margin-top: 28px;
  }

  .login-showcase-main h1 {
    font-size: 28px;
    line-height: 1.3;
  }

  .login-showcase-main p {
    display: none;
  }

  .login-form-wrap {
    min-height: calc(100dvh - 205px);
    align-items: stretch;
    padding: 0;
    background: #f2f5f4;
  }

  .login-form-panel {
    width: 100%;
    max-width: none;
    min-height: calc(100dvh - 205px);
    padding: 30px 22px calc(32px + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 18px 18px 0 0;
    box-shadow: none;
  }

  .login-form-heading {
    margin-bottom: 24px;
  }

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

@media (max-width: 420px) {
  .metrics,
  .company-main .metrics {
    grid-template-columns: 1fr;
  }

  .company-list-page .metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

/* Decoration studio visual system */
:root {
  --brand: #245c4f;
  --brand-dark: #17483e;
  --brand-soft: #e8f0ec;
  --accent-wood: #b97a4b;
  --accent-clay: #b85f42;
  --accent-stone: #76867f;
  --accent-gold: #b58a43;
  --nav: #173a34;
  --nav-hover: #204a41;
  --page-bg: #f3f1eb;
  --surface: #fffdf9;
  --surface-muted: #f7f4ee;
  --border: #ddd8cd;
  --border-strong: #c7c0b4;
  --text: #26312e;
  --text-soft: #5e6965;
  --muted: #7a837f;
  --success: #35725a;
  --success-soft: #e8f2ec;
  --warning: #9a6a26;
  --warning-soft: #fbf2df;
  --danger: #b34b43;
  --danger-soft: #f9eae7;
  --info: #4d7184;
  --info-soft: #eaf0f3;
  --purple: #6b6279;
  --purple-soft: #f0eef3;
  --shadow-sm: 0 1px 1px rgba(38, 49, 46, 0.035), 0 8px 24px rgba(38, 49, 46, 0.055);
  --shadow-md: 0 22px 54px rgba(25, 47, 42, 0.14);
  --radius: 8px;
}

html {
  background: var(--page-bg);
}

body {
  color: var(--text);
  background-color: var(--page-bg);
  background-image:
    linear-gradient(rgba(36, 92, 79, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 92, 79, 0.025) 1px, transparent 1px);
  background-size: 32px 32px;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", "Helvetica Neue", Arial, sans-serif;
}

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

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

:focus-visible {
  outline: 3px solid rgba(36, 92, 79, 0.2);
  outline-offset: 2px;
}

.sidebar {
  width: 244px;
  color: #eef4ef;
  background:
    linear-gradient(180deg, rgba(185, 122, 75, 0.09), transparent 24%),
    var(--nav);
  border-right: 1px solid rgba(226, 218, 201, 0.1);
  box-shadow: 14px 0 38px rgba(18, 42, 36, 0.15);
}

.brand {
  height: 76px;
  gap: 12px;
  padding: 0 19px;
  font-size: 16px;
  border-bottom: 1px solid rgba(235, 228, 213, 0.11);
}

.brand::before {
  flex-basis: 36px;
  width: 36px;
  height: 36px;
  color: #fffaf1;
  background: var(--accent-wood);
  border: 1px solid rgba(255, 245, 225, 0.25);
  box-shadow: 0 8px 18px rgba(16, 37, 31, 0.24);
  content: "筑";
}

.nav {
  gap: 5px;
  padding: 16px 11px;
}

.nav a {
  min-height: 46px;
  padding: 10px 14px;
  color: #b9cbc3;
  border: 1px solid transparent;
  border-radius: 7px;
}

.nav a:hover {
  color: #fffdf8;
  background: var(--nav-hover);
  border-color: rgba(232, 222, 201, 0.08);
}

.nav a.active {
  color: #fffdf8;
  background: rgba(255, 253, 249, 0.08);
  border-color: rgba(232, 222, 201, 0.1);
  box-shadow: inset 3px 0 0 var(--accent-wood);
}

.main {
  margin-left: 244px;
}

.topbar {
  height: 76px;
  padding: 0 28px;
  background: rgba(255, 253, 249, 0.92);
  border-bottom: 1px solid rgba(199, 192, 180, 0.62);
  box-shadow: 0 8px 26px rgba(38, 49, 46, 0.04);
}

.page {
  min-height: calc(100vh - 76px);
  padding: 28px;
}

.page-header {
  margin-bottom: 22px;
}

.page-header h1 {
  color: #22322d;
  font-size: 28px;
  font-weight: 760;
}

.page-header p {
  color: var(--muted);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.card-title {
  color: #293a34;
}

.card-title::before {
  background: var(--accent-wood);
  box-shadow: none;
}

.metrics {
  gap: 14px;
}

.metric {
  min-height: 128px;
  padding: 20px 20px 18px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.metric::before {
  inset: 0 auto 0 0;
  width: 4px;
  height: auto;
  background: var(--brand);
  border-radius: 8px 0 0 8px;
}

.metric:nth-child(2)::before {
  background: var(--accent-wood);
}

.metric:nth-child(3)::before {
  background: var(--accent-gold);
}

.metric:nth-child(4)::before {
  background: var(--accent-stone);
}

.metric-link:hover {
  border-color: rgba(36, 92, 79, 0.42);
  box-shadow: 0 14px 32px rgba(26, 65, 55, 0.11);
}

.metric-label {
  color: #71807a;
  font-size: 13px;
}

.metric-value {
  color: #21352f;
  font-size: 31px;
  font-weight: 770;
}

.metric-note {
  color: #8a918d;
}

.filters {
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.field label {
  color: #46544f;
}

.input,
.select,
.textarea {
  color: var(--text);
  background: #fffefb;
  border: 1px solid #cfc9bd;
  border-radius: 7px;
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: #9f988b;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(36, 92, 79, 0.12);
}

.input[readonly],
.input[disabled],
.select[disabled] {
  color: #69736f;
  background: #f4f2ed;
}

.btn {
  color: #34453f;
  background: #fffefb;
  border-color: #cbc4b8;
  border-radius: 7px;
}

.btn:hover {
  color: var(--brand-dark);
  background: #f5f8f5;
  border-color: #85a298;
  box-shadow: 0 7px 18px rgba(36, 92, 79, 0.1);
}

.btn-primary {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 8px 18px rgba(36, 92, 79, 0.2);
}

.btn-primary:hover {
  color: #fff;
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  box-shadow: 0 10px 22px rgba(23, 72, 62, 0.24);
}

.btn-danger {
  color: #fff;
  background: var(--danger);
  border-color: var(--danger);
}

.btn-link {
  color: var(--brand);
}

.btn-link:hover {
  color: var(--brand-dark);
}

.table-wrap {
  border-color: var(--border);
}

.table th {
  color: #53645d;
  background: #f2efe8;
  border-bottom-color: #ded8cd;
}

.table th,
.table td {
  padding: 14px;
  border-bottom-color: #ece8df;
}

.table tbody tr:nth-child(even) td {
  background: rgba(247, 244, 238, 0.36);
}

.table tbody tr:hover td {
  background: #eef5f1;
}

.money,
.table td .money {
  color: var(--brand);
}

.table-link {
  color: var(--brand);
  font-weight: 750;
}

.table-link:hover {
  color: var(--brand-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.badge {
  color: #5e6b66;
  background: #efeee9;
}

.badge.info {
  color: #41677a;
  background: var(--info-soft);
}

.badge.success {
  color: #2e654f;
  background: var(--success-soft);
}

.badge.warning {
  color: #805b1c;
  background: var(--warning-soft);
}

.badge.danger {
  color: #963e37;
  background: var(--danger-soft);
}

.badge.purple {
  color: #5d546c;
  background: var(--purple-soft);
}

.flash {
  border-radius: 7px;
}

.flash.success {
  color: #285f4a;
  background: var(--success-soft);
  border-color: #c6ded0;
}

.flash.error {
  color: #8d3b35;
  background: var(--danger-soft);
  border-color: #eac9c4;
}

.dialog {
  background: var(--surface);
  border-radius: 8px;
}

.dialog-header,
.dialog-footer {
  background: var(--surface);
  border-color: var(--border);
}

.dialog::backdrop {
  background: rgba(22, 36, 32, 0.5);
}

.description-item {
  border-bottom-color: #ebe7de;
}

.description-item strong {
  color: #2d3b36;
}

.timeline-item {
  border-left-color: #d8ddd8;
}

.timeline-item::before {
  background: var(--brand);
  box-shadow: 0 0 0 1px #a9c0b7;
}

.pagination .active {
  background: var(--brand);
  border-color: var(--brand);
}

::-webkit-scrollbar-thumb {
  background: #bdb7ac;
}

.login-page {
  --login-brand: #245c4f;
  --login-brand-dark: #17483e;
  --login-ink: #26332f;
  --login-muted: #68736f;
  --login-line: #d9d5cc;
  background: #f3f1eb;
}

.login-showcase,
.login-showcase--company {
  background-color: #173a34;
  background-image:
    linear-gradient(rgba(231, 218, 194, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(231, 218, 194, 0.055) 1px, transparent 1px);
  background-size: 42px 42px;
}

.login-showcase--company {
  background-color: #1a4038;
}

.login-showcase--company .login-workflow {
  margin-top: auto;
}

.login-showcase::after {
  background: rgba(185, 122, 75, 0.36);
  box-shadow:
    0 76px 0 rgba(185, 122, 75, 0.12),
    0 -76px 0 rgba(231, 218, 194, 0.06);
}

.login-brand-mark {
  color: #fffaf1;
  background: var(--accent-wood);
  border-color: rgba(255, 245, 225, 0.28);
  box-shadow: 0 10px 22px rgba(12, 32, 27, 0.22);
}

.login-brand-copy strong {
  color: #fffdf7;
}

.login-brand-copy small {
  color: rgba(238, 224, 199, 0.58);
}

.login-kicker {
  color: #e1bd8b;
}

.login-kicker::before {
  background: var(--accent-wood);
}

.login-showcase-main h1 {
  color: #fffdf8;
  font-size: 46px;
}

.login-showcase-main p {
  color: #c5d1cb;
}

.login-workflow-item {
  background: rgba(255, 253, 248, 0.055);
  border-color: rgba(232, 222, 201, 0.15);
  border-top: 3px solid var(--accent-wood);
}

.login-workflow-item:nth-child(2) {
  border-top-color: var(--accent-stone);
}

.login-workflow-item:nth-child(3) {
  border-top-color: var(--accent-clay);
}

.login-workflow-item > span {
  color: #dfb980;
}

.login-workflow-item strong {
  color: #fffdf8;
}

.login-workflow-item small {
  color: rgba(224, 231, 226, 0.65);
}

.login-showcase-footer {
  color: rgba(226, 216, 197, 0.48);
}

.login-form-wrap {
  background:
    linear-gradient(rgba(36, 92, 79, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 92, 79, 0.024) 1px, transparent 1px),
    #f3f1eb;
  background-size: 32px 32px;
}

.login-form-panel {
  background: #fffdf9;
  border-color: #ddd8cd;
  box-shadow: 0 24px 64px rgba(37, 54, 48, 0.11);
}

.login-form-eyebrow {
  color: var(--accent-wood);
}

.login-form-heading h2 {
  color: var(--login-ink);
}

.login-form .field label {
  color: #46544f;
}

.login-input-wrap .input {
  color: var(--login-ink);
  background: #fffefb;
  border-color: #d2cdc3;
}

.login-input-wrap .input:hover {
  border-color: #9b968c;
}

.login-input-wrap .input:focus {
  background: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(36, 92, 79, 0.11);
}

.login-input-wrap:focus-within .login-input-icon {
  color: var(--brand);
}

.login-form .login-submit {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 12px 24px rgba(36, 92, 79, 0.22);
}

.login-form .login-submit:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  box-shadow: 0 14px 28px rgba(23, 72, 62, 0.26);
}

.login-trust {
  color: #74807a;
  border-top-color: #e5e0d6;
}

.login-trust svg {
  color: var(--brand);
}

.company-header {
  min-height: 68px;
  background:
    linear-gradient(90deg, rgba(185, 122, 75, 0.13), transparent 38%),
    #173a34;
  border-bottom-color: rgba(232, 222, 201, 0.12);
  box-shadow: 0 10px 30px rgba(18, 42, 36, 0.17);
}

.company-brand::before {
  color: #fffaf1;
  background: var(--accent-wood);
  box-shadow: 0 8px 18px rgba(12, 32, 27, 0.22);
}

.company-main > .card {
  box-shadow: 0 8px 24px rgba(37, 54, 48, 0.055);
}

.lead-card {
  border-color: var(--border);
}

.lead-card:hover {
  border-color: rgba(36, 92, 79, 0.42);
  box-shadow: 0 12px 28px rgba(37, 54, 48, 0.11);
}

.lead-card-cost strong {
  color: var(--brand);
}

.mobile-action-bar {
  background: rgba(255, 253, 249, 0.98);
  border-top-color: var(--border);
}

.service-alert {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  margin: -6px 0 18px;
  border: 1px solid;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.service-alert strong {
  flex: 0 0 auto;
  font-size: 14px;
}

.service-alert span {
  min-width: 0;
  color: inherit;
  font-size: 13px;
}

.service-alert--danger {
  color: #8f3b35;
  background: var(--danger-soft);
  border-color: #e7c4bf;
}

.service-alert--warning {
  color: #7e581c;
  background: var(--warning-soft);
  border-color: #ead2a7;
}

.metric-service--active::before {
  background: var(--brand);
}

.metric-service--expiring::before {
  background: var(--warning);
}

.metric-service--expired::before {
  background: var(--danger);
}

.service-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.service-note small {
  flex-basis: 100%;
  color: #8b918e;
  font-size: 11px;
}

.service-state {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 2px 7px;
  color: #53615c;
  background: #efeee9;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.service-state--active {
  color: #2e654f;
  background: var(--success-soft);
}

.service-state--expiring {
  color: #7e581c;
  background: var(--warning-soft);
}

.service-state--expired {
  color: #963e37;
  background: var(--danger-soft);
}

@media (max-width: 720px) {
  .sidebar {
    width: 244px;
    left: -244px;
  }

  .main {
    margin-left: 0;
  }

  .topbar {
    height: 62px;
  }

  .page {
    padding: 18px 14px calc(24px + env(safe-area-inset-bottom));
  }

  .login-form-wrap {
    background: #f3f1eb;
  }

  .login-form-panel {
    background: #fffdf9;
  }

  .company-list-page .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .company-list-page .metric {
    min-height: 108px;
    padding: 14px;
    text-align: left;
  }

  .company-list-page .metric-label {
    justify-content: flex-start;
    min-height: auto;
    font-size: 13px;
    line-height: 1.45;
    text-align: left;
  }

  .company-list-page .metric-value {
    margin-top: 7px;
    font-size: 28px;
    text-align: left;
  }

  .company-list-page .metric-cost .metric-value {
    font-size: 26px;
  }

  .company-list-page .metric-cost .metric-note,
  .company-list-page .metric-lead-cost .metric-note {
    display: block;
    margin-top: 7px;
    font-size: 12px;
    line-height: 1.45;
    text-align: left;
  }

  .company-list-page .metric-cost .service-note {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
  }

  .company-list-page .metric-cost .service-state {
    min-height: 22px;
    padding: 2px 7px;
    font-size: 12px;
  }

  .company-list-page .metric-cost .service-note > span:not(.service-state) {
    font-size: 14px;
    font-weight: 750;
  }

  .company-list-page .metric-cost .service-note small {
    font-size: 12px;
    line-height: 1.45;
  }

  .service-alert {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
}

.company-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin: 0 0 18px;
  background: #e9e5dc;
  border: 1px solid #ddd8cd;
  border-radius: 8px;
}

.company-tabs a {
  min-width: 92px;
  padding: 8px 14px;
  color: #63706b;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

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

.company-tabs a.active {
  color: #fff;
  background: var(--brand);
  box-shadow: 0 4px 12px rgba(36, 92, 79, 0.16);
}

.company-public-page .metric-value {
  overflow-wrap: anywhere;
}

.filter-city {
  min-width: 160px;
}

.company-list-page .metrics,
.company-public-page .metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 720px) {
  .company-tabs {
    display: flex;
    width: 100%;
  }

  .company-tabs a {
    flex: 1;
    min-width: 0;
  }

  .company-list-page .metrics,
  .company-public-page .metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .company-list-page .metric,
  .company-public-page .metric {
    min-height: 112px;
    padding: 12px 9px;
  }

  .company-list-page .metric-label,
  .company-public-page .metric-label {
    font-size: 12px;
  }

  .company-list-page .metric-value,
  .company-public-page .metric-value {
    font-size: 22px;
  }

  .company-list-page .metric-cost .metric-value,
  .company-public-page .metric-cost .metric-value {
    font-size: 20px;
  }

  .company-list-page .metric-note,
  .company-public-page .metric-note {
    font-size: 11px;
  }

  .filter-city {
    min-width: 0;
  }
}

.proof-review-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  gap: 22px;
  align-items: start;
}

.proof-review-image {
  display: flex;
  min-height: 320px;
  align-items: flex-start;
  justify-content: center;
  padding: 14px;
  background: #efede7;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.proof-review-image img {
  display: block;
  max-width: 100%;
  max-height: 680px;
  object-fit: contain;
  border-radius: 5px;
}

.proof-review-side {
  min-width: 0;
}

.proof-review-form,
.proof-reject-form {
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px solid var(--border);
}

@media (max-width: 720px) {
  .proof-review-grid {
    grid-template-columns: 1fr;
  }

  .proof-review-image {
    min-height: 220px;
  }
}

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

.import-rules p {
  margin: 0 0 8px;
  color: var(--text-soft);
  line-height: 1.7;
}

.import-error-list {
  max-height: 320px;
  padding-left: 20px;
  margin: 8px 0 0;
  overflow: auto;
  line-height: 1.7;
}

@media (max-width: 720px) {
  .import-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .page-header > .actions {
    width: 100%;
  }

  .page-header > .actions .btn {
    flex: 1;
  }
}

.login-form-switch {
  padding-top: 15px;
  margin-top: 4px;
  color: #6f7b76;
  border-top: 1px solid #e5e0d6;
  font-size: 13px;
  text-align: center;
}

.login-form-switch a {
  margin-left: 4px;
  color: var(--brand);
  font-weight: 750;
}

.login-form-panel--register {
  width: min(100%, 480px);
}

.company-register-page .login-form {
  gap: 0;
}

.company-register-page .field {
  margin-bottom: 14px;
}

.register-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

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

.company-onboarding {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px;
  margin-bottom: 18px;
  color: #72551f;
  background: var(--warning-soft);
  border: 1px solid #ead2a7;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.company-onboarding--rejected {
  color: #8f3b35;
  background: var(--danger-soft);
  border-color: #e7c4bf;
}

.company-onboarding-copy {
  min-width: 0;
}

.company-onboarding strong {
  display: block;
  margin-bottom: 2px;
  font-size: 14px;
}

.company-onboarding span {
  display: block;
  font-size: 13px;
  line-height: 1.6;
}

.company-onboarding .btn {
  flex: 0 0 auto;
}

.review-status {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.review-note {
  margin-top: 8px;
  color: var(--text-soft);
  font-size: 13px;
}

.review-company-name {
  padding: 11px 13px;
  margin-bottom: 16px;
  color: var(--text-soft);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 7px;
}

.review-company-name strong {
  color: var(--text);
}

.registration-review-queue {
  margin-bottom: 16px;
}

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

.review-queue-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 7px;
}

.review-queue-copy {
  min-width: 0;
}

.review-queue-copy strong,
.review-queue-copy span,
.review-queue-copy small {
  display: block;
}

.review-queue-copy strong {
  color: var(--text);
  font-size: 14px;
}

.review-queue-copy span,
.review-queue-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 720px) {
  .register-password-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .company-onboarding {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .company-onboarding .btn {
    width: 100%;
  }

  .review-queue-item {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .review-queue-item .btn {
    grid-column: 1 / -1;
    width: 100%;
  }
}
