/* ═══════════════════════════════════════════════════════════
   MW4 OPS — Admin Dashboard  ·  Design System
   ═══════════════════════════════════════════════════════════ */
:root {
  /* Surfaces */
  --bg-base:        #08090b;
  --bg-sidebar:     #0e1014;
  --bg-card:        #13171e;
  --bg-input:       #1a1f28;
  --bg-hover:       #1f2530;

  /* Accent — electric blue, MW-style */
  --accent:         #4cc9f0;
  --accent-dim:     #2aa3cc;
  --accent-glow:    rgba(76, 201, 240, 0.12);
  --accent-2:       #ff9f1c;
  --accent-2-dim:   #d4800e;

  /* Feedback */
  --ok:             #22c55e;
  --ok-dim:         #16a34a;
  --danger:         #ef4444;
  --danger-dim:     #dc2626;
  --warn:           #f59e0b;

  /* Text */
  --text-primary:   #e8edf5;
  --text-secondary: #8a98aa;
  --text-muted:     #4a5568;

  /* Borders */
  --border:         #1e2530;
  --border-focus:   #4cc9f0;

  /* Misc */
  --radius:         6px;
  --radius-lg:      10px;
  --sidebar-w:      244px;
  --transition:     0.14s ease;

  /* Rarity colours */
  --rarity-common:    #9ca3af;
  --rarity-uncommon:  #4ade80;
  --rarity-rare:      #60a5fa;
  --rarity-epic:      #c084fc;
  --rarity-legendary: #fbbf24;
}

* {
/* ── Reset ────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── App Shell ────────────────────────────────── */
.layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── Sidebar ──────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-mark {
  width: 34px;
  height: 34px;
  background: var(--accent);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  color: #000;
  flex-shrink: 0;
  letter-spacing: -.5px;
}

.logo-text  { font-weight: 700; font-size: 13px; line-height: 1.2; }
.logo-sub   { font-size: 10px; color: var(--text-muted); }

.nav-section { padding: 10px 0 4px; }

.nav-section-label {
  padding: 4px 16px 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
  cursor: pointer;
  border-left: 2px solid transparent;
  text-decoration: none;
}

.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); text-decoration: none; }

.nav-item.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--accent-glow);
}

.nav-icon { width: 16px; text-align: center; flex-shrink: 0; }

.sidebar-footer {
  margin-top: auto;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

/* ── Main area ────────────────────────────────── */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  flex-shrink: 0;
}

.topbar h1 {
  font-size: 17px;
  font-weight: 600;
  flex: 1;
}

.content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

/* ── Cards ────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-secondary);
}

.section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* ── Buttons ──────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background var(--transition), opacity var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn:hover    { text-decoration: none; }

.btn-primary   { background: var(--accent);    color: #000; }
.btn-primary:hover:not(:disabled)   { background: var(--accent-dim); }

.btn-secondary { background: var(--bg-input);  color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover:not(:disabled) { background: var(--bg-hover); }

.btn-danger    { background: var(--danger);    color: #fff; }
.btn-danger:hover:not(:disabled)    { background: var(--danger-dim); }

.btn-ghost     { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); }
.btn-ghost:hover:not(:disabled)     { background: var(--bg-hover); color: var(--text-primary); }

.btn-sm { padding: 5px 10px; font-size: 12px; }

/* ── Forms ────────────────────────────────────── */
.form-group  { margin-bottom: 16px; }

label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

input[type="text"],
input[type="number"],
input[type="password"],
input[type="url"],
select,
textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

textarea { resize: vertical; min-height: 80px; }

.form-hint { margin-top: 4px; font-size: 11px; color: var(--text-muted); }

.form-row   { display: grid; gap: 16px; }
.form-row-2 { grid-template-columns: 1fr 1fr; }
.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }

/* ── Table ────────────────────────────────────── */
.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }

thead { background: var(--bg-input); }

th {
  padding: 9px 14px;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  font-size: 13px;
}

tr:last-child td { border-bottom: none; }
tbody tr:hover   { background: var(--bg-hover); }

/* ── Toolbar (search + filters) ───────────────── */
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.toolbar-search { flex: 1; min-width: 180px; position: relative; }
.toolbar-search input { padding-left: 34px; }
.toolbar-search .search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 13px;
  pointer-events: none;
}
.toolbar select { width: auto; }

/* ── Pagination ───────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-secondary);
}
.pagination-btns { display: flex; gap: 6px; }

/* ── Badges ───────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-primary   { background: rgba(76,201,240,.13); color: var(--accent);  border: 1px solid rgba(76,201,240,.3); }
.badge-secondary { background: rgba(255,159,28,.13); color: var(--accent-2);border: 1px solid rgba(255,159,28,.3); }
.badge-melee     { background: rgba(239,68,68,.13);  color: var(--danger);  border: 1px solid rgba(239,68,68,.3);  }
.badge-class     { background: rgba(76,201,240,.10); color: var(--accent);  border: 1px solid rgba(76,201,240,.25);}
.badge-ok        { background: rgba(34,197,94,.13);  color: var(--ok);      border: 1px solid rgba(34,197,94,.3);  }
.badge-muted     { background: rgba(74,85,104,.2);   color: var(--text-secondary); border: 1px solid var(--border);}

.badge-rarity-common    { background: rgba(156,163,175,.15); color: var(--rarity-common);    border: 1px solid rgba(156,163,175,.3); }
.badge-rarity-uncommon  { background: rgba(74,222,128,.12);  color: var(--rarity-uncommon);  border: 1px solid rgba(74,222,128,.3); }
.badge-rarity-rare      { background: rgba(96,165,250,.13);  color: var(--rarity-rare);      border: 1px solid rgba(96,165,250,.3); }
.badge-rarity-epic      { background: rgba(192,132,252,.13); color: var(--rarity-epic);      border: 1px solid rgba(192,132,252,.3);}
.badge-rarity-legendary { background: rgba(251,191,36,.13);  color: var(--rarity-legendary); border: 1px solid rgba(251,191,36,.3); }

/* ── Progress bar (0-100 stat) ────────────────── */
.progress-bar-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 90px;
}
.progress-track {
  flex: 1;
  background: var(--border);
  border-radius: 3px;
  height: 5px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
  transition: width .3s ease;
}
.progress-label {
  font-size: 11px;
  color: var(--text-muted);
  min-width: 26px;
  text-align: right;
}

/* ── Stat bars (impact deltas) ────────────────── */
.stat-impact-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  padding: 3px 0;
}
.stat-impact-row .stat-name { color: var(--text-secondary); flex: 1; }
.stat-impact-pos { color: var(--ok); font-weight: 600; }
.stat-impact-neg { color: var(--danger); font-weight: 600; }

/* ── Toasts ───────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 11px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  max-width: 340px;
  pointer-events: auto;
  animation: toastIn .18s ease;
  border-left: 3px solid;
}

.toast-success { background: #0f2419; color: var(--ok);      border-color: var(--ok);      }
.toast-error   { background: #2a0d0d; color: #fca5a5;        border-color: var(--danger);  }
.toast-info    { background: #0d1e2e; color: var(--accent);  border-color: var(--accent);  }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: translateX(0);    }
}

/* ── Loading / empty ──────────────────────────── */
.loading-row td,
.empty-row td {
  text-align: center;
  padding: 36px 24px;
  color: var(--text-muted);
}

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .6s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 40px;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 36px; }
.empty-state .empty-title { font-weight: 600; font-size: 15px; color: var(--text-secondary); }

/* ── Breadcrumb ───────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.breadcrumb a    { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--text-primary); text-decoration: none; }
.breadcrumb .sep { color: var(--text-muted); }
.breadcrumb .current { color: var(--text-primary); font-weight: 500; }

/* ── Stat group (weapon detail) ───────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.stat-item {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  transition: border-color var(--transition);
}
.stat-item:hover { border-color: rgba(76,201,240,.3); }
.stat-item-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.stat-item-value-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.stat-item-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat-item-unit {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}
.stat-item-icon {
  font-size: 14px;
  margin-right: 5px;
  line-height: 1;
  vertical-align: middle;
}
.stat-item-bar {
  margin-top: 8px;
}
.stat-item-bar .progress-track {
  height: 4px;
  background: var(--border);
}
.stat-item-bar .progress-fill {
  /* animated on first render */
  animation: statBarGrow .5s cubic-bezier(.22,1,.36,1) both;
}
@keyframes statBarGrow {
  from { width: 0 !important; }
}

/* ── Core stat input form ─────────────────────── */
.core-stat-inputs {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.core-stat-input-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: center;
  gap: 16px;
}
.core-stat-input-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}
.core-stat-input-label span:first-child { font-size: 18px; line-height: 1; }
.core-stat-input-control {
  display: flex;
  align-items: center;
  gap: 12px;
}
.core-stat-input-control input[type="range"] {
  flex: 1;
  height: 4px;
  accent-color: var(--accent);
  cursor: pointer;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  outline: none;
}
.core-stat-input-control input[type="range"]:focus { box-shadow: none; border-color: transparent; }
.core-stat-input-control input[type="number"] {
  width: 66px;
  flex-shrink: 0;
  text-align: center;
  padding: 5px 8px;
}

/* ── Attachment type badge colours ───────────────── */
.badge-type-barrel     { background: rgba(76,201,240,.1);  color: #4cc9f0; border: 1px solid rgba(76,201,240,.25); }
.badge-type-muzzle     { background: rgba(255,159,28,.1);  color: #ff9f1c; border: 1px solid rgba(255,159,28,.25); }
.badge-type-stock      { background: rgba(34,197,94,.1);   color: #22c55e; border: 1px solid rgba(34,197,94,.25);  }
.badge-type-grip       { background: rgba(251,191,36,.1);  color: #fbbf24; border: 1px solid rgba(251,191,36,.25); }
.badge-type-rear_grip  { background: rgba(251,191,36,.1);  color: #fbbf24; border: 1px solid rgba(251,191,36,.25); }
.badge-type-magazine   { background: rgba(192,132,252,.1); color: #c084fc; border: 1px solid rgba(192,132,252,.25);}
.badge-type-optic      { background: rgba(96,165,250,.1);  color: #60a5fa; border: 1px solid rgba(96,165,250,.25); }
.badge-type-underbarrel{ background: rgba(239,68,68,.1);   color: #ef4444; border: 1px solid rgba(239,68,68,.25);  }
.badge-type-laser      { background: rgba(74,222,128,.1);  color: #4ade80; border: 1px solid rgba(74,222,128,.25); }
.badge-type-ammunition { background: rgba(251,191,36,.1);  color: #fbbf24; border: 1px solid rgba(251,191,36,.25); }
.badge-type-other      { background: rgba(74,85,104,.2);   color: var(--text-secondary); border: 1px solid var(--border); }

/* ── JSON viewer ──────────────────────────────── */
.json-viewer {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  font-family: 'Consolas', 'Cascadia Code', 'Monaco', monospace;
  font-size: 12px;
  line-height: 1.65;
  overflow: auto;
  max-height: 620px;
  white-space: pre;
  color: var(--text-primary);
  margin: 0;
}
.json-key    { color: #7dd3fc; }
.json-string { color: #86efac; }
.json-number { color: #fde68a; }
.json-bool   { color: #c084fc; }
.json-null   { color: #94a3b8; }

/* ── Compat stat impact rows ──────────────────── */
.compat-impact-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.compat-impact-row {
  display: grid;
  grid-template-columns: 1fr 120px 80px;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition);
}
.compat-impact-row:focus-within { border-color: var(--border-focus); }
.compat-impact-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}
.compat-impact-label span:first-child { font-size: 16px; line-height: 1; }
.compat-impact-row select { width: 100%; padding: 5px 8px; font-size: 12px; }
.compat-impact-row input[type="number"] {
  width: 100%;
  text-align: center;
  padding: 5px 8px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

/* ── Attachment card ──────────────────────────── */
.attachment-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.attachment-card {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  transition: border-color var(--transition);
}
.attachment-card:hover { border-color: rgba(76,201,240,.25); }
.attachment-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.attachment-card-name  { font-weight: 600; font-size: 13px; }
.attachment-card-type  { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.attachment-card-notes {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  line-height: 1.45;
}
.attachment-impacts { display: flex; flex-direction: column; gap: 4px; }
.impact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  padding: 2px 0;
}
.impact-row-stat { color: var(--text-secondary); }
.impact-val-pos  { color: var(--ok);     font-weight: 600; font-variant-numeric: tabular-nums; }
.impact-val-neg  { color: var(--danger); font-weight: 600; font-variant-numeric: tabular-nums; }
.impact-val-override { color: var(--warn); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ── Skin cards ───────────────────────────────── */
.skin-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}
.skin-card {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  transition: border-color var(--transition);
}
.skin-card:hover { opacity: .9; }
/* Rarity-specific left border colours */
.skin-card[data-rarity="Common"]    { border-left-color: var(--rarity-common);    }
.skin-card[data-rarity="Uncommon"]  { border-left-color: var(--rarity-uncommon);  }
.skin-card[data-rarity="Rare"]      { border-left-color: var(--rarity-rare);      }
.skin-card[data-rarity="Epic"]      { border-left-color: var(--rarity-epic);      }
.skin-card[data-rarity="Legendary"] { border-left-color: var(--rarity-legendary); }
.skin-card-name   { font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.skin-card-meta   { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.skin-card-img {
  width: 100%;
  aspect-ratio: 2 / 1;
  margin-bottom: 10px;
  border-radius: calc(var(--radius) - 2px);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.skin-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.skin-card-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--text-muted);
}
.skin-card-source {
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}
.skin-card-challenge {
  margin-top: 4px;
  font-size: 11px;
  color: var(--warn);
}

/* ── Detail hero ──────────────────────────────── */
.weapon-hero {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

/* Weapon image panel — shown when image_url is present */
.weapon-hero-image-wrap {
  flex-shrink: 0;
  width: 240px;
  height: 110px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 10px;
  position: relative;
}
.weapon-hero-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* subtle accent glow beneath */
  filter: drop-shadow(0 0 8px rgba(76, 201, 240, 0.30));
}

/* Emoji fallback — shown when no image_url */
.weapon-hero-icon {
  width: 72px;
  height: 72px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  flex-shrink: 0;
}
.weapon-hero-info { flex: 1; min-width: 180px; }
.weapon-hero-name { font-size: 22px; font-weight: 700; line-height: 1.2; margin-bottom: 6px; }
.weapon-hero-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.weapon-hero-desc { margin-top: 10px; font-size: 13px; color: var(--text-secondary); }

/* ── Tabs ─────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.tab-btn {
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
  margin-bottom: -1px;
  width: auto;
}
.tab-btn:hover  { color: var(--text-primary); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-panel      { display: none; }
.tab-panel.active { display: block; }

/* ── Responsive ───────────────────────────────── */
@media (max-width: 860px) {
  .layout { flex-direction: column; height: auto; overflow: visible; }
  .sidebar { width: 100%; height: auto; border-right: none; border-bottom: 1px solid var(--border); }
  .main   { overflow: visible; }
  .content { overflow: visible; }
  .form-row-2, .form-row-3 { grid-template-columns: 1fr; }
}

