/* ============ LicenseManager 管理后台 · v3 设计体系 ============ */
:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --ink: #181b21;
  --muted: #68707d;
  --faint: #9aa1ac;
  --line: #e8eaef;
  --line-strong: #d9dde4;
  --accent: #4f46e5;
  --accent-strong: #4338ca;
  --accent-soft: #eef0fe;
  --green: #0d9463;
  --green-soft: #e5f6ef;
  --amber: #b45309;
  --amber-soft: #fdf2e1;
  --red: #d92d20;
  --red-soft: #fdeceb;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 8px;
  --shadow-card: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-pop: 0 24px 70px -12px rgba(16, 24, 40, .28);
  --mono: "Cascadia Mono", "JetBrains Mono", Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }
body { margin: 0; color: var(--ink); background: var(--bg); font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 14px; line-height: 1.6; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { outline-offset: 3px; }
button { cursor: pointer; }
a { text-decoration: none; }
.mono { font-family: var(--mono); font-size: 12.5px; letter-spacing: -.1px; }
.muted { color: var(--muted); }
.app { min-height: 100vh; }

/* ============ 侧边栏 ============ */
.sidebar { position: fixed; inset: 0 auto 0 0; width: 248px; padding: 22px 14px 16px; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 10; }
.brand { display: flex; align-items: center; gap: 12px; padding: 2px 10px 24px; color: inherit; }
.brand-mark { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 15px; background: linear-gradient(135deg, #6366f1, #4338ca); box-shadow: 0 4px 12px rgba(79, 70, 229, .35); }
.brand strong { display: block; font-size: 15px; letter-spacing: -.2px; color: var(--ink); }
.brand small { display: block; margin-top: 1px; color: var(--faint); font-size: 12px; }
.nav-label { padding: 6px 12px 8px; color: var(--faint); font-size: 11px; font-weight: 600; letter-spacing: 1.2px; }
.nav-button { border: 0; border-radius: var(--radius-sm); padding: 9px 12px; margin: 2px 0; background: transparent; color: #454c57; display: flex; align-items: center; gap: 10px; font-weight: 500; position: relative; transition: background .15s, color .15s; }
.nav-button:hover { background: #f3f4f7; color: var(--ink); }
.nav-button.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-button.active::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav-icon { width: 17px; height: 17px; flex: none; display: inline-flex; }
.nav-icon svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-button .cnt { margin-left: auto; font-size: 11px; font-weight: 600; background: #f0f1f4; color: var(--muted); border-radius: 99px; padding: 1px 8px; }
.nav-button.active .cnt { background: #fff; color: var(--accent); }
.sidebar-foot { margin-top: auto; border-top: 1px solid var(--line); padding: 14px 12px 2px; color: var(--faint); font-size: 12px; line-height: 1.8; }

/* ============ 主区域骨架 ============ */
.main { min-height: 100vh; margin-left: 248px; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 8; height: 62px; padding: 0 36px; display: flex; align-items: center; justify-content: space-between; background: rgba(255, 255, 255, .82); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.breadcrumb { color: var(--muted); font-size: 13px; }
.breadcrumb strong { color: var(--ink); font-weight: 600; }
.admin { display: flex; align-items: center; gap: 10px; padding: 5px 12px 5px 6px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); }
.avatar { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg, #818cf8, #4f46e5); color: #fff; font-size: 12px; font-weight: 700; }
.admin > span { font-size: 13px; font-weight: 500; }
.logout { border: 0; color: var(--faint); background: transparent; padding: 4px 6px; border-radius: 6px; font-size: 12.5px; }
.logout:hover { color: var(--accent); background: var(--accent-soft); }
.content { width: 100%; max-width: 1440px; margin: 0 auto; padding: 30px 36px 48px; flex: 1 0 auto; }

/* ============ 页面标题 ============ */
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
h1 { margin: 0; font-size: 21px; letter-spacing: -.4px; font-weight: 650; }
.subtitle { margin: 5px 0 0; color: var(--muted); font-size: 13px; }

/* ============ 卡片 / 按钮 / 表单 ============ */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.offline-card { max-width: 760px; }
.card-head { padding: 16px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.card-head h2 { margin: 0; font-size: 15px; font-weight: 650; }
.card-body { padding: 22px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: var(--radius-sm); padding: 8px 15px; font-weight: 600; font-size: 13.5px; text-align: center; transition: background .15s, border-color .15s, box-shadow .15s, transform .05s; }
.btn:active { transform: translateY(1px); }
.btn-primary { color: #fff; background: var(--accent); box-shadow: 0 1px 2px rgba(79, 70, 229, .4); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-secondary { color: #3a414c; background: var(--surface); border-color: var(--line-strong); }
.btn-secondary:hover { background: #f6f7f9; border-color: #c3c9d2; }
.btn-danger { color: var(--red); background: var(--surface); border-color: #f3c6c2; }
.btn-danger:hover { background: var(--red-soft); }
.btn-link { border: 0; padding: 0; color: var(--accent); background: transparent; font-weight: 600; }
.btn-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.btn .ic { width: 17px; height: 17px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { color: var(--muted); font-size: 12px; font-weight: 600; }
.filters, .toolbar { padding: 14px 16px; margin-bottom: 16px; display: flex; flex-wrap: nowrap; gap: 12px; align-items: center; overflow-x: auto; }
.filters .field, .toolbar .field { flex: 1; min-width: 130px; flex-direction: row; align-items: center; gap: 8px; }
.filters .field label, .toolbar .field label { white-space: nowrap; }
.filters .field select, .toolbar .field select { flex: 1; min-width: 0; }
.filters .btn, .toolbar .btn { flex-shrink: 0; white-space: nowrap; }
input, select, textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 8px 11px; color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s; }
input:hover, select:hover, textarea:hover { border-color: #c3c9d2; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79, 70, 229, .13); outline: none; }
input::placeholder, textarea::placeholder { color: var(--faint); }
textarea { resize: vertical; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2368707d' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; }
.form-stack { display: flex; flex-direction: column; gap: 16px; }
.form-actions { display: flex; gap: 10px; padding-top: 5px; }
.form-actions.actions-right { justify-content: flex-end; }

/* ============ 表单两列栅格 / 字段提示 ToolTip ============ */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.label-with-hint { display: inline-flex; align-items: center; gap: 6px; }
.hint { position: relative; display: inline-flex; align-items: center; color: var(--faint); cursor: help; outline: none; }
.hint .ic { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.hint:hover, .hint:focus-visible { color: var(--accent); }
.hint::after {
  content: attr(data-tip);
  position: absolute; top: calc(100% + 9px); right: -6px; z-index: 20;
  width: 264px; box-sizing: border-box; padding: 9px 11px;
  background: #2c3140; color: #fff; border-radius: 8px;
  box-shadow: 0 10px 28px rgba(16, 24, 40, .24);
  font-size: 12px; font-weight: 400; line-height: 1.65; letter-spacing: 0; text-align: left;
  white-space: normal; pointer-events: none;
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.hint::before {
  content: ""; position: absolute; top: calc(100% + 3px); right: 0; z-index: 21;
  border: 6px solid transparent; border-top: 0; border-bottom-color: #2c3140;
  pointer-events: none; opacity: 0; visibility: hidden;
  transition: opacity .15s, visibility .15s;
}
.hint:hover::after, .hint:focus-visible::after { opacity: 1; visibility: visible; transform: none; }
.hint:hover::before, .hint:focus-visible::before { opacity: 1; visibility: visible; }
.divider { height: 1px; margin: 20px 0; background: var(--line); }
.back { display: inline-block; margin-bottom: 16px; color: var(--muted); }
.back:hover { color: var(--accent); }

/* ============ 表格 ============ */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th { padding: 11px 18px; background: #fafbfc; border-bottom: 1px solid var(--line); color: var(--faint); font-size: 11.5px; font-weight: 600; letter-spacing: .4px; text-align: left; white-space: nowrap; }
td { padding: 13px 18px; border-bottom: 1px solid #f1f2f5; vertical-align: middle; white-space: nowrap; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: #f8f9fd; }
tbody tr:last-child td { border-bottom: 0; }
.cell-main { font-weight: 550; color: var(--ink); }
a.cell-main { color: var(--accent); font-weight: 600; }
a.cell-main:hover { text-decoration: underline; text-underline-offset: 3px; }
.cell-sub { color: var(--faint); font-size: 12px; margin-top: 1px; }
.request-id { color: var(--accent); font-weight: 650; font-family: var(--mono); font-size: 12.5px; }
.project-count { font-variant-numeric: tabular-nums; }
.table-footer { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line); color: var(--faint); font-size: 12px; }
.empty { padding: 52px 20px; text-align: center; color: var(--faint); }

/* ============ 徽章 / 额度 / 标签 ============ */
.badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 99px; padding: 3px 10px; font-size: 12px; font-weight: 600; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.pending { color: var(--amber); background: var(--amber-soft); }
.badge.pending::before { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.badge.issued, .badge.active { color: var(--green); background: var(--green-soft); }
.badge.rejected, .badge.disabled { color: var(--red); background: var(--red-soft); }
.source { color: #475569; background: #f0f1f4; border-radius: 6px; padding: 3px 9px; font-size: 12px; }
.quota { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; padding: 2px 10px; border-radius: 7px; font-weight: 700; font-size: 13px; color: var(--accent); background: var(--accent-soft); font-variant-numeric: tabular-nums; }
.quota.low { color: var(--red); background: var(--red-soft); }

/* ============ 列表开关（自动签发） ============ */
.switch { position: relative; display: inline-block; width: 40px; height: 22px; vertical-align: middle; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.slider { position: absolute; inset: 0; background: #ccd1d9; border-radius: 99px; transition: background .2s, filter .2s; }
.slider::before { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(16, 24, 40, .3); transition: transform .2s cubic-bezier(.34, 1.4, .64, 1); }
.switch:hover .slider { filter: brightness(.94); }
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider::before { transform: translateX(18px); }
.switch input:focus-visible + .slider { outline: 2px solid var(--accent); outline-offset: 3px; }
.switch.busy { cursor: progress; opacity: .6; }

/* ============ 详情页 ============ */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr); gap: 20px; align-items: start; }
.info-list { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.info-item.full { grid-column: 1 / -1; }
.info-label { margin-bottom: 5px; color: var(--faint); font-size: 12px; }
.info-value { line-height: 1.55; word-break: break-all; }
.info-value.mono { background: #f6f7f9; border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px; }
.notice { padding: 12px 14px; margin-bottom: 18px; color: #3c3fa3; background: var(--accent-soft); border-radius: var(--radius-sm); line-height: 1.65; font-size: 13px; }
.notice.success { color: #0b6b4a; background: var(--green-soft); }
.reject-panel { padding: 16px; background: #fdf6f5; border: 1px solid #f3d4d1; border-radius: var(--radius-md); }
.download-button { width: 100%; margin-top: 22px; }
.processed-label { margin-top: 20px; }

/* ============ 表单校验 ============ */
.validation-summary:not(:empty) { margin-bottom: 18px; padding: 12px 15px 12px 32px; color: var(--red); background: var(--red-soft); border: 1px solid #f3d4d1; border-radius: var(--radius-sm); }
.validation-summary:empty, .validation-summary-valid { display: none; }
.field-error { color: var(--red); font-size: 12px; }
.input-validation-error { border-color: var(--red); }

/* ============ 登录页 ============ */
.login-view { min-height: 100vh; display: flex; flex-direction: column; background: var(--surface); }
.login-shell { flex: 1 0 auto; display: grid; grid-template-columns: 1.1fr .9fr; background: white; }
.login-brand { padding: 70px; color: white; background: linear-gradient(160deg, #312e81 0%, #4338ca 55%, #4f46e5 100%); display: flex; flex-direction: column; justify-content: space-between; }
.login-brand .brand strong { color: #fff; }
.login-brand .brand small { color: #c7c9f4; }
.login-brand h2 { max-width: 450px; margin: 80px 0 20px; font-size: 36px; line-height: 1.35; letter-spacing: -.5px; }
.login-brand p { max-width: 460px; color: #c7c9f4; font-size: 16px; line-height: 1.9; }
.login-brand > small { color: #a5a8ee; }
.login-form-wrap { display: grid; place-items: center; padding: 40px; }
.login-form { width: min(390px, 100%); }
.login-form h1 { margin-bottom: 10px; }
.login-form .subtitle { margin-bottom: 32px; }
.login-form .field { margin-bottom: 18px; }
.login-form .btn { width: 100%; margin-top: 8px; padding: 12px; }

/* ============ 备案号页脚 · A 简洁内联 ============ */
.site-footer { flex: none; font-size: 12.5px; color: var(--faint); background: transparent; border-top: 1px solid var(--line); }
.foot-inner { max-width: 1440px; margin: 0 auto; padding: 16px 36px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.foot-left { display: flex; align-items: center; gap: 10px; }
.foot-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.beian { display: inline-flex; align-items: center; color: #5b6270; font-weight: 550; white-space: nowrap; transition: color .15s; }
.beian:hover { color: var(--accent); }
.beian:hover .beian-text { text-decoration: underline; text-underline-offset: 3px; }
.beian:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.beian .beian-icon { display: block; width: auto; height: auto; max-height: 18px; flex: none; margin-right: 5px; }
.beian:hover .beian-icon { opacity: .88; }
.beian.is-placeholder { color: var(--muted); }
.beian.is-placeholder .beian-text { font-weight: 500; }
.foot-sep { color: var(--line-strong); }
.login-view .site-footer { background: var(--surface); }

/* ============ 覆盖层：抽屉 / 弹窗 ============ */
.hidden { display: none !important; }
body.layer-open { overflow: hidden; }
.x-btn { border: 0; background: transparent; color: var(--faint); width: 30px; height: 30px; border-radius: var(--radius-sm); display: grid; place-items: center; flex: none; }
.x-btn:hover { background: #f3f4f7; color: var(--ink); }
.layer-head { position: sticky; top: 0; z-index: 2; background: var(--surface); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.layer-body { padding: 22px 24px 28px; overflow-y: auto; flex: 1; }
.layer-loading { padding: 40px 0; text-align: center; color: var(--faint); }
/* 编辑页局部片段：去掉外层卡片壳，由弹窗提供容器 */
.layer-body > .card { border: 0; box-shadow: none; }
.layer-body > .card > .card-body { padding: 0; }

/* 设备详情：档案与编辑合并为单一区块，无卡片标题（原型风格） */
.device-profile .card-body { padding: 20px 22px; }
.device-profile .info-list { gap: 16px 20px; }
.device-profile .divider { margin: 18px 0; }
.device-profile .form-actions { margin-top: 2px; }
/* 弹窗内直接铺在 layer-body 上，不再出现卡片壳 */
.layer-body .device-profile { border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.layer-body .device-profile > .card-body { padding: 0; }

.modal-back { position: fixed; inset: 0; background: rgba(20, 23, 30, .45); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 40; padding: 24px; opacity: 0; transition: opacity .18s; }
.modal-back.show { opacity: 1; }
.modal { width: min(600px, 100%); max-height: 88vh; display: flex; flex-direction: column; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-pop); transform: translateY(10px) scale(.97); transition: transform .18s cubic-bezier(.2, .9, .3, 1.2); }
.modal.modal-lg { width: min(760px, 100%); }
.modal-back.show .modal { transform: none; }

.drawer-back { position: fixed; inset: 0; background: rgba(20, 23, 30, .45); backdrop-filter: blur(3px); z-index: 40; opacity: 0; transition: opacity .2s; }
.drawer-back.show { opacity: 1; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(620px, 94vw); display: flex; flex-direction: column; background: var(--surface); box-shadow: -18px 0 60px rgba(16, 24, 40, .22); z-index: 41; transform: translateX(40px); opacity: 0; transition: transform .22s cubic-bezier(.2, .9, .3, 1), opacity .22s; }
.drawer.show { transform: none; opacity: 1; }
.drawer .detail-grid, .modal .detail-grid { grid-template-columns: 1fr; }
.drawer .info-list, .modal .info-list { gap: 16px 20px; }

/* ============ 统计卡片 / 页签 ============ */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 12px 14px; background: #fafbfc; }
.stat .num { font-size: 20px; font-weight: 700; letter-spacing: -.5px; font-variant-numeric: tabular-nums; word-break: break-word; }
.stat .label { color: var(--faint); font-size: 11.5px; margin-bottom: 4px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 20px 0 16px; }
.tab { border: 0; background: transparent; padding: 9px 13px; color: var(--muted); font-weight: 550; border-bottom: 2px solid transparent; margin-bottom: -1px; border-radius: 6px 6px 0 0; transition: color .15s, background .15s; }
.tab:hover { color: var(--ink); background: #f6f7f9; }
.tab.active-tab { color: var(--accent); border-bottom-color: var(--accent); background: transparent; }
[data-tab-panel] .table-wrap { border: 1px solid var(--line); border-radius: var(--radius-md); }

/* ============ 弹窗内页签表格：固定三行 + 垂直滚动（全页直访不受限） ============ */
.modal.modal-fixed { width: min(760px, 100%); height: min(620px, 88vh); }
.modal.modal-tabs { width: min(760px, 100%); }
.tab-note { margin-left: auto; align-self: center; font-size: 12px; white-space: nowrap; }
.modal [data-tab-panel] .table-wrap {
  /* 表头 38px + 3 行 × 44px + 上下边框 2px；超出部分垂直滚动 */
  height: 172px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.modal [data-tab-panel] .table-wrap::-webkit-scrollbar { width: 8px; }
.modal [data-tab-panel] .table-wrap::-webkit-scrollbar-thumb { background: #d9dde4; border: 2px solid #fff; border-radius: 8px; }
.modal [data-tab-panel] table { table-layout: fixed; }
.modal [data-tab-panel] th,
.modal [data-tab-panel] td { padding: 0 14px; overflow: hidden; text-overflow: ellipsis; }
.modal [data-tab-panel] thead th { position: sticky; top: 0; z-index: 1; height: 38px; background: #fafbfc; box-shadow: inset 0 -1px 0 var(--line); }
.modal [data-tab-panel] tbody td { height: 44px; }
.modal [data-tab-panel] .empty-row td { height: 132px; text-align: center; color: var(--faint); }
.modal .fp { color: var(--muted); cursor: copy; transition: color .15s; }
.modal .fp:hover { color: var(--accent); }

/* ============ Toast ============ */
.toasts { position: fixed; right: 24px; bottom: 24px; z-index: 60; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; align-items: center; gap: 10px; max-width: 400px; background: #1d2129; color: #fff; padding: 12px 16px; border-radius: 11px; box-shadow: 0 14px 40px rgba(16, 24, 40, .35); font-size: 13.5px; opacity: 0; transform: translateY(12px); transition: .22s cubic-bezier(.2, .9, .3, 1.15); }
.toast.show { opacity: 1; transform: none; }
.toast .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.toast.success .dot { background: #34d399; }
.toast.info .dot { background: #818cf8; }
.toast.error .dot { background: #f87171; }
.info-value.mono { cursor: copy; transition: border-color .15s; }
.info-value.mono:hover { border-color: var(--accent); }

/* ============ 响应式 ============ */
@media (max-width: 1050px) {
  .detail-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .hint::after { width: min(264px, 76vw); }
  .drawer { width: 100vw; }
  .modal-back { padding: 12px; }
}
@media (max-width: 720px) {
  .sidebar { position: static; width: auto; padding: 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 0 4px 14px; }
  .nav-label, .sidebar-foot { display: none; }
  .nav-button { display: inline-flex; width: auto; }
  .nav-button.active::before { display: none; }
  .main { margin-left: 0; }
  .topbar { padding: 0 18px; }
  .content { padding: 24px 18px; }
  .filters, .toolbar { flex-wrap: wrap; }
  .info-list { grid-template-columns: 1fr; }
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .foot-inner { padding: 14px 18px; flex-direction: column; justify-content: center; text-align: center; }
  .foot-left, .foot-right { justify-content: center; }
  .foot-sep { display: none; }
}
