/* ============================================================
   访客管理系统 · 后台样式（Apple 浅色风）
   ============================================================ */
:root {
  --bg:        #f5f5f7;   /* 页面浅灰底 */
  --bg-2:      #fbfbfd;
  --panel:     #ffffff;   /* 卡片白 */
  --panel-2:   #fafafc;
  --line:      #d2d2d7;   /* 主分隔线 */
  --line-soft: #e8e8ed;   /* 次分隔线 */
  --accent:    #0071e3;   /* Apple 蓝 */
  --accent-hover: #0077ED;
  --accent-soft:  #e8f1fd;
  --accent-ring:  rgba(0,113,227,.18);
  --text:      #1d1d1f;   /* 主文字 */
  --text-2:    #6e6e73;   /* 次文字 */
  --text-3:    #86868b;   /* 弱文字 */
  --ok:        #34c759;
  --warn:      #ff9f0a;
  --bad:       #ff3b30;
  --info:      #0071e3;
  --radius:    16px;
  --radius-sm: 11px;
  --radius-pill: 980px;
  --shadow:    0 4px 24px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.04);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
}

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

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
        "PingFang SC", "Helvetica Neue", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  background: #f0f0f3;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 12px;
  color: #42454a;
  word-break: break-all;
}

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

.sidebar {
  width: 232px;
  flex: 0 0 232px;
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-right: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--line-soft);
}
.brand-logo {
  height: 26px;
  width: auto;
  flex: 0 0 auto;
  display: block;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.brand-text b { font-size: 15px; letter-spacing: .3px; color: var(--text); }
.brand-text small { color: var(--text-3); font-size: 11.5px; }

.nav { flex: 1; padding: 14px 12px; display: flex; flex-direction: column; gap: 4px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  border-radius: 10px;
  color: var(--text-2);
  font-size: 14px;
  border: 1px solid transparent;
  transition: background .15s ease, color .15s ease;
}
.nav-item:hover { background: #f0f0f3; color: var(--text); text-decoration: none; }
.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 500;
}
.nav-icon { width: 17px; height: 17px; flex: 0 0 17px; }

.sidebar-foot { padding: 12px; border-top: 1px solid var(--line-soft); }

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 12px;
}
.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e8f1fd, #d8e8fb);
  border: 1px solid var(--line-soft);
  display: grid;
  place-items: center;
  color: var(--accent);
  font-weight: 600;
}
.user-meta { display: flex; flex-direction: column; line-height: 1.3; }
.user-meta b { font-size: 13.5px; color: var(--text); }
.user-meta small { color: var(--text-3); font-size: 11.5px; }

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 26px;
  background: rgba(245,245,247,.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line-soft);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar-title h1 { font-size: 19px; font-weight: 600; letter-spacing: .2px; color: var(--text); }
.topbar-sub { color: var(--text-3); font-size: 12.5px; }
.topbar-actions { display: flex; gap: 10px; align-items: center; }
.topbar-stat { color: var(--accent); font-size: 13px; }

.content { padding: 24px 26px 52px; display: flex; flex-direction: column; gap: 20px; }

/* ---------- KPI ---------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: 16px;
}
.kpi-card {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.kpi-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #4aa3ff 70%, transparent);
  opacity: .85;
}
.kpi-label { color: var(--text-2); font-size: 13px; }
.kpi-value { font-size: 32px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.kpi-value.ok { color: var(--ok); }
.kpi-value.warn { color: var(--warn); }
.kpi-foot { color: var(--text-3); font-size: 12px; }

/* ---------- 面板与网格 ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 1080px) { .grid-2 { grid-template-columns: 1fr; } }

.panel {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg-2);
}
.panel-head h2 { font-size: 15.5px; font-weight: 600; color: var(--text); }
.panel-note { color: var(--text-3); font-size: 12.5px; }
.panel-body { padding: 18px 20px; }
.panel-body.table-wrap { padding: 6px 10px 12px; }
.panel-tip { color: var(--text-3); font-size: 12.5px; margin-top: 12px; }

/* ---------- 图表 ---------- */
.chart-bars { width: 100%; height: auto; display: block; }
.donut-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.donut { width: 150px; height: 150px; flex: 0 0 150px; }
.donut-legend { list-style: none; flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 8px; }
.donut-legend li { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.donut-legend i { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 10px; }
.donut-legend span { color: var(--text-2); flex: 1; }
.donut-legend b { font-variant-numeric: tabular-nums; color: var(--text); }

.rank-list { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.rank-list li { display: flex; align-items: center; gap: 11px; font-size: 13px; }
.rank-name { flex: 0 0 120px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-bar { flex: 1; height: 9px; background: #ececf0; border-radius: var(--radius-pill); overflow: hidden; }
.rank-bar i { display: block; height: 100%; border-radius: var(--radius-pill); background: linear-gradient(90deg, var(--accent), #5ab0ff); }
.rank-num { flex: 0 0 44px; text-align: right; font-variant-numeric: tabular-nums; color: var(--text); }

.quality-list { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.quality-list li { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--text-2); }
.quality-list b { font-variant-numeric: tabular-nums; color: var(--text); }
.quality-list b.warn { color: var(--warn); }

/* ---------- 表格 ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left;
  color: var(--text-3);
  font-weight: 500;
  font-size: 12.5px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
  white-space: nowrap;
}
.table td { padding: 11px 12px; border-bottom: 1px solid #f0f0f3; vertical-align: middle; color: var(--text); }
.table tbody tr:last-child td { border-bottom: none; }
.table-hover tbody tr { transition: background .12s ease; }
.table-hover tbody tr:hover { background: #f7f7f9; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .ellipsis { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.table .empty { text-align: center; color: var(--text-3); padding: 30px 10px; }
.table-kv th { width: 110px; color: var(--text-3); white-space: nowrap; font-weight: 500; }
.table-kv td { color: var(--text); }
.link { color: var(--accent); }
.link:hover { color: var(--accent-hover); }

/* ---------- 徽章 ---------- */
.badge {
  display: inline-block;
  padding: 3px 11px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  line-height: 1.6;
  border: 1px solid transparent;
  white-space: nowrap;
  font-weight: 500;
}
.badge-ok   { color: #1d8a4e; background: rgba(52,199,89,.14);  border-color: rgba(52,199,89,.28); }
.badge-warn { color: #b87400; background: rgba(255,159,10,.16); border-color: rgba(255,159,10,.3); }
.badge-bad  { color: #c0332a; background: rgba(255,59,48,.12);  border-color: rgba(255,59,48,.28); }
.badge-info { color: var(--accent); background: var(--accent-soft); border-color: rgba(0,113,227,.22); }
.badge-mute { color: var(--text-3); background: #f0f0f3; border-color: var(--line-soft); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 13.5px;
  cursor: pointer;
  transition: all .15s ease;
  white-space: nowrap;
}
.btn:hover { background: #f5f5f7; border-color: #c0c0c6; text-decoration: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:disabled:hover { background: #fff; border-color: var(--line); }
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 500;
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { background: transparent; color: var(--text-2); border-color: transparent; }
.btn-ghost:hover { background: #f0f0f3; color: var(--text); }
.btn-sm { padding: 5px 14px; font-size: 12.5px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.inline-form { display: inline; }

/* ---------- 表单 ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { color: var(--text-2); font-size: 12.5px; }
.field .req { color: var(--bad); font-style: normal; }
.field input, .field select, .field textarea,
.filter-bar input, .filter-bar select, .code-area {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 9px 12px;
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
  width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus,
.filter-bar input:focus, .filter-bar select:focus, .code-area:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-ring);
}
.field input:disabled { opacity: .55; background: #f5f5f7; }

.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}
.filter-bar select, .filter-bar input { width: auto; min-width: 130px; flex: 0 0 auto; }
.filter-bar input[type="search"] { flex: 1; min-width: 190px; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.field-wide { grid-column: 1 / -1; }
.form-actions { grid-column: 1 / -1; display: flex; gap: 10px; padding-top: 4px; }
.sticky-actions { position: sticky; bottom: 0; background: rgba(245,245,247,.92); padding: 14px 0; z-index: 5; backdrop-filter: blur(8px); }
.settings-form { display: flex; flex-direction: column; gap: 18px; }
.stack-form { display: flex; flex-direction: column; gap: 14px; }
.code-area {
  font-family: "Cascadia Code", "SF Mono", Consolas, "Courier New", monospace;
  font-size: 12.5px;
  line-height: 1.6;
  resize: vertical;
  white-space: pre;
}

/* ---------- 分页 ---------- */
.pagination { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 12px 6px 4px; }
.pg-info { color: var(--text-3); font-size: 12.5px; margin-right: 8px; }
.pg-btn {
  min-width: 30px;
  height: 30px;
  padding: 0 9px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid var(--line-soft);
  color: var(--text-2);
  font-size: 13px;
  background: #fff;
  transition: all .15s ease;
}
.pg-btn:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.pg-btn.current { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }
.pg-btn.disabled { opacity: .4; pointer-events: none; }
.pg-dots { color: var(--text-3); padding: 0 3px; }

/* ---------- 提示条 ---------- */
.flash {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-soft);
  background: #fff;
  font-size: 13.5px;
  box-shadow: var(--shadow-sm);
}
.flash-ok   { border-color: rgba(52,199,89,.35);  background: rgba(52,199,89,.08);  color: #1d8a4e; }
.flash-warn { border-color: rgba(255,159,10,.4);  background: rgba(255,159,10,.1);  color: #b87400; }
.flash-bad  { border-color: rgba(255,59,48,.38);  background: rgba(255,59,48,.08);  color: #c0332a; }
.flash-close { background: none; border: none; color: inherit; font-size: 17px; cursor: pointer; opacity: .6; }
.flash-close:hover { opacity: 1; }

/* ---------- 详情页 ---------- */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 1080px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-actions { display: flex; gap: 10px; margin-top: 16px; }
.quality-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

/* ---------- 日历 ---------- */
.cal-toolbar { display: flex; gap: 8px; }
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}
.cal-head { margin-bottom: 8px; }
.cal-head span { text-align: center; color: var(--text-3); font-size: 12.5px; padding: 4px 0; }
.cal-cell {
  min-height: 96px;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 9px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.cal-cell.empty { background: transparent; border-color: transparent; box-shadow: none; }
.cal-cell.muted { opacity: .5; }
.cal-cell.today { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-ring); }
.cal-date { display: flex; align-items: baseline; justify-content: space-between; }
.cal-date > span:first-child { font-size: 14.5px; font-weight: 600; color: var(--text); }
.cal-count { font-size: 11px; color: var(--accent); font-weight: 600; }
.cal-items { display: flex; flex-direction: column; gap: 4px; }
.cal-chip {
  font-size: 11.5px;
  color: var(--text-2);
  background: #f0f0f3;
  border-radius: 7px;
  padding: 3px 7px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cal-chip:hover { color: var(--accent); text-decoration: none; background: var(--accent-soft); }
.cal-chip.more { color: var(--accent); text-align: center; background: transparent; }

/* 视图切换（分段控件，Apple 风） */
.seg {
  margin-left: auto;
  display: inline-flex;
  background: #ececf0;
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 2px;
}
.seg-item {
  font-size: 13px;
  color: var(--text-2);
  padding: 5px 16px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: background .15s, color .15s;
}
.seg-item:hover { color: var(--text); text-decoration: none; }
.seg-item.active { background: #fff; color: var(--text); font-weight: 600; box-shadow: var(--shadow-sm); }

/* 日视图明细表 */
.day-table th, .day-table td { vertical-align: top; }
.day-table .nowrap { white-space: nowrap; }
.day-table .purpose-cell { max-width: 220px; }
.day-table .muted { color: var(--text-3); font-size: 12px; }
.day-table td small.muted { display: block; font-size: 11.5px; color: var(--text-3); }
.visitor-cell { min-width: 180px; }
.visitor-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.vchip {
  font-size: 11.5px;
  color: var(--text-2);
  background: #f0f0f3;
  border-radius: 7px;
  padding: 2px 7px;
  white-space: nowrap;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.day-table .link + .link { margin-left: 10px; }

/* ---------- 日看板 ---------- */
.board-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.board-nav { display: flex; align-items: center; gap: 10px; }
.nav-arrow {
  width: 36px; height: 36px; border-radius: 50%;
  background: #fff; border: 1px solid var(--line-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; color: var(--text-2);
  box-shadow: var(--shadow-sm); text-decoration: none;
  transition: color .15s, border-color .15s, transform .15s;
}
.nav-arrow:hover { color: var(--accent); border-color: var(--accent); transform: scale(1.05); text-decoration: none; }
.board-datebox { display: flex; flex-direction: column; line-height: 1.25; min-width: 96px; }
.board-datebox b { font-size: 21px; font-weight: 700; color: var(--text); letter-spacing: -.3px; }
.board-datebox span { font-size: 12px; color: var(--text-3); }
.board-toolbar .seg { margin-left: auto; }
.board-clock {
  font-variant-numeric: tabular-nums;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: .5px;
  margin-right: 4px;
}
.board-kpi .kpi-value { font-size: 34px; }
.board-kpi .kpi-label { font-size: 13px; }

/* 看板排名条：渐变胶囊 + 数值徽章 */
.board-rank { gap: 13px; }
.board-rank li { gap: 12px; }
.board-rank .rank-name { flex: 0 0 132px; color: var(--text); font-size: 13px; }
.board-rank .rank-bar { height: 12px; background: transparent; }
.board-rank .rank-bar i {
  background: linear-gradient(90deg, #0071e3, #6db6ff);
  box-shadow: 0 2px 10px rgba(0,113,227,.28);
  transition: filter .15s;
}
.board-rank li:hover .rank-bar i { filter: brightness(1.1); }
.board-rank .rank-num {
  flex: 0 0 auto; min-width: 32px; text-align: center;
  background: var(--accent-soft); color: var(--accent);
  font-weight: 700; font-size: 12px;
  border-radius: var(--radius-pill); padding: 1px 9px;
}

/* 全屏模式：隐藏侧栏/顶栏，看板铺满 */
body.board-full .sidebar { display: none; }
body.board-full .topbar { position: sticky; top: 0; z-index: 5; background: rgba(245,245,247,.92); backdrop-filter: blur(10px); }
body.board-full .content { padding: 18px 22px 40px; gap: 16px; }
body.board-full .flash { display: none; }

/* ---------- 通行证 ---------- */
.pass-layout { display: grid; grid-template-columns: 1.25fr .75fr; gap: 18px; align-items: start; }
@media (max-width: 1080px) { .pass-layout { grid-template-columns: 1fr; } }

.pass-card {
  background: linear-gradient(160deg, #ffffff, #f7f9fc);
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
}
.pass-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(520px 180px at 108% -12%, rgba(0,113,227,.1), transparent 60%),
    radial-gradient(420px 160px at -8% 112%, rgba(90,176,255,.1), transparent 60%);
  pointer-events: none;
}
.pass-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line-soft);
  position: relative;
}
.pass-eyebrow {
  display: inline-block;
  font-size: 10.5px;
  letter-spacing: 2.5px;
  color: var(--accent);
  border: 1px solid rgba(0,113,227,.28);
  background: var(--accent-soft);
  border-radius: var(--radius-pill);
  padding: 3px 11px;
  margin-bottom: 9px;
}
.pass-head h2 { font-size: 22px; font-weight: 700; letter-spacing: .5px; color: var(--text); }
.pass-body { display: flex; gap: 24px; padding: 24px; position: relative; }
.pass-qr { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 0 0 auto; }
.pass-qr img {
  border-radius: 12px;
  background: #fff;
  padding: 7px;
  box-shadow: 0 2px 12px rgba(0,0,0,.1);
}
.pass-qr-tip { font-size: 11.5px; color: var(--text-3); }
.pass-qr-fallback {
  width: 150px; height: 150px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--text-3);
  font-size: 12px;
  padding: 10px;
}
.pass-sign { font-size: 11.5px; color: var(--accent); letter-spacing: 1px; background: none; border: none; }
.pass-info { flex: 1; align-self: center; }
.pass-info th { width: 88px; }
.pass-foot { border-top: 1px dashed var(--line-soft); padding: 15px 24px 19px; position: relative; }
.pass-visitors { display: flex; gap: 8px; flex-wrap: wrap; }
.pass-visitor {
  font-size: 12.5px;
  color: var(--text-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-pill);
  padding: 4px 13px;
  background: #fff;
}
.pass-side { display: flex; flex-direction: column; gap: 18px; }

.event-list { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.event-list li { display: flex; align-items: center; gap: 11px; font-size: 13px; }
.event-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 9px; }
.event-dot.in { background: var(--ok); }
.event-dot.out { background: var(--text-3); }
.event-time { color: var(--text-3); font-variant-numeric: tabular-nums; }
.event-name { color: var(--text); }
.event-meta { color: var(--text-3); margin-left: auto; }

/* ---------- 同步管理 ---------- */
.check-list { list-style: none; display: flex; flex-direction: column; gap: 11px; margin-bottom: 16px; }
.check-list li { display: flex; align-items: center; gap: 11px; font-size: 13.5px; }
.check-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 9px; }
.check-dot.ok { background: var(--ok); }
.check-dot.off { background: var(--text-3); }
.check-name { flex: 1; color: var(--text-2); }
.check-val { color: var(--text); font-size: 12.5px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cron-box {
  margin-top: 16px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  background: #fafafc;
}
.cron-title { display: block; font-size: 12px; color: var(--text-3); margin-bottom: 7px; }
.cron-box code { font-size: 12px; }

.steps { padding-left: 20px; display: flex; flex-direction: column; gap: 9px; color: var(--text-2); font-size: 13.5px; }
.steps b { color: var(--text); }

/* ---------- 登录页（Apple 风） ---------- */
.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(820px 420px at 82% -8%, rgba(0,113,227,.10), transparent 60%),
    radial-gradient(720px 380px at -8% 108%, rgba(90,176,255,.10), transparent 60%),
    #f5f5f7;
  padding: 24px;
}
.login-shell { width: 100%; max-width: 400px; }
.login-card {
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  padding: 32px 30px;
  box-shadow: 0 12px 40px rgba(0,0,0,.10);
}
.login-head { text-align: center; margin-bottom: 22px; }
.login-logo { height: 38px; width: auto; margin: 0 auto 14px; display: block; }
.login-head h1 { font-size: 19px; font-weight: 600; color: var(--text); letter-spacing: .2px; }
.login-head p { color: var(--text-3); font-size: 13px; margin-top: 5px; }
.login-form { display: flex; flex-direction: column; gap: 15px; }
.login-note {
  border-radius: 11px;
  padding: 10px 13px;
  font-size: 13px;
  margin-bottom: 15px;
  border: 1px solid rgba(255,59,48,.3);
  background: rgba(255,59,48,.07);
  color: #c0332a;
}
.login-note.ok { border-color: rgba(52,199,89,.32); background: rgba(52,199,89,.08); color: #1d8a4e; }
.login-tip { text-align: center; color: var(--text-3); font-size: 12.5px; margin-top: 16px; }
.login-foot { text-align: center; color: var(--text-3); font-size: 12px; margin-top: 18px; }
.btn-wecom { background: #07C160; border-color: #07C160; color: #fff; }
.btn-wecom:hover { background: #06ad56; border-color: #06ad56; }
.login-divider { text-align: center; color: var(--text-3); font-size: 12px; margin: 15px 0 2px; position: relative; }
.login-divider::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%;
  height: 1px; background: var(--line-soft);
}
.login-divider span { position: relative; background: rgba(255,255,255,.92); padding: 0 12px; }

/* ---------- 打印（通行证） ---------- */
@media print {
  body { background: #fff; }
  .sidebar, .topbar, .pass-side, .topbar-actions { display: none !important; }
  .layout { display: block; }
  .main { display: block; }
  .content { padding: 0; }
  .pass-card {
    background: #fff;
    border: 2px solid #1d1d1f;
    color: #1d1d1f;
    box-shadow: none;
    page-break-inside: avoid;
  }
  .pass-card::before { display: none; }
  .pass-head h2, .pass-info td, .pass-date, .pass-sign { color: #1d1d1f; }
  .pass-eyebrow { color: #0071e3; border-color: #0071e3; background: #e8f1fd; }
  .pass-head, .pass-foot { border-color: #d2d2d7; }
  .pass-qr img { box-shadow: none; border: 1px solid #d2d2d7; }
  .pass-visitor { color: #42454a; border-color: #d2d2d7; background: #fff; }
  .badge-ok { color: #1d8a4e; border-color: #34c759; background: none; }
  .badge-warn { color: #b87400; border-color: #ff9f0a; background: none; }
  .badge-mute { color: #6e6e73; border-color: #d2d2d7; background: none; }
}

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #c8c8cd; border-radius: 5px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #a9a9b0; }
::-webkit-scrollbar-track { background: transparent; }
