:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --accent: #111827;
  --accent-hover: #030712;
  --soft: #f3f4f6;
  --ok: #047857;
  --ok-bg: #ecfdf5;
  --warn: #b45309;
  --warn-bg: #fffbeb;
  --danger: #b91c1c;
  --danger-bg: #fef2f2;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(17, 24, 39, 0.04), 0 8px 24px rgba(17, 24, 39, 0.04);
  --sidebar: 248px;
  --font: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
}

a { color: inherit; text-decoration: none; }

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

#app.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 20px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 18px;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
}

.brand__sub {
  display: block;
  margin-top: 1px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: auto;
  flex: 1;
}

.nav-group { display: flex; flex-direction: column; gap: 2px; }

.nav-label {
  display: none;
}

.nav-link,
.side-nav a,
.top-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px 7px 14px;
  border-radius: 8px;
  color: var(--muted);
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
}

.nav-link:hover,
.side-nav a:hover,
.top-nav a:hover {
  background: var(--soft);
}

.nav-link.active,
.side-nav a.active,
.top-nav a.active {
  background: var(--accent);
  color: #fff;
  font-weight: 550;
}

.nav-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 650;
  line-height: 18px;
  text-align: center;
}

.nav-link.active .nav-badge {
  background: #fff;
  color: var(--accent);
}

.sidebar-foot {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.nav-logout { width: 100%; color: var(--muted); }

.main {
  min-width: 0;
}

.content {
  max-width: 1080px;
  padding: 28px 32px 64px;
}

.page-head { margin-bottom: 20px; }

.page-kicker {
  margin: 0 0 4px;
  font-size: 12px;
  color: var(--muted);
}

.page-title {
  margin: 0;
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.04em;
}

.row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  align-items: center;
}

.row label {
  width: 180px;
  flex: 0 0 180px;
  color: #4b5563;
  font-size: 13px;
}

.row input,
.row select,
.row textarea,
.login-box input,
.dropdown input {
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  outline: none;
}

.row textarea { min-height: 96px; resize: vertical; }

.row input:focus,
.row select:focus,
.row textarea:focus,
.login-box input:focus,
.dropdown input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
}

.content > .toolbar:has(input) {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  box-shadow: var(--shadow);
}

.content > .toolbar:has(input) input {
  border: 0;
  background: transparent;
  box-shadow: none;
}

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

.toolbar input {
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  outline: none;
}

.entity-list,
.cat-tree {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.tree-node.is-root > .tree-row {
  background: #f8fafc;
}

.tree-node.is-root > .tree-row .tree-row__name {
  font-weight: 650;
}

.tree-children {
  margin: 0 0 8px 28px;
  padding: 4px 0 4px 18px;
  border-left: 3px solid #94a3b8;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.12), transparent 40px);
}

.tree-node.is-child > .tree-row {
  position: relative;
  background: rgba(255, 255, 255, 0.72);
  margin: 4px 8px 4px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.tree-node.is-child > .tree-row::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 50%;
  width: 14px;
  border-top: 3px solid #94a3b8;
}

.tree-row__namewrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tree-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #1e3a5f;
  background: #e8eef6;
  border: 1px solid #c5d4e8;
  border-radius: 999px;
  padding: 1px 8px;
  flex-shrink: 0;
}

.tree-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}

.tree-row__main {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.tree-row__name {
  font-weight: 550;
}

.tree-row__path {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.tree-row.is-inactive .tree-row__name { color: var(--muted); }

.entity-row,
.tree-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}

.entity-row:last-child,
.tree-row:last-child { border-bottom: 0; }

.entity-row:hover,
.tree-row:hover { background: var(--soft); }

.entity-row.is-inactive .entity-row__title,
.tree-row.is-inactive .tree-row__name { color: var(--muted); }

.entity-row__main {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.entity-row__title {
  font-weight: 550;
}

.entity-row__meta {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.header-actions { display: flex; gap: 8px; align-items: center; }

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
  padding-left: 8px;
  padding-right: 8px;
}

.btn-ghost:hover { background: var(--soft); color: var(--text); }

.btn-danger {
  background: var(--danger-bg);
  border-color: #fecaca;
  color: var(--danger);
}

.btn-danger:hover { background: #fee2e2; }

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.28);
  z-index: 50;
  display: grid;
  place-items: start center;
  padding: 12vh 24px 24px;
  overflow: auto;
}

.mega-panel,
.picker-panel {
  width: min(920px, 100%);
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 16px;
}

.picker-panel { width: min(460px, 100%); }

.mega-title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 650;
}

.mega-search,
.picker-panel input {
  width: 100%;
  margin-bottom: 12px;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}

.mega-cols {
  display: flex;
  gap: 8px;
  min-height: 240px;
  align-items: stretch;
}

.mega-col {
  flex: 1;
  min-width: 180px;
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px;
}

.mega-item,
.picker-item {
  display: flex;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}

.mega-item.has-children::after {
  content: "›";
  margin-left: auto;
  color: var(--muted);
}

.mega-item:hover,
.picker-item:hover { background: var(--soft); }

.mega-item--extra {
  color: var(--muted);
  font-weight: 550;
  border-bottom: 1px dashed var(--line);
  border-radius: 0;
  margin-bottom: 4px;
}

.picker-list { max-height: 360px; overflow: auto; }

.spec-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
}

.spec-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.spec-card__name { font-weight: 600; }

.spec-badges { display: flex; gap: 6px; flex-wrap: wrap; }

.badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
}

.img-wrap {
  cursor: grab;
}

.img-wrap.is-dragging { opacity: 0.45; }
.img-wrap.is-drop { outline: 2px dashed var(--accent); }

.perm-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

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

.perm-table th {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  background: var(--soft);
}

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

.nav-group__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 10px;
  margin-bottom: 4px;
  border: 0;
  border-radius: 8px;
  background: var(--soft);
  font-weight: 650;
  font-size: 13px;
  letter-spacing: -0.02em;
  cursor: pointer;
}

.nav-group__toggle::after {
  content: "▾";
  color: var(--muted);
  font-weight: 500;
}

.nav-group__toggle.is-collapsed::after { content: "▸"; }

.nav-group.is-collapsed .nav-link { display: none; }

.empty,
.muted { color: var(--muted); padding: 16px; }

.hint {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 12px;
}

.content > .entity-list,
.content > .cat-tree {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.list-item,
.tree-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.list-item:last-child,
.tree-item:last-child { border-bottom: 0; }

.list-item:hover,
.tree-item:hover { background: var(--soft); }

.list-item--order {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: default;
}

.list-item__main {
  flex: 1;
  cursor: pointer;
  min-width: 0;
}

.list-item__status {
  flex: 0 0 200px;
  padding: 8px 10px;
  cursor: pointer;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg);
}

.btn,
.top-nav a,
.side-nav a {
  appearance: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn:hover { background: var(--soft); }

.btn-primary,
.btn-green {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-primary:hover,
.btn-green:hover {
  background: var(--accent-hover);
  color: #fff;
}

.btn-status {
  min-width: 118px;
  font-weight: 550;
}

.btn-status.is-on,
.btn-green:not(.btn-primary) {
  background: var(--ok-bg);
  border-color: #a7f3d0;
  color: var(--ok);
}

.btn-status.is-off,
.btn-red {
  background: var(--danger-bg);
  border-color: #fecaca;
  color: var(--danger);
}

.header-actions .btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.content > .toolbar .btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.content > .toolbar .btn-primary:hover,
.header-actions .btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
}

.header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.filter-zones {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 8px 0 16px;
}

.filter-zone {
  min-height: 140px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: #fff;
}

.filter-zone.is-over {
  border-color: #141e30;
  background: #f7f5f1;
}

.filter-zone h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.filter-zone__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 72px;
}

.filter-zone .chip {
  cursor: grab;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 16px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 6px 10px 6px 12px;
}

.chip .x,
.spec-remove,
.img-wrap .x {
  color: var(--muted);
  cursor: pointer;
  border: 0;
  background: transparent;
}

.chip .x:hover,
.spec-remove:hover,
.img-wrap .x:hover { color: var(--danger); }

.chip.add {
  cursor: pointer;
  color: var(--muted);
  border-style: dashed;
}

.images { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }

.images img,
.img-add {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
}

.img-wrap {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.img-wrap .x {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
}

.img-controls { display: flex; gap: 4px; }

.img-swap { padding: 2px 8px; font-size: 12px; min-width: 32px; }

.img-swap:disabled { opacity: 0.35; cursor: not-allowed; }

.img-add {
  display: grid;
  place-items: center;
  font-size: 22px;
  color: var(--muted);
  cursor: pointer;
}

.spec-label {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 180px;
  flex: 0 0 180px;
}

.spec-label label { width: auto; }

.dropdown {
  border: 1px solid var(--line);
  max-height: 240px;
  overflow: auto;
  background: var(--surface);
  position: absolute;
  z-index: 20;
  width: min(360px, 90vw);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 8px;
}

.dropdown div { padding: 8px; border-radius: 6px; cursor: pointer; }

.dropdown div:hover { background: var(--soft); }

.panel {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 16px;
  box-shadow: var(--shadow);
}

.error { color: var(--danger); margin: 8px 0; }

.hidden { display: none; }

.app-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-box {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow);
}

.login-box h2 {
  margin: 0 0 8px;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.login-box .row {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.login-box .row label {
  width: auto;
  flex: none;
  font-weight: 500;
}

.login-box .btn { width: 100%; margin-top: 8px; }

.addr-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin: 8px 0 8px;
}

.addr-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.addr-link {
  color: var(--text);
  text-decoration: none;
  padding: 4px 0;
}

.addr-link:hover { text-decoration: underline; }

.btn-plus {
  width: 28px;
  height: 28px;
  min-width: 28px;
  padding: 0;
  border-radius: 8px;
  font-size: 18px;
  line-height: 1;
  display: inline-grid;
  place-items: center;
}

.link-set {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 12px;
}

.link-set__head {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.link-set__head input,
.link-set__head select { max-width: 240px; }

.link-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.link-option__name {
  flex: 1;
  min-width: 120px;
  font-weight: 550;
}

.link-option__value { display: flex; align-items: center; }

.link-option__value input[type="color"] {
  width: 42px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
}

.link-swatch {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  display: grid;
  place-items: center;
  background: var(--soft);
  color: var(--muted);
}

.link-swatch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.content b {
  display: block;
  margin: 20px 0 8px;
  font-size: 13px;
  font-weight: 600;
}

.editor { margin: 12px 0 24px; }

.editor-empty {
  color: var(--muted);
  padding: 24px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 12px;
}

.editor-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 10px;
}

.editor-block__tools {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.editor-block__type {
  flex: 1;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.editor-input {
  width: 100%;
  min-height: 72px;
  resize: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}

.editor-input.is-heading {
  font-size: 22px;
  font-weight: 650;
  min-height: 48px;
}

.editor-input.is-quote {
  font-style: italic;
  background: var(--soft);
}

.editor-list { display: flex; flex-direction: column; gap: 6px; }

.editor-list__row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.editor-list__bullet { color: var(--muted); width: 12px; }

.editor-image {
  border: 1px dashed var(--line);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: var(--soft);
  min-height: 140px;
  display: grid;
  place-items: center;
}

.editor-image img { width: 100%; max-height: 280px; object-fit: cover; display: block; }

.editor-image__empty { color: var(--muted); padding: 24px; }

.editor-divider {
  height: 1px;
  background: var(--line);
  margin: 12px 8px;
}

.editor-add {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.badge-soft {
  margin-left: 8px;
  color: var(--ok);
  background: var(--ok-bg);
}

.product-section-title { margin-top: 26px; }
.product-description-editor { margin: 12px 0; }

.product-description-block {
  padding: 14px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.product-description-text { min-height: 48px; }

.product-description-split {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.product-description-split .product-description-image {
  margin: 0;
}

.product-description-split .product-description-text {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 48px;
  height: auto;
}

.product-description-image {
  position: relative;
  flex: 0 0 auto;
  min-height: 0;
  display: block;
  overflow: visible;
  border: 0;
  border-radius: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.product-description-image.is-empty {
  min-height: 120px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: var(--soft);
}

.product-description-block > .product-description-image {
  min-height: 0;
}

.product-description-block > .product-description-image.is-empty {
  min-height: 120px;
}

.product-description-image img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  vertical-align: top;
}

.product-description-image__change {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 5px 9px;
  border-radius: 7px;
  color: #fff;
  background: rgba(17, 24, 39, 0.82);
  font-size: 11px;
}

.product-description-size-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.product-description-size {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 12px;
}

.product-description-size span {
  min-width: 160px;
}

.product-description-size input[type="range"] {
  width: min(360px, 100%);
  accent-color: var(--accent);
}

.product-description-block > input {
  width: 100%;
  margin-top: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
}

.product-description-add {
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.45);
}

.main:has(.product-ckeditor) { min-width: 1264px; }

.content:has(.product-ckeditor) { max-width: none; }

.product-ckeditor {
  width: 1200px;
  max-width: 1200px;
  margin: 12px 0 16px;
}

.banner-admin {
  display: grid;
  gap: 18px;
  margin-top: 12px;
}

.banner-admin__slot h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.banner-admin__format {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.banner-card {
  display: grid;
  gap: 8px;
  max-width: 420px;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.banner-card img {
  width: 100%;
  height: auto;
  object-fit: cover;
  background: var(--soft);
}

.banner-card img.is-main {
  aspect-ratio: 60 / 25;
}

.banner-card img.is-side {
  aspect-ratio: 3 / 1;
}

.crop-modal {
  width: min(920px, 100%);
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 16px;
}

.crop-modal h3 {
  margin: 0 0 6px;
}

.crop-modal p {
  margin: 0 0 12px;
  color: var(--muted);
}

.crop-stage {
  display: grid;
  place-items: center;
  padding: 12px;
  border-radius: 12px;
  background: #1c1b18;
}

.crop-stage canvas {
  display: block;
  max-width: 100%;
  border-radius: 12px;
  cursor: grab;
  touch-action: none;
}

.crop-zoom {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
}

.crop-zoom input {
  flex: 1;
}

.crop-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.banner-card__tools {
  display: flex;
  gap: 8px;
}

.product-ckeditor .cke {
  width: 1200px !important;
  border: 1px solid var(--line) !important;
  box-shadow: none !important;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.article-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.article-card:hover { border-color: var(--line-strong); }

.article-card img,
.article-card__cover {
  width: 100%;
  height: 140px;
  object-fit: cover;
  background: var(--soft);
  display: block;
}

.article-card__title {
  padding: 12px 12px 4px;
  font-weight: 650;
}

.article-card__meta {
  padding: 0 12px 12px;
  color: var(--muted);
  font-size: 12px;
}

.article-card.is-inactive { opacity: 0.7; }

.article-html-input {
  min-height: 280px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.5;
}

.article-html-preview {
  min-height: 120px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: auto;
}

.article-html-preview img {
  max-width: 100%;
  height: auto;
}

.article-html-preview h1,
.article-html-preview h2,
.article-html-preview h3 {
  margin: 0 0 12px;
}

.article-html-preview p,
.article-html-preview ul,
.article-html-preview ol,
.article-html-preview blockquote {
  margin: 0 0 12px;
}

.faq-admin { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }

.faq-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
}

.faq-card.is-inactive { opacity: 0.7; }

.faq-card__head {
  display: grid;
  grid-template-columns: 1fr 160px auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.faq-card__tools { display: flex; gap: 6px; }

@media (max-width: 860px) {
  #app.app-shell { grid-template-columns: 1fr; }
  .product-description-split,
  .product-description-split.is-left { flex-direction: column; }
  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .sidebar-nav { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .nav-group { min-width: 160px; }
  .content { padding: 20px 16px 48px; }
  .row { flex-wrap: wrap; }
  .row label,
  .spec-label { flex-basis: 100%; width: auto; }
  .faq-card__head { grid-template-columns: 1fr; }
}

.review-admin {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}

.review-admin__card {
  display: grid;
  gap: 8px;
  max-width: 720px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.review-admin__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.review-admin__head span,
.review-admin__text {
  color: var(--muted);
}

.review-admin__stars {
  letter-spacing: 0.08em;
}

.review-admin__media {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.review-admin__media img,
.review-admin__media video {
  width: 140px;
  height: 100px;
  object-fit: cover;
  background: var(--soft);
}

.review-admin__reply {
  width: 100%;
  min-height: 72px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  resize: vertical;
}

.review-admin__tools {
  display: flex;
  gap: 8px;
}

.chat-admin {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 16px;
  min-height: calc(100vh - 180px);
}

.chat-admin__list,
.chat-admin__pane {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.chat-admin__list {
  display: flex;
  flex-direction: column;
  overflow: auto;
  max-height: calc(100vh - 180px);
}

.chat-admin__row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.chat-admin__row strong {
  font-weight: 650;
}

.chat-admin__row span {
  color: var(--muted);
  font-size: 12px;
}

.chat-admin__row.is-unread strong::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--danger);
}

.chat-admin__row.is-active {
  background: var(--soft);
}

.chat-admin__pane {
  display: flex;
  flex-direction: column;
  min-height: 520px;
  max-height: calc(100vh - 180px);
  padding: 16px;
}

.chat-admin__person {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.chat-admin__person strong {
  font-size: 18px;
}

.chat-admin__person a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.chat-admin__log {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.chat-bubble {
  max-width: 78%;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--soft);
}

.chat-bubble.is-manager {
  align-self: flex-end;
  background: #eef6f2;
}

.chat-bubble p {
  margin: 0;
  white-space: pre-wrap;
}

.chat-bubble time {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}

.chat-bubble img {
  display: block;
  max-width: 220px;
  margin-top: 8px;
  border-radius: 8px;
  cursor: pointer;
}

.chat-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 32px;
  background: rgba(17, 24, 39, 0.88);
}

.chat-lightbox img {
  max-width: min(100%, 1100px);
  max-height: 90vh;
  object-fit: contain;
  background: #111;
}

.chat-lightbox__close,
.chat-lightbox__nav {
  position: absolute;
  border: 0;
  cursor: pointer;
}

.chat-lightbox__close {
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  background: transparent;
  color: #fff;
  font-size: 32px;
  line-height: 1;
}

.chat-lightbox__nav {
  top: 50%;
  width: 44px;
  height: 44px;
  transform: translateY(-50%);
  background: #fff;
  color: #111;
  font-size: 28px;
}

.chat-lightbox__nav.is-prev { left: 16px; }
.chat-lightbox__nav.is-next { right: 16px; }

.chat-file {
  display: inline-block;
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
}

.chat-admin__form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
  margin-top: 12px;
}

.chat-admin__actions {
  display: grid;
  gap: 8px;
  align-content: end;
}

.chat-admin__files {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  grid-column: 1 / -1;
}

.chat-admin__form textarea {
  width: 100%;
  min-height: 72px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  resize: vertical;
}
