/* ==========================================================
   云打卡 · 设计系统（白色主题）
   ========================================================== */
:root {
  --bg-page: #F7F8FA;
  --bg-card: #FFFFFF;
  --bg-subtle: #F2F3F5;
  --bg-hover: #F5F6F7;
  --border: #E5E6EB;
  --border-strong: #D0D3D9;
  --text-1: #1F2329;
  --text-2: #646A73;
  --text-3: #8F959E;
  --brand: #D81E28;
  --brand-hover: #B8161F;
  --brand-soft: #FDECEC;
  --brand-ring: rgba(216, 30, 40, .16);

  --success: #15803D; --success-soft: #EAF7EE;
  --info: #1D4ED8;    --info-soft: #EAF1FF;
  --warning: #B45309; --warning-soft: #FFF4E5;
  --orange: #C2410C;  --orange-soft: #FFEDE5;
  --danger: #B91C1C;  --danger-soft: #FDECEC;
  --muted: #646A73;   --muted-soft: #F2F3F5;

  --radius-card: 10px;
  --radius-ctrl: 6px;
  --shadow-hover: 0 4px 16px rgba(31, 35, 41, .06);
  --shadow-pop: 0 12px 40px rgba(31, 35, 41, .14);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --sidebar-w: 232px;
  --topbar-h: 60px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Code", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-1);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
a.link { color: var(--brand); }
a.link:hover { color: var(--brand-hover); text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.35; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--brand-soft); color: var(--brand-hover); }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.i-sm { width: 16px; height: 16px; }
.i-lg { width: 22px; height: 22px; }
.i-fill { fill: currentColor; stroke: none; }

/* ---------------- 布局 ---------------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 18px 12px 14px;
  z-index: 40;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 10px 18px; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  background: var(--brand); color: #fff;
  display: grid; place-items: center; overflow: hidden;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand-mark .i { width: 20px; height: 20px; }
.brand-name { font-size: 16px; font-weight: 600; letter-spacing: .2px; }
.brand-sub { font-size: 12px; color: var(--text-3); margin-left: auto; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-group { font-size: 12px; color: var(--text-3); padding: 14px 12px 6px; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 12px; border-radius: 8px;
  color: var(--text-2);
  transition: background .15s, color .15s;
}
.nav a:hover { background: var(--bg-hover); color: var(--text-1); }
.nav a.active { background: var(--brand-soft); color: var(--brand); font-weight: 500; }
.nav a.active::before {
  content: ""; position: absolute; left: -12px; top: 10px; bottom: 10px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--brand);
}
.nav .count {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--brand); color: #fff; font-size: 12px; line-height: 20px; text-align: center; font-weight: 500;
}
.sidebar-foot { margin-top: auto; padding-top: 12px; }
.member-box { border: 1px solid var(--border); border-radius: var(--radius-card); padding: 12px 14px; font-size: 13px; }
.member-box .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.member-box .row + .row { margin-top: 6px; }
.member-box .label { color: var(--text-2); }
.member-box.warn { border-color: #F5D9B0; background: var(--warning-soft); }
.member-box.warn .value { color: var(--warning); font-weight: 500; }
.member-box .action { display: block; margin-top: 10px; text-align: center; height: 30px; line-height: 30px; border-radius: var(--radius-ctrl); background: var(--brand); color: #fff; font-weight: 500; font-size: 13px; }
.member-box .action:hover { background: var(--brand-hover); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 12px;
  padding: 0 28px;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-title { font-size: 16px; font-weight: 600; min-width: 0; }
.topbar-back { display: inline-flex; align-items: center; gap: 2px; color: var(--text-2); font-size: 14px; margin-right: 4px; }
.topbar-back:hover { color: var(--text-1); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn {
  position: relative; width: 36px; height: 36px; border-radius: 8px; border: 0; background: transparent;
  display: inline-grid; place-items: center; color: var(--text-2); transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--bg-hover); color: var(--text-1); }
.icon-btn .dot { position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 2px #fff; }
.menu-toggle { display: none; margin-left: -8px; }

.user-chip { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 8px 0 4px; border-radius: 18px; border: 0; background: transparent; transition: background .15s; }
.user-chip:hover { background: var(--bg-hover); }
.user-chip .name { font-size: 14px; max-width: 120px; }

.content { width: 100%; max-width: 1200px; margin: 0 auto; padding: 24px 28px 56px; }
.page-enter { animation: page-in .28s var(--ease) both; }
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 20px; }
.page-head .desc { color: var(--text-2); font-size: 14px; margin-top: 2px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.bottom-nav { display: none; }
.scrim { display: none; }

.top-progress { position: fixed; left: 0; top: 0; height: 2px; width: 0; background: var(--brand); z-index: 100; opacity: 0; transition: width .4s var(--ease), opacity .3s; }
.top-progress.on { opacity: 1; }

/* ---------------- 通用组件 ---------------- */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-card); }
.card-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px 0; }
.card-head h2, .card-head h3 { font-size: 15px; }
.card-head .extra { margin-left: auto; display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--text-2); }
.card-body { padding: 16px 20px 20px; }
.card-foot { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.card + .card, .card + .grid, .grid + .card, .grid + .grid, .notice + .card, .notice + .grid, .notice + .notice { margin-top: 16px; }
.grid > .card, .grid > .grid, .grid > .notice, .stats > .card, .acc-grid > .card, .steps > .card, .rights > .card, .settings-layout > .card { margin-top: 0; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.stack > * + * { margin-top: 16px; }
.row-flex { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spacer { flex: 1; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }

/* 按钮 */
.btn {
  --h: 36px;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: var(--h); padding: 0 16px; border-radius: var(--radius-ctrl);
  border: 1px solid var(--border); background: #fff; color: var(--text-1);
  font-size: 14px; font-weight: 500; white-space: nowrap; user-select: none;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .08s;
}
.btn:hover { border-color: var(--border-strong); background: var(--bg-hover); }
.btn:active { transform: scale(.98); }
.btn .i { width: 16px; height: 16px; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn-danger { color: var(--danger); border-color: #F3C1C1; }
.btn-danger:hover { background: var(--danger-soft); border-color: #EBA3A3; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--bg-hover); border-color: transparent; color: var(--text-1); }
.btn-sm { --h: 30px; padding: 0 12px; font-size: 13px; }
.btn-lg { --h: 42px; padding: 0 22px; font-size: 15px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }
.btn.loading { color: transparent !important; pointer-events: none; }
.btn.loading::after {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-color: var(--text-2) transparent var(--text-2) transparent;
  animation: spin .7s linear infinite;
}
.btn-primary.loading::after { border-color: #fff transparent #fff transparent; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 状态徽章 */
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px;
  border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap;
  color: var(--muted); background: var(--muted-soft);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.badge.success { color: var(--success); background: var(--success-soft); }
.badge.info { color: var(--info); background: var(--info-soft); }
.badge.info-soft { color: var(--info); background: #F3F7FF; }
.badge.warning { color: var(--warning); background: var(--warning-soft); }
.badge.orange { color: var(--orange); background: var(--orange-soft); }
.badge.danger { color: var(--danger); background: var(--danger-soft); }
.badge.brand { color: var(--brand); background: var(--brand-soft); }
.badge.info::before { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(29, 78, 216, .45); } 50% { box-shadow: 0 0 0 4px rgba(29, 78, 216, 0); } }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 4px; font-size: 12px; background: var(--bg-subtle); color: var(--text-2); }
.tag.brand { background: var(--brand-soft); color: var(--brand); }

/* 进度条 */
.progress { height: 6px; border-radius: 99px; background: var(--bg-subtle); overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--brand); transition: width .7s var(--ease), background .3s; }
.progress.done > i { background: var(--success); }
.progress.live > i {
  background-image: linear-gradient(90deg, var(--brand) 0%, #EE5A62 50%, var(--brand) 100%);
  background-size: 200% 100%; animation: flow 2.4s linear infinite;
}
@keyframes flow { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.progress-lg { height: 8px; }

/* 头像 */
.avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; overflow: hidden; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 600; font-size: 15px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 28px; height: 28px; font-size: 12px; }
.avatar-lg { width: 56px; height: 56px; font-size: 20px; }

/* 表单 */
.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }
.label { display: block; font-size: 13px; font-weight: 500; color: var(--text-1); margin-bottom: 6px; }
.label .opt { color: var(--text-3); font-weight: 400; margin-left: 4px; }
.input, .select, .textarea {
  width: 100%; height: 36px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: var(--radius-ctrl); background: #fff;
  font-size: 14px; color: var(--text-1);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--border-strong); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
.textarea { height: auto; min-height: 96px; padding: 8px 12px; line-height: 1.6; resize: vertical; }
.select { appearance: none; padding-right: 32px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238F959E' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; }
.input-lg { height: 42px; font-size: 15px; }
.input-group { display: flex; align-items: center; gap: 8px; }
.input-group .sep { color: var(--text-3); }
.input-suffix { position: relative; }
.input-suffix .input { padding-right: 36px; }
.input-suffix .suffix { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 13px; pointer-events: none; }
.help { font-size: 12px; color: var(--text-3); margin-top: 6px; line-height: 1.5; }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: var(--danger); }
.field-error { font-size: 12px; color: var(--danger); margin-top: 6px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

.check { display: inline-flex; align-items: flex-start; gap: 8px; cursor: pointer; font-size: 13px; color: var(--text-2); line-height: 1.5; }
.check input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }

.switch-row { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.switch-row:last-child { border-bottom: 0; }
.switch-row .text { flex: 1; min-width: 0; }
.switch-row .t { font-size: 14px; font-weight: 500; }
.switch-row .d { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.switch { position: relative; display: inline-block; width: 38px; height: 22px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 22px; background: #C9CDD4; transition: background .2s var(--ease); }
.switch span::after { content: ""; position: absolute; left: 2px; top: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .22s var(--ease); }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { box-shadow: 0 0 0 3px var(--brand-ring); }

/* 分段控制 / 页签 */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 8px; background: var(--bg-subtle); position: relative; }
.seg button { position: relative; z-index: 1; height: 30px; padding: 0 14px; border: 0; border-radius: 6px; background: transparent; color: var(--text-2); font-size: 13px; font-weight: 500; transition: color .2s; }
.seg button.active { color: var(--text-1); }
.seg .seg-thumb { position: absolute; top: 3px; bottom: 3px; border-radius: 6px; background: #fff; box-shadow: 0 1px 3px rgba(31, 35, 41, .1); transition: left .25s var(--ease), width .25s var(--ease); }

.tabs { position: relative; display: flex; gap: 28px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button { position: relative; height: 44px; display: inline-flex; align-items: center; border: 0; background: none; padding: 0; color: var(--text-2); font-size: 14px; white-space: nowrap; transition: color .15s; }
.tabs a:hover, .tabs button:hover { color: var(--text-1); }
.tabs .active { color: var(--text-1); font-weight: 500; }
.tabs .tab-ink { position: absolute; bottom: -1px; height: 2px; border-radius: 2px; background: var(--brand); transition: left .25s var(--ease), width .25s var(--ease); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fade-in .2s ease both; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* 表格 */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 500; font-size: 12px; color: var(--text-2); background: #FAFBFC; padding: 10px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: #FAFBFC; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions .btn + .btn { margin-left: 4px; }
.table-empty { padding: 48px 16px !important; text-align: center; color: var(--text-3); }
.cell-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cell-user .t { font-weight: 500; }
.cell-user .s { font-size: 12px; color: var(--text-3); }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.toolbar .input, .toolbar .select { width: auto; min-width: 160px; height: 34px; }
.toolbar .grow { flex: 1; min-width: 200px; }

.pager { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-2); }
.pager .pages { display: flex; gap: 4px; }
.pager a, .pager span.cur { min-width: 30px; height: 30px; padding: 0 8px; border-radius: 6px; display: inline-grid; place-items: center; }
.pager a:hover { background: var(--bg-hover); color: var(--text-1); }
.pager span.cur { background: var(--brand-soft); color: var(--brand); font-weight: 500; }

/* 提示条 */
.notice { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--radius-card); border: 1px solid var(--border); background: #fff; font-size: 14px; }
.notice .i { color: var(--text-2); }
.notice .body { flex: 1; min-width: 0; }
.notice .close { border: 0; background: none; color: var(--text-3); padding: 4px; margin: -4px; border-radius: 4px; }
.notice .close:hover { color: var(--text-1); }
.notice.subtle { background: var(--bg-subtle); border-color: transparent; }
.notice.warning { background: var(--warning-soft); border-color: #F5D9B0; }
.notice.warning .i { color: var(--warning); }
.notice.danger { background: var(--danger-soft); border-color: #F3C1C1; }
.notice.danger .i { color: var(--danger); }
.notice.success { background: var(--success-soft); border-color: #BFE3CB; }
.notice.success .i { color: var(--success); }
.notice.info { background: var(--info-soft); border-color: #C7D7FB; }
.notice.info .i { color: var(--info); }

/* 统计 */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { padding: 16px 20px; }
.stat .k { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.stat .v { font-size: 28px; font-weight: 600; line-height: 1.25; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 14px; font-weight: 500; color: var(--text-3); margin-left: 2px; }
.stat .s { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.stat.alert .v { color: var(--orange); }

/* 空状态 */
.empty { text-align: center; padding: 56px 24px; }
.empty .ico { width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 16px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.empty .ico .i { width: 26px; height: 26px; }
.empty h3 { font-size: 16px; }
.empty p { color: var(--text-2); margin-top: 6px; }
.empty .actions { margin-top: 20px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* 键值列表 */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; font-size: 14px; }
.kv dt { color: var(--text-2); }
.kv dd { margin: 0; min-width: 0; }

/* 下拉 */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 180px; padding: 6px;
  background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-pop);
  opacity: 0; transform: translateY(-4px) scale(.98); transform-origin: top right; pointer-events: none;
  transition: opacity .15s, transform .18s var(--ease); z-index: 50;
}
.dropdown.open .dropdown-menu { opacity: 1; transform: none; pointer-events: auto; }
.dropdown-menu a, .dropdown-menu button { display: flex; align-items: center; gap: 8px; width: 100%; height: 36px; padding: 0 10px; border: 0; background: none; border-radius: 6px; color: var(--text-1); font-size: 14px; text-align: left; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--bg-hover); }
.dropdown-menu .sep { height: 1px; background: var(--border); margin: 6px 0; }
.dropdown-menu .head { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.dropdown-menu .head .n { font-weight: 500; }
.dropdown-menu .head .e { font-size: 12px; color: var(--text-3); }

/* 弹窗 */
.modal-root { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 16px; visibility: hidden; }
.modal-root.open { visibility: visible; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(31, 35, 41, .38); opacity: 0; transition: opacity .2s; }
.modal-root.open .modal-backdrop { opacity: 1; }
.modal {
  position: relative; width: 480px; max-width: 100%; max-height: calc(100vh - 32px); overflow: auto;
  background: #fff; border-radius: 12px; box-shadow: var(--shadow-pop);
  opacity: 0; transform: translateY(10px) scale(.98); transition: opacity .2s, transform .25s var(--ease);
}
.modal-root.open .modal { opacity: 1; transform: none; }
.modal-lg { width: 640px; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 18px 20px 0; }
.modal-head h3 { font-size: 16px; }
.modal-head .icon-btn { margin: -6px -8px -6px auto; }
.modal-body { padding: 16px 20px 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 0 20px 20px; }
.confirm-text { color: var(--text-2); }

/* 提示消息 */
.toasts { position: fixed; top: 16px; right: 16px; z-index: 90; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; min-width: 260px; max-width: 380px;
  padding: 12px 14px; border-radius: 10px; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-pop);
  font-size: 14px; animation: toast-in .28s var(--ease) both;
}
.toast.out { animation: toast-out .2s ease both; }
.toast .i { margin-top: 1px; }
.toast.success .i { color: var(--success); }
.toast.error .i { color: var(--danger); }
.toast.info .i { color: var(--info); }
@keyframes toast-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(16px); } }

/* 骨架 */
.skeleton { background: linear-gradient(90deg, #F2F3F5 25%, #EAEBEE 37%, #F2F3F5 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: 6px; }
@keyframes shimmer { from { background-position: 100% 50%; } to { background-position: 0 50%; } }

/* 均衡器（正在播放） */
.eq { display: inline-flex; align-items: flex-end; gap: 2px; width: 14px; height: 12px; flex: none; }
.eq i { display: block; width: 3px; border-radius: 1px; background: var(--info); animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(1) { height: 40%; animation-delay: -.2s; }
.eq i:nth-child(2) { height: 100%; animation-delay: -.5s; }
.eq i:nth-child(3) { height: 65%; animation-delay: -.8s; }
@keyframes eq { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
.eq i { transform-origin: bottom; }

/* ---------------- 账号卡片 ---------------- */
.acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.acc-card { display: flex; flex-direction: column; transition: box-shadow .2s, border-color .2s; }
.acc-card:hover { box-shadow: var(--shadow-hover); border-color: #DADCE1; }
.acc-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px 0; }
.acc-head .who { min-width: 0; flex: 1; }
.acc-head .name { font-size: 15px; font-weight: 600; }
.acc-head .uid { font-size: 12px; color: var(--text-3); }
.acc-progress { padding: 18px 20px 0; }
.acc-progress .top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: 13px; color: var(--text-2); }
.acc-progress .top b { font-size: 15px; color: var(--text-1); font-weight: 600; }
.acc-progress .top b small { font-weight: 400; color: var(--text-3); font-size: 13px; }
.acc-meta { display: flex; gap: 18px; padding: 14px 20px 0; font-size: 13px; color: var(--text-2); }
.acc-meta b { color: var(--text-1); font-weight: 600; }
.acc-hint { display: flex; align-items: center; gap: 8px; margin: 12px 20px 0; min-height: 20px; font-size: 13px; color: var(--text-2); }
.acc-hint .i { width: 15px; height: 15px; color: var(--text-3); }
.acc-hint.tone-danger { color: var(--danger); }
.acc-hint.tone-danger .i, .acc-hint.tone-orange .i { color: currentColor; }
.acc-hint.tone-orange { color: var(--orange); }
.acc-hint.tone-warning { color: var(--warning); }
.acc-hint .song { color: var(--text-1); }
.acc-foot { display: flex; align-items: center; gap: 8px; margin-top: 16px; padding: 12px 20px; border-top: 1px solid var(--border); }
.acc-foot .remark { flex: 1; min-width: 0; font-size: 13px; color: var(--text-3); }
.acc-add {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 238px;
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius-card); background: transparent;
  color: var(--text-2); transition: border-color .2s, color .2s, background .2s;
}
.acc-add:hover { border-color: var(--brand); color: var(--brand); background: #FFFBFB; }
.acc-add .plus { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-subtle); transition: background .2s; }
.acc-add:hover .plus { background: var(--brand-soft); }
.acc-add .t { font-size: 15px; font-weight: 500; color: var(--text-1); }
.acc-add .s { font-size: 13px; color: var(--text-3); }
.acc-add.full { cursor: default; }
.acc-add.full:hover { border-color: var(--border-strong); color: var(--text-2); background: transparent; }

.flash-num { animation: flash-num .6s ease; }
@keyframes flash-num { 0% { color: var(--brand); } 100% { color: inherit; } }

/* 详情页头 */
.detail-head { display: flex; align-items: center; gap: 16px; padding: 20px; }
.detail-head .who { flex: 1; min-width: 0; }
.detail-head .name-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.detail-head .name { font-size: 20px; font-weight: 600; }
.detail-head .meta { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.detail-head .ops { display: flex; gap: 8px; flex-wrap: wrap; }
.detail-tabs { padding: 0 20px; border-top: 1px solid var(--border); }
.detail-tabs .tabs { border-bottom: 0; }

.big-num { font-size: 32px; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.big-num small { font-size: 15px; font-weight: 400; color: var(--text-3); margin-left: 4px; }
.level-num { font-size: 32px; font-weight: 700; color: var(--brand); line-height: 1.2; }

.bars { display: flex; align-items: flex-end; gap: 10px; height: 128px; padding-top: 8px; }
.bars .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; min-width: 0; }
.bars .bar { flex: 1; width: 100%; max-width: 36px; border-radius: 5px; background: var(--bg-subtle); position: relative; overflow: hidden; }
.bars .bar i { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 5px; background: var(--success); transition: height .6s var(--ease); }
.bars .bar.failed i { background: var(--orange); }
.bars .bar.none i { background: transparent; }
.bars .d { font-size: 12px; color: var(--text-3); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--text-3); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend span::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--success); }
.legend span.f::before { background: var(--orange); }

.log {
  position: relative; height: 440px; overflow: auto; padding: 12px 14px;
  background: #FBFBFC; border: 1px solid var(--border); border-radius: 8px;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.75; color: #3A3F47;
}
.log-mini { height: auto; max-height: 190px; }
.log .ln { display: flex; gap: 12px; white-space: pre-wrap; word-break: break-all; }
.log .ln .t { color: var(--text-3); flex: none; }
.log .ln.ok .m { color: var(--success); }
.log .ln.warn .m { color: var(--warning); }
.log .ln.error .m { color: var(--danger); }
.log .ln.new { animation: fade-in .3s ease; }
.log-empty { color: var(--text-3); font-family: var(--font); font-size: 13px; padding: 24px 0; text-align: center; }
.log-wrap { position: relative; }
.log-latest { position: absolute; right: 14px; bottom: 12px; opacity: 0; transform: translateY(6px); pointer-events: none; transition: opacity .2s, transform .2s var(--ease); box-shadow: var(--shadow-pop); }
.log-latest.show { opacity: 1; transform: none; pointer-events: auto; }

.danger-zone { border: 1px solid #F3C1C1; border-radius: var(--radius-card); padding: 16px 20px; display: flex; align-items: center; gap: 16px; }
.danger-zone .text { flex: 1; }
.danger-zone .t { font-weight: 500; color: var(--danger); }
.danger-zone .d { font-size: 13px; color: var(--text-2); margin-top: 2px; }

/* 扫码 */
.qr-box { display: flex; flex-direction: column; align-items: center; padding: 8px 0 4px; }
.qr-frame { position: relative; width: 208px; height: 208px; border-radius: 12px; border: 1px solid var(--border); padding: 10px; background: #fff; }
.qr-frame .qr-img { width: 100%; height: 100%; }
.qr-frame .qr-img svg, .qr-frame .qr-img img { width: 100%; height: 100%; }
.qr-mask { position: absolute; inset: 0; border-radius: 12px; background: rgba(255, 255, 255, .94); display: none; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 16px; }
.qr-mask.show { display: flex; animation: fade-in .2s ease; }
.qr-mask .avatar { width: 52px; height: 52px; }
.qr-status { margin-top: 14px; font-size: 14px; color: var(--text-2); display: flex; align-items: center; gap: 8px; min-height: 22px; }
.qr-status.ok { color: var(--success); }
.qr-status.err { color: var(--danger); }
.qr-steps { margin-top: 14px; font-size: 13px; color: var(--text-3); text-align: center; }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--brand); animation: spin .8s linear infinite; flex: none; }

/* 卡密 */
.center-col { max-width: 560px; margin: 0 auto; }
.code-input { font-family: var(--mono); letter-spacing: 1px; text-transform: uppercase; }
.result-box { margin-top: 14px; padding: 14px 16px; border-radius: 8px; background: var(--success-soft); color: var(--success); display: flex; gap: 10px; align-items: flex-start; font-size: 14px; animation: page-in .3s var(--ease) both; }
.rights { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.right-item { padding: 14px 16px; border-radius: 8px; background: var(--bg-subtle); }
.right-item .k { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.right-item .v { font-size: 18px; font-weight: 600; margin-top: 4px; font-variant-numeric: tabular-nums; }
.right-item .s { font-size: 12px; color: var(--text-3); }

/* 消息列表 */
.msg-list { list-style: none; margin: 0; padding: 0; }
.msg-item { display: flex; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--border); transition: background .12s; }
.msg-item:last-child { border-bottom: 0; }
.msg-item:hover { background: #FAFBFC; }
.msg-item .ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--bg-subtle); color: var(--text-2); }
.msg-item .ico.cookie { background: var(--danger-soft); color: var(--danger); }
.msg-item .ico.task { background: var(--orange-soft); color: var(--orange); }
.msg-item .ico.vip { background: var(--warning-soft); color: var(--warning); }
.msg-item .ico.system { background: var(--info-soft); color: var(--info); }
.msg-item .body { flex: 1; min-width: 0; }
.msg-item .title { display: flex; align-items: center; gap: 8px; }
.msg-item.unread .title { font-weight: 600; }
.msg-item.unread .title::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.msg-item .text { color: var(--text-2); font-size: 13px; margin-top: 2px; }
.msg-item .time { color: var(--text-3); font-size: 12px; margin-top: 6px; display: flex; gap: 12px; }

.ann-list a { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--border); transition: background .12s; }
.ann-list a:last-child { border-bottom: 0; }
.ann-list a:hover { background: #FAFBFC; }
.ann-list .t { flex: 1; min-width: 0; font-weight: 500; }
.ann-list .d { font-size: 13px; color: var(--text-3); white-space: nowrap; }
.article { max-width: 760px; }
.article h1 { font-size: 22px; }
.article .meta { color: var(--text-3); font-size: 13px; margin-top: 8px; }
.article .prose { margin-top: 24px; font-size: 15px; line-height: 1.85; white-space: pre-wrap; word-break: break-word; }

/* 个人设置 */
.settings-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; align-items: start; }
.side-menu { display: flex; flex-direction: column; gap: 2px; position: sticky; top: calc(var(--topbar-h) + 24px); }
.side-menu a { height: 38px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border-radius: 8px; color: var(--text-2); transition: background .15s, color .15s; }
.side-menu a:hover { background: #fff; color: var(--text-1); }
.side-menu a.active { background: #fff; color: var(--brand); font-weight: 500; box-shadow: 0 0 0 1px var(--border); }

/* ---------------- 登录注册 ---------------- */
.auth { display: grid; grid-template-columns: minmax(360px, 42%) 1fr; min-height: 100vh; background: #fff; }
.auth-aside { position: relative; background: var(--bg-page); border-right: 1px solid var(--border); padding: 40px 48px; display: flex; flex-direction: column; overflow: hidden; }
.auth-aside .brand { padding: 0; }
.auth-pitch { margin-top: auto; margin-bottom: auto; padding: 40px 0; max-width: 420px; }
.auth-pitch h2 { font-size: 28px; line-height: 1.35; }
.auth-pitch p { color: var(--text-2); margin-top: 12px; font-size: 15px; }
.auth-anns { border-top: 1px solid var(--border); padding-top: 16px; }
.auth-anns .h { font-size: 13px; color: var(--text-3); margin-bottom: 8px; }
.auth-anns a { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 13px; color: var(--text-2); }
.auth-anns a:hover { color: var(--text-1); }
.auth-anns a span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-form { width: 100%; max-width: 360px; }
.auth-form h1 { font-size: 24px; }
.auth-form .sub { color: var(--text-2); margin-top: 6px; margin-bottom: 28px; }
.auth-form .foot { margin-top: 20px; text-align: center; color: var(--text-2); font-size: 14px; }
.auth-form .between { display: flex; justify-content: space-between; align-items: center; margin: -4px 0 20px; font-size: 13px; }
.gift { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); font-size: 13px; margin-bottom: 16px; }
.auth-mobile-brand { display: none; margin-bottom: 28px; }

/* ---------------- 落地页 ---------------- */
.landing { background: #fff; min-height: 100vh; }
.l-nav { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 18px 24px; }
.l-nav .brand { padding: 0; }
.l-nav .links { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.l-hero { max-width: 1120px; margin: 0 auto; padding: 56px 24px 72px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.l-hero h1 { font-size: 44px; line-height: 1.2; letter-spacing: -.5px; font-weight: 700; }
.l-hero .lead { font-size: 17px; color: var(--text-2); margin-top: 18px; max-width: 480px; line-height: 1.75; }
.l-hero .cta { display: flex; gap: 10px; margin-top: 32px; flex-wrap: wrap; }
.l-hero .fine { margin-top: 16px; font-size: 13px; color: var(--text-3); }
.l-demo { position: relative; }
.l-demo .acc-card { max-width: 420px; margin-left: auto; box-shadow: 0 24px 60px rgba(31, 35, 41, .10); }
.l-demo .log { height: 124px; margin: 14px 20px 0; font-size: 12px; overflow: hidden; }
.l-demo .ghost { position: absolute; right: 36px; top: -18px; width: 86%; height: 100%; border-radius: var(--radius-card); border: 1px solid var(--border); background: #FAFBFC; z-index: -1; transform: rotate(2.5deg); }
.l-section { background: var(--bg-page); border-top: 1px solid var(--border); }
.l-inner { max-width: 1120px; margin: 0 auto; padding: 64px 24px; }
.l-inner h2 { font-size: 24px; }
.l-inner .sub { color: var(--text-2); margin-top: 8px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 32px; }
.step { padding: 24px; }
.step .n { width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 14px; }
.step h3 { font-size: 16px; margin-top: 16px; }
.step p { color: var(--text-2); margin-top: 6px; font-size: 14px; }
.l-foot { max-width: 1120px; margin: 0 auto; padding: 28px 24px 40px; display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--text-3); }
.l-foot a:hover { color: var(--text-1); }
.l-section-plain { background: #fff; border-top: 1px solid var(--border); }
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; }
.mode { padding: 24px; }
.mode-k { width: 36px; height: 36px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.mode-k .i { width: 18px; height: 18px; }
.mode h3 { font-size: 16px; margin-top: 14px; }
.mode p { color: var(--text-2); margin-top: 6px; font-size: 14px; line-height: 1.7; }
.step-demo { max-width: 420px; margin-left: auto; padding-bottom: 8px; box-shadow: 0 18px 40px rgba(31, 35, 41, .08); }
.step-figure { padding: 4px 20px 0; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.step-num { font-size: 40px; font-weight: 700; letter-spacing: -1px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.step-cap { color: var(--text-3); font-size: 13px; }
.step-demo .progress { margin: 14px 20px 0; }
.step-rail { list-style: none; margin: 16px 12px 12px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.step-rail li { border-radius: 8px; padding: 8px 6px; background: var(--bg-page); text-align: center; }
.step-rail b { display: block; font-size: 12px; font-weight: 600; }
.step-rail span { display: block; margin-top: 2px; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.step-rail li.on { background: var(--brand-soft); }
.step-rail li.on span, .step-rail li.now span { color: var(--brand); }
.step-rail li.now { outline: 1px solid var(--brand); background: #fff; }

/* 维护 / 错误 */
.plain-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--bg-page); }
.plain-page .card { max-width: 440px; width: 100%; padding: 40px 32px; text-align: center; }
.plain-page .code { font-size: 48px; font-weight: 700; color: var(--brand); line-height: 1; }
.plain-page h1 { font-size: 18px; margin-top: 16px; }
.plain-page p { color: var(--text-2); margin-top: 8px; }
.plain-page .btn { margin-top: 24px; }

/* ---------------- 补充组件 ---------------- */
.seg.full { display: flex; width: 100%; margin-bottom: 18px; }
.seg.full button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.seg.full + .tab-panel, .seg.full ~ .tab-panel { margin-top: 0; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pills a, .pills button { height: 30px; padding: 0 12px; border-radius: 15px; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text-2); background: transparent; border: 1px solid transparent; transition: background .15s, color .15s, border-color .15s; }
.pills a:hover, .pills button:hover { background: var(--bg-hover); color: var(--text-1); }
.pills .active { background: var(--brand-soft); color: var(--brand); font-weight: 500; }
.msg-list > li > a { color: inherit; }
.hide-pc { display: none !important; }
.table .mono { font-size: 12.5px; }
.table td .badge { vertical-align: middle; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.code-list { font-family: var(--mono); font-size: 13px; line-height: 1.8; }
.kv-inline { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 13px; color: var(--text-2); }
.kv-inline b { color: var(--text-1); font-weight: 600; }
.bars .bar.stacked b { position: absolute; left: 0; right: 0; border-radius: 5px 5px 0 0; background: var(--orange); transition: height .6s var(--ease), bottom .6s var(--ease); }
a.stat { transition: border-color .15s, box-shadow .2s; }
a.stat:hover { border-color: #DADCE1; box-shadow: var(--shadow-hover); }
.dot-status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.dot-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.dot-status.on::before { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.dot-status.off::before { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1100px) {
  .grid-4, .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main { grid-template-columns: minmax(0, 1fr); }
  .l-hero { grid-template-columns: 1fr; gap: 40px; }
  .l-demo .acc-card, .step-demo { margin: 0 auto; }
}

@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: 272px; height: 100%;
    transform: translateX(-100%); transition: transform .28s var(--ease); box-shadow: none;
  }
  body.nav-open .sidebar { transform: none; box-shadow: var(--shadow-pop); }
  .scrim { display: block; position: fixed; inset: 0; background: rgba(31, 35, 41, .38); z-index: 35; opacity: 0; pointer-events: none; transition: opacity .25s; }
  body.nav-open .scrim { opacity: 1; pointer-events: auto; }
  .menu-toggle { display: inline-grid; }
  .topbar { padding: 0 16px; }
  .content { padding: 16px 16px calc(88px + env(safe-area-inset-bottom)); }
  .user-chip .name { display: none; }
  .bottom-nav {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
  }
  .bottom-nav a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; font-size: 11px; color: var(--text-3); transition: color .15s; }
  .bottom-nav a .i { width: 22px; height: 22px; }
  .bottom-nav a.active { color: var(--brand); }
  .bottom-nav a .dot { position: absolute; top: 2px; left: calc(50% + 8px); width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
  .settings-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .side-menu {
    position: static; flex-direction: row; flex-wrap: nowrap; gap: 8px;
    overflow-x: auto; margin: 0 -16px; padding: 2px 16px 6px;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .side-menu::-webkit-scrollbar { display: none; }
  .side-menu a { flex: none; height: 36px; white-space: nowrap; background: #fff; box-shadow: 0 0 0 1px var(--border); }
  .auth { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-mobile-brand { display: flex; }
  .hide-pc { display: flex !important; }
  .hide-mobile { display: none !important; }
}

@media (max-width: 640px) {
  .grid-2, .grid-3, .form-row, .steps, .rights, .modes { grid-template-columns: minmax(0, 1fr); }
  .stats { gap: 10px; }
  .stat { padding: 14px 16px; }
  .stat .v { font-size: 24px; }
  .page-head h1 { font-size: 18px; }
  .page-head .actions { margin-left: 0; width: 100%; }
  .acc-grid { grid-template-columns: minmax(0, 1fr); }
  .detail-head { flex-wrap: wrap; padding: 16px; }
  .detail-head .ops { width: 100%; }
  .detail-head .ops .btn { flex: 1; }
  .detail-tabs { padding: 0 16px; }
  .card-head { padding: 14px 16px 0; }
  .card-body { padding: 14px 16px 16px; }
  .card-foot { padding: 12px 16px; }
  .toolbar { padding: 12px 16px; }
  .toolbar .input, .toolbar .select { min-width: 0; flex: 1; }
  .table th, .table td { padding: 10px 12px; }
  .modal-root { align-items: flex-end; padding: 0; }
  .modal { width: 100% !important; border-radius: 16px 16px 0 0; max-height: 92vh; transform: translateY(40px); padding-bottom: env(safe-area-inset-bottom); }
  .modal-root.open .modal { transform: none; }
  .toasts { left: 12px; right: 12px; top: 12px; }
  .toast { min-width: 0; max-width: none; }
  .l-hero { padding: 24px 20px 48px; }
  .l-hero h1 { font-size: 32px; }
  .l-nav { padding: 14px 16px; }
  .l-inner { padding: 44px 20px; }
  .danger-zone { flex-direction: column; align-items: stretch; }
  .log { height: 360px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dt { font-size: 12px; line-height: 1.4; }
  .kv dd { margin: 0 0 12px; overflow-wrap: anywhere; line-height: 1.45; }
  .kv dd:last-child { margin-bottom: 0; }
  .switch-row { align-items: flex-start; gap: 12px; }
  .switch-row .t, .switch-row .d { line-height: 1.5; }
  .card-foot { flex-wrap: wrap; }
  .card-foot .faint { flex: 1 1 100%; margin-right: 0 !important; line-height: 1.5; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
