:root {
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-2: #edf2f7;
  --bg: #f4f6fa;
  --card: #ffffff;
  --brand: #0f766e;
  --brand-2: #0d9488;
  --brand-dark: #115e59;
  --navy: #0b1220;
  --navy-2: #121c31;
  --gold: #f5b942;
  --green: #16a34a;
  --green-bg: #dcfce7;
  --red: #dc2626;
  --red-bg: #fee2e2;
  --blue: #2563eb;
  --blue-bg: #dbeafe;
  --purple: #7c3aed;
  --purple-bg: #ede9fe;
  --orange: #d97706;
  --orange-bg: #fef3c7;
  --gray-bg: #f1f5f9;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 12px 40px rgba(15, 23, 42, .08);
  --shadow-lg: 0 30px 80px rgba(2, 6, 23, .28);
  --radius: 16px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei",
          "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  font-size: 14px;
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
button, input, select, textarea { font: inherit; }
h1, h2, h3, p { margin: 0; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--gray-bg);
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 12px;
}

/* ---------------------------------------------------------------- */
/* 通用控件                                                          */
/* ---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 9px 16px;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .1s ease, color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  color: #fff;
  box-shadow: 0 8px 20px rgba(15, 118, 110, .22);
}
.btn-primary:hover { background: linear-gradient(135deg, #0f9e8f, var(--brand-dark)); color: #fff; }
.btn-ghost {
  background: #fff;
  border-color: var(--line);
  color: var(--ink-2);
}
.btn-ghost:hover { border-color: #cbd5e1; background: #f8fafc; color: var(--ink); }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 30px; font-size: 16px; border-radius: 12px; }
.btn-sm { padding: 7px 12px; font-size: 12px; }
.btn-xs { padding: 4px 8px; font-size: 11px; border-radius: 7px; }
.danger-text { color: var(--red) !important; }
.success-text { color: var(--green) !important; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.small { font-size: 12px; }
.strong { font-weight: 700; }
.right { text-align: right; }
.pre { white-space: pre-wrap; }

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
  vertical-align: middle;
  white-space: nowrap;
}
.badge-lg { font-size: 12px; padding: 4px 12px; }
.badge-gray { background: var(--gray-bg); color: #475569; }
.badge-green { background: var(--green-bg); color: #15803d; }
.badge-red { background: var(--red-bg); color: #b91c1c; }
.badge-blue { background: var(--blue-bg); color: #1d4ed8; }
.badge-purple { background: var(--purple-bg); color: #6d28d9; }
.badge-orange { background: var(--orange-bg); color: #b45309; }

.alert {
  border-radius: 12px;
  padding: 13px 16px;
  margin-bottom: 18px;
  border: 1px solid transparent;
  font-size: 13px;
}
.alert-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.alert-danger { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert a { text-decoration: underline; font-weight: 700; }

.empty {
  padding: 44px 16px;
  text-align: center;
  color: var(--muted);
}
.empty a { font-weight: 700; }

/* ---------------------------------------------------------------- */
/* Flash / Toast                                                     */
/* ---------------------------------------------------------------- */
.flash-stack {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(92vw, 560px);
}
.flash {
  border-radius: 12px;
  padding: 12px 16px;
  background: #fff;
  box-shadow: 0 14px 40px rgba(15, 23, 42, .18);
  border-left: 4px solid var(--blue);
  font-size: 13px;
}
.flash-error { border-left-color: var(--red); }
.flash-success { border-left-color: var(--green); }
.toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(90vw, 360px);
}
.toast {
  background: #0f172a;
  color: #f8fafc;
  border-radius: 12px;
  padding: 12px 15px;
  box-shadow: 0 16px 40px rgba(2, 6, 23, .3);
  font-size: 13px;
  animation: toastIn .18s ease-out;
}
.toast-error { background: #7f1d1d; }
.toast-success { background: #14532d; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- */
/* 前台                                                              */
/* ---------------------------------------------------------------- */
.public-body {
  background:
    radial-gradient(900px 500px at 15% -5%, rgba(45, 212, 191, .28), transparent 60%),
    radial-gradient(800px 500px at 95% 10%, rgba(56, 189, 248, .18), transparent 55%),
    linear-gradient(180deg, #071019 0%, #0b1a26 45%, #071019 100%);
  min-height: 100vh;
  color: #e2e8f0;
}
.public-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 22px;
}
.public-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 2px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #f8fafc;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: .3px;
}
.brand:hover { color: #fff; }
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  background: linear-gradient(145deg, rgba(45, 212, 191, .28), rgba(15, 118, 110, .12));
  border: 1px solid rgba(94, 234, 212, .28);
}
.header-note {
  color: #94a3b8;
  font-size: 12px;
  letter-spacing: .6px;
}
.header-link { color: #94a3b8; }
.header-link:hover { color: #5eead4; }

.public-main {
  flex: 1;
  padding: 22px 0 40px;
  width: 100%;
}
.public-main.narrow { max-width: 760px; margin: 0 auto; }

.hero {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: 54px 46px 40px;
  background:
    linear-gradient(150deg, rgba(13, 148, 136, .22), rgba(15, 23, 42, .72) 55%),
    #0f172a;
  border: 1px solid rgba(94, 234, 212, .16);
  box-shadow: var(--shadow-lg);
}
.hero-glow {
  position: absolute;
  width: 520px;
  height: 520px;
  right: -180px;
  top: -260px;
  background: radial-gradient(circle, rgba(45, 212, 191, .28), transparent 65%);
  pointer-events: none;
}
.eyebrow {
  color: #5eead4;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 3px;
  margin-bottom: 12px;
}
.hero h1 {
  font-size: clamp(32px, 5vw, 50px);
  line-height: 1.15;
  letter-spacing: -.5px;
  color: #fff;
}
.hero-sub {
  color: #b6c2d1;
  margin-top: 12px;
  font-size: 15px;
  max-width: 560px;
}
.card-search {
  display: flex;
  gap: 10px;
  margin-top: 30px;
  padding: 6px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  backdrop-filter: blur(6px);
}
.card-search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  border-radius: 11px;
  background: rgba(255, 255, 255, .96);
  padding: 14px 18px;
  font-size: 16px;
  letter-spacing: .8px;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-transform: uppercase;
}
.card-search input::placeholder {
  color: #94a3b8;
  font-family: var(--font);
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
}
.card-search .btn { flex: none; }
.hero-tip { color: #8194a9; font-size: 12px; margin-top: 14px; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 18px;
}
.step-card {
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 18px;
  padding: 22px;
}
.step-no {
  display: inline-block;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: #5eead4;
  margin-bottom: 10px;
  letter-spacing: 2px;
}
.step-card h3 { color: #f1f5f9; font-size: 15px; margin-bottom: 5px; }
.step-card p { color: #94a3b8; font-size: 12.5px; }

.public-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 2px 30px;
  color: #64748b;
  font-size: 11.5px;
  border-top: 1px solid rgba(255, 255, 255, .07);
}

/* 卡密详情 */
.ticket-panel {
  background: #fff;
  color: var(--ink);
  border-radius: 24px;
  padding: 30px 34px;
  box-shadow: var(--shadow-lg);
  border-top: 4px solid var(--brand-2);
}
.ticket-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding-bottom: 20px;
  border-bottom: 1px dashed var(--line);
}
.ticket-kicker {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 2.4px;
  font-weight: 700;
  margin-bottom: 4px;
}
.ticket-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(20px, 3.4vw, 30px);
  letter-spacing: 1px;
  color: var(--ink);
  word-break: break-all;
}
.ticket-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 20px 0;
}
.meta-item { min-width: 0; }
.meta-label {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
  margin-bottom: 3px;
}
.meta-item strong { font-size: 14px; color: var(--ink); }

.state-panel {
  text-align: center;
  padding: 36px 20px 28px;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fafc, #f1f5f9);
  border: 1px solid var(--line-2);
}
.state-panel h2 { font-size: 20px; margin: 10px 0 6px; }
.state-panel p { color: var(--muted); font-size: 13.5px; }
.state-icon { font-size: 42px; line-height: 1; }
.state-hint { font-size: 12px !important; color: #94a3b8 !important; margin-top: 12px !important; }
.state-panel .btn { margin-top: 18px; }
.date-picker {
  max-width: 280px;
  margin: 18px auto 0;
  text-align: left;
}
.date-picker .field > span { font-size: 12px; }
.date-picker input[type="date"] { background: #fff; }
.ticket-actions {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}
.progress-text { font-weight: 600; color: var(--ink-2) !important; }
.spinner {
  width: 42px;
  height: 42px;
  margin: 0 auto;
  border-radius: 50%;
  border: 3px solid #ccfbf1;
  border-top-color: var(--brand-2);
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.success-panel {
  background: linear-gradient(180deg, #f0fdf4, #ecfdf5);
  border-color: #bbf7d0;
}
.success-panel h2 { color: #166534; }
.success-mark {
  width: 54px;
  height: 54px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 30px;
  line-height: 54px;
  box-shadow: 0 10px 24px rgba(22, 163, 74, .25);
}
.error-panel { background: #fff7f7; border-color: #fecaca; }
.error-panel h2 { color: #991b1b; }

.ticket-gallery {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 22px;
}
.ticket-shot {
  display: block;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #f8fafc;
  box-shadow: var(--shadow);
  position: relative;
}
.ticket-shot img { display: block; width: 100%; height: auto; }
.ticket-shot span {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: rgba(15, 23, 42, .78);
  color: #fff;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
}
.pdf-row {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}
.ticket-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-top: 20px;
  margin-top: 20px;
  border-top: 1px dashed var(--line);
  color: #94a3b8;
  font-size: 11.5px;
}
.back-link {
  display: inline-block;
  margin-top: 18px;
  color: #94a3b8;
  font-size: 13px;
}
.back-link:hover { color: #5eead4; }

/* ---------------------------------------------------------------- */
/* 登录                                                              */
/* ---------------------------------------------------------------- */
.login-body {
  background:
    radial-gradient(800px 500px at 10% 0%, rgba(45, 212, 191, .22), transparent 60%),
    linear-gradient(160deg, #08121c, #0f1f2c 60%, #071019);
  min-height: 100vh;
}
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  width: min(100%, 420px);
  background: #fff;
  border-radius: 22px;
  padding: 32px;
  box-shadow: var(--shadow-lg);
}
.login-brand {
  display: flex;
  gap: 13px;
  align-items: center;
  margin-bottom: 26px;
}
.login-brand .brand-mark {
  background: linear-gradient(145deg, #ccfbf1, #99f6e4);
  border-color: #99f6e4;
  width: 46px;
  height: 46px;
  font-size: 25px;
}
.login-brand h1 { font-size: 20px; letter-spacing: .3px; }
.login-brand p { color: var(--muted); font-size: 12px; }
.login-note {
  margin-top: 20px;
  color: var(--muted);
  font-size: 11.5px;
  background: #f8fafc;
  border-radius: 10px;
  padding: 10px 12px;
}

/* ---------------------------------------------------------------- */
/* 表单                                                              */
/* ---------------------------------------------------------------- */
.stack-form { display: flex; flex-direction: column; gap: 16px; }
.stack-form.compact { gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.field > small { color: var(--muted); font-size: 11.5px; }
.field input, .field select, .field textarea,
.filter-bar input, .filter-bar select {
  width: 100%;
  border: 1px solid #d8e0ea;
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
  background: #fff;
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { resize: vertical; min-height: 90px; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus,
.filter-bar input:focus, .filter-bar select:focus {
  border-color: var(--brand-2);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, .12);
}
.check-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-2);
  cursor: pointer;
}
.check-line input { width: 16px; height: 16px; accent-color: var(--brand-2); }
.form-row { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.form-row .grow { flex: 1; min-width: 220px; }
.form-row.align-end { align-items: flex-end; }
.form-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.filter-bar {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
  padding: 14px 0 6px;
}
.filter-bar input, .filter-bar select {
  width: auto;
  min-width: 150px;
  padding: 8px 10px;
  font-size: 12.5px;
}
.filter-bar input[type="search"] { flex: 1; min-width: 200px; }

/* ---------------------------------------------------------------- */
/* 后台框架                                                          */
/* ---------------------------------------------------------------- */
.admin-body { background: var(--bg); }
.admin-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 238px;
  background: linear-gradient(180deg, var(--navy), #0a1626);
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  z-index: 50;
  border-right: 1px solid rgba(255, 255, 255, .05);
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 8px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.sidebar-brand .brand-mark {
  width: 40px;
  height: 40px;
  font-size: 22px;
}
.sidebar-brand strong { color: #f1f5f9; font-size: 14px; display: block; }
.sidebar-brand small { color: #64748b; font-size: 10.5px; }
.sidebar-nav { display: flex; flex-direction: column; gap: 5px; padding: 18px 0; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
  transition: background .15s ease, color .15s ease;
}
.nav-item:hover { background: rgba(255, 255, 255, .05); color: #e2e8f0; }
.nav-item.active {
  background: linear-gradient(135deg, rgba(13, 148, 136, .32), rgba(15, 118, 110, .18));
  color: #5eead4;
  box-shadow: inset 0 0 0 1px rgba(94, 234, 212, .14);
}
.nav-icon { font-size: 14px; width: 18px; text-align: center; }
.sidebar-foot {
  margin-top: auto;
  padding: 14px 10px;
  border-top: 1px solid rgba(255, 255, 255, .07);
  font-size: 11px;
  color: #64748b;
}
.sidebar-foot small { display: block; color: #475569; font-size: 10px; margin-top: 2px; }
.server-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, .14);
  margin-right: 7px;
}
.admin-main { margin-left: 238px; min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 28px;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-title { font-size: 17px; letter-spacing: .2px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.topbar-user {
  font-size: 12px;
  color: var(--muted);
  padding-right: 4px;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inline-form { display: inline-flex; margin: 0; }
.icon-btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  width: 34px;
  height: 34px;
  cursor: pointer;
  display: none;
}
.admin-content { padding: 24px 28px 50px; width: 100%; max-width: 1500px; }

/* 概览 */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
a.stat-card:hover { transform: translateY(-1px); box-shadow: var(--shadow); color: var(--ink); }
.stat-card.accent { background: linear-gradient(145deg, #0f766e, #115e59); border-color: transparent; color: #fff; }
.stat-card.accent .stat-label, .stat-card.accent .stat-note { color: #99f6e4; }
.stat-label { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.stat-value { font-size: 27px; line-height: 1.2; letter-spacing: -.5px; }
.stat-note { font-size: 10.5px; color: #94a3b8; }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}
.panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.panel-head h2 { font-size: 15px; }
.panel-sub { color: var(--muted); font-size: 11.5px; }
.panel-link { margin-left: auto; font-size: 12px; font-weight: 600; }
.panel-actions { margin-left: auto; display: flex; gap: 7px; flex-wrap: wrap; }
.panel-count { color: var(--muted); font-size: 12px; font-weight: 400; }
.batch-list { display: flex; flex-direction: column; gap: 8px; }
.batch-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  background: #f8fafc;
  border: 1px solid var(--line-2);
  color: var(--ink-2);
  font-size: 12.5px;
}
.batch-item:hover { border-color: #cbd5e1; color: var(--ink); }

/* 筛选 / 表格 */
.filter-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}
.filter-tab {
  padding: 9px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.filter-tab span { color: #94a3b8; font-size: 11px; margin-left: 3px; }
.filter-tab:hover { color: var(--ink); }
.filter-tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.table-wrap { width: 100%; overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.data-table th {
  text-align: left;
  font-size: 11px;
  letter-spacing: .3px;
  color: var(--muted);
  font-weight: 700;
  padding: 10px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  background: #f8fafc;
}
.data-table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: top;
}
.data-table tbody tr:hover { background: #fbfdff; }
.data-table tr:last-child td { border-bottom: none; }
.cell-sub { font-size: 10.5px; color: #94a3b8; margin-top: 2px; line-height: 1.5; }
.wrap-cell { max-width: 260px; word-break: break-word; }
.actions { white-space: nowrap; }
.actions .btn { margin: 1px 0 1px 3px; }
.cards-table td { min-width: 80px; }
.unused-thumb {
  display: inline-block;
  width: 84px;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background: #f8fafc;
}
.unused-thumb img { display: block; width: 100%; height: 56px; object-fit: cover; }
.direct-thumbs { display: flex; gap: 6px; flex-wrap: wrap; }
.direct-thumbs a {
  position: relative;
  display: block;
  width: 74px;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background: #f8fafc;
}
.direct-thumbs img { display: block; width: 100%; height: 50px; object-fit: cover; }
.direct-thumbs span {
  display: block;
  font-size: 9px;
  text-align: center;
  color: var(--muted);
  padding: 1px 0;
}
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 18px 0 4px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}
.pager-btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 6px 12px;
  color: var(--ink-2);
  font-weight: 600;
}
.pager-btn.disabled { color: #cbd5e1; pointer-events: none; }

/* ---------------------------------------------------------------- */
/* 响应式                                                            */
/* ---------------------------------------------------------------- */
@media (max-width: 1280px) {
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1000px) {
  .grid-2 { grid-template-columns: 1fr; }
  .ticket-meta { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--shadow-lg); }
  body.menu-open .sidebar { transform: none; }
  body.menu-open::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, .45);
    z-index: 45;
  }
  .admin-main { margin-left: 0; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .topbar { padding: 12px 16px; }
  .admin-content { padding: 16px 14px 40px; }
  .steps { grid-template-columns: 1fr; }
  .hero { padding: 40px 24px 30px; }
  .public-page { padding: 0 14px; }
  .ticket-panel { padding: 22px 18px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .topbar-actions .btn { padding: 6px 8px; }
}
@media (max-width: 560px) {
  .public-header { padding: 16px 2px; }
  .brand { font-size: 15px; }
  .brand-mark { width: 34px; height: 34px; font-size: 18px; }
  .card-search { flex-direction: column; }
  .card-search .btn { width: 100%; }
  .hero { border-radius: 20px; padding: 32px 18px 24px; }
  .hero-sub { font-size: 13.5px; }
  .ticket-head { flex-direction: column; }
  .ticket-code { font-size: 19px; }
  .ticket-meta { grid-template-columns: 1fr 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .panel { padding: 15px; }
  .topbar-actions a.btn { display: none; }
  .public-footer { flex-direction: column; }
}

/* 客户后台 */
.customer-body { background: #f3f7f6; }
.customer-topbar {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  padding: 12px 26px; background: #0f2f2b; color: #e7fffa;
  position: sticky; top: 0; z-index: 20;
}
.customer-brand { display: flex; align-items: center; gap: 10px; }
.customer-brand strong { display: block; font-size: 16px; }
.customer-brand small { color: #9fd8ce; font-size: 12px; }
.customer-nav { display: flex; gap: 6px; flex: 1; }
.customer-nav .nav-item { color: #bfe9e1; padding: 7px 13px; border-radius: 8px; text-decoration: none; }
.customer-nav .nav-item.active, .customer-nav .nav-item:hover { background: rgba(255,255,255,.11); color: #fff; }
.customer-account { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.customer-account form { margin: 0; }
.customer-balance { background: rgba(255,255,255,.12); padding: 5px 10px; border-radius: 999px; font-family: ui-monospace, Consolas, monospace; }
.customer-main { max-width: 1360px; margin: 0 auto; padding: 24px; }
.customer-hero {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 26px 30px; border-radius: 16px; color: #fff;
  background: linear-gradient(120deg, #0f766e, #0b4f4a 65%, #123b38);
  margin-bottom: 18px;
}
.customer-hero h1 { margin: 2px 0 6px; font-size: 28px; }
.customer-hero .eyebrow { margin: 0; color: #b8efe5; font-size: 12px; letter-spacing: .12em; }
.customer-hero .muted { color: #c8eee7; }
.customer-balance-big { text-align: right; }
.customer-balance-big span { display: block; color: #b8efe5; font-size: 12px; }
.customer-balance-big strong { display: block; font-size: 34px; line-height: 1.15; font-family: ui-monospace, Consolas, monospace; }
.customer-balance-big small { color: #c8eee7; font-size: 12px; }
.customer-stats { margin-bottom: 18px; }
.customer-columns { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .8fr); gap: 18px; align-items: start; }
.inline-form { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.inline-form input, .inline-form select { width: auto; min-width: 80px; }
.mini-field { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.mini-field input { width: 76px; }
.customers-table .actions { min-width: 230px; }
.customers-table .actions form { display: inline-block; margin: 0 2px; }
.customer-cards-table .direct-thumbs img { width: 68px; height: 46px; }
.customer-direct-table .direct-thumbs img { width: 68px; height: 46px; }
@media (max-width: 900px) {
  .customer-columns { grid-template-columns: 1fr; }
  .customer-hero { align-items: flex-start; flex-direction: column; }
  .customer-balance-big { text-align: left; }
  .customer-main { padding: 14px; }
}
