/* =====================================================================
 * 浚鍵管理有限公司 · 西鐵小巴系統 — 包車預約中心
 * style.css — 共用設計系統
 * ---------------------------------------------------------------------
 * 品牌色：紅Van紅 (#c8102e) + 金 (#f5b30b) + 深夜藍 (#141c2e)
 * 風格：現代、乾淨、可信賴、手機優先
 * ===================================================================== */

:root {
  --brand-red:   #c8102e;
  --brand-red-d: #9c0c23;
  --brand-red-l: #e63946;
  --brand-gold:  #f5b30b;
  --brand-gold-l:#ffd15c;
  --ink:         #141c2e;
  --ink-2:       #2b3550;
  --ink-soft:    #5b6580;
  --line:        #e4e8f0;
  --bg:          #f5f7fb;
  --card:        #ffffff;
  --ok:          #16a34a;
  --ok-bg:       #e8f8ee;
  --warn:        #d97706;
  --warn-bg:     #fef4e6;
  --info:        #2563eb;
  --info-bg:     #e8f0fe;
  --danger:      #dc2626;
  --danger-bg:   #fdeaea;
  --radius:      14px;
  --radius-sm:   9px;
  --shadow:      0 2px 4px rgba(20,28,46,.05), 0 10px 30px rgba(20,28,46,.07);
  --shadow-lg:   0 6px 12px rgba(20,28,46,.08), 0 24px 60px rgba(20,28,46,.13);
  --font: "PingFang HK","PingFang TC","Microsoft JhengHei","Noto Sans TC",
          "Hiragino Sans TC",system-ui,-apple-system,"Segoe UI",sans-serif;
  /* —— 結構色（深色模式靠佢保持深色 chrome）—— */
  --chrome:      #141c2e;
  --chrome-fg:   #ffffff;
  --card-2:      #f8fafd;
  --glow:        rgba(200,16,46,.30);
}

/* ============================================================
 * 深色主題（:root[data-theme="dark"]）
 * 只翻轉「表面」語意色；品牌紅金保留，結構 chrome 永遠深色
 * ========================================================== */
:root[data-theme="dark"] {
  --bg:         #0c111c;
  --card:       #161d2d;
  --card-2:     #1b2334;
  --ink:        #e9eef8;
  --ink-2:      #c6cee0;
  --ink-soft:   #8b94ab;
  --line:       #28324a;
  --chrome:     #080c16;
  --chrome-fg:  #eef2fa;

  --ok:         #34d27e;  --ok-bg:     #10301e;
  --warn:       #f5b545;  --warn-bg:   #352714;
  --info:       #5aa0ff;  --info-bg:   #13233f;
  --danger:     #ff6b6b;  --danger-bg: #371618;

  --brand-red:  #e23b4f;  --brand-red-d: #c8102e;  --brand-red-l: #ff6478;
  --brand-gold: #f5b30b;  --brand-gold-l:#ffd36b;

  --shadow:     0 2px 6px rgba(0,0,0,.42), 0 12px 34px rgba(0,0,0,.5);
  --shadow-lg:  0 8px 16px rgba(0,0,0,.5), 0 30px 70px rgba(0,0,0,.62);
  --glow:       rgba(226,59,79,.42);
}

/* 深色模式下，原本用品牌紅做「文字」嘅地方要提亮保對比 */
:root[data-theme="dark"] a { color: var(--brand-red-l); }
:root[data-theme="dark"] .eyebrow,
:root[data-theme="dark"] .route-line .arrow,
:root[data-theme="dark"] .price-tag b { color: var(--brand-red-l); }
:root[data-theme="dark"] .vehicle-card .seat { color: var(--brand-gold-l); }
:root[data-theme="dark"] .toast { background: #1d2738; }
:root[data-theme="dark"] select {
  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='%23aab3c6' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
}
:root[data-theme="dark"] .check-pill { background: var(--card); }
:root[data-theme="dark"] .check-pill.on {
  background: rgba(226,59,79,.14); color: var(--brand-red-l); border-color: var(--brand-red-l);
}
/* 提示條文字（淺色底寫死深色，深色模式要提亮） */
:root[data-theme="dark"] .alert.ok   { color: #86efac; }
:root[data-theme="dark"] .alert.info { color: #93c5fd; }
:root[data-theme="dark"] .alert.warn { color: #fcd34d; }
:root[data-theme="dark"] .alert.err  { color: #fca5a5; }
:root[data-theme="dark"] .alert b { color: inherit; }

* { 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;
}

a { color: var(--brand-red); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------------- 版面 ---------------- */
.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 16px rgba(20,28,46,.18);
  border-bottom: 1px solid rgba(245,179,11,.30);
}
.topbar::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand-gold), transparent);
  opacity: .55;
}
.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: #fff; }
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 38px; height: 38px; border-radius: 10px; flex: 0 0 38px;
  background: linear-gradient(140deg, var(--brand-red) 0%, var(--brand-red-d) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; box-shadow: 0 3px 10px rgba(200,16,46,.4);
}
.logo-txt { line-height: 1.15; }
.logo-txt b { font-size: 15px; letter-spacing: .3px; display: block; }
.logo-txt span { font-size: 11px; opacity: .62; letter-spacing: .5px; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a {
  color: rgba(255,255,255,.78); font-size: 13.5px; padding: 8px 13px;
  border-radius: 8px; transition: .18s; font-weight: 500; white-space: nowrap;
}
.nav a:hover { background: rgba(255,255,255,.1); color: #fff; text-decoration: none; }
.nav a.active { background: var(--brand-red); color: #fff; }

.nav-toggle { display: none; }

/* ---------------- 深色／淺色切換掣 ---------------- */
.theme-toggle {
  width: 40px; height: 40px; flex: 0 0 40px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.1);
  color: #fff; 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(255,255,255,.2); transform: translateY(-1px); }
.theme-toggle:active { transform: translateY(0); }

/* ---------------- Hero ---------------- */
.hero {
  background:
    radial-gradient(1000px 460px at 88% -12%, rgba(245,179,11,.22) 0%, transparent 62%),
    radial-gradient(760px 400px at 6% 108%, rgba(200,16,46,.32) 0%, transparent 60%),
    linear-gradient(160deg, #101828 0%, #1d2b4a 55%, #141c2e 100%);
  color: #fff; 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(255,255,255,.045);
}
.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(245,179,11,.16); border: 1px solid rgba(245,179,11,.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); }
.hero p.lead { font-size: 16px; color: rgba(255,255,255,.8); 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: rgba(255,255,255,.6); }

.hero-card {
  background: rgba(255,255,255,.055); border: 1px solid rgba(245,179,11,.28);
  border-radius: 18px; padding: 24px; backdrop-filter: blur(10px);
  box-shadow: 0 20px 50px rgba(0,0,0,.35);
}
.hero-card h3 { font-size: 15px; margin-bottom: 14px; color: #fff; }
.hero-card ul { list-style: none; }
.hero-card li {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 13.5px; color: rgba(255,255,255,.82); 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-red-l), var(--brand-red-d)); color: #fff; box-shadow: 0 6px 18px rgba(200,16,46,.34); }
.btn-primary:hover { background: linear-gradient(135deg, var(--brand-red-l), var(--brand-red)); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(200,16,46,.46); }
.btn-gold { background: linear-gradient(135deg, var(--brand-gold-l), var(--brand-gold)); color: #3b2a00; box-shadow: 0 6px 18px rgba(245,179,11,.34); }
.btn-gold:hover { background: linear-gradient(135deg, #ffe399, var(--brand-gold-l)); color: #3b2a00; transform: translateY(-2px); box-shadow: 0 10px 26px rgba(245,179,11,.46); }
.btn-ghost { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.26); }
.btn-ghost:hover { background: rgba(255,255,255,.18); color: #fff; }
.btn-line { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn-line:hover { border-color: var(--ink-soft); color: var(--ink); }
.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; }
.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), var(--brand-red));
}
.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-red); text-transform: uppercase; 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); border-color: rgba(245,179,11,.5); }

.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: #d5dbe8; }
.vehicle-icon {
  width: 66px; height: 66px; margin: 0 auto 14px; border-radius: 16px;
  background: linear-gradient(140deg, #fff1f3, #ffe7ea); color: var(--brand-red);
  display: flex; align-items: center; justify-content: center; font-size: 32px;
}
.vehicle-card h3 { font-size: 17px; margin-bottom: 4px; }
.vehicle-card .seat { color: var(--brand-gold); 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); background: var(--bg); border-radius: 8px; padding: 9px; }
.price-tag b { color: var(--brand-red); 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: var(--info-bg); color: var(--info);
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.feature h4 { font-size: 15px; margin-bottom: 3px; }
.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-red); 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: var(--card); 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:focus, select:focus, textarea:focus {
  border-color: var(--brand-red); box-shadow: 0 0 0 3px rgba(200,16,46,.12), 0 4px 14px rgba(200,16,46,.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='%235b6580' 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;
}
.check-pill:hover { border-color: #c9d1e0; }
.check-pill input { display: none; }
.check-pill.on { border-color: var(--brand-red); background: #fff5f6; color: var(--brand-red-d); font-weight: 600; }
.check-pill .dot {
  width: 15px; height: 15px; border-radius: 4px; border: 1.5px solid #c3cbd9;
  display: flex; align-items: center; justify-content: center; font-size: 10px; color: #fff;
}
.check-pill.on .dot { background: var(--brand-red); border-color: var(--brand-red); }

/* 步驟指示 */
.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: var(--brand-red); border-color: var(--brand-red); color: #fff; }
.step.on { color: var(--brand-red); 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;
}
.badge.pending   { background: var(--warn-bg);   color: var(--warn); }
.badge.quoted    { background: var(--info-bg);   color: var(--info); }
.badge.confirmed { background: var(--ok-bg);     color: var(--ok); }
.badge.done      { background: #eef1f6;          color: var(--ink-soft); }
.badge.cancelled { background: var(--danger-bg); color: var(--danger); }
.badge.synced    { background: #ede9fe;          color: #6d28d9; }

/* ---------------- 提示條 ---------------- */
.alert { border-radius: var(--radius-sm); padding: 13px 16px; font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start; margin-bottom: 16px; }
.alert.info { background: var(--info-bg); color: #1e40af; }
.alert.ok   { background: var(--ok-bg);   color: #14532d; }
.alert.warn { background: var(--warn-bg); color: #7c2d12; }
.alert.err  { background: var(--danger-bg); color: #7f1d1d; }
.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: var(--ink); color: #fff; 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,#15803d,#16a34a); }
.toast.err { background: linear-gradient(135deg,#991b1b,#dc2626); }
.toast.info{ background: linear-gradient(135deg,#1e3a8a,#2563eb); }
@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); }
.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(--ink); 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-red); }

/* ---------------- 空狀態 ---------------- */
.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(--ink); letter-spacing: -.5px; }
.stat .val small { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.stat.accent { background: linear-gradient(140deg, var(--brand-red), var(--brand-red-d)); border-color: transparent; }
.stat.accent .lab { color: rgba(255,255,255,.75); }
.stat.accent .val { color: #fff; }

/* ---------------- 篩選列 ---------------- */
.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: #c9d1e0; }
.chip.on { background: var(--chrome); border-color: var(--chrome); color: var(--chrome-fg); }
.chip .n {
  display: inline-block; background: rgba(0,0,0,.08); border-radius: 999px;
  padding: 0 7px; margin-left: 5px; font-size: 11.5px;
}
.chip.on .n { background: rgba(255,255,255,.22); }

/* ---------------- 彈窗 ---------------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15,22,38,.56); 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;
  background: linear-gradient(90deg, var(--brand-red), var(--brand-gold));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.modal-head .x {
  width: 32px; height: 32px; border-radius: 8px; border: none; background: var(--bg);
  cursor: pointer; font-size: 18px; color: var(--ink-soft); line-height: 1;
  transition: background-color .35s;
}
.modal-head .x:hover { background: var(--line); }
.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(--ink-soft); 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; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--card-2); }

/* ---------------- 頁腳 ---------------- */
.footer { background: var(--chrome); color: rgba(255,255,255,.6); padding: 40px 0 26px; font-size: 13px; margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; margin-bottom: 26px; }
.footer h5 { color: #fff; font-size: 14px; margin-bottom: 11px; }
.footer a { color: rgba(255,255,255,.6); display: block; padding: 3px 0; font-size: 13px; }
.footer a:hover { color: var(--brand-gold); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 18px; font-size: 12px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------------- 響應式 ---------------- */
@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,.3);
  }
  .nav.open a { width: 100%; }
  .nav-toggle {
    display: flex; margin-left: auto; width: 40px; height: 40px; border-radius: 9px;
    border: none; background: rgba(255,255,255,.1); color: #fff; 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[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-red:#c8102e; --brand-red-d:#9c0c23; --brand-red-l:#e63946;
    --brand-gold:#f5b30b; --brand-gold-l:#ffd15c;
    --ok-bg:#e8f8ee; --warn-bg:#fef4e6; --info-bg:#e8f0fe; --danger-bg:#fdeaea;
  }
  body { background: #fff; 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; }
  .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; }
}
