/* ============ 观光列车智能排座助手 · 清透玻璃双主题 ============ */

/* ---------- 暗色主题（默认） ---------- */
:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --accent: #6ea8ff;
  --accent-2: #a39bf5;
  --accent-3: #74d4a0;
  --text: #eef1f7;
  --text-2: rgba(220, 224, 235, 0.66);
  --bg-gradient: linear-gradient(135deg,
    #141a2b 0%, #1c1b38 24%, #2b2039 48%, #222533 70%, #172b2c 100%);
  --blob-1: #33527e;
  --blob-2: #51459b;
  --blob-3: #7a4668;
  --blob-4: #3f7463;
  --blob-opacity: 0.26;
  --sheen-color: rgba(255, 255, 255, 0.04);
  --h1-shadow: 0 1px 14px rgba(0, 0, 0, 0.45);
  --panel-grad: linear-gradient(135deg,
    rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 40%,
    rgba(255, 255, 255, 0.05) 65%, rgba(255, 255, 255, 0.08) 100%);
  --panel-grad-hover: linear-gradient(135deg,
    rgba(255, 255, 255, 0.11) 0%, rgba(255, 255, 255, 0.03) 40%,
    rgba(255, 255, 255, 0.06) 65%, rgba(255, 255, 255, 0.11) 100%);
  --panel-border: rgba(255, 255, 255, 0.2);
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.26);
  --shadow-hover: 0 16px 40px rgba(0, 0, 0, 0.32);
  --inner-ring: rgba(255, 255, 255, 0.11);
  --inner-ring-hover: rgba(255, 255, 255, 0.14);
  --top-edge: rgba(255, 255, 255, 0.18);
  --top-edge-hover: rgba(255, 255, 255, 0.24);
  --bottom-edge: rgba(255, 255, 255, 0.05);
  --bottom-edge-hover: rgba(255, 255, 255, 0.06);
  --streak: rgba(255, 255, 255, 0.16);
  --streak-mid: rgba(255, 255, 255, 0.05);
  --input-bg: rgba(255, 255, 255, 0.08);
  --input-bg-focus: rgba(255, 255, 255, 0.12);
  --input-border: rgba(255, 255, 255, 0.22);
  --focus-ring: rgba(110, 168, 255, 0.16);
  --btn-bg: rgba(255, 255, 255, 0.1);
  --btn-bg-hover: rgba(255, 255, 255, 0.16);
  --btn-border: rgba(255, 255, 255, 0.26);
  --btn-text: #eef1f7;
  --btn-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  --btn-inset: rgba(255, 255, 255, 0.16);
  --secondary-bg: rgba(255, 255, 255, 0.06);
  --secondary-border: rgba(255, 255, 255, 0.18);
  --track-bg: rgba(255, 255, 255, 0.12);
  --chip-bg: rgba(255, 255, 255, 0.09);
  --chip-border: rgba(255, 255, 255, 0.18);
  --th-bg: rgba(255, 255, 255, 0.12);
  --td-bg: rgba(255, 255, 255, 0.05);
  --td-alt: rgba(255, 255, 255, 0.02);
  --row-border: rgba(255, 255, 255, 0.14);
  --overlay-bg: rgba(0, 0, 0, 0.45);
  --popup-bg: linear-gradient(150deg, rgba(40, 45, 62, 0.92), rgba(28, 32, 46, 0.88));
  --popup-border: rgba(255, 255, 255, 0.22);
  --cal-btn-bg: rgba(255, 255, 255, 0.1);
  --cal-btn-border: rgba(255, 255, 255, 0.22);
  --cal-icon: rgba(238, 241, 247, 0.9);
  --cell-hover: rgba(255, 255, 255, 0.14);
  --select-arrow: rgba(230, 234, 245, 0.7);
  --file-btn-bg: rgba(255, 255, 255, 0.12);
  --file-btn-border: rgba(255, 255, 255, 0.2);
}

/* ---------- 浅色主题（莫兰迪） ---------- */
:root[data-theme="light"] {
  color-scheme: light;
  --accent: #2f6fd6;
  --accent-2: #6f7fe8;
  --accent-3: #3fa871;
  --text: #1d2530;
  --text-2: rgba(55, 65, 85, 0.68);
  --bg-gradient: linear-gradient(135deg,
    #e6f0ff 0%, #dbe6fb 22%, #e0dcf7 45%, #eedcf2 65%, #d5e9ec 85%, #e4effc 100%);
  --blob-1: #bcd8f8;
  --blob-2: #b8c2f5;
  --blob-3: #eac2e8;
  --blob-4: #b4e0d8;
  --blob-opacity: 0.5;
  --sheen-color: rgba(255, 255, 255, 0.52);
  --h1-shadow: 0 1px 8px rgba(31, 55, 95, 0.08);
  --panel-grad: linear-gradient(135deg,
    rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.24) 38%,
    rgba(255, 255, 255, 0.38) 65%, rgba(255, 255, 255, 0.55) 100%);
  --panel-grad-hover: linear-gradient(135deg,
    rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.32) 38%,
    rgba(255, 255, 255, 0.46) 65%, rgba(255, 255, 255, 0.66) 100%);
  --panel-border: rgba(116, 148, 205, 0.3);
  --shadow: 0 14px 34px rgba(66, 102, 170, 0.16);
  --shadow-hover: 0 18px 44px rgba(66, 102, 170, 0.22);
  --inner-ring: rgba(255, 255, 255, 0.8);
  --inner-ring-hover: rgba(255, 255, 255, 0.95);
  --top-edge: rgba(255, 255, 255, 0.98);
  --top-edge-hover: rgba(255, 255, 255, 1);
  --bottom-edge: rgba(90, 122, 180, 0.16);
  --bottom-edge-hover: rgba(90, 122, 180, 0.2);
  --streak: rgba(255, 255, 255, 0.92);
  --streak-mid: rgba(255, 255, 255, 0.4);
  --input-bg: rgba(255, 255, 255, 0.55);
  --input-bg-focus: rgba(255, 255, 255, 0.8);
  --input-border: rgba(90, 122, 180, 0.22);
  --focus-ring: rgba(47, 111, 214, 0.16);
  --btn-bg: rgba(255, 255, 255, 0.6);
  --btn-bg-hover: rgba(255, 255, 255, 0.8);
  --btn-border: rgba(255, 255, 255, 0.92);
  --btn-text: #2f6fd6;
  --btn-shadow: 0 6px 16px rgba(66, 102, 170, 0.14);
  --btn-inset: rgba(255, 255, 255, 0.98);
  --secondary-bg: rgba(255, 255, 255, 0.5);
  --secondary-border: rgba(116, 148, 205, 0.22);
  --track-bg: rgba(90, 122, 180, 0.1);
  --chip-bg: rgba(255, 255, 255, 0.5);
  --chip-border: rgba(255, 255, 255, 0.85);
  --th-bg: rgba(255, 255, 255, 0.55);
  --td-bg: rgba(255, 255, 255, 0.3);
  --td-alt: rgba(255, 255, 255, 0.16);
  --row-border: rgba(90, 122, 180, 0.08);
  --overlay-bg: rgba(30, 45, 75, 0.22);
  --popup-bg: linear-gradient(150deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.66));
  --popup-border: rgba(255, 255, 255, 0.92);
  --cal-btn-bg: rgba(255, 255, 255, 0.55);
  --cal-btn-border: rgba(90, 122, 180, 0.16);
  --cal-icon: #33425c;
  --cell-hover: rgba(90, 122, 180, 0.08);
  --select-arrow: rgba(51, 66, 92, 0.55);
  --file-btn-bg: rgba(255, 255, 255, 0.55);
  --file-btn-border: rgba(90, 122, 180, 0.16);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC",
    "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg-gradient);
  background-attachment: fixed;
  overflow-x: hidden;
  transition: background 0.35s ease, color 0.35s ease;
}

/* 环境光斑 */
body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: var(--blob-opacity);
  z-index: -2;
  pointer-events: none;
}
body::before {
  width: 55vw;
  height: 55vw;
  left: -12vw;
  top: -18vw;
  background: radial-gradient(circle, var(--blob-1), var(--blob-2));
  animation: blobFloat 24s ease-in-out infinite alternate;
}
body::after {
  width: 50vw;
  height: 50vw;
  right: -14vw;
  bottom: -20vw;
  background: radial-gradient(circle, var(--blob-3), var(--blob-4));
  animation: blobFloat 28s ease-in-out infinite alternate-reverse;
}
@keyframes blobFloat {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(9vw, 7vh) scale(1.18); }
}

/* 跟随鼠标的柔和光晕 */
#liquid-sheen {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(480px circle at 50% 30%, var(--sheen-color), transparent 65%);
}

/* 明暗切换按钮 */
.theme-toggle {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 300;
  width: 42px;
  height: 42px;
  border: 1px solid var(--btn-border);
  border-radius: 50%;
  background: var(--btn-bg);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--btn-shadow), inset 0 1px 0 var(--btn-inset);
  transition: background 0.2s ease, transform 0.15s ease;
}
.theme-toggle:hover { background: var(--btn-bg-hover); transform: translateY(-1px); }
.theme-toggle:active { transform: scale(0.94); }
.theme-toggle svg { width: 20px; height: 20px; }
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }
:root[data-theme="light"] .icon-sun { display: none; }
:root[data-theme="light"] .icon-moon { display: block; }

.container {
  max-width: 920px;
  margin: 0 auto;
  padding: 78px 20px 64px;
}

h1 {
  margin: 4px 0 22px;
  font-size: 29px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-shadow: var(--h1-shadow);
}

/* ---------- 平台首页 ---------- */
.home-view { text-align: center; padding-top: 88px; }
.home-view h1 { margin-bottom: 8px; }
.home-sub { margin: 0 0 34px; font-size: 14px; color: var(--text-2); }
.platform-grid { display: flex; justify-content: center; flex-wrap: wrap; gap: 18px; }
.platform-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 280px;
  min-height: 190px;
  padding: 30px 26px;
  border: 1px solid var(--panel-border);
  border-radius: 26px;
  background: var(--panel-grad);
  box-shadow:
    var(--shadow),
    inset 0 0 0 1px var(--inner-ring),
    inset 0 1px 0 var(--top-edge),
    inset 0 -1px 0 var(--bottom-edge);
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.35s ease;
  animation: cardIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.15s backwards;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
.platform-card:hover {
  transform: translateY(-3px);
  background: var(--panel-grad-hover);
  box-shadow:
    var(--shadow-hover),
    inset 0 0 0 1px var(--inner-ring-hover),
    inset 0 1px 0 var(--top-edge-hover),
    inset 0 -1px 0 var(--bottom-edge-hover);
}
.platform-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg,
    transparent 18%,
    var(--streak) 36%,
    var(--streak-mid) 46%,
    transparent 58%);
  background-size: 240% 100%;
  background-position: 100% 0;
  transition: background-position 0.7s ease;
}
.platform-card:hover::after { background-position: 0% 0; }
.platform-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 17px;
  background: var(--btn-bg);
  border: 1px solid var(--btn-border);
  color: var(--accent);
  box-shadow: inset 0 1px 0 var(--btn-inset), var(--btn-shadow);
}
.platform-icon svg { width: 26px; height: 26px; }
.platform-name { font-size: 18px; font-weight: 700; }
.platform-desc { font-size: 13px; color: var(--text-2); line-height: 1.55; max-width: 220px; }
.platform-arrow {
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--secondary-bg);
  border: 1px solid var(--secondary-border);
  color: var(--accent);
  font-size: 15px;
  transition: transform 0.2s ease;
}
.platform-card:hover .platform-arrow { transform: translateX(3px); }
.platform-card:disabled {
  cursor: not-allowed;
  opacity: 0.68;
  border-style: dashed;
}
.platform-card:disabled:hover {
  transform: none;
  background: var(--panel-grad);
  box-shadow:
    var(--shadow),
    inset 0 0 0 1px var(--inner-ring),
    inset 0 1px 0 var(--top-edge),
    inset 0 -1px 0 var(--bottom-edge);
}
.platform-badge {
  margin-top: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--secondary-bg);
  border: 1px solid var(--secondary-border);
  color: var(--text-2);
  font-size: 11px;
  letter-spacing: 0.08em;
}

/* ---------- 顶部品牌栏 ---------- */
.brand-bar {
  position: fixed;
  top: 16px;
  left: 18px;
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--btn-border);
  border-radius: 14px;
  background: var(--btn-bg);
  box-shadow: var(--btn-shadow), inset 0 1px 0 var(--btn-inset);
  pointer-events: none;
}
.brand-name { font-size: 15px; font-weight: 700; letter-spacing: 0.02em; color: var(--text); }
.brand-en { font-size: 11px; font-weight: 600; letter-spacing: 0.18em; color: var(--accent); }

/* ---------- 子模块返回链接 ---------- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.2s ease;
}
.back-link:hover { color: var(--accent); }

/* ---------- 清透玻璃面板 ---------- */
.panel {
  position: relative;
  overflow: hidden;
  background: var(--panel-grad);
  border: 1px solid var(--panel-border);
  border-radius: 26px;
  box-shadow:
    var(--shadow),
    inset 0 0 0 1px var(--inner-ring),
    inset 0 1px 0 var(--top-edge),
    inset 0 -1px 0 var(--bottom-edge);
  padding: 24px 26px;
  margin-bottom: 20px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.35s ease;
}
.panel:hover {
  transform: translateY(-2px);
  background: var(--panel-grad-hover);
  box-shadow:
    var(--shadow-hover),
    inset 0 0 0 1px var(--inner-ring-hover),
    inset 0 1px 0 var(--top-edge-hover),
    inset 0 -1px 0 var(--bottom-edge-hover);
}
.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg,
    transparent 18%,
    var(--streak) 36%,
    var(--streak-mid) 46%,
    transparent 58%);
  background-size: 240% 100%;
  background-position: 100% 0;
  transition: background-position 0.7s ease;
}
.panel:hover::after { background-position: 0% 0; }
.step::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20px;
  bottom: 20px;
  width: 4px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--accent), var(--accent-2), var(--accent-3));
  opacity: 0.85;
}
.panel h2 { margin: 0 0 4px; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.panel h3 { margin: 16px 0 8px; font-size: 15px; font-weight: 600; color: var(--text); }

/* ---------- 表单控件 ---------- */
form label { display: block; margin-bottom: 14px; font-size: 13px; font-weight: 500; color: var(--text-2); }
form input[type="file"],
form input[type="date"],
.seatmap-controls input[type="date"],
form select {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin-top: 7px;
  padding: 12px 14px;
  border: 1px solid var(--input-border);
  border-radius: 14px;
  background: var(--input-bg);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s, color 0.35s;
}
form input:focus,
.seatmap-controls input:focus,
form select:focus {
  background: var(--input-bg-focus);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--focus-ring);
}
form select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 38px;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--select-arrow) 50%),
    linear-gradient(135deg, var(--select-arrow) 50%, transparent 50%);
  background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
select::-ms-expand { display: none; }
input[type="date"]::-webkit-calendar-picker-indicator { display: none; }
form input[type="file"]::file-selector-button {
  border: 1px solid var(--file-btn-border);
  border-radius: 10px;
  padding: 7px 14px;
  margin-right: 10px;
  background: var(--file-btn-bg);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}

/* ---------- 玻璃日期选择器 ---------- */
.date-wrap { position: relative; margin-top: 7px; width: 100%; min-width: 0; max-width: 100%; }
.date-wrap input[type="date"] { margin-top: 0; padding-right: 46px; max-width: 100%; }

/* ---------- 玻璃列车下拉框 ---------- */
.train-wrap { position: relative; margin-top: 7px; width: 100%; min-width: 0; max-width: 100%; }
.glass-select {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 12px 38px 12px 14px;
  border: 1px solid var(--input-border);
  border-radius: 14px;
  background: var(--input-bg);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
  font-size: 14px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s, color 0.35s;
  background-image: linear-gradient(45deg, transparent 50%, var(--select-arrow) 50%),
    linear-gradient(135deg, var(--select-arrow) 50%, transparent 50%);
  background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.glass-select:hover { background-color: var(--input-bg-focus); }
.glass-select:focus-visible {
  background: var(--input-bg-focus);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--focus-ring);
}
.train-popup {
  position: fixed;
  z-index: 200;
  width: 280px;
  max-width: calc(100vw - 24px);
  padding: 8px;
  border-radius: 18px;
  background: var(--popup-bg);
  border: 1px solid var(--popup-border);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.3), inset 0 1px 0 var(--top-edge);
  -webkit-backdrop-filter: blur(4px) saturate(1.1);
  backdrop-filter: blur(4px) saturate(1.1);
  color: var(--text);
}
.train-option {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease;
}
.train-option:hover { background: var(--cell-hover); }
.train-option.selected {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 600;
}

.date-cal-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--cal-btn-border);
  border-radius: 9px;
  background: var(--cal-btn-bg);
  color: var(--cal-icon);
  cursor: pointer;
  box-shadow: inset 0 1px 0 var(--btn-inset);
  transition: background 0.15s ease;
}
.date-cal-btn:hover { background: var(--btn-bg-hover); }
.date-cal-btn svg { width: 16px; height: 16px; }
.date-popup {
  position: fixed;
  z-index: 200;
  width: 300px;
  max-width: calc(100vw - 24px);
  padding: 14px;
  border-radius: 18px;
  background: var(--popup-bg);
  border: 1px solid var(--popup-border);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.3), inset 0 1px 0 var(--top-edge);
  -webkit-backdrop-filter: blur(4px) saturate(1.1);
  backdrop-filter: blur(4px) saturate(1.1);
  color: var(--text);
}
.date-popup-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.date-title { font-size: 14px; font-weight: 600; }
.date-nav {
  border: 0;
  background: var(--btn-bg);
  color: var(--text);
  width: 28px;
  height: 28px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}
.date-nav:hover { background: var(--btn-bg-hover); }
.date-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 11px;
  color: var(--text-2);
  margin-bottom: 6px;
}
.date-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.date-cell {
  border: 0;
  background: transparent;
  color: var(--text);
  height: 32px;
  border-radius: 9px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.12s ease;
}
.date-cell:hover { background: var(--cell-hover); }
.date-cell.today { box-shadow: inset 0 0 0 1px var(--accent); }
.date-cell.selected {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 600;
}
.date-cell.empty { pointer-events: none; }
.date-cell.disabled { opacity: 0.35; pointer-events: none; }

/* 下拉/日期弹层：适度透光 + 背景模糊，保持玻璃感而非实心面板 */
.train-popup,
.date-popup {
  background: linear-gradient(150deg, rgba(40, 45, 62, 0.78), rgba(28, 32, 46, 0.7));
  -webkit-backdrop-filter: blur(4px) saturate(1.1);
  backdrop-filter: blur(4px) saturate(1.1);
}
:root[data-theme="light"] .train-popup,
:root[data-theme="light"] .date-popup {
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.46));
}

/* ---------- 列车运营情况（座位图） ---------- */
#seatmap-status { margin: 0 0 14px; font-size: 13px; }
.seatmap-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 10px;
  padding: 10px 14px;
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  background: var(--panel-grad);
  box-shadow: var(--shadow), inset 0 1px 0 var(--top-edge);
  font-size: 13px;
}
.seatmap-meta .k { color: var(--text-2); margin-right: 6px; }
.seg-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.seg-tab {
  padding: 5px 11px;
  border: 1px solid var(--btn-border);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}
.seg-tab:hover { background: var(--btn-bg-hover); }
.seg-tab.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}
.seatmap-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 11px;
  color: var(--text-2);
}
.seatmap-legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.swatch.occupied { background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.swatch.free { background: var(--input-bg); border: 1px solid var(--input-border); }
.swatch.table { background: rgba(120, 140, 170, 0.35); }
.swatch.aisle { background: transparent; border-left: 2px dashed var(--panel-border); }
.train-layout { display: flex; flex-wrap: wrap; gap: 10px; }
.car-block {
  flex: 0 1 auto;
  max-width: none;
  padding: 10px;
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  background: var(--panel-grad);
  box-shadow: var(--shadow), inset 0 0 0 1px var(--inner-ring), inset 0 1px 0 var(--top-edge);
}
.car-block.vip { border-color: var(--accent-2); }
.seatmap-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 16px;
  margin-bottom: 12px;
  padding: 10px 14px;
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  background: var(--panel-grad);
}
.seatmap-controls.hidden { display: none; }
#sm-progress { margin-bottom: 12px; }
.sm-hint { flex-basis: 100%; font-size: 12px; color: var(--text-2); margin: 2px 0 0; }
.sm-field.seg-pick { margin-bottom: 10px; }
.sm-field { display: flex; flex-direction: column; align-items: stretch; gap: 6px; font-size: 13px; color: var(--text-2); font-weight: 500; }
.sm-field .train-wrap, .sm-field .date-wrap { margin-top: 0; width: 220px; }
.sm-generate { margin-top: 0; }
.car-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.car-name { font-size: 12px; font-weight: 700; }
.car-type {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  color: var(--text-2);
}
.car-grid {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-start;
}
.seat-row {
  display: grid;
  grid-template-columns: repeat(5, 34px);
  gap: 3px;
}
.seat-block {
  display: grid;
  grid-template-columns: repeat(5, 34px);
  gap: 3px;
}
.row-sep {
  height: 0;
  border-top: 1px dashed var(--panel-border);
  margin: 2px 1px 0;
}
.vip-room {
  grid-column: 2 / -1;
  border: 1px solid var(--accent-2);
  border-radius: 10px;
  padding: 6px;
  background: var(--td-bg);
}
.cell-room {
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}
.vip-seats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3px;
}
.cell {
  min-height: 20px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
}
.cell-empty { background: transparent; }
.cell-aisle { background: transparent; border-left: 1px dashed var(--panel-border); border-radius: 0; }
.cell-table {
  background: rgba(120, 140, 170, 0.18);
  color: var(--text-2);
  font-size: 10px;
}
.cell-table.table-block {
  border-radius: 8px;
  letter-spacing: 2px;
}
.cell-multi-sep {
  grid-column: 1 / -1;
  height: 0;
  border-top: 1px dashed var(--panel-border);
  margin: 4px 1px;
}
.cell-seat {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--text);
  cursor: default;
  position: relative;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.cell-seat:hover { transform: translateY(-1px); }
.cell-seat.occupied {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px var(--focus-ring);
}
.cell-seat.occupied[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) scale(0.96);
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 9px;
  background: var(--popup-bg);
  border: 1px solid var(--popup-border);
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 20;
}
.cell-seat.occupied[data-tip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}
.nouse-box { margin-top: 16px; }
.nouse-box h3 { font-size: 14px; margin: 0 0 8px; }
.nouse-list { font-size: 13px; color: var(--text-2); line-height: 1.8; }

/* ---------- 移动端自适应 ---------- */
@media (max-width: 560px) {
  .container { padding: 64px 14px 52px; }
  .panel { padding: 20px 18px; }
  h1 { font-size: 24px; }
  .home-view { padding-top: 76px; }
  .home-view h1 { font-size: 26px; }
  .platform-card { width: 100%; max-width: 320px; min-height: 170px; }
  .brand-bar { top: 12px; left: 12px; padding: 6px 12px; }
  .theme-toggle { top: 12px; right: 12px; width: 38px; height: 38px; }
  .date-popup { width: calc(100vw - 24px); max-width: 320px; }
  .train-popup { width: calc(100vw - 24px); max-width: 320px; }
  .car-block { flex-basis: 100%; max-width: none; }
  .sm-field .train-wrap, .sm-field .date-wrap { width: 100%; }
  .seat-row { grid-template-columns: repeat(5, 28px); gap: 3px; }
  .seat-block { grid-template-columns: repeat(5, 28px); gap: 3px; }
  .cell { min-height: 18px; font-size: 9px; }
}

/* ---------- 玻璃按钮 ---------- */
.btn {
  display: inline-block;
  margin-top: 4px;
  padding: 11px 24px;
  border: 1px solid var(--btn-border);
  border-radius: 15px;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--btn-shadow), inset 0 1px 0 var(--btn-inset);
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, opacity 0.2s;
}
.btn:hover {
  transform: translateY(-1px);
  background: var(--btn-bg-hover);
  box-shadow: var(--shadow-hover), inset 0 1px 0 var(--btn-inset);
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: wait; }
.btn.disabled { opacity: 0.35; pointer-events: none; cursor: not-allowed; }
.btn.secondary { background: var(--secondary-bg); border-color: var(--secondary-border); }

/* ---------- 进度条 ---------- */
.progress-track {
  height: 13px;
  border-radius: 9px;
  background: var(--track-bg);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin-bottom: 10px;
}
.progress-bar {
  height: 100%;
  width: 0;
  border-radius: 9px;
  background: linear-gradient(90deg, #7ab8ff, #9d97f2, #7ed4a4);
  background-size: 200% 100%;
  animation: shimmer 2.6s linear infinite;
  transition: width 0.4s ease;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.stage { margin: 0; font-size: 13px; color: var(--text-2); }

/* ---------- 摘要 ---------- */
.meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.meta > div {
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  border-radius: 13px;
  padding: 9px 12px;
}
.meta .k { display: block; font-size: 11px; color: var(--text-2); }
.meta .v { font-size: 14px; font-weight: 600; }

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 15px;
  overflow: hidden;
  margin-bottom: 14px;
  font-size: 14px;
}
th {
  background: var(--th-bg);
  color: var(--text);
  font-weight: 600;
  text-align: left;
}
td { background: var(--td-bg); }
tbody tr:nth-child(even) td { background: var(--td-alt); }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--row-border); }
tbody tr:last-child td { border-bottom: 0; }

/* ---------- 提示文字 ---------- */
.error { color: #d9534f; font-size: 13px; margin: 10px 0 0; font-weight: 500; }
.hidden { display: none; }
.hint { color: var(--text-2); font-size: 12px; }

/* ---------- 弹窗 ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal-overlay.hidden { display: none; }
.modal-box {
  background: var(--popup-bg);
  border: 1px solid var(--popup-border);
  border-radius: 24px;
  padding: 24px 28px;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.32), inset 0 1px 0 var(--top-edge);
  -webkit-backdrop-filter: blur(6px) saturate(1.1);
  backdrop-filter: blur(6px) saturate(1.1);
  animation: popIn 0.22s ease;
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.94) translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.modal-box h3 { margin: 0 0 10px; font-size: 17px; font-weight: 700; }
.modal-box p { margin: 0 0 16px; font-size: 14px; line-height: 1.6; white-space: pre-wrap; color: var(--text); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* 进入动效 */
.panel { animation: riseIn 0.5s ease both; }
.panel:nth-child(2) { animation-delay: 0.05s; }
.panel:nth-child(3) { animation-delay: 0.1s; }
@keyframes riseIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* 可访问性 */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  body::before, body::after, .progress-bar, .panel, .platform-card { animation: none; }
}

/* ---------- 座位查询模块 ---------- */
.seatquery-view form input[type="text"],
.login-view form input[type="text"],
.login-view form input[type="password"] {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin-top: 7px;
  padding: 12px 14px;
  border: 1px solid var(--input-border);
  border-radius: 14px;
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.seatquery-view form input[type="text"]:focus,
.login-view form input[type="text"]:focus,
.login-view form input[type="password"]:focus {
  background: var(--input-bg-focus);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--focus-ring);
}
.sq-train-wrap, .sq-date-wrap { margin-top: 7px; }
.sq-result-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.sq-result-meta > div {
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  border-radius: 13px;
  padding: 9px 12px;
}
.sq-result-meta .k { display: block; font-size: 11px; color: var(--text-2); }
.sq-result-meta .v { font-size: 14px; font-weight: 600; }
.sq-card {
  background: var(--panel-grad);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  padding: 16px 18px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.sq-name { font-size: 16px; font-weight: 700; margin-bottom: 10px; }
.sq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px 12px;
}
.sq-grid .k { display: block; font-size: 11px; color: var(--text-2); margin-bottom: 2px; }
.sq-grid .v { font-size: 14px; font-weight: 600; word-break: break-all; }

/* ---------- 阿里云短信发送 ---------- */
.sms-send-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 2px; }

/* ---------- 登录与角色切换 ---------- */
.auth-toggle {
  position: fixed;
  top: 14px;
  right: 62px;
  z-index: 70;
  padding: 8px 14px;
  border: 1px solid var(--input-border);
  border-radius: 12px;
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.auth-toggle:hover {
  background-color: var(--input-bg-focus);
  border-color: var(--accent);
}

/* ---------- 乘降统计 ---------- */
.stats-block-title { margin: 18px 0 8px; font-size: 15px; font-weight: 600; }
.stats-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 8px;
}
.stats-table th, .stats-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--panel-border);
  text-align: left;
  font-size: 13px;
}
.stats-table th { background: var(--chip-bg); color: var(--text-2); font-weight: 600; white-space: nowrap; }
.stats-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.stats-table tbody tr:last-child td { border-bottom: 0; }
.stats-table tbody tr:hover td { background: var(--cell-hover); }
.stats-loads { font-size: 13px; color: var(--text-2); margin: 4px 0 8px; line-height: 1.9; }
.stats-filters { display: flex; flex-wrap: wrap; gap: 12px; margin: 10px 0; }
.stats-filter { width: 200px; }
.stats-downloads { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 16px; }

/* ---------- 备案号 ---------- */
.icp-footer {
  text-align: center;
  padding: 18px 12px 22px;
  font-size: 12px;
  color: var(--text-2);
}
.icp-footer a {
  color: var(--text-2);
  text-decoration: none;
}
.icp-footer a:hover {
  color: var(--accent);
  text-decoration: underline;
}
