:root {
  color-scheme: light;
  --bg: #f4f6fb;
  --surface: #ffffff;
  --text: #111827;
  --subtle: #6b7280;
  --line: #e5e7eb;
  --brand: #2152ff;
  --brand-soft: #eaf0ff;
  --success: #047857;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", "PingFang SC", sans-serif; background: var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }

.shell { min-height: 100vh; padding-bottom: 88px; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; background: rgba(255,255,255,0.92); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(229,231,235,0.9);
}
.brand-title { font-size: 18px; font-weight: 700; }
.brand-subtitle { font-size: 12px; color: var(--subtle); margin-top: 2px; }
.ghost-btn, .primary-btn, .outline-btn { border: 0; border-radius: 10px; padding: 10px 14px; cursor: pointer; }
.ghost-btn { background: var(--brand-soft); color: var(--brand); }
.primary-btn { background: var(--brand); color: #fff; }
.outline-btn { background: transparent; color: var(--brand); border: 1px solid rgba(33,82,255,0.24); }
.page { max-width: 1180px; margin: 0 auto; padding: 20px 16px 32px; }
.hero { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 18px; align-items: stretch; }
.hero-main, .hero-side, .section, .case-card, .package-card, .service-card, .order-card, .profile-card, .login-card, .modal-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow);
}
.hero-main { padding: 28px; background: linear-gradient(135deg, #0f172a, #1d4ed8); color: #fff; }
.hero-main p, .hero-main span { color: rgba(255,255,255,0.82); }
.hero-side { padding: 24px; }
.hero-title { font-size: 34px; line-height: 1.15; margin: 0 0 12px; }
.hero-points { display: flex; gap: 28px; flex-wrap: wrap; margin-bottom: 18px; font-size: 15px; font-weight: 600; }
.hero-actions, .inline-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.inline-actions input { flex: 1; min-width: 160px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin-top: 20px; }
.stat { padding: 14px; border-radius: 8px; background: rgba(255,255,255,0.1); }
.stat strong { display: block; font-size: 22px; margin-bottom: 6px; }
.grid-2, .grid-5, .profile-wrap, .orders-wrap, .detail-list { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0,1fr)); }
.section { margin-top: 20px; padding: 20px; overflow: hidden; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-title { margin: 0; font-size: 24px; }
.section-note, .muted, .menu-sub, .detail-row small { color: var(--subtle); font-size: 14px; }
.menu-item, .service-card, .order-card, .profile-card, .login-card { padding: 18px; }
.menu-item { border: 1px solid var(--line); border-radius: 8px; background: #fbfcff; text-align: left; }
.menu-icon { font-size: 24px; margin-bottom: 12px; }
.menu-title, .case-title, .package-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.case-card, .package-card { overflow: hidden; min-width: 260px; }
.cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: #dbe4ff; }
.cover.placeholder { display: grid; place-items: center; font-size: 34px; font-weight: 700; color: var(--brand); }
.case-body, .package-body { padding: 16px; }
.amount { font-size: 28px; font-weight: 800; }
.tag { display: inline-flex; align-items: center; padding: 5px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: 12px; font-weight: 700; }
.price-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0; }
.price { font-size: 30px; font-weight: 800; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid #d0d5dd; border-radius: 8px; padding: 12px 14px; background: #fff; }
.field textarea { min-height: 120px; resize: vertical; }
.field.full { grid-column: 1 / -1; }
.service-card { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; }
.detail-row { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.detail-row:last-child { border-bottom: 0; padding-bottom: 0; }
.title-row { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 12px; }
.status { padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.status.pending { background: #fff4e5; color: #b54708; }
.status.paid { background: #e8fff2; color: var(--success); }
.status.failed { background: #ffe8e8; color: #b42318; }
.empty { padding: 28px; text-align: center; color: var(--subtle); border: 1px dashed var(--line); border-radius: 8px; }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1px; background: rgba(15,23,42,0.08); border-top: 1px solid rgba(229,231,235,0.8); backdrop-filter: blur(14px); }
.tab-btn { background: rgba(255,255,255,0.95); border: 0; padding: 12px 8px 14px; cursor: pointer; color: var(--subtle); }
.tab-btn.active { color: var(--brand); font-weight: 700; }
.login-layout { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(460px, 100%); }
.modal { position: fixed; inset: 0; background: rgba(15,23,42,0.48); display: none; align-items: center; justify-content: center; padding: 20px; }
.modal.open { display: flex; }
.modal-card { width: min(720px, 100%); max-height: 90vh; overflow: auto; }
.modal-head, .modal-body { padding: 18px 20px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.notice { margin-top: 12px; padding: 12px 14px; border-radius: 8px; background: #fff7ed; color: #9a3412; font-size: 14px; }
.marquee-track-wrap { overflow: hidden; }
.marquee-track { display: flex; gap: 16px; width: max-content; animation: marquee 38s linear infinite; }
.marquee-section:hover .marquee-track { animation-play-state: paused; }
.marquee-card { width: 290px; flex: 0 0 auto; }
.order-layout, .agent-layout { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; }
.order-logo { width: 88px; height: 88px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); }
.agent-qr { width: 220px; height: 220px; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.group-image { width: min(420px, 100%); border-radius: 8px; border: 1px solid var(--line); display: block; }
.link-wrap { word-break: break-all; text-align: right; }
.slim { padding: 14px; }
.delivery-card { max-width: 760px; margin: 40px auto 0; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.delivery-title { margin: 14px 0 10px; font-size: 30px; line-height: 1.2; }
.delivery-text { color: var(--subtle); line-height: 1.8; }
.delivery-countdown { margin-top: 18px; font-size: 40px; font-weight: 800; color: var(--brand); }
.delivery-result { margin-top: 22px; padding: 18px; border-radius: 8px; background: #f8fbff; border: 1px solid #dbe4ff; }
.delivery-link { word-break: break-all; text-align: right; }
.copy-inline { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; max-width: 100%; }
.copy-value { word-break: break-all; text-align: right; }
.mini-copy-btn { border: 1px solid rgba(33,82,255,0.2); background: #fff; color: var(--brand); border-radius: 8px; padding: 4px 10px; cursor: pointer; flex: 0 0 auto; }

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (max-width: 960px) {
  .hero, .grid-2, .grid-5, .service-card, .form-grid, .order-layout, .agent-layout { grid-template-columns: 1fr; }
  .hero-title { font-size: 28px; }
  .marquee-card { width: 250px; }
}
