:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --ink: #17212b;
  --ink-soft: #344054;
  --muted: #697586;
  --line: #e3e8ee;
  --line-soft: #eef2f6;
  --brand: #0f766e;
  --brand-dark: #0b5f59;
  --brand-soft: #e6f4f2;
  --danger: #b42318;
  --danger-soft: #fef3f2;
  --warn: #b54708;
  --warn-soft: #fffaeb;
  --ok: #067647;
  --ok-soft: #ecfdf3;
  --info: #175cd3;
  --info-soft: #eff8ff;
  --sidebar: #101c26;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .04);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei",
    "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, p { margin-top: 0; }
button, input, select, textarea { font-family: inherit; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12.5px;
}
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.text-warn { color: var(--warn); }
.text-danger { color: var(--danger); }
.link { color: var(--brand); font-size: 12.5px; white-space: nowrap; }
.clamp {
  display: inline-block; max-width: 220px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom;
}
.inline-form { display: inline; }

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

.sidebar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  flex: 0 0 248px;
  flex-direction: column;
  width: 248px;
  height: 100vh;
  padding: 22px 14px 16px;
  background: linear-gradient(180deg, #11202c, #0b141b);
  color: #cbd5df;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 22px; }
.brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px;
  border-radius: 11px; background: linear-gradient(135deg, #14b8a6, #0f766e);
  color: #fff; font-size: 18px; font-weight: 700;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.brand-text strong { color: #fff; font-size: 15px; letter-spacing: .01em; }
.brand-text small { color: #7d8b99; font-size: 11px; letter-spacing: .06em; }

.nav { display: flex; flex: 1; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav-heading {
  margin: 18px 10px 6px;
  color: #647586;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
}
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  color: #b6c2ce;
  font-size: 13.5px;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; }
.nav-item.active { background: rgba(20, 184, 166, .14); color: #5eead4; }
.nav-item.active::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 3px; border-radius: 0 3px 3px 0; background: #2dd4bf;
}
.nav-icon { display: none; }
.sidebar-foot {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 10px 4px; color: #647586; font-size: 11.5px;
  border-top: 1px solid rgba(255, 255, 255, .06);
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #2dd4bf; box-shadow: 0 0 0 3px rgba(45, 212, 191, .16);
}
.sidebar-backdrop { display: none; }

.app-main { display: flex; flex: 1; flex-direction: column; min-width: 0; min-height: 100vh; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 14px 30px;
  background: rgba(255, 255, 255, .93);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.topbar-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.page-heading { min-width: 0; }
.page-heading h1 { margin: 0; font-size: 19px; letter-spacing: -.01em; }
.page-subtitle { margin: 3px 0 0; color: var(--muted); font-size: 12.5px; }
.page-subtitle p { margin: 0; }
.topbar-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }

.menu-btn {
  display: none; align-items: center; justify-content: center;
  width: 36px; height: 36px; padding: 0;
  border: 1px solid var(--line); border-radius: 9px;
  background: #fff; cursor: pointer;
}
.menu-lines, .menu-lines::before, .menu-lines::after {
  display: block; width: 16px; height: 2px; border-radius: 2px;
  background: var(--ink-soft); content: "";
}
.menu-lines { position: relative; }
.menu-lines::before { position: absolute; top: -5px; }
.menu-lines::after { position: absolute; top: 5px; }

.account {
  display: flex; align-items: center; gap: 9px;
  padding-left: 12px; border-left: 1px solid var(--line);
}
.account-avatar {
  display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 10px; background: var(--brand-soft); color: var(--brand);
  font-size: 14px; font-weight: 600;
}
.account-meta { display: flex; flex-direction: column; line-height: 1.25; }
.account-meta strong { font-size: 12.5px; }
.account-meta small { color: var(--muted); font-size: 11px; }
.account-menu { display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
.account-link {
  padding: 0; border: 0; background: none; color: var(--muted);
  font-size: 12.5px; text-decoration: none; cursor: pointer;
}
.account-link:hover { color: var(--brand); text-decoration: underline; }
.account-link.danger { color: var(--danger); }

.content { flex: 1; width: 100%; max-width: 1480px; margin: 0 auto; padding: 26px 30px 40px; }
.app-footer {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 16px 30px 22px;
  color: var(--muted); font-size: 11.5px;
  border-top: 1px solid var(--line-soft);
}

/* ---------- 卡片 ---------- */
.card {
  margin-bottom: 20px; padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px; margin-bottom: 14px;
}
.card-head h2, .card > h2 { margin: 0 0 2px; font-size: 15px; }
.card-head p { margin: 0; font-size: 12.5px; }
.dashboard-grid {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 20px; align-items: start;
}
.dashboard-grid > .card { margin-bottom: 20px; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px; margin-bottom: 20px;
}
.stat-card {
  position: relative; display: flex; flex-direction: column; gap: 3px;
  overflow: hidden; padding: 18px 20px;
  background: var(--surface); color: inherit;
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.stat-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px; background: var(--brand);
}
.stat-card-warn::before { background: #f79009; }
.stat-card:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(16, 24, 40, .07); text-decoration: none; }
.stat-label { color: var(--muted); font-size: 12.5px; }
.stat-value { font-size: 30px; line-height: 1.15; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-foot { color: var(--muted); font-size: 12px; }

.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(260px, .75fr);
  gap: 20px; align-items: start;
}
.go-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, .7fr);
  gap: 20px; align-items: start;
}
.go-grid > .card { margin-bottom: 20px; }
.product-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px; margin-bottom: 18px; padding-bottom: 16px;
  border-bottom: 1px solid var(--line-soft);
}
.product-eyebrow {
  margin: 0 0 4px; color: var(--muted);
  font-size: 11.5px; letter-spacing: .12em;
}
.product-title { margin: 0 0 6px; font-size: 22px; line-height: 1.3; letter-spacing: -.01em; }
.product-sku { margin: 0; color: var(--muted); }
.detail-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 22px; margin: 0;
}
.detail-item { min-width: 0; }
.detail-item dt { margin-bottom: 3px; color: var(--muted); font-size: 11.5px; }
.detail-item dd { margin: 0; color: var(--ink); font-size: 13.5px; word-break: break-word; }
.detail-span { grid-column: 1 / -1; }
.detail-notes { white-space: pre-wrap; }
.qr-card {
  position: sticky; top: 92px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  text-align: center;
}
.qr-card h2 { margin: 0; font-size: 15px; }
.qr-image {
  width: min(300px, 100%); height: auto; padding: 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
}
.qr-hint { margin: 0; color: var(--ink-soft); font-size: 12.5px; }
.qr-target {
  max-width: 100%; margin: 0; color: var(--muted);
  font-size: 11.5px; word-break: break-all;
}
.qr-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.tips-card { position: sticky; top: 92px; }
.tips-card h2 { font-size: 14px; margin-bottom: 10px; }
.tips {
  display: flex; flex-direction: column; gap: 9px;
  margin: 0; padding-left: 18px; color: var(--ink-soft); font-size: 13px;
}
.tips li::marker { color: var(--brand); }
.column-list { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; padding: 0; list-style: none; }
.column-list li { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 12.5px; }
.column-list span {
  display: grid; place-items: center; width: 22px; height: 22px;
  border-radius: 6px; background: #eef2f6; color: #475467;
  font-size: 11px; font-weight: 600;
}

.form-card { max-width: 960px; }
.form-card.narrow { max-width: 580px; }
.form { display: flex; flex-direction: column; gap: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.field-span { grid-column: 1 / -1; }
.form-actions {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 4px; padding-top: 16px; border-top: 1px solid var(--line-soft);
}
.meta-line { margin: 0; color: var(--muted); font-size: 12px; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { color: var(--ink-soft); font-size: 13px; font-weight: 500; }
.field > span em { color: var(--danger); font-style: normal; }
.field input, .field select, .field textarea,
.filters input, .filters select {
  width: 100%; min-height: 38px; padding: 9px 12px;
  color: var(--ink); background: #fff;
  border: 1px solid #d5dce5; border-radius: 9px;
  font-size: 13.5px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { min-height: 96px; line-height: 1.6; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus,
.filters input:focus, .filters select:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .12);
}
.field input:disabled { background: #f2f4f7; color: var(--muted); }
.field input[type="file"] { padding: 7px 10px; }
.field-hint { color: var(--muted); font-size: 12px; font-weight: 400; }
.field-error { margin: 0; color: var(--danger); font-size: 12px; }

.filters {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.filters input[type="search"] { flex: 1; min-width: 220px; }
.filters select { width: auto; min-width: 130px; }

.choice-group { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; border: 0; }
.choice-group legend { margin-bottom: 6px; padding: 0; color: var(--ink-soft); font-size: 13px; font-weight: 600; }
.choice {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  cursor: pointer; transition: border-color .15s ease, background .15s ease;
}
.choice:has(input:checked) { border-color: #99e0d9; background: #f0fdfa; }
.choice input { margin-top: 3px; accent-color: var(--brand); }
.choice strong { display: block; font-size: 13px; }
.choice small { display: block; color: var(--muted); font-size: 12px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 36px; padding: 7px 14px;
  border: 1px solid var(--line); border-radius: 9px;
  background: #fff; color: var(--ink);
  font-size: 13px; font-weight: 500; line-height: 1.2;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { background: #f8fafc; border-color: #cbd5e1; text-decoration: none; }
.btn-primary { border-color: var(--brand); background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-danger { border-color: #f3c6c1; color: var(--danger); background: #fff; }
.btn-danger:hover { background: var(--danger-soft); border-color: #efb4ad; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-ghost:hover { background: #eef2f6; border-color: transparent; color: var(--ink); }
.btn-sm { min-height: 29px; padding: 4px 9px; border-radius: 7px; font-size: 12px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; margin: 0 -2px; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11.5px; font-weight: 600; letter-spacing: .04em;
  text-align: left; white-space: nowrap;
}
.table td { padding: 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fbfcfd; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-wide { min-width: 1080px; }
.actions-col { width: 1%; text-align: right; }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.row-actions form { display: inline; }
.row-note { display: block; margin-top: 2px; color: var(--muted); font-size: 11.5px; }
.row-missing { background: #fafafa; }
.row-error { background: #fff8f7; }
.log-table { min-width: 720px; }
.log-id-col { width: 90px; }
.log-text { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; word-break: break-word; }
.log-list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.log-list li {
  display: flex; gap: 10px; padding: 9px 12px;
  border: 1px solid var(--line-soft); border-radius: 9px;
  background: #fbfcfd; font-size: 12.5px;
}
.log-list .log-error { background: #fff8f7; border-color: #fbd9d4; color: var(--danger); }
.log-id { flex: 0 0 auto; color: var(--muted); }
.log-content { word-break: break-word; }

/* ---------- 徽标 / 标签页 / 提示 ---------- */
.badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 500; line-height: 1.6;
  white-space: nowrap;
}
.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(--danger); }
.badge-muted { background: #eef2f6; color: #475467; }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-role { background: var(--brand-soft); color: var(--brand); margin-left: 6px; }

.tabs {
  display: flex; gap: 2px; overflow-x: auto;
  margin: -4px 0 16px; border-bottom: 1px solid var(--line);
}
.tabs a {
  position: relative; padding: 10px 12px;
  color: var(--muted); font-size: 13px; font-weight: 500;
  white-space: nowrap; text-decoration: none;
}
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.active { color: var(--brand); }
.tabs a.active::after {
  content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px;
  height: 2px; border-radius: 2px; background: var(--brand);
}
.tab-count {
  display: inline-block; min-width: 20px; margin-left: 4px; padding: 1px 6px;
  border-radius: 999px; background: #eef2f6; color: #475467;
  font-size: 11px; text-align: center;
}
.tabs a.active .tab-count { background: var(--brand-soft); color: var(--brand); }

.flash-stack { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.alert {
  padding: 11px 14px; border: 1px solid transparent; border-radius: 10px;
  font-size: 13px;
}
.alert-success { background: var(--ok-soft); border-color: #abefc6; color: var(--ok); }
.alert-error { background: var(--danger-soft); border-color: #fecaca; color: var(--danger); }
.alert-warning { background: var(--warn-soft); border-color: #fedf89; color: var(--warn); }
.alert-info { background: var(--info-soft); border-color: #b2ddff; color: var(--info); }
.alert-list { margin: 6px 0 0; padding-left: 20px; }
.alert-list li { margin-top: 2px; }

/* ---------- 分页 / 空状态 ---------- */
.list-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-top: 16px;
  color: var(--muted); font-size: 12.5px;
}
.pager { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pager a, .pager span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 31px; height: 31px; padding: 0 9px;
  border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--ink-soft); font-size: 12.5px;
}
.pager a:hover { border-color: #cbd5e1; background: #f8fafc; text-decoration: none; }
.pager .current { border-color: var(--brand); background: var(--brand); color: #fff; }
.pager .disabled { color: #b8c1cc; background: #f9fafb; }
.empty-state { padding: 46px 20px; text-align: center; }
.empty-title { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.empty-state .btn { margin-top: 10px; }
.empty-inline { margin: 6px 0 2px; padding: 16px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: 13px; text-align: center; }

.role-card { margin-top: 4px; }
.role-table td:first-child { width: 130px; }

/* ---------- 登录 ---------- */
.login-body {
  min-height: 100vh;
  background:
    radial-gradient(1100px 560px at 8% -10%, rgba(20, 184, 166, .16), transparent 60%),
    radial-gradient(900px 520px at 108% 112%, rgba(59, 130, 246, .10), transparent 55%),
    #f3f6f8;
}
.login-page { display: grid; place-items: center; min-height: 100vh; padding: 28px; }
.login-card {
  display: grid; grid-template-columns: 1.05fr .95fr;
  width: min(980px, 100%); overflow: hidden;
  background: #fff; border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 22px;
  box-shadow: 0 24px 80px rgba(16, 24, 40, .16);
}
.login-aside {
  position: relative; display: flex; flex-direction: column; gap: 34px;
  overflow: hidden; padding: 42px 40px;
  background: linear-gradient(150deg, #0e2a33, #0f766e 92%);
  color: #e6fffa;
}
.login-aside::after {
  content: ""; position: absolute; right: -110px; bottom: -140px;
  width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(94, 234, 212, .24), transparent 68%);
  pointer-events: none;
}
.login-aside .brand { padding: 0; }
.brand-light .brand-text small { color: #a7ded6; }
.login-copy { position: relative; z-index: 1; }
.login-copy h1 { margin: 0 0 14px; color: #fff; font-size: 30px; line-height: 1.25; letter-spacing: -.02em; }
.login-copy p { margin: 0; color: #c8f5ee; font-size: 13.5px; line-height: 1.7; }
.login-points { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; color: #ccfbf1; font-size: 13px; }
.login-points li { position: relative; padding-left: 20px; }
.login-points li::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 7px; height: 7px; border-radius: 50%; background: #5eead4;
}
.login-aside-foot { position: relative; z-index: 1; margin: auto 0 0; color: #9fded6; font-size: 11.5px; letter-spacing: .08em; }
.login-main { display: flex; flex-direction: column; justify-content: center; padding: 52px 46px; }
.login-form-head h2 { margin: 0 0 4px; font-size: 22px; letter-spacing: -.01em; }
.login-form-head p { margin: 0; color: var(--muted); font-size: 13px; }
.login-form { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
.login-note { margin: 18px 0 0; color: var(--muted); font-size: 11.5px; line-height: 1.65; }

/* ---------- 错误页 ---------- */
.error-page { display: grid; place-items: center; min-height: 100vh; padding: 28px; }
.error-card {
  width: min(520px, 100%); padding: 40px 36px; text-align: center;
  background: #fff; border: 1px solid var(--line); border-radius: 20px;
  box-shadow: var(--shadow);
}
.error-code { margin-bottom: 8px; color: var(--brand); font-size: 46px; font-weight: 700; letter-spacing: -.03em; }
.error-card h1 { margin: 0 0 8px; font-size: 19px; }
.error-actions { margin-top: 20px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  .dashboard-grid, .split-grid { grid-template-columns: 1fr; }
  .go-grid { grid-template-columns: 1fr; }
  .qr-card { position: static; order: -1; }
  .tips-card { position: static; }
}

@media (max-width: 980px) {
  .sidebar {
    position: fixed; left: 0; top: 0;
    width: 264px; flex-basis: 264px;
    transform: translateX(-100%);
    transition: transform .2s ease;
  }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-backdrop {
    position: fixed; inset: 0; z-index: 35;
    display: none; background: rgba(8, 18, 27, .48);
  }
  body.sidebar-open .sidebar-backdrop { display: block; }
  .menu-btn { display: inline-flex; }
  .topbar { align-items: flex-start; padding: 12px 16px; }
  .topbar-right { gap: 8px; }
  .account { padding-left: 8px; }
  .account-menu { display: none; }
  .content { padding: 18px 16px 32px; }
  .app-footer { padding: 14px 16px 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .field-span { grid-column: auto; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-span { grid-column: auto; }
  .product-title { font-size: 19px; }
}

@media (max-width: 760px) {
  .page-subtitle { display: none; }
  .topbar { flex-wrap: wrap; }
  .topbar-right { width: 100%; justify-content: space-between; }
  .card { padding: 16px; border-radius: 12px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stat-value { font-size: 25px; }
  .filters input[type="search"] { flex-basis: 100%; }
  .login-page { padding: 14px; }
  .login-card { grid-template-columns: 1fr; }
  .login-aside { display: none; }
  .login-main { padding: 34px 24px; }
  .list-foot { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
  .account-avatar { display: none; }
}
