/* ============ 基础变量 ============ */
:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-light: #eef2ff;
  --accent: #7c3aed;
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #1e293b;
  --text-sub: #475569;
  --text-muted: #94a3b8;
  --border: #e8ecf3;
  --border-dark: #d9e0ec;
  --green: #10b981;
  --green-light: #ecfdf5;
  --orange: #f59e0b;
  --orange-light: #fffbeb;
  --red: #ef4444;
  --red-light: #fef2f2;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.07), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 18px 45px rgba(15, 23, 42, 0.10);
  --radius: 14px;
}

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

html, body { height: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font-family: inherit; }
button { cursor: pointer; }
svg { display: block; }
.hidden { display: none !important; }

/* ============ 顶部导航 ============ */
.topbar {
  height: 72px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 32px;
  gap: 40px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.brand-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 14px rgba(79, 70, 229, 0.3);
}
.brand-icon svg { width: 24px; height: 24px; }

.brand-title { font-size: 17px; font-weight: 800; letter-spacing: -0.3px; line-height: 1.2; }
.brand-title span { color: var(--primary); font-weight: 700; }
.brand-sub { font-size: 9px; letter-spacing: 1.4px; color: var(--text-muted); font-weight: 600; margin-top: 2px; }

.nav-tabs { display: flex; gap: 6px; background: var(--bg); padding: 5px; border-radius: 11px; }

.nav-tab {
  display: flex; align-items: center; gap: 8px;
  border: none; background: transparent;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px; font-weight: 600;
  color: var(--text-sub);
  transition: all 0.2s;
  white-space: nowrap;
}
.nav-tab svg { width: 16px; height: 16px; }
.nav-tab:hover { color: var(--primary); }
.nav-tab.active {
  background: var(--card);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.topbar-right { margin-left: auto; }

.event-badge {
  display: flex; align-items: center; gap: 9px;
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 12px; font-weight: 600;
}
.event-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px rgba(79,70,229,0.15); }

/* ============ 视图容器 ============ */
.view { min-height: calc(100vh - 72px); }

/* ============ 查座布局 ============ */
.lookup-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 24px;
  padding: 24px 32px 32px;
  max-width: 1800px;
  margin: 0 auto;
  align-items: start;
}

.lookup-panel { display: flex; flex-direction: column; gap: 20px; }

/* Hero 卡片 */
.hero-card {
  background: linear-gradient(145deg, #4f46e5 0%, #5b4fe8 45%, #7c3aed 100%);
  border-radius: 18px;
  padding: 30px 26px 26px;
  color: #fff;
  box-shadow: 0 16px 40px rgba(79, 70, 229, 0.28);
  position: relative;
  overflow: hidden;
}
.hero-card::before {
  content: '';
  position: absolute;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  top: -140px; right: -90px;
}
.hero-card::after {
  content: '';
  position: absolute;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  bottom: -90px; left: -50px;
}

.hero-eyebrow {
  font-size: 10px; letter-spacing: 1.6px;
  font-weight: 700;
  color: rgba(255,255,255,0.75);
  margin-bottom: 12px;
  position: relative; z-index: 1;
}
.hero-title {
  font-size: 27px; font-weight: 800; line-height: 1.3;
  letter-spacing: -0.5px;
  position: relative; z-index: 1;
}
.hero-title span { display: inline-block; position: relative; }
.hero-title span::after {
  content: '';
  position: absolute; left: 0; bottom: 2px;
  width: 100%; height: 7px;
  background: rgba(255,255,255,0.25);
  border-radius: 4px;
  z-index: -1;
}
.hero-desc {
  font-size: 12.5px;
  color: rgba(255,255,255,0.8);
  margin-top: 10px;
  line-height: 1.7;
  position: relative; z-index: 1;
}

.search-box {
  margin-top: 22px;
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 11px;
  padding: 5px 5px 5px 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  position: relative; z-index: 1;
}
.search-icon { width: 18px; height: 18px; color: var(--text-muted); flex-shrink: 0; }
.search-box input {
  flex: 1; border: none; outline: none;
  padding: 10px 10px;
  font-size: 14px; color: var(--text);
  background: transparent;
  min-width: 0;
}
.search-box input::placeholder { color: var(--text-muted); }
.search-box button {
  display: flex; align-items: center; gap: 6px;
  border: none; border-radius: 8px;
  background: var(--text);
  color: #fff;
  padding: 11px 15px;
  font-size: 13px; font-weight: 600;
  white-space: nowrap;
  transition: background 0.2s, transform 0.15s;
}
.search-box button:hover { background: #0f172a; transform: translateY(-1px); }
.search-box button svg { width: 15px; height: 15px; }

.search-suggest {
  display: flex; align-items: center; flex-wrap: wrap; gap: 7px;
  margin-top: 14px;
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  position: relative; z-index: 1;
}
.search-suggest button {
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.1);
  color: #fff;
  border-radius: 12px;
  padding: 3px 10px;
  font-size: 11px;
  transition: background 0.2s;
}
.search-suggest button:hover { background: rgba(255,255,255,0.25); }

.venue-note {
  display: flex; align-items: flex-start; gap: 7px;
  margin-top: 14px; padding: 9px 11px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 9px;
  font-size: 10.5px; line-height: 1.5;
  color: rgba(255,255,255,0.85);
  position: relative; z-index: 1;
}
.venue-note svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 1px; }

/* 查询结果卡片 */
.result-area { animation: fadeUp 0.4s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.result-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  border: 1px solid var(--border);
}
.result-top {
  background: linear-gradient(135deg, var(--green-light), #f0fdf4);
  padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid #d1fae5;
}
.result-status {
  display: flex; align-items: center; gap: 7px;
  color: #047857; font-weight: 700; font-size: 13px;
}
.result-status svg { width: 17px; height: 17px; }
.result-time { font-size: 11px; color: #059669; }

.result-main {
  padding: 24px 22px 20px;
  text-align: center;
  border-bottom: 1px dashed var(--border-dark);
}
.result-label { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.seat-number {
  font-size: 46px; font-weight: 800;
  color: var(--primary);
  letter-spacing: -1px;
  line-height: 1.1;
}
.seat-area-tag {
  display: inline-block;
  margin-top: 10px;
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 5px 14px;
  border-radius: 16px;
  font-size: 12px; font-weight: 600;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
}
.result-item { background: var(--card); padding: 13px 20px; }
.result-item .r-label { font-size: 11px; color: var(--text-muted); margin-bottom: 2px; }
.result-item .r-value { font-size: 14px; font-weight: 600; color: var(--text); }

.schedule-box {
  padding: 15px 20px;
  background: #fafbff;
  border-top: 1px solid var(--border);
}
.schedule-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; color: var(--text-sub);
  margin-bottom: 9px;
}
.schedule-title svg { width: 15px; height: 15px; color: var(--primary); }
.schedule-list { display: flex; flex-direction: column; gap: 7px; }
.schedule-row {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; color: var(--text-sub);
}
.schedule-time {
  background: #fff; border: 1px solid var(--border);
  border-radius: 5px; padding: 2px 7px;
  font-size: 11px; font-weight: 600; color: var(--primary);
  white-space: nowrap;
}
.result-footer {
  padding: 11px 20px;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 11.5px;
  display: flex; align-items: center; gap: 7px;
}
.result-footer svg { width: 14px; height: 14px; }

/* 空状态 */
.empty-state {
  background: var(--card);
  border: 1px dashed var(--border-dark);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
}
.empty-illustration svg { width: 92px; height: 92px; margin: 0 auto 10px; }
.empty-state h3 { font-size: 15px; color: var(--text-sub); margin-bottom: 7px; }
.empty-state p { font-size: 12px; color: var(--text-muted); line-height: 1.8; }

/* ============ 会场平面图 ============ */
.map-panel {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 96px;
}

.panel-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}
.panel-title-wrap h2 { font-size: 16px; font-weight: 700; }
.panel-subtitle { font-size: 11px; color: var(--text-muted); margin-left: 10px; }

.map-controls { display: flex; align-items: center; gap: 6px; }
.map-controls button {
  width: 32px; height: 32px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-sub);
  transition: all 0.2s;
}
.map-controls button:hover { background: var(--primary-light); color: var(--primary); border-color: #c7d2fe; }
.map-controls button svg { width: 16px; height: 16px; }
.zoom-level {
  font-size: 11px; font-weight: 600; color: var(--text-muted);
  min-width: 42px; text-align: center;
}

.floor-tabs {
  display: flex; gap: 7px;
  padding: 11px 22px;
  border-bottom: 1px solid var(--border);
  background: #fcfdff;
}
.floor-tab {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-sub);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 11.5px; font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.floor-tab:hover { border-color: #5eead4; color: #0f766e; }
.floor-tab.active {
  background: #0d9488; color: #fff;
  border-color: #0d9488;
  box-shadow: 0 3px 10px rgba(13,148,136,0.25);
}

.map-container {
  position: relative;
  background:
    radial-gradient(circle at 1px 1px, #e2e8f0 1px, transparent 0) 0 0 / 22px 22px,
    #fbfcfe;
  height: clamp(480px, calc(100vh - 260px), 780px);
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}
.map-container.grabbing { cursor: grabbing; }
#venueMap { width: 100%; height: 100%; display: block; }

.map-tooltip {
  position: absolute;
  pointer-events: none;
  background: #1e293b;
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.6;
  z-index: 10;
  box-shadow: var(--shadow-lg);
  white-space: nowrap;
  transform: translate(-50%, -115%);
}
.map-tooltip::after {
  content: '';
  position: absolute;
  left: 50%; bottom: -5px;
  transform: translateX(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #1e293b;
}
.map-tooltip strong { color: #a5b4fc; }

.map-footer {
  padding: 12px 22px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
  background: #fcfdff;
}
.legend { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-sub); }
.legend-swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.legend-swatch.available { background: #ffffff; border: 1px solid #cbd5e1; }
.legend-swatch.occupied { background: #a5b4fc; }
.legend-swatch.target { background: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,0.2); }
.legend-swatch.aisle { background: #eef2f7; }
.legend-swatch.zone-w { background: #f59e0b; }
.legend-swatch.zone-c { background: #8b5cf6; }
.legend-swatch.zone-e { background: #10b981; }
.legend-swatch.removed { background: #fee2e2; border: 1px solid #fca5a5; }
.map-tip { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-muted); }
.map-tip svg { width: 14px; height: 14px; }

/* SVG 座位样式 */
.seat-rect { transition: fill 0.2s, stroke 0.2s; cursor: pointer; }
.seat-rect:hover { stroke: var(--primary); stroke-width: 2; }
.seat-target { animation: seatPulse 1.4s ease-in-out infinite; }
@keyframes seatPulse {
  0%, 100% { filter: drop-shadow(0 0 2px rgba(79,70,229,0.6)); }
  50% { filter: drop-shadow(0 0 11px rgba(79,70,229,1)); }
}
.target-ring { animation: ringPulse 1.6s ease-out infinite; transform-origin: center; }
@keyframes ringPulse {
  0% { r: 11; opacity: 0.9; }
  100% { r: 22; opacity: 0; }
}

/* ============ 管理视图 ============ */
.admin-wrap { max-width: 1500px; margin: 0 auto; padding: 30px 32px 40px; }

.admin-heading {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 20px; margin-bottom: 24px;
}
.admin-heading h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.5px; }
.admin-heading p { font-size: 13px; color: var(--text-muted); margin-top: 5px; }
.sync-badge {
  display: flex; align-items: center; gap: 8px;
  background: var(--green-light); color: #047857;
  padding: 8px 15px; border-radius: 20px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(16,185,129,0.15); animation: syncBlink 2s infinite; }
@keyframes syncBlink { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 22px; }
.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: flex; align-items: center; gap: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-icon svg { width: 23px; height: 23px; }
.stat-icon-blue { background: #eef2ff; color: var(--primary); }
.stat-icon-purple { background: #f3e8ff; color: var(--accent); }
.stat-icon-green { background: var(--green-light); color: var(--green); }
.stat-icon-orange { background: var(--orange-light); color: var(--orange); }
.stat-value { font-size: 26px; font-weight: 800; line-height: 1.1; letter-spacing: -0.5px; }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

.admin-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 16px;
}
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid transparent;
  padding: 10px 16px;
  border-radius: 9px;
  font-size: 13px; font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(79,70,229,0.25); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-outline { background: #fff; color: var(--text-sub); border-color: var(--border-dark); }
.btn-outline:hover { background: var(--primary-light); color: var(--primary); border-color: #c7d2fe; }
.btn-danger-ghost { background: #fff; color: var(--red); border-color: #fecaca; }
.btn-danger-ghost:hover { background: var(--red-light); }
.btn-template { padding: 10px 13px; }

.search-mini {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--border-dark);
  border-radius: 9px; padding: 0 12px;
  height: 40px;
}
.search-mini svg { width: 16px; height: 16px; color: var(--text-muted); }
.search-mini input { border: none; outline: none; font-size: 13px; width: 190px; color: var(--text); }
.search-mini input::placeholder { color: var(--text-muted); }

.table-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.seat-table { width: 100%; border-collapse: collapse; }
.seat-table thead th {
  background: #f8fafc;
  text-align: left;
  padding: 13px 18px;
  font-size: 12px; font-weight: 700;
  color: var(--text-sub);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.seat-table tbody td {
  padding: 13px 18px;
  font-size: 12.5px;
  color: var(--text-sub);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.seat-table tbody tr { transition: background 0.15s; }
.seat-table tbody tr:hover { background: #fafbff; }
.seat-table tbody tr:last-child td { border-bottom: none; }

.cell-name { font-weight: 700; color: var(--text); }
.cell-seat {
  display: inline-block;
  background: var(--primary-light); color: var(--primary-dark);
  padding: 3px 9px; border-radius: 6px; font-weight: 700; font-size: 12px;
}
.cell-area { display: inline-flex; align-items: center; gap: 6px; }
.area-dot { width: 8px; height: 8px; border-radius: 2px; }
.area-西区 { background: #f59e0b; }
.area-中区 { background: #8b5cf6; }
.area-东区 { background: #10b981; }
.cell-schedule { max-width: 220px; overflow: hidden; text-overflow: ellipsis; color: var(--text-muted); font-size: 11.5px; }
.col-actions { text-align: right; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.icon-btn {
  width: 30px; height: 30px;
  border: 1px solid var(--border);
  background: #fff; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: all 0.2s;
}
.icon-btn svg { width: 14px; height: 14px; }
.icon-btn.edit:hover { color: var(--primary); border-color: #c7d2fe; background: var(--primary-light); }
.icon-btn.delete:hover { color: var(--red); border-color: #fecaca; background: var(--red-light); }

.table-empty { padding: 60px 20px; text-align: center; color: var(--text-muted); }
.table-empty svg { width: 48px; height: 48px; margin: 0 auto 12px; opacity: 0.5; }
.table-empty p { font-size: 13px; }
.table-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--text-muted);
}
.pagination { display: flex; gap: 5px; }
.page-btn {
  min-width: 30px; height: 30px;
  border: 1px solid var(--border);
  background: #fff; border-radius: 6px;
  font-size: 12px; color: var(--text-sub);
  padding: 0 8px;
}
.page-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.import-note {
  margin-top: 16px;
  display: flex; align-items: flex-start; gap: 9px;
  background: #eff6ff; border: 1px solid #dbeafe;
  color: #1e40af; padding: 12px 16px;
  border-radius: 10px; font-size: 12px; line-height: 1.7;
}
.import-note svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }

/* ============ 弹窗 ============ */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.5); backdrop-filter: blur(3px); animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  position: relative;
  background: #fff;
  border-radius: 16px;
  width: 100%; max-width: 560px;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.25s ease;
  max-height: 90vh; overflow-y: auto;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: none; } }
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-header h3 { font-size: 17px; font-weight: 700; }
.modal-close {
  width: 30px; height: 30px; border: none; background: #f1f5f9;
  border-radius: 7px; display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
}
.modal-close:hover { background: #e2e8f0; color: var(--text); }
.modal-close svg { width: 16px; height: 16px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 22px 24px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group-full { grid-column: 1 / -1; }
.form-group label { font-size: 12px; font-weight: 600; color: var(--text-sub); }
.form-group label em { color: var(--red); font-style: normal; }
.form-group input, .form-group select {
  border: 1px solid var(--border-dark);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px; color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus, .form-group select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,0.12); }
.form-group input::placeholder { color: var(--text-muted); }
.modal-hint {
  margin: 0 24px 14px;
  padding: 9px 12px;
  background: #f0fdfa;
  border: 1px solid #ccfbf1;
  border-radius: 8px;
  font-size: 11px; line-height: 1.5;
  color: #0f766e;
}
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 10px;
  background: #fafbff;
}

/* ============ 管理端登录 ============ */
.login-card { max-width: 400px; padding: 32px 30px 24px; text-align: center; }
.login-logo {
  width: 52px; height: 52px; margin: 0 auto 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(79,70,229,0.3);
}
.login-logo svg { width: 28px; height: 28px; }
.login-card h3 { font-size: 19px; font-weight: 800; }
.login-sub { font-size: 12px; color: var(--text-muted); margin: 6px 0 20px; }
.login-error {
  background: var(--red-light); color: #b91c1c;
  border: 1px solid #fecaca; border-radius: 8px;
  padding: 9px 12px; font-size: 12px; text-align: left;
  margin-bottom: 14px;
}
.login-form { display: flex; flex-direction: column; gap: 8px; text-align: left; }
.login-form label { font-size: 12px; font-weight: 600; color: var(--text-sub); margin-top: 6px; }
.login-form input {
  border: 1px solid var(--border-dark); border-radius: 8px;
  padding: 11px 12px; font-size: 13px; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.login-form input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,0.12); }
.login-form .btn { margin-top: 12px; width: 100%; }
.login-cancel {
  margin-top: 16px; border: none; background: none;
  color: var(--text-muted); font-size: 12px;
}
.login-cancel:hover { color: var(--text-sub); }

.sync-badge.offline { background: #fff7ed; color: #c2410c; }
.sync-badge.offline .sync-dot { background: #f97316; box-shadow: 0 0 0 3px rgba(249,115,22,0.15); }

/* ============ 二维码生成工具 ============ */
.btn-qr { color: #7c3aed; border-color: #ddd6fe; background: #f5f3ff; }
.btn-qr:hover { background: #ede9fe; border-color: #c4b5fd; }
.btn-qr svg { width: 15px; height: 15px; }

.qr-card { max-width: 620px; padding: 24px 26px; }
.qr-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.qr-tab {
  border: none; background: none; padding: 9px 14px; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--text-muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.qr-tab:hover { color: var(--text-sub); }
.qr-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.qr-desc { font-size: 12px; color: var(--text-muted); line-height: 1.6; margin: 0 0 14px; }
.qr-desc b { color: var(--primary); }
.qr-search-row { display: flex; gap: 8px; }
.qr-search-row input {
  flex: 1; border: 1px solid var(--border-dark); border-radius: 8px;
  padding: 10px 12px; font-size: 13px; outline: none;
}
.qr-search-row input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,0.12); }
.qr-search-row .btn { white-space: nowrap; }

.qr-single-result {
  margin-top: 20px; padding: 20px; border: 1px solid var(--border);
  border-radius: 12px; background: #fafbff; text-align: center;
}
.qr-single-result .qr-canvas { display: inline-flex; padding: 14px; background: #fff; border: 1px solid var(--border); border-radius: 10px; }
.qr-single-result .qr-person { margin-top: 12px; font-size: 14px; font-weight: 700; color: var(--text); }
.qr-single-result .qr-seat { margin-top: 4px; font-size: 12px; color: var(--text-muted); }
.qr-single-result .btn { margin-top: 14px; }

.qr-general-box { display: flex; gap: 22px; align-items: center; justify-content: center; flex-wrap: wrap; }
.qr-canvas { line-height: 0; }
.qr-canvas img, .qr-canvas canvas { display: block; }
.qr-general-meta { flex: 1; min-width: 200px; }
.qr-meta-label { font-size: 12px; font-weight: 600; color: var(--text-sub); margin-bottom: 6px; }
.qr-meta-url {
  font-size: 11px; color: var(--text-muted); word-break: break-all;
  background: #f1f5f9; padding: 8px 10px; border-radius: 6px; margin-bottom: 12px;
  line-height: 1.5;
}

.qr-batch-actions { display: flex; gap: 8px; margin-bottom: 14px; }
.qr-batch-list {
  max-height: 320px; overflow-y: auto; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px;
}
.qr-batch-item {
  border: 1px solid var(--border); border-radius: 10px; padding: 12px;
  text-align: center; background: #fff;
}
.qr-batch-item .qr-canvas { display: inline-flex; padding: 8px; border: 1px solid var(--border); border-radius: 8px; }
.qr-batch-item .qr-b-name { margin-top: 8px; font-size: 12px; font-weight: 700; color: var(--text); }
.qr-batch-item .qr-b-seat { font-size: 10px; color: var(--text-muted); margin-top: 2px; }
.qr-batch-item .qr-b-dl {
  display: inline-block; margin-top: 8px; font-size: 11px; color: var(--primary);
  cursor: pointer; background: none; border: none; text-decoration: underline;
}

.admin-user-bar {
  position: fixed; top: 14px; right: 20px; z-index: 60;
  display: flex; align-items: center; gap: 10px;
  background: #1e293b; color: #fff;
  padding: 7px 9px 7px 14px; border-radius: 20px;
  font-size: 12px; box-shadow: var(--shadow-md);
}
.admin-user-bar button {
  border: none; background: rgba(255,255,255,0.15);
  color: #fff; border-radius: 14px;
  padding: 4px 11px; font-size: 11px; cursor: pointer;
}
.admin-user-bar button:hover { background: rgba(255,255,255,0.25); }

.syncing { opacity: 0.6; pointer-events: none; }

/* ============ Toast ============ */
.toast {
  position: fixed;
  bottom: 30px; left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  display: flex; align-items: center; gap: 9px;
  font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  animation: toastIn 0.3s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 14px); } to { opacity: 1; transform: translate(-50%, 0); } }
.toast svg { width: 18px; height: 18px; color: #34d399; }

/* ============ 响应式 ============ */
@media (max-width: 1200px) {
  .lookup-layout { grid-template-columns: 380px 1fr; padding: 20px; gap: 18px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .topbar { padding: 0 16px; gap: 16px; height: auto; min-height: 68px; flex-wrap: wrap; padding: 12px 16px; }
  .nav-tabs { order: 3; width: 100%; }
  .nav-tab { flex: 1; justify-content: center; }
  .topbar-right { margin-left: auto; }
  .lookup-layout { grid-template-columns: 1fr; }
  .map-panel { position: static; }
  .map-container { height: 460px; }
  .panel-subtitle { display: block; margin: 3px 0 0; width: 100%; }
}

@media (max-width: 600px) {
  .brand-sub { display: none; }
  .event-badge { font-size: 11px; padding: 6px 10px; }
  .lookup-layout { padding: 14px; }
  .hero-card { padding: 24px 18px; }
  .hero-title { font-size: 23px; }
  .admin-wrap { padding: 20px 14px 30px; }
  .admin-heading { flex-direction: column; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 15px; gap: 10px; }
  .stat-icon { width: 40px; height: 40px; }
  .stat-value { font-size: 20px; }
  .toolbar-left, .toolbar-right { width: 100%; }
  .search-mini input { width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .seat-table thead th, .seat-table tbody td { padding: 10px 12px; }
  .table-card { overflow-x: auto; }
  .seat-table { min-width: 760px; }
}
