/* Apple-ish: light, airy, SF stack, pill nav */
:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --separator: rgba(60, 60, 67, 0.12);
  --blue: #007aff;
  --blue-hover: #0066d6;
  --blue-soft: rgba(0, 122, 255, 0.12);
  --green-ok: #34c759;
  --red: #ff3b30;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-pill: 980px;
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --sidebar-w: 240px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  background-image: radial-gradient(ellipse 120% 80% at 50% -20%, rgba(0, 122, 255, 0.06), transparent 55%),
    radial-gradient(ellipse 80% 50% at 100% 40%, rgba(175, 82, 222, 0.04), transparent 45%);
  color: var(--text);
  line-height: 1.45;
  min-height: 100vh;
}

/* —— 标准后台：左侧竖栏 + 右侧主区 —— */
.admin-shell {
  min-height: 100vh;
}

.admin-shell--login {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px 40px;
}

.admin-layout {
  display: flex;
  min-height: 100vh;
  align-items: stretch;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--separator);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  max-height: 100vh;
  z-index: 40;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.03);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 16px 16px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--separator);
  flex-shrink: 0;
}

.sidebar-brand:hover {
  background: rgba(0, 0, 0, 0.02);
}

.sidebar-brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
  background: linear-gradient(145deg, #5ac8fa, var(--blue));
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}

.brand-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.brand-sub {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sidebar-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 10px 12px;
}

.sidebar-section {
  margin-bottom: 18px;
}

.sidebar-section:last-of-type {
  margin-bottom: 8px;
}

.sidebar-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 8px 12px 6px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  margin: 1px 0;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
}

.sidebar-link .nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.72;
}

.sidebar-link:hover {
  background: rgba(0, 0, 0, 0.05);
}

.sidebar-link:hover .nav-icon {
  opacity: 1;
}

.sidebar-link.active {
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 600;
}

.sidebar-link.active .nav-icon {
  opacity: 1;
  color: var(--blue);
}

.sidebar-link-label {
  min-width: 0;
  line-height: 1.25;
}

.sidebar-footer {
  flex-shrink: 0;
  padding: 12px 14px 16px;
  border-top: 1px solid var(--separator);
  background: rgba(0, 0, 0, 0.02);
}

.sidebar-user {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.user-chip {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.user-meta {
  font-size: 12px;
  color: var(--text-secondary);
  word-break: break-all;
}

.sidebar-logout {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
  padding: 8px 10px;
  margin: 0 -4px;
  border-radius: 8px;
}

.sidebar-logout:hover {
  background: var(--blue-soft);
}

/* VIP：折叠分组 + 子菜单（表名小字） */
.sidebar-group {
  margin: 6px 0 4px;
  border-radius: 12px;
}

.sidebar-group-summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  margin: 2px 0;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  user-select: none;
  transition: background 0.12s;
}

.sidebar-group-summary::-webkit-details-marker {
  display: none;
}

.sidebar-group-summary::marker {
  content: "";
}

.sidebar-group-summary:hover {
  background: rgba(0, 0, 0, 0.05);
}

.sidebar-group-summary-text {
  flex: 1;
  min-width: 0;
}

.sidebar-group-chevron {
  margin-left: auto;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--text-secondary);
  border-bottom: 2px solid var(--text-secondary);
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  opacity: 0.85;
}

details.sidebar-group[open] > .sidebar-group-summary .sidebar-group-chevron {
  transform: rotate(45deg);
}

.sidebar-group-items {
  padding: 2px 0 10px 2px;
}

.sidebar-link--sub {
  margin-left: 6px;
  padding-left: 12px;
  border-left: 2px solid rgba(0, 122, 255, 0.15);
  border-radius: 0 10px 10px 0;
  align-items: flex-start;
}

.sidebar-link--sub .sidebar-link-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sidebar-link--sub .sidebar-link-label {
  font-size: 13px;
  font-weight: 500;
}

.sidebar-link-subl {
  font-size: 11px;
  font-weight: 500;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--text-secondary);
  letter-spacing: -0.02em;
}

.sidebar-link--sub.active {
  border-left-color: rgba(0, 122, 255, 0.45);
}

.sidebar-link--sub-with-icon {
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
}

.sidebar-link--sub-with-icon .nav-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

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

.main {
  flex: 1;
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 24px 24px 48px;
}

.admin-shell--login .main--login {
  width: 100%;
  max-width: 440px;
  margin-top: 32px;
}

.main a:not(.btn):not(.sidebar-logout) {
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
}

.main a:not(.btn):not(.sidebar-logout):hover { text-decoration: underline; }

.nav-icon {
  flex-shrink: 0;
}

/* 桌面：抽屉控件不占交互 */
.sidebar-drawer-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mobile-topbar {
  display: none;
}

.sidebar-scrim {
  display: none;
}

/* 窄屏：侧栏抽屉 + 顶栏汉堡 + 点击遮罩关闭 */
@media (max-width: 900px) {
  .admin-layout {
    flex-direction: row;
    position: relative;
    min-height: 100vh;
  }

  .mobile-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px 8px 10px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--separator);
    position: sticky;
    top: 0;
    z-index: 160;
    flex-shrink: 0;
  }

  .mobile-topbar-title {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.02em;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sidebar-burger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: -4px 0 -4px -6px;
    border-radius: 10px;
    color: var(--text);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s;
  }

  .sidebar-burger:hover {
    background: rgba(0, 0, 0, 0.06);
  }

  .sidebar-drawer-input:checked ~ .admin-layout .sidebar-burger {
    background: var(--blue-soft);
    color: var(--blue);
  }

  .sidebar-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 150;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s;
    pointer-events: none;
    cursor: pointer;
  }

  .sidebar-drawer-input:checked ~ .admin-layout .sidebar-scrim {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(var(--sidebar-w), 88vw);
    height: 100vh;
    max-height: none;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
    z-index: 200;
    border-right: 1px solid var(--separator);
    border-bottom: none;
    box-shadow: 8px 0 40px rgba(0, 0, 0, 0.18);
    align-self: stretch;
  }

  .sidebar-drawer-input:checked ~ .admin-layout .sidebar {
    transform: translateX(0);
  }

  .admin-main-wrap {
    width: 100%;
    min-width: 0;
  }

  .main {
    padding-top: 16px;
  }

  body.admin-shell--app:has(.sidebar-drawer-input:checked) {
    overflow: hidden;
    touch-action: none;
  }
}

.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.card + .card { margin-top: 22px; }

h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
}

.h2-tight {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 22px 0 12px;
  letter-spacing: -0.02em;
  color: var(--text);
}

.table-scroll {
  overflow-x: auto;
  margin-top: 8px;
  border-radius: var(--radius-md);
  border: 1px solid var(--separator);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th, td {
  border-bottom: 1px solid var(--separator);
  padding: 11px 12px;
  text-align: left;
  vertical-align: top;
}

th {
  background: rgba(0, 0, 0, 0.02);
  font-weight: 600;
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: none;
  letter-spacing: 0.01em;
}

tr:last-child td { border-bottom: 0; }

tr:hover td { background: rgba(0, 122, 255, 0.03); }

.btn {
  display: inline-block;
  padding: 9px 18px;
  background: var(--blue);
  color: #fff;
  border-radius: var(--radius-pill);
  text-decoration: none;
  border: 0;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: -0.01em;
  transition: background 0.15s, transform 0.1s;
}

.btn:hover { background: var(--blue-hover); }
.btn:active { transform: scale(0.98); }

.btn.secondary {
  background: rgba(0, 0, 0, 0.08);
  color: var(--text);
}

.btn.secondary:hover { background: rgba(0, 0, 0, 0.12); }

.btn.danger { background: var(--red); }
.btn.danger:hover { background: #e03229; }

.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
}

label {
  display: block;
  margin: 14px 0 6px;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-secondary);
}

input[type=text], input[type=password], input[type=date], input[type=number], input[type=datetime-local], textarea, select {
  width: 100%;
  max-width: 640px;
  padding: 11px 14px;
  border: 1px solid var(--separator);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.9);
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: rgba(0, 122, 255, 0.45);
  box-shadow: 0 0 0 3px var(--blue-soft);
}

textarea { min-height: 140px; resize: vertical; }

.form-stack { max-width: 680px; }
.form-actions { margin-top: 18px; }

.msg {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 14px;
}

.msg.ok {
  background: rgba(52, 199, 89, 0.12);
  color: #1a7a3a;
}

.msg.err {
  background: rgba(255, 59, 48, 0.1);
  color: #c41e16;
}

.row-actions a, .row-actions button { margin-right: 8px; }

.muted { color: var(--text-secondary); font-size: 12px; }

.img-preview { display: block; vertical-align: middle; }
.img-preview-lg { display: block; }

.pager { margin-top: 16px; display: flex; align-items: center; gap: 12px; }

.pager a {
  color: var(--blue);
  font-weight: 500;
  text-decoration: none;
}

.pager a:hover { text-decoration: underline; }

/* VIP subtabs */
.subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 20px;
}

.subtabs a {
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.04);
  transition: background 0.15s, color 0.15s;
}

.subtabs a:hover { color: var(--text); background: rgba(0, 0, 0, 0.07); }
.subtabs a.active { color: var(--blue); background: var(--blue-soft); }

code {
  font-size: 0.9em;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.06);
}

/* —— Dashboard (概览) —— */
.dash-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(0, 122, 255, 0.12) 0%, rgba(88, 86, 214, 0.08) 45%, rgba(255, 255, 255, 0.92) 100%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-card);
  margin-bottom: 22px;
}

.dash-hero-inner { flex: 1; min-width: 200px; }

.dash-hero-kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 0 6px;
}

.dash-hero h1 { margin: 0 0 8px; font-size: 1.45rem; }

.dash-hero-desc {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.45;
  max-width: 520px;
}

.dash-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.dash-hero-side {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
}

.dash-donut {
  --order-deg: 180deg;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: conic-gradient(var(--blue) 0 var(--order-deg), rgba(0, 0, 0, 0.08) 0);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.dash-donut-inner {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.dash-donut-n {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.dash-donut-s {
  font-size: 10px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.dash-alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 149, 0, 0.12);
  border: 1px solid rgba(255, 149, 0, 0.25);
  color: var(--text);
  font-size: 13px;
  margin-bottom: 18px;
}

.dash-alert strong { color: #c2410c; }

.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.dash-card {
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-card);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.dash-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.1);
}

.dash-card--blue { background: linear-gradient(160deg, rgba(0, 122, 255, 0.1) 0%, var(--surface) 55%); }
.dash-card--purple { background: linear-gradient(160deg, rgba(88, 86, 214, 0.12) 0%, var(--surface) 55%); }
.dash-card--green { background: linear-gradient(160deg, rgba(52, 199, 89, 0.12) 0%, var(--surface) 55%); }
.dash-card--orange { background: linear-gradient(160deg, rgba(255, 149, 0, 0.14) 0%, var(--surface) 55%); }
.dash-card--gray { background: linear-gradient(160deg, rgba(0, 0, 0, 0.04) 0%, var(--surface) 60%); }
.dash-card--rose { background: linear-gradient(160deg, rgba(255, 45, 85, 0.12) 0%, var(--surface) 55%); }
.dash-card--violet { background: linear-gradient(160deg, rgba(175, 82, 222, 0.12) 0%, var(--surface) 55%); }
.dash-card--cyan { background: linear-gradient(160deg, rgba(90, 200, 250, 0.18) 0%, var(--surface) 55%); }
.dash-card--amber { background: linear-gradient(160deg, rgba(255, 204, 0, 0.2) 0%, var(--surface) 55%); }
.dash-card--indigo { background: linear-gradient(160deg, rgba(94, 92, 230, 0.12) 0%, var(--surface) 55%); }
.dash-card--emerald { background: linear-gradient(160deg, rgba(48, 209, 88, 0.14) 0%, var(--surface) 55%); }
.dash-card--slate { background: linear-gradient(160deg, rgba(100, 116, 139, 0.12) 0%, var(--surface) 55%); }
.dash-card--pink { background: linear-gradient(160deg, rgba(255, 55, 95, 0.1) 0%, var(--surface) 55%); }

.dash-card-label { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-secondary); margin: 0 0 6px; }

.dash-card-num {
  display: block;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
  line-height: 1.1;
}

.dash-card-bar {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  overflow: hidden;
  margin-bottom: 10px;
}

.dash-card-bar > i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), #5ac8fa);
  min-width: 2px;
}

.dash-card-go { font-size: 12px; font-weight: 600; color: var(--blue); }

.dash-hero-title { font-size: 1.45rem; font-weight: 700; letter-spacing: -0.03em; margin: 0 0 6px; }

.dash-hero-meta {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.dash-h2 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.dash-mini { display: flex; flex-direction: column; gap: 10px; }

.dash-mini-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.04);
}

.dash-mini-row strong { font-variant-numeric: tabular-nums; }

.dash-mini-row a { font-weight: 600; color: var(--blue); text-decoration: none; white-space: nowrap; }
.dash-mini-row a:hover { text-decoration: underline; }

.dash-chip-title {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  margin: 0 0 8px;
}

.dash-chips > a {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  color: var(--text);
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: background 0.15s, color 0.15s;
}

.dash-chips > a:hover {
  background: var(--blue-soft);
  color: var(--blue);
}

.dash-order-panel { margin-bottom: 22px; }

.dash-order-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.dash-order-metric {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(0, 122, 255, 0.06);
  border: 1px solid rgba(0, 122, 255, 0.12);
}

.dash-order-metric-k {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.dash-order-metric-v {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.dash-card-k {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  margin: 0 0 6px;
}

.dash-card-n {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 4px;
  line-height: 1.1;
}

.dash-card-hint {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0;
}

.dash-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 22px;
}

@media (max-width: 900px) {
  .dash-row2 { grid-template-columns: 1fr; }
}

.dash-panel {
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-card);
}

.dash-panel h2 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 14px;
  letter-spacing: -0.02em;
}

.dash-bars { display: flex; flex-direction: column; gap: 10px; }

.dash-bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 10px;
  align-items: center;
  font-size: 12px;
}

.dash-bar-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
}

.dash-bar-track {
  grid-column: 1 / -1;
  height: 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.dash-bar-track > i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), #5ac8fa);
  min-width: 2px;
}

.dash-bar-n {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--text);
}

.dash-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), #5ac8fa);
  min-width: 2px;
  transition: width 0.35s ease;
}

.dash-bar-val {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--text);
}

.dash-chips-card { margin-bottom: 22px; }

.dash-chip-group { margin-bottom: 14px; }

.dash-chip-group:last-child { margin-bottom: 0; }

.dash-chip-group h3 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  margin: 0 0 8px;
}

.dash-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dash-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  color: var(--text);
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: background 0.15s, color 0.15s;
}

.dash-chip:hover {
  background: var(--blue-soft);
  color: var(--blue);
}

.dash-chip-warn {
  background: rgba(255, 59, 48, 0.1);
  border-color: rgba(255, 59, 48, 0.2);
  color: #c00;
}

.dash-chip-warn:hover {
  background: rgba(255, 59, 48, 0.16);
  color: #a00;
}

.dash-table-card { margin-bottom: 22px; }

.dash-table-card h2 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 12px;
}

.dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.dash-table th,
.dash-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--separator);
}

.dash-table th {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.dash-table tr:last-child td { border-bottom: none; }

.dash-table a { color: var(--blue); font-weight: 500; text-decoration: none; }
.dash-table a:hover { text-decoration: underline; }
