/* ==========================================================
   佬森科技自助商城 — 设计令牌与站点框架
   令牌取自目标站真实样式：mini.css / login-modern.css
   ========================================================== */
:root {
  --ink: #172033;
  --ink-2: #2b3648;
  --muted: #738096;
  --line: #e3e9f2;
  --line-strong: #dce3ec;
  --soft: #f2f5f9;
  --bg: #f5f7fb;
  --white: #fff;

  --blue: #206be7;
  --blue-hover: #1162e8;
  --blue-dark: #0f56bd;
  --navy: #153a69;
  --navy-deep: #0d2748;
  --gold: #ffd166;
  --danger: #ff604c;
  --success: #17b26a;
  --warn: #f79009;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(23, 32, 51, .06);
  --shadow: 0 6px 24px rgba(23, 32, 51, .07);
  --shadow-lg: 0 18px 48px rgba(23, 32, 51, .12);

  --header-h: 72px;
  --container: 1200px;
  --font: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

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

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

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, h5, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
table { border-collapse: collapse; width: 100%; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------------- Header ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  height: var(--header-h);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header.is-scrolled { box-shadow: 0 6px 20px rgba(23, 32, 51, .06); }
.header-inner {
  display: flex; align-items: center; gap: 28px;
  height: var(--header-h);
}
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand-mark {
  display: flex; width: 36px; height: 36px; align-items: center; justify-content: center;
  border-radius: 9px; background: linear-gradient(135deg, var(--blue), #4f92ff);
  box-shadow: 0 6px 16px rgba(32, 107, 231, .28);
}
.brand-mark svg { width: 19px; height: 19px; fill: #fff; }
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: .2px; white-space: nowrap; }
.brand-name span { color: var(--blue); }

.main-nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.main-nav a {
  position: relative; padding: 8px 14px; border-radius: 8px;
  color: var(--ink-2); font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: color .18s, background .18s;
}
.main-nav a:hover { color: var(--blue); background: rgba(32, 107, 231, .06); }
.main-nav a.active { color: var(--blue); font-weight: 600; }
.main-nav a.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px;
  height: 2px; border-radius: 2px; background: var(--blue);
}

.header-right { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.header-search {
  display: flex; align-items: center; gap: 8px;
  width: 220px; height: 38px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--soft);
  transition: border-color .18s, background .18s;
}
.header-search:focus-within { background: #fff; border-color: rgba(32, 107, 231, .5); }
.header-search svg { width: 15px; height: 15px; fill: var(--muted); flex: none; }
.header-search input { width: 100%; border: 0; outline: 0; background: transparent; font-size: 13px; }
.header-search input::placeholder { color: #9aa6b8; }

.balance-chip {
  display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px;
  border: 1px solid rgba(32, 107, 231, .16); border-radius: 8px;
  background: rgba(32, 107, 231, .06); color: var(--blue);
  font-size: 13px; font-weight: 600; white-space: nowrap;
}
.balance-chip b { font-size: 15px; font-variant-numeric: tabular-nums; }

.user-menu { position: relative; }
.user-trigger {
  display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px 0 6px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff;
  transition: border-color .18s, box-shadow .18s;
}
.user-trigger:hover { border-color: rgba(32, 107, 231, .35); box-shadow: var(--shadow-sm); }
.avatar {
  display: flex; width: 28px; height: 28px; flex: none;
  align-items: center; justify-content: center; border-radius: 50%;
  background: linear-gradient(135deg, #2f80ff, #7aa8ff);
  color: #fff; font-size: 12px; font-weight: 700;
}
.user-trigger span { font-size: 13px; font-weight: 500; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-trigger svg { width: 12px; height: 12px; fill: var(--muted); }
.dropdown {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 80;
  width: 208px; padding: 8px; border-radius: 12px; background: #fff;
  border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .18s, transform .18s, visibility .18s;
}
.dropdown.open { opacity: 1; visibility: visible; transform: none; }
.dropdown a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 8px; font-size: 13.5px; color: var(--ink-2);
}
.dropdown a:hover { background: var(--soft); color: var(--blue); }
.dropdown a svg { width: 15px; height: 15px; fill: currentColor; opacity: .75; }
.dropdown .divider { height: 1px; margin: 6px 4px; background: var(--line); }
.dropdown .danger { color: var(--danger); }

.nav-toggle { display: none; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.nav-toggle svg { width: 18px; height: 18px; fill: var(--ink); margin: 0 auto; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 22px; border: 1px solid transparent; border-radius: 8px;
  font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer;
  transition: transform .06s, box-shadow .18s, background .18s, border-color .18s, color .18s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 8px 20px rgba(32, 107, 231, .24); }
.btn-primary:hover { background: var(--blue-hover); box-shadow: 0 10px 26px rgba(32, 107, 231, .32); }
.btn-primary:disabled { background: #a8c2ec; box-shadow: none; cursor: not-allowed; }
.btn-ghost { background: #fff; border-color: var(--line-strong); color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-soft { background: rgba(32, 107, 231, .08); color: var(--blue); }
.btn-soft:hover { background: rgba(32, 107, 231, .14); }
.btn-block { width: 100%; }
.btn-lg { height: 50px; font-size: 16px; border-radius: 10px; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; border-radius: 7px; }

/* ---------------- Cards / typography ---------------- */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.card-pad { padding: 24px; }
.card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 24px; border-bottom: 1px solid var(--line);
}
.card-head h3 { font-size: 15px; font-weight: 700; }
.card-head .sub { color: var(--muted); font-size: 12.5px; margin-left: auto; }
.card-head .accent { width: 3px; height: 15px; border-radius: 2px; background: var(--blue); }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title .eyebrow {
  display: inline-block; margin-bottom: 10px; padding: 4px 12px; border-radius: 999px;
  background: rgba(32, 107, 231, .08); color: var(--blue); font-size: 12px; font-weight: 600;
}
.section-title h2 { font-size: 28px; font-weight: 700; letter-spacing: .5px; }
.section-title p { margin-top: 10px; color: var(--muted); font-size: 14.5px; }

/* ---------------- Breadcrumb ---------------- */
.crumbs { display: flex; align-items: center; gap: 8px; padding: 18px 0 4px; color: var(--muted); font-size: 13px; }
.crumbs a:hover { color: var(--blue); }
.crumbs .sep { color: #c3ccda; }
.crumbs .current { color: var(--ink-2); }

html { scroll-behavior: smooth; }
a:focus-visible, button:focus-visible, input:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--blue); outline-offset: 2px;
}

/* ---------------- Forms ---------------- */
.field { margin-bottom: 18px; }
.field > label, .field-label {
  display: block; margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2);
}
.field-label .req { color: var(--danger); margin-left: 2px; }
.input, .select, .textarea {
  width: 100%; height: 44px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: 8px; background: #fff;
  font-size: 14px; outline: 0; transition: border-color .18s, box-shadow .18s, background .18s;
}
.input:hover, .select:hover { border-color: #c6d3e6; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--blue); box-shadow: 0 0 0 3px rgba(32, 107, 231, .12);
}
.input::placeholder { color: #a6b1c2; }
.input.is-error { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(255, 96, 76, .12); }
.help { margin-top: 6px; color: var(--muted); font-size: 12.5px; }
.help.err { color: var(--danger); }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }
.stepper button {
  width: 40px; height: 44px; border: 0; background: #fbfcfe; color: var(--ink-2);
  font-size: 17px; line-height: 1; transition: background .15s, color .15s;
}
.stepper button:hover { background: var(--soft); color: var(--blue); }
.stepper button:disabled { color: #c2cbd9; cursor: not-allowed; background: #fbfcfe; }
.stepper input {
  width: 68px; height: 44px; border: 0; border-left: 1px solid var(--line);
  border-right: 1px solid var(--line); outline: 0; text-align: center;
  font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; background: #fff;
}

/* ---------------- Table ---------------- */
.table-wrap { overflow-x: auto; }
table.data { font-size: 13.5px; }
table.data th {
  padding: 12px 16px; background: #fafbfe; border-bottom: 1px solid var(--line);
  color: var(--muted); font-weight: 600; text-align: left; white-space: nowrap;
}
table.data td { padding: 16px; border-bottom: 1px solid var(--line); color: var(--ink-2); vertical-align: middle; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: #fbfcff; }
.num { font-variant-numeric: tabular-nums; }
.money { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.money-red { color: #e5484d; }

/* ---------------- Badges ---------------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge-paid { background: rgba(23, 178, 106, .1); color: #0e8f56; }
.badge-wait { background: rgba(247, 144, 9, .12); color: #b55605; }
.badge-doing { background: rgba(32, 107, 231, .1); color: var(--blue); }
.badge-cancel { background: #eef1f6; color: #7b879b; }

/* ---------------- Footer ---------------- */
.site-footer { margin-top: 64px; background: var(--navy-deep); color: rgba(255, 255, 255, .7); }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; padding: 56px 0 40px; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 17px; font-weight: 700; }
.footer-about { margin-top: 16px; max-width: 320px; font-size: 13px; line-height: 1.9; }
.footer-col h4 { margin-bottom: 16px; color: #fff; font-size: 14px; font-weight: 600; }
.footer-col li { margin-bottom: 10px; font-size: 13px; }
.footer-col a:hover { color: #fff; }
.footer-contact li { font-size: 13px; margin-bottom: 12px; }
.footer-contact b { color: #fff; font-weight: 600; }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  padding: 18px 0; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 12.5px;
}
.footer-bottom .links { display: flex; gap: 18px; }

/* ---------------- Toast ---------------- */
.toast-stack { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  min-width: 220px; padding: 12px 18px; border-radius: 10px; background: #fff;
  border: 1px solid var(--line); box-shadow: var(--shadow-lg); font-size: 13.5px;
  animation: toastIn .25s ease both;
}
.toast.ok { border-left: 3px solid var(--success); }
.toast.err { border-left: 3px solid var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } }

/* ---------------- Modal ---------------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(15, 30, 54, .45); backdrop-filter: blur(3px);
  opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s;
}
.modal-mask.open { opacity: 1; visibility: visible; }
.modal {
  width: 100%; max-width: 420px; padding: 28px; border-radius: 16px; background: #fff;
  text-align: center; box-shadow: var(--shadow-lg); transform: scale(.96); transition: transform .2s;
}
.modal-mask.open .modal { transform: none; }
.modal h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.modal p { color: var(--muted); font-size: 13.5px; }
.modal .amount { margin: 16px 0 20px; font-size: 30px; font-weight: 700; color: #e5484d; font-variant-numeric: tabular-nums; }
.modal .pay-qr { width: 160px; height: 160px; margin: 16px auto; border: 1px dashed var(--line-strong); border-radius: 12px; display: grid; place-items: center; color: var(--muted); font-size: 12.5px; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1080px) {
  .header-search { display: none; }
  .main-nav { gap: 0; }
  .main-nav a { padding: 8px 10px; font-size: 13.5px; }
}
@media (max-width: 900px) {
  :root { --header-h: 62px; }
  .main-nav {
    position: absolute; left: 0; right: 0; top: var(--header-h);
    flex-direction: column; align-items: stretch; gap: 2px; padding: 10px 16px 16px;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a.active::after { display: none; }
  .nav-toggle { display: block; margin-left: auto; }
  .balance-chip { display: none; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 28px; padding: 40px 0 28px; }
}
@media (max-width: 560px) {
  .brand-name { font-size: 15px; }
  .user-trigger span { display: none; }
  .section-title h2 { font-size: 22px; }
  .footer-top { grid-template-columns: 1fr; }
  .crumbs {
    display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
    padding-right: 12px; font-size: 12.5px;
  }
  .crumbs a, .crumbs .sep, .crumbs .current { display: inline; }
}
