:root {
  --bg: #f5f7fb;
  --bg2: #ffffff;
  --bg-soft: #f0f4fa;
  --ink: #1a2340;
  --ink-2: #3d4a6b;
  --muted: #7a86a0;
  --rule: #e3e8f2;
  --accent: #2563eb;
  --accent-2: #059669;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --danger: #dc2626;
  --warning: #f59e0b;
  --shadow-sm: 0 2px 8px rgba(20, 30, 60, 0.06);
  --shadow-md: 0 8px 24px rgba(20, 30, 60, 0.08);
  --shadow-lg: 0 20px 60px rgba(20, 30, 60, 0.12);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse 1200px 600px at 10% -10%, rgba(37, 99, 235, 0.08), transparent 60%),
    radial-gradient(ellipse 800px 500px at 110% 10%, rgba(5, 150, 105, 0.06), transparent 55%),
    var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
button, input, select, textarea { font: inherit; }
button, .btn {
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  padding: .7rem 1.1rem;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  transition: all .2s ease;
  font-size: .92rem;
  letter-spacing: .01em;
}
button:hover, .btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
button:active, .btn:active { transform: translateY(0); }
button.secondary, .btn.secondary {
  background: var(--bg2);
  color: var(--ink-2);
  border: 1px solid var(--rule);
}
button.secondary:hover, .btn.secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}
button.danger { background: var(--danger); }
button.danger:hover { box-shadow: 0 6px 16px rgba(220, 38, 38, 0.25); }

input, select, textarea {
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  background: var(--bg2);
  color: var(--ink);
  padding: .7rem .85rem;
  outline: none;
  transition: all .2s ease;
  font-size: .95rem;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
input::placeholder, textarea::placeholder { color: #aab3c5; }

/* 输入框后缀单位 */
.input-suffix {
  position: relative;
  display: flex;
  align-items: center;
}
.input-suffix input {
  padding-right: 3.2rem;
}
.input-suffix span {
  position: absolute;
  right: .85rem;
  color: var(--muted);
  font-size: .85rem;
  font-weight: 500;
  pointer-events: none;
}

.wrap, header, footer { width: min(1200px, calc(100% - 32px)); margin: 0 auto; }
header { padding: 2.2rem 0 1.5rem; }

.eyebrow {
  margin: 0 0 .5rem;
  color: var(--accent);
  letter-spacing: .08em;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
}
h1 {
  margin: 0 0 .5rem;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -.02em;
  background: linear-gradient(135deg, var(--ink) 30%, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
h2, h3, p { margin-top: 0; }
h2 {
  font-size: 1.45rem;
  font-weight: 700;
  margin-bottom: .6rem;
  letter-spacing: -.01em;
}
h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: .4rem;
}
.sub, .muted { color: var(--muted); }
.sub { font-size: .98rem; }

.hero {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 400px);
  gap: 1.2rem;
  margin: 1.2rem 0;
}

.panel, .route-card, .admin-box, .empty-state, .login-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-lg);
}
.panel { padding: 1.5rem; }

.search-line {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: .6rem;
  margin-top: .7rem;
}
.search-line input { padding: .8rem 1rem; font-size: 1rem; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  padding: 0;
  border-radius: var(--radius-lg);
}
.stats div {
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  gap: .3rem;
  min-height: 140px;
  padding: 1.2rem 1rem;
  border-left: 1px solid var(--rule);
}
.stats div:first-child { border-left: 0; }
.stats strong {
  font-size: 2.5rem;
  color: var(--accent);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -.02em;
}
.stats span { color: var(--muted); font-size: .9rem; font-weight: 500; }

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin: 2.5rem 0 1rem;
}
.section-head h2 { margin-bottom: 0; }
.section-head .sub { margin: 0; }

.tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .9rem;
}
.tile {
  min-height: 130px;
  border-radius: var(--radius-md);
  padding: 1.1rem;
  display: grid;
  align-content: space-between;
  text-align: left;
  box-shadow: var(--shadow-md);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: all .25s ease;
  position: relative;
  overflow: hidden;
  border: 0;
}
.tile::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -30%;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}
.tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.tile:nth-child(1) { background: linear-gradient(135deg, #2563eb, #3b82f6); }
.tile:nth-child(2) { background: linear-gradient(135deg, #7c3aed, #8b5cf6); }
.tile:nth-child(3) { background: linear-gradient(135deg, #ea580c, #f97316); }
.tile:nth-child(4) { background: linear-gradient(135deg, #059669, #10b981); }
.tile strong { font-size: 1.3rem; display: block; font-weight: 700; position: relative; z-index: 1; }
.tile span { font-size: .85rem; opacity: .9; position: relative; z-index: 1; }

.tile-summary {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
}
.tile-summary::before {
  background: rgba(255, 255, 255, 0.15);
}

.filters { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.filters .muted { margin-left: auto; font-size: .88rem; }

.pill {
  padding: .5rem .95rem;
  background: var(--bg2);
  color: var(--ink-2);
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: .88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s ease;
}
.pill:hover { border-color: var(--accent); color: var(--accent); }
.pill.active { color: #fff; background: var(--accent); border-color: var(--accent); box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25); }

.route-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.route-card {
  position: relative;
  overflow: hidden;
  padding: 1.2rem;
  display: grid;
  gap: .9rem;
  transition: all .25s ease;
}
.route-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.route-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.route-card h3 { margin: 0; font-size: 1.12rem; line-height: 1.4; font-weight: 700; }

.badge-row { display: flex; gap: .4rem; flex-wrap: wrap; align-items: flex-start; margin-top: .1rem; }
.route-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .22rem .65rem;
  border-radius: 6px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.4;
}
.badge-zhiding { background: linear-gradient(135deg, #f97316, #fb923c); color: #fff; }
.badge-remen { background: linear-gradient(135deg, #ef4444, #f87171); color: #fff; }
.badge-shangxin { background: linear-gradient(135deg, #10b981, #34d399); color: #fff; }
.badge-default { background: #e0e7ff; color: #4338ca; }

/* 状态徽章 */
.status-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
}
.status-normal {
  background: #dcfce7;
  color: #166534;
}
.status-off {
  background: #f1f5f9;
  color: #64748b;
}

/* 后台标签单元格 */
.tags-cell {
  line-height: 1.8;
}
.tags-cell .route-badge {
  margin-right: 0.25rem;
  margin-bottom: 0.15rem;
}

.price-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(5, 150, 105, 0.04)), var(--bg-soft);
  border: 1px solid rgba(37, 99, 235, 0.08);
  border-radius: var(--radius-md);
  padding: .9rem 1rem;
}
.price-box small { display: block; color: var(--muted); margin-bottom: .25rem; font-size: .8rem; font-weight: 500; }
.price-box strong { color: var(--accent); font-size: 1.6rem; line-height: 1; font-weight: 800; letter-spacing: -.01em; }
.price-box .price-text { color: #ef4444 !important; }
.price-box .price-text small { display: inline; font-size: .85rem; font-weight: 500; margin-left: .15rem; color: #ef4444; opacity: .8; }
.price-text { color: #ef4444; font-weight: 700; }
.cost-text { color: #f97316 !important; }
table .price-text small { font-size: .75rem; font-weight: 500; margin-left: .15rem; opacity: .75; }

.tag-row { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .35rem; max-width: 58%; }
.tag {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: .25rem .6rem;
  font-size: .74rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--accent);
}
.tag.orange { color: #ea580c; }
.tag.green { color: var(--accent-2); }

dl { margin: 0; display: grid; gap: .4rem; }
dl div {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: .6rem;
  border-top: 1px dashed var(--rule);
  padding-top: .5rem;
  font-size: .92rem;
}
dt { color: var(--muted); font-weight: 500; }
dd { margin: 0; color: var(--ink-2); font-weight: 500; }

.pickup-bar {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  padding: .75rem .9rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(5, 150, 105, 0.04));
  border: 1px solid rgba(37, 99, 235, 0.08);
  font-size: .88rem;
}
.pickup-label {
  flex-shrink: 0;
  padding: .15rem .55rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
}
.pickup-text { font-weight: 600; word-break: break-all; color: var(--ink-2); }

.cta-row { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.cta-row .btn,
.cta-row button,
.cta-row a {
  height: 2.5rem;
  line-height: 1;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-size: .9rem;
  padding: 0 1rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 0;
  cursor: pointer;
  transition: all .2s ease;
  text-decoration: none;
  color: #fff;
  box-sizing: border-box;
}
.cta-row .btn:hover,
.cta-row button:hover,
.cta-row a:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.cta-phone { background: var(--accent); }
.cta-wechat { background: var(--accent-2); }
.cta-book { background: var(--accent); }
.cta-copy { background: #64748b; }

.more-wrap { display: flex; justify-content: center; margin: 1.5rem 0 0; }

.admin-box { padding: 1.2rem; margin: 2rem 0; }
.admin-grid, .form-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; }
.admin-grid .wide, .form-grid .wide { grid-column: span 2; }
.admin-grid h3, .form-grid h3 {
  grid-column: 1 / -1;
  margin: .6rem 0 .2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-size: 1.05rem;
}

label {
  display: grid;
  gap: .4rem;
  color: var(--muted);
  font-size: .85rem;
  font-weight: 600;
}
label small { font-weight: 400; color: var(--muted); font-size: .78rem; }

.admin-actions, .tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin: 1rem 0;
  align-items: center;
}
.tabs { border-bottom: 1px solid var(--rule); padding-bottom: .8rem; margin-bottom: 1.2rem; }
.tab {
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: .55rem 1rem;
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  transition: all .2s ease;
}
.tab:hover { color: var(--accent); background: var(--accent-soft); }
.tab.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}
.tab-spacer { flex: 1; }

.table-wrap {
  overflow: auto;
  max-height: 650px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
table { width: 100%; min-width: 980px; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: .65rem .75rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: middle;
  font-size: .88rem;
}
th {
  position: sticky;
  top: 0;
  background: var(--ink);
  color: #fff;
  z-index: 1;
  font-weight: 600;
  font-size: .85rem;
  letter-spacing: .02em;
}
tbody tr { transition: background .15s ease; }
tbody tr:hover { background: var(--bg-soft); }
tbody tr:nth-child(even) { background: #fafbfe; }
tbody tr:nth-child(even):hover { background: var(--bg-soft); }

.mini-actions { display: flex; gap: .3rem; flex-wrap: nowrap; }
.mini-actions button {
  padding: .35rem .6rem;
  border-radius: 6px;
  font-size: .8rem;
  font-weight: 500;
  white-space: nowrap;
}
.mini-actions button.secondary {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
}
.mini-actions button.secondary:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #1e293b;
}
.mini-actions select {
  padding: .35rem .55rem;
  font-size: .82rem;
  min-width: 90px;
  border-radius: 8px;
}

.admin-toolbar { display: flex; justify-content: space-between; margin: 1.2rem 0 .7rem; gap: .5rem; align-items: center; flex-wrap: wrap; }
.admin-toolbar h2 { margin: 0; font-size: 1rem; }
.toolbar-left, .toolbar-right { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }

/* 面板头部 */
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.panel-title h2 { margin: 0 0 .25rem; font-size: 1.25rem; }
.panel-title p { margin: 0; font-size: .88rem; }
.panel-actions { display: flex; gap: .5rem; }

/* 表单卡片 */
.form-card {
  background: var(--bg2);
  padding: 1.2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow-sm);
}

.admin-info {
  color: var(--muted);
  font-size: .88rem;
  margin-right: .5rem;
}
.admin-info strong { color: var(--ink-2); }

/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .4rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.pagination button {
  padding: .4rem .75rem;
  border: 1px solid var(--rule);
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-size: .88rem;
  color: var(--ink-2);
}
.pagination button:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}
.pagination button.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.pagination button:disabled {
  opacity: .5;
  cursor: not-allowed;
}
.pagination .page-info {
  color: var(--muted);
  font-size: .88rem;
  margin: 0 .5rem;
}

/* 日志详情 */
.log-detail {
  font-size: .82rem;
  color: var(--muted);
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.log-detail-full {
  white-space: pre-wrap;
  word-break: break-all;
}

.badge {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: 4px;
  font-size: .78rem;
  font-weight: 500;
}
.badge.super { background: #fef3c7; color: #92400e; }
.badge.admin { background: #dbeafe; color: #1e40af; }
.badge.active { background: #dcfce7; color: #166534; }
.badge.disabled { background: #fee2e2; color: #991b1b; }

.btn.small { padding: .35rem .7rem; font-size: .82rem; }

.tag-checks { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: .5rem; }
.tag-checks .chk {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-weight: 500;
  color: var(--ink-2);
  font-size: .88rem;
}
.tag-checks .chk input { width: auto; }

footer { padding: 2.5rem 0 3rem; text-align: center; color: var(--muted); font-size: .9rem; }
footer strong { color: var(--ink-2); }
.footer-contact { display: flex; justify-content: center; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; }
.footer-contact a { color: var(--accent); text-decoration: none; font-weight: 600; }
.admin-link-hidden {
  margin-top: 1.5rem;
  font-size: 0.75rem;
  opacity: 0.25;
}
.admin-link-hidden a {
  color: var(--muted);
  text-decoration: none;
}
.admin-link-hidden:hover {
  opacity: 1;
}

/* 二维码弹窗 */
.qr-modal {
  position: fixed;
  inset: 0;
  background: rgba(20, 30, 60, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 1rem;
}
.qr-card {
  position: relative;
  width: min(360px, 100%);
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.qr-close {
  position: absolute;
  top: .6rem;
  right: .7rem;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--ink-2);
  font-size: 1.2rem;
  padding: 0;
  border: 0;
  cursor: pointer;
  transition: all .2s ease;
}
.qr-close:hover { background: var(--rule); }
.qr-img-wrap {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: .75rem;
}
.qr-img-wrap img { width: 100%; height: 100%; object-fit: contain; }

/* 预订弹窗 */
.booking-modal {
  position: fixed;
  inset: 0;
  background: rgba(20, 30, 60, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 1rem;
}
.booking-card {
  position: relative;
  width: min(580px, 100%);
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow-y: auto;
}
.booking-card h3 { margin: 0 0 .25rem; font-size: 1.3rem; font-weight: 700; }
.booking-form { display: grid; gap: .8rem; margin-top: 1.1rem; }
.booking-form label {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--ink-2);
}
.booking-form input, .booking-form textarea {
  font-weight: 400;
  padding: .65rem .8rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  font-size: .93rem;
  font-family: inherit;
  resize: vertical;
  transition: all .2s ease;
}
.booking-form input:focus, .booking-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.booking-form .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.booking-tip { text-align: center; color: var(--muted); font-size: .82rem; margin: 0; }

.btn.full { width: 100%; padding: .75rem; font-size: 1rem; border-radius: var(--radius-sm); }
.btn.primary {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
}
.btn.primary:hover { filter: brightness(1.08); box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25); }
.btn.primary:disabled { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }

/* Toast */
.toast {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: var(--accent-2);
  color: #fff;
  padding: .75rem 1.3rem;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transition: all .3s ease;
  box-shadow: var(--shadow-lg);
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--danger); box-shadow: 0 8px 24px rgba(220, 38, 38, 0.3); }

/* 导入结果 */
.import-result {
  margin-top: 1rem;
  padding: 1.2rem;
  border-radius: var(--radius-md);
  text-align: center;
  border: 1px solid var(--rule);
}
.import-result.success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(5, 150, 105, 0.06));
  border-color: rgba(16, 185, 129, 0.3);
}
.import-result.error {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.08), rgba(239, 68, 68, 0.06));
  border-color: rgba(220, 38, 38, 0.3);
}
.import-result-icon {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: .5rem;
}
.import-result.success .import-result-icon { color: #10b981; }
.import-result.error .import-result-icon { color: #dc2626; }
.import-result-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: .6rem;
}
.import-result-detail {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: .92rem;
  color: var(--ink-2);
}
.import-result-detail strong {
  color: var(--accent);
  font-size: 1.1rem;
  margin: 0 .2rem;
}
.import-result-encoding {
  margin-top: .6rem;
  font-size: .82rem;
  color: var(--muted);
}

/* 确认弹窗 */
.confirm-modal {
  position: fixed;
  inset: 0;
  background: rgba(20, 30, 60, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}
.confirm-card {
  position: relative;
  width: min(440px, 100%);
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
}
.confirm-card h3 {
  margin: 0 0 .75rem;
  font-size: 1.2rem;
}
.confirm-card p {
  color: var(--ink-2);
  line-height: 1.7;
  margin-bottom: 1.2rem;
}
.confirm-actions {
  display: flex;
  gap: .6rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.confirm-actions .btn {
  padding: .55rem 1rem;
  font-size: .9rem;
}

/* 价格汇总弹窗 */
.summary-modal {
  position: fixed;
  inset: 0;
  background: rgba(20, 30, 60, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 1rem;
}
.summary-card {
  position: relative;
  width: min(1100px, 100%);
  max-height: 88vh;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}
.summary-card h3 { margin: 0 0 .25rem; font-size: 1.4rem; }
.summary-card .muted { margin-bottom: 1rem; }
.summary-table-wrap {
  overflow: auto;
  flex: 1;
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
}
.summary-table {
  width: 100%;
  min-width: 750px;
  border-collapse: collapse;
  font-size: .9rem;
  table-layout: fixed;
}
.summary-table th {
  position: sticky;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: .7rem .9rem;
  text-align: left;
  font-weight: 600;
  font-size: .85rem;
  z-index: 1;
  white-space: nowrap;
}
.summary-table th:nth-child(1) { width: 50px; text-align: center; }
.summary-table th:nth-child(2) { width: 28%; }
.summary-table th:nth-child(3) { width: 22%; }
.summary-table th:nth-child(4) { width: 12%; text-align: right; }
.summary-table th:nth-child(5) { width: 20%; text-align: right; }
.summary-table th:nth-child(6) { width: 13%; text-align: right; }
.summary-table td {
  padding: .6rem .9rem;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-2);
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.summary-table tbody tr:hover { background: var(--bg-soft); }
.summary-table .summary-group-row td {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  font-weight: 700;
  color: #92400e;
  text-align: center;
  padding: .55rem .9rem;
  border-bottom: 1px solid #fbbf24;
  overflow: visible;
  white-space: normal;
}
.summary-table .sum-seq { color: var(--muted); font-weight: 500; text-align: center; }
.summary-table .sum-route { font-weight: 600; color: var(--ink); }
.summary-table .sum-dist { text-align: right; }
.summary-table .sum-dur { text-align: right; }
.summary-table .sum-price { font-weight: 700; text-align: right; }

/* 汇总按钮 */
.summary-btn-wrap {
  display: flex;
  align-items: end;
  gap: .6rem;
}
.summary-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: .65rem 1.2rem;
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  transition: all .2s ease;
  white-space: nowrap;
}
.summary-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* 登录页 */
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
  overflow: hidden;
}
.login::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
  background-size: 30px 30px;
  animation: floatBg 20s linear infinite;
}
@keyframes floatBg {
  0% { transform: translate(0, 0); }
  100% { transform: translate(30px, 30px); }
}
.login-wrapper {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(900px, 100%);
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 80px rgba(0,0,0,0.3);
}
.login-hero {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #fff;
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}
.login-hero::after {
  content: '';
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 120px;
  height: 120px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
}
.login-hero::before {
  content: '';
  position: absolute;
  top: 20%;
  right: 10%;
  width: 60px;
  height: 60px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
}
.login-icon {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
}
.login-hero h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}
.login-hero p {
  font-size: 0.95rem;
  opacity: 0.85;
  line-height: 1.6;
}
.login-card {
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  color: #6366f1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}
.login-card h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: #1e293b;
}
.login-sub {
  color: #64748b;
  font-size: 0.9rem;
  margin-bottom: 1.75rem;
}
.form-group {
  margin-bottom: 1.1rem;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.4rem;
}
.input-icon {
  position: relative;
}
.input-prefix {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  opacity: 0.5;
  pointer-events: none;
}
.input-icon input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.95rem;
  transition: all 0.2s;
  box-sizing: border-box;
}
.input-icon input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}
.btn-primary {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(79,70,229,0.35);
}
.btn-primary:active {
  transform: translateY(0);
}
.btn-block {
  width: 100%;
  padding: 0.85rem;
  font-size: 1rem;
  margin-top: 0.5rem;
}
.login-footer {
  margin-top: 1.5rem;
  text-align: center;
}
.back-link {
  color: #64748b;
  font-size: 0.85rem;
  text-decoration: none;
  transition: color 0.2s;
}
.back-link:hover {
  color: #4f46e5;
}

@media (max-width: 768px) {
  .login-wrapper {
    grid-template-columns: 90px 1fr;
    max-width: 480px;
    width: 100%;
  }
  .login-hero {
    padding: 1.5rem 0.75rem;
    text-align: center;
  }
  .login-hero::before,
  .login-hero::after {
    display: none;
  }
  .login-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
  }
  .login-hero h2 {
    font-size: 0.75rem;
    line-height: 1.3;
    margin-bottom: 0.3rem;
  }
  .login-hero p {
    font-size: 0.6rem;
    opacity: 0.75;
    line-height: 1.4;
  }
  .login-card {
    padding: 1.5rem 1.25rem;
  }
  .login-eyebrow {
    font-size: 0.7rem;
  }
  .login-card h1 {
    font-size: 1.35rem;
  }
  .login-sub {
    font-size: 0.8rem;
    margin-bottom: 1.2rem;
  }
  .form-group {
    margin-bottom: 0.85rem;
  }
  .form-group label {
    font-size: 0.78rem;
    margin-bottom: 0.3rem;
  }
  .input-icon input {
    padding: 0.65rem 0.85rem 0.65rem 2.25rem;
    font-size: 0.88rem;
  }
  .input-prefix {
    left: 0.7rem;
    font-size: 0.9rem;
  }
  .btn-block {
    padding: 0.75rem;
    font-size: 0.92rem;
  }
  .login-footer {
    margin-top: 1rem;
  }
}

/* 响应式 */
@media (max-width: 980px) {
  .hero, .route-grid { grid-template-columns: 1fr 1fr; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .admin-grid, .form-grid { grid-template-columns: repeat(2, 1fr); }
  .stats strong { font-size: 2rem; }
}
@media (max-width: 680px) {
  body { font-size: 14px; }
  .wrap, header, footer { width: min(100% - 24px, 100%); }

  /* 顶部标题区 */
  header { padding: 0.8rem 0 0.6rem; text-align: center; }
  header .eyebrow { font-size: 0.72rem; margin-bottom: 0.25rem; letter-spacing: 0.05em; justify-content: center; }
  h1 { font-size: 1.6rem; margin-bottom: 0.25rem; letter-spacing: -0.01em; }
  header .sub { font-size: 0.8rem; line-height: 1.4; }

  /* Hero 区：上下堆叠，整屏宽度 */
  .hero { grid-template-columns: 1fr; gap: 0.6rem; }
  .panel { padding: 0.9rem 1rem; }
  .panel label { font-size: 0.82rem; font-weight: 600; }
  .search-line { grid-template-columns: 1fr auto auto; gap: 0.4rem; }
  .search-line input { padding: 0.6rem 0.8rem; font-size: 0.88rem; }
  .search-line button { padding: 0.55rem 0.9rem; font-size: 0.82rem; }
  .panel .muted { font-size: 0.75rem; margin-top: 0.4rem; }

  /* 统计数据：横排一行 */
  .stats { grid-template-columns: repeat(3, 1fr); gap: 0; }
  .stats div { min-height: auto; border-left: 1px solid var(--rule); border-top: 0; padding: .3rem .5rem; text-align: center; }
  .stats div:first-child { border-left: 0; border-top: 0; }
  .stats strong { font-size: 1.15rem; line-height: 1.2; }
  .stats span { font-size: 0.7rem; display: block; margin-top: 0.1rem; }

  /* 区块标题 */
  h2 { font-size: 1.1rem; letter-spacing: -0.01em; }
  section { padding: 0.5rem 0; }
  .section-head { margin-bottom: 0.5rem; align-items: center; flex-direction: column; gap: 0.25rem; text-align: center; }
  .section-head h2 + p { font-size: 0.75rem; }

  /* 分类磁贴：4列小格子 */
  .tiles { grid-template-columns: repeat(4, 1fr); gap: 0.45rem; }
  .tile { min-height: 58px; padding: 0.5rem 0.35rem; }
  .tile strong { font-size: 0.78rem; line-height: 1.2; }
  .tile span { font-size: 0.62rem; margin-top: 0.1rem; }

  /* 产品卡片：单列，整屏宽，内容上下排列 */
  .route-grid { grid-template-columns: 1fr; gap: 0.7rem; }
  .route-card { padding: 1rem 1.1rem; gap: 0.7rem; }
  .route-card h3 { font-size: 1rem; line-height: 1.35; }
  .price-box {
    align-items: stretch;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.7rem 0.85rem;
  }
  .price-box strong { font-size: 1.5rem; }
  .price-box small { font-size: 0.72rem; }
  .badge-row { gap: 0.35rem; }
  .route-badge { font-size: 0.7rem; padding: 0.2rem 0.55rem; }
  .route-detail { font-size: 0.8rem; padding-top: 0.5rem; }
  .route-detail div { padding: 0.25rem 0; }
  .tag-row { justify-content: flex-start; max-width: none; gap: 0.3rem; font-size: 0.75rem; }
  .cta-row { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  .cta-row button { padding: 0.6rem 0.8rem; font-size: 0.85rem; }

  /* 筛选条 */
  .filters { gap: 0.4rem; flex-wrap: wrap; }
  .filters .pill { padding: 0.35rem 0.75rem; font-size: 0.78rem; }
  .filters .muted { margin-left: 0; font-size: 0.72rem; }

  .admin-grid, .form-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-grid .wide, .form-grid .wide { grid-column: auto; }
  .booking-form .row-2 { grid-template-columns: 1fr; }
  th, td { padding: .55rem .6rem; font-size: .8rem; }
  
  /* 移动端汇总表：只显示线路和价格 */
  .summary-card { padding: 1rem; max-height: 85vh; }
  .summary-card h3 { font-size: 1.15rem; }
  .summary-table { min-width: 0; table-layout: auto; width: 100%; }
  .summary-table th:nth-child(1),
  .summary-table th:nth-child(3),
  .summary-table th:nth-child(4),
  .summary-table th:nth-child(5),
  .summary-table td:nth-child(1),
  .summary-table td:nth-child(3),
  .summary-table td:nth-child(4),
  .summary-table td:nth-child(5) { display: none; }
  .summary-table th,
  .summary-table td { padding: .55rem .7rem; font-size: .85rem; }
  .summary-table .summary-group-row td { 
    display: table-cell; 
    font-size: .85rem; 
    text-align: center;
  }
  .summary-btn-wrap { flex-direction: column; align-items: stretch; }
  .summary-btn { width: 100%; text-align: center; }
}

/* 提交成功弹窗 */
.success-modal {
  position: fixed;
  inset: 0;
  background: rgba(20, 30, 60, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 1rem;
}
.success-card {
  width: min(380px, 100%);
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-lg);
  text-align: center;
  animation: popIn .3s ease;
}
@keyframes popIn {
  0% { transform: scale(.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.success-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 1rem;
  background: #10b981;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: #fff;
  font-weight: 700;
}
.success-card h3 {
  margin: 0 0 .4rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
}
.success-msg {
  font-size: 1.1rem;
  color: #10b981;
  font-weight: 600;
  margin: 0 0 .5rem;
}
.success-tip {
  font-size: .85rem;
  color: var(--muted);
  margin: 0 0 1.5rem;
  line-height: 1.5;
}
.success-card .btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: .6rem 2rem;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.success-card .btn:hover { filter: brightness(1.08); }
