/* ============================================================
   车公司端 / 酒店端 / 平台后台 共用样式
   桌面：左侧导航；手机：顶部横向导航（车公司调度员常用手机接单）
   ============================================================ */
:root {
  --brand: #0a63d1; --brand-d: #00275c; --brand-l: #e8f1fe; --amber: #e2a73b;
  --ink: #172033; --muted: #5a6578; --line: #dfe4ec; --bg: #f3f5f9; --card: #fff;
  --err: #b3261e; --err-bg: #fbeceb; --warn-bg: #fff4dd; --warn: #8a5a00;
  --ok: #0f6b4f; --ok-bg: #e5f4ec;   /* 成功 / 已接单仍用绿色（通用习惯），和品牌蓝区分开 */
  --radius: 12px; --shadow: 0 1px 2px rgba(0, 39, 92,.06), 0 4px 16px rgba(0, 39, 92,.06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; color-scheme: light; -webkit-tap-highlight-color: rgba(10, 99, 209,.12); }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-size: 14.5px; line-height: 1.55; overflow-wrap: break-word;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "PingFang SC", "Noto Sans JP", "Noto Sans CJK JP", "Microsoft YaHei", sans-serif;
}
a { color: var(--brand); }
a, button, label, summary, select, input[type=checkbox], input[type=radio] { touch-action: manipulation; }
img, svg, canvas { max-width: 100%; }
h1 { font-size: 21px; margin: 0 0 14px; }
h2 { font-size: 16px; margin: 22px 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

/* ---------- 布局 ---------- */
.side { position: fixed; inset: 0 auto 0 0; width: 220px; background: var(--brand-d); color: #c8d8ee; display: flex; flex-direction: column; padding: 16px 12px; z-index: 10; }
.p-logo { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; color: #fff; text-decoration: none; padding: 0 4px 16px; }
.p-logo small { font-weight: 400; font-size: 12px; color: #9bb6dc; padding-left: 4px; }
/* logo 是蓝色系、白底设计：放在白色底板上（深绿底上「FUJI」看不清） */
.brand-chip { display: inline-flex; align-items: center; background: #fff; border-radius: 10px; padding: 6px 12px; }
.p-logo-img { display: block; width: 150px; height: auto; }

.p-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.p-nav a { color: #d3e0f3; text-decoration: none; padding: 9px 12px; border-radius: 8px; display: flex; align-items: center; gap: 8px; }
.p-nav a:hover { background: rgba(255,255,255,.08); }
.p-nav a.on { background: rgba(255,255,255,.14); color: #fff; font-weight: 600; }
.p-nav .nl { flex: 1; }
.p-nav .ns { display: none; }
.p-nav .ni { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.dot { font-style: normal; background: var(--amber); color: #3a2800; border-radius: 999px; font-size: 11.5px; line-height: 18px; font-weight: 700; padding: 0 6px; min-width: 20px; text-align: center; }
.p-me { border-top: 1px solid rgba(255,255,255,.12); padding: 12px 8px 0; font-size: 13px; display: grid; gap: 8px; }
.p-me a { color: #fff; }
.p-lang a { margin-right: 10px; opacity: .6; text-decoration: none; }
.p-lang a.on { opacity: 1; font-weight: 700; text-decoration: underline; }
.p-main { margin-left: 220px; padding: 22px 26px 60px; max-width: 1280px; }

/* ---------- 平板 / 手机：侧栏改成顶部栏 ----------
   第一行：标志 + 语言 + 退出；第二行：导航按钮自动换行（不再横向滚动藏住菜单）
   车公司端：导航改成手机底部标签栏（司机、调度员单手操作） */
@media (max-width: 860px) {
  .side {
    position: static; inset: auto; width: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 10px;
    padding: max(6px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left));
  }
  .p-logo { order: 0; flex: 1 1 auto; flex-direction: row; align-items: center; min-width: 0; min-height: 44px; padding: 0; }
  .brand-chip { padding: 3px 8px; border-radius: 8px; }
  .p-logo-img { width: auto; height: 38px; }
  .p-logo small { display: none; }
  .p-me { order: 1; flex: none; display: flex; align-items: center; gap: 4px; margin-left: auto; border: 0; padding: 0; white-space: nowrap; }
  .p-me .p-who { display: none; }
  .p-me a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 8px; }
  /* 语言只显示「切换到另一种」的那个按钮，省出一行 */
  .p-lang a { margin: 0; }
  .p-lang a.on { display: none; }
  .p-out { border: 1px solid rgba(255,255,255,.3); border-radius: 999px; margin-left: 4px; }
  .p-nav { order: 2; flex: 1 1 100%; flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .p-nav a { min-height: 40px; padding: 6px 12px; background: rgba(255,255,255,.06); white-space: nowrap; }
  .p-nav .nl { flex: none; }
  .p-main { margin-left: 0; padding: 14px max(12px, env(safe-area-inset-right)) calc(40px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }

  /* 车公司端底部标签栏 */
  .p-op .p-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px;
    padding: 4px max(4px, env(safe-area-inset-right)) calc(4px + env(safe-area-inset-bottom)) max(4px, env(safe-area-inset-left));
    background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0, 39, 92,.08);
  }
  .p-op .p-nav a {
    position: relative; flex-direction: column; justify-content: center; gap: 2px; min-height: 54px; padding: 4px 2px;
    background: none; color: var(--muted); font-size: 11.5px; line-height: 1.2; text-align: center; white-space: nowrap; border-radius: 10px;
  }
  .p-op .p-nav a.on { color: var(--brand); background: var(--brand-l); font-weight: 700; }
  .p-op .p-nav .ni { width: 22px; height: 22px; opacity: 1; }
  .p-op .p-nav .nl { display: none; }
  .p-op .p-nav .ns { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .p-op .p-nav .dot { position: absolute; top: 3px; left: calc(50% + 6px); }
  .p-op .p-main { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
}

/* ---------- 通用组件 ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 14px; }
.card > h2:first-child { margin-top: 0; }
.alert { border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; }
.alert.ok { background: var(--ok-bg); color: var(--ok); }
.alert.err { background: var(--err-bg); color: var(--err); }
.alert.warn { background: var(--warn-bg); color: var(--warn); }
.alert.info { background: #eef3fb; color: #1f4b8f; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 600; border: 1px solid transparent; border-radius: 9px; padding: 8px 14px; cursor: pointer; text-decoration: none; background: #eef1f6; color: var(--ink); min-height: 38px; }
.btn:hover { filter: brightness(.96); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-danger { background: var(--err); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn-lg { font-size: 16px; padding: 12px 20px; min-height: 48px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row > label { display: inline-flex; align-items: center; gap: 8px; }
/* min(…, 100%)：屏幕比最小列宽还窄时（如 320px 的小屏手机）缩成一列，不撑破页面 */
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); }
.grid > * { min-width: 0; }
label.f { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
input, select, textarea { display: block; font: inherit; color: var(--ink); background-color: #fff; border: 1px solid #cfd7e2; border-radius: 8px; padding: 8px 10px; min-height: 38px; width: 100%; min-width: 0; margin: 0; }
select {
  -webkit-appearance: none; appearance: none; padding-right: 30px; text-overflow: ellipsis; white-space: nowrap;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%235a6578' fill='none' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
input[type=date], input[type=time], input[type=month] { -webkit-appearance: none; appearance: none; text-align: left; }
input::-webkit-date-and-time-value { text-align: left; margin: 0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(10, 99, 209,.14); }
input[type=checkbox], input[type=radio] { display: inline-block; width: 18px; height: 18px; min-height: 0; padding: 0; flex: none; accent-color: var(--brand); }
input[type=file] { padding: 6px; }
.field { margin-bottom: 12px; min-width: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.checks label { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; min-height: 32px; }
.hint { font-size: 12.5px; color: var(--muted); margin: 4px 0 0; }

.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* 列多的后台表格：容器比这个窄时横向滑动，而不是把路线、姓名挤成一两个字一行 */
.tbl-wrap > table.t.wide { min-width: 900px; }
.tbl-wrap > table.t.mid { min-width: 760px; }
table.t td.route { min-width: 180px; }
table.t { width: 100%; border-collapse: collapse; background: #fff; }
table.t th, table.t td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.t th { font-size: 12.5px; color: var(--muted); font-weight: 600; background: #f9fafc; white-space: nowrap; }
table.t tr.hot td { background: #fff5f4; }
table.t tr.warm td { background: #fffaf0; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #eef1f6; color: var(--muted); white-space: nowrap; }
.tag.pending { background: var(--warn-bg); color: var(--warn); }
.tag.accepted, .tag.s1 { background: var(--ok-bg); color: var(--ok); }
.tag.completed { background: #e8ecf5; color: #2d4a7a; }
.tag.cancelled, .tag.expired, .tag.s2, .tag.s3 { background: #eee; color: #777; }
.tag.s0 { background: var(--warn-bg); color: var(--warn); }
.tag.arrival { background: #e7f0fb; color: #1f4b8f; }
.tag.departure { background: #f2eafa; color: #5b2d8a; }
.tag.charter { background: #fdf0e3; color: #8a4b00; }
.tag.red { background: var(--err-bg); color: var(--err); }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(140px, 100%), 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; }
.kpi b { display: block; font-size: 24px; color: var(--brand-d); font-variant-numeric: tabular-nums; }
.kpi span { color: var(--muted); font-size: 13px; }
.kpi.red b { color: var(--err); }
/* 标签列最多占 40%，长标签自动折行，右侧内容不会被挤窄 */
dl.kv { display: grid; grid-template-columns: fit-content(40%) minmax(0, 1fr); gap: 6px 16px; margin: 0; align-items: baseline; }
.back { margin: 0 0 8px; }
.back a { display: inline-flex; align-items: center; min-height: 40px; padding-right: 12px; text-decoration: none; font-weight: 600; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; overflow-wrap: anywhere; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; align-items: end; }
.filters > * { width: auto; }
.filters label { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs a { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 14px; border-radius: 999px; background: #fff; text-decoration: none; color: var(--ink); border: 1px solid var(--line); white-space: nowrap; }
.tabs a.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.pager { margin-top: 12px; }
.pager ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; }
.pager li a, .pager li span { display: block; min-width: 36px; padding: 6px 10px; text-align: center; border-radius: 6px; background: #fff; border: 1px solid var(--line); text-decoration: none; }
.pager li.active span { background: var(--brand); color: #fff; }

/* ---------- 车公司：订单卡片 ---------- */
.jobs { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr)); }
.job { min-width: 0; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; border-left: 4px solid var(--brand); }
.job.soon { border-left-color: var(--err); }
.job-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.job-when { min-width: 0; font-size: 20px; font-weight: 700; line-height: 1.25; }
.job-when .d { font-size: 15px; font-weight: 600; margin-right: 6px; }
.job-when .t { font-size: 22px; white-space: nowrap; }
.job-when small { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 400; color: var(--muted); }
.job-pay { flex: none; text-align: right; }
.job-pay b { display: block; font-size: 22px; color: var(--brand-d); font-variant-numeric: tabular-nums; }
.job-pay small { color: var(--muted); font-size: 12px; }
.job-route { font-size: 15px; font-weight: 600; }
.job-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.job-note { background: #f9fafc; border-radius: 8px; padding: 6px 10px; font-size: 13px; color: #374256; }
.job-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.job-actions .btn { flex: 1; }
/* 展开接单 / 不接表单时独占一整行，手机上不挤 */
.job-actions details[open] { flex: 1 1 100% !important; }
.job-pay small { display: block; max-width: 130px; margin-left: auto; line-height: 1.3; }
.job details summary { cursor: pointer; list-style: none; }
.job details summary::-webkit-details-marker { display: none; }
.job .release summary { display: inline-flex; align-items: center; min-height: 36px; }
a.tel { display: inline-flex; align-items: center; min-height: 32px; font-weight: 600; white-space: nowrap; }
.acc-form { display: grid; gap: 8px; margin-top: 8px; padding: 10px; background: var(--brand-l); border-radius: 10px; }
.acc-form .two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.acc-form .hint { margin: 0; }
.newbar { position: sticky; top: 8px; z-index: 5; background: var(--amber); color: #3a2800; font-weight: 700; padding: 10px 14px; border-radius: 10px; margin-bottom: 12px; display: none; justify-content: space-between; align-items: center; gap: 10px; box-shadow: var(--shadow); }
.newbar.show { display: flex; }
.empty { text-align: center; padding: 40px 10px; color: var(--muted); background: #fff; border-radius: var(--radius); }

/* ---------- 登录页 ---------- */
.login-page { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; background: linear-gradient(160deg, var(--brand-d), #0a58c2); padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); }
.login-box { width: 100%; max-width: 380px; background: #fff; border-radius: 16px; padding: 26px 24px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.login-box h1 { text-align: center; margin-bottom: 4px; }
.login-brand { margin: -6px 0 2px; line-height: 0; }
.login-brand img { display: block; width: 220px; max-width: 100%; height: auto; margin: 0 auto; }
.login-box .sub { text-align: center; color: var(--muted); margin: 0 0 18px; }
.login-box .btn { width: 100%; margin-top: 6px; }
/* 登录验证码：输入框 + 图片（点图片换一张） */
.cap-row { display: flex; gap: 8px; align-items: stretch; }
.cap-row input { flex: 1; min-width: 0; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.cap-row input::placeholder { font-weight: 400; letter-spacing: 0; text-transform: none; }
.cap-img { position: relative; flex: none; width: 140px; height: 44px; padding: 0; border: 1px solid #cfd7e2; border-radius: 8px; background: #f3f6fa; overflow: hidden; cursor: pointer; }
.cap-img img { display: block; width: 100%; height: 100%; }
.cap-img:hover, .cap-img:focus-visible { border-color: var(--brand); }
.cap .hint { font-size: 12px; }
.login-box .foot { text-align: center; margin-top: 10px; font-size: 13.5px; }
.login-box .foot a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 8px; }

/* ---------- 二维码 / 海报 ---------- */
.qr-box { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.qr { width: 180px; height: 180px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.qr img, .qr canvas { width: 100% !important; height: auto !important; display: block; }
.copybox { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.copybox .copyline { flex: 1 1 260px; margin: 0; }
.pre-msg { border-top: 1px solid var(--line); padding: 4px 0; }
.pre-msg summary { cursor: pointer; font-weight: 600; min-height: 40px; display: flex; align-items: center; }
.pre-msg textarea { font-size: 14px; line-height: 1.6; margin: 6px 0 8px; background: #f9fafc; }
.copyline { font-family: ui-monospace, Consolas, monospace; font-size: 13px; background: #f3f6fa; padding: 6px 10px; border-radius: 6px; overflow-wrap: anywhere; }

/* 转化漏斗 */
.funnel { display: grid; gap: 8px; }
.fn-row { display: grid; grid-template-columns: 7.5em minmax(0, 1fr) 4.5em 4em; align-items: center; gap: 10px; }
.fn-bar { height: 14px; background: #eef1f6; border-radius: 999px; overflow: hidden; }
.fn-bar i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
@media (max-width: 480px) { .fn-row { grid-template-columns: 6.5em minmax(0, 1fr) 3.5em; } .fn-p { display: none; } }

/* 价格表编辑 */
.fare-tbl input { width: 90px; text-align: right; padding: 5px 7px; min-height: 32px; }
.fare-tbl td:first-child { white-space: nowrap; }
.fare-tbl td.nowrap input { display: inline-block; }
table.t .btn { white-space: nowrap; }

/* 平板和所有触屏设备：输入框字号 16px（iPad 也会在小于 16px 时点输入框自动放大） */
@media (max-width: 860px), (pointer: coarse) {
  input, select, textarea { font-size: 16px; }
  input[type=checkbox], input[type=radio] { width: 20px; height: 20px; }
}

/* ============================================================
   手机（≤ 640px）
   ============================================================ */
@media (max-width: 640px) {
  h1 { font-size: 19px; }
  /* 输入框字号 16px：小于 16px 时 iPhone 一点输入框就会把整页放大 */
  input, select, textarea { font-size: 16px; min-height: 44px; }
  .fare-tbl input { min-height: 40px; }
  .btn { min-height: 44px; }
  .card { padding: 14px; }
  .kpi { padding: 12px 14px; }
  .kpi b { font-size: 21px; }
  .job { padding: 12px 14px; }
  /* 选司机 / 选车辆的下拉框内容长，一行一个 */
  .acc-form .two.sel { grid-template-columns: minmax(0, 1fr); }
  /* 行内的添加表单（车辆、司机）改成一行一个输入框 */
  form.row > input, form.row > select, form.row > label, form.row > .btn { flex: 1 1 100%; width: 100% !important; }
  form.row > label { display: grid; gap: 4px; }
  /* 筛选条：两列排列，搜索框和按钮各占一行 */
  .filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters > * { width: 100% !important; min-width: 0; }
  .filters label { display: grid; gap: 2px; }
  .filters label input { width: 100% !important; }
  .filters input[name=q], .filters select[name=region] { grid-column: 1 / -1; }
  table.t td > a:not(.btn) { display: inline-block; padding: 6px 0; }
  dl.kv dd > a { display: inline-flex; align-items: center; min-height: 32px; }
  details > summary.small { display: inline-flex; align-items: center; min-height: 40px; }
  /* 表格：一般表格保持横向滑动，列宽不再被挤成一个字一行 */
  .tbl-wrap > table.t:not(.stack):not(.wide) { min-width: 620px; }
  /* 带 .stack 的表格在手机上每一行变成一张卡片，表头文字写在每格前面 */
  table.t.stack, table.t.stack tbody, table.t.stack tr, table.t.stack td { display: block; width: 100%; }
  .tbl-wrap > table.t.stack.mid { min-width: 0; }
  table.t.stack thead { display: none; }
  table.t.stack tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  table.t.stack tr:last-child { border-bottom: 0; }
  table.t.stack td { border: 0; padding: 3px 0; text-align: left; white-space: normal; }
  table.t.stack td[data-l]::before { content: attr(data-l); color: var(--muted); font-size: 12.5px; }
  table.t.stack td.num { text-align: left; }
  table.t.stack td:empty { display: none; }
  /* 表头文字浮在左侧 96px 宽的一栏，内容折行时对齐在它右边；flow-root 让格子高度包住较长的标签，不会压到下一行 */
  table.t.stack td[data-l] { display: flow-root; padding-left: 104px; }
  table.t.stack td[data-l]::before { float: left; width: 96px; margin-left: -104px; padding-top: 1px; line-height: 1.5; overflow-wrap: anywhere; }
  table.t.stack td[data-l]:empty { display: none; }
  table.t.stack td.act { padding-top: 8px; }
  table.t.stack td.act .btn { width: 100%; }
  .card.tbl-wrap:has(table.stack) { overflow-x: visible; }
  /* 二维码在上、说明在下，各占整行 */
  .qr-box { display: grid; justify-items: center; gap: 14px; }
  .qr-box > div:not(.qr) { width: 100%; min-width: 0 !important; }
  .login-box { padding: 22px 18px; }
  .cap-img { height: 44px; }
  .qr { width: min(220px, 70vw); height: auto; aspect-ratio: 1; }
}

/* ---------- 酒店后台：佣金状态（预计 → 已确认待结算 → 已结算；取消 / 过期 无佣金） ---------- */
.tag.fs-expected { background: var(--warn-bg); color: var(--warn); }
.tag.fs-confirmed { background: var(--brand-l); color: var(--brand); }
.tag.fs-paid { background: var(--ok-bg); color: var(--ok); }
.tag.fs-none { background: #eee; color: #777; }
.tag.src-hotel { background: #f2eafa; color: #5b2d8a; }
.fs-expected-t { color: var(--warn) !important; }
.fs-paid-t { color: var(--ok) !important; }
.fee-rule { line-height: 1.7; }
.fee-box { border: 1.5px solid var(--brand-l); }
.fee-calc { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.fee-calc span { display: flex; flex-direction: column; min-width: 0; }
.fee-calc small { color: var(--muted); font-size: 12px; }
.fee-calc b { font-size: 22px; font-variant-numeric: tabular-nums; color: var(--ink); }
.fee-calc i { font-style: normal; font-size: 20px; color: var(--muted); }
.fee-calc .fee-total b { color: var(--brand); font-size: 26px; }

/* 后台「邮件模板」：左边改文案，右边实时预览 */
.mt-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1180px) { .mt-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .mt-preview { position: sticky; top: 12px; } }
.mt-frame { display: block; width: 100%; height: 1200px; max-height: calc(100vh - 90px); min-height: 640px; border: 0; border-radius: 12px; background: #eef2f8; }
.mt-tabs { margin-bottom: 8px; }
.mt-langs { margin-bottom: 16px; }
.mt-langs a { min-height: 32px; padding: 4px 12px; font-size: 14px; }
.mt-n { display: inline-block; margin-left: 6px; min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--warn-bg); color: var(--warn); font-size: 12px; font-weight: 700; text-align: center; }
.tabs a.on .mt-n { background: #fff; color: var(--brand); }
.mt-field { margin-bottom: 14px; }
.mt-field textarea { width: 100%; line-height: 1.6; }
.mt-changed input, .mt-changed textarea { border-color: #e0b44a; background: #fffcf3; }
.mt-default { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; margin-top: 4px; }
.mt-default label { display: inline-flex; gap: 4px; align-items: center; }
.mt-base { margin-top: 4px; padding: 8px 10px; border-radius: 8px; background: #f3f6fa; font-size: 13px; white-space: pre-wrap; color: var(--muted); }
.mt-blocks summary { cursor: pointer; }
.mt-onoff th, .mt-onoff td { text-align: center; }
.mt-onoff td:first-child { text-align: left; }
.mt-check { display: inline-flex; padding: 6px; cursor: pointer; }
.mt-check input { width: 18px; height: 18px; }
.mt-vars td { padding: 4px 8px; }
