/* 91jav admin · minimal content console
   Style follows the existing white, quiet, table-first admin system. */
:root {
  --bg: #ffffff;
  --bg-subtle: #fafafa;
  --bg-hover: #f4f4f5;
  --text: #18181b;
  --text-muted: #71717a;
  --text-disabled: #a1a1aa;
  --border: #e4e4e7;
  --solid: #18181b;
  --solid-hover: #27272a;
  --on-solid: #ffffff;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --success: #16a34a;
  --success-bg: #f0fdf4;
  --warning: #ca8a04;
  --warning-bg: #fefce8;
  --sidebar-w: 240px;
  --topbar-h: 56px;
  --radius: 6px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }

.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w);
  flex: none;
  border-right: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar__brand {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  font-size: 16px;
  font-weight: 600;
}
.mark {
  width: 24px;
  height: 24px;
  border-radius: var(--radius);
  background: var(--solid);
  color: var(--on-solid);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}
.sidebar__nav { flex: 1; overflow-y: auto; padding: 8px; }
.sidebar__section-title {
  color: var(--text-disabled);
  font-size: 12px;
  padding: 12px 12px 4px;
}
.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius);
  border: 0;
  border-left: 2px solid transparent;
  background: transparent;
  color: var(--text-muted);
  text-align: left;
  white-space: nowrap;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text); text-decoration: none; }
.nav-item.is-active {
  background: var(--bg-hover);
  color: var(--text);
  border-left-color: var(--solid);
  font-weight: 600;
}
.nav-ico { width: 16px; text-align: center; color: var(--text-disabled); flex: none; }
.sidebar__foot { border-top: 1px solid var(--border); padding: 8px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: var(--topbar-h);
  flex: none;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.breadcrumb { color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.breadcrumb__current { color: var(--text); font-weight: 500; }
.topbar__spacer { flex: 1; }
.topbar__account {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: var(--radius);
}
.topbar__account:hover { background: var(--bg-hover); color: var(--text); }

.content { flex: 1; padding: 24px; max-width: 100%; }
.form-page { max-width: 760px; margin: 0 auto; }
.page-head { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.page-title { font-size: 20px; font-weight: 600; }
.page-subtitle { color: var(--text-muted); margin-top: 4px; font-size: 13px; }
.page-head__actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.btn {
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
}
.btn:hover { background: var(--bg-hover); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn--primary { background: var(--solid); color: var(--on-solid); border-color: var(--solid); }
.btn--primary:hover { background: var(--solid-hover); }
.btn--danger { color: var(--danger); }
.btn--danger:hover { background: var(--danger-bg); border-color: var(--danger); }
.btn--ghost { border-color: transparent; background: transparent; }
.btn--sm { height: 28px; padding: 0 10px; font-size: 13px; }
.btn--icon { width: 32px; padding: 0; }

.toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar--dense { margin-bottom: 12px; }
.toolbar__spacer { flex: 1; }
.searchbox {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  min-width: 220px;
}
.searchbox input { border: 0; outline: 0; flex: 1; min-width: 0; background: transparent; color: var(--text); }
.select, .input, .textarea {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  outline: 0;
}
.toolbar .select { width: auto; height: 32px; }
.mfilter { position: relative; flex: none; }
.mfilter__btn {
  height: 32px;
  min-width: 112px;
  max-width: 190px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.mfilter__btn span { font-size: 12px; flex: none; }
.mfilter__btn b { color: var(--text); font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mfilter.is-active .mfilter__btn { border-color: var(--solid); background: var(--bg-subtle); }
.mfilter__panel {
  display: none;
  position: absolute;
  top: 36px;
  left: 0;
  z-index: 30;
  width: 230px;
  max-width: calc(100vw - 24px);
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .14);
}
.mfilter.is-open .mfilter__panel { display: block; }
.mfilter.is-align-end .mfilter__panel { left: auto; right: 0; }
.mfilter__search {
  width: 100%;
  height: 30px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  outline: 0;
}
.mfilter__search:focus { border-color: var(--solid); }
.mfilter__ops { display: flex; align-items: center; justify-content: space-between; padding: 7px 2px 5px; color: var(--text-muted); font-size: 12px; }
.mfilter__ops button { border: 0; background: transparent; color: var(--solid); padding: 0; cursor: pointer; font-size: 12px; }
.mfilter__list { max-height: 238px; overflow: auto; display: grid; gap: 2px; }
.mfilter__option {
  width: 100%;
  height: 30px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  cursor: pointer;
  text-align: left;
}
.mfilter__option:hover { background: var(--bg-subtle); }
.mfilter__option span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mfilter__check { width: 14px; height: 14px; border: 1px solid var(--border); border-radius: 3px; flex: none; position: relative; }
.mfilter__option.is-selected .mfilter__check { border-color: var(--solid); background: var(--solid); }
.mfilter__option.is-selected .mfilter__check::after { content: ''; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.textarea { min-height: 96px; height: auto; padding: 10px 12px; resize: vertical; }
.textarea--code { min-height: 170px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.6; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--solid); }
.input::placeholder, .textarea::placeholder { color: var(--text-disabled); }

.table-wrap { border: 1px solid var(--border); border-radius: var(--radius); overflow-x: auto; overflow-y: hidden; }
.table { width: 100%; min-width: 1080px; border-collapse: collapse; font-size: 13px; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { background: var(--bg-subtle); color: var(--text-muted); font-size: 12px; font-weight: 500; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--bg-subtle); }
.table .cell-truncate { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-title-col { min-width: 220px; max-width: 320px; }
.cell-title a { font-weight: 600; }
.cell-sub { margin-top: 3px; color: var(--text-muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table .col-actions { text-align: right; white-space: nowrap; }
.row-actions { display: inline-flex; gap: 4px; }
.table-count { color: var(--text-muted); font-size: 12px; }
.muted { color: var(--text-muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.thumb {
  background: var(--bg-hover);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-disabled);
  overflow: hidden;
  flex: none;
  border: 1px solid var(--border);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb--16x9 { width: 64px; height: 36px; }
.thumb--3x4 { width: 45px; height: 60px; }
.thumb--1x1 { width: 48px; height: 48px; border-radius: 50%; }
.uploader { display: flex; gap: 12px; align-items: center; }
.uploader .thumb { width: 120px; height: 68px; }
.uploader .thumb--1x1 { width: 72px; height: 72px; }
.uploader .thumb--3x4 { width: 72px; height: 96px; }

.badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--radius);
  background: var(--bg-hover);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
}
.badge--success { background: var(--success-bg); color: var(--success); }
.badge--warning { background: var(--warning-bg); color: var(--warning); }
.badge--danger { background: var(--danger-bg); color: var(--danger); }

.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 16px; color: var(--text-muted); }
.pagination__pages { display: flex; gap: 4px; }
.empty { text-align: center; padding: 64px 24px; color: var(--text-muted); }
.empty__title { font-size: 16px; color: var(--text); font-weight: 500; margin-bottom: 4px; }
.empty__desc { margin-bottom: 16px; }

.field { margin-bottom: 20px; }
.field__label { display: block; font-weight: 500; margin-bottom: 6px; }
.req { color: var(--danger); margin-left: 2px; }
.field__hint { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.field__error { display: none; font-size: 12px; color: var(--danger); margin-top: 6px; }
.field.has-error .field__error { display: block; }
.field.has-error .input,
.field.has-error .select,
.field.has-error .textarea { border-color: var(--danger); }
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 16px;
  margin-top: 24px;
  border-top: 1px solid var(--border);
}
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.seo-block { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; background: var(--bg-subtle); margin-top: 8px; }
.section-title { font-size: 13px; font-weight: 600; color: var(--text-muted); margin: 12px 0 10px; }
.section-title--spaced { margin-top: 24px; }
.tree-indent { padding-left: 18px; color: var(--text-muted); }
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 8px;
  margin: -8px 0 12px;
}
.stat-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: var(--bg);
}
.stat-card__value { font-size: 20px; line-height: 1.1; font-weight: 650; }
.stat-card__label { margin-top: 4px; font-size: 12px; color: var(--text-muted); }
.group-filter {
  display: flex;
  gap: 6px;
  align-items: center;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 8px;
}
.group-filter__item, .group-filter__add {
  height: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text-muted);
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.group-filter__item span { color: var(--text-disabled); font-size: 12px; }
.group-filter__item:hover, .group-filter__item.is-active, .group-filter__add:hover { background: var(--bg-hover); color: var(--text); }
.group-filter__item.is-active { border-color: var(--solid); font-weight: 600; }
.attr-values-cell { min-width: 360px; }
.value-chip-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.value-chip {
  min-height: 26px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  padding: 2px 8px 2px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}
.value-chip span {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--bg-hover);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}
.value-chip:hover { background: var(--bg-hover); }
.value-chip.is-offline { color: var(--text-disabled); border-style: dashed; }
.value-chip--add { color: var(--text-muted); border-style: dashed; }
.mini-chips, .badge-row {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}
.mini-chip {
  min-height: 22px;
  max-width: 92px;
  padding: 2px 7px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mini-chip--more { color: var(--text); background: var(--bg-hover); }
.notice-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--warning);
  border-radius: var(--radius);
  background: var(--warning-bg);
  color: var(--warning);
  font-size: 13px;
}
.notice-row span { color: var(--text); }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text-muted);
  font-size: 13px;
}
.chip:hover { background: var(--bg-hover); color: var(--text); }
.chip.is-on { background: var(--solid); border-color: var(--solid); color: var(--on-solid); }
.chip--custom { background: var(--bg-subtle); border-style: dashed; }
.attr-picker, .tp, .spicker, .blocks-editor { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; background: var(--bg-subtle); }
.attr-row { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-top: 1px solid var(--border); }
.attr-row:first-child { border-top: 0; padding-top: 0; }
.attr-row__label { color: var(--text-muted); font-size: 13px; padding-top: 5px; }
.attr-row__chips { display: flex; gap: 8px; flex-wrap: wrap; }
.tp-selected { min-height: 32px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.tp-searchbar { margin-bottom: 10px; }
.tp-body { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 12px; }
.tp-groups-wrap, .tp-tags { min-height: 190px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); padding: 8px; }
.tp-group-search { height: 32px; margin-bottom: 8px; }
.tp-groups { display: flex; flex-direction: column; gap: 4px; }
.tp-group {
  height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-muted);
  text-align: left;
}
.tp-group:hover, .tp-group.is-active { background: var(--bg-hover); color: var(--text); }
.tp-tags { display: flex; align-content: flex-start; align-items: flex-start; gap: 8px; flex-wrap: wrap; overflow-y: auto; }
.tp-tag {
  min-height: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  padding: 0 10px;
}
.tp-tag:hover { background: var(--bg-hover); }
.tp-tag.is-on { background: var(--solid); color: var(--on-solid); border-color: var(--solid); }
.tp-tag--add { border-style: dashed; color: var(--text-muted); }
.tsp__chip { padding-right: 4px; }
.tsp__x {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  padding: 0;
}
.tsp__x:hover { background: rgba(255,255,255,.18); }
.spicker-selected { min-height: 32px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.spicker-search { height: 34px; margin-bottom: 10px; }
.spicker-list {
  max-height: 230px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 8px;
}
.spicker-item {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  text-align: left;
}
.spicker-item:hover { background: var(--bg-hover); }
.spicker-item.is-on { border-color: var(--solid); box-shadow: inset 0 0 0 1px var(--solid); }
.spicker-avatar, .spicker-cover {
  flex: none;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: var(--bg-hover);
  color: var(--text-muted);
  font-size: 12px;
}
.spicker-avatar { width: 32px; height: 32px; border-radius: 50%; }
.spicker-cover { width: 58px; aspect-ratio: 16 / 9; }
.spicker-avatar img, .spicker-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.spicker-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.spicker-main b {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.spicker-main small {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.spicker-item--wide { grid-column: span 2; }
.blocks-toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.block-item { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); padding: 12px; margin-top: 10px; }
.block-item:first-child { margin-top: 0; }
.block-item__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; color: var(--text-muted); font-size: 13px; font-weight: 500; }
.block-caption { margin-top: 10px; }

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(0, 0, 0, .35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal {
  width: 100%;
  max-width: 760px;
  max-height: 90vh;
  overflow: hidden;
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.modal--narrow { max-width: 440px; }
.modal__head { padding: 20px 20px 0; font-size: 16px; font-weight: 600; }
.modal__body { padding: 16px 20px 20px; overflow-y: auto; }
.modal__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 0 20px 20px; }

.toast-stack { position: fixed; top: 16px; right: 16px; z-index: 1000; display: flex; flex-direction: column; gap: 8px; }
.toast {
  min-width: 220px;
  max-width: 360px;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--solid);
  color: var(--on-solid);
  box-shadow: var(--shadow-sm);
  animation: toast-in .15s ease;
}
.toast--success { background: var(--success); }
.toast--error { background: var(--danger); }
.toast--warning { background: var(--warning); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-6px); } }

.preview-mask {
  position: fixed;
  inset: 0;
  z-index: 960;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, .55);
}
.preview-modal {
  width: min(1280px, 100%);
  height: min(900px, calc(100vh - 32px));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow-sm);
}
.preview-modal__bar {
  height: 44px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px 0 16px;
  border-bottom: 1px solid var(--border);
}
.preview-modal__bar b { font-size: 14px; }
.preview-modal__bar span { color: var(--text-muted); font-size: 12px; }
.preview-modal__bar .btn { margin-left: auto; }
.preview-frame { flex: 1; width: 100%; border: 0; background: #15171a; }

.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg-subtle); padding: 16px; }
.auth-card {
  width: 100%;
  max-width: 360px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.auth-card__brand { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.auth-card__sub { color: var(--text-muted); font-size: 13px; margin-bottom: 24px; }

@media (max-width: 1180px) {
  :root { --sidebar-w: 216px; }
  .content { padding: 20px; }
  .page-head { margin-bottom: 18px; }
  .table { min-width: 980px; }
  .mfilter__btn { max-width: 170px; }
  .stat-grid { grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); }
}

@media (max-width: 860px) {
  .layout { display: block; }
  .sidebar { position: static; width: 100%; height: auto; border-right: 0; border-bottom: 1px solid var(--border); }
  .sidebar__brand { height: 48px; }
  .sidebar__nav { display: flex; overflow-x: auto; gap: 4px; padding: 8px; }
  .sidebar__section-title, .sidebar__foot { display: none; }
  .nav-item { width: auto; flex: none; border-left: 0; padding: 7px 10px; }
  .topbar { position: static; }
  .content { padding: 18px; }
  .page-head { align-items: flex-start; }
  .page-head > div:first-child { min-width: 0; }
  .page-head__actions { flex: none; }
  .searchbox { flex: 1 1 260px; min-width: 180px; }
  .grid-2 { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .attr-row, .tp-body { grid-template-columns: 1fr; }
  .spicker-list { grid-template-columns: 1fr; }
  .spicker-item--wide { grid-column: auto; }
  .table-wrap { overflow-x: auto; }
  .table { min-width: 860px; }
}

@media (max-width: 640px) {
  body { min-width: 0; }
  .sidebar__brand { padding: 0 14px; }
  .sidebar__nav { padding: 6px 8px 8px; }
  .topbar { height: 48px; padding: 0 12px; }
  .breadcrumb { min-width: 0; overflow: hidden; }
  .breadcrumb span { white-space: nowrap; }
  .topbar__account { display: none; }
  .content { padding: 14px 12px 18px; }
  .page-head { display: block; margin-bottom: 14px; }
  .page-title { font-size: 18px; }
  .page-subtitle { line-height: 1.45; }
  .page-head__actions { margin: 12px 0 0; }
  .page-head__actions .btn { width: 100%; }
  .toolbar { align-items: stretch; gap: 6px; margin-bottom: 12px; }
  .searchbox { flex: 1 1 100%; width: 100%; min-width: 0; }
  .mfilter { flex: 1 1 calc(50% - 3px); min-width: 0; }
  .mfilter__btn { width: 100%; min-width: 0; max-width: none; }
  .mfilter__panel { width: min(280px, calc(100vw - 24px)); }
  .toolbar__spacer { display: none; }
  .table-count { width: 100%; padding-top: 2px; }
  .stat-grid { gap: 6px; margin-top: -4px; }
  .stat-card { padding: 8px 10px; }
  .stat-card__value { font-size: 18px; }
  .table { min-width: 760px; font-size: 12.5px; }
  .table th, .table td { padding: 8px 10px; }
  .row-actions { flex-wrap: wrap; justify-content: flex-end; }
  .thumb--16x9 { width: 56px; height: 32px; }
  .attr-values-cell { min-width: 280px; }
  .uploader { align-items: flex-start; }
  .modal-mask { padding: 8px; align-items: stretch; }
  .modal { max-height: calc(100vh - 16px); }
  .modal__head { padding: 16px 16px 0; }
  .modal__body { padding: 14px 16px 16px; }
  .modal__foot { padding: 0 16px 16px; flex-wrap: wrap; }
  .modal__foot .btn { flex: 1 1 auto; }
  .toast-stack { left: 12px; right: 12px; top: 12px; }
  .toast { min-width: 0; max-width: none; }
  .auth-card { padding: 24px; }
}

@media (max-width: 420px) {
  .content { padding-inline: 10px; }
  .mfilter { flex-basis: 100%; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .group-filter { margin-inline: -2px; }
  .blocks-toolbar .btn { flex: 1 1 calc(50% - 4px); }
  .block-item__head { align-items: flex-start; }
  .auth-card { padding: 20px; }
}
