:root {
  --bg: #f7f4f8;
  --card: #ffffff;
  --text: #231822;
  --muted: #6b5a66;
  --line: #eadce5;
  --primary: #8f2f6b;
  --primary-dark: #732554;
  --soft: #f6edf3;
  --success: #0a8f5b;
  --error: #b42318;
  --danger: #c93434;
  --shadow: 0 16px 40px rgba(31, 14, 26, 0.08);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; display: block; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.container-admin { width: min(1280px, calc(100% - 24px)); }
.narrow { width: min(840px, calc(100% - 32px)); margin: 0 auto; }
.spacing-top { padding-top: 18px; }
.section, .section-admin { padding: 32px 0 44px; }
.section-soft { background: #fbf8fc; }
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 244, 248, 0.94); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 74px; }
.brand { font-size: 1.4rem; font-weight: 700; color: var(--text); }
.brand-sidebar { color: #fff; margin-bottom: 18px; display: inline-block; }
.main-nav, .nav-actions, .stack-inline, .inline-form, .checkbox-row, .section-head-row, .price-row, .stats-row { display: flex; align-items: center; gap: 12px; }
.main-nav { flex-wrap: wrap; }
.main-nav a { color: var(--muted); font-weight: 600; }
.stack-inline.wrap, .inline-form.wrap { flex-wrap: wrap; }
.btn {
  border: 0; border-radius: 12px; padding: 11px 16px; cursor: pointer;
  font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-light { background: #fff; color: var(--text); border: 1px solid var(--line); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-full { width: 100%; }
.hero { padding: 64px 0 32px; }
.grid-hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: center; }
.hero h1 { font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.08; margin: 0 0 14px; }
.hero p { color: var(--muted); font-size: 1.04rem; }
.hero-card {
  background: linear-gradient(180deg, #fff, #f7edf4); border: 1px solid var(--line); border-radius: 24px;
  padding: 26px; box-shadow: var(--shadow);
}
.eyebrow, .pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px;
  border-radius: 999px; font-size: 0.76rem; font-weight: 700; letter-spacing: .04em;
  background: #f4deeb; color: var(--primary);
}
.pill-dark { background: #24141f; color: #fff; }
.pill-success { background: #daf3e8; color: var(--success); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  padding: 20px; box-shadow: var(--shadow);
}
.cards-3, .cards-4, .cards-5, .product-grid, .thumb-grid { display: grid; gap: 18px; }
.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cards-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.product-card { padding: 0; overflow: hidden; }
.product-media { aspect-ratio: 4 / 3; background: #fbf6fa; }
.product-media img, .product-main-image img { width: 100%; height: 100%; object-fit: cover; }
.product-body { padding: 18px; }
.price-row { justify-content: space-between; }
.big-price strong { font-size: 1.8rem; }
.promo-card { display: grid; grid-template-columns: 1fr 140px; gap: 16px; align-items: center; }
.promo-card img { border-radius: 18px; }
.two-col, .product-detail-grid, .shop-layout { display: grid; gap: 22px; }
.two-col { grid-template-columns: 1fr 1fr; }
.product-detail-grid { grid-template-columns: 1.1fr 1fr; }
.shop-layout { grid-template-columns: 300px 1fr; align-items: start; }
.align-start { align-items: start; }
.filter-panel { position: sticky; top: 96px; }
.line-card {
  display: flex; justify-content: space-between; gap: 16px; align-items: start;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.line-card:last-child { border-bottom: 0; padding-bottom: 0; }
.line-card.compact { padding: 10px 0; }
.meta-list { display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: .92rem; }
.list-check { padding-left: 20px; }
.list-check li { margin-bottom: 10px; }
.faq-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.form-group { display: grid; gap: 8px; }
.form-grid-2, .form-grid-3, .form-grid-4 { display: grid; gap: 14px; }
.form-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stack-form, .stack-list, .stack-right { display: grid; gap: 14px; }
.stack-right { justify-items: end; }
input, select, textarea {
  width: 100%; border: 1px solid #d8c8d3; border-radius: 12px; padding: 12px 14px;
  font: inherit; background: #fff; color: var(--text);
}
textarea { resize: vertical; }
.checkbox { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.checkbox input { width: auto; }
.alert {
  border-radius: 14px; padding: 14px 16px; margin-bottom: 16px; border: 1px solid transparent;
}
.alert-success { background: #e8f7f0; color: var(--success); border-color: #c2ebd7; }
.alert-error { background: #fdecec; color: var(--error); border-color: #f5c9c9; }
.metric-card span { display: block; color: var(--muted); margin-bottom: 8px; }
.metric-card strong { font-size: 1.6rem; }
.spec-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 18px 0;
}
.spec-grid > div {
  border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: #fff;
}
.spec-grid span { display: block; color: var(--muted); font-size: .85rem; }
.thumb-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 12px; }
.thumb-card, .product-main-image { border-radius: 18px; overflow: hidden; background: #fff; border: 1px solid var(--line); }
.cart-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.cart-actions { display: grid; gap: 10px; justify-items: end; }
.qty-input { width: 82px; }
.total-box { margin-top: 16px; text-align: right; }
.auth-shell { display: flex; justify-content: center; }
.auth-card { width: min(480px, 100%); }
.result-info { color: var(--muted); margin-bottom: 14px; }
.pagination-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.pagination-link {
  width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--text);
}
.pagination-link.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.success-hero { text-align: center; }
.payment-qr { width: 220px; margin: 6px auto 0; border-radius: 16px; border: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 20px; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer { padding: 42px 0 56px; border-top: 1px solid var(--line); background: #fff; }
.gap-sm { gap: 8px; }
.admin-body { background: #f3edf3; }
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 260px 1fr; }
.admin-sidebar {
  background: #24141f; color: #fff; padding: 24px 18px; display: grid; align-content: start; gap: 18px;
}
.admin-menu { display: grid; gap: 8px; }
.admin-menu a {
  color: rgba(255,255,255,.85); padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.04);
}
.admin-menu a:hover { background: rgba(255,255,255,.12); color: #fff; }
.admin-main { padding: 22px 0 32px; }
.table-wrap { overflow: auto; }
.table { width: 100%; border-collapse: collapse; min-width: 860px; }
.table th, .table td { padding: 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { font-size: .88rem; color: var(--muted); background: #fbf7fa; }
.prose-card { line-height: 1.75; }
@media (max-width: 1100px) {
  .cards-4, .cards-5, .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-hero, .shop-layout, .product-detail-grid, .two-col, .footer-grid, .admin-shell { grid-template-columns: 1fr; }
  .filter-panel { position: static; }
  .admin-sidebar { min-height: auto; }
}
@media (max-width: 720px) {
  .nav-row, .main-nav, .nav-actions { flex-wrap: wrap; }
  .cards-3, .cards-4, .cards-5, .product-grid, .form-grid-2, .form-grid-3, .form-grid-4, .spec-grid, .thumb-grid { grid-template-columns: 1fr; }
  .promo-card, .cart-row { grid-template-columns: 1fr; display: grid; }
  .cart-actions, .stack-right { justify-items: stretch; }
  .container { width: min(100% - 20px, 1180px); }
}

.spacing-top-sm { margin-top: 12px; }
.spacing-bottom { margin-bottom: 18px; }
.empty-state { text-align: center; padding: 36px 24px; }

.cards-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.dashboard-hero {
  display: grid;
  grid-template-columns: 1.6fr .9fr;
  gap: 20px;
  align-items: center;
  margin-bottom: 24px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(135deg, #fff 0%, #f8eef4 54%, #fff7fb 100%);
  box-shadow: var(--shadow);
}
.dashboard-hero h1 { margin: 8px 0 12px; font-size: clamp(1.7rem, 3vw, 2.6rem); line-height: 1.08; }
.dashboard-hero p { margin: 0; color: var(--muted); }
.dashboard-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; align-items: center; }
.dashboard-metrics { margin-bottom: 22px; }
.compact-cards .metric-card strong { font-size: 1.2rem; }
.role-switcher { display: flex; flex-wrap: wrap; gap: 8px; }
.role-pill {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(255,255,255,.85); color: var(--text); font-weight: 700; font-size: .9rem;
}
.role-pill.is-active { background: var(--primary); color: #fff; border-color: var(--primary); }
.modern-admin-shell { background: linear-gradient(180deg, #f8f1f6, #f4eef5 45%, #f5f1f7 100%); }
.modern-sidebar {
  background: linear-gradient(180deg, #21121d 0%, #321929 50%, #281420 100%);
  padding: 22px 18px;
  box-shadow: inset -1px 0 0 rgba(255,255,255,.04);
}
.admin-brand-mark {
  display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center;
  border-radius: 14px; background: rgba(255,255,255,.08); margin-right: 12px;
}
.admin-brand-mark svg { width: 20px; height: 20px; stroke: #fff; fill: none; stroke-width: 1.8; }
.brand-sidebar { display: flex; align-items: center; color: #fff; }
.brand-sidebar small { display: block; color: rgba(255,255,255,.65); font-size: .8rem; font-weight: 500; margin-top: 2px; }
.card-soft-dark {
  display: grid; gap: 3px; padding: 14px 16px; border-radius: 18px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08);
}
.card-soft-dark strong { color: #fff; }
.card-soft-dark span { color: rgba(255,255,255,.72); font-size: .88rem; }
.sidebar-top, .sidebar-actions, .sidebar-switcher { display: grid; gap: 14px; }
.sidebar-label { color: rgba(255,255,255,.66); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.modern-admin-menu { gap: 10px; }
.modern-admin-menu a {
  color: rgba(255,255,255,.82);
  padding: 11px 13px;
  border-radius: 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid transparent;
}
.modern-admin-menu a:hover,
.modern-admin-menu a.is-active {
  background: rgba(255,255,255,.12);
  color: #fff;
  border-color: rgba(255,255,255,.12);
}
.role-switcher-sidebar .role-pill {
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.12);
  color: rgba(255,255,255,.84);
}
.role-switcher-sidebar .role-pill.is-active { background: #fff; color: var(--primary); border-color: #fff; }
.modern-admin-main { padding: 26px 0 38px; }
.dashboard-hero-admin { background: linear-gradient(135deg, #fff 0%, #f8edf3 50%, #fff 100%); }
@media (max-width: 1100px) {
  .dashboard-hero, .cards-2 { grid-template-columns: 1fr; }
  .dashboard-hero-actions { justify-content: flex-start; }
}
@media (max-width: 720px) {
  .role-switcher { width: 100%; }
  .role-pill { width: 100%; }
}

.pill-info { background: #eef2ff; color: #3846a5; }
.pill-warning { background: #fff3db; color: #9a6a00; }
.pill-critical { background: #fdecec; color: #b42318; }
.filters-grid-compact { align-items: end; }
.form-actions-inline { display: flex; gap: 10px; align-items: end; }
.table-responsive { overflow-x: auto; }
code {
  display: inline-block;
  background: #f7eef4;
  border: 1px solid var(--line);
  color: var(--primary-dark);
  border-radius: 12px;
  padding: 12px 14px;
  font-family: Consolas, Monaco, monospace;
  font-size: .92rem;
}
