/* =====================================================================
 * 浚鍵管理有限公司 · 西鐵小巴系統 — 包車預約中心
 * style.css — 共用設計系統（黑金主题，去白底、去紅字）
 * ---------------------------------------------------------------------
 *  底色：暖黑（ Near-black warm / 黑金）
 *  文字：金 #f7d488 / 浅金 #f4e7c8 / 暗金 #c9a455
 *  強調：金（button、logo、active、價格）
 *  ⚠️ 全站禁止白色區塊、禁止紅色文字
 *  ⚠️ 列印時（@media print）一律還原白紙黑字，交運輸署 A4
 * ===================================================================== */

/* ============================================================
 * 主题变数（默认 = 浅色模式，但底色一样是暖黑，只是浅一点）
 * 两个 mode 都係「黑金」，只係深浅不同，绝不会出现白色
 * ========================================================== */
:root {
  --brand-gold:   #d4af37;
  --brand-gold-l: #f0d67c;
  --brand-gold-d: #8f6f1c;

  --accent:       #ecd28a;   /* 主强调文字（取代旧红字） */
  --accent-l:     #ffe9ae;   /* 亮金，用于价格 / 重点 */
  --accent-d:     #b89b56;   /* 暗金，用于标签 */

  --ink:          #f5ead0;
  --ink-2:        #dcc9a0;
  --ink-soft:     #a5936b;

  --line:         #3a2e14;
  --bg:           #0f0c06;
  --card:         #171209;
  --card-2:       #1e1810;

  --ok:           #7fd18a;  --ok-bg:     #16240f;
  --warn:         #f2c14e;  --warn-bg:   #27200d;
  --info:         #8fb8e8;  --info-bg:   #141d2b;
  --danger:       #e8a04a;  --danger-bg: #2a1c0d;

  --radius:       14px;
  --radius-sm:    9px;
  --shadow:      0 2px 6px rgba(0,0,0,.5), 0 12px 32px rgba(0,0,0,.45);
  --shadow-lg:   0 8px 18px rgba(0,0,0,.6), 0 28px 64px rgba(0,0,0,.55);
  --font: "PingFang HK","PingFang TC","Microsoft JhengHei","Noto Sans TC",
          "Hiragino Sans TC",system-ui,-apple-system,"Segoe UI",sans-serif;
  /* 结构色：永远深色 chrome */
  --chrome:      #070503;
  --chrome-fg:   #f5ead0;
  --card-2:      #1e1810;
  --glow:        rgba(212,175,55,.30);
  color-scheme: dark;
}

/* ============================================================
 * 深色模式：更深的暖黑，配色完全相同
 * ========================================================== */
:root[data-theme="dark"] {
  --bg:         #070502;
  --card:       #120d06;
  --card-2:     #191309;
  --ink:        #f5ead0;
  --ink-2:      #dcc9a0;
  --ink-soft:   #9c8b65;
  --line:       #2e2410;
  --chrome:     #040300;
  --chrome-fg:  #f5ead0;

  --ok:         #7fd18a;  --ok-bg:     #14210e;
  --warn:       #f2c14e;  --warn-bg:   #241d0c;
  --info:       #8fb8e8;  --info-bg:   #101828;
  --danger:     #e8a04a;  --danger-bg: #271a0c;

  --brand-gold: #d4af37;  --brand-gold-l: #f0d67c;  --brand-gold-d: #8f6f1c;
  --accent:     #ecd28a;  --accent-l: #ffe9ae;      --accent-d: #b89b56;

  --shadow:     0 2px 6px rgba(0,0,0,.6), 0 12px 34px rgba(0,0,0,.55);
  --shadow-lg: 0 8px 18px rgba(0,0,0,.65), 0 30px 70px rgba(0,0,0,.6);
  --glow:       rgba(212,175,55,.34);
}

/* 不論深浅，链接一律用金，唔会再用红 */
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================================
 * 版面 / body
 * ========================================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  transition: background-color .35s ease, color .35s ease;
}

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 18px; }
.wrap-narrow { max-width: 780px; margin: 0 auto; padding: 0 18px; }

/* ============================================================
 * 顶部导航
 * ========================================================== */
.topbar {
  background: var(--chrome);
  color: var(--chrome-fg);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 18px rgba(0,0,0,.6);
  border-bottom: 1px solid rgba(212,175,55,.42);
}
.topbar::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand-gold), transparent);
  opacity: .6;
}
.topbar-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 18px;
  height: 62px; display: flex; align-items: center; gap: 16px;
}
.logo { display: flex; align-items: center; gap: 11px; color: var(--chrome-fg); }
.logo:hover { text-decoration: none; }
/* 左上角「西」字徽章 —— 金底黑字，唔再係紅色 */
.logo-mark {
  width: 38px; height: 38px; border-radius: 10px; flex: 0 0 38px;
  background: linear-gradient(140deg, var(--brand-gold-l) 0%, var(--brand-gold) 55%, var(--brand-gold-d) 100%);
  color: #2a1d00;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800;
  box-shadow: 0 3px 12px rgba(212,175,55,.42), inset 0 1px 0 rgba(255,255,255,.45);
  text-shadow: 0 1px 0 rgba(255,255,255,.28);
}
.logo-txt { line-height: 1.15; }
.logo-txt b { font-size: 15px; letter-spacing: .3px; display: block; color: var(--accent-l); }
.logo-txt span { font-size: 11px; opacity: .68; letter-spacing: .5px; color: var(--accent-d); }

.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--accent-d); font-size: 13.5px; padding: 8px 13px;
  border-radius: 8px; transition: .18s; font-weight: 500; white-space: nowrap;
}
.nav a:hover { background: rgba(212,175,55,.12); color: var(--accent-l); text-decoration: none; }
.nav a.active { background: linear-gradient(135deg, var(--brand-gold), var(--brand-gold-d)); color: #2a1d00; font-weight: 700; }

.nav-toggle { display: none; }

/* ---------------- 深色／浅色切换掣 ---------------- */
.theme-toggle {
  width: 40px; height: 40px; flex: 0 0 40px; border-radius: 10px;
  border: 1px solid rgba(212,175,55,.32); background: rgba(212,175,55,.12);
  color: var(--accent-l); cursor: pointer; font-size: 17px; line-height: 1;
  display: flex; align-items: center; justify-content: center; transition: .18s;
  margin-left: 4px;
}
.theme-toggle:hover { background: rgba(212,175,55,.24); transform: translateY(-1px); }
.theme-toggle:active { transform: translateY(0); }

/* ============================================================
 * Hero
 * ========================================================== */
.hero {
  background:
    radial-gradient(1000px 460px at 88% -12%, rgba(212,175,55,.20) 0%, transparent 62%),
    radial-gradient(760px 400px at 6% 108%, rgba(212,175,55,.10) 0%, transparent 60%),
    linear-gradient(160deg, #0b0804 0%, #1e1508 55%, #060402 100%);
  color: var(--ink); padding: 62px 0 74px; position: relative; overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; right: -110px; bottom: -130px;
  width: 420px; height: 420px; border-radius: 50%;
  border: 40px solid rgba(212,175,55,.055);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 44px; align-items: center; position: relative; z-index: 2; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(212,175,55,.15); border: 1px solid rgba(212,175,55,.42);
  color: var(--brand-gold-l); font-size: 12px; font-weight: 700;
  padding: 5px 13px; border-radius: 999px; letter-spacing: .6px; margin-bottom: 18px;
}
.hero h1 { font-size: 40px; line-height: 1.22; letter-spacing: -.5px; font-weight: 800; margin-bottom: 16px; }
.hero h1 em { font-style: normal; color: var(--brand-gold-l); text-shadow: 0 0 26px rgba(212,175,55,.42); }
.hero p.lead { font-size: 16px; color: var(--ink-2); max-width: 480px; margin-bottom: 26px; }
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 30px; margin-top: 34px; flex-wrap: wrap; }
.hero-stats div b { display: block; font-size: 24px; font-weight: 800; color: var(--brand-gold); }
.hero-stats div span { font-size: 12px; color: var(--ink-soft); }

.hero-card {
  background: rgba(212,175,55,.06); border: 1px solid rgba(212,175,55,.28);
  border-radius: 18px; padding: 24px; backdrop-filter: blur(10px);
  box-shadow: 0 20px 50px rgba(0,0,0,.5);
}
.hero-card h3 { font-size: 15px; margin-bottom: 14px; color: var(--accent-l); }
.hero-card ul { list-style: none; }
.hero-card li {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 13.5px; color: var(--ink-2); padding: 7px 0;
}
.hero-card li i { color: var(--brand-gold); font-style: normal; font-weight: 700; }

/* ============================================================
 * 按钮
 * ========================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-family: inherit; font-size: 14px; font-weight: 600;
  padding: 11px 22px; border-radius: 10px; border: 1px solid transparent;
  cursor: pointer; transition: .18s; white-space: nowrap; line-height: 1.4;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: linear-gradient(135deg, var(--brand-gold-l), var(--brand-gold-d)); color: #2a1d00; font-weight: 700; box-shadow: 0 6px 18px rgba(212,175,55,.34); }
.btn-primary:hover { background: linear-gradient(135deg, #ffe6b0, var(--brand-gold)); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(212,175,55,.46); }
.btn-gold { background: linear-gradient(135deg, var(--brand-gold-l), var(--brand-gold)); color: #2a1d00; box-shadow: 0 6px 18px rgba(212,175,55,.34); }
.btn-gold:hover { background: linear-gradient(135deg, #ffe6b0, var(--brand-gold-l)); color: #2a1d00; transform: translateY(-2px); box-shadow: 0 10px 26px rgba(212,175,55,.46); }
.btn-ghost { background: rgba(212,175,55,.1); color: var(--accent-l); border-color: rgba(212,175,55,.34); }
.btn-ghost:hover { background: rgba(212,175,55,.2); color: var(--accent-l); }
.btn-line { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn-line:hover { border-color: var(--brand-gold-d); color: var(--accent-l); }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 8px; }
.btn-xs { padding: 5px 10px; font-size: 12px; border-radius: 7px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ============================================================
 * 卡片
 * ========================================================== */
.section { padding: 54px 0; }
.section-head { text-align: center; margin-bottom: 34px; }
.section-head h2 { font-size: 27px; font-weight: 800; letter-spacing: -.3px; margin-bottom: 8px; position: relative; display: inline-block;
  color: var(--accent-l); text-shadow: 0 0 22px rgba(212,175,55,.28); }
.section-head h2::after {
  content: ''; display: block; width: 56px; height: 3px; margin: 12px auto 0; border-radius: 3px;
  background: linear-gradient(90deg, var(--brand-gold-l), var(--brand-gold-d));
}
.section-head p { color: var(--ink-soft); font-size: 14.5px; }
.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 1.4px;
  color: var(--brand-gold); margin-bottom: 10px;
}

.card {
  background: linear-gradient(180deg, var(--card), var(--card-2));
  border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
  transition: box-shadow .22s, border-color .22s, transform .22s, background-color .35s;
}
.card:hover { box-shadow: var(--shadow-lg), 0 0 26px rgba(212,175,55,.12); border-color: rgba(212,175,55,.55); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* 车型卡 */
.vehicle-card { text-align: center; transition: .22s; }
.vehicle-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #6a5320; }
.vehicle-icon {
  width: 66px; height: 66px; margin: 0 auto 14px; border-radius: 16px;
  background: linear-gradient(140deg, rgba(212,175,55,.20), rgba(212,175,55,.08));
  border: 1px solid rgba(212,175,55,.35);
  color: var(--brand-gold);
  display: flex; align-items: center; justify-content: center; font-size: 32px;
}
.vehicle-card h3 { font-size: 17px; margin-bottom: 4px; color: var(--ink); }
.vehicle-card .seat { color: var(--accent); font-weight: 800; font-size: 13px; letter-spacing: .5px; margin-bottom: 10px; display: block; }
.vehicle-card p { font-size: 13px; color: var(--ink-soft); margin-bottom: 14px; min-height: 40px; }
.price-tag { font-size: 13px; color: var(--ink-2); background: rgba(0,0,0,.28); border-radius: 8px; padding: 9px; border: 1px solid var(--line); }
.price-tag b { color: var(--accent-l); font-size: 17px; }

/* 特色 */
.feature { display: flex; gap: 14px; align-items: flex-start; }
.feature-ico {
  width: 42px; height: 42px; flex: 0 0 42px; border-radius: 11px;
  background: rgba(212,175,55,.14); border: 1px solid rgba(212,175,55,.3); color: var(--brand-gold);
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.feature h4 { font-size: 15px; margin-bottom: 3px; color: var(--ink); }
.feature p { font-size: 13px; color: var(--ink-soft); }

/* ============================================================
 * 表单
 * ========================================================== */
.form-row { margin-bottom: 17px; }
.form-row label {
  display: block; font-size: 13.5px; font-weight: 600;
  margin-bottom: 7px; color: var(--ink-2);
}
.form-row label .req { color: var(--brand-gold); margin-left: 3px; }
.form-row .hint { font-size: 12px; color: var(--ink-soft); font-weight: 400; }

input[type="text"], input[type="tel"], input[type="date"], input[type="time"],
input[type="number"], input[type="email"], select, textarea {
  width: 100%; font-family: inherit; font-size: 14.5px; color: var(--ink);
  background: #0c0905;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 13px; transition: border-color .16s, box-shadow .16s, background-color .35s; outline: none;
}
input::placeholder, textarea::placeholder { color: #6d6046; }
input:focus, select:focus, textarea:focus {
  border-color: var(--brand-gold); box-shadow: 0 0 0 3px rgba(212,175,55,.14), 0 4px 14px rgba(212,175,55,.10);
}
textarea { resize: vertical; min-height: 84px; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23c9a455' d='M6 8 0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }

.check-group { display: flex; flex-wrap: wrap; gap: 9px; }
.check-pill {
  display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px;
  border: 1.5px solid var(--line); border-radius: 999px; padding: 8px 15px;
  cursor: pointer; transition: .16s, background-color .35s; background: var(--card); user-select: none;
  color: var(--ink-2);
}
.check-pill:hover { border-color: #6a5320; }
.check-pill input { display: none; }
.check-pill.on { border-color: var(--brand-gold); background: rgba(212,175,55,.14); color: var(--accent-l); font-weight: 600; }
.check-pill .dot {
  width: 15px; height: 15px; border-radius: 4px; border: 1.5px solid #6a5320;
  display: flex; align-items: center; justify-content: center; font-size: 10px; color: #2a1d00;
}
.check-pill.on .dot { background: var(--brand-gold); border-color: var(--brand-gold); }

/* 步骤指示 */
.steps { display: flex; gap: 0; margin-bottom: 30px; }
.step { flex: 1; text-align: center; position: relative; font-size: 12.5px; color: var(--ink-soft); }
.step::before {
  content: ''; position: absolute; top: 15px; left: -50%; width: 100%;
  height: 2px; background: var(--line); z-index: 0;
}
.step:first-child::before { display: none; }
.step .num {
  width: 32px; height: 32px; border-radius: 50%; background: var(--card);
  border: 2px solid var(--line); color: var(--ink-soft); font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 8px; position: relative; z-index: 1; transition: .2s;
}
.step.on .num { background: linear-gradient(135deg, var(--brand-gold), var(--brand-gold-d)); border-color: var(--brand-gold); color: #2a1d00; }
.step.on { color: var(--accent-l); font-weight: 700; }

/* ============================================================
 * 标签
 * ========================================================== */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 700; padding: 4px 11px; border-radius: 999px;
  letter-spacing: .3px; border: 1px solid transparent;
}
.badge.pending   { background: var(--warn-bg);   color: var(--warn);  border-color: rgba(242,193,78,.34); }
.badge.quoted    { background: var(--info-bg);   color: var(--info);  border-color: rgba(143,184,232,.34); }
.badge.confirmed { background: var(--ok-bg);     color: var(--ok);    border-color: rgba(127,209,138,.34); }
.badge.done      { background: var(--card-2);    color: var(--ink-soft); border-color: var(--line); }
.badge.cancelled { background: var(--danger-bg); color: var(--danger); border-color: rgba(232,160,74,.34); }
.badge.synced    { background: var(--info-bg);   color: var(--info); }

/* ============================================================
 * 提示条
 * ========================================================== */
.alert { border-radius: var(--radius-sm); padding: 13px 16px; font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start; margin-bottom: 16px; border: 1px solid transparent; }
.alert.info { background: var(--info-bg); color: var(--info); border-color: rgba(143,184,232,.26); }
.alert.ok   { background: var(--ok-bg);   color: var(--ok);   border-color: rgba(127,209,138,.26); }
.alert.warn { background: var(--warn-bg); color: var(--warn); border-color: rgba(242,193,78,.26); }
.alert.err  { background: var(--danger-bg); color: var(--danger); border-color: rgba(232,160,74,.26); }
.alert b { display: block; margin-bottom: 2px; }

/* ============================================================
 * Toast
 * ========================================================== */
#toast-host { position: fixed; top: 76px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: #1c1810; color: var(--ink); border: 1px solid var(--line);
  padding: 13px 18px; border-radius: 11px;
  font-size: 13.5px; box-shadow: var(--shadow-lg); min-width: 240px; max-width: 340px;
  animation: slideIn .28s cubic-bezier(.2,.9,.3,1.2); display: flex; gap: 10px; align-items: center;
}
.toast.ok  { background: linear-gradient(135deg,#1f5c2c,#2b7a3a); border-color:#3f9e52; }
.toast.err { background: linear-gradient(135deg,#5c3a10,#7d4f14); border-color:#a97424; }
.toast.info{ background: linear-gradient(135deg,#1b3556,#25507d); border-color:#3a76ad; }
@keyframes slideIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }

/* ============================================================
 * 订单卡
 * ========================================================== */
.order-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow); transition: .18s, background-color .35s, border-color .18s;
}
.order-card:hover { box-shadow: var(--shadow-lg); border-color: rgba(212,175,55,.32); }
.order-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 13px; }
.order-id { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 14px; font-weight: 700; color: var(--accent-l); letter-spacing: .3px; }
.order-meta { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.order-body { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px 16px; font-size: 13.5px; }
.order-body .k { color: var(--ink-soft); font-size: 12px; display: block; }
.order-body .v { color: var(--ink); font-weight: 600; }
.order-foot { margin-top: 14px; padding-top: 13px; border-top: 1px dashed var(--line); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.route-line { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.route-line .arrow { color: var(--brand-gold); }

/* ============================================================
 * 空状态
 * ========================================================== */
.empty { text-align: center; padding: 52px 20px; color: var(--ink-soft); }
.empty .ico { font-size: 46px; opacity: .35; margin-bottom: 12px; }
.empty h4 { color: var(--ink); margin-bottom: 5px; font-size: 16px; }
.empty p { font-size: 13.5px; }

/* ============================================================
 * 统计卡
 * ========================================================== */
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow); transition: background-color .35s, border-color .18s;
}
.stat .lab { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.stat .val { font-size: 26px; font-weight: 800; color: var(--accent-l); letter-spacing: -.5px; }
.stat .val small { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.stat.accent { background: linear-gradient(140deg, var(--brand-gold), var(--brand-gold-d)); border-color: transparent; }
.stat.accent .lab { color: rgba(42,29,0,.78); }
.stat.accent .val { color: #2a1d00; }

/* ============================================================
 * 筛选列
 * ========================================================== */
.filterbar { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.chip {
  font-size: 13px; font-weight: 600; padding: 7px 15px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--card); cursor: pointer; transition: .16s, background-color .35s;
  color: var(--ink-2);
}
.chip:hover { border-color: #6a5320; }
.chip.on { background: linear-gradient(135deg, var(--brand-gold), var(--brand-gold-d)); border-color: var(--brand-gold); color: #2a1d00; }
.chip .n {
  display: inline-block; background: rgba(0,0,0,.14); border-radius: 999px;
  padding: 0 7px; margin-left: 5px; font-size: 11.5px;
}
.chip.on .n { background: rgba(255,255,255,.28); }

/* ============================================================
 * 弹窗
 * ========================================================== */
.modal-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.68); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 18px;
  animation: fadeIn .18s; backdrop-filter: blur(3px);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; width: 100%; max-width: 620px;
  max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg);
  animation: popIn .24s cubic-bezier(.2,.9,.3,1.15);
}
@keyframes popIn { from { opacity: 0; transform: scale(.95) translateY(12px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-head {
  padding: 20px 24px; border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center; position: sticky;
  top: 0; background: var(--card); z-index: 2; border-radius: 18px 18px 0 0;
}
.modal-head h3 {
  font-size: 17px; color: var(--accent-l);
}
.modal-head .x {
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg);
  cursor: pointer; font-size: 18px; color: var(--ink-soft); line-height: 1;
}
.modal-head .x:hover { background: var(--card-2); color: var(--accent-l); }
.modal-body { padding: 22px 24px; }
.modal-foot { padding: 16px 24px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* ============================================================
 * 表格
 * ========================================================== */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th {
  background: var(--card-2); text-align: left; font-size: 12.5px; font-weight: 700;
  color: var(--accent-d); padding: 12px 14px; border-bottom: 1px solid var(--line);
  white-space: nowrap; letter-spacing: .3px;
}
tbody td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--ink); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--card-2); }

/* ============================================================
 * 页脚
 * ========================================================== */
.footer { background: var(--chrome); color: var(--ink-soft); padding: 40px 0 26px; font-size: 13px; margin-top: 20px; border-top: 1px solid rgba(212,175,55,.2); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; margin-bottom: 26px; }
.footer h5 { color: var(--accent-l); font-size: 14px; margin-bottom: 11px; }
.footer a { color: var(--ink-soft); display: block; padding: 3px 0; font-size: 13px; }
.footer a:hover { color: var(--brand-gold-l); text-decoration: none; }
.footer-bottom { border-top: 1px solid rgba(212,175,55,.14); padding-top: 18px; font-size: 12px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* 页脚里的 logo 徽章 */
.footer .logo-mark {
  background: linear-gradient(140deg, var(--brand-gold-l), var(--brand-gold-d));
  color: #2a1d00;
  box-shadow: 0 3px 12px rgba(212,175,55,.34), inset 0 1px 0 rgba(255,255,255,.4);
}

/* ============================================================
 * 响应式
 * ========================================================== */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero h1 { font-size: 31px; }
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav { display: none; }
  .nav.open {
    display: flex; flex-direction: column; position: absolute; top: 62px; left: 0; right: 0;
    background: var(--chrome); padding: 12px; gap: 2px; box-shadow: 0 16px 30px rgba(0,0,0,.6);
  }
  .nav.open a { width: 100%; }
  .nav-toggle {
    display: flex; margin-left: auto; width: 40px; height: 40px; border-radius: 9px;
    border: 1px solid rgba(212,175,55,.32); background: rgba(212,175,55,.12); color: var(--accent-l);
    cursor: pointer; align-items: center; justify-content: center; font-size: 19px;
  }
}
@media (max-width: 600px) {
  .hero { padding: 40px 0 50px; }
  .hero h1 { font-size: 26px; }
  .grid-3, .grid-4, .grid-2, .form-grid-2 { grid-template-columns: 1fr; }
  .order-body { grid-template-columns: 1fr; }
  .steps .step span.t { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .section { padding: 40px 0; }
  .section-head h2 { font-size: 22px; }
  #toast-host { left: 16px; right: 16px; top: 70px; }
  .toast { max-width: none; }
}

/* ============================================================
 * 列印（A4 運輸署規格）——一律還原白紙
 * ========================================================== */
@media print {
  @page { size: A4 portrait; margin: 12mm 10mm; }
  :root, :root[data-theme="dark"] {
    --bg:#fff; --card:#fff; --card-2:#f8fafd; --ink:#141c2e; --ink-2:#2b3550; --ink-soft:#5b6580;
    --line:#e4e8f0; --chrome:#141c2e;
    --ok:#16a34a; --warn:#d97706; --info:#2563eb; --danger:#dc2626;
    --brand-gold:#b8860b; --brand-gold-l:#c7930d; --brand-gold-d:#8a6608;
    --accent:#c7930d; --accent-l:#a8760a; --accent-d:#8a6608;
    --ok-bg:#e8f8ee; --warn-bg:#fef4e6; --info-bg:#e8f0fe; --danger-bg:#fdeaea;
  }
  body { background: #fff; color:#141c2e; font-size: 11pt; }
  .topbar, .footer, .no-print, .btn, #toast-host, .theme-toggle, .nav-toggle { display: none !important; }
  .modal-mask { position: static; background: #fff; backdrop-filter: none; }
  .modal { box-shadow: none; max-width: none; max-height: none; border-color: #000; background:#fff; }
  .table-wrap { border: 1px solid #000; background: #fff; }
  thead th { background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  tbody tr { page-break-inside: avoid; }
  a { color: #000; text-decoration: none; }
}
