/* ============================================================
   考拉智行 KoalaGo · 后台设计系统（HTML5 版）
   供 admin/public/*.html 共用；后续页面直接引用本文件即可保持视觉统一
   ============================================================ */

:root {
  /* 品牌色：主色青绿 #2F7A72 / 信任蓝 #2F7A72 / 定制暖橙 #FF8A3D
     注：青绿底上白字对比度约 2.5:1，承载白字的主色用信任蓝 */
  --brand: #2F7A72;
  --brand-deep: #1C5A54;
  --ink: #163D38;
  --ink-deep: #0F2E2A;
  --blue: #2F7A72;
  --blue-soft: #E4F5F2;
  --cyan: #4FA79D;
  --mint: #CCF1ED;
  --sun: #ffb27a;

  /* 中性色 */
  --bg: #f4f7fc;
  --surface: #ffffff;
  /* 次级底：表头、行 hover、搜索框、弹窗底栏等（随主题变，暗色下会反转） */
  --bg-soft: #fbfcfe;
  --text: #163D38;
  --text-2: #4C6B66;
  --text-3: #93A8A4;
  --line: rgba(22, 61, 56, 0.1);
  --line-strong: rgba(22, 61, 56, 0.18);

  /* 语义色 */
  --ok: #12b981;
  --warn: #f59e0b;
  --danger: #ef4444;

  /* 形状 */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --shadow-1: 0 1px 2px rgba(16, 24, 64, 0.05);
  --shadow-2: 0 4px 16px rgba(16, 24, 64, 0.08);
  --shadow-3: 0 18px 48px rgba(16, 24, 64, 0.14);

  --sidebar-w: 240px;
  --font: "PingFang SC", "HarmonyOS Sans SC", "Hiragino Sans GB",
    "Microsoft YaHei", system-ui, sans-serif;
}

/* ============================================================
   多主题（与后台《多主题 UI 规范》四套主题一致）
   html[data-theme] 由 shell.js 启动时按后端全局主题设置；
   未设置时沿用上方 :root（等价于 ocean），视觉零回归。
   ============================================================ */

/* 考拉智行蓝 · ocean（默认，跟随品牌主色） */
html[data-theme="ocean"] {
  --brand: #2F7A72;
  --brand-deep: #1C5A54;
  --ink: #163D38;
  --ink-deep: #0F2E2A;
  --blue: #2F7A72;
  --blue-soft: #E4F5F2;
  --cyan: #4FA79D;
  --mint: #CCF1ED;
  --sun: #ffb27a;
  --bg: #f4f7fc;
  --surface: #ffffff;
  --bg-soft: #fbfcfe;
  --text: #163D38;
  --text-2: #4C6B66;
  --text-3: #93A8A4;
  --line: rgba(22, 61, 56, 0.1);
  --line-strong: rgba(22, 61, 56, 0.18);
  --ok: #12b981;
  --warn: #f59e0b;
  --danger: #ef4444;
}

/* 高端奢华 · 墨绿金 emerald */
html[data-theme="emerald"] {
  --ink: #0b3b33;
  --ink-deep: #062721;
  --blue: #0e7c66;
  --blue-soft: #e7f4f0;
  --cyan: #c8a951;
  --mint: #CCF1ED;
  --sun: #c8a951;
  --bg: #f7f6f2;
  --surface: #ffffff;
  --bg-soft: #faf9f5;
  --text: #1f2937;
  --text-2: #57534e;
  --text-3: #a8a29e;
  --line: rgba(15, 60, 50, 0.12);
  --line-strong: rgba(15, 60, 50, 0.2);
  --ok: #16a34a;
  --warn: #d97706;
  --danger: #dc2626;
}

/* 清新度假 · 洱海青 lagoon */
html[data-theme="lagoon"] {
  --ink: #0a3f3c;
  --ink-deep: #062a28;
  --blue: #0d9c93;
  --blue-soft: #E4F5F2;
  --cyan: #ff8a3d;
  --mint: #CCF1ED;
  --sun: #ff8a3d;
  --bg: #f4fbf9;
  --surface: #ffffff;
  --bg-soft: #f7fcfa;
  --text: #0f2e2a;
  --text-2: #47645f;
  --text-3: #8fa8a3;
  --line: rgba(13, 156, 147, 0.14);
  --line-strong: rgba(13, 156, 147, 0.22);
  --ok: #22c55e;
  --warn: #f59e0b;
  --danger: #f43f5e;
}

/* 极简暗色 · 夜航 midnight */
html[data-theme="midnight"] {
  --ink: #0b1220;
  --ink-deep: #060b16;
  --blue: #38bdf8;
  --blue-soft: #0c2a3a;
  --cyan: #7dd3fc;
  --mint: #34d399;
  --sun: #fbbf24;
  --bg: #0f172a;
  --surface: #1e293b;
  --bg-soft: #243449;
  --text: #f1f5f9;
  --text-2: #c7d2e0;
  --text-3: #7b8ba3;
  --line: rgba(148, 163, 184, 0.22);
  --line-strong: rgba(148, 163, 184, 0.34);
  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #f87171;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.6;
}

button,
input {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* 数字统一等宽，表格/统计里不会跳动 */
.num {
  font-variant-numeric: tabular-nums;
}

/* ---------- 布局：侧栏 + 主区 ---------- */

.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  padding: 22px 14px 16px;
  display: flex;
  flex-direction: column;
  color: #fff;
  background: linear-gradient(170deg, var(--ink) 0%, var(--ink-deep) 100%);
  overflow-y: auto;
}

/* 侧栏底纹：细网格，呼应「地图/线路」的产品属性，不抢内容 */
.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
}
.sidebar > * {
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 20px;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fff;
  flex-shrink: 0;
}

.brand-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.2;
}

.brand-sub {
  font-size: 9px;
  letter-spacing: 2.6px;
  opacity: 0.62;
  font-weight: 500;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-label {
  font-size: 10px;
  letter-spacing: 1.6px;
  opacity: 0.45;
  padding: 16px 10px 6px;
  font-weight: 600;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  height: 42px;
  border-radius: var(--r-md);
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 13.5px;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.nav a.active {
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--cyan);
}

.nav a svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  opacity: 0.85;
}

.nav a.muted {
  opacity: 0.38;
  pointer-events: none;
}

.side-foot {
  margin-top: auto;
  padding: 14px 10px 0;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.7;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.side-foot .logout {
  margin-top: 10px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.72);
  display: flex;
  align-items: center;
  gap: 6px;
}

.side-foot .logout:hover {
  color: var(--sun);
}

/* ---------- 主区 ---------- */

.main {
  grid-column: 2;
  min-width: 0;
  padding: 26px 30px 130px;
}

/* 主区顶部光晕：让浅色页面有层次，不是一块死白 */
.main::before {
  content: "";
  position: fixed;
  top: -180px;
  right: -120px;
  width: 560px;
  height: 420px;
  background: radial-gradient(circle at 30% 30%, rgba(28, 90, 84, 0.13), transparent 62%),
    radial-gradient(circle at 70% 60%, rgba(18, 194, 224, 0.1), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.main > * {
  position: relative;
  z-index: 1;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.page-title {
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.25;
}

.page-desc {
  color: var(--text-2);
  font-size: 13px;
  margin-top: 5px;
  max-width: 640px;
}

/* ---------- 统计卡 ---------- */

.stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.stat {
  min-width: 108px;
  padding: 12px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
}

.stat b {
  display: block;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.stat span {
  font-size: 11.5px;
  color: var(--text-2);
}

.stat.accent b {
  color: var(--blue);
}
.stat.mint b {
  color: #0f9f72;
}

/* ---------- 卡片 / 工具条 ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-1);
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.search {
  position: relative;
  flex: 0 1 280px;
}

.search input {
  width: 100%;
  height: 38px;
  padding: 0 14px 0 38px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg-soft);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.search input:focus {
  border-color: var(--blue);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(28, 90, 84, 0.13);
}

.search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--text-3);
}

.spacer {
  flex: 1;
}

/* ---------- 按钮 ---------- */

.btn {
  height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 500;
  transition: transform 0.14s ease, box-shadow 0.18s ease, background 0.18s ease,
    border-color 0.18s ease, opacity 0.18s ease;
  white-space: nowrap;
}

.btn:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn.primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px rgba(47, 122, 114, 0.28);
}

.btn.primary:hover {
  color: #fff;
  box-shadow: 0 6px 20px rgba(28, 90, 84, 0.36);
}

.btn.sm {
  height: 30px;
  padding: 0 11px;
  font-size: 12.5px;
  border-radius: 8px;
}

.btn svg {
  width: 15px;
  height: 15px;
}

/* ---------- 空 / 加载 / 错误态 ---------- */

.state {
  padding: 70px 20px;
  text-align: center;
  color: var(--text-2);
}

.state .title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.spinner {
  width: 26px;
  height: 26px;
  margin: 0 auto 14px;
  border: 2.5px solid var(--line-strong);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- 提示条 / Toast ---------- */

.notice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 14px;
  border-radius: var(--r-md);
  font-size: 12.5px;
  line-height: 1.55;
  background: var(--blue-soft);
  color: #2b3a72;
  border: 1px solid rgba(28, 90, 84, 0.16);
}

.notice svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--blue);
}

#toasts {
  position: fixed;
  top: 22px;
  right: 26px;
  /* 必须高于 .login-mask(100) / .mask，否则登录失败提示被遮罩盖住，表现为「点登录没反应」 */
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  min-width: 220px;
  max-width: 360px;
  padding: 12px 16px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-3);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toast-in 0.26s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.toast::before {
  content: "";
  width: 4px;
  height: 22px;
  border-radius: 3px;
  background: var(--blue);
  flex-shrink: 0;
}

.toast.ok::before {
  background: var(--ok);
}
.toast.warn::before {
  background: var(--warn);
}
.toast.err::before {
  background: var(--danger);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(24px) scale(0.97);
  }
}

/* ---------- 保存条 ---------- */

.savebar {
  position: fixed;
  left: calc(var(--sidebar-w) + 30px);
  right: 30px;
  bottom: 24px;
  z-index: 60;
  display: none;
  align-items: center;
  gap: 14px;
  padding: 13px 18px;
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-3);
  animation: bar-up 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}

.savebar.show {
  display: flex;
}

.savebar .txt {
  font-size: 13px;
  color: var(--text-2);
}

.savebar .txt b {
  color: var(--text);
}

@keyframes bar-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

/* ---------- 登录覆盖层 ---------- */

.login-mask {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--ink), var(--ink-deep));
}

/* display:flex 会盖掉 hidden 属性自带的 display:none，必须显式声明 */
.login-mask[hidden] {
  display: none;
}

.login-box {
  width: 340px;
  padding: 30px;
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-3);
}

.login-box h2 {
  font-size: 19px;
  margin-bottom: 4px;
}

.login-box p {
  font-size: 12.5px;
  color: var(--text-2);
  margin-bottom: 18px;
}

.field {
  margin-bottom: 12px;
}

.field input {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: none;
}

.field input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(28, 90, 84, 0.13);
}

.login-box .btn {
  width: 100%;
  justify-content: center;
  height: 42px;
  margin-top: 4px;
}

/* ---------- 载入动画 ---------- */

.rise {
  animation: rise 0.45s cubic-bezier(0.2, 0.8, 0.3, 1) backwards;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

/* ============================================================
   通用组件：表格 / 弹窗 / 表单 / 标签
   ============================================================ */

.table-wrap {
  overflow-x: auto;
}

table.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.tbl th {
  text-align: left;
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: 0.6px;
  color: var(--text-2);
  padding: 11px 14px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}

.tbl td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.tbl tbody tr {
  transition: background 0.15s ease;
}

.tbl tbody tr:hover {
  background: var(--bg-soft);
}

.tbl tbody tr:last-child td {
  border-bottom: none;
}

.tbl .id {
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.tbl .strong {
  font-weight: 600;
  color: var(--text);
}

.tbl .dim {
  color: var(--text-2);
}

.tbl .nowrap {
  white-space: nowrap;
}

.row-actions {
  display: flex;
  gap: 4px;
}

.row-actions .btn {
  height: 27px;
  padding: 0 9px;
  font-size: 12px;
}

/* ---------- 状态标签 ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  height: 21px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  background: #eef1f8;
  color: var(--text-2);
  white-space: nowrap;
}

.badge.blue {
  background: var(--blue-soft);
  color: var(--blue);
}
.badge.ok {
  background: #e6f9f1;
  color: #0f9f72;
}
.badge.warn {
  background: #fef4e2;
  color: #b9760a;
}
.badge.ink {
  background: #e8ecf8;
  color: var(--ink);
}

/* ---------- 弹窗 ---------- */

.mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  /* 这里不能用 backdrop-filter：它会让遮罩成为独立合成层，Chrome 把原生日期
     面板画到另一层上，弹窗里的 <input type="date"> 就变成「日历弹出来却点不中
     / 选不进框」。半透明底色已经够，不要再加毛玻璃。 */
  background: rgba(14, 27, 84, 0.42);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 5vh 20px;
  overflow-y: auto;
  animation: fade 0.2s ease;
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

.modal {
  width: 100%;
  max-width: 620px;
  background: #fff;
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-3);
  animation: rise 0.28s cubic-bezier(0.2, 0.8, 0.3, 1);
  overflow: hidden;
}

.modal.wide {
  max-width: 860px;
}

.modal-head {
  display: flex;
  align-items: center;
  padding: 17px 22px;
  border-bottom: 1px solid var(--line);
}

.modal-head h3 {
  font-size: 16px;
  font-weight: 700;
}

.modal-head .x {
  margin-left: auto;
  cursor: pointer;
  color: var(--text-3);
  font-size: 20px;
  line-height: 1;
  background: none;
  border: none;
}

.modal-head .x:hover {
  color: var(--text);
}

.modal-body {
  padding: 20px 22px;
  max-height: 66vh;
  overflow-y: auto;
}

.modal-foot {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
}

/* ---------- 表单 ---------- */

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-grid .full {
  grid-column: 1 / -1;
}

.f {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.f > label {
  font-size: 12px;
  color: var(--text-2);
  font-weight: 500;
}

.f input,
.f select,
.f textarea {
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--bg-soft);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.f textarea {
  height: auto;
  min-height: 76px;
  padding: 9px 12px;
  resize: vertical;
  line-height: 1.6;
}

.f input:focus,
.f select:focus,
.f textarea:focus {
  border-color: var(--blue);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(28, 90, 84, 0.13);
}

.check {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 0;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}

.check input {
  /* 说明文字很长时，flex 会把勾选框压到几像素宽，看着像"点不动" */
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  accent-color: var(--blue);
  cursor: pointer;
}

/* 多选 chip（省份 / 等级筛选等） */
.pick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pick button {
  height: 29px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--text-2);
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.pick button:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.pick button.on {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  font-weight: 500;
}

/* ---------- 其它 ---------- */

.section {
  padding: 18px 20px;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 3px;
}

.section .desc {
  font-size: 12.5px;
  color: var(--text-2);
  margin-bottom: 14px;
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 4px 0;
}


.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  padding: 0 20px;
}

.tabs button {
  padding: 12px 14px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 13.5px;
  color: var(--text-2);
  border-bottom: 2px solid transparent;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.tabs button.on {
  color: var(--blue);
  border-bottom-color: var(--blue);
  font-weight: 600;
}

.progress {
  height: 8px;
  border-radius: 999px;
  background: #eef1f8;
  overflow: hidden;
}

.progress i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  transition: width 0.4s ease;
}

@media (max-width: 1080px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: none;
  }
  .main {
    grid-column: 1;
    padding: 20px 16px 130px;
  }
  .savebar {
    left: 16px;
    right: 16px;
  }
}

/* ============================================================
   后台专属两套主题（租户各自切换，不影响 C 端全局主题）
   studio-light：浅色增强（暖白 + 墨绿 Hero + 彩色统计卡）
   studio-dark ：深色驾驶舱（墨黑 + 暖金 + 青绿）
   ============================================================ */
html[data-theme="studio-light"] {
  --ink: #193B36;
  --ink-deep: #0F3330;
  --brand: #1F6B62;
  --brand-deep: #194F48;
  --blue: #1F6B62;
  --blue-deep: #194F48;
  --blue-soft: #E8F3F0;
  --cyan: #2E9C8F;
  --mint: #DCEDE8;
  --sun: #B8873F;
  --gold: #B8873F;
  --gold-soft: #FAF2E4;
  --bg: #F7F8F5;
  --surface: #FFFFFF;
  --bg-soft: #FBFCFA;
  --text: #193B36;
  --text-2: #5F7671;
  --text-3: #9FAFAB;
  --line: rgba(25, 59, 54, 0.10);
  --line-strong: rgba(25, 59, 54, 0.18);
  --ok: #2E9C8F;
  --warn: #C88A2E;
  --danger: #D9534F;
}

html[data-theme="studio-dark"] {
  --ink: #0A1214;
  --ink-deep: #050B0C;
  --brand: #D4AF6A;
  --brand-deep: #A87C3C;
  --blue: #D4AF6A;
  --blue-deep: #A87C3C;
  --blue-soft: rgba(212, 175, 106, 0.12);
  --cyan: #4FD1C5;
  --mint: #123B36;
  --sun: #D4AF6A;
  --gold: #D4AF6A;
  --gold-soft: rgba(212, 175, 106, 0.14);
  --bg: #0A1214;
  --surface: #142326;
  --bg-soft: #101D20;
  --text: #E8F0EE;
  --text-2: #9CB0AD;
  --text-3: #6A7E7C;
  --line: rgba(212, 175, 106, 0.10);
  --line-strong: rgba(212, 175, 106, 0.22);
  --ok: #4FD1C5;
  --warn: #F0B429;
  --danger: #F87171;
}

/* --- 侧栏与顶栏 --- */
html[data-theme="studio-light"] .sidebar { background: #FFFFFF; }
html[data-theme="studio-light"] .nav-item.active {
  background: linear-gradient(135deg, #2E7C71, #194F48);
  color: #fff; font-weight: 600;
  box-shadow: 0 8px 20px rgba(31, 107, 98, 0.24);
}
html[data-theme="studio-light"] .nav-item.active .ico { opacity: 1; color: #F5E6C8; }
html[data-theme="studio-dark"] .sidebar {
  background: linear-gradient(180deg, #101D20 0%, #0C1618 100%);
  border-right: 1px solid rgba(212, 175, 106, 0.10);
}
html[data-theme="studio-dark"] .nav-item.active {
  background: linear-gradient(90deg, rgba(212, 175, 106, 0.18), rgba(212, 175, 106, 0.04));
  color: #F2D9A5; box-shadow: inset 3px 0 0 #D4AF6A;
}
html[data-theme="studio-dark"] .topbar { background: rgba(10, 18, 20, 0.72); }
html[data-theme="studio-dark"] .search,
html[data-theme="studio-dark"] .icon-btn {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
  color: #9CB0AD;
}

/* --- 卡片 / 按钮 / 表单 --- */
html[data-theme="studio-light"] .card {
  background: #fff; border-radius: 20px;
  box-shadow: 0 6px 24px rgba(25, 59, 54, 0.055);
}
html[data-theme="studio-dark"] .card,
html[data-theme="studio-dark"] .panel {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  border-color: rgba(212, 175, 106, 0.12);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
}
html[data-theme="studio-light"] .btn.primary,
html[data-theme="studio-light"] .btn-primary {
  background: linear-gradient(135deg, #2E7C71, #194F48);
  box-shadow: 0 8px 22px rgba(31, 107, 98, 0.22);
  letter-spacing: 1px;
}
html[data-theme="studio-dark"] .btn.primary,
html[data-theme="studio-dark"] .btn-primary {
  background: linear-gradient(135deg, #D4AF6A, #A87C3C);
  color: #0A1214; border-color: transparent;
  box-shadow: 0 8px 24px rgba(212, 175, 106, 0.24);
  letter-spacing: 1px;
}
html[data-theme="studio-dark"] input,
html[data-theme="studio-dark"] textarea,
html[data-theme="studio-dark"] select,
html[data-theme="studio-dark"] .field input,
html[data-theme="studio-dark"] .field select {
  background: rgba(255, 255, 255, 0.04);
  color: #E8F0EE;
  border-color: rgba(255, 255, 255, 0.12);
}
html[data-theme="studio-dark"] table th,
html[data-theme="studio-dark"] table td { border-color: rgba(255, 255, 255, 0.07); }

/* --- 首屏 Hero（查看行程等页面可选插入 .hero） --- */
.hero {
  position: relative; overflow: hidden; border-radius: 22px;
  padding: 30px 36px; margin-bottom: 24px; color: #fff;
}
.hero h1 { font-size: 30px; font-weight: 650; letter-spacing: 2px; margin-top: 10px; }
.hero p { font-size: 12px; opacity: .72; margin-top: 10px; }
.hero-kicker { font-size: 11px; letter-spacing: 4px; color: #E8C88D; }
.hero-tag {
  position: absolute; right: 36px; top: 34px;
  padding: 8px 16px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .12);
  font-size: 11px; color: #F5E6C8; letter-spacing: 2px;
}
.hero-stats { display: flex; gap: 34px; margin-top: 22px; font-size: 12px; opacity: .8; }
.hero-stats b { display: block; font-size: 22px; font-weight: 400; color: #F5E6C8; margin-top: 4px; }
html[data-theme="studio-light"] .hero {
  background: linear-gradient(115deg, #235F59 0%, #16433E 55%, #0F3330 100%);
  box-shadow: 0 18px 44px rgba(20, 67, 62, .22);
}
html[data-theme="studio-dark"] .hero {
  background: linear-gradient(115deg, #1C4B46 0%, #103532 100%);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .3);
}
html[data-theme="studio-light"] .hero::before,
html[data-theme="studio-dark"] .hero::before {
  content: ''; position: absolute; right: -40px; top: -110px;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 106, .28), transparent 68%);
}

/* --- 彩色统计卡 --- */
.stats.vivid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.stats.vivid .stat {
  position: relative; overflow: hidden; padding: 22px 24px;
  border-radius: 18px; color: #fff; border: none;
  box-shadow: 0 12px 30px rgba(20, 67, 62, .14);
}
.stats.vivid .stat::after {
  content: ''; position: absolute; right: -30px; top: -40px;
  width: 150px; height: 150px; border-radius: 50%; background: rgba(255, 255, 255, .10);
}
.stats.vivid .stat:nth-child(1) { background: linear-gradient(135deg, #3A8C82, #1D5A53); }
.stats.vivid .stat:nth-child(2) { background: linear-gradient(135deg, #3E9E90, #226F66); }
.stats.vivid .stat:nth-child(3) { background: linear-gradient(135deg, #D0A65C, #9A6E2D); }
.stats.vivid .stat .label { font-size: 11px; letter-spacing: 2px; opacity: .82; }
.stats.vivid .stat b,
.stats.vivid .stat .num { font-size: 40px; font-weight: 300; line-height: 1.1; letter-spacing: 1px; }
.stats.vivid .stat small { font-size: 13px; opacity: .75; margin-left: 6px; }
.stats.vivid .stat .hint { font-size: 10px; opacity: .85; margin-top: 8px; }

/* --- AI 说明条 --- */
.ai-bar {
  margin-top: 24px; padding: 15px 22px; border-radius: 14px;
  display: flex; align-items: center; gap: 14px; font-size: 11px;
}
html[data-theme="studio-light"] .ai-bar {
  background: linear-gradient(90deg, #E8F3F0, #FAF2E4);
  border: 1px solid rgba(31, 107, 98, .12); color: #5F7671;
}
html[data-theme="studio-dark"] .ai-bar {
  background: linear-gradient(90deg, rgba(79,209,197,.08), rgba(212,175,106,.05));
  border: 1px solid rgba(79, 209, 197, .14); color: #93AFA9;
}
.ai-badge {
  padding: 5px 12px; border-radius: 999px; font-size: 10px;
  font-weight: 650; background: linear-gradient(135deg, #2E7C71, #194F48); color: #fff;
}

/* --- 浅色增强：侧栏原样式是白字，白底下必须整体改深 --- */
html[data-theme="studio-light"] .sidebar { color: #5F7671; }
html[data-theme="studio-light"] .brand-name { color: #193B36; }
html[data-theme="studio-light"] .brand-sub { color: #849893; opacity: 1; }
html[data-theme="studio-light"] .nav-label { color: #9FAFAB; opacity: 1; }
html[data-theme="studio-light"] .nav a { color: #5F7671; }
html[data-theme="studio-light"] .nav a svg { color: inherit; opacity: .9; }
html[data-theme="studio-light"] .nav a:hover {
  background: #F4F8F6;
  color: #193B36;
}
html[data-theme="studio-light"] .nav a.active {
  background: linear-gradient(135deg, #2E7C71, #194F48);
  color: #fff;
  box-shadow: 0 8px 20px rgba(31, 107, 98, .24);
}
html[data-theme="studio-light"] .nav a.active svg { color: #F5E6C8; }
html[data-theme="studio-light"] .side-foot {
  color: #6E837E;
  border-top: 1px solid rgba(25, 59, 54, .1);
}
html[data-theme="studio-light"] .side-foot .logout { color: #1F6B62; }
html[data-theme="studio-light"] .side-foot .logout:hover { background: #E8F3F0; }

/* ============================================================
   旅行编辑台（Editorial Travel Desk）
   覆盖仪表盘感，改成杂志式：暖白纸感 + 衬线标题 + 细线分隔
   ============================================================ */
:root {
  --paper: #F5F4EF;
  --paper-surface: #FBFAF6;
  --paper-line: #E7E4DA;
  --paper-gold: #C6A15B;
  --paper-ink: #173F39;
  --paper-muted: #7D8B85;
}

/* 侧栏：暖白纸感，去掉图标色块与发光 */
.sidebar {
  background: var(--paper-surface) !important;
  border-right: 1px solid var(--paper-line) !important;
}
.sidebar::before { display: none !important; }
.brand-name { font-family: "Songti SC", "STSong", Georgia, serif; letter-spacing: 3px; color: var(--paper-ink) !important; font-weight: 400 !important; }
.brand-mark { letter-spacing: 5px !important; color: #A89978 !important; }
.brand-sub { color: #A0A9A3 !important; letter-spacing: 2px; }
.nav-label { color: #B0B0A6 !important; letter-spacing: 3px !important; font-size: 10px !important; }
.nav a {
  border-radius: 3px !important;
  color: #5E6E69 !important;
  letter-spacing: .5px;
}
.nav a svg { opacity: .55; }
.nav a:hover { background: #F0EEE6 !important; color: var(--paper-ink) !important; }
.nav a.active {
  background: var(--paper-ink) !important;
  color: #F7F3E8 !important;
  border-left: 3px solid var(--paper-gold) !important;
  padding-left: 11px !important;
  box-shadow: none !important;
}
.side-foot { color: var(--paper-muted) !important; }
.side-foot .logout { color: var(--paper-ink) !important; }

/* 页面背景与标题：杂志感 */
body { background: var(--paper) !important; }
.page-head { border-bottom: 1px solid var(--paper-line); padding-bottom: 22px; margin-bottom: 28px; }
.page-title {
  font-family: "Songti SC", "STSong", Georgia, serif;
  font-weight: 400 !important;
  letter-spacing: 3px !important;
  font-size: 26px !important;
  color: var(--paper-ink) !important;
}
.page-desc { color: var(--paper-muted) !important; }

/* 卡片：纸面 + 细边 + 极轻阴影 */
.card {
  background: #fff !important;
  border: 1px solid #EAE7DC !important;
  border-radius: 4px !important;
  box-shadow: 0 2px 10px rgba(23, 63, 57, .03) !important;
}

/* 按钮：从圆角渐变改为克制的深绿/金边 */
.btn {
  border-radius: 3px !important;
  letter-spacing: 1px;
}
.btn.primary {
  background: var(--paper-ink) !important;
  box-shadow: none !important;
}
.btn.primary:hover { background: #0F302B !important; }

/* 统计：杂志目录式（仅非 vivid 的普通 stats） */
.stats .stat {
  background: transparent !important;
  border: none !important;
  border-right: 1px solid var(--paper-line);
  border-radius: 0 !important;
  box-shadow: none !important;
}
.stats .stat:last-child { border-right: none; }
.stats .stat b, .stats .stat .num {
  font-family: "Songti SC", Georgia, serif;
  font-weight: 400 !important;
  color: var(--paper-ink) !important;
}

/* 表格：细线、宽松行距 */
table.tbl th { letter-spacing: 1px; color: var(--paper-muted) !important; }
.table-wrap { border-radius: 3px !important; }

/* 表单：白底细边 */
input, textarea, select {
  border-radius: 3px !important;
  border-color: var(--paper-line) !important;
}

/* 深色主题下的编辑台适配 */
html[data-theme="studio-dark"] .sidebar { background: #0F191B !important; }
html[data-theme="studio-dark"] body { background: #0B1315 !important; }
html[data-theme="studio-dark"] .nav a { color: #9CB0AD !important; }
html[data-theme="studio-dark"] .nav a.active { background: #1C3531 !important; color: #F2D9A5 !important; }
html[data-theme="studio-dark"] .card { background: #142326 !important; border-color: rgba(212,175,106,.12) !important; }

/* 编辑台：表格从密集数据格改成杂志式条目 */
table.tbl { border-collapse: collapse; }
table.tbl thead th {
  background: transparent !important;
  border-bottom: 1px solid var(--paper-line) !important;
  border-top: none !important;
  color: #9A9E96 !important;
  font-weight: 400 !important;
  font-size: 11px !important;
  letter-spacing: 2px !important;
  padding: 14px 12px !important;
}
table.tbl tbody td {
  border-bottom: 1px solid #F0EEE6 !important;
  border-top: none !important;
  padding: 16px 12px !important;
  vertical-align: middle;
}
table.tbl tbody tr:hover { background: #FBFAF6 !important; }
table.tbl .badge, table.tbl .pill {
  border-radius: 2px !important;
  font-size: 10px !important;
  letter-spacing: 1px;
}
/* 工具栏与页面标题贴近杂志编排 */
.toolbar { border-bottom: 1px solid var(--paper-line); padding-bottom: 16px; margin-bottom: 8px; }
.page-head h1 { font-family: "Songti SC", "STSong", Georgia, serif; font-weight: 400; }

/* 窄屏：表单必须单列，否则长文本撑破边框 */
@media (max-width: 980px) {
  .form-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .form-grid .full { grid-column: auto; }
  .f input, .f select, .f textarea { width: 100%; min-width: 0; }
}
/* 超窄：进一步给卡片内边距留白，长 URL / 数字强制换行或省略 */
@media (max-width: 640px) {
  .card { padding: 16px !important; margin-left: 0 !important; margin-right: 0 !important; }
  .f input, .f select { font-size: 13px; }
  .f textarea { min-width: 0; }
}
/* 编辑台：弱化卡片右边界，去掉厚重的封闭感 */
.card {
  border-color: #EEECE4 !important;
  box-shadow: 0 1px 4px rgba(23, 63, 57, .02) !important;
}

/* 编辑台：卡片从"盒子"改成"纸面"——去掉封闭边框，靠留白与细线分区 */
.card {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
/* 表单区用一条顶线界定，而不是四边框 */
.form-grid {
  border-top: 1px solid var(--paper-line);
  padding-top: 22px;
  margin-top: 4px;
}
/* 表格区保留细横线，但去掉外框 */
.table-wrap { border: none !important; border-radius: 0 !important; }
