/* ==========================================================================
   企税宝 · 企业财税数据平台
   Design tokens / Auth / Admin shell / Components / Responsive
   ========================================================================== */

:root {
  --ink: #0b1f33;
  --ink-2: #33475b;
  --text: #21384d;
  --muted: #7c8da1;
  --muted-2: #9caaba;
  --line: #e7eef6;
  --line-strong: #d9e4ef;
  --bg: #f4f7fb;
  --card: #ffffff;
  --navy: #0b1f33;
  --navy-2: #102b45;
  --teal: #0f9f8f;
  --teal-dark: #0a7f74;
  --teal-deep: #075f58;
  --teal-soft: #e8f7f4;
  --blue: #3466f6;
  --blue-soft: #edf2ff;
  --amber: #e8971f;
  --amber-soft: #fff5e3;
  --red: #dd4b50;
  --red-soft: #fff0f0;
  --green: #169b62;
  --green-soft: #eaf8f1;
  --violet: #7558d8;
  --violet-soft: #f2efff;
  --shadow-sm: 0 2px 8px rgba(15, 42, 70, 0.04);
  --shadow: 0 12px 34px rgba(15, 42, 70, 0.07);
  --shadow-lg: 0 28px 70px rgba(8, 29, 49, 0.17);
  --radius: 16px;
  --radius-sm: 11px;
  --sidebar-w: 246px;
  --topbar-h: 70px;
  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Noto Sans SC",
    -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

button {
  cursor: pointer;
}

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

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

svg {
  display: block;
}

::selection {
  background: rgba(15, 159, 143, 0.2);
}

/* ------------------------------ Brand mark ------------------------------ */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #18b7a5 0%, #0b8278 60%, #086a63 100%);
  box-shadow: 0 7px 18px rgba(15, 159, 143, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  flex: none;
}

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

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}

.brand-name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.brand-sub {
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--muted-2);
  text-transform: uppercase;
  margin-top: 3px;
  white-space: nowrap;
}

.brand.on-dark .brand-name {
  color: #fff;
}

.brand.on-dark .brand-sub {
  color: rgba(219, 239, 247, 0.52);
}

/* ------------------------------- Buttons -------------------------------- */
.btn {
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease,
    transform 0.18s ease, color 0.18s ease;
  user-select: none;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex: none;
}

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

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  transform: none;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #13a99a 0%, #0a8278 100%);
  box-shadow: 0 7px 18px rgba(15, 159, 143, 0.22);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #0f9f8f 0%, #076d65 100%);
  box-shadow: 0 9px 22px rgba(15, 159, 143, 0.3);
}

.btn-secondary {
  background: #fff;
  color: var(--ink-2);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover:not(:disabled) {
  border-color: #b9cad9;
  background: #fbfdff;
  color: var(--ink);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-2);
}

.btn-ghost:hover:not(:disabled) {
  background: #f1f6fa;
  color: var(--ink);
}

.btn-soft {
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.btn-soft:hover:not(:disabled) {
  background: #dcf3ee;
}

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

.btn-danger-soft:hover:not(:disabled) {
  background: #ffe3e4;
}

.btn-sm {
  height: 32px;
  padding: 0 11px;
  border-radius: 8px;
  font-size: 12px;
}

.btn-lg {
  height: 48px;
  border-radius: 12px;
  font-size: 15px;
}

.btn-block {
  width: 100%;
}

.btn.is-loading {
  pointer-events: none;
  opacity: 0.8;
}

.btn .spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn-secondary .spinner,
.btn-ghost .spinner {
  border-color: rgba(11, 31, 51, 0.15);
  border-top-color: var(--ink);
}

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

.icon-btn {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: background 0.18s ease, color 0.18s ease;
}

.icon-btn:hover {
  background: #f0f5f9;
  color: var(--ink);
}

.icon-btn svg {
  width: 19px;
  height: 19px;
}

.link-btn {
  border: 0;
  background: none;
  padding: 2px 0;
  color: var(--teal-dark);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.link-btn:hover {
  color: var(--teal-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.link-btn.muted {
  color: var(--muted-2);
  cursor: not-allowed;
  text-decoration: none;
}

/* ------------------------------- Form ----------------------------------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.field-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 4px;
}

.field-label .req {
  color: var(--red);
  font-size: 13px;
  line-height: 1;
}

.field-hint {
  font-size: 11.5px;
  color: var(--muted-2);
  line-height: 1.4;
}

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

.input-wrap > svg {
  position: absolute;
  left: 13px;
  width: 17px;
  height: 17px;
  color: #95a6b7;
  pointer-events: none;
}

.input,
.select,
.textarea {
  width: 100%;
  height: 43px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
  padding: 0 13px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
  font-size: 13.5px;
}

.input::placeholder,
.textarea::placeholder {
  color: #a9b6c5;
}

.input-wrap .input {
  padding-left: 39px;
}

.input-wrap.has-action .input {
  padding-right: 112px;
}

.input-wrap.has-action .input::placeholder {
  font-size: 12.5px;
}

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

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 159, 143, 0.1);
}

.input.invalid,
.select.invalid {
  border-color: #ed9fa2;
  background: #fffafa;
}

.select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237c8da1' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  cursor: pointer;
}

.textarea {
  height: 88px;
  padding: 11px 13px;
  resize: vertical;
}

.field-error {
  display: none;
  align-items: center;
  gap: 5px;
  color: var(--red);
  font-size: 11.5px;
  line-height: 1.4;
}

.field-error.show {
  display: flex;
}

.field-error svg {
  width: 13px;
  height: 13px;
  flex: none;
}

.input-action {
  position: absolute;
  right: 6px;
  border: 0;
  background: transparent;
  height: 31px;
  padding: 0 9px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--teal-dark);
}

.input-action:hover {
  background: var(--teal-soft);
}

.input-action:disabled {
  color: var(--muted-2);
  cursor: not-allowed;
}

.eye-btn {
  position: absolute;
  right: 7px;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #96a6b6;
}

.eye-btn:hover {
  background: #f2f6fa;
  color: var(--ink-2);
}

.eye-btn svg {
  width: 17px;
  height: 17px;
}

/* ------------------------------ Password strength ----------------------- */
.strength {
  display: flex;
  gap: 5px;
  margin-top: 1px;
}

.strength i {
  height: 3px;
  flex: 1;
  border-radius: 99px;
  background: #e9eff5;
  transition: background 0.2s ease;
}

.strength[data-level="1"] i:nth-child(-n + 1) {
  background: #e66a6f;
}

.strength[data-level="2"] i:nth-child(-n + 2) {
  background: #e8a33b;
}

.strength[data-level="3"] i:nth-child(-n + 3) {
  background: #41ad7a;
}

.strength[data-level="4"] i {
  background: #169b62;
}

/* ================================ AUTH ================================== */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(480px, 0.88fr);
  background: #f7fafc;
}

.auth-visual {
  position: relative;
  overflow: hidden;
  padding: 42px 54px 38px;
  color: #fff;
  background: radial-gradient(1000px 700px at 10% -12%, #17435d 0%, transparent 60%),
    radial-gradient(760px 580px at 104% 94%, #0d6c68 0%, transparent 58%),
    linear-gradient(148deg, #081a2b 0%, #0b2439 55%, #0b2a3a 100%);
  display: flex;
  flex-direction: column;
  isolation: isolate;
}

.auth-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(rgba(159, 210, 223, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(159, 210, 223, 0.055) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, #000 5%, rgba(0, 0, 0, 0.6) 60%, transparent 100%);
}

.auth-visual::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  border: 1px solid rgba(45, 196, 178, 0.18);
  border-radius: 50%;
  right: -195px;
  top: -160px;
  z-index: -1;
  box-shadow: 0 0 0 85px rgba(45, 196, 178, 0.035),
    0 0 0 170px rgba(45, 196, 178, 0.02);
}

.auth-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.auth-brand-row .brand-mark {
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(217, 242, 247, 0.14);
  background: rgba(255, 255, 255, 0.045);
  border-radius: 99px;
  padding: 7px 13px;
  font-size: 10.5px;
  color: rgba(220, 240, 246, 0.72);
  letter-spacing: 0.06em;
  backdrop-filter: blur(8px);
}

.auth-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #37d3bd;
  box-shadow: 0 0 0 4px rgba(55, 211, 189, 0.12);
}

.auth-hero {
  margin: auto 0;
  max-width: 570px;
  position: relative;
  z-index: 2;
}

.auth-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #55d9c6;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.17em;
  margin-bottom: 24px;
}

.auth-kicker::before {
  content: "";
  width: 28px;
  height: 1px;
  background: #38b6a6;
}

.auth-hero h1 {
  font-size: clamp(36px, 4vw, 53px);
  line-height: 1.2;
  letter-spacing: -0.025em;
  font-weight: 800;
  color: #f3fbfd;
}

.auth-hero h1 span {
  display: block;
  margin-top: 4px;
  background: linear-gradient(92deg, #43d2c0 4%, #9ae5d9 58%, #f5e2a6 110%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-hero > p {
  margin-top: 22px;
  max-width: 460px;
  font-size: 14px;
  line-height: 1.85;
  color: rgba(204, 227, 235, 0.62);
}

.hero-proof {
  margin-top: 38px;
  display: flex;
  gap: 30px;
  align-items: center;
}

.hero-proof-item strong {
  display: block;
  font-size: 20px;
  color: #e8f8fa;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hero-proof-item span {
  font-size: 10.5px;
  color: rgba(203, 228, 236, 0.46);
  letter-spacing: 0.04em;
}

.hero-proof-divider {
  width: 1px;
  height: 30px;
  background: rgba(209, 237, 244, 0.12);
}

.visual-card {
  position: absolute;
  z-index: 3;
  border: 1px solid rgba(230, 249, 252, 0.14);
  background: rgba(11, 39, 57, 0.66);
  backdrop-filter: blur(18px);
  border-radius: 15px;
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.23);
}

.visual-card-a {
  right: 52px;
  top: 27%;
  width: 216px;
  padding: 16px 17px;
  transform: rotate(1.5deg);
}

.visual-card-a .vc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 9.5px;
  color: rgba(213, 235, 241, 0.55);
}

.vc-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #61d7c5;
  font-size: 9px;
}

.vc-live::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #42d2bd;
}

.visual-card-a strong {
  display: block;
  margin: 10px 0 3px;
  font-size: 27px;
  letter-spacing: -0.03em;
  color: #f0fbfc;
}

.vc-bars {
  display: flex;
  gap: 5px;
  align-items: flex-end;
  height: 34px;
  margin-top: 12px;
}

.vc-bars i {
  flex: 1;
  border-radius: 3px 3px 1px 1px;
  background: linear-gradient(to top, rgba(31, 179, 162, 0.18), #2fbaa8);
}

.visual-card-b {
  right: 148px;
  bottom: 16%;
  width: 188px;
  padding: 13px 15px;
  display: flex;
  align-items: center;
  gap: 11px;
  transform: rotate(-2deg);
}

.vc-ring {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: conic-gradient(#38c8b5 0 98.6%, rgba(255, 255, 255, 0.09) 98.6% 100%);
  display: grid;
  place-items: center;
  flex: none;
}

.vc-ring::after {
  content: "";
  width: 31px;
  height: 31px;
  border-radius: 50%;
  background: #0d2b3f;
}

.visual-card-b strong {
  display: block;
  font-size: 13px;
  color: #effbfc;
}

.visual-card-b span {
  font-size: 9.5px;
  color: rgba(199, 228, 235, 0.48);
}

.auth-foot {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  font-size: 10px;
  color: rgba(192, 221, 229, 0.35);
  position: relative;
  z-index: 2;
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 38px 48px;
  position: relative;
  background:
    radial-gradient(680px 380px at 100% 0%, #eef8f6 0%, transparent 55%),
    #f8fafc;
}

.auth-panel-inner {
  width: 100%;
  max-width: 410px;
  animation: authIn 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes authIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.auth-mobile-brand {
  display: none;
}

.auth-head {
  margin-bottom: 27px;
}

.auth-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--teal-dark);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-bottom: 11px;
}

.auth-eyebrow::before {
  content: "";
  width: 19px;
  height: 2px;
  border-radius: 2px;
  background: var(--teal);
}

.auth-head h2 {
  font-size: 29px;
  line-height: 1.25;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.auth-head p {
  margin-top: 9px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.65;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-form .field {
  gap: 6px;
}

.auth-form .input {
  height: 46px;
}

.auth-form .btn-lg {
  height: 48px;
  margin-top: 4px;
}

.captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 10px;
  align-items: flex-end;
}

.captcha-visual {
  height: 43px;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background:
    repeating-linear-gradient(-45deg, rgba(12, 105, 96, 0.035) 0 3px, transparent 3px 7px),
    #f2f8f7;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  user-select: none;
  cursor: pointer;
}

.captcha-visual::before,
.captcha-visual::after {
  content: "";
  position: absolute;
  left: -8px;
  right: -8px;
  height: 1px;
  background: rgba(12, 105, 96, 0.3);
  transform: rotate(-8deg);
}

.captcha-visual::before {
  top: 14px;
}

.captcha-visual::after {
  bottom: 13px;
  transform: rotate(7deg);
  background: rgba(52, 102, 246, 0.16);
}

.captcha-visual span {
  position: relative;
  z-index: 2;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: 18px;
  color: #0b6d65;
  font-style: italic;
  text-shadow: 0 1px 0 #fff;
}

.captcha-visual span:nth-child(2) {
  color: #275e8e;
  transform: rotate(-10deg) translateY(-1px);
}

.captcha-visual span:nth-child(3) {
  color: #b17518;
  transform: rotate(8deg) translateY(1px);
}

.captcha-visual span:nth-child(4) {
  color: #2d7168;
  transform: rotate(-4deg);
}

.auth-inline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: -2px;
}

.check-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.check-label input {
  width: 14px;
  height: 14px;
  accent-color: var(--teal);
  margin: 0;
}

.auth-text-btn {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 600;
}

.auth-text-btn:hover {
  color: var(--teal-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-submit {
  position: relative;
}

.auth-switch {
  margin-top: 24px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
}

.auth-switch button,
.auth-switch a {
  border: 0;
  background: transparent;
  padding: 0 0 0 4px;
  color: var(--teal-dark);
  font-weight: 700;
  font-size: 12.5px;
}

.auth-switch button:hover,
.auth-switch a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-agree {
  margin-top: 2px;
  margin-bottom: 2px;
}

.auth-text-btn {
  text-decoration: none;
}

.auth-text-btn:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.demo-box {
  margin-top: 22px;
  border: 1px dashed #cfe3df;
  border-radius: 11px;
  background: #f2faf8;
  padding: 11px 13px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.demo-box .demo-icon {
  width: 31px;
  height: 31px;
  border-radius: 9px;
  background: #e0f4ef;
  color: var(--teal-dark);
  display: grid;
  place-items: center;
  flex: none;
}

.demo-box .demo-icon svg {
  width: 16px;
  height: 16px;
}

.demo-box p {
  font-size: 10.5px;
  line-height: 1.55;
  color: #627e84;
  flex: 1;
  min-width: 0;
}

.demo-box p b {
  color: #1e5f58;
  font-weight: 700;
}

.demo-fill {
  border: 0;
  background: #fff;
  border: 1px solid #cfe3df;
  color: var(--teal-dark);
  border-radius: 7px;
  height: 28px;
  padding: 0 9px;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}

.demo-fill:hover {
  background: #e9f7f4;
}

.auth-legal {
  margin-top: 22px;
  font-size: 10px;
  line-height: 1.65;
  color: #a5b2bf;
  text-align: center;
}

.auth-legal a {
  color: #71869a;
}

.auth-panel-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  text-align: center;
  font-size: 9.5px;
  color: #a8b5c2;
  pointer-events: none;
}

/* --------------------------- Step indicator ----------------------------- */
.steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 24px;
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10.5px;
  font-weight: 700;
  color: #9baaba;
  background: #edf2f6;
  border: 1px solid #e2eaf1;
  flex: none;
  transition: all 0.25s ease;
}

.step-label {
  font-size: 11px;
  font-weight: 600;
  color: #9baaba;
  white-space: nowrap;
}

.step.active .step-num {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
  box-shadow: 0 4px 10px rgba(15, 159, 143, 0.22);
}

.step.active .step-label {
  color: var(--ink);
}

.step.done .step-num {
  color: var(--teal-dark);
  background: var(--teal-soft);
  border-color: #c8ebe4;
}

.step.done .step-label {
  color: var(--teal-dark);
}

.step-line {
  height: 1px;
  background: #dfe8f0;
  flex: 1;
  margin: 0 9px;
  min-width: 16px;
}

.step-line.done {
  background: #9fd9cf;
}

/* =============================== ADMIN ================================== */
.admin-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  z-index: 50;
  background: radial-gradient(720px 500px at -20% -10%, #183e58 0%, transparent 58%),
    linear-gradient(176deg, #0b2033 0%, #091a2b 55%, #081826 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 21px 15px 16px;
  overflow-y: auto;
  scrollbar-width: none;
}

.sidebar::-webkit-scrollbar {
  display: none;
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 7px 21px;
}

.workspace-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(207, 236, 243, 0.09);
  background: rgba(255, 255, 255, 0.035);
  border-radius: 10px;
  padding: 7px 9px;
  min-width: 0;
  margin: 0 2px 20px;
}

.workspace-chip .ws-logo {
  width: 27px;
  height: 27px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(46, 196, 178, 0.14);
  color: #5ed8c7;
  font-size: 11px;
  font-weight: 800;
  flex: none;
}

.workspace-chip .ws-info {
  min-width: 0;
  flex: 1;
}

.workspace-chip strong {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: rgba(236, 249, 251, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace-chip span {
  font-size: 9px;
  color: rgba(189, 219, 228, 0.4);
  letter-spacing: 0.06em;
}

.workspace-chip .ws-arrow {
  color: rgba(189, 219, 228, 0.35);
}

.workspace-chip .ws-arrow svg {
  width: 13px;
  height: 13px;
}

.nav-group {
  margin-bottom: 20px;
}

.nav-label {
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: rgba(189, 220, 228, 0.33);
  font-weight: 600;
  padding: 0 12px;
  margin-bottom: 8px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  height: 42px;
  padding: 0 11px;
  border-radius: 10px;
  color: rgba(203, 225, 232, 0.66);
  font-size: 12.5px;
  font-weight: 500;
  margin-bottom: 3px;
  transition: color 0.17s ease, background 0.17s ease;
}

.nav-item svg {
  width: 17px;
  height: 17px;
  color: rgba(178, 209, 220, 0.55);
  transition: color 0.17s ease;
  flex: none;
}

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

.nav-item:hover svg {
  color: #a9d8d9;
}

.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(31, 178, 160, 0.2), rgba(31, 178, 160, 0.06));
  box-shadow: inset 0 0 0 1px rgba(66, 207, 188, 0.11);
}

.nav-item.active svg {
  color: #4cd8c3;
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: -15px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  background: #36c8b4;
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 12px rgba(54, 200, 180, 0.55);
}

.nav-badge {
  margin-left: auto;
  font-size: 9px;
  height: 17px;
  min-width: 17px;
  padding: 0 5px;
  border-radius: 99px;
  display: grid;
  place-items: center;
  background: rgba(238, 163, 62, 0.14);
  color: #f2b85b;
  font-weight: 700;
}

.nav-badge.teal {
  background: rgba(54, 200, 180, 0.13);
  color: #59d9c7;
}

.sidebar-bottom {
  margin-top: auto;
  padding-top: 10px;
}

.service-card {
  border: 1px solid rgba(203, 235, 242, 0.08);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018));
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 13px;
}

.service-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  color: rgba(201, 230, 237, 0.65);
  font-weight: 600;
  margin-bottom: 5px;
}

.service-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #35c8ae;
  box-shadow: 0 0 0 4px rgba(53, 200, 174, 0.1);
  flex: none;
}

.service-card p {
  font-size: 9px;
  color: rgba(188, 217, 226, 0.37);
  line-height: 1.6;
}

.sidebar-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 9px;
  color: rgba(180, 211, 221, 0.28);
  padding: 0 4px;
}

.sidebar-meta .ver {
  border: 1px solid rgba(200, 233, 240, 0.1);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 8px;
  letter-spacing: 0.04em;
}

.workspace {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ------------------------------- Topbar --------------------------------- */
.topbar {
  height: var(--topbar-h);
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(223, 234, 244, 0.86);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 17px;
  min-width: 0;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-right: 18px;
  border-right: 1px solid var(--line);
  flex: none;
}

.topbar-brand .brand-mark {
  width: 31px;
  height: 31px;
  border-radius: 9px;
  box-shadow: 0 5px 13px rgba(15, 159, 143, 0.22);
}

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

.topbar-brand .brand-name {
  font-size: 15px;
  letter-spacing: 0.01em;
}

.topbar-brand .brand-sub {
  font-size: 7.5px;
  margin-top: 2px;
}

.topbar-crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.crumb-root {
  font-size: 12px;
  color: var(--muted-2);
  white-space: nowrap;
}

.topbar-crumb svg {
  width: 13px;
  height: 13px;
  color: #c4d0dc;
  flex: none;
}

.crumb-current {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: none;
}

.topbar-date {
  font-size: 10.5px;
  color: var(--muted-2);
  padding: 0 12px 0 6px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.notify-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #eb9b34;
  border: 1.5px solid #fff;
  top: 7px;
  right: 8px;
}

.topbar-divider {
  width: 1px;
  height: 22px;
  background: var(--line);
  margin: 0 10px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 6px 4px 4px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  text-align: left;
  transition: background 0.18s ease, border-color 0.18s ease;
  position: relative;
}

.user-chip:hover,
.user-chip.open {
  background: #f5f9fc;
  border-color: #e8eff5;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #296b83, #154557);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.user-chip .u-info {
  line-height: 1.25;
}

.user-chip .u-name {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink);
}

.user-chip .u-role {
  display: block;
  font-size: 9px;
  color: var(--muted-2);
  margin-top: 2px;
}

.user-chip .u-caret svg {
  width: 13px;
  height: 13px;
  color: #a4b2c0;
  margin-left: 3px;
}

.user-menu[hidden] {
  display: none;
}

.user-menu {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  width: 190px;
  background: #fff;
  border: 1px solid #e6eef5;
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(14, 43, 67, 0.15);
  padding: 6px;
  z-index: 80;
  animation: menuIn 0.16s ease-out;
}

@keyframes menuIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
}

.user-menu-head {
  padding: 8px 10px 10px;
  border-bottom: 1px solid #eef3f7;
  margin-bottom: 4px;
}

.user-menu-head strong {
  display: block;
  font-size: 11.5px;
  color: var(--ink);
}

.user-menu-head span {
  display: block;
  font-size: 9.5px;
  color: var(--muted-2);
  margin-top: 2px;
}

.user-menu button,
.user-menu-link {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 34px;
  border: 0;
  background: transparent;
  border-radius: 7px;
  padding: 0 9px;
  color: var(--ink-2);
  font-size: 11.5px;
  text-align: left;
}

.user-menu button:hover,
.user-menu-link:hover {
  background: #f4f8fb;
  color: var(--ink);
  text-decoration: none;
}

.user-menu button svg,
.user-menu-link svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.user-menu button.danger {
  color: var(--red);
}

.user-menu button.danger svg {
  color: var(--red);
}

body.modal-open {
  overflow: hidden;
}

/* 独立页面中的表单与设置布局 */
.card-pad {
  padding: 26px 28px;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid #eef3f7;
}

body.password-view,
body.password-view .admin-shell,
body.password-view .workspace {
  height: 100vh;
  overflow: hidden;
}

body.password-view .content--password {
  height: calc(100vh - var(--topbar-h));
  min-height: 0;
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.settings-page {
  width: 100%;
  max-width: 840px;
  max-height: 100%;
  margin: 0 auto;
}

body.password-view .settings-page {
  display: flex;
  align-items: center;
  justify-content: center;
}

body.password-view .settings-card {
  width: 100%;
  max-height: 100%;
}

.settings-card {
  overflow: hidden;
}

.settings-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 30px;
  border-bottom: 1px solid #edf3f6;
  background: linear-gradient(135deg, #f7fdfb 0%, #f7fbff 100%);
}

.settings-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(145deg, #1ab5a1, #0b8f85);
  color: #fff;
  display: grid;
  place-items: center;
  flex: none;
  box-shadow: 0 7px 18px rgba(15, 159, 143, 0.22);
}

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

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

.settings-head-copy h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.2px;
}

.settings-head-copy p {
  margin: 4px 0 0;
  font-size: 10.5px;
  line-height: 1.5;
  color: #8095a2;
}

.settings-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
  border: 1px solid #d8eee8;
  border-radius: 999px;
  background: #fff;
  padding: 5px 10px;
  color: #168d80;
  font-size: 9.5px;
  font-weight: 700;
}

.settings-badge i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #1ab5a1;
  box-shadow: 0 0 0 3px rgba(26, 181, 161, 0.1);
}

.settings-form {
  display: block;
}

.settings-body {
  display: flex;
  flex-direction: column;
  gap: 17px;
  padding: 24px 30px 21px;
}

.settings-form .field {
  gap: 8px;
}

.settings-form .field-label {
  font-size: 11.5px;
  color: #425d6c;
}

.settings-form .input {
  height: 44px;
  border-radius: 9px;
  background: #fbfdfe;
}

.settings-form .input:focus {
  background: #fff;
}

.settings-form .field-hint {
  font-size: 9.5px;
  color: #9bafbb;
  line-height: 1.5;
}

.settings-form .strength {
  margin-top: 0;
}

.settings-form .match-status {
  font-size: 9.5px;
}

.password-rules {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  border: 1px solid #edf3f6;
  border-radius: 10px;
  background: #f9fcfd;
}

.password-rule {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 3px 4px;
}

.password-rule > span {
  color: #b6c8d2;
  font-size: 9px;
  font-weight: 700;
  font-family: "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.5px;
  flex: none;
}

.password-rule p {
  margin: 0;
  font-size: 9.5px;
  line-height: 1.45;
  color: #8298a5;
}

.password-rule p b {
  display: block;
  color: #536d7a;
  font-size: 10px;
  font-weight: 600;
  margin-bottom: 1px;
}

.settings-form .form-note {
  margin: 0;
}

.settings-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 30px;
  border-top: 1px solid #edf3f6;
  background: #fbfdfe;
}

.settings-actions-note {
  font-size: 9.5px;
  color: #9bafbb;
}

.settings-actions-buttons {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: none;
}

.settings-actions-buttons .btn {
  min-width: 104px;
  justify-content: center;
}

.auth-head h2 {
  margin-top: 0;
}

.auth-form .field {
  gap: 6px;
}

@media (min-width: 761px) and (max-height: 820px) {
  .settings-card-head {
    padding: 15px 26px;
  }

  .settings-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

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

  .settings-head-copy h2 {
    font-size: 15px;
  }

  .settings-body {
    gap: 13px;
    padding: 18px 26px 16px;
  }

  .settings-form .field {
    gap: 6px;
  }

  .settings-form .input {
    height: 40px;
  }

  .password-rules {
    display: none;
  }

  .settings-actions {
    padding: 12px 26px;
  }
}

@media (max-width: 760px) {
  .settings-card-head {
    padding: 18px 19px;
    align-items: flex-start;
  }

  .settings-badge {
    display: none;
  }

  .settings-body {
    padding: 21px 19px;
    gap: 17px;
  }

  .password-rules {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 10px 12px;
  }

  .password-rule {
    padding: 2px 0;
  }

  .password-rule p b {
    display: inline;
    margin-right: 5px;
  }

  .settings-actions {
    align-items: stretch;
    flex-direction: column;
    padding: 14px 19px 18px;
  }

  .settings-actions-note {
    order: 2;
    text-align: center;
  }

  .settings-actions-buttons {
    order: 1;
  }

  .settings-actions-buttons .btn {
    flex: 1;
    min-width: 0;
    justify-content: center;
  }
}

.menu-toggle {
  display: none;
}

/* ------------------------------- Content -------------------------------- */
.content {
  width: 100%;
  max-width: 1640px;
  margin: 0 auto;
  padding: 27px 28px 44px;
  flex: 1;
}

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

.heading-copy {
  min-width: 0;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--teal-dark);
  text-transform: uppercase;
  margin-bottom: 7px;
}

.eyebrow::before {
  content: "";
  width: 17px;
  height: 2px;
  border-radius: 2px;
  background: var(--teal);
}

.page-heading h1 {
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -0.025em;
  font-weight: 800;
  color: var(--ink);
}

.page-heading .sub {
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.6;
}

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

/* --------------------------- Dashboard hero ----------------------------- */
.dash-hero {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: radial-gradient(900px 360px at 92% -20%, #155066 0%, transparent 65%),
    linear-gradient(120deg, #0c293f 0%, #0b3344 56%, #0b3b43 100%);
  color: #fff;
  padding: 25px 27px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  box-shadow: 0 15px 34px rgba(9, 36, 55, 0.13);
}

.dash-hero::before {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  border: 1px solid rgba(72, 204, 185, 0.16);
  border-radius: 50%;
  right: -90px;
  top: -130px;
  box-shadow: 0 0 0 55px rgba(72, 204, 185, 0.035),
    0 0 0 110px rgba(72, 204, 185, 0.018);
}

.dash-hero-copy {
  position: relative;
  z-index: 2;
  min-width: 0;
}

.dash-greeting {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: rgba(195, 229, 235, 0.6);
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.dash-greeting::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #45d5bf;
  box-shadow: 0 0 0 4px rgba(69, 213, 191, 0.1);
}

.dash-hero h2 {
  font-size: 25px;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.dash-hero h2 em {
  font-style: normal;
  color: #69dccc;
}

.dash-hero p {
  margin-top: 7px;
  font-size: 11px;
  color: rgba(203, 230, 236, 0.52);
  line-height: 1.7;
  max-width: 600px;
}

.dash-hero .hero-date {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: rgba(201, 231, 237, 0.48);
}

.hero-date svg {
  width: 14px;
  height: 14px;
  color: #56cbbd;
}

.dash-hero-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  position: relative;
  z-index: 2;
  flex: none;
}

.btn-on-dark {
  height: 36px;
  padding: 0 14px;
  border-radius: 9px;
  border: 1px solid rgba(212, 240, 244, 0.16);
  background: rgba(255, 255, 255, 0.07);
  color: rgba(235, 249, 251, 0.9);
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(6px);
}

.btn-on-dark:hover {
  background: rgba(255, 255, 255, 0.13);
}

.btn-on-dark.primary {
  background: #19ad9d;
  border-color: #19ad9d;
  color: #fff;
  box-shadow: 0 6px 18px rgba(16, 160, 143, 0.26);
}

.btn-on-dark.primary:hover {
  background: #12988b;
}

.btn-on-dark svg {
  width: 15px;
  height: 15px;
}

/* ------------------------------ Stat cards ------------------------------ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 18px;
}

.stat-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 18px 19px 15px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: #dbe8f2;
}

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

.stat-icon {
  width: 35px;
  height: 35px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--teal-soft);
  color: var(--teal-dark);
}

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

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

.stat-icon.violet {
  background: var(--violet-soft);
  color: var(--violet);
}

.stat-icon.amber {
  background: var(--amber-soft);
  color: var(--amber);
}

.stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 5px;
}

.stat-value {
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.stat-value small {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted-2);
  letter-spacing: 0;
}

.stat-trend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 20px;
  padding: 0 6px;
  border-radius: 5px;
  font-size: 9.5px;
  font-weight: 700;
  background: var(--green-soft);
  color: var(--green);
  white-space: nowrap;
}

.stat-trend.down {
  background: var(--red-soft);
  color: var(--red);
}

.stat-trend svg {
  width: 10px;
  height: 10px;
}

.stat-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 13px;
  padding-top: 11px;
  border-top: 1px solid #f0f4f8;
  font-size: 9.5px;
  color: var(--muted-2);
}

.stat-foot b {
  color: var(--ink-2);
  font-weight: 600;
}

.sparkline {
  position: absolute;
  right: 15px;
  bottom: 38px;
  width: 103px;
  height: 38px;
  opacity: 0.9;
}

.sparkline svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* ------------------------------ Chart cards ----------------------------- */
.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(290px, 0.85fr);
  gap: 15px;
  margin-bottom: 18px;
}

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

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 19px 0;
}

.card-head h3 {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.card-head p {
  margin-top: 3px;
  font-size: 9.5px;
  color: var(--muted-2);
}

.card-head .head-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.legend {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 9.5px;
  color: var(--muted);
  padding-top: 2px;
}

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

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

.legend i.blue {
  background: #9fc0f9;
}

.period-select {
  height: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
  font-size: 9.5px;
  padding: 0 24px 0 9px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237c8da1' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 7px center;
  outline: none;
  cursor: pointer;
}

.chart-wrap {
  padding: 13px 15px 10px;
}

.line-chart {
  width: 100%;
  height: auto;
  display: block;
}

.chart-axis-label {
  font-size: 8px;
  fill: #a5b3c0;
  font-family: var(--font);
}

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

.chart-tooltip-bg {
  filter: drop-shadow(0 4px 10px rgba(12, 34, 54, 0.14));
}

.donut-section {
  padding: 9px 20px 16px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.donut {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: conic-gradient(#14a191 0 64%, #f2b755 64% 85%, #dbe5ee 85% 100%);
  position: relative;
  flex: none;
  box-shadow: inset 0 0 0 1px rgba(12, 49, 70, 0.03);
}

.donut::after {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(18, 50, 73, 0.04);
}

.donut-center {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.donut-center strong {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.1;
}

.donut-center span {
  font-size: 8.5px;
  color: var(--muted-2);
  margin-top: 3px;
}

.donut-legend {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 11px;
  min-width: 0;
}

.dl-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: var(--muted);
}

.dl-item i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--teal);
  flex: none;
}

.dl-item.warning i {
  background: #f2b755;
}

.dl-item.muted i {
  background: #dbe5ee;
}

.dl-item b {
  margin-left: auto;
  color: var(--ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.dashboard-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(290px, 0.85fr);
  gap: 15px;
}

.recent-card {
  overflow: hidden;
}

.recent-list {
  padding: 8px 14px 12px;
}

.recent-row {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) 0.8fr 0.75fr 0.7fr;
  align-items: center;
  gap: 12px;
  padding: 9px 5px;
  border-bottom: 1px solid #f2f6f9;
  font-size: 10.5px;
}

.recent-row:last-child {
  border-bottom: 0;
}

.recent-row .r-name {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.mini-avatar {
  width: 27px;
  height: 27px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--teal-dark);
  background: var(--teal-soft);
  flex: none;
}

.mini-avatar.blue {
  color: var(--blue);
  background: var(--blue-soft);
}

.mini-avatar.amber {
  color: #a96d10;
  background: var(--amber-soft);
}

.r-name strong {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.r-name span {
  display: block;
  font-size: 8px;
  color: var(--muted-2);
  margin-top: 1px;
}

.r-muted {
  color: var(--muted-2);
  font-size: 9.5px;
}

.quick-card {
  padding: 17px 19px 19px;
  background:
    radial-gradient(430px 240px at 110% -20%, rgba(21, 164, 149, 0.13), transparent 70%),
    #0c293c;
  border-color: #0c293c;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.quick-card::after {
  content: "";
  width: 190px;
  height: 190px;
  border: 1px solid rgba(84, 214, 196, 0.13);
  border-radius: 50%;
  position: absolute;
  right: -85px;
  bottom: -95px;
  box-shadow: 0 0 0 40px rgba(84, 214, 196, 0.025);
}

.quick-card .q-eyebrow {
  font-size: 8.5px;
  letter-spacing: 0.14em;
  color: #55cfbf;
  font-weight: 700;
  margin-bottom: 10px;
}

.quick-card h3 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #f1fafb;
}

.quick-card p {
  font-size: 9.5px;
  line-height: 1.7;
  color: rgba(199, 229, 235, 0.5);
  margin-top: 6px;
  max-width: 245px;
}

.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 17px;
  position: relative;
  z-index: 2;
}

.quick-action {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 37px;
  padding: 0 10px;
  border: 1px solid rgba(206, 238, 243, 0.11);
  background: rgba(255, 255, 255, 0.055);
  border-radius: 8px;
  color: rgba(231, 248, 250, 0.86);
  font-size: 9.5px;
  font-weight: 600;
  text-align: left;
  transition: background 0.17s ease;
}

.quick-action:hover {
  background: rgba(255, 255, 255, 0.1);
}

.quick-action svg {
  width: 14px;
  height: 14px;
  color: #56d2c2;
  flex: none;
}

.quick-foot {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(207, 239, 244, 0.09);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  position: relative;
  z-index: 2;
  font-size: 9px;
  color: rgba(197, 228, 234, 0.36);
}

.quick-foot b {
  color: #65d7c7;
  font-weight: 600;
}

/* ------------------------------ Filter card ----------------------------- */
.filter-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 15px;
  box-shadow: var(--shadow-sm);
}

.filter-grid {
  display: flex;
  align-items: flex-end;
  gap: 11px;
  flex-wrap: wrap;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 130px;
}

.filter-field.wide {
  min-width: 195px;
  flex: 1;
  max-width: 260px;
}

.filter-field label {
  font-size: 9.5px;
  color: var(--muted);
  font-weight: 600;
  padding-left: 1px;
}

.filter-field .input,
.filter-field .select {
  height: 36px;
  font-size: 11.5px;
  border-radius: 8px;
}

.filter-field .input-wrap > svg {
  width: 15px;
  height: 15px;
  left: 10px;
}

.filter-field .input-wrap .input {
  padding-left: 31px;
}

.filter-date-range {
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-date-range span {
  color: #b0becb;
  font-size: 10px;
  flex: none;
}

.filter-date-range .input {
  width: 132px;
  padding: 0 8px;
  font-size: 10.5px;
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding-bottom: 1px;
}

.filter-actions .btn {
  height: 36px;
  font-size: 11.5px;
}

.filter-toggle {
  display: none;
}

.filter-more {
  display: none;
}

/* ------------------------------- Toolbar -------------------------------- */
.table-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 17px;
  border-bottom: 1px solid #eef3f7;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex-wrap: wrap;
}

.toolbar-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 7px;
}

.count-badge {
  height: 18px;
  min-width: 20px;
  padding: 0 6px;
  border-radius: 99px;
  background: #f1f5f9;
  color: var(--muted);
  font-size: 9px;
  display: inline-grid;
  place-items: center;
  font-weight: 600;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.toolbar-right .btn {
  height: 32px;
  font-size: 11px;
  padding: 0 11px;
}

.batch-note {
  font-size: 10px;
  color: var(--teal-dark);
  background: var(--teal-soft);
  border-radius: 6px;
  padding: 4px 8px;
  font-weight: 600;
  white-space: nowrap;
}

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

.table-scroll::-webkit-scrollbar {
  height: 7px;
}

.table-scroll::-webkit-scrollbar-thumb {
  background: #d7e2ec;
  border-radius: 10px;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1180px;
}

.data-table th {
  position: relative;
  background: #f8fafc;
  color: #73869a;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  padding: 10px 12px;
  white-space: nowrap;
  border-bottom: 1px solid #eaf0f5;
  height: 37px;
}

.data-table th.num,
.data-table td.num {
  text-align: right;
}

.data-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
  color: var(--ink-2);
  vertical-align: middle;
  white-space: nowrap;
}

.data-table tbody tr {
  transition: background 0.14s ease;
}

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

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

.data-table tbody tr.selected {
  background: #f5fcfa;
}

.data-table .checkbox-cell {
  width: 42px;
  padding-right: 4px;
  text-align: center;
}

.enterprise-table th,
.enterprise-table td {
  padding-left: 9px;
  padding-right: 9px;
}

.enterprise-table .cp-text strong {
  max-width: 172px;
}

.enterprise-table .entity-avatar {
  width: 27px;
  height: 27px;
}

.enterprise-table .row-actions {
  gap: 9px;
}

.enterprise-table th.sticky-actions,
.enterprise-table td.sticky-actions {
  padding-left: 12px;
  padding-right: 12px;
}

.checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 4px;
  border: 1.5px solid #c9d6e2;
  background: #fff;
  margin: 0;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  vertical-align: middle;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.checkbox:checked {
  background: var(--teal);
  border-color: var(--teal);
}

.checkbox:checked::after {
  content: "";
  width: 7px;
  height: 4px;
  border-left: 1.7px solid #fff;
  border-bottom: 1.7px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}

.checkbox:indeterminate {
  background: var(--teal);
  border-color: var(--teal);
}

.checkbox:indeterminate::after {
  content: "";
  width: 7px;
  height: 1.5px;
  background: #fff;
  border-radius: 2px;
}

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

.entity-avatar {
  width: 29px;
  height: 29px;
  border-radius: 8px;
  background: linear-gradient(145deg, #eaf7f5, #dff1ee);
  color: var(--teal-dark);
  font-size: 10.5px;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex: none;
}

.entity-avatar.c1 {
  background: #edf2ff;
  color: #3763d8;
}

.entity-avatar.c2 {
  background: #fff5e5;
  color: #a97618;
}

.entity-avatar.c3 {
  background: #f3efff;
  color: #6c56c6;
}

.cell-primary .cp-text {
  min-width: 0;
}

.cp-text strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
  max-width: 205px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cp-text span {
  display: block;
  font-size: 12px;
  color: var(--muted-2);
  margin-top: 1px;
}

.tax-no {
  font-family: inherit;
  font-size: 13px;
  color: #33475b;
  letter-spacing: 0.015em;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 10px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1;
}

.pill::before {
  content: "";
  width: 4.5px;
  height: 4.5px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.pill.no-dot::before {
  display: none;
}

.pill-success {
  background: var(--green-soft);
  color: #128254;
}

.pill-warning {
  background: var(--amber-soft);
  color: #ac7014;
}

.pill-danger {
  background: var(--red-soft);
  color: #c33b40;
}

.pill-muted {
  background: #f1f5f8;
  color: #7c8da0;
}

.pill-blue {
  background: var(--blue-soft);
  color: #2c55cc;
}

.pill-violet {
  background: var(--violet-soft);
  color: #6549c8;
}

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

.inline-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--muted);
}

.inline-status i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #bdcad6;
}

.inline-status.ok {
  color: #15875a;
}

.inline-status.ok i {
  background: #1caa70;
}

.inline-status.fail {
  color: #c4484c;
}

.inline-status.fail i {
  background: #dd4b50;
}

.data-table th.sticky-actions,
.data-table td.sticky-actions {
  position: sticky;
  right: 0;
  z-index: 2;
  background: #fff;
  box-shadow: -10px 0 14px -10px rgba(18, 45, 68, 0.22);
}

.data-table th.sticky-actions {
  background: #f8fafc;
  z-index: 3;
}

.data-table tbody tr:hover td.sticky-actions {
  background: #fbfdff;
}

.data-table tbody tr.selected td.sticky-actions {
  background: #f5fcfa;
}

/* 收入/成本宽表：横向滚动时固定复选框与客户名称 */
.data-table th.sticky-check,
.data-table td.sticky-check {
  position: sticky;
  left: 0;
  z-index: 3;
  background: #fff;
}

.data-table th.sticky-check {
  background: #f8fafc;
  z-index: 6;
}

.data-table th.sticky-name,
.data-table td.sticky-name {
  position: sticky;
  left: 42px;
  z-index: 3;
  min-width: 205px;
  background: #fff;
  box-shadow: 10px 0 14px -12px rgba(18, 45, 68, 0.24);
}

.data-table th.sticky-name {
  background: #f8fafc;
  z-index: 6;
}

.data-table tbody tr:hover td.sticky-check,
.data-table tbody tr:hover td.sticky-name {
  background: #fbfdff;
}

.data-table tbody tr.selected td.sticky-check,
.data-table tbody tr.selected td.sticky-name {
  background: #f5fcfa;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.row-actions .divider {
  width: 1px;
  height: 11px;
  background: #e6edf3;
}

.date-cell {
  font-size: 13px;
  color: #5f7488;
  font-variant-numeric: tabular-nums;
}

.money {
  font-weight: 600;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.money.strong {
  color: var(--ink);
  font-weight: 700;
}

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

.rate {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.rate.high {
  color: #c6474c;
}

.rate.normal {
  color: #15875a;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 17px;
  border-top: 1px solid #eef3f7;
  background: #fcfdff;
}

.page-info {
  font-size: 9.5px;
  color: var(--muted-2);
}

.page-info b {
  color: var(--ink-2);
  font-weight: 600;
}

.page-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination-right {
  display: flex;
  align-items: center;
  gap: 13px;
}

.page-size {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #8297a8;
  font-size: 9.5px;
  white-space: nowrap;
}

.page-size-select {
  height: 27px;
  border-radius: 6px;
  border: 1px solid #e1eaf1;
  background-color: #fff;
  color: #536b7d;
  font-size: 9.5px;
  padding: 0 22px 0 7px;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237c8da1' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 7px center;
}

.page-size-select:focus {
  border-color: #9bd3ca;
  box-shadow: 0 0 0 3px rgba(15, 159, 143, 0.08);
}

.page-ellipsis {
  color: #b3c0cc;
  padding: 0 2px;
  font-size: 10px;
}

.page-btn {
  min-width: 27px;
  height: 27px;
  border-radius: 6px;
  border: 1px solid #e4ecf3;
  background: #fff;
  color: var(--muted);
  font-size: 10px;
  display: grid;
  place-items: center;
  padding: 0 6px;
}

.page-btn:hover:not(:disabled) {
  border-color: #bcd3dd;
  color: var(--ink);
}

.page-btn.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  font-weight: 600;
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-btn svg {
  width: 12px;
  height: 12px;
}

.empty-state {
  padding: 48px 20px;
  text-align: center;
}

.empty-visual {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  margin: 0 auto 12px;
  background: #f3f7fa;
  color: #9bacbc;
  display: grid;
  place-items: center;
}

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

.empty-state h4 {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
}

.empty-state p {
  font-size: 10px;
  color: var(--muted-2);
  margin-top: 4px;
}

/* ----------------------------- KPI strip -------------------------------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 15px;
}

.kpi-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 14px 15px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

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

.kpi-label {
  font-size: 9.5px;
  color: var(--muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-label i {
  width: 5px;
  height: 5px;
  border-radius: 1px;
  background: var(--teal);
  flex: none;
}

.kpi-label.blue i {
  background: #5d86ee;
}

.kpi-label.amber i {
  background: #e8a638;
}

.kpi-label.violet i {
  background: #8066d4;
}

.kpi-value {
  font-size: 19px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.kpi-value small {
  font-size: 9px;
  font-weight: 500;
  color: var(--muted-2);
  margin-left: 2px;
  letter-spacing: 0;
}

.kpi-sub {
  margin-top: 5px;
  font-size: 8.5px;
  color: var(--muted-2);
  display: flex;
  align-items: center;
  gap: 4px;
}

.kpi-sub .up {
  color: var(--green);
  font-weight: 700;
}

.kpi-sub .down {
  color: var(--red);
  font-weight: 700;
}

.table-summary {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 17px 12px;
  color: var(--muted-2);
  font-size: 9px;
}

.table-summary b {
  color: var(--ink-2);
  font-weight: 600;
}

/* ---------------------------- Detail page ------------------------------- */
.back-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 31px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink-2);
  font-size: 10.5px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.back-btn:hover {
  background: #f9fbfd;
  border-color: #bdd0dd;
}

.back-btn svg {
  width: 14px;
  height: 14px;
}

.back-divider {
  width: 1px;
  height: 13px;
  background: #dbe5ee;
}

.back-context {
  font-size: 10px;
  color: var(--muted-2);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 21px 23px;
  margin-bottom: 15px;
  color: #fff;
  background: radial-gradient(700px 320px at 90% -30%, #17635f 0%, transparent 64%),
    linear-gradient(115deg, #0c2a3e, #0b3a43);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.detail-hero.cost {
  background: radial-gradient(700px 320px at 90% -30%, #5b4b86 0%, transparent 64%),
    linear-gradient(115deg, #171e3a, #243052);
}

.detail-hero::after {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  border: 1px solid rgba(96, 220, 204, 0.16);
  border-radius: 50%;
  right: -80px;
  top: -110px;
  box-shadow: 0 0 0 44px rgba(96, 220, 204, 0.03);
}

.detail-hero .dh-main {
  position: relative;
  z-index: 2;
  min-width: 0;
}

.dh-kicker {
  font-size: 8.5px;
  letter-spacing: 0.13em;
  color: #56d3c1;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 7px;
}

.detail-hero.cost .dh-kicker {
  color: #b6a8f2;
}

.dh-title {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.dh-title h2 {
  font-size: 20px;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.dh-title .tax-no {
  color: rgba(201, 233, 238, 0.45);
}

.detail-hero .dh-meta {
  margin-top: 7px;
  display: flex;
  align-items: center;
  gap: 17px;
  flex-wrap: wrap;
  font-size: 9px;
  color: rgba(200, 231, 236, 0.5);
}

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

.dh-meta i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #55d2c0;
}

.dh-side {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.dh-action {
  height: 33px;
  border-radius: 8px;
  border: 1px solid rgba(218, 243, 246, 0.17);
  background: rgba(255, 255, 255, 0.07);
  color: rgba(237, 251, 252, 0.9);
  font-size: 10px;
  font-weight: 600;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dh-action:hover {
  background: rgba(255, 255, 255, 0.13);
}

.dh-action svg {
  width: 13px;
  height: 13px;
}

.detail-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: #e9f0f5;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 15px;
  box-shadow: var(--shadow-sm);
}

.ds-item {
  background: #fff;
  padding: 14px 16px;
}

.ds-label {
  font-size: 9px;
  color: var(--muted);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ds-value {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ds-value small {
  font-size: 9px;
  color: var(--muted-2);
  font-weight: 500;
}

.detail-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 13px;
  flex-wrap: wrap;
  padding: 13px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  margin-bottom: 13px;
  box-shadow: var(--shadow-sm);
}

.detail-toolbar .dt-left {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.detail-toolbar .dt-left .filter-field {
  min-width: 0;
}

.detail-toolbar .filter-field label {
  font-size: 8.5px;
}

.detail-toolbar .input {
  height: 32px;
  width: 138px;
  font-size: 10px;
}

.detail-toolbar .btn {
  height: 32px;
  font-size: 10.5px;
}

.month-table {
  min-width: 1560px;
}

.month-table th {
  font-size: 13px;
}

.month-table td {
  font-size: 13px;
}

.data-table.month-table th.sticky-first,
.data-table.month-table td.sticky-first {
  min-width: 104px;
  width: 104px;
}

/* ------------------------------ Payments -------------------------------- */
.pay-amount {
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.pay-method {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--muted);
}

.pay-method .pm-icon {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  display: grid;
  place-items: center;
  background: #e9f8ef;
  color: #159c5d;
  font-size: 10px;
  font-weight: 700;
}

.pay-method .pm-icon.alipay {
  background: #eaf2ff;
  color: #2c6fdc;
}

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

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

.progress-bar {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #22b6a3, #0e8e82);
  transition: width 0.3s ease;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
  font-size: 8px;
  color: var(--muted-2);
}

.task-type {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.task-type svg {
  width: 13px;
  height: 13px;
  color: var(--muted-2);
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f0a52c;
  display: inline-block;
  animation: pulse 1.5s ease infinite;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(240, 165, 44, 0.28);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(240, 165, 44, 0);
  }
}

/* -------------------------------- Modals -------------------------------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(6, 22, 37, 0.5);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: overlayIn 0.2s ease;
}

@keyframes overlayIn {
  from {
    opacity: 0;
  }
}

.modal {
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 48px);
  background: #fff;
  border-radius: 17px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalIn 0.24s cubic-bezier(0.2, 0.9, 0.2, 1);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
}

.modal.modal-lg {
  max-width: 720px;
}

.modal.modal-sm {
  max-width: 410px;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 19px 21px 14px;
  border-bottom: 1px solid #eff4f8;
  flex: none;
}

.modal-head-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  display: grid;
  place-items: center;
  flex: none;
}

.modal-head-icon.amber {
  background: var(--amber-soft);
  color: #ad7317;
}

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

.modal-head-icon.danger {
  background: var(--red-soft);
  color: var(--red);
}

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

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

.modal-head-copy h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.015em;
  line-height: 1.35;
}

.modal-head-copy p {
  margin-top: 3px;
  font-size: 10px;
  line-height: 1.5;
  color: var(--muted);
}

.modal-close {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #9babbb;
  display: grid;
  place-items: center;
  flex: none;
}

.modal-close:hover {
  background: #f2f6fa;
  color: var(--ink-2);
}

.modal-close svg {
  width: 16px;
  height: 16px;
}

.modal-body {
  padding: 18px 21px;
  overflow-y: auto;
  flex: 1;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  padding: 13px 21px;
  border-top: 1px solid #eff4f8;
  background: #fcfdff;
  flex: none;
}

.modal-foot .left-note {
  margin-right: auto;
  font-size: 9.5px;
  color: var(--muted-2);
  display: flex;
  align-items: center;
  gap: 5px;
}

.modal-foot .left-note svg {
  width: 13px;
  height: 13px;
  color: var(--teal);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.form-grid .span-2 {
  grid-column: span 2;
}

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

.form-grid .input,
.form-grid .select {
  height: 40px;
  font-size: 12.5px;
}

.form-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 15px;
  border-radius: 9px;
  background: #f6fafc;
  border: 1px solid #e8f0f5;
  padding: 10px 11px;
  font-size: 9.5px;
  line-height: 1.6;
  color: #6f8395;
}

.form-note svg {
  width: 14px;
  height: 14px;
  color: var(--teal-dark);
  flex: none;
  margin-top: 1px;
}

.verify-state {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f6fafc;
  border: 1px solid #e5eef4;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 10px;
  color: var(--muted);
  margin-top: 15px;
}

.verify-state svg {
  width: 15px;
  height: 15px;
  flex: none;
}

.verify-state span {
  line-height: 1.55;
}

.verify-state .spinner-dark {
  width: 16px;
  height: 16px;
  border: 2px solid #d9e6ee;
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex: none;
}

.verify-state.ok {
  border-color: #cceade;
  background: #f1fbf7;
  color: #197a57;
}

.verify-state.fail {
  border-color: #f1d4d5;
  background: #fff7f7;
  color: #b94145;
}

.match-status {
  height: 30px;
  border-radius: 8px;
  background: #f5f9fb;
  color: #8397a8;
  font-size: 9.5px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
}

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

.match-status.ok {
  background: var(--green-soft);
  color: #197a57;
}

.match-status.ok::before {
  background: #1caa70;
}

.download-scope {
  border: 1px solid #e8f0f5;
  background: #f8fbfd;
  border-radius: 10px;
  padding: 11px 13px;
  margin-bottom: 16px;
}

.scope-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}

.scope-head b {
  color: var(--ink-2);
  font-weight: 700;
}

.scope-names {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.scope-name {
  font-size: 13px;
  color: #536a7d;
  background: #fff;
  border: 1px solid #e2ebf2;
  border-radius: 5px;
  padding: 2px 6px;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.date-range-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 9px;
}

.date-range-row .range-sep {
  color: #a5b4c1;
  font-size: 10px;
}

.range-presets {
  display: flex;
  gap: 6px;
  margin-top: 9px;
  flex-wrap: wrap;
}

.range-preset {
  border: 1px solid #e4edf4;
  background: #fff;
  height: 26px;
  border-radius: 6px;
  padding: 0 8px;
  font-size: 9px;
  color: var(--muted);
}

.range-preset:hover {
  border-color: #b8d8d2;
  color: var(--teal-dark);
  background: #f5fcfa;
}

.range-preset.active {
  background: var(--teal-soft);
  border-color: #bfe7df;
  color: var(--teal-dark);
  font-weight: 600;
}

.summary-box {
  border: 1px solid #e6eef5;
  border-radius: 11px;
  overflow: hidden;
  margin-top: 16px;
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  font-size: 10px;
  color: var(--muted);
  border-bottom: 1px solid #f0f5f8;
}

.summary-row:last-child {
  border-bottom: 0;
}

.summary-row.total {
  background: #f8fbfc;
  color: var(--ink-2);
  font-weight: 700;
}

.summary-row .amount {
  color: var(--ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.pay-methods {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.pay-method-option {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #e6eef5;
  border-radius: 9px;
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.pay-method-option:hover {
  border-color: #c9ded9;
}

.pay-method-option.selected {
  border-color: #9ed8ce;
  background: #f6fcfa;
  box-shadow: 0 0 0 2px rgba(15, 159, 143, 0.06);
}

.pay-method-option input {
  accent-color: var(--teal);
  margin: 0;
}

.pm-logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #e8f8ee;
  color: #139c5b;
  font-size: 10px;
  font-weight: 800;
}

.pm-logo.alipay {
  background: #eaf2ff;
  color: #2b6edb;
}

.pm-info {
  flex: 1;
  min-width: 0;
}

.pm-info strong {
  display: block;
  font-size: 10.5px;
  color: var(--ink-2);
  font-weight: 600;
}

.pm-info span {
  display: block;
  font-size: 8.5px;
  color: var(--muted-2);
  margin-top: 1px;
}

.modal .success-state {
  text-align: center;
  padding: 12px 8px 8px;
}

.success-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  margin: 0 auto 14px;
  background: var(--teal-soft);
  color: var(--teal);
  display: grid;
  place-items: center;
  position: relative;
}

.success-icon::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1px solid #d7f0ea;
  border-radius: 50%;
}

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

.success-state h4 {
  font-size: 16px;
  color: var(--ink);
  font-weight: 700;
}

.success-state p {
  margin-top: 6px;
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.7;
}

.success-detail {
  margin-top: 16px;
  background: #f8fbfc;
  border-radius: 10px;
  padding: 11px 13px;
  text-align: left;
}

.success-detail .sd-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  padding: 4px 0;
  color: var(--muted);
}

.success-detail .sd-row b {
  color: var(--ink-2);
  font-weight: 600;
}

/* -------------------------------- Toast --------------------------------- */
.toast-root {
  position: fixed;
  z-index: 400;
  top: 18px;
  right: 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 220px;
  max-width: 370px;
  padding: 11px 14px;
  background: #102b3d;
  color: #eefafb;
  border-radius: 10px;
  box-shadow: 0 15px 36px rgba(7, 26, 42, 0.25);
  font-size: 11px;
  line-height: 1.45;
  animation: toastIn 0.3s cubic-bezier(0.2, 0.9, 0.2, 1);
  pointer-events: auto;
}

.toast svg {
  width: 16px;
  height: 16px;
  flex: none;
  color: #45d2be;
}

.toast.error svg {
  color: #ff9a9e;
}

.toast.warning svg {
  color: #f5c16c;
}

.toast.leaving {
  animation: toastOut 0.22s ease forwards;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(15px);
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateX(18px);
  }
}

/* ------------------------------ Skeleton -------------------------------- */
.loading-layer {
  min-height: 340px;
  display: grid;
  place-items: center;
}

.loading-spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2.5px solid #dce9ef;
  border-top-color: var(--teal);
  animation: spin 0.75s linear infinite;
}

.skeleton {
  background: linear-gradient(90deg, #f0f4f8 25%, #f7fafc 37%, #f0f4f8 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease infinite;
  border-radius: 6px;
}

@keyframes shimmer {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}

/* ------------------------------- Utilities ------------------------------ */
.mt-0 {
  margin-top: 0 !important;
}

.mono {
  font-variant-numeric: tabular-nums;
}

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

.mobile-only {
  display: none;
}

.overlay-sidebar {
  display: none;
}

/* ============================== RESPONSIVE ============================== */
@media (max-width: 1280px) {
  .auth-page {
    grid-template-columns: minmax(0, 1fr) minmax(440px, 0.92fr);
  }

  .visual-card-a {
    right: 30px;
  }

  .visual-card-b {
    right: 95px;
  }

  .auth-visual {
    padding-left: 42px;
    padding-right: 42px;
  }

  .dash-grid,
  .dashboard-bottom {
    grid-template-columns: minmax(0, 1.4fr) minmax(275px, 0.85fr);
  }
}

@media (max-width: 1120px) {
  :root {
    --sidebar-w: 225px;
  }

  .content {
    padding: 23px 21px 38px;
  }

  .topbar {
    padding: 0 21px;
  }

  .topbar-date {
    display: none;
  }

  .auth-visual {
    padding-left: 34px;
    padding-right: 34px;
  }

  .auth-hero h1 {
    font-size: 38px;
  }

  .visual-card-a {
    right: 22px;
    width: 195px;
  }

  .visual-card-b {
    right: 52px;
  }

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

  .stats-grid {
    gap: 12px;
  }
}

@media (max-width: 960px) {
  :root {
    --topbar-h: 62px;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.3, 0.8, 0.3, 1);
    box-shadow: 0 0 50px rgba(3, 17, 30, 0.28);
    width: 246px;
  }

  .sidebar.open {
    transform: none;
  }

  .workspace {
    margin-left: 0;
  }

  .overlay-sidebar {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(7, 23, 38, 0.45);
    z-index: 45;
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

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

  .menu-toggle {
    display: grid;
  }

  .topbar-brand {
    border-right: 0;
    padding-right: 0;
  }

  .topbar-crumb {
    display: none;
  }

  .topbar {
    padding: 0 16px;
  }

  .content {
    padding: 21px 16px 34px;
  }

  .dash-grid,
  .dashboard-bottom {
    grid-template-columns: 1fr;
  }

  .quick-card {
    min-height: 210px;
  }

  .auth-page {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    display: none;
  }

  .auth-panel {
    min-height: 100vh;
    padding: 34px 24px 58px;
  }

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

  .auth-panel-footer {
    position: static;
    margin-top: 28px;
  }
}

@media (max-width: 700px) {
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
    margin-bottom: 17px;
  }

  .page-heading h1 {
    font-size: 21px;
  }

  .heading-actions {
    width: 100%;
  }

  .heading-actions .btn {
    flex: 1;
  }

  .dash-hero {
    flex-direction: column;
    align-items: flex-start;
    padding: 21px 19px;
    gap: 18px;
  }

  .dash-hero h2 {
    font-size: 21px;
  }

  .dash-hero-actions {
    width: 100%;
  }

  .dash-hero-actions .btn-on-dark {
    flex: 1;
    justify-content: center;
  }

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

  .stat-card {
    padding: 16px 17px 13px;
  }

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

  .sparkline {
    bottom: 33px;
    height: 33px;
  }

  .kpi-grid {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  .kpi-card {
    padding: 12px;
  }

  .kpi-value {
    font-size: 17px;
  }

  .filter-card {
    padding: 12px;
  }

  .filter-grid {
    gap: 9px;
  }

  .filter-field {
    flex: 1 1 calc(50% - 5px);
    min-width: 0;
  }

  .filter-field.wide {
    flex-basis: 100%;
    max-width: none;
  }

  .filter-actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-end;
  }

  .filter-actions .btn {
    flex: 1;
  }

  .filter-date-range {
    width: 100%;
  }

  .filter-date-range .input {
    width: auto;
    flex: 1;
    min-width: 0;
  }

  .table-toolbar {
    padding: 12px;
    flex-wrap: wrap;
  }

  .toolbar-right {
    width: 100%;
  }

  .toolbar-right .btn {
    flex: 1;
  }

  .pagination {
    padding: 11px 12px;
  }

  .page-info {
    display: none;
  }

  .page-controls {
    width: auto;
    flex: 1;
    justify-content: flex-end;
  }

  .pagination-right {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .page-size {
    font-size: 9px;
  }

  .page-size-select {
    height: 26px;
  }

  .detail-hero {
    flex-direction: column;
    align-items: flex-start;
    padding: 18px;
    gap: 14px;
  }

  .dh-side {
    width: 100%;
  }

  .dh-action {
    flex: 1;
    justify-content: center;
  }

  .detail-stats {
    grid-template-columns: 1fr 1fr;
  }

  .ds-value {
    font-size: 15px;
  }

  .detail-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .detail-toolbar .dt-left {
    justify-content: space-between;
  }

  .detail-toolbar .dt-left .filter-field {
    flex: 1;
  }

  .detail-toolbar .input {
    width: 100%;
  }

  .detail-toolbar > .btn {
    width: 100%;
  }

  .recent-row {
    grid-template-columns: minmax(0, 1fr) 0.72fr;
  }

  .recent-row > :nth-child(3),
  .recent-row > :nth-child(4) {
    display: none;
  }

  .modal {
    max-height: calc(100vh - 28px);
  }

  .overlay {
    padding: 14px;
    align-items: flex-end;
  }

  .modal {
    border-radius: 17px 17px 13px 13px;
  }

  .modal-head {
    padding: 16px 16px 12px;
  }

  .modal-body {
    padding: 15px 16px;
  }

  .modal-foot {
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .form-grid .span-2 {
    grid-column: span 1;
  }

  .date-range-row {
    grid-template-columns: 1fr;
  }

  .date-range-row .range-sep {
    display: none;
  }

  .toast-root {
    top: 12px;
    left: 12px;
    right: 12px;
    align-items: stretch;
  }

  .toast {
    min-width: 0;
    max-width: none;
  }

  .topbar-right > .icon-btn:first-child,
  .topbar-divider {
    display: none;
  }

  .user-chip .u-info,
  .user-chip .u-caret {
    display: none;
  }

  .user-chip {
    padding: 2px;
  }

  .auth-panel {
    padding: 26px 20px 38px;
  }

  .auth-mobile-brand {
    margin-bottom: 28px;
  }

  .auth-head h2 {
    font-size: 26px;
  }

  .auth-panel-footer {
    font-size: 8.5px;
  }
}

@media (max-width: 380px) {
  .content {
    padding-left: 12px;
    padding-right: 12px;
  }

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

  .detail-stats {
    grid-template-columns: 1fr;
  }

  .captcha-row {
    grid-template-columns: 1fr 103px;
  }

  .auth-panel {
    padding-left: 16px;
    padding-right: 16px;
  }
}

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

/* ==========================================================================
   Fresh light theme
   白底、薄荷绿与浅天蓝，降低大面积深色带来的厚重感
   ========================================================================== */
:root {
  --ink: #123b4a;
  --ink-2: #3f6070;
  --text: #2d5160;
  --muted: #7b94a2;
  --muted-2: #9db3be;
  --line: #e2eff3;
  --line-strong: #d2e5eb;
  --bg: #f3fafb;
  --navy: #123b4a;
  --navy-2: #1b5763;
  --teal: #10a596;
  --teal-dark: #0a8278;
  --teal-soft: #e6f8f4;
  --shadow-sm: 0 2px 8px rgba(31, 92, 103, 0.035);
  --shadow: 0 14px 36px rgba(31, 92, 103, 0.07);
}

body {
  background: #f3fafb;
}

/* ------------------------------ Light sidebar --------------------------- */
.sidebar {
  background: linear-gradient(180deg, #fcffff 0%, #f2fbf9 54%, #eef8fc 100%);
  border-right: 1px solid #e1eef2;
  box-shadow: 10px 0 30px rgba(32, 92, 105, 0.035);
  color: #234b59;
}

.sidebar-head .nav-label {
  color: #90aab4;
}

.sidebar-head .ver {
  color: #7b9ba4 !important;
  border-color: #d8eaed !important;
  background: rgba(255, 255, 255, 0.7);
}

.workspace-chip {
  background: #ffffff;
  border-color: #dcecef;
  box-shadow: 0 5px 15px rgba(36, 102, 111, 0.04);
}

.workspace-chip .ws-logo {
  background: linear-gradient(145deg, #ddf6f0, #d8f0f7);
  color: #08766d;
}

.workspace-chip strong {
  color: #214d5b;
}

.workspace-chip span {
  color: #88a3ad;
}

.workspace-chip .ws-arrow {
  color: #9bb3bc;
}

.nav-label {
  color: #a1b8c1;
}

.nav-item {
  color: #567381;
}

.nav-item svg {
  color: #87a7b1;
}

.nav-item:hover {
  background: #ebf8f5;
  color: #0b665f;
}

.nav-item:hover svg {
  color: #0f9f8f;
}

.nav-item.active {
  color: #076a63;
  background: linear-gradient(90deg, #dff5ef, #effbf8);
  box-shadow: inset 0 0 0 1px #cfede6, 0 5px 14px rgba(15, 159, 143, 0.07);
}

.nav-item.active svg {
  color: #0d9688;
}

.nav-item.active::before {
  background: #10a596;
  box-shadow: 0 0 8px rgba(16, 165, 150, 0.25);
}

.nav-badge {
  background: #fff3e0;
  color: #a57116;
}

.nav-badge.teal {
  background: #e0f7f1;
  color: #0a8278;
}

.service-card {
  background: #ffffff;
  border-color: #dcecef;
  box-shadow: 0 5px 16px rgba(33, 92, 103, 0.035);
}

.service-head {
  color: #64838d;
}

.service-card p {
  color: #91a8b1;
}

.sidebar-meta {
  color: #9aafb8;
}

.sidebar-meta .ver {
  border-color: #dcecef;
  color: #86a1aa;
}

/* -------------------------------- Auth ---------------------------------- */
.auth-page {
  background: #f7fbfc;
}

.auth-visual {
  color: #143b4a;
  background: radial-gradient(900px 650px at 8% -10%, #dcf7f0 0%, transparent 62%),
    radial-gradient(720px 560px at 104% 94%, #dceeff 0%, transparent 60%),
    linear-gradient(145deg, #f8fffd 0%, #eaf9f6 54%, #eaf5fc 100%);
}

.auth-visual::before {
  background-image: linear-gradient(rgba(15, 130, 120, 0.065) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 130, 120, 0.065) 1px, transparent 1px);
}

.auth-visual::after {
  border-color: rgba(15, 159, 143, 0.16);
  box-shadow: 0 0 0 85px rgba(15, 159, 143, 0.028),
    0 0 0 170px rgba(52, 102, 246, 0.016);
}

.auth-brand-row .brand-mark {
  box-shadow: 0 9px 22px rgba(15, 130, 120, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.auth-visual .brand.on-dark .brand-name {
  color: #123b4a;
}

.auth-visual .brand.on-dark .brand-sub {
  color: #7f9da7;
}

.auth-badge {
  border-color: rgba(15, 130, 120, 0.14);
  background: rgba(255, 255, 255, 0.68);
  color: #557883;
  box-shadow: 0 4px 14px rgba(34, 102, 112, 0.03);
}

.auth-badge .dot {
  background: #10a596;
  box-shadow: 0 0 0 4px rgba(16, 165, 150, 0.1);
}

.auth-kicker {
  color: #0a8a7d;
}

.auth-kicker::before {
  background: #10a596;
}

.auth-hero h1 {
  color: #123b4a;
}

.auth-hero h1 span {
  background: linear-gradient(92deg, #0c9f8f 4%, #2b7caf 62%, #5d8cd4 108%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-hero > p {
  color: #5d7b88;
}

.hero-proof strong {
  color: #174b59;
}

.hero-proof-item span {
  color: #829da8;
}

.hero-proof-divider {
  background: rgba(55, 108, 118, 0.14);
}

.visual-card {
  border-color: rgba(15, 130, 120, 0.12);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 22px 48px rgba(28, 92, 104, 0.1);
}

.visual-card-a .vc-head {
  color: #6d8a95;
}

.vc-live {
  color: #0a8a7d;
}

.vc-live::before {
  background: #12a594;
}

.visual-card-a strong {
  color: #123b4a;
}

.visual-card-a > span {
  color: #8ba2ac !important;
}

.vc-bars i {
  background: linear-gradient(to top, #d7f2ec, #20aa99);
}

.vc-ring {
  background: conic-gradient(#10a596 0 98.6%, rgba(15, 80, 90, 0.08) 98.6% 100%);
}

.vc-ring::after {
  background: #ffffff;
}

.visual-card-b strong {
  color: #123b4a;
}

.visual-card-b span {
  color: #819ba5;
}

.auth-foot {
  color: #8ea6af;
}

.auth-panel {
  background: radial-gradient(680px 380px at 100% 0%, #edfaf6 0%, transparent 55%),
    #fbfdfe;
}

.auth-panel-footer {
  color: #9fb2bc;
}

.auth-legal {
  color: #9fb0ba;
}

.auth-legal a {
  color: #6f8c98;
}

.btn-primary {
  background: linear-gradient(135deg, #17b3a2 0%, #0a8d82 100%);
  box-shadow: 0 8px 20px rgba(16, 165, 150, 0.19);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #12a695 0%, #08776f 100%);
}

.demo-box {
  border-color: #cde8e1;
  background: #f4fcfa;
}

/* ---------------------------- Dashboard hero ---------------------------- */
.dash-hero {
  background: radial-gradient(900px 380px at 92% -20%, #d8f2ee 0%, transparent 66%),
    linear-gradient(118deg, #e9faf5 0%, #e7f5fc 58%, #f2fbff 100%);
  color: #143b4a;
  box-shadow: 0 16px 38px rgba(30, 100, 108, 0.07);
  border: 1px solid #dcefe9;
}

.dash-hero::before {
  border-color: rgba(15, 159, 143, 0.16);
  box-shadow: 0 0 0 55px rgba(15, 159, 143, 0.025),
    0 0 0 110px rgba(52, 102, 246, 0.012);
}

.dash-greeting {
  color: #6f8c95;
}

.dash-greeting::before {
  background: #12a594;
  box-shadow: 0 0 0 4px rgba(18, 165, 148, 0.1);
}

.dash-hero h2 {
  color: #123b4a;
}

.dash-hero h2 em {
  color: #0a8a7d;
}

.dash-hero p {
  color: #577784;
}

.dash-hero .hero-date {
  color: #7d99a2;
}

.dash-hero .hero-date svg {
  color: #0f9f8f;
}

.btn-on-dark {
  border-color: #cfe9e4;
  background: rgba(255, 255, 255, 0.8);
  color: #2c606a;
  box-shadow: 0 4px 12px rgba(31, 92, 103, 0.04);
}

.btn-on-dark:hover {
  background: #ffffff;
}

.btn-on-dark.primary {
  background: #0f9f8f;
  border-color: #0f9f8f;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 159, 143, 0.2);
}

.btn-on-dark.primary:hover {
  background: #0b8d80;
}

/* ------------------------------ Quick card ------------------------------ */
.quick-card {
  background: radial-gradient(440px 260px at 108% -20%, rgba(28, 174, 157, 0.14), transparent 70%),
    linear-gradient(140deg, #ecfbf6, #edf7ff);
  border-color: #daeee9;
  color: #173f4d;
  box-shadow: 0 12px 30px rgba(28, 92, 104, 0.05);
}

.quick-card::after {
  border-color: rgba(15, 159, 143, 0.14);
  box-shadow: 0 0 0 40px rgba(15, 159, 143, 0.02);
}

.quick-card .q-eyebrow {
  color: #0a8a7d;
}

.quick-card h3 {
  color: #123b4a;
}

.quick-card p {
  color: #5c7c87;
}

.quick-action {
  border-color: #d9ece8;
  background: rgba(255, 255, 255, 0.82);
  color: #315d67;
}

.quick-action:hover {
  background: #ffffff;
}

.quick-action svg {
  color: #0f9f8f;
}

.quick-foot {
  border-top-color: #d8ebe7;
  color: #819ba4;
}

.quick-foot b {
  color: #0a8278;
}

/* ------------------------------ Detail hero ----------------------------- */
.detail-hero {
  color: #143b4a;
  background: radial-gradient(700px 320px at 90% -30%, #d8f3ed 0%, transparent 64%),
    linear-gradient(115deg, #eafaf5, #e7f5fc);
  box-shadow: 0 14px 32px rgba(32, 98, 108, 0.07);
  border: 1px solid #dcefe9;
}

.detail-hero.cost {
  background: radial-gradient(700px 320px at 90% -30%, #e3e4fb 0%, transparent 64%),
    linear-gradient(115deg, #f0f1fd, #e9f5ff);
  border-color: #e1e4f4;
}

.detail-hero::after {
  border-color: rgba(15, 159, 143, 0.14);
  box-shadow: 0 0 0 44px rgba(15, 159, 143, 0.018);
}

.dh-kicker {
  color: #0a8a7d;
}

.detail-hero.cost .dh-kicker {
  color: #6c63bd;
}

.dh-title h2 {
  color: #123b4a;
}

.dh-title .tax-no {
  color: #7d9aa4;
}

.detail-hero .dh-meta {
  color: #718d97;
}

.dh-meta i {
  background: #12a594;
}

.dh-action {
  border-color: #d1e7e4;
  background: rgba(255, 255, 255, 0.78);
  color: #33616b;
}

.dh-action:hover {
  background: #ffffff;
}

.detail-hero.cost .dh-action {
  border-color: #dfe2f3;
  color: #575b8b;
}

/* Soften remaining dark accents */
.topbar {
  background: rgba(255, 255, 255, 0.92);
}

.table-scroll {
  scrollbar-color: #cfe0e6 transparent;
}

.data-table th {
  background: #f7fbfc;
}

.filter-card,
.table-card,
.card,
.stat-card,
.kpi-card {
  border-color: #e4f0f3;
}

.pagination {
  background: #fbfeff;
}

.modal-head-icon {
  background: #e7f8f4;
}

.overview-card {
  background: #ffffff;
}

.analysis-card {
  border-color: #e4f0f3;
}

@media (max-width: 960px) {
  .sidebar {
    box-shadow: 0 0 42px rgba(34, 92, 102, 0.16);
  }
}

/* Registration fits in one viewport, no page scrolling */
body.auth-register-view {
  height: 100vh;
  overflow: hidden;
}

body.auth-register-view .auth-panel {
  overflow: hidden;
}

.auth-page--register {
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}

.auth-page--register .auth-panel {
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  padding: 24px 44px;
}

.auth-page--register .auth-panel-inner {
  max-width: 420px;
  max-height: 100%;
  overflow-y: auto;
  scrollbar-width: none;
}

.auth-page--register .auth-panel-inner::-webkit-scrollbar {
  display: none;
}

.auth-page--register .auth-panel-footer {
  display: none;
}

.auth-page--register .auth-head {
  margin-bottom: 20px;
}

.auth-page--register .auth-form {
  gap: 13px;
}

.auth-page--register .auth-form .input {
  height: 43px;
}

.auth-page--register .auth-form .btn-lg {
  height: 46px;
  margin-top: 2px;
}

.auth-page--register .auth-switch {
  margin-top: 18px;
}

.auth-page--register .auth-legal {
  margin-top: 14px;
}

@media (max-height: 820px) and (min-width: 961px) {
  .auth-page--register .auth-panel {
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .auth-page--register .auth-head {
    margin-bottom: 15px;
  }

  .auth-page--register .auth-head p {
    margin-top: 6px;
  }

  .auth-page--register .auth-form {
    gap: 10px;
  }

  .auth-page--register .auth-form .input {
    height: 41px;
  }

  .auth-page--register .auth-form .btn-lg {
    height: 44px;
  }

  .auth-page--register .strength {
    margin-top: 4px;
  }

  .auth-page--register .auth-switch {
    margin-top: 14px;
  }

  .auth-page--register .auth-legal {
    margin-top: 10px;
  }
}

/* ==========================================================================
   Collapsible sidebar
   ========================================================================== */
.sidebar {
  transition: width 0.22s ease, transform 0.25s ease;
  overflow-x: hidden;
}

.desktop-sidebar-toggle {
  display: none;
}

@media (min-width: 961px) {
  .desktop-sidebar-toggle {
    display: grid;
    flex: none;
  }
}

.workspace {
  transition: margin-left 0.22s ease;
}

.sidebar-head-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: none;
}

.sidebar-ver {
  font-size: 8px;
  border: 1px solid #d8eaee;
  border-radius: 4px;
  padding: 1px 5px;
  color: #7b9ba4;
  background: rgba(255, 255, 255, 0.72);
  line-height: 1.4;
}

.sidebar-collapse {
  width: 25px;
  height: 25px;
  padding: 0;
  border: 1px solid #d6e9ed;
  border-radius: 7px;
  background: #ffffff;
  color: #6f939d;
  display: grid;
  place-items: center;
  flex: none;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.sidebar-collapse svg {
  width: 14px;
  height: 14px;
}

.sidebar-collapse:hover {
  background: #eaf9f5;
  border-color: #bfe1db;
  color: #0a8278;
}

@media (min-width: 961px) {
  .admin-shell.sidebar-collapsed {
    --sidebar-w: 78px;
  }

  .sidebar-collapsed .sidebar {
    padding-left: 10px;
    padding-right: 10px;
  }

  .sidebar-collapsed .sidebar-head {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
  }

  .sidebar-collapsed .sidebar-console-label,
  .sidebar-collapsed .sidebar-ver,
  .sidebar-collapsed .nav-label,
  .sidebar-collapsed .ws-info,
  .sidebar-collapsed .ws-arrow,
  .sidebar-collapsed .nav-item > span:not(.nav-badge),
  .sidebar-collapsed .sidebar-bottom {
    display: none;
  }

  .sidebar-collapsed .workspace-chip {
    justify-content: center;
    padding: 9px 0;
    margin-left: 0;
    margin-right: 0;
  }

  .sidebar-collapsed .workspace-chip .ws-logo {
    margin: 0;
  }

  .sidebar-collapsed .nav-group {
    margin-bottom: 12px;
  }

  .sidebar-collapsed .nav-item {
    height: 44px;
    padding: 0;
    justify-content: center;
  }

  .sidebar-collapsed .nav-item svg {
    width: 19px;
    height: 19px;
  }

  .sidebar-collapsed .nav-badge {
    position: absolute;
    top: 5px;
    right: 9px;
    width: 8px;
    min-width: 8px;
    height: 8px;
    padding: 0;
    border-radius: 50%;
    background: #efa12f;
    color: transparent;
    font-size: 0;
    box-shadow: 0 0 0 2px #f5fcfb;
  }

  .sidebar-collapsed .nav-badge.teal {
    background: #12a594;
  }

  .sidebar-collapsed .nav-item.active::before {
    left: -10px;
  }

  .sidebar-collapsed .sidebar-collapse {
    margin: 0 auto;
  }
}

@media (max-width: 960px) {
  .sidebar-collapse {
    display: none;
  }
}

/* ==========================================================================
   Full-height list pages: fixed query area + fixed table header
   Only the table viewport scrolls.
   ========================================================================== */
body.list-view {
  height: 100vh;
  overflow: hidden;
}

body.list-view .admin-shell,
body.list-view .workspace {
  height: 100vh;
  overflow: hidden;
}

body.list-view .content--list {
  height: calc(100vh - var(--topbar-h));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-top: 20px;
  padding-bottom: 18px;
}

body.list-view .content--list .filter-card {
  flex: none;
  margin-bottom: 14px;
}

body.list-view .content--list .table-card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.list-view .content--list .table-toolbar,
body.list-view .content--list .pagination {
  flex: none;
}

body.list-view .content--list .table-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #cfe0e6 transparent;
}

body.list-view .content--list .table-scroll::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

body.list-view .content--list .table-scroll::-webkit-scrollbar-track {
  background: #f8fcfd;
}

body.list-view .content--list .table-scroll::-webkit-scrollbar-thumb {
  background: #cfe0e6;
  border-radius: 10px;
}

body.list-view .data-table th {
  position: sticky;
  top: 0;
  z-index: 5;
}

body.list-view .data-table th.sticky-check,
body.list-view .data-table th.sticky-name,
body.list-view .data-table th.sticky-first {
  z-index: 8;
}

body.list-view .data-table th.sticky-actions {
  z-index: 6;
}

/* First column remains visible while scrolling horizontally */
.data-table th.sticky-first,
.data-table td.sticky-first {
  position: sticky;
  left: 0;
  z-index: 3;
  min-width: 225px;
  background: #ffffff;
  box-shadow: 10px 0 14px -12px rgba(18, 45, 68, 0.24);
}

.data-table th.sticky-first {
  background: #f7fbfc;
  z-index: 8;
}

.data-table tbody tr:hover td.sticky-first {
  background: #fbfdff;
}

body.list-view .data-table tbody tr.selected td.sticky-first {
  background: #f5fcfa;
}

@media (max-width: 760px) {
  body.password-view .content--password {
    padding: 14px 16px;
  }
}

@media (max-width: 760px) and (max-height: 820px) {
  body.password-view .settings-card-head {
    padding: 12px 16px;
  }

  body.password-view .settings-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
  }

  body.password-view .settings-icon svg {
    width: 17px;
    height: 17px;
  }

  body.password-view .settings-head-copy h2 {
    font-size: 14px;
  }

  body.password-view .settings-head-copy p {
    display: none;
  }

  body.password-view .settings-body {
    gap: 10px;
    padding: 14px 16px;
  }

  body.password-view .settings-form .field {
    gap: 5px;
  }

  body.password-view .settings-form .input {
    height: 38px;
  }

  body.password-view .password-rules,
  body.password-view .settings-actions-note {
    display: none;
  }

  body.password-view .settings-actions {
    padding: 10px 16px 12px;
  }
}
