/* ==========================================================================
   品牌层：首页（Home/Index）与登录页（Identity/Account/Login）
   作用域限定 .home-page / .auth-page，不影响填报页 .sheet-page 与其他页面。
   口径：浅色纸面、发丝分割线、单一深墨主色 + 蓝色强调；涨红跌绿仅用于金额。
   ========================================================================== */

.home-page,
.auth-page {
  --ink: #11161b;
  --ink-2: #333c46;
  --ink-3: #5d6771;
  --ink-4: #8a939d;
  --line: #e5e8ec;
  --line-2: #d2d8de;
  --paper: #fff;
  --canvas: #f7f8f9;
  --accent: #0a58ca;
  --accent-soft: #eef4fd;
  --up: #b3261e;
  --down: #1a7f45;
  --amber-ink: #7a5200;
  --amber-soft: #fff8e8;
  --amber-line: #e6cd9a;

  color: var(--ink);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC",
    system-ui, -apple-system, "Segoe UI", sans-serif;
}

.home-page ::selection,
.auth-page ::selection {
  background: var(--accent-soft);
}

/* ============================ 首页 ============================ */

body.home-body {
  background: var(--canvas);
  margin-bottom: 0;
}

body.home-body .footer {
  border-color: #e5e8ec !important;
  background: #fff;
}

/* 首页顶栏：改为发丝线白底，去掉模板默认阴影 */
body.home-body header .navbar {
  background: #fff !important;
  border-bottom: 1px solid #e5e8ec !important;
  box-shadow: none !important;
  margin-bottom: 0 !important;
  padding: 13px 0;
}

body.home-body header .navbar > .container-fluid {
  max-width: 1180px;
  margin: 0 auto;
}

body.home-body header .navbar-brand {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: #11161b;
}

body.home-body header .navbar .nav-link {
  font-size: 13px;
  color: #5d6771 !important;
  padding: 6px 12px;
  border-radius: 6px;
  white-space: nowrap;
}

body.home-body header .navbar .nav-link:hover {
  color: #11161b !important;
  background: #f4f6f8;
}

body.home-body footer.footer {
  margin-top: 0 !important;
  padding: 20px 0 26px;
  font-size: 12px;
  color: #8a939d !important;
}

body.home-body footer.footer > .container-fluid {
  max-width: 1180px;
  margin: 0 auto;
}

.home-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 4px 0 56px;
}

.home-page h1,
.home-page h2,
.home-page h3 {
  color: var(--ink);
}

/* —— 主视觉 —— */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.82fr);
  gap: 56px;
  align-items: start;
  padding: 40px 0 44px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .14em;
  color: var(--ink-4);
}

.eyebrow::before {
  content: "";
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 1px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(30px, 3.4vw, 44px);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -.025em;
}

.hero h1 .thin {
  color: var(--ink-4);
  font-weight: 400;
}

.hero-lead {
  margin: 18px 0 0;
  max-width: 44ch;
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--ink-3);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0 32px;
  margin: 34px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.hero-meta div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12.5px;
}

.hero-meta dt {
  color: var(--ink-4);
  font-weight: 400;
}

.hero-meta dd {
  margin: 0;
  color: var(--ink-2);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* —— 按钮 —— */

.btn-ink,
.btn-line,
.btn-quiet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 20px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease,
    transform .16s ease, box-shadow .16s ease;
}

.btn-ink {
  background: var(--ink);
  border: 1px solid var(--ink);
  color: #fff;
}

.btn-ink:hover {
  background: #000;
  border-color: #000;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px -8px rgba(17, 22, 27, .55);
}

.btn-line {
  background: var(--paper);
  border: 1px solid var(--line-2);
  color: var(--ink-2);
}

.btn-line:hover {
  border-color: var(--ink-3);
  color: var(--ink);
  background: var(--paper);
}

.btn-quiet {
  background: transparent;
  border: 1px solid transparent;
  color: var(--ink-3);
  padding: 0 10px;
}

.btn-quiet:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.btn-ink svg,
.btn-line svg,
.btn-quiet svg {
  width: 16px;
  height: 16px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-page :focus-visible,
.auth-page :focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* —— 批次卡片 —— */

.ticket {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 32px -28px rgba(16, 24, 40, .35);
  overflow: hidden;
}

.ticket-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
}

.ticket-head .label {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--ink-2);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}

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

.pill-live {
  background: var(--accent-soft);
  color: #0a4aa8;
}

.pill-idle {
  background: #f1f3f5;
  color: var(--ink-3);
}

.pill-warn {
  background: var(--amber-soft);
  color: var(--amber-ink);
  box-shadow: inset 0 0 0 1px var(--amber-line);
}

.ticket-rows {
  margin: 0;
  padding: 4px 20px;
}

.ticket-rows > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  font-size: 13px;
}

.ticket-rows > div + div {
  border-top: 1px solid #f1f3f5;
}

.ticket-rows dt {
  color: var(--ink-4);
  font-weight: 400;
  white-space: nowrap;
}

.ticket-rows dd {
  margin: 0;
  color: var(--ink-2);
  font-weight: 500;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.ticket-progress {
  padding: 4px 20px 18px;
}

.ticket-progress .cap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--ink-4);
}

.ticket-progress .cap b {
  color: var(--ink-2);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.meter {
  height: 4px;
  border-radius: 999px;
  background: #edf0f3;
  overflow: hidden;
}

.meter > i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
}

.ticket-foot {
  padding: 12px 20px;
  background: #fafbfc;
  border-top: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-4);
}

/* —— 指标条 —— */

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 32px 0 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.metric {
  padding: 22px 24px;
}

.metric + .metric {
  border-left: 1px solid var(--line);
}

.metric .k {
  font-size: 12px;
  color: var(--ink-4);
  letter-spacing: .02em;
}

.metric .v {
  margin-top: 10px;
  font-size: 27px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.metric .v small {
  margin-left: 3px;
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-4);
  letter-spacing: 0;
}

.metric .note {
  margin-top: 7px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--ink-4);
}

/* —— 面板 —— */

.panel {
  margin-top: 46px;
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.panel-head span {
  font-size: 12px;
  color: var(--ink-4);
}

/* —— 快捷入口 —— */

.entries {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.entry {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: border-color .16s ease, box-shadow .18s ease, transform .18s ease;
}

.entry:hover {
  border-color: var(--line-2);
  box-shadow: 0 10px 28px -22px rgba(16, 24, 40, .5);
  transform: translateY(-2px);
  color: inherit;
}

.entry .ico {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
}

.entry .ico svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.entry .t {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}

.entry .d {
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-4);
}

.entry .go {
  margin-top: 2px;
  font-size: 12px;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.entry .go::after {
  content: "→";
  transition: transform .16s ease;
}

.entry:hover .go {
  color: var(--accent);
}

.entry:hover .go::after {
  transform: translateX(3px);
}

.entry .go b {
  font-weight: 500;
}

/* —— 流程 —— */

.steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding-top: 16px;
  border-top: 1px solid var(--line-2);
  counter-increment: step;
}

.steps li::before {
  content: "0" counter(step);
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--ink-4);
  font-variant-numeric: tabular-nums;
}

.steps .st {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
}

.steps .sd {
  margin-top: 4px;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--ink-4);
}

/* ============================ 登录页 ============================ */

body.auth-body {
  margin: 0;
  background: var(--canvas);
}

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, .82fr) minmax(0, 1fr);
}

/* —— 左：品牌面 —— */

.auth-brand {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  padding: 56px 52px;
  background: #0f141a;
  color: #fff;
}

.auth-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(10, 88, 202, .30) 0%, rgba(10, 88, 202, 0) 58%),
    radial-gradient(90% 70% at 100% 100%, rgba(255, 255, 255, .07) 0%, rgba(255, 255, 255, 0) 60%);
  pointer-events: none;
}

.auth-brand::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(80% 60% at 50% 40%, #000 0%, transparent 75%);
  mask-image: radial-gradient(80% 60% at 50% 40%, #000 0%, transparent 75%);
  pointer-events: none;
}

.auth-brand > * {
  position: relative;
  z-index: 1;
}

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

.brand-mark .glyph {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .06);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
}

.brand-mark .name {
  font-size: 13px;
  line-height: 1.4;
  color: rgba(255, 255, 255, .72);
}

.brand-mark .name b {
  display: block;
  font-size: 13.5px;
  font-weight: 500;
  color: #fff;
}

.auth-brand h1 {
  margin: 0;
  max-width: 22ch;
  font-size: clamp(24px, 2.3vw, 31px);
  font-weight: 600;
  line-height: 1.42;
  letter-spacing: -.015em;
  color: #fff;
}

.auth-brand h1 span {
  color: rgba(255, 255, 255, .48);
}

.auth-brand .lede {
  margin: 16px 0 0;
  max-width: 30ch;
  font-size: 13px;
  line-height: 1.8;
  color: rgba(255, 255, 255, .55);
}

.brand-points {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
  max-width: 32ch;
}

.brand-points li {
  position: relative;
  padding-left: 18px;
  font-size: 12.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .68);
}

.brand-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: 6px;
  height: 1px;
  background: rgba(255, 255, 255, .5);
}

.brand-foot {
  font-size: 11.5px;
  letter-spacing: .04em;
  color: rgba(255, 255, 255, .34);
}

/* —— 右：表单 —— */

.auth-form-wrap {
  display: grid;
  place-items: center;
  padding: 48px 24px;
}

.auth-card {
  width: 100%;
  max-width: 384px;
}

.auth-card .kicker {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .16em;
  color: var(--accent);
}

.auth-card h2 {
  margin: 10px 0 0;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -.02em;
}

.auth-card .sub {
  margin: 8px 0 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-4);
}

.auth-form {
  margin-top: 26px;
}

.field {
  margin-bottom: 16px;
}

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

.ctl {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  font-size: 14px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.ctl::placeholder {
  color: #b3bac2;
}

.ctl:hover {
  border-color: #bcc4cc;
}

.ctl:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(10, 88, 202, .12);
}

.ctl-wrap {
  position: relative;
}

.ctl-wrap .ctl {
  padding-right: 62px;
}

.ctl-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-size: 12px;
  color: var(--ink-4);
  cursor: pointer;
}

.ctl-toggle:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.field-error {
  display: block;
  margin-top: 6px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--up);
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 22px;
  font-size: 12.5px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-3);
  cursor: pointer;
  user-select: none;
}

.check input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--ink);
  cursor: pointer;
}

.link-quiet {
  color: var(--ink-3);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.link-quiet:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.btn-submit {
  width: 100%;
  height: 44px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.btn-submit:hover {
  background: #000;
  border-color: #000;
  box-shadow: 0 8px 22px -12px rgba(17, 22, 27, .7);
}

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

.auth-alert {
  margin: 0 0 18px;
  padding: 10px 13px;
  border: 1px solid #f0cfcb;
  border-left: 2px solid var(--up);
  border-radius: 6px;
  background: #fdf5f4;
  font-size: 12.5px;
  line-height: 1.6;
  color: #8c2b22;
}

.auth-alert ul {
  margin: 0;
  padding-left: 16px;
}

/* —— 演示账号 —— */

.auth-divide {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 26px 0 14px;
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--ink-4);
}

.auth-divide::before,
.auth-divide::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

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

.chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 9px 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 11.5px;
  color: var(--ink-2);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}

.chip b {
  font-size: 12px;
  font-weight: 500;
}

.chip span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10.5px;
  color: var(--ink-4);
}

.chip:hover,
.chip:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.chip.active {
  border-color: var(--ink);
  background: #f4f6f8;
  color: var(--ink);
}

.auth-note {
  margin: 16px 0 0;
  font-size: 11px;
  line-height: 1.7;
  color: var(--ink-4);
}

/* ============================ 响应式 ============================ */

@media (max-width: 991.98px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    padding: 28px 0 32px;
  }

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

  .metric:nth-child(3) {
    border-left: 0;
  }

  .metric:nth-child(n+3) {
    border-top: 1px solid var(--line);
  }

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

@media (max-width: 880px) {
  .auth-page {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-brand {
    padding: 28px 24px 26px;
    gap: 18px;
  }

  .auth-brand h1 {
    max-width: none;
    font-size: 22px;
  }

  .auth-brand .lede,
  .brand-points,
  .brand-foot {
    display: none;
  }

  .auth-form-wrap {
    padding: 34px 20px 48px;
    align-items: start;
  }
}

@media (max-width: 575.98px) {
  .hero h1 {
    font-size: 27px;
  }

  .hero-actions .btn-ink,
  .hero-actions .btn-line {
    flex: 1 1 auto;
  }

  .hero-meta {
    flex-direction: column;
    gap: 7px;
    margin-top: 26px;
    padding-top: 14px;
  }

  /* 窄屏指标条改为「标签左 + 数值右」的紧凑列表，长金额不换行 */
  .metrics {
    margin-top: 20px;
    grid-template-columns: minmax(0, 1fr);
  }

  .metric {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    column-gap: 12px;
    padding: 16px 18px;
  }

  .metric + .metric {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .metric .k {
    grid-column: 1;
  }

  .metric .v {
    grid-column: 2;
    grid-row: 1;
    margin-top: 0;
    font-size: 19px;
    white-space: nowrap;
  }

  .metric .note {
    grid-column: 1 / -1;
    margin-top: 5px;
  }

  .steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .demo-chips {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn-ink,
  .btn-line,
  .entry,
  .chip,
  .btn-submit,
  .ctl {
    transition: none;
  }

  .entry:hover,
  .btn-ink:hover {
    transform: none;
  }
}
