/* =========================================================
   消防职业技能培训平台 · Design System
   仅使用系统字体，零外部依赖，首屏无阻塞请求
   ========================================================= */

:root {
  --brand: #d92d20;
  --brand-strong: #b42318;
  --brand-soft: #fef3f2;
  --brand-ring: rgba(217, 45, 32, 0.18);

  --ink: #101828;
  --ink-2: #344054;
  --muted: #667085;
  --muted-2: #98a2b3;

  --line: #eaecf0;
  --line-2: #f2f4f7;
  --bg: #f7f8fa;
  --card: #ffffff;

  --ok: #039855;
  --ok-soft: #ecfdf3;
  --warn: #dc6803;
  --warn-soft: #fffaeb;
  --danger: #d92d20;
  --danger-soft: #fef3f2;
  --info: #1570ef;
  --info-soft: #eff8ff;

  --nav: #101828;
  --nav-2: #1d2939;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --r-xl: 22px;

  --sh-1: 0 1px 2px rgba(16, 24, 40, .05);
  --sh-2: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
  --sh-3: 0 8px 24px -6px rgba(16, 24, 40, .12), 0 2px 6px -2px rgba(16, 24, 40, .06);
  --sh-4: 0 24px 48px -12px rgba(16, 24, 40, .18);

  --sidebar-w: 252px;
  --header-h: 64px;

  --ease: cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; }

/* 关键：自定义 display 的元素必须让 [hidden] 生效 */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
img { max-width: 100%; display: block; }

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

/* =========================================================
   登录页
   ========================================================= */
.login-wrap {
  min-height: 100%;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  background: var(--card);
}

.login-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1200px 600px at 15% 10%, rgba(217, 45, 32, .55), transparent 60%),
    radial-gradient(900px 500px at 85% 90%, rgba(247, 144, 9, .28), transparent 55%),
    linear-gradient(160deg, #1a1512 0%, #241512 45%, #2b1310 100%);
  color: #fff;
  padding: 56px 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.login-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 30% 30%, #000 10%, transparent 75%);
}

.login-hero > * { position: relative; z-index: 1; }

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: .02em;
}

.brand-logo {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #ff5c46, #b42318);
  box-shadow: 0 8px 20px -6px rgba(255, 92, 70, .7);
  flex: none;
}

.hero-title {
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -.02em;
  max-width: 12em;
}
.hero-title em {
  font-style: normal;
  background: linear-gradient(90deg, #ffb4a2, #ff7a5c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  margin-top: 18px;
  color: rgba(255, 255, 255, .72);
  font-size: 15px;
  max-width: 30em;
  line-height: 1.75;
}

.hero-feats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}
.hero-feat {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  font-size: 13px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
  backdrop-filter: blur(6px);
  color: rgba(255, 255, 255, .88);
}

.hero-foot {
  font-size: 12.5px;
  color: rgba(255, 255, 255, .42);
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: var(--card);
}

.login-box { width: 100%; max-width: 392px; }

.login-box h2 { font-size: 26px; letter-spacing: -.02em; }
.login-box .sub { color: var(--muted); margin-top: 8px; font-size: 14px; }

.field { margin-top: 18px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 7px;
}

.input, .select, .textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #d0d5dd;
  border-radius: var(--r-sm);
  background: #fff;
  outline: none;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
  font-size: 14px;
}
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3.5px var(--brand-ring);
}
.textarea { resize: vertical; min-height: 92px; line-height: 1.65; }
.select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2.2' stroke-linecap='round'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 11px center; padding-right: 34px; }

.input-icon { position: relative; }
.input-icon .input { padding-left: 40px; }
.input-icon svg {
  position: absolute; left: 13px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted-2);
  pointer-events: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: 14px;
  transition: background .16s var(--ease), box-shadow .16s var(--ease),
              transform .08s var(--ease), border-color .16s var(--ease);
  white-space: nowrap;
  user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 1px 2px rgba(180, 35, 24, .35);
}
.btn-primary:hover:not(:disabled) { background: var(--brand-strong); }

.btn-ghost {
  background: #fff;
  border: 1px solid #d0d5dd;
  color: var(--ink-2);
  box-shadow: var(--sh-1);
}
.btn-ghost:hover:not(:disabled) { background: #f9fafb; border-color: #b9c0cc; }

.btn-soft { background: var(--brand-soft); color: var(--brand-strong); }
.btn-soft:hover:not(:disabled) { background: #fee4e2; }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #b42318; }

.btn-sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 7px; }
.btn-lg { height: 46px; font-size: 15px; border-radius: 10px; }
.btn-block { width: 100%; }

.login-err {
  margin-top: 14px;
  padding: 10px 13px;
  border-radius: var(--r-sm);
  background: var(--danger-soft);
  color: var(--brand-strong);
  font-size: 13px;
  border: 1px solid #fecdca;
  display: none;
}
.login-err.show { display: block; }

.login-tip {
  margin-top: 22px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: #f9fafb;
  border: 1px dashed #e4e7ec;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.75;
}
.login-tip b { color: var(--ink-2); }

/* =========================================================
   应用骨架
   ========================================================= */
.app { display: none; min-height: 100%; }
.app.ready { display: block; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--nav);
  color: #fff;
  display: flex;
  flex-direction: column;
  z-index: 40;
  transition: transform .26s var(--ease);
}

.side-brand {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  flex: none;
}
.side-brand .brand-logo { width: 34px; height: 34px; border-radius: 10px; }
.side-brand-text { font-weight: 650; font-size: 14.5px; line-height: 1.25; }
.side-brand-text small {
  display: block;
  font-size: 10.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, .42);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.side-nav { flex: 1; overflow-y: auto; padding: 14px 10px; }
.side-nav::-webkit-scrollbar { width: 4px; }
.side-nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .15); }

.nav-group-label {
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .32);
  padding: 12px 12px 6px;
  font-weight: 600;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 9px;
  color: rgba(255, 255, 255, .68);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 2px;
  transition: background .15s var(--ease), color .15s var(--ease);
  position: relative;
}
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.active { background: rgba(217, 45, 32, .16); color: #fff; }
.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 18px;
  border-radius: 0 3px 3px 0;
  background: #ff5c46;
}
.nav-item .nav-badge {
  margin-left: auto;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.side-user {
  flex: none;
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, .07);
}
.side-user-inner {
  display: flex; align-items: center; gap: 10px;
  padding: 8px; border-radius: 10px;
  transition: background .15s var(--ease);
}
.side-user-inner:hover { background: rgba(255, 255, 255, .06); }
.side-user-info { min-width: 0; flex: 1; }
.side-user-name {
  font-size: 13.5px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.side-user-role { font-size: 11.5px; color: rgba(255, 255, 255, .42); }

.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #ff7a5c, #b42318);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  flex: none;
  letter-spacing: .02em;
}
.avatar.lg { width: 48px; height: 48px; font-size: 17px; }

/* ---------------- 主区域 ---------------- */
.main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: var(--header-h);
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 30;
}

.topbar-crumb { display: flex; align-items: center; gap: 8px; min-width: 0; }
.crumb-group {
  font-size: 13px;
  color: var(--muted-2);
  display: none;
}
.crumb-group::after { content: "/"; margin-left: 8px; color: #d0d5dd; }
.crumb-group:not(:empty) { display: inline; }

.topbar-title { font-size: 16.5px; font-weight: 650; letter-spacing: -.01em; }
.topbar-sub { font-size: 12.5px; color: var(--muted); }
.topbar-sub::before { content: "·"; margin-right: 8px; color: #d0d5dd; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 36px; height: 36px;
  border-radius: 9px;
  display: grid; place-items: center;
  color: var(--ink-2);
  position: relative;
  transition: background .15s var(--ease);
}
.icon-btn:hover { background: var(--line-2); }
.icon-btn .dot {
  position: absolute; top: 7px; right: 7px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--brand);
  border: 2px solid #fff;
}

.content { padding: 24px; flex: 1; max-width: 1440px; width: 100%; }

/* =========================================================
   组件
   ========================================================= */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh-1);
}
.card-pad { padding: 20px; }
.card-head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.card-head h3 { font-size: 15px; }
.card-head .spacer { margin-left: auto; }

.grid { display: grid; gap: 16px; }
.g-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px;
  box-shadow: var(--sh-1);
  position: relative;
  overflow: hidden;
  transition: box-shadow .2s var(--ease), transform .2s var(--ease);
}
.stat:hover { box-shadow: var(--sh-3); transform: translateY(-1px); }
.stat-top { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 500; }
.stat-ico {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: grid; place-items: center;
  background: var(--brand-soft);
  color: var(--brand-strong);
  flex: none;
}
.stat-val {
  font-size: 30px; font-weight: 700;
  letter-spacing: -.03em;
  margin-top: 12px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.stat-val small { font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 3px; }
.stat-foot { font-size: 12.5px; color: var(--muted); margin-top: 6px; }

/* 签到大卡片 */
.checkin-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  padding: 26px;
  color: #fff;
  background:
    radial-gradient(700px 320px at 88% 10%, rgba(255, 138, 106, .5), transparent 62%),
    linear-gradient(135deg, #7a1f16 0%, #b42318 52%, #d92d20 100%);
  box-shadow: 0 14px 34px -14px rgba(180, 35, 24, .6);
}
.checkin-hero::after {
  content: "";
  position: absolute; right: -40px; top: -40px;
  width: 220px; height: 220px;
  border-radius: 50%;
  border: 28px solid rgba(255, 255, 255, .07);
}
.checkin-hero h2 { font-size: 21px; letter-spacing: -.01em; }
.checkin-hero .meta {
  margin-top: 8px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, .78);
  display: flex; gap: 16px; flex-wrap: wrap;
}
.countdown {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 34px;
  letter-spacing: -.02em;
  margin-top: 16px;
  line-height: 1;
}
.countdown small { font-size: 13px; font-weight: 500; opacity: .7; margin-left: 6px; letter-spacing: 0; }

/* 进度条 */
.progress { height: 7px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.progress > i {
  display: block; height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #ff7a5c, var(--brand));
  transition: width .5s var(--ease);
}

/* 徽标 */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 23px; padding: 0 9px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.badge.gray { background: var(--line-2); color: var(--ink-2); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--brand-strong); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.brand { background: var(--brand-soft); color: var(--brand-strong); }

/* 表格 */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tbl th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 11px 16px;
  background: #fcfcfd;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.tbl td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-2);
  color: var(--ink-2);
  vertical-align: middle;
}
table.tbl tbody tr { transition: background .12s var(--ease); }
table.tbl tbody tr:hover { background: #fbfcfd; }
table.tbl tbody tr:last-child td { border-bottom: none; }
table.tbl td.strong { color: var(--ink); font-weight: 600; }

.cell-user { display: flex; align-items: center; gap: 10px; }
.cell-user .avatar { width: 32px; height: 32px; font-size: 12px; }
.cell-user div { min-width: 0; }
.cell-user b { display: block; font-weight: 600; color: var(--ink); font-size: 13.5px; }
.cell-user span { font-size: 12px; color: var(--muted); }

/* 空状态 */
.empty {
  padding: 54px 20px;
  text-align: center;
  color: var(--muted);
}
.empty svg { color: #d0d5dd; margin-bottom: 12px; }
.empty h4 { font-size: 14.5px; color: var(--ink-2); margin-bottom: 4px; }
.empty p { font-size: 13px; }

/* 列表项 */
.list-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line-2);
  transition: background .12s var(--ease);
}
.list-item:last-child { border-bottom: none; }
.list-item:hover { background: #fbfcfd; }
.list-item-main { min-width: 0; flex: 1; }
.list-item-title {
  font-weight: 600; color: var(--ink); font-size: 13.8px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.list-item-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* Toast */
.toast-host {
  position: fixed;
  top: 18px; left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
  width: min(92vw, 380px);
}
.toast {
  display: flex; align-items: flex-start; gap: 9px;
  background: #1d2939;
  color: #fff;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  box-shadow: var(--sh-4);
  animation: toastIn .24s var(--ease);
  pointer-events: auto;
  line-height: 1.5;
}
.toast.ok { background: #054f31; }
.toast.err { background: #7a271a; }
.toast.out { animation: toastOut .2s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px) scale(.97); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-8px); } }

/* Modal */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(16, 24, 40, .55);
  backdrop-filter: blur(3px);
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn .18s var(--ease);
}
@keyframes fadeIn { from { opacity: 0; } }
.modal {
  background: #fff;
  border-radius: var(--r-lg);
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  box-shadow: var(--sh-4);
  animation: modalIn .22s var(--ease);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.modal.wide { max-width: 760px; }
.modal-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px;
  flex: none;
}
.modal-head h3 { font-size: 16px; }
.modal-head .icon-btn { margin-left: auto; }
.modal-body { padding: 22px; overflow-y: auto; flex: 1; }
.modal-foot {
  padding: 15px 22px;
  border-top: 1px solid var(--line);
  display: flex; gap: 10px; justify-content: flex-end;
  flex: none;
  background: #fcfcfd;
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}

/* 表单行 */
.form-row { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.form-row .field { margin-top: 0; }

/* 文件上传 */
.dropzone {
  border: 1.5px dashed #d0d5dd;
  border-radius: var(--r);
  padding: 26px 18px;
  text-align: center;
  transition: border-color .16s var(--ease), background .16s var(--ease);
  cursor: pointer;
  background: #fcfcfd;
}
.dropzone:hover, .dropzone.drag { border-color: var(--brand); background: var(--brand-soft); }
.dropzone svg { color: var(--muted-2); margin-bottom: 8px; }
.dropzone b { color: var(--brand); }
.dropzone p { font-size: 13px; color: var(--muted); }
.file-list { margin-top: 12px; display: flex; flex-direction: column; gap: 7px; }
.file-chip {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 12px;
  background: #f9fafb;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 13px;
}
.file-chip .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip .sz { color: var(--muted); font-size: 12px; }

/* 分段控件 */
.segmented {
  display: inline-flex;
  background: var(--line-2);
  border-radius: 9px;
  padding: 3px;
  gap: 2px;
}
.segmented button {
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  transition: all .15s var(--ease);
  white-space: nowrap;
}
.segmented button.on {
  background: #fff;
  color: var(--ink);
  box-shadow: var(--sh-1);
}

/* 骨架屏 */
.skel {
  background: linear-gradient(90deg, #f2f4f7 25%, #e9ebf0 37%, #f2f4f7 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease-in-out infinite;
  border-radius: 7px;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* 底部导航（移动端） */
.tabbar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 60px;
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid var(--line);
  z-index: 45;
}
.tabbar-inner { display: flex; height: 60px; }
.tabbar a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--muted-2);
  transition: color .15s var(--ease);
  position: relative;
}
.tabbar a.on { color: var(--brand); }
.tabbar a .tab-dot {
  position: absolute; top: 8px; left: 50%; margin-left: 4px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand);
}

/* 桌面端汉堡按钮 */
.menu-btn { display: none; }

/* 遮罩 */
.scrim {
  display: none;
  position: fixed; inset: 0;
  background: rgba(16, 24, 40, .5);
  z-index: 35;
  animation: fadeIn .18s var(--ease);
}

/* =========================================================
   响应式：≥1600 宽屏 / ≤1200 笔记本 / ≤1024 平板横向
   ≤820 平板竖屏 / ≤560 手机
   ========================================================= */

/* 桌面端顶栏显示「分组 / 页面」面包屑，与内容区大标题形成层级 */
@media (min-width: 1600px) {
  .content { padding: 28px 32px; }
}

@media (max-width: 1180px) {
  .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
  :root { --sidebar-w: 232px; }
  .content { padding: 20px; }
  .login-hero { padding: 40px 36px; }
}

@media (max-width: 900px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-hero {
    padding: 30px 26px 34px;
    min-height: auto;
  }
  .hero-title { font-size: 25px; max-width: none; }
  .hero-sub { font-size: 13.5px; margin-top: 12px; }
  .hero-feats { margin-top: 18px; }
  .hero-foot { display: none; }
  .login-panel { padding: 28px 22px 44px; }
  .login-box h2 { font-size: 22px; }
}

@media (max-width: 820px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--sh-4); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .menu-btn { display: grid; }
  .scrim.show { display: block; }
  .topbar { padding: 0 14px; }
  .crumb-group { display: none !important; }
  .content { padding: 16px 14px 84px; }
  .g-2, .g-3 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .tabbar { display: block; }
  .hide-sm { display: none !important; }

  /* 表格转卡片 */
  table.tbl thead { display: none; }
  table.tbl, table.tbl tbody, table.tbl tr, table.tbl td { display: block; width: 100%; }
  table.tbl tr {
    border: 1px solid var(--line);
    border-radius: var(--r);
    margin-bottom: 10px;
    padding: 6px 4px;
    background: #fff;
  }
  table.tbl td {
    border: none;
    padding: 7px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: right;
    flex-wrap: nowrap;
  }
  table.tbl td::before {
    content: attr(data-label);
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
    text-align: left;
    flex: none;
    margin-right: auto;       /* 标签靠左，值始终聚拢在右侧 */
  }
  /* 首列（用户信息）独占一行，避免头像被挤到中间 */
  table.tbl td:first-child { display: block; text-align: left; padding-top: 12px; }
  table.tbl td:first-child::before { display: block; margin-bottom: 8px; }
  table.tbl td .cell-user { justify-content: flex-start; }
  table.tbl td:last-child { padding-bottom: 12px; }
  .table-wrap { overflow-x: visible; }
  table.tbl td.cell-actions { justify-content: flex-end; }
  table.tbl td.cell-actions::before { margin-right: auto; }
}

@media (max-width: 560px) {
  .content { padding: 12px 12px 82px; }
  .card-pad { padding: 16px; }
  .grid { gap: 12px; }
  .g-stats, .g-4 { gap: 10px; }
  .stat { padding: 14px 13px; }
  .stat-top { font-size: 12px; gap: 6px; }
  .stat-ico { width: 26px; height: 26px; border-radius: 7px; }
  .stat-ico svg { width: 13px; height: 13px; }
  .stat-val { font-size: 23px; margin-top: 9px; }
  .stat-val small { font-size: 12px; }
  .stat-foot { font-size: 11.5px; }
  .checkin-hero { padding: 20px; }
  .countdown { font-size: 28px; }
  .modal { max-width: 100%; border-radius: var(--r-lg) var(--r-lg) 0 0; align-self: flex-end; }
  .modal-mask { padding: 0; align-items: flex-end; }
  .topbar-title { font-size: 15px; }
  .toast-host { top: 10px; width: calc(100vw - 24px); }
  .hero-feat { font-size: 12px; padding: 6px 10px; }
}

/* 打印（签到表导出用） */
@media print {
  .sidebar, .topbar, .tabbar, .scrim, .card-head .btn { display: none !important; }
  .main { margin: 0; }
  .content { padding: 0; }
  .card { box-shadow: none; border: none; }
  body { background: #fff; }
}

/* 无障碍：尊重系统减弱动效 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
