:root {
  --navy: #0d2a47;
  --navy-2: #173b60;
  --gold: #c5a059;
  --bg: #f5f6f8;
  --card: #fff;
  --line: #e2e5ea;
  --text: #1c2430;
  --muted: #667085;
  --ok: #1f7a5a;
  --warn: #b25e09;
  --bad: #b42318;
  --radius: 8px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  font-size: 14px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.primary, .ghost, .danger { border-radius: 6px; padding: 7px 14px; border: 1px solid transparent; }
.primary { background: var(--navy); color: #fff; }
.primary:hover { background: var(--navy-2); }
.ghost { background: #fff; border-color: var(--line); }
.ghost:hover { border-color: var(--navy); }
.danger { background: #fff; border-color: #f1c0bb; color: var(--bad); }
.link { background: none; border: 0; color: inherit; text-decoration: underline; padding: 0; opacity: .8; }
button:disabled { opacity: .5; cursor: not-allowed; }

input, select, textarea { border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; background: #fff; width: 100%; }
textarea { min-height: 72px; resize: vertical; }
label { display: block; font-size: 12px; color: var(--muted); margin: 10px 0 4px; }
.form-error { color: var(--bad); min-height: 1em; margin: 8px 0 0; font-size: 13px; }

/* 登录 */
.login { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(160deg, var(--navy), #081a2d); }
.login-card { width: min(360px, 92vw); background: #fff; padding: 28px; border-radius: 12px; }
.login-card .primary { width: 100%; margin-top: 14px; padding: 10px; }
.login-note { font-size: 12px; color: var(--muted); text-align: center; margin: 14px 0 0; }
.brand { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; }
.brand-mark { width: 34px; height: 34px; border-radius: 8px; background: var(--gold); color: var(--navy); display: grid; place-items: center; font-weight: 700; }
.brand small { display: block; font-size: 12px; opacity: .7; }

/* 框架 */
.shell { display: grid; grid-template-columns: 210px 1fr; min-height: 100vh; }
.sidebar { background: var(--navy); color: #fff; padding: 18px 12px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sidebar nav a { color: #d6dde6; text-decoration: none; padding: 9px 12px; border-radius: 6px; }
.sidebar nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar nav a[aria-current="page"] { background: rgba(197,160,89,.18); color: #fff; box-shadow: inset 3px 0 var(--gold); }
.sidebar nav .nav-sep { font-size: 11px; color: #8ea0b5; margin: 14px 12px 4px; }
.side-user { border-top: 1px solid rgba(255,255,255,.12); padding-top: 12px; display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 13px; }
.side-user > div { width: 100%; }
.side-user small { display: block; color: #9fb0c3; }
.main { padding: 24px 28px 60px; min-width: 0; }
.main:focus { outline: none; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 22px; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card + .card { margin-top: 16px; }
.card h2 { font-size: 15px; margin: 0 0 12px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat small { color: var(--muted); }
.stat b { display: block; font-size: 26px; margin-top: 4px; color: var(--navy); }
.stat.alert b { color: var(--bad); }

.toolbar { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar input[type="search"] { max-width: 260px; }
.toolbar select { width: auto; }
.toolbar .check { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); margin: 0; }
.toolbar .check input { width: auto; }

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; background: #fff; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 12px; color: var(--muted); font-weight: 500; background: #fafbfc; position: sticky; top: 0; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: #f7f9fc; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.total td { font-weight: 600; background: #fafbfc; }
.empty { color: var(--muted); padding: 28px; text-align: center; }
.muted { color: var(--muted); }
.overdue { color: var(--bad); font-weight: 600; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; background: #eef1f5; color: var(--navy); }
.badge.pending { background: #fff4e5; color: var(--warn); }
.badge.accepted { background: #e7f0fb; color: #1d5ea8; }
.badge.done { background: #e6f4ee; color: var(--ok); }
.badge.rejected { background: #fdecea; color: var(--bad); }
.badge.off { background: #f2f2f2; color: #999; }

/* 跟单表格编辑 */
.fu-table input { width: 64px; padding: 4px 6px; text-align: right; }
.fu-table input.text { width: 140px; text-align: left; }
.fu-table tr.dirty td { background: #fffbeb; }
.note { font-size: 12px; color: var(--muted); line-height: 1.7; margin-top: 12px; }

/* 权限开关 */
.perm-table td:first-child { white-space: normal; min-width: 220px; }
.perm-table td small { display: block; color: var(--muted); font-size: 12px; }
.perm-group td { background: #f4f6f9; font-weight: 600; color: var(--navy); font-size: 12px; }
.switch { position: relative; display: inline-block; width: 40px; height: 22px; margin: 0; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: #cfd5dd; border-radius: 22px; transition: background .15s; }
.switch span::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .15s; }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::before { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.switch input:disabled + span { opacity: .6; cursor: not-allowed; }
.lock { font-size: 12px; color: var(--ok); }

/* 案件详情 */
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 4px 20px; }
.detail-grid dt { font-size: 12px; color: var(--muted); margin-top: 10px; }
.detail-grid dd { margin: 2px 0 0; white-space: pre-wrap; word-break: break-word; }
.hidden-field { color: #a0a8b3; font-style: italic; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.timeline time { color: var(--muted); margin-right: 8px; font-variant-numeric: tabular-nums; }
.handoff-item { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.handoff-item b { display: block; }
.handoff-item small { color: var(--muted); display: block; margin-top: 2px; white-space: pre-wrap; }

/* 弹窗 */
.dialog { border: 0; border-radius: 12px; padding: 0; width: min(560px, 94vw); }
.dialog.wide { width: min(920px, 96vw); }
.dialog::backdrop { background: rgba(13,42,71,.45); }
.dialog header { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.dialog h2 { margin: 0; font-size: 16px; }
.dialog .close { background: none; border: 0; font-size: 22px; line-height: 1; }
.dialog-body { padding: 4px 18px 8px; max-height: 70vh; overflow-y: auto; }
.dialog .form-error { padding: 0 18px; }
.dialog footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.members { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.members label { display: flex; gap: 4px; align-items: center; margin: 0; font-size: 13px; color: var(--text); }
.members input { width: auto; }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--navy); color: #fff; padding: 9px 16px; border-radius: 8px; opacity: 0; transition: .2s; pointer-events: none; z-index: 20; }
.toast.show { opacity: 1; transform: translateX(-50%); }
.toast.error { background: var(--bad); }

@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .sidebar nav { flex-direction: row; flex-wrap: wrap; }
  .sidebar nav .nav-sep { display: none; }
  .main { padding: 16px; }
  .form-row { grid-template-columns: 1fr; }
}
@media print {
  .sidebar, .actions, .toolbar { display: none !important; }
  .shell { display: block; }
}
.mt { margin-top: 16px; }
td.wrap { white-space: normal; min-width: 240px; }

/* 机票单 */
.toolbar .field-inline, .toolbar > div { min-width: 140px; }
.toolbar-btn { display: flex; align-items: flex-end; }
.flight-results { margin-top: 8px; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; white-space: pre-wrap; }
h3.sub { font-size: 13px; margin: 14px 0 6px; color: var(--navy); }
.warn-list { color: var(--warn); font-size: 13px; margin: 12px 0 0; padding-left: 18px; }
/* 行程单：正式版式 */
.it-doc { background: #fff; color: #111; border: 1px solid var(--line); padding: 44px 52px 36px; max-width: 820px; position: relative;
  font-family: Arial, "Helvetica Neue", "PingFang SC", sans-serif; font-size: 12px; line-height: 1.5; }
.it-letterhead { border-bottom: 2px solid #0d2a47; padding-bottom: 10px; margin-bottom: 22px; font-size: 11px; color: #333; }
.it-co { font-size: 17px; font-weight: 700; color: #0d2a47; letter-spacing: .02em; margin-bottom: 2px; }
.it-title { text-align: center; font-size: 20px; font-weight: 700; letter-spacing: .12em; margin: 4px 0 20px; color: #0d2a47; }
.it-meta { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #c9ced6; margin-bottom: 22px; }
.it-kv { display: flex; gap: 10px; padding: 7px 12px; border-bottom: 1px solid #e3e6eb; }
.it-kv:nth-child(odd) { border-right: 1px solid #e3e6eb; }
.it-kv span { color: #555; min-width: 128px; font-size: 11px; }
.it-kv b { font-weight: 600; }
.it-sec { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: #fff; background: #0d2a47; padding: 5px 10px; margin: 18px 0 0; }
.it-table { width: 100%; border-collapse: collapse; background: none; font-size: 12px; }
.it-table th { background: #eef1f5; color: #333; font-size: 10.5px; font-weight: 600; text-align: left; padding: 6px 10px; border: 1px solid #c9ced6; position: static; white-space: nowrap; }
.it-table td { padding: 8px 10px; border: 1px solid #c9ced6; vertical-align: top; white-space: normal; }
.it-table td b { font-size: 13px; }
.it-table small { display: block; font-size: 10px; color: #555; }
.it-no { width: 44px; text-align: center; }
.it-footer { margin-top: 22px; padding-top: 10px; border-top: 1px solid #c9ced6; font-size: 10.5px; color: #555; }
.it-footer p { margin: 2px 0; }
.it-doc.is-void::after { content: "VOID 已作废"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 72px; font-weight: 700; color: rgba(180, 35, 24, .2); transform: rotate(-18deg); pointer-events: none; }
details summary { cursor: pointer; font-weight: 600; }
@media print {
  body { background: #fff; }
  .main { padding: 0; }
  .page-head, .no-print, .toast { display: none !important; }
  .it-doc { border: 0; padding: 16mm 15mm; max-width: none; }
  .it-doc.is-void::after { color: rgba(0, 0, 0, .15); }
  .it-sec, .it-table th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  /* 页边距为 0 时浏览器不打印日期、网址、页码等页眉页脚 */
  @page { size: A4; margin: 0; }
}

/* 行程单编辑 */
.it-stop { display: grid; grid-template-columns: 28px 1.2fr 70px 110px 1.6fr 2fr auto; gap: 0 10px; align-items: end; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.it-stop-no { font-weight: 700; color: var(--navy); padding-bottom: 9px; }
.it-del { margin-bottom: 1px; }
.it-day { border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; margin-bottom: 8px; }
.it-day summary { cursor: pointer; }
.pre { white-space: pre-wrap; }
.nowrap { white-space: nowrap; }

/* 行程单文档（预览与打印） */
.itn-doc { background: #fff; color: #111; font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 12px; line-height: 1.5; }
.itn-title { text-align: center; font-size: 20px; letter-spacing: .1em; color: #0d2a47; margin: 6px 0 16px; }
.itn-info, .itn-table { width: 100%; border-collapse: collapse; background: none; margin-bottom: 14px; }
.itn-info th, .itn-info td, .itn-table th, .itn-table td { border: 1px solid #9aa3ae; padding: 6px 9px; vertical-align: top; white-space: normal; text-align: left; font-size: 12px; position: static; }
.itn-info th { width: 22%; background: #eef1f5; color: #333; font-weight: 600; }
.itn-table th { background: #eef1f5; color: #333; font-weight: 600; font-size: 11px; }
.itn-table td:nth-child(1) { width: 7%; }
.itn-table td:nth-child(2) { width: 11%; }
.itn-table td:nth-child(3) { width: 15%; }
.itn-table td:nth-child(5) { width: 10%; }
.itn-table td:nth-child(6) { width: 19%; }
.itn-table tr { break-inside: avoid; }
@media (max-width: 900px) { .it-stop { grid-template-columns: 1fr 1fr; } .it-stop-no { display: none; } }
@media print {
  .it-page .card { border: 0; padding: 0; margin: 0; }
  .it-page .itn-doc { padding: 12mm 12mm; }
  .itn-info th, .itn-table th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* 选城地图 */
.it-map { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-bottom: 12px; }
.it-map-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px; background: #fafbfc; border-bottom: 1px solid var(--line); }
.it-map-bar .ghost { padding: 4px 10px; font-size: 12px; }
.it-map-zoom { margin-left: auto; display: flex; gap: 4px; }
.it-map-svg { display: block; width: 100%; height: 440px; background: #dbe7f1; cursor: grab; touch-action: none; user-select: none; }
.it-map-svg:active { cursor: grabbing; }
.it-map-city { cursor: pointer; }
.it-map-city circle { r: calc(var(--k, 1) * 4px); fill: #2f6fb3; stroke: #fff; stroke-width: calc(var(--k, 1) * 1.2px); }
.it-map-city:hover circle, .it-map-city:focus circle { fill: var(--gold); }
.it-map-city:focus { outline: none; }
.it-map-label { font-size: calc(var(--k, 1) * 11px); fill: #1c2430; paint-order: stroke; stroke: #fff; stroke-width: calc(var(--k, 1) * 3px); display: none; transform: translateX(calc(var(--k, 1) * 5px)); }
.it-map-svg.show-labels .it-map-label, .it-map-city:hover .it-map-label, .it-map-city.selected .it-map-label { display: inline; }
.it-map-city.selected circle { r: calc(var(--k, 1) * 8px); fill: var(--navy); }
.it-map-order { font-size: calc(var(--k, 1) * 9px); font-weight: 700; fill: #fff; pointer-events: none; }
.it-map-route { stroke: var(--gold); stroke-width: calc(var(--k, 1) * 2px); stroke-dasharray: calc(var(--k, 1) * 6px) calc(var(--k, 1) * 4px); }

/* 宽松度 */
.it-range-wrap { max-width: 420px; }
.it-range { width: 100%; padding: 0; border: 0; accent-color: var(--navy); }
.it-range-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.it-range-hint { margin: 4px 0 0; font-size: 12px; }
.it-hints { background: #fff8eb; border: 1px solid #f2d9a8; border-radius: 6px; padding: 8px 12px; margin-bottom: 10px; font-size: 13px; }
.it-hints ul { margin: 4px 0 0; padding-left: 18px; }

/* 地图悬停提示与图例 */
.it-map { position: relative; }
.it-map-tip { position: absolute; transform: translate(-50%, calc(-100% - 10px)); background: var(--navy); color: #fff; padding: 5px 9px; border-radius: 6px; font-size: 12px; line-height: 1.4; pointer-events: none; white-space: nowrap; z-index: 5; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.it-map-tip b { display: block; }
.it-map-tip span { opacity: .85; }
.it-map-legend { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); margin-left: 8px; }
.it-map-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-left: 6px; }
.lg-s { background: #fbf6e6; border: 1px solid #a8946a; }
.lg-e { background: #f3efe4; border: 1px solid #b5a987; }
.it-map-svg { height: 520px; }
.it-map-city.custom circle { fill: #b0782a; }
.it-map-legend .lg-c { background: #b0782a; border-radius: 50%; }

/* 地图国家名：大国常显，中等国家和小国放大后显示 */
.it-map-countries { pointer-events: none; }
.it-map-country { font-size: calc(var(--k, 1) * 15px); font-weight: 600; letter-spacing: .15em; fill: #8a7a55; opacity: .75; paint-order: stroke; stroke: #fbf6e6; stroke-width: calc(var(--k, 1) * 3px); }
.it-map-country.s2 { font-size: calc(var(--k, 1) * 12px); display: none; }
.it-map-country.s3 { font-size: calc(var(--k, 1) * 10px); display: none; }
.it-map-svg.show-mid .it-map-country.s2, .it-map-svg.show-small .it-map-country.s3 { display: inline; }
/* 选点模式 */
.it-map-svg.picking { cursor: crosshair; }
.it-map-picking { display: flex; align-items: center; gap: 10px; background: #fff8eb; border: 1px solid #f2d9a8; border-radius: 6px; padding: 6px 12px; margin-bottom: 6px; font-size: 13px; }
.it-map-picking[hidden] { display: none; }
/* 自定义城市弹窗的景点行 */
.cc-sights { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 8px; }
.cc-sight { display: grid; grid-template-columns: 1.2fr 1.4fr 1fr auto auto; gap: 6px; align-items: center; }
.cc-sight button { padding: 4px 8px; }

/* 关联案件选择框 */
.case-picker { position: relative; }
.case-picker-results { display: flex; flex-direction: column; max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 6px; margin-top: 4px; }
.case-picker-results:empty { display: none; }
.case-picker-results p { margin: 8px 10px; font-size: 13px; }
.case-picker-item { text-align: left; background: #fff; border: 0; border-bottom: 1px solid var(--line); padding: 6px 10px; cursor: pointer; font: inherit; color: inherit; }
.case-picker-item:last-child { border-bottom: 0; }
.case-picker-item:hover, .case-picker-item:focus { background: #f3f6fa; outline: none; }
.case-picker-item small { display: block; color: var(--muted); }
.case-picker-current { display: flex; justify-content: space-between; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; flex-wrap: wrap; }
.case-picker-current small { display: block; color: var(--muted); }
.case-picker-current button { padding: 3px 8px; font-size: 12px; }
/* 案件单据区 */
.case-docs { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.case-docs-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.case-docs-head a { font-size: 12px; padding: 3px 8px; }
.case-doc { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.case-doc small { display: block; color: var(--muted); }
.case-doc.is-void { opacity: .55; }
/* 单据标记 */
.doc-badges { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.doc-badge { font-size: 11px; padding: 1px 6px; border-radius: 99px; background: #f2f2f2; color: #999; white-space: nowrap; }
.doc-badge.has { background: #e6f4ee; color: var(--ok); }

/* 文件翻译 */
.tr-privacy { background: #eef4fb; border: 1px solid #cfe0f3; border-radius: 6px; padding: 8px 12px; font-size: 13px; line-height: 1.7; }
.tr-summary { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.tr-page-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.tr-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.tr-cols.with-orig { grid-template-columns: minmax(0, .9fr) minmax(0, 1fr) minmax(0, 1fr); }
.tr-cols textarea { min-height: 360px; font-size: 13px; line-height: 1.5; }
.tr-orig { margin: 0; border: 1px solid var(--line); border-radius: 6px; background: #fafafa; display: flex; flex-direction: column; min-width: 0; }
.tr-orig figcaption { font-size: 12px; color: var(--muted); padding: 4px 8px; display: flex; justify-content: space-between; align-items: center; gap: 6px; flex-wrap: wrap; }
.tr-orig-scroll { max-height: 640px; overflow: auto; }
.tr-orig img { display: block; width: 100%; max-width: none; }
.tr-zoom { display: inline-flex; align-items: center; gap: 4px; }
.ghost.sm, .primary.sm { padding: 2px 8px; font-size: 12px; }
.linkish { background: none; border: 0; color: #1d5ea8; padding: 0; font-size: 12px; text-decoration: underline; }
.btn-link { text-decoration: none; display: inline-block; }
.tr-prov { font-size: 12px; color: var(--muted); margin: 0 0 8px; }
.tr-diff { font-size: 13px; margin: 0 0 8px; }
.tr-diff pre, .tr-xcheck pre, .ex-view pre { white-space: pre-wrap; background: #f7f8fa; border-radius: 6px; padding: 8px 10px; max-height: 320px; overflow: auto; font-size: 12px; }
.tr-xcheck { margin-top: 10px; padding: 10px 12px; border: 1px solid #d8e2f0; background: #f6f9fd; border-radius: 6px; font-size: 13px; }
.tr-xcheck-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tr-xcheck-head .primary { margin-left: auto; }
.tr-issues { margin: 8px 0 0; padding-left: 18px; }
.tr-issues li { margin-bottom: 6px; }
.tr-fix { font-size: 12px; color: var(--ok); margin-top: 2px; white-space: pre-wrap; }
.tr-opt { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 10px; }
.tr-opt input { width: auto; margin-top: 3px; }
.star { background: none; border: 0; font-size: 18px; color: #b8bec8; padding: 0 4px; }
.star.on { color: var(--gold); }
.ex-snip { font-size: 12px; max-width: 360px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-checks { margin: 10px 0 0; padding-left: 18px; font-size: 13px; }
.tr-checks .error { color: var(--bad); }
.tr-checks .warn { color: var(--warn); }
.tr-ok { color: var(--ok); font-size: 13px; margin: 10px 0 0; }
details.card > summary { cursor: pointer; }
@media (max-width: 980px) { .tr-cols, .tr-cols.with-orig { grid-template-columns: 1fr; } }

/* AI 接口 */
.ai-card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.ai-card.is-off { opacity: .8; }
.ai-card.is-off .ai-card-head b { color: var(--muted); }
.ai-test-msg { background: #f7f8fa; border-radius: 6px; padding: 8px 10px; margin: 10px 0 0; font-size: 12px; }

/* 翻译排版预览：A4 纸样，表格按合并单元格画 */
.tr-preview { margin-top: 10px; font-size: 13px; }
.tr-preview > summary { cursor: pointer; color: var(--muted); }
.tr-sheet { background: #fff; border: 1px solid var(--line); box-shadow: 0 1px 4px rgba(0,0,0,.06); margin: 8px auto 0; padding: 28px 32px; max-width: 760px; font-family: Arial, Helvetica, sans-serif; font-size: 11px; color: #1a1f26; overflow-x: auto; }
.tr-sheet.landscape { max-width: 1060px; }
.tr-sheet p { margin: 0 0 6px; }
.tr-sheet-title { text-align: center; font-size: 15px; font-weight: normal; margin: 4px 0 12px; }
.tr-grid { width: 100%; border-collapse: collapse; margin: 0 0 8px; }
.tr-grid td, .tr-grid th { border: 1px solid #555; padding: 4px 6px; vertical-align: middle; text-align: left; font-weight: normal; }
.tr-grid.simple th { background: #eef1f5; font-weight: bold; }

.tr-grid.layout td { border: 0; padding: 0 18px 0 0; vertical-align: top; text-align: justify; }
.tr-done-note { margin-top: 14px; padding: 12px 14px; border: 1px solid #b7dcc9; background: #f0f8f4; border-radius: 6px; display: grid; gap: 6px; }
.tr-done-note b { color: var(--ok); }
.tr-activity { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 50; display: grid; gap: 6px; max-width: min(380px, calc(100vw - 32px)); }
.tr-act-item { display: block; padding: 10px 12px; border-radius: 6px; background: #fff; border: 1px solid var(--line); box-shadow: 0 2px 8px rgba(0,0,0,.12); font-size: 13px; color: var(--text); text-decoration: none; }
.tr-act-item.ok { border-left: 4px solid var(--ok); }
.tr-act-item.bad { border-left: 4px solid var(--bad); }
.tr-act-item.busy { border-left: 4px solid #1d5ea8; color: var(--muted); }

/* 酒店 */
.hotel-plan input { min-width: 110px; }
.it-hints.info { background: #eef5fc; border-color: #c7dcf2; }
.tabs { display: flex; gap: 4px; margin-bottom: 10px; flex-wrap: wrap; }
.tab { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 5px 12px; }
.tab[aria-selected="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
a.stat { text-decoration: none; color: inherit; }
.fb-tags { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0; }
.fb-tags .check input { width: auto; }
.agent-msg { display: block; max-width: 260px; }
