:root {
  --bg-primary: #070706;
  --bg-secondary: #10100c;
  --bg-card: #15130d;
  --bg-card-hover: #1d1a10;
  --bg-input: #201d12;
  --bg-modal: #17140d;
  --text-primary: #f4ead2;
  --text-secondary: #dac99d;
  --text-muted: #9c8f70;
  --accent: #d4af37;
  --accent-hover: #f2c94c;
  --accent-gradient: linear-gradient(135deg, #d4af37, #fff2a8);
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;
  --border: #2d2614;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --shadow-md: 0 4px 6px rgba(0,0,0,.4);
  --shadow-lg: 0 10px 25px rgba(0,0,0,.5);
  --shadow-glow: 0 0 22px rgba(212,175,55,.28);
}

* { box-sizing: border-box; }
html { overflow-x: hidden; scroll-behavior: smooth; }
* {
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--accent), transparent 25%) rgba(255,255,255,.05);
}
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track {
  border-radius: var(--radius-full);
  background: rgba(255,255,255,.05);
}
*::-webkit-scrollbar-thumb {
  border: 2px solid var(--bg-primary);
  border-radius: var(--radius-full);
  background: var(--accent);
}
*::-webkit-scrollbar-thumb:hover { background: var(--accent-hover); }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text-primary);
  background: radial-gradient(circle at top left, rgba(212,175,55,.13), transparent 38%), var(--bg-primary);
  font-family: Inter, Segoe UI, system-ui, sans-serif;
}
button, input, select, textarea { max-width: 100%; font: inherit; }
button { min-width: 0; }
button, a { transition: .15s ease; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }

.promo-banner {
  position: relative;
  overflow: hidden;
  width: min(1240px, calc(100% - 32px));
  margin: 18px auto 0;
  padding: 14px 48px;
  text-align: center;
  font-weight: 700;
  background: linear-gradient(100deg, var(--promo-a, #d4af37), var(--promo-b, #7dd3fc));
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.promo-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.24), transparent);
  transform: translateX(-100%);
  animation: shimmer 3s infinite;
}
.promo-banner code {
  position: relative;
  z-index: 1;
  margin-left: 12px;
  padding: 4px 9px;
  border: 1px dashed rgba(255,255,255,.75);
  border-radius: var(--radius-sm);
  font-family: "JetBrains Mono", monospace;
  cursor: pointer;
}
.promo-banner button {
  position: absolute;
  z-index: 2;
  right: 14px;
  top: 7px;
  border: 0;
  background: transparent;
  color: white;
  cursor: pointer;
}
@keyframes shimmer { to { transform: translateX(100%); } }

.maintenance-banner {
  width: min(1240px, calc(100% - 32px));
  margin: 14px auto 0;
  padding: 14px 18px;
  border: 1px solid rgba(245,158,11,.35);
  border-radius: var(--radius-md);
  color: #fde7ba;
  background: rgba(245,158,11,.1);
  box-shadow: var(--shadow-md);
}

.cookie-consent {
  position: fixed;
  z-index: 820;
  left: 50%;
  bottom: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  width: min(960px, calc(100% - 24px));
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(18,16,11,.96);
  box-shadow: var(--shadow-lg);
  transform: translateX(-50%);
}
.cookie-consent__content {
  min-width: 0;
}
.cookie-consent__content strong {
  display: block;
  margin-bottom: 6px;
}
.cookie-consent__content p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.55;
}
.cookie-consent__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.maintenance-card {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  width: 100%;
  padding: 28px;
  border: 1px solid rgba(245,158,11,.25);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  background: rgba(255,255,255,.03);
  box-shadow: var(--shadow-md);
}
.maintenance-card p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 64px;
  padding: 0 28px;
  background: rgba(15,17,23,.86);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: max-content;
}
.brand-mark, .login-logo {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: white;
  background: var(--accent-gradient);
  border-radius: 12px;
  box-shadow: var(--shadow-glow);
}
.brand strong { display: block; font-size: 18px; }
.brand small { display: block; color: var(--text-muted); font-size: 12px; }
.server-tabs button, .filter-trigger, .ghost-btn, .icon-btn, .select-control {
  border: 1px solid var(--border);
  color: var(--text-primary);
  background: rgba(255,255,255,.03);
  border-radius: var(--radius-md);
  cursor: pointer;
}
.server-tabs button.active, .filter-menu button.active {
  border-color: color-mix(in srgb, var(--accent), white 12%);
  color: white;
  background: color-mix(in srgb, var(--accent), transparent 84%);
}
.header-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; min-width: 0; }
.ghost-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 13px; }
.ghost-btn:hover, .icon-btn:hover, .filter-trigger:hover { border-color: var(--accent); }
.compact-support-btn {
  min-width: 0;
  padding-inline: 11px;
}
.ip-chip {
  display: grid;
  gap: 2px;
  min-width: 132px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  background: color-mix(in srgb, var(--accent), transparent 92%);
  text-align: left;
  cursor: pointer;
}
.ip-chip small {
  color: var(--text-muted);
  font-size: 11px;
}
.ip-chip strong {
  font-size: 14px;
  font-weight: 800;
}
.account-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  background: rgba(255,255,255,.035);
}
.account-summary span { min-width: 0; overflow-wrap: anywhere; }
.account-summary.big {
  justify-content: center;
  padding: 16px;
  font-weight: 800;
}
.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  white-space: nowrap;
}
.inline-check input { width: auto; }
.icon-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
}
.badge {
  position: absolute;
  right: -5px;
  top: -5px;
  min-width: 19px;
  padding: 2px 5px;
  border-radius: var(--radius-full);
  color: white;
  background: var(--danger);
  font-size: 11px;
}

.shop-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 28px auto 54px;
}
.shop-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  padding: clamp(26px, 5vw, 52px);
  min-height: 260px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(120deg, rgba(212,175,55,.22), rgba(125,211,252,.08)),
    radial-gradient(circle at 80% 20%, rgba(59,130,246,.16), transparent 35%),
    var(--bg-card);
  box-shadow: var(--shadow-lg);
}
.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-hover);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 12px;
}
.shop-hero h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(34px, 6vw, 70px);
  line-height: .98;
  letter-spacing: 0;
}
.shop-hero p:not(.eyebrow) {
  max-width: 620px;
  color: var(--text-secondary);
  font-size: 17px;
  line-height: 1.6;
}
.hero-status {
  display: grid;
  gap: 8px;
  justify-items: end;
  color: var(--text-secondary);
}
.hero-status strong {
  color: var(--text-primary);
  font-family: "JetBrains Mono", monospace;
  font-size: 20px;
}

.catalog-head {
  position: sticky;
  top: 64px;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
  padding: 18px 0;
  background: linear-gradient(180deg, var(--bg-primary) 75%, transparent);
}
.catalog-head h2 { margin: 0; font-size: 26px; }
.catalog-head p { margin: 4px 0 0; color: var(--text-muted); }
.catalog-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.catalog-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.catalog-overview-card {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.025);
}
.catalog-overview-card span {
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
}
.catalog-overview-card strong {
  color: var(--text-primary);
  font-size: 18px;
}
.catalog-overview-tags {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.catalog-tag {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid color-mix(in srgb, var(--accent), var(--border) 72%);
  border-radius: 999px;
  color: var(--text-secondary);
  background: color-mix(in srgb, var(--accent), transparent 92%);
  font-size: 13px;
}
.dropdown-filter { position: relative; }
.filter-trigger {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  padding: 0 13px;
}
.filter-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 300;
  display: grid;
  gap: 6px;
  width: 250px;
  max-height: 320px;
  padding: 8px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-modal);
  box-shadow: var(--shadow-lg);
}
.filter-menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 11px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.search-box {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  min-width: 220px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  background: var(--bg-input);
}
.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text-primary);
  background: transparent;
}
.search-box input::placeholder,
.order-form input::placeholder,
.admin-form input::placeholder,
.admin-form textarea::placeholder,
.login-card input::placeholder,
.log-tools input::placeholder {
  color: #a8afbd;
  opacity: 1;
}
.select-control {
  height: 42px;
  padding: 0 12px;
  outline: 0;
  background: var(--bg-input);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  min-height: 280px;
}
.product-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 360px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  cursor: pointer;
}
.product-card::before {
  content: "";
  height: 3px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: .15s ease;
}
.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
}
.product-card:hover::before { opacity: 1; }
.product-media {
  display: grid;
  place-items: center;
  height: 150px;
  color: var(--accent-hover);
  background: linear-gradient(135deg, rgba(255,255,255,.04), rgba(255,255,255,.01));
  font-size: 46px;
}
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  padding: 18px;
}
.product-card h3 { margin: 0; font-size: 20px; }
.product-card p { margin: 0; color: var(--text-secondary); line-height: 1.5; }
.product-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.category-line { display: flex; align-items: center; gap: 8px; color: var(--text-secondary); font-size: 13px; }
.dot { width: 9px; height: 9px; border-radius: var(--radius-full); background: var(--accent); }
.product-type-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  background: rgba(255,255,255,.03);
  font-size: 12px;
  text-transform: lowercase;
}
.product-summary-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--text-secondary);
  font-size: 13px;
}
.product-detail-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
}
.price { color: var(--accent-hover); font-weight: 800; font-size: 21px; }
.old-price { color: var(--text-muted); text-decoration: line-through; font-size: 13px; }
.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius-md);
  color: white;
  background: var(--accent-gradient);
  cursor: pointer;
  font-weight: 800;
}
.primary-btn:hover { filter: brightness(1.08); box-shadow: var(--shadow-glow); }
.full { width: 100%; }
.discount-badge, .featured-badge {
  position: absolute;
  top: 12px;
  z-index: 2;
  padding: 5px 8px;
  border-radius: var(--radius-full);
  color: white;
  font-size: 12px;
  font-weight: 800;
}
.discount-badge { right: 12px; background: var(--danger); }
.featured-badge { left: 12px; background: var(--warning); }

.skeleton {
  min-height: 360px;
  border-radius: var(--radius-lg);
  background: linear-gradient(90deg, var(--bg-card), var(--bg-card-hover), var(--bg-card));
  background-size: 220% 100%;
  animation: skeleton 1.15s infinite linear;
}
@keyframes skeleton { to { background-position: -220% 0; } }
.empty-state {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 300px;
  padding: 30px;
  color: var(--text-secondary);
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
}
.empty-state i { color: var(--accent); font-size: 42px; }

.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 28px; }
.pagination button {
  min-width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  background: var(--bg-card);
  cursor: pointer;
}
.pagination button.active { color: white; border-color: var(--accent); background: var(--accent); }

.overlay {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(2px);
}
.cart-dropdown {
  position: fixed;
  right: 24px;
  top: 74px;
  z-index: 350;
  width: min(380px, calc(100vw - 32px));
  max-height: 480px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-modal);
  box-shadow: var(--shadow-lg);
}
.cart-head, .cart-footer, .cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.cart-item small { display: block; color: var(--text-muted); margin-top: 4px; }
.cart-footer { border-bottom: 0; border-top: 1px solid var(--border); }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0,0,0,.68);
  backdrop-filter: blur(4px);
}
.modal {
  width: min(700px, 100%);
  max-height: 90vh;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-modal);
  box-shadow: var(--shadow-lg);
  animation: pop .25s ease;
}
.modal.product-modal {
  width: min(980px, 100%);
}
@keyframes pop { from { opacity: 0; transform: scale(.95); } }
.modal-head, .modal-body, .modal-actions { padding: 20px; }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--border);
}
.modal-head h2 { margin: 0; }
.close-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  background: var(--bg-input);
  cursor: pointer;
}
.feature-grid, .variant-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.product-modal-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}
.product-info-pane {
  min-width: 0;
}
.buy-pane {
  position: sticky;
  top: 0;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
}
.buy-pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.buy-pane h3 { margin: 0; }
.checkout-section {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.025);
}
.checkout-label {
  display: grid;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
}
.checkout-summary-card {
  display: grid;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(255,255,255,.02);
}
.summary-total-row {
  border-top: 1px solid rgba(255,255,255,.06);
  background: color-mix(in srgb, var(--accent), transparent 92%);
}
.variant-grid.compact {
  grid-template-columns: 1fr;
  max-height: 220px;
  overflow: auto;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--accent), transparent 25%) rgba(255,255,255,.05);
}
.variant-grid.compact::-webkit-scrollbar {
  width: 8px;
}
.variant-grid.compact::-webkit-scrollbar-track {
  border-radius: var(--radius-full);
  background: rgba(255,255,255,.05);
}
.variant-grid.compact::-webkit-scrollbar-thumb {
  border: 2px solid var(--bg-card);
  border-radius: var(--radius-full);
  background: var(--accent);
}
.variant-grid.compact::-webkit-scrollbar-thumb:hover {
  background: var(--accent-hover);
}
.order-form.compact {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.quantity-box {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.025);
}
.quantity-box small {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
}
.quantity-control {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  gap: 8px;
}
.quantity-control button, .quantity-control input {
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  background: var(--bg-input);
}
.quantity-control button {
  cursor: pointer;
}
.quantity-control input {
  padding: 0 10px;
  text-align: center;
  outline: 0;
}
.feature, .variant-card {
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}
.feature.highlight { border-color: var(--warning); }
.variant-card { cursor: pointer; }
.variant-card strong {
  color: var(--text-primary);
}
.variant-card p {
  margin: 5px 0 8px;
  color: #d6d8e1;
}
.variant-card .price {
  color: var(--accent-hover);
}
.variant-card.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent), transparent 88%); }
.variant-card:disabled {
  opacity: .72;
  cursor: not-allowed;
}
.variant-card:disabled strong,
.variant-card:disabled p {
  color: #aeb4c2;
}
.order-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.order-form input, .admin-form input, .admin-form textarea, .admin-form select, .login-card input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  outline: 0;
  color: var(--text-primary);
  background: var(--bg-input);
}
.order-form input,
.admin-form input,
.admin-form textarea,
.admin-form select,
.login-card input,
.select-control,
.log-tools input,
.log-tools select {
  border-color: #2b3042;
}
.promo-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.offer-check {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.45;
}
.offer-check input {
  width: 18px;
  min-height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
}
.offer-check a {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.toast-root {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 900;
  display: grid;
  gap: 10px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(360px, calc(100vw - 36px));
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--info);
  border-radius: var(--radius-md);
  background: var(--bg-modal);
  box-shadow: var(--shadow-lg);
  animation: slideIn .2s ease;
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
@keyframes slideIn { from { opacity: 0; transform: translateX(25px); } }

.site-footer {
  display: grid;
  gap: 18px;
  width: 100%;
  margin: 0;
  padding: 28px max(16px, calc((100% - 1240px) / 2)) 42px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(212,175,55,.08), rgba(0,0,0,0)),
    #090806;
}
.site-footer a { color: var(--text-secondary); }
.footer-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, auto);
  align-items: start;
  justify-content: space-between;
  gap: 28px;
}
.footer-brand {
  display: grid;
  gap: 6px;
  max-width: 560px;
}
.footer-brand strong {
  color: var(--text-primary);
  font-size: 18px;
}
.footer-brand small {
  color: var(--text-muted);
  line-height: 1.5;
}
.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 16px;
  text-align: right;
}
.site-footer button {
  padding: 0;
  border: 0;
  color: var(--text-secondary);
  background: transparent;
  cursor: pointer;
}
.site-footer a:hover,
.site-footer button:hover { color: var(--accent-hover); }
.footer-socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding-top: 8px;
}
.footer-socials:empty { display: none; }
.footer-socials a {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  background: color-mix(in srgb, var(--accent), transparent 92%);
  font-size: 18px;
}
.footer-socials a:hover {
  border-color: var(--accent);
  color: var(--accent-hover);
  transform: translateY(-1px);
}

.auth-page, .error-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 20px;
}
.login-card, .error-page main {
  width: min(420px, 100%);
  padding: 42px 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.login-logo { width: 56px; height: 56px; margin: 0 auto 18px; font-size: 23px; }
.login-card h1 { margin: 0; }
.login-card p { margin: 8px 0 26px; color: var(--text-muted); }
.login-card form { display: grid; gap: 15px; text-align: left; }
.login-card label { display: grid; gap: 8px; color: var(--text-secondary); font-size: 14px; }
.password-field { position: relative; display: block; }
.password-field button {
  position: absolute;
  right: 7px;
  top: 5px;
  width: 32px;
  height: 32px;
  border: 0;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
}
.form-error {
  padding: 11px;
  border: 1px solid color-mix(in srgb, var(--danger), transparent 60%);
  border-radius: var(--radius-md);
  color: #fecaca;
  background: rgba(239,68,68,.12);
  animation: shake .45s ease;
}
.form-hint {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  background: rgba(255,255,255,.03);
  line-height: 1.5;
}
.account-receipts {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  text-align: left;
}
.account-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.account-actions-grid .primary-btn,
.account-actions-grid .ghost-btn {
  width: 100%;
  justify-content: center;
}
.receipt-mini {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-input);
}
.receipt-mini span,
.receipt-mini small { color: var(--text-muted); line-height: 1.45; }
.receipt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
@keyframes shake { 20%,60% { transform: translateX(-8px); } 40%,80% { transform: translateX(8px); } }
.back-link { display: inline-block; margin-top: 22px; color: var(--text-muted); }

.admin-page {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}
.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px;
  border-right: 1px solid var(--border);
  background: var(--bg-secondary);
}
.admin-nav { display: grid; gap: 6px; }
.admin-nav button, .admin-side-actions button, .admin-side-actions a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.admin-nav button.active, .admin-nav button:hover {
  border-color: var(--border);
  color: var(--text-primary);
  background: var(--bg-card);
}
.admin-side-actions { margin-top: auto; display: grid; gap: 6px; }
.admin-main { min-width: 0; }
.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(10,11,15,.88);
  backdrop-filter: blur(16px);
}
#adminBurger { display: none; }
.admin-topbar h1 { margin: 0; font-size: 24px; }
.admin-topbar p { margin: 3px 0 0; color: var(--text-muted); }
.role-pill {
  margin-left: auto;
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  background: var(--bg-card);
}
.role-pill.success {
  border-color: color-mix(in srgb, var(--success), transparent 55%);
  color: #bbf7d0;
  background: rgba(34,197,94,.10);
}
.role-pill.danger {
  border-color: color-mix(in srgb, var(--danger), transparent 55%);
  color: #fecaca;
  background: rgba(239,68,68,.10);
}
.status-toggle {
  min-width: 86px;
  padding: 7px 11px;
  border: 1px solid color-mix(in srgb, var(--danger), transparent 55%);
  border-radius: var(--radius-full);
  color: #fecaca;
  background: rgba(239,68,68,.10);
  cursor: pointer;
  font-weight: 700;
}
.status-toggle.active {
  border-color: color-mix(in srgb, var(--success), transparent 55%);
  color: #bbf7d0;
  background: rgba(34,197,94,.10);
}
.status-toggle:hover { filter: brightness(1.15); }
.admin-content {
  display: grid;
  gap: 18px;
  padding: 24px;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.stat-card, .admin-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
}
.stat-card { padding: 18px; }
.stat-card span { color: var(--text-muted); }
.stat-card strong { display: block; margin-top: 8px; font-size: 28px; color: var(--text-primary); }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}
.panel-head h2 { margin: 0; font-size: 18px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 13px 16px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { color: var(--text-secondary); font-size: 13px; font-weight: 700; }
td code { font-family: "JetBrains Mono", monospace; color: var(--accent-hover); }
.row-actions { display: flex; gap: 6px; }
.mini-btn {
  min-width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  background: var(--bg-input);
  cursor: pointer;
}
.admin-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.admin-form label { display: grid; gap: 7px; color: var(--text-secondary); font-size: 13px; }
.admin-form .wide { grid-column: 1 / -1; }
.secret-field {
  grid-column: span 1;
}
.secret-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.secret-row .ghost-btn {
  justify-content: center;
  min-width: 112px;
}
.form-details {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.025);
}
.form-details summary {
  width: max-content;
  color: var(--accent-hover);
  cursor: pointer;
  font-weight: 800;
}
.form-details p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}
.form-details label { margin-top: 10px; }
.admin-filters {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, minmax(140px, 1fr));
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--border);
}
.admin-filters input,
.admin-filters select {
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #2b3042;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  background: var(--bg-input);
  outline: 0;
}
.product-admin-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--border);
}
.stat-card.compact {
  padding: 14px 16px;
  min-height: 0;
}
.product-admin-list {
  display: grid;
  gap: 14px;
  padding: 14px;
}
.product-admin-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015));
}
.product-admin-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.product-admin-card__head h3 {
  margin: 8px 0 6px;
  color: var(--text-primary);
}
.product-admin-card__head p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.5;
}
.product-admin-card__topline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.product-admin-card__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}
.product-admin-card__meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--text-secondary);
}
.product-admin-card__chips,
.editor-chip-list {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.product-admin-card__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.product-admin-card__actions .ghost-btn {
  flex: 1 1 auto;
  justify-content: center;
}
.editor-section {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.025);
}
.editor-section__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.editor-section__head strong {
  display: block;
  color: var(--text-primary);
}
.editor-section__head span {
  display: block;
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}
.product-editor-grid {
  width: 100%;
  margin: 0;
}
.editor-inline-note {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px dashed rgba(212,175,55,.4);
  border-radius: var(--radius-md);
  background: rgba(212,175,55,.08);
}
.editor-inline-note strong {
  color: var(--text-primary);
}
.editor-inline-note span {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}
.upload-field {
  grid-column: 1 / -1;
}
.upload-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.upload-row .ghost-btn {
  min-height: 42px;
  white-space: nowrap;
}
.variant-editor {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.025);
}
.variant-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.variant-editor-head strong { display: block; color: var(--text-primary); }
.variant-editor-head span {
  display: block;
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 13px;
}
.variant-editor-list {
  display: grid;
  gap: 10px;
  max-height: 420px;
  overflow: auto;
  padding-right: 6px;
}
.variant-editor-row {
  display: grid;
  grid-template-columns: 1.2fr .8fr .8fr 1fr .8fr 38px;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}
.variant-editor-row label {
  min-width: 0;
}
.variant-editor-row textarea {
  min-height: 82px;
  resize: none;
}
.variant-command-field {
  grid-column: 1 / -1;
}
.log-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.log-tools input, .log-tools select {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  background: var(--bg-input);
  outline: 0;
}
.logs-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}
.log-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.025);
  cursor: pointer;
  transition: .15s ease;
}
.log-card:hover,
.log-card:focus-visible {
  border-color: var(--accent);
  background: rgba(212,175,55,.09);
  outline: 0;
}
.log-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  color: var(--accent-hover);
  background: color-mix(in srgb, var(--accent), transparent 88%);
}
.log-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.log-title span, .log-main p {
  color: var(--text-secondary);
  font-size: 13px;
}
.log-main p { margin: 5px 0 0; }
.log-card code {
  color: var(--text-secondary);
  font-family: "JetBrains Mono", monospace;
}
.modal.log-modal {
  width: min(980px, 100%);
}
.modal.support-admin-modal {
  width: min(1280px, 100%);
  max-height: calc(100vh - 40px);
}
.log-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-bottom: 14px;
  color: var(--text-secondary);
}
.segmented-control {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-input);
}
.segmented-control button {
  min-height: 32px;
  padding: 7px 10px;
  border: 0;
  border-radius: 7px;
  color: var(--text-secondary);
  background: transparent;
  font-weight: 800;
  cursor: pointer;
}
.segmented-control button.active {
  color: #1a1407;
  background: var(--accent);
}
.support-list {
  display: grid;
  gap: 12px;
  padding: 14px;
}
.support-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.025);
}
.support-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.support-card-head p,
.support-meta {
  color: var(--text-secondary);
  font-size: 13px;
}
.support-card select,
.support-note textarea {
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  background: var(--bg-input);
}
.support-card select,
.support-note textarea,
.support-message-form input,
.support-message-form textarea,
.support-form input,
.support-form textarea {
  width: 100%;
  padding: 11px 12px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.support-card select::placeholder,
.support-note textarea::placeholder,
.support-message-form input::placeholder,
.support-message-form textarea::placeholder,
.support-form input::placeholder,
.support-form textarea::placeholder {
  color: color-mix(in srgb, var(--text-muted), white 12%);
}
.support-message {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.support-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}
.support-note {
  display: grid;
  gap: 7px;
  color: var(--text-secondary);
  font-weight: 800;
}
.support-note textarea {
  min-height: 86px;
  padding: 10px;
  resize: none;
}
.support-chat-layout {
  display: grid;
  grid-template-columns: minmax(210px, .8fr) minmax(0, 1.7fr);
  gap: 16px;
  min-height: calc(100vh - 220px);
}
.support-ticket-list {
  display: grid;
  align-content: start;
  gap: 10px;
}
.support-ticket-btn {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  background: rgba(255,255,255,.03);
  text-align: left;
  cursor: pointer;
}
.support-ticket-btn:hover { border-color: var(--accent); }
.support-ticket-btn.active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent), transparent 90%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent), transparent 55%);
}
.support-ticket-btn span,
.support-ticket-btn small {
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.support-chat-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
}
.support-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.support-chat-head div {
  display: grid;
  gap: 4px;
}
.support-chat-head span {
  color: var(--text-muted);
  font-size: 13px;
}
.support-messages {
  display: grid;
  gap: 10px;
  min-height: 0;
  max-height: none;
  height: 100%;
  padding: 14px 10px;
  overflow: auto;
}
.support-bubble {
  justify-self: start;
  width: fit-content;
  max-width: min(78%, 560px);
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255,255,255,.035);
  box-shadow: 0 8px 22px rgba(0,0,0,.18);
}
.support-bubble.admin {
  justify-self: end;
  border-color: color-mix(in srgb, var(--accent), transparent 50%);
  background: color-mix(in srgb, var(--accent), transparent 90%);
}
.support-bubble small {
  display: block;
  margin-bottom: 5px;
  color: var(--text-muted);
}
.support-bubble p {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.support-attachment-preview {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.support-attachment-preview a {
  color: var(--accent-hover);
}
.support-attachment-preview img {
  max-width: min(100%, 320px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.support-new-ticket-btn {
  position: sticky;
  top: 0;
  z-index: 1;
}
.support-message-form {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  margin-top: auto;
  background: linear-gradient(180deg, rgba(7,7,6,0), rgba(7,7,6,.92) 20%, rgba(7,7,6,.96));
  position: sticky;
  bottom: 0;
}
.support-form,
.support-message-form {
  gap: 12px;
}
.support-attachment-row,
.support-message-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.support-attachment-row.compact {
  justify-content: flex-start;
}
.support-attachment-row.compact small {
  color: var(--text-muted);
}
.support-attachment-row input {
  flex: 1 1 220px;
}
.support-message-actions small {
  color: var(--text-muted);
}
.support-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: end;
  gap: 10px;
}
.support-form input,
.support-form textarea,
.support-message-form input,
.support-message-form textarea {
  border-color: color-mix(in srgb, var(--accent), var(--border) 65%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
  background: color-mix(in srgb, var(--bg-card), black 16%);
  color: var(--text-primary);
}
.support-form textarea,
.support-message-form textarea {
  resize: none;
}
.support-modal {
  width: min(1280px, 100%);
  max-height: calc(100vh - 40px);
}
.modal.support-admin-modal .modal-body {
  display: grid;
  min-height: min(72vh, 860px);
}
.modal.support-admin-modal .support-message-form {
  align-content: end;
}
.support-chat-panel {
  min-height: calc(100vh - 240px);
  height: min(78vh, 880px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}
.support-messages {
  overscroll-behavior: contain;
}
.support-composer-btn {
  width: 46px;
  min-width: 46px;
  height: 46px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.support-message-form textarea {
  min-height: 46px;
  max-height: 112px;
  line-height: 1.45;
  padding: 12px 14px;
  border-radius: 14px;
}
.support-form textarea {
  min-height: 140px;
  line-height: 1.5;
}
.support-modal .modal-body {
  min-height: min(82vh, 920px);
  max-height: min(82vh, 920px);
  overflow: hidden;
}
.support-ticket-list,
.support-chat-panel {
  min-height: 0;
}
.support-ticket-list {
  overflow: auto;
}
.support-form input:focus,
.support-form textarea:focus,
.support-message-form input:focus,
.support-message-form textarea:focus,
.support-card select:focus,
.support-note textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent), transparent 82%);
  background: color-mix(in srgb, var(--bg-input), white 4%);
}
.form-subtitle {
  margin: -2px 0 14px;
  color: var(--text-secondary);
  line-height: 1.55;
}
.discord-builder-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.discord-builder-tips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.discord-ticket-panels {
  display: grid;
  gap: 16px;
}
.discord-ticket-panel,
.discord-ticket-button {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--accent), var(--border) 72%);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255,255,255,.02), transparent 45%),
    color-mix(in srgb, var(--bg-card), var(--accent) 4%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.discord-ticket-section {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.02);
}
.discord-ticket-section h4 {
  margin: 0;
  font-size: 13px;
  color: var(--text-primary);
}
.discord-ticket-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.discord-ticket-panel__head strong {
  font-size: 14px;
}
.discord-ticket-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.discord-ticket-grid .wide {
  grid-column: 1 / -1;
}
.discord-ticket-grid label {
  display: grid;
  gap: 8px;
  color: var(--text-secondary);
  font-weight: 700;
}
.discord-ticket-grid input,
.discord-ticket-grid select,
.discord-ticket-grid textarea {
  width: 100%;
  min-height: 42px;
  padding: 11px 12px;
  border: 1px solid color-mix(in srgb, var(--accent), var(--border) 65%);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  background: var(--bg-input);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.discord-ticket-grid textarea {
  min-height: 110px;
  resize: vertical;
}
.discord-ticket-grid input:focus,
.discord-ticket-grid select:focus,
.discord-ticket-grid textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent), transparent 82%);
  background: color-mix(in srgb, var(--bg-input), white 4%);
}
.discord-ticket-buttons,
.discord-ticket-button-list {
  display: grid;
  gap: 12px;
}
.discord-ticket-fields,
.discord-ticket-field-list {
  display: grid;
  gap: 12px;
}
.discord-ticket-help {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.5;
}
.discord-preview-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--accent), var(--border) 70%);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--accent), transparent 94%);
}
.discord-preview-card.soft {
  border-style: dashed;
  background: rgba(255,255,255,.02);
}
.discord-preview-card strong {
  color: var(--text-primary);
}
.discord-preview-card span {
  color: var(--text-secondary);
  line-height: 1.5;
}
.discord-preview-card b {
  color: var(--text-primary);
}
.discord-preview-fields {
  display: grid;
  gap: 8px;
}
.discord-preview-field {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.02);
}
.discord-preview-field.empty {
  color: var(--text-muted);
  text-align: center;
}
.discord-preview-field strong {
  color: var(--text-primary);
}
.discord-preview-field span,
.discord-preview-field small {
  color: var(--text-secondary);
  line-height: 1.45;
}
.discord-ticket-field {
  padding: 14px;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.02);
}
.empty-state.compact {
  min-height: 0;
  padding: 16px;
  border-radius: var(--radius-md);
}
.receipt-verify-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 0 14px 14px;
}
.receipt-verify-form input {
  min-width: 0;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  background: var(--bg-input);
}
.receipt-verify-form input[type="file"] {
  padding: 9px 12px;
  appearance: none;
  cursor: pointer;
}
.receipt-verify-form input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  background: color-mix(in srgb, var(--accent), transparent 90%);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease;
}
.receipt-verify-form input[type="file"]::file-selector-button:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent), transparent 82%);
}
#receiptVerifyResult {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--text-secondary);
}
.diff-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.diff-grid section {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
}
.diff-grid h3 {
  margin: 0 0 12px;
}
.diff-table {
  display: grid;
  gap: 8px;
  margin: 0;
}
.diff-table div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-input);
}
.diff-table dt {
  color: var(--text-muted);
  font-weight: 700;
}
.diff-table dd {
  margin: 0;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}
.empty-state.compact {
  min-height: 90px;
  padding: 12px;
}
.orders-list {
  display: grid;
  gap: 12px;
  padding: 14px;
}
.order-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.025);
}
.order-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.order-top code {
  color: var(--accent-hover);
  font-family: "JetBrains Mono", monospace;
}
.order-top h3 {
  margin: 6px 0 4px;
  font-size: 19px;
}
.order-top p, .order-meta {
  color: var(--text-secondary);
  font-size: 13px;
}
.order-total {
  display: grid;
  justify-items: end;
  gap: 8px;
}
.order-total strong {
  font-size: 22px;
  color: var(--text-primary);
}
.order-status {
  padding: 6px 10px;
  border-radius: var(--radius-full);
  color: #fde68a;
  background: rgba(245,158,11,.14);
  font-weight: 800;
  font-size: 12px;
}
.order-status.delivered, .order-status.success, .order-status.paid {
  color: #bbf7d0;
  background: rgba(34,197,94,.14);
}
.order-status.failed, .order-status.cancelled {
  color: #fecaca;
  background: rgba(239,68,68,.14);
}
.order-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.order-items span {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  background: var(--bg-input);
  font-size: 13px;
}
.order-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}
.order-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.modal.order-modal {
  width: min(860px, 100%);
}
.order-modal-body {
  display: grid;
  gap: 14px;
}
.order-modal-section {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
}
.order-modal-section h3 {
  margin: 0;
}
.order-modal-items {
  display: grid;
  gap: 8px;
}
.order-modal-items div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-input);
}
.order-modal-items span {
  color: var(--text-secondary);
  text-align: right;
}
.order-details {
  border-top: 1px solid var(--border);
  padding-top: 10px;
}
.order-details summary {
  width: max-content;
  color: var(--accent-hover);
  cursor: pointer;
  font-weight: 800;
}
.order-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
  color: var(--text-secondary);
  font-size: 14px;
}
.delivery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.delivery-state-btn {
  position: relative;
}
.delivery-state-btn.delivery-active {
  border-color: var(--accent);
  color: white;
  background: color-mix(in srgb, var(--accent), transparent 72%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent), white 20%), var(--shadow-glow);
}
.delivery-state-btn.delivery-active::after {
  content: "выбрано";
  margin-left: 6px;
  color: rgba(255,255,255,.78);
  font-size: 11px;
  font-weight: 700;
}
.danger-action {
  border-color: color-mix(in srgb, var(--danger), transparent 35%);
  color: #fecaca;
}
.danger-action.delivery-active {
  border-color: var(--danger);
  background: rgba(239,68,68,.22);
  box-shadow: inset 0 0 0 1px rgba(254,202,202,.2);
}
.offer-page-panel {
  overflow: hidden;
}
.offer-page-panel .panel-head {
  align-items: center;
}
.offer-page-panel h1 {
  margin: 0;
  font-size: 24px;
}
.offer-text {
  padding: 22px;
  color: var(--text-secondary);
  white-space: pre-wrap;
  line-height: 1.7;
}

.error-page main i { color: var(--accent); font-size: 54px; }
.error-page h1 {
  margin: 14px 0 0;
  font-size: 76px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  color: transparent;
}
.error-page p { color: var(--text-muted); }
.payment-page main {
  width: min(560px, 100%);
}
.payment-page .payment-status-icon {
  display: inline-grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin: 0 auto 18px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
}
.payment-page .payment-status-icon i {
  font-size: 34px;
}
.payment-success .payment-status-icon i { color: var(--success); }
.payment-fail .payment-status-icon i { color: var(--danger); }
.payment-page h1 {
  margin: 0;
  font-size: clamp(30px, 7vw, 46px);
  color: var(--text-primary);
  background: none;
  -webkit-background-clip: initial;
}
.payment-page p {
  margin: 14px 0 0;
  line-height: 1.65;
}
.payment-page small {
  display: block;
  margin-top: 18px;
  color: var(--text-muted);
  line-height: 1.55;
}
.payment-page-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

@media (max-width: 1199px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 899px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-header {
    position: sticky;
    min-height: auto;
    padding: 12px 14px;
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
  #adminEntryBtn.hidden + #copyIpBtn,
  #copyIpBtn {
    flex: 1;
    justify-content: center;
  }
  .catalog-head, .shop-hero { grid-template-columns: 1fr; }
  .catalog-head {
    position: static;
    padding: 14px 0;
    background: transparent;
  }
  .shop-hero { align-items: start; }
  .hero-status { justify-items: start; }
  .catalog-head { display: grid; }
  .catalog-controls { justify-content: flex-start; }
  body.admin-page,
  .admin-page {
    display: block;
    min-height: 100vh;
  }
  .admin-main {
    width: 100%;
    min-width: 0;
  }
  .admin-sidebar {
    position: fixed;
    z-index: 700;
    top: 0;
    left: 0;
    width: min(86vw, 320px);
    max-width: 100%;
    height: 100dvh;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: .2s ease;
    box-shadow: var(--shadow-lg);
  }
  .admin-sidebar.open { transform: translateX(0); }
  #adminBurger { display: grid; }
  .admin-content { padding: 12px; gap: 12px; }
  .admin-topbar {
    min-height: 60px;
    padding: 8px 12px;
    gap: 10px;
  }
  .admin-topbar h1 { font-size: 19px; }
  .admin-topbar p { font-size: 12px; }
  .role-pill { padding: 6px 9px; font-size: 12px; }
  .modal-backdrop { padding: 10px; align-items: start; }
  .modal { max-height: calc(100vh - 20px); }
  .product-modal-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .buy-pane {
    position: static;
  }
  .footer-main {
    grid-template-columns: 1fr;
  }
  .footer-links,
  .footer-socials {
    justify-content: center;
    text-align: center;
  }
}
@media (max-width: 599px) {
  .product-grid { grid-template-columns: 1fr; }
  .site-header {
    position: sticky;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 10px;
    min-height: 58px;
    padding: 8px 10px 10px;
  }
  .header-actions {
    grid-column: 1 / -1;
    display: grid;
    width: 100%;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding-right: 52px;
  }
  #copyIpBtn {
    grid-column: 1 / -1;
    flex: initial;
  }
  .header-actions .ghost-btn {
    width: 100%;
    min-width: 0;
    height: 42px;
    padding: 0;
    justify-content: center;
  }
  .header-actions .ghost-btn span { display: none; }
  #accountBtn {
    position: absolute;
    right: 10px;
    top: 8px;
    width: 42px;
  }
  .brand {
    grid-column: 1;
    min-width: 0;
    padding-right: 4px;
  }
  .brand span:last-child { min-width: 0; }
  .brand small { display: none; }
  .brand-mark { width: 38px; height: 38px; border-radius: 10px; }
  .brand strong { font-size: 17px; }
  .shop-shell { width: min(100% - 20px, 1240px); margin-top: 14px; }
  .site-footer { padding: 24px 12px 34px; }
  .promo-banner {
    width: min(100% - 20px, 1240px);
    margin-top: 10px;
    padding: 12px 40px 12px 14px;
    text-align: left;
  }
  .maintenance-banner {
    width: min(100% - 20px, 1240px);
    margin-top: 10px;
    padding: 12px 14px;
  }
  .shop-hero {
    min-height: auto;
    padding: 20px;
    border-radius: var(--radius-md);
  }
  .shop-hero h1 {
    font-size: 32px;
    line-height: 1.08;
  }
  .shop-hero p:not(.eyebrow) { font-size: 15px; line-height: 1.55; }
  .catalog-head h2 { font-size: 22px; }
  .catalog-controls, .search-box, .select-control, .dropdown-filter, .filter-trigger { width: 100%; }
  .catalog-controls { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .catalog-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-overview-tags,
  .product-detail-pills { grid-column: 1 / -1; }
  .filter-menu {
    position: static;
    width: 100%;
    margin-top: 8px;
    max-height: 240px;
  }
  .feature-grid, .variant-grid, .admin-form, .stat-grid, .product-modal-body { grid-template-columns: 1fr; }
  .product-card { min-height: 0; border-radius: var(--radius-md); }
  .product-media { height: 132px; }
  .product-body { padding: 14px; gap: 10px; }
  .product-card h3 { font-size: 18px; }
  .product-meta-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .product-footer {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .product-footer .primary-btn {
    width: 100%;
  }
  .buy-pane-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .primary-btn,
  .ghost-btn,
  .filter-trigger,
  .select-control {
    min-height: 44px;
  }
  .ghost-btn,
  .primary-btn {
    white-space: normal;
    text-align: center;
    overflow-wrap: anywhere;
  }
  .modal {
    width: 100%;
    border-radius: var(--radius-md);
  }
  .modal-head, .modal-body, .modal-actions { padding: 14px; }
  .modal-head h2 { font-size: 20px; overflow-wrap: anywhere; }
  .modal-actions { display: grid; grid-template-columns: 1fr; }
  .admin-filters { grid-template-columns: 1fr; }
  .admin-panel {
    border-radius: var(--radius-md);
    overflow: hidden;
  }
  .panel-head {
    display: grid;
    align-items: start;
    padding: 12px;
  }
  .panel-head h2 {
    font-size: 16px;
  }
  .panel-head .primary-btn,
  .panel-head .ghost-btn,
  .log-tools,
  .log-tools input,
  .log-tools select {
    width: 100%;
  }
  .log-tools {
    display: grid;
    grid-template-columns: 1fr;
  }
  .segmented-control,
  .receipt-verify-form {
    width: 100%;
    grid-template-columns: 1fr;
  }
  .segmented-control {
    display: grid;
  }
  .support-card-head {
    display: grid;
  }
  .support-chat-layout {
    grid-template-columns: 1fr;
  }
  .discord-ticket-grid {
    grid-template-columns: 1fr;
  }
  .support-ticket-list {
    max-height: 240px;
    overflow: auto;
  }
  .support-chat-head {
    display: grid;
  }
  .compact-support-btn span {
    display: none;
  }
  .ip-chip {
    min-width: 0;
    padding: 8px 10px;
  }
  .ip-chip small {
    font-size: 10px;
  }
  .ip-chip strong {
    font-size: 13px;
  }
  .support-message-form textarea,
  .support-note textarea {
    min-height: 96px;
  }
  .table-wrap {
    overflow: visible;
  }
  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }
  table {
    min-width: 0;
  }
  thead {
    display: none;
  }
  tr {
    margin: 10px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: rgba(255,255,255,.025);
  }
  td {
    display: grid;
    grid-template-columns: minmax(96px, 38%) minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px solid rgba(255,255,255,.06);
    overflow-wrap: anywhere;
  }
  td:last-child {
    border-bottom: 0;
  }
  td::before {
    content: attr(data-label);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
  }
  .row-actions {
    justify-content: flex-end;
  }
  .product-admin-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-admin-card__head,
  .product-admin-card__actions,
  .editor-section__head { display: grid; }
  .product-admin-card__meta { grid-template-columns: 1fr; }
  .discord-builder-overview,
  .discord-builder-tips { grid-template-columns: 1fr; }
  .status-toggle {
    min-width: 0;
    width: 100%;
  }
  .variant-editor-row { grid-template-columns: 1fr; }
  .variant-editor-head { display: grid; }
  .buy-pane { position: static; }
  .log-card { grid-template-columns: 42px minmax(0, 1fr); }
  .log-card code { grid-column: 2; }
  .log-title { display: grid; }
  .diff-grid { grid-template-columns: 1fr; }
  .diff-table div { grid-template-columns: 1fr; }
  .order-top { display: grid; }
  .order-total { justify-items: start; }
  .order-detail-grid { grid-template-columns: 1fr; }
  .order-modal-items div { display: grid; }
  .order-modal-items span { text-align: left; }
  .order-card-actions .ghost-btn,
  .order-card-actions .primary-btn,
  .order-card-actions .danger-action,
  .modal-actions .ghost-btn,
  .modal-actions .primary-btn {
    width: 100%;
    justify-content: center;
  }
  .promo-row { grid-template-columns: 1fr; }
  .account-actions-grid {
    grid-template-columns: 1fr;
  }
  .product-admin-overview {
    grid-template-columns: 1fr;
  }
  .catalog-overview {
    grid-template-columns: 1fr;
  }
  .catalog-overview-card strong {
    font-size: 16px;
  }
  .catalog-tag {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
  .product-detail-pills .catalog-tag {
    width: auto;
    justify-content: flex-start;
  }
  .checkout-summary-card,
  .checkout-section,
  .quantity-box {
    padding-left: 12px;
    padding-right: 12px;
  }
  .buy-pane .primary-btn,
  .buy-pane .ghost-btn {
    width: 100%;
    justify-content: center;
  }
  .offer-page-panel h1 { font-size: 19px; }
  .site-footer { display: grid; }
  .cookie-consent {
    bottom: 10px;
    grid-template-columns: 1fr;
    padding: 14px;
    border-radius: var(--radius-md);
  }
  .cookie-consent__actions {
    justify-content: stretch;
  }
  .cookie-consent__actions .ghost-btn,
  .cookie-consent__actions .primary-btn {
    width: 100%;
    justify-content: center;
  }
  .footer-main {
    display: grid;
    gap: 16px;
  }
  .footer-links {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
    gap: 11px;
    text-align: left;
  }
  .footer-socials {
    justify-content: center;
    gap: 8px;
  }
  .footer-socials a {
    width: 44px;
    height: 44px;
  }
}
