:root {
  --bg: #09090b;
  --panel: #111113;
  --surface: #111113;
  --border: #27272a;
  --text: #fafafa;
  --muted: #a1a1aa;
  --accent: #f59e0b;
  --accent-dim: rgba(245, 158, 11, 0.15);
  --danger: #ef4444;
  --ok: #22c55e;
  --radius: 12px;
  --font: Inter, system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, 'Cascadia Code', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.hidden { display: none !important; }

/* Auth */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: radial-gradient(ellipse at top, #1a1206 0%, var(--bg) 55%);
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
}

.auth-brand {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.auth-brand span { color: var(--accent); }

.auth-sub { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.5rem; }

.auth-form label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.auth-form input {
  width: 100%;
  background: #000;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.form-error { color: var(--danger); font-size: 0.8rem; margin-bottom: 0.75rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: none;
  border-radius: var(--radius);
  padding: 0.6rem 1rem;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn:hover { opacity: 0.9; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary { background: var(--accent); color: #000; }
.btn-auto { width: auto; }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn-sm { padding: 0.35rem 0.65rem; font-size: 0.75rem; }
.btn-danger { background: rgba(239, 68, 68, 0.15); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.3); }

/* Admin layout */
.admin-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--panel);
  border-right: 1px solid var(--border);
  padding: 1.25rem 0.75rem;
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  font-weight: 800;
  font-size: 1rem;
  padding: 0 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.75rem;
}

.sidebar-brand span { color: var(--accent); }

.nav-group { margin-bottom: 0.85rem; }

.nav-group-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 0 0.75rem 0.35rem;
  opacity: 0.85;
}

.nav-item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  margin-bottom: 2px;
}

.nav-item:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.nav-item.active { background: var(--accent-dim); color: var(--accent); }

.nav-link {
  text-decoration: none;
  display: block;
}

.sidebar-footer { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--border); }

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(17, 17, 19, 0.8);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar h1 { font-size: 1.1rem; font-weight: 700; }

.topbar-titles { min-width: 0; }

.page-hint {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.2rem;
  line-height: 1.35;
}

.topbar-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.content { padding: 1.5rem; flex: 1; overflow: auto; }

.page-intro {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.quick-link {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  text-align: left;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.quick-link:hover {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.05);
}

.quick-link span {
  font-size: 0.68rem;
  color: var(--muted);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.filter-bar .search-input {
  flex: 1;
  min-width: 180px;
  max-width: 320px;
}

.table-meta {
  font-size: 0.78rem;
  color: var(--muted);
  margin-left: auto;
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

.stat-card .label { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-card .value { font-size: 1.6rem; font-weight: 800; margin-top: 0.25rem; }

/* Table */
.table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}

table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
th, td { padding: 0.65rem 0.85rem; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; background: rgba(0,0,0,0.25); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }

.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
}

.badge-pending { background: rgba(245,158,11,0.15); color: #fcd34d; }
.badge-resolved { background: rgba(34,197,94,0.15); color: #86efac; }
.badge-rejected { background: rgba(239,68,68,0.15); color: #fca5a5; }
.badge-online { background: rgba(34,197,94,0.15); color: #86efac; }
.badge-offline { background: rgba(113,113,122,0.2); color: #a1a1aa; }

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 0.5rem;
  background: #333;
}

/* Editor */
.editor-toolbar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.json-editor {
  width: 100%;
  min-height: 420px;
  background: #000;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: #e4e4e7;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.5;
  padding: 1rem;
  resize: vertical;
}

.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  z-index: 100;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.toast.ok { border-color: rgba(34,197,94,0.4); }
.toast.err { border-color: rgba(239,68,68,0.4); color: #fca5a5; }

.search-input {
  background: #000;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  width: 220px;
}

.inline-input {
  width: 80px;
  background: #000;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 0.25rem 0.4rem;
  font-size: 0.8rem;
}

.loading { color: var(--muted); padding: 2rem; text-align: center; }

.muted { color: var(--muted); font-size: 0.8rem; }

/* Visual editors */
.split-layout { display: grid; grid-template-columns: 200px 1fr; gap: 1rem; min-height: 400px; }
.split-side { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.75rem; }
.side-title { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 0.5rem; }
.side-list { display: flex; flex-direction: column; gap: 4px; }
.side-item {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  width: 100%; text-align: left; padding: 0.6rem 0.65rem; border-radius: 8px;
  border: 1px solid transparent; background: transparent; color: var(--text);
  cursor: pointer; font-size: 0.8rem;
}
.side-item:hover { background: rgba(255,255,255,0.04); }
.side-item.active { background: var(--accent-dim); border-color: rgba(245,158,11,0.3); color: var(--accent); }
.side-icon { font-size: 1.1rem; }

.side-icon-img,
.case-preview-thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
}

.case-preview-thumb {
  width: 56px;
  height: 56px;
}

.side-icon-img.broken,
.case-preview-thumb.broken {
  object-fit: contain;
  padding: 0.25rem;
  font-size: 0.65rem;
}
.side-meta { font-size: 0.65rem; color: var(--muted); }

.panel-card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.panel-head h3 { font-size: 0.9rem; font-weight: 700; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.75rem; margin-bottom: 0.75rem; }
.form-field { display: block; }
.form-label { display: block; font-size: 0.68rem; color: var(--muted); margin-bottom: 0.25rem; text-transform: uppercase; letter-spacing: 0.04em; }
.form-input {
  width: 100%; background: #000; border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); padding: 0.45rem 0.6rem; font-size: 0.82rem;
}
.form-input:focus { outline: none; border-color: rgba(245,158,11,0.5); }
textarea.form-input { resize: vertical; min-height: 2.5rem; }
.manifest-json-editor {
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.45;
  min-height: 420px;
  tab-size: 2;
}

.edit-table .form-input { margin: 0; }
.cell-sm { max-width: 120px; }
.cell-xs { max-width: 70px; }
.cell-icon { width: 48px; }
.muted-field { margin-top: 4px; font-size: 0.72rem; color: var(--muted); }

.prize-desc-row td { padding-top: 0; border-bottom: 1px solid var(--border); }

.form-check { display: flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; }
.rule-section { margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border); }
.rule-item-row { display: flex; gap: 0.5rem; margin-bottom: 0.35rem; align-items: center; }
.rule-item-row .form-input { flex: 1; }

.sub-tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.sub-tab {
  padding: 0.45rem 1rem; border-radius: 999px; border: 1px solid var(--border);
  background: transparent; color: var(--muted); font-size: 0.8rem; font-weight: 600; cursor: pointer;
}
.sub-tab.active { background: var(--accent-dim); color: var(--accent); border-color: rgba(245,158,11,0.35); }

.shop-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 0.75rem; }
.shop-filters .form-input { width: auto; min-width: 140px; }
.shop-count { margin-left: auto; }

.pager { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 0.75rem; font-size: 0.85rem; color: var(--muted); }

.collapse-btn {
  width: 100%; text-align: left; background: transparent; border: none;
  color: var(--text); font-size: 0.85rem; font-weight: 600; cursor: pointer; padding: 0;
}

.store-preview {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.store-snippet {
  background: #000;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  overflow-x: auto;
  white-space: pre-wrap;
  margin: 0.75rem 0;
  max-height: 240px;
}

.modal-form {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.page-intro code {
  font-family: var(--mono);
  font-size: 0.78em;
  background: rgba(0, 0, 0, 0.35);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.page-intro a {
  color: var(--accent);
}

/* Economy editors */
.editor-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.editor-stat {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  min-width: 90px;
}

.editor-stat-label {
  display: block;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.editor-stat-value {
  font-size: 1.1rem;
  font-weight: 800;
}

.toolbar-hint {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--muted);
}

.editor-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
}

.side-search {
  margin-bottom: 0.5rem;
  font-size: 0.78rem;
  padding: 0.35rem 0.5rem;
}

.side-item-name {
  font-weight: 600;
}

/* Cases */
.case-preview {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(0,0,0,0.4), rgba(0,0,0,0.15));
  border-left: 4px solid var(--case-color, var(--accent));
}

.case-preview-icon {
  font-size: 2rem;
  line-height: 1;
}

.case-preview-name {
  font-weight: 800;
  font-size: 1rem;
}

.case-preview-meta {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.prize-rarity-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
}

.rarity-badge {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
}

.rarity-common { background: rgba(161,161,170,0.2); color: #d4d4d8; }
.rarity-rare { background: rgba(59,130,246,0.2); color: #93c5fd; }
.rarity-epic { background: rgba(168,85,247,0.2); color: #d8b4fe; }
.rarity-legendary { background: rgba(245,158,11,0.2); color: #fcd34d; }

.prize-row.rarity-row-legendary td { background: rgba(245,158,11,0.03); }
.prize-row.rarity-row-epic td { background: rgba(168,85,247,0.03); }
.prize-pct { font-size: 0.72rem; color: var(--muted); white-space: nowrap; }

/* Shop */
.shop-server-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.server-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.server-chip:hover { color: var(--text); border-color: rgba(255,255,255,0.15); }
.server-chip.active {
  background: var(--accent-dim);
  border-color: rgba(245,158,11,0.45);
  color: var(--accent);
}

.server-chip.server-chip-offline {
  opacity: 0.72;
  border-style: dashed;
}

.chip-dot-offline {
  color: #ef4444;
  font-size: 0.55rem;
  line-height: 1;
}

.shop-no-store {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
}

.chip-count {
  font-size: 0.65rem;
  opacity: 0.8;
  background: rgba(0,0,0,0.3);
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
}

.shop-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
}

.shop-item-card {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 0.65rem;
  padding: 0.75rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  align-items: start;
}

.shop-item-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  background: #000;
  border: 1px solid var(--border);
}

.shop-item-thumb.placeholder,
.shop-item-thumb.broken {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--muted);
}

.shop-item-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.shop-item-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.shop-field-label {
  font-size: 0.72rem;
  color: var(--muted);
}

.shop-del { align-self: start; }

/* Promocodes */
.promo-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
}

.promo-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem;
}

.promo-card-head {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.65rem;
}

.promo-code-lg {
  font-family: var(--mono);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  flex: 1;
}

.promo-card-grid {
  margin-bottom: 0.5rem;
}

.promo-type-hint {
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

/* Prize cards (cases) */
.prize-items-grid .prize-item-card {
  border-left: 3px solid var(--border);
}

.prize-item-card.rarity-row-rare { border-left-color: #3b82f6; }
.prize-item-card.rarity-row-epic { border-left-color: #a855f7; }
.prize-item-card.rarity-row-legendary { border-left-color: #f59e0b; }

.prize-pct-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  margin-left: auto;
}

.rarity-editor-card {
  margin-bottom: 1rem;
}

.rarity-types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.65rem;
}

.rarity-type-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border-left: 3px solid var(--rarity-color, var(--border));
}

.rarity-type-swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  flex-shrink: 0;
}

.rarity-type-fields {
  display: grid;
  grid-template-columns: 1fr 1.2fr auto 72px;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
}

.prize-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.prize-list-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  border-left: 3px solid var(--rarity-color, var(--border));
  cursor: pointer;
  color: inherit;
  transition: border-color 0.15s, background 0.15s;
}

.prize-list-card:hover {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(255, 255, 255, 0.04);
}

.prize-list-body {
  flex: 1;
  min-width: 0;
}

.prize-list-title {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.prize-list-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.75rem;
}

.prize-list-desc {
  font-size: 0.72rem;
  margin-top: 0.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prize-list-edit {
  font-size: 0.72rem;
  color: var(--muted);
  flex-shrink: 0;
}

.prize-modal-preview {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.prize-modal-preview-name {
  font-weight: 700;
  font-size: 1rem;
}

.prize-modal-thumb {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 8px;
}

.prize-modal-grid {
  margin-bottom: 0.75rem;
}

/* Shop product modal */
.shop-item-card-click {
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
}

.shop-item-card-click:hover {
  border-color: rgba(245, 158, 11, 0.45);
}

.shop-item-title {
  font-size: 0.88rem;
  display: block;
  margin-bottom: 0.2rem;
}

.shop-item-meta {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-bottom: 0.25rem;
}

.shop-type-badge {
  font-size: 0.65rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.shop-status-on { font-size: 0.65rem; color: #4ade80; }
.shop-status-off { font-size: 0.65rem; color: #f87171; }

.shop-price-old {
  text-decoration: line-through;
  color: var(--muted);
  font-size: 0.75rem;
  margin-right: 0.25rem;
}

.shop-item-id {
  font-size: 0.68rem;
}

.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem;
  overflow-y: auto;
}

.admin-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
}

.admin-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(720px, 96vw);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  margin: auto;
}

.admin-modal-header,
.admin-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.admin-modal-footer {
  border-bottom: none;
  border-top: 1px solid var(--border);
  justify-content: flex-end;
  gap: 0.5rem;
}

.admin-modal-header h3 {
  margin: 0;
  font-size: 1rem;
}

.admin-modal-body {
  padding: 1rem 1.25rem 1.25rem;
  max-height: min(70vh, 640px);
  overflow-y: auto;
}

.admin-modal-dialog.product-modal-wide {
  width: min(1100px, 96vw);
}

.admin-modal-body.product-modal-body-tall {
  max-height: min(80vh, 720px);
}

.product-modal-columns {
  display: block;
}

.product-modal-columns-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: start;
}

.product-form-set {
  min-width: 0;
}

.set-sub-item-card {
  border: 1px solid rgba(74, 222, 128, 0.28);
  border-radius: 10px;
  margin-bottom: 0.75rem;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.22);
}

.set-sub-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  background: rgba(74, 222, 128, 0.1);
  border-bottom: 1px solid rgba(74, 222, 128, 0.18);
}

.set-sub-item-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #86efac;
}

.set-sub-item-body {
  padding: 0.65rem 0.75rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.set-sub-item-body .form-field { margin: 0; }

.set-sub-add {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

@media (max-width: 900px) {
  .product-modal-columns-split { grid-template-columns: 1fr; }
}

.product-form-grid {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.product-form-grid .form-field { margin: 0; }

.field-hint {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.field-hint a { color: var(--accent); }

.input-with-addon {
  display: flex;
  align-items: stretch;
}

.input-with-addon input { flex: 1; border-radius: 8px 0 0 8px; }

.input-with-addon span {
  display: flex;
  align-items: center;
  padding: 0 0.65rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 8px 8px 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.input-with-pick input {
  flex: 1;
  border-radius: 8px 0 0 8px;
}

.input-with-pick .btn {
  border-radius: 0 8px 8px 0;
  border: 1px solid var(--border);
  border-left: none;
  white-space: nowrap;
}

.rust-item-picker-modal {
  z-index: 300;
}

.rust-picker-dialog {
  width: min(920px, 96vw);
}

.rust-picker-body {
  max-height: min(75vh, 680px);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.rust-picker-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.rust-picker-cat {
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
  font-size: 0.72rem;
  cursor: pointer;
}

.rust-picker-cat:hover {
  border-color: rgba(74, 222, 128, 0.45);
}

.rust-picker-cat.active {
  background: rgba(74, 222, 128, 0.18);
  border-color: rgba(74, 222, 128, 0.55);
  color: var(--accent);
}

.rust-picker-search {
  display: flex;
  align-items: stretch;
}

.rust-picker-search-icon {
  display: flex;
  align-items: center;
  padding: 0 0.55rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: 8px 0 0 8px;
  font-size: 0.85rem;
}

.rust-picker-search .form-input {
  border-radius: 0 8px 8px 0;
}

.rust-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: 0.35rem;
  overflow-y: auto;
  max-height: min(52vh, 520px);
  padding: 0.15rem;
}

.rust-picker-item {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  padding: 0.25rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.rust-picker-item:hover {
  border-color: rgba(74, 222, 128, 0.45);
  background: rgba(74, 222, 128, 0.08);
}

.rust-picker-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: auto;
}

.rust-picker-item img.isbp {
  filter: sepia(1) hue-rotate(170deg) saturate(2.5);
}

.rust-picker-empty {
  grid-column: 1 / -1;
  padding: 1.5rem;
  text-align: center;
}

.modal-check {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  cursor: pointer;
}

.form-field-check { padding: 0.15rem 0; }

.prod-servers-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding: 0.5rem 0.75rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  margin-top: -0.35rem;
}

.muted-block {
  opacity: 0.45;
  pointer-events: none;
}

.hidden { display: none !important; }

.client-actions-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.client-action-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  align-items: center;
}

.client-action-key {
  font-size: 0.72rem;
  color: var(--muted, #888);
  white-space: nowrap;
}

.display-type-block {
  margin-bottom: 0.75rem;
}

.display-type-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted, #888);
  margin-bottom: 0.45rem;
}

.display-type-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.display-type-chip {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border, rgba(255,255,255,0.1));
  background: rgba(255,255,255,0.03);
  color: var(--muted, #888);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.display-type-chip:hover {
  color: var(--text, #fff);
  border-color: rgba(255,255,255,0.18);
}

.display-type-chip.active {
  color: #111;
  background: var(--accent, #f97316);
  border-color: var(--accent, #f97316);
}

@media (max-width: 768px) {
  .split-layout { grid-template-columns: 1fr; }
  .admin-shell { flex-direction: column; }
  .sidebar { width: 100%; flex-direction: row; flex-wrap: wrap; border-right: none; border-bottom: 1px solid var(--border); }
  .sidebar-brand { border: none; margin: 0; padding-bottom: 0; }
  .nav-item { width: auto; }
}

.wipe-servers-stack { display: flex; flex-direction: column; gap: 1rem; }
.wipe-server-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  background: rgba(0, 0, 0, 0.2);
}
.wipe-server-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}
.wipe-type-pill {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  margin: 0 0.15rem;
}
.wipe-type-pill.global { color: #f87171; background: rgba(248, 113, 113, 0.15); border: 1px solid rgba(248, 113, 113, 0.35); }
.wipe-type-pill.normal { color: #60a5fa; background: rgba(96, 165, 250, 0.15); border: 1px solid rgba(96, 165, 250, 0.35); }
.wipe-rows-table .wipe-type { min-width: 9rem; }
