/* =====================================================
   沃访客 - 后台主题样式 v2.0
   设计语言：现代简约 · 高端克制
   深色侧边栏 + 留白主区 + 单主色系 + 细腻动效
   ===================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #4f6ef7;
  --primary-dark: #3b52d4;
  --primary-soft: #eef1fe;
  --navy-900: #0c1428;
  --navy-800: #121d38;
  --navy-700: #1a2849;
  --gold: #d4af6a;
  --gold-light: #ecd9a8;
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #1a2233;
  --text-light: #6b7a90;
  --text-faint: #9aa8bb;
  --border: #e6eaf2;
  --green: #17a673;
  --red: #e5484d;
  --amber: #d99a1b;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-md: 0 6px 18px rgba(16, 24, 40, .07), 0 2px 6px rgba(16, 24, 40, .04);
  --shadow-lg: 0 18px 44px rgba(16, 24, 40, .13), 0 6px 12px rgba(16, 24, 40, .06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
}

html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

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

::selection { background: rgba(79, 110, 247, .18); }

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #d3dae6; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #b9c3d4; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 后台布局 ---------- */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 236px; flex-shrink: 0;
  background: linear-gradient(180deg, var(--navy-900) 0%, var(--navy-800) 60%, var(--navy-700) 130%);
  color: #a7b6cc;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  box-shadow: 1px 0 24px rgba(12, 20, 40, .18);
  z-index: 20;
}
.brand {
  padding: 22px 22px 18px;
  font-size: 17px; font-weight: 700; letter-spacing: 1px; color: #fff;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  position: relative;
}
.brand::before {
  content: ''; width: 10px; height: 10px; border-radius: 3px;
  background: linear-gradient(135deg, var(--primary), var(--gold));
  box-shadow: 0 0 12px rgba(79, 110, 247, .55);
}
.brand::after {
  content: ''; position: absolute; left: 22px; bottom: -1px;
  width: 38px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), transparent);
}
.brand-ver { font-size: 10px; color: #66788f; font-weight: 500; letter-spacing: 0; margin-left: auto; }

.nav { padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 13px; border-radius: 9px;
  color: #9fb0c6; text-decoration: none; font-size: 13.5px; font-weight: 500;
  transition: background .16s, color .16s, transform .16s;
  position: relative;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(79,110,247,.22), rgba(79,110,247,.08));
  color: #fff; font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(79,110,247,.35);
}
.nav-item.active::before {
  content: ''; position: absolute; left: -12px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; border-radius: 3px;
  background: linear-gradient(180deg, var(--primary), var(--gold));
}
.nav-icon { width: 20px; text-align: center; font-size: 15px; opacity: .92; }

.sidebar-foot { padding: 12px; border-top: 1px solid rgba(255,255,255,.07); }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  padding: 14px 30px;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10;
}
.page-title { font-size: 19px; font-weight: 700; letter-spacing: .2px; }
.page-title::before { content: ''; display: inline-block; width: 4px; height: 18px; border-radius: 4px; background: var(--primary); margin-right: 10px; vertical-align: -3px; }
.user-box { display: flex; align-items: center; gap: 14px; }
.user-name { color: var(--text-light); font-size: 13px; }

.content { padding: 26px 30px; flex: 1; animation: fadeUp .28s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.footer {
  padding: 12px 30px; color: var(--text-faint); font-size: 12px;
  border-top: 1px solid var(--border); background: var(--card);
  display: flex; justify-content: space-between; align-items: center;
}

/* ---------- 卡片 ---------- */
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 24px; margin-bottom: 22px;
  border: 1px solid var(--border);
  transition: box-shadow .2s;
}
.card:hover { box-shadow: var(--shadow-md); }
.card-title {
  font-size: 15px; font-weight: 700; letter-spacing: .2px; margin-bottom: 18px;
  display: flex; align-items: center; gap: 9px;
  padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.card-title::before {
  content: ''; width: 4px; height: 16px; border-radius: 3px;
  background: linear-gradient(180deg, var(--primary), var(--gold));
}

/* ---------- 统计卡片 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; margin-bottom: 22px; }
.stat-card {
  border-radius: var(--radius); padding: 22px 24px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff; position: relative; overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform .22s, box-shadow .22s;
}
.stat-card::before {
  content: ''; position: absolute; right: -30px; top: -30px;
  width: 130px; height: 130px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.18), transparent 70%);
}
.stat-card::after {
  content: ''; position: absolute; right: 22px; bottom: 16px;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.16);
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.stat-card.green { background: linear-gradient(135deg, #18b385 0%, #0f9a6e 100%); }
.stat-card.amber { background: linear-gradient(135deg, #e0a52e 0%, #cc8a12 100%); }
.stat-card.red   { background: linear-gradient(135deg, #ee5a50 0%, #d63a30 100%); }
.stat-label { font-size: 12.5px; opacity: .9; letter-spacing: .4px; font-weight: 500; }
.stat-value { font-size: 32px; font-weight: 800; margin-top: 8px; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.stat-sub { font-size: 12px; opacity: .8; margin-top: 8px; }
.stat-sub a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- 徽章 ---------- */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .2px;
  border: 1px solid transparent;
}
.badge-green { background: #e5f7ef; color: #0e8a60; border-color: #bfe9d7; }
.badge-gray  { background: #f2f5f9; color: #5f6f85; border-color: #e1e7ef; }
.badge-red   { background: #fdeceb; color: #cf3833; border-color: #f6c8c5; }
.badge-amber { background: #fdf5e3; color: #b47d0e; border-color: #f1dfb4; }
.badge-blue  { background: #e9edfe; color: #3b52d4; border-color: #c9d3fb; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block; padding: 9px 20px; border-radius: 9px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff; border: none; cursor: pointer;
  font-size: 13.5px; font-weight: 600; text-decoration: none; letter-spacing: .3px;
  transition: transform .15s, box-shadow .15s, filter .15s;
  box-shadow: 0 3px 10px rgba(79, 110, 247, .25);
}
.btn:hover { filter: brightness(1.05); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(79, 110, 247, .32); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 7px; box-shadow: none; }
.btn-outline {
  background: transparent; color: var(--primary);
  border: 1px solid var(--primary); box-shadow: none;
}
.btn-outline:hover { background: var(--primary-soft); filter: none; box-shadow: none; }
.btn-danger { background: linear-gradient(135deg, #ee5a50 0%, #d63a30 100%); box-shadow: 0 3px 10px rgba(214, 58, 48, .22); }
.btn-danger:hover { box-shadow: 0 6px 18px rgba(214, 58, 48, .3); }
.btn-gray { background: linear-gradient(135deg, #6b7a90 0%, #55637a 100%); box-shadow: 0 3px 10px rgba(85, 99, 122, .2); }
.btn-gray:hover { box-shadow: 0 6px 18px rgba(85, 99, 122, .28); }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* ---------- 表单 ---------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.form-group { display: flex; flex-direction: column; gap: 7px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-size: 12.5px; color: var(--text-light); font-weight: 600; letter-spacing: .2px; }
.form-group label .req { color: var(--red); }
.form-control {
  padding: 10px 14px; border: 1px solid var(--border); border-radius: 9px;
  font-size: 13.5px; background: #fff; color: var(--text); width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
.form-control:hover { border-color: #cdd6e4; }
.form-control:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 110, 247, .12);
}
textarea.form-control { resize: vertical; min-height: 70px; }
.form-actions { margin-top: 22px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.form-hint { font-size: 12px; color: var(--text-faint); }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
table.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
  padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border);
  white-space: nowrap; font-size: 13px;
}
.table th {
  font-size: 11.5px; color: var(--text-light); font-weight: 700; letter-spacing: .6px;
  background: #f8fafc; text-transform: uppercase;
}
.table tbody tr { transition: background .12s; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: #f6f8ff; }
.table .actions { display: flex; gap: 6px; align-items: center; }

/* ---------- 筛选栏 ---------- */
.filter-bar {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px 16px; align-items: end;
  background: var(--card); padding: 18px 22px; border-radius: var(--radius);
  box-shadow: var(--shadow-sm); margin-bottom: 22px;
  border: 1px solid var(--border);
}
.filter-bar .form-group { min-width: 0; }
.filter-bar .form-group.grow { grid-column: span 2; }
.filter-bar .filter-actions {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}
.filter-bar .filter-actions .btn { white-space: nowrap; }

/* ---------- 分页 ---------- */
.pagination { display: flex; gap: 6px; align-items: center; margin-top: 18px; justify-content: flex-end; flex-wrap: wrap; }
.pagination a, .pagination span {
  padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border);
  text-decoration: none; color: var(--text); background: #fff; font-size: 13px;
  transition: all .15s;
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.pagination .current { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; border-color: transparent; }

/* ---------- 提示 ---------- */
.alert {
  padding: 12px 18px; border-radius: 10px; margin-bottom: 18px; font-size: 13.5px;
  border: 1px solid transparent; display: flex; align-items: center; gap: 8px;
}
.alert-success { background: #e7f7f0; color: #0d7d57; border-color: #c2e9da; }
.alert-error   { background: #fdeceb; color: #c2332e; border-color: #f6c8c5; }
.alert-warning { background: #fdf5e3; color: #a5740d; border-color: #f1dfb4; }

/* ---------- 空状态 ---------- */
.empty {
  text-align: center; padding: 56px 20px; color: var(--text-faint); font-size: 14px;
}
.empty::before {
  content: '◌'; display: block; font-size: 40px; color: #cbd5e1; margin-bottom: 10px;
}

/* ---------- 登录页 ---------- */
.login-body {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 15% 20%, rgba(79, 110, 247, .2), transparent 48%),
    radial-gradient(circle at 85% 80%, rgba(212, 175, 106, .14), transparent 46%),
    linear-gradient(135deg, var(--navy-900) 0%, var(--navy-800) 48%, var(--navy-700) 100%);
  padding: 20px;
}
.login-card {
  width: 402px; background: rgba(255,255,255,.97);
  border-radius: 16px; box-shadow: 0 30px 80px rgba(4, 12, 26, .45);
  padding: 44px 40px;
  border: 1px solid rgba(255,255,255,.5);
  position: relative; overflow: hidden;
  backdrop-filter: blur(8px);
}
.login-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--gold));
}
.login-title { font-size: 21px; font-weight: 800; text-align: center; margin-bottom: 6px; letter-spacing: 1px; }
.login-sub { text-align: center; color: var(--text-light); font-size: 12.5px; margin-bottom: 30px; }
.login-err {
  background: #fdeceb; color: #c2332e; padding: 11px 14px; border-radius: 9px;
  font-size: 13px; margin-bottom: 18px; text-align: center; border: 1px solid #f6c8c5;
}

/* ---------- 门户首页 ---------- */
.portal { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.portal-top {
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  color: var(--text); padding: 0 32px;
  display: flex; justify-content: space-between; align-items: center; height: 62px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
}
.portal-brand { font-size: 17px; font-weight: 800; letter-spacing: .5px; display: flex; align-items: center; gap: 10px; color: var(--navy-900); }
.portal-brand .brand-dot {
  width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--gold));
  box-shadow: 0 0 10px rgba(79, 110, 247, .5);
}
.portal-brand .brand-ver { color: var(--text-faint); }
.portal-nav { display: flex; gap: 4px; }
.portal-nav a {
  color: var(--text-light); text-decoration: none; padding: 8px 16px; border-radius: 9px; font-size: 13.5px;
  transition: all .15s;
}
.portal-nav a:hover { background: var(--primary-soft); color: var(--primary); }
.portal-nav a.active { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; }
.portal-main { flex: 1; max-width: 900px; margin: 0 auto; padding: 40px 20px; width: 100%; }
.portal-foot { text-align: center; color: var(--text-faint); font-size: 12px; padding: 18px; }

/* ---------- 门户 hero ---------- */
.hero {
  text-align: center; padding: 44px 20px 48px; margin-bottom: 8px;
  position: relative;
}
.hero::after {
  content: ''; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 60px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--primary), var(--gold));
}
.hero-title {
  font-size: 38px; font-weight: 800; letter-spacing: 2px;
  background: linear-gradient(135deg, var(--navy-800) 0%, var(--primary) 55%, var(--gold) 130%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  line-height: 1.2;
}
.hero-sub {
  margin-top: 14px; font-size: 14.5px; color: var(--text-light); letter-spacing: 1px;
}

/* ---------- 门户入口卡片 ---------- */
.entry-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.entry-card {
  background: var(--card); border-radius: 14px; box-shadow: var(--shadow-sm);
  padding: 30px 26px; text-decoration: none; color: var(--text);
  display: flex; flex-direction: column; gap: 10px;
  transition: transform .2s, box-shadow .2s;
  border: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.entry-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--gold));
  opacity: 0; transition: opacity .2s;
}
.entry-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.entry-card:hover::before { opacity: 1; }
.entry-card.gate::before { background: linear-gradient(90deg, var(--amber), #f3c14e); }
.entry-card.employee::before { background: linear-gradient(90deg, var(--green), #2ec99a); }
.entry-card.admin::before { background: linear-gradient(90deg, var(--red), #f0726a); }
.entry-icon { font-size: 36px; line-height: 1; }
.entry-title { font-size: 17px; font-weight: 700; }
.entry-desc { font-size: 13px; color: var(--text-light); line-height: 1.6; }

/* ---------- 核销/凭证 ---------- */
.code-box {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  padding: 30px; text-align: center;
}
.code-digits {
  font-size: 44px; font-weight: 800; letter-spacing: 10px;
  color: var(--navy-800); font-variant-numeric: tabular-nums;
  font-family: "SF Mono", Menlo, Consolas, monospace;
}
.code-qr { background: #fff; padding: 14px; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-sm); }
.code-qr svg, .code-qr img { display: block; }
.ticket-info { width: 100%; max-width: 460px; margin: 0 auto; }
.ticket-info .row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--border); gap: 16px; }
.ticket-info .row .k { color: var(--text-light); flex-shrink: 0; }
.ticket-info .row .v { font-weight: 600; text-align: right; }

/* ---------- 统计图表 ---------- */
.chart-bar { display: flex; align-items: flex-end; gap: 8px; height: 170px; padding-top: 12px; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.chart-bar-inner {
  width: 100%; max-width: 44px;
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 7px 7px 0 0; min-height: 2px; transition: height .3s;
  box-shadow: 0 2px 8px rgba(79, 110, 247, .28);
}
.chart-bar-inner.zero { background: var(--border); box-shadow: none; }
.chart-x { font-size: 11px; color: var(--text-light); white-space: nowrap; }
.chart-num { font-size: 11px; color: var(--text-light); font-weight: 600; }

/* ---------- 数据大屏（dashboard） ---------- */
.dash-wrap {
  background:
    radial-gradient(circle at 15% 12%, rgba(79, 110, 247, .16), transparent 42%),
    radial-gradient(circle at 88% 88%, rgba(212, 175, 106, .1), transparent 40%),
    linear-gradient(180deg, #0a1122 0%, #0d1730 55%, #101d3a 100%);
  margin: -26px -30px -26px; padding: 30px 30px 34px;
  min-height: calc(100vh - 70px); color: #dde6f3;
}
.dash-title { font-size: 24px; font-weight: 800; letter-spacing: 2px; text-align: center; }
.dash-time { text-align: center; color: #6c7f9c; font-size: 12.5px; margin: 8px 0 26px; letter-spacing: 1px; }
.dash-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-bottom: 20px; }
.dash-stat {
  background: linear-gradient(135deg, #4f6ef7, #3b52d4); border-radius: 12px; padding: 18px;
  text-align: center; box-shadow: 0 6px 20px rgba(0,0,0,.28);
  border: 1px solid rgba(255,255,255,.08);
  transition: transform .2s;
}
.dash-stat:hover { transform: translateY(-3px); }
.dash-stat.green { background: linear-gradient(135deg, #18b385, #0f9a6e); }
.dash-stat.amber { background: linear-gradient(135deg, #e0a52e, #cc8a12); }
.dash-stat.blue { background: linear-gradient(135deg, #4f8df6, #2d5ce0); }
.dash-stat.cyan { background: linear-gradient(135deg, #0bb6d4, #0789ab); }
.dash-stat.gray { background: linear-gradient(135deg, #5c6d86, #46546a); }
.ds-v { font-size: 32px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.ds-l { font-size: 12px; opacity: .85; margin-top: 4px; letter-spacing: 1px; }
.dash-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; margin-bottom: 14px; }
.dash-panel {
  background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px; padding: 18px; backdrop-filter: blur(6px);
}
.dash-panel.wide { grid-column: span 1; }
.dash-panel-title { font-size: 13.5px; font-weight: 700; color: #b8c7dd; margin-bottom: 16px; letter-spacing: 1px; display: flex; align-items: center; gap: 8px; }
.dash-panel-title::before { content: ''; width: 3px; height: 14px; border-radius: 3px; background: linear-gradient(180deg, #4f6ef7, #d4af6a); }
.dash-bars { display: flex; align-items: flex-end; gap: 8px; height: 240px; }
.dash-bars.small { height: 160px; }
.dash-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; }
.dash-bar {
  width: 100%; max-width: 40px;
  background: linear-gradient(180deg, #5f7df8, #3b52d4);
  border-radius: 6px 6px 0 0; min-height: 3px;
  box-shadow: 0 0 16px rgba(79, 110, 247, .4);
  transition: filter .2s;
}
.dash-bar:hover { filter: brightness(1.2); }
.dash-bar-num { font-size: 11px; color: #8ba0bd; }
.dash-bar-x { font-size: 10px; color: #5f7190; }
.dash-rank-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 13px; }
.dr-rank {
  width: 22px; height: 22px; border-radius: 50%; text-align: center; line-height: 22px;
  font-size: 11px; font-weight: 700; flex-shrink: 0;
  background: rgba(79, 110, 247, .25); color: #a9b9d4; border: 1px solid rgba(79,110,247,.4);
}
.dr-name { width: 80px; flex-shrink: 0; color: #b8c7dd; }
.dr-bar { flex: 1; height: 8px; background: rgba(255,255,255,.08); border-radius: 4px; overflow: hidden; }
.dr-bar span { display: block; height: 100%; background: linear-gradient(90deg, #4f6ef7, #18b385); border-radius: 4px; }
.dr-num { width: 36px; text-align: right; font-weight: 700; flex-shrink: 0; color: #dde6f3; }
.dash-table th { background: rgba(255,255,255,.05); color: #8ba0bd; border-color: rgba(255,255,255,.08); }
.dash-table td { color: #c7d4e6; border-color: rgba(255,255,255,.08); }
.dash-table tbody tr:hover td { background: rgba(255,255,255,.045); }

/* ---------- 打印 ---------- */
@media print {
  body * { visibility: hidden; }
  #ticket-card, #ticket-card * { visibility: visible; }
  #ticket-card {
    position: absolute; left: 0; top: 0; width: 100%;
    box-shadow: none; border: 2px solid #000; border-radius: 0;
    padding: 24px;
  }
  .no-print { display: none !important; }
  .code-digits { font-size: 40px; letter-spacing: 10px; }
  .code-qr svg { width: 160px; height: 160px; }
  .ticket-info .row { font-size: 13px; }
  .portal-top, .portal-nav, .portal-foot { display: none !important; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .dash-stats { grid-template-columns: repeat(3, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .sidebar { width: 68px; }
  .brand { font-size: 0; justify-content: center; padding: 20px 12px; gap: 0; }
  .brand::before { display: none; }
  .brand::after { left: 50%; transform: translateX(-50%); }
  .brand-ver { display: none; }
  .nav-item { justify-content: center; font-size: 0; padding: 12px; }
  .nav-icon { font-size: 17px; }
  .content { padding: 18px; }
  .dash-wrap { margin: -18px; padding: 22px 18px; }
}
@media (max-width: 640px) {
  .content { padding: 14px; }
  .form-grid { grid-template-columns: 1fr; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-bar .form-group { min-width: 100%; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stat-value { font-size: 25px; }
  .stat-card { padding: 16px 18px; }
  .topbar { padding: 12px 16px; flex-wrap: wrap; gap: 8px; }
  .page-title { font-size: 16px; }
  .table { font-size: 12px; }
  .table th, .table td { padding: 9px; }
  .code-digits { font-size: 32px; letter-spacing: 6px; }
  .btn { padding: 10px 14px; }
  .login-card { width: 92%; padding: 30px 22px; }
  .portal-top { flex-direction: column; height: auto; padding: 12px 16px; gap: 10px; }
  .portal-nav { flex-wrap: wrap; justify-content: center; }
  .portal-main { padding: 20px 14px; }
  .entry-grid { grid-template-columns: 1fr; }
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
  .dash-title { font-size: 19px; }
  .kiosk-title { font-size: 22px; }
}

/* ---------- 微信小程序 web-view 环境适配 ---------- */
.in-weapp .footer { display: none; }
.in-weapp .sidebar-foot { display: none; }
.in-weapp .login-card .form-hint { display: none; }

/* ---------- 通知角标 ---------- */
.notify-bell { position: relative; font-size: 17px; text-decoration: none; margin-right: 4px; opacity: .85; transition: opacity .15s; }
.notify-bell:hover { opacity: 1; }
.notify-badge {
  position: absolute; top: -6px; right: -8px;
  background: var(--red); color: #fff; font-size: 10px; font-weight: 700;
  min-width: 16px; height: 16px; line-height: 16px; text-align: center;
  border-radius: 8px; padding: 0 4px;
}
