:root {
  --bg: #050b14;
  --panel: #0b1523;
  --panel-2: #102036;
  --panel-3: rgba(16, 32, 54, 0.78);
  --text: #edf2f7;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.16);
  --gold: #d1a63a;
  --gold-soft: rgba(209, 166, 58, 0.16);
  --green: #32d583;
  --red: #ef4444;
  --blue: #60a5fa;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background:
    radial-gradient(circle at top left, rgba(209, 166, 58, 0.12), transparent 30%),
    radial-gradient(circle at top right, rgba(96, 165, 250, 0.10), transparent 28%),
    linear-gradient(180deg, #06101d 0%, #040912 100%);
  color: var(--text);
  font-family: Inter, Segoe UI, Arial, sans-serif;
}

a { color: inherit; }
button, input, select, textarea { font: inherit; }

.armurerie-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.armurerie-glow {
  position: absolute;
  inset: auto auto 10% 68%;
  width: 32rem;
  height: 32rem;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(209, 166, 58, 0.16), transparent 68%);
  filter: blur(10px);
  pointer-events: none;
}

.armurerie-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  backdrop-filter: blur(18px);
  background: rgba(6, 10, 18, 0.72);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: .9rem;
}

.brand-mark {
  width: 3rem;
  height: 3rem;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(209, 166, 58, 0.22), rgba(96, 165, 250, 0.12));
  border: 1px solid rgba(209, 166, 58, 0.28);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  color: var(--gold);
  font-size: 1.3rem;
}

.brand h1 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.brand p {
  margin: .2rem 0 0;
  color: var(--muted);
  font-size: .88rem;
}

.topbar-actions {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.badge, .status-pill {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  border-radius: 999px;
  padding: .5rem .8rem;
  font-size: .78rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.badge strong, .status-pill strong { color: var(--gold); }

.content {
  max-width: 1380px;
  margin: 0 auto;
  padding: 1.25rem 1rem 2rem;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(16, 32, 54, 0.92), rgba(11, 21, 35, 0.86));
  box-shadow: var(--shadow);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(209, 166, 58, 0.08), transparent 38%, rgba(96, 165, 250, 0.06));
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 1rem;
  align-items: end;
}

.hero-copy h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3.3rem);
  line-height: .95;
  letter-spacing: -.04em;
}

.hero-copy h2 span {
  display: block;
  color: var(--gold);
}

.hero-copy p {
  margin: 1rem 0 0;
  max-width: 60ch;
  color: #cbd5e1;
  line-height: 1.55;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem;
}

.metric {
  padding: 1rem;
  border-radius: 18px;
  background: rgba(8, 15, 26, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.metric .label { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .14em; }
.metric .value { margin-top: .4rem; font-size: 1.5rem; font-weight: 700; }
.metric .hint { margin-top: .3rem; color: var(--muted); font-size: .82rem; }

.main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1rem;
  align-items: start;
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
}

.panel {
  background: var(--panel-3);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: visible;
}

.panel-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1rem .9rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.panel-header h3 {
  margin: 0;
  font-size: 1.02rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.panel-header p {
  margin: .35rem 0 0;
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.45;
}

.panel-body { padding: 1rem; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.field.full { grid-column: 1 / -1; }
.field label {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
}
.field input, .field select, .field textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(6, 12, 22, 0.88);
  color: var(--text);
  padding: .85rem 1rem;
  outline: none;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.field textarea { min-height: 106px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: rgba(209, 166, 58, 0.55);
  box-shadow: 0 0 0 4px rgba(209, 166, 58, 0.09);
}

.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1rem;
  padding-top: .85rem;
  justify-content: flex-end;
  align-items: center;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 14px;
  padding: .84rem 1rem;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: .02em;
  transition: transform .15s ease, filter .15s ease, background .2s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn-primary {
  color: #0b1220;
  background: linear-gradient(135deg, #f1c55b, #d8a630);
}
.btn-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.18);
}
.btn-danger { color: #fff; background: linear-gradient(135deg, #ef4444, #b91c1c); }
.btn-ghost { color: var(--gold); background: transparent; border: 1px solid rgba(209, 166, 58, 0.24); }

.section-list {
  display: grid;
  gap: .75rem;
}

.subgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}

/* Modal approval styles */
.modal { position: fixed; inset: 0; z-index: 1200; display: flex; align-items: center; justify-content: center; }
.modal[aria-hidden="true"] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.45); backdrop-filter: blur(2px); }
.modal-panel { position: relative; width: 720px; max-width: calc(100% - 2rem); background: var(--panel); border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.3); padding: 1rem; z-index: 1; }
.modal-header { display:flex; align-items:center; justify-content:space-between; gap:1rem; border-bottom:1px solid rgba(255,255,255,0.02); padding-bottom:.5rem; }
.modal-body { padding: .75rem 0; max-height: 60vh; overflow:auto; }
.modal-body .field { margin-bottom: .6rem; }
.modal-body label { display:block; font-size:.9rem; margin-bottom:.25rem; color:var(--muted); }
.modal-body input[type=datetime-local], .modal-body input[type=text], .modal-body textarea { width:100%; padding:.45rem .6rem; border:1px solid rgba(0,0,0,0.08); border-radius:6px; background:rgba(6,12,22,0.88); color:var(--text); }
.modal-body textarea { min-height: 80px; }
.modal-actions { display:flex; gap:.6rem; justify-content:flex-end; padding-top:.5rem; border-top:1px solid rgba(255,255,255,0.02); }


.item-card {
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 18px;
  background: rgba(8, 15, 26, 0.78);
  padding: .95rem;
}

.item-card h4, .item-card strong { margin: 0; }
.item-card h4 { font-size: .96rem; }
.item-meta { color: var(--muted); font-size: .8rem; margin-top: .3rem; line-height: 1.4; }
.item-line { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.item-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .8rem; }

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: .85rem;
}

.weapon-card {
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(16, 32, 54, 0.92), rgba(8, 15, 26, 0.96));
  transition: transform .18s ease, border-color .18s ease;
}

.weapon-card:hover { transform: translateY(-2px); border-color: rgba(209, 166, 58, 0.45); }
.weapon-cover {
  aspect-ratio: 16 / 11;
  background: linear-gradient(135deg, rgba(209, 166, 58, 0.16), rgba(96, 165, 250, 0.12));
  display: grid;
  place-items: center;
  overflow: hidden;
}
.weapon-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.weapon-content { padding: .9rem; }
.weapon-content h4 { margin: 0; font-size: .95rem; }
.weapon-content .weapon-type { margin-top: .2rem; color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; }
.weapon-content p { margin: .55rem 0 0; color: #cbd5e1; font-size: .84rem; line-height: 1.45; }
.weapon-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: .28rem .55rem;
  margin-top: .7rem;
  background: rgba(209, 166, 58, 0.12);
  color: #f6d37d;
  font-size: .73rem;
  border: 1px solid rgba(209, 166, 58, 0.18);
}

.timeline {
  display: grid;
  gap: .75rem;
}

.timeline-entry {
  position: relative;
  padding: .9rem .95rem .9rem 1rem;
  border-left: 2px solid rgba(209, 166, 58, 0.35);
  background: rgba(8, 15, 26, 0.78);
  border-radius: 0 16px 16px 0;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-left-width: 3px;
}
.timeline-entry strong { display: block; font-size: .95rem; }
.timeline-entry span { display: block; color: var(--muted); font-size: .8rem; margin-top: .3rem; line-height: 1.4; }
.timeline-entry .state { margin-top: .55rem; font-size: .74rem; color: #cbd5e1; }

.empty-state {
  border: 1px dashed rgba(148, 163, 184, 0.26);
  border-radius: 18px;
  padding: 1.2rem;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
}

.notice {
  margin-top: .85rem;
  padding: .85rem 1rem;
  border-radius: 16px;
  background: rgba(96, 165, 250, 0.08);
  border: 1px solid rgba(96, 165, 250, 0.16);
  color: #d8e8ff;
  font-size: .85rem;
  line-height: 1.5;
}

.fab {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 50;
  display: none;
  align-items: center;
  gap: .7rem;
  border-radius: 20px;
  padding: .95rem 1.05rem;
  text-decoration: none;
  background: linear-gradient(135deg, rgba(209, 166, 58, 0.96), rgba(216, 166, 48, 0.92));
  color: #0b1220;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.fab strong { display: block; font-size: .9rem; }
.fab span { display: block; font-size: .76rem; opacity: .85; }

.fab-badge {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(11, 18, 32, 0.14);
  font-size: 1rem;
}

.fab.is-visible { display: inline-flex; }

@media (max-width: 1200px) {
  .hero-grid, .main-grid { grid-template-columns: 1fr; }
  .hero-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 840px) {
  .content { padding: .8rem; }
  .armurerie-topbar { padding: .9rem .85rem; align-items: start; flex-direction: column; }
  .hero { padding: 1rem; border-radius: 22px; }
  .hero-metrics, .subgrid, .form-grid { grid-template-columns: 1fr; }
  .fab { left: .75rem; right: .75rem; bottom: .75rem; justify-content: center; }
}

/* Tab Navigation */
.armurerie-tabs {
  padding: 0.75rem 0;
}

.tab-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  justify-content: center;
}

.tab-button {
  appearance: none;
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.tab-button:hover {
  color: var(--text);
}

.tab-button.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* Suggestions list for smart search */
.suggestions-list {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  z-index: 40;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(8, 15, 26, 0.88);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.28);
}

.suggestions-list .suggestion {
  padding: 0.6rem 0.8rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  font-size: 0.85rem;
  color: var(--text);
  transition: background 0.15s ease;
}

.suggestions-list .suggestion:hover {
  background: rgba(209, 166, 58, 0.12);
}

.suggestions-list .suggestion:last-child {
  border-bottom: none;
}

.suggestions-list .suggestion .user-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
}

.suggestions-list .suggestion .user-name {
  font-weight: 600;
  color: var(--text);
}

.suggestions-list .suggestion .user-id {
  color: var(--muted);
  font-size: 0.75rem;
}

/* Weapon pick selector */
.weapon-pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: .6rem;
  margin-top: .5rem;
  padding: .75rem;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 14px;
  max-height: 320px;
  overflow-y: auto;
}

.weapon-pick {
  position: relative;
  cursor: pointer;
  border: 1.5px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(16, 32, 54, 0.92), rgba(8, 15, 26, 0.96));
  transition: border-color .18s, box-shadow .18s, transform .15s;
  user-select: none;
}

.weapon-pick:hover {
  border-color: rgba(209, 166, 58, 0.45);
  transform: translateY(-2px);
}

.weapon-pick:has(input:checked) {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(209, 166, 58, 0.18);
}

.weapon-pick input[type=checkbox] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.weapon-pick-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, rgba(209, 166, 58, 0.10), rgba(96, 165, 250, 0.08));
  display: grid;
  place-items: center;
  overflow: hidden;
}

.weapon-pick-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.weapon-pick-fallback {
  text-align: center;
  padding: .4rem;
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.3;
}

.weapon-pick-check {
  position: absolute;
  top: .35rem;
  right: .35rem;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: var(--gold);
  color: #0b1220;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  font-weight: 800;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.weapon-pick:has(input:checked) .weapon-pick-check {
  display: flex;
}

.weapon-pick-info {
  padding: .45rem .6rem .55rem;
}

.weapon-pick-cat {
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  line-height: 1;
}

.weapon-pick-name {
  font-size: .84rem;
  font-weight: 600;
  margin-top: .16rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Weapon cover fallback when image 404 */
.weapon-cover-fallback {
  display: none;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: .75rem;
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.4;
}

/* Log entries */
.log-entry[data-type="ok"]    { border-left-color: var(--green); }
.log-entry[data-type="error"] { border-left-color: var(--red); }
.log-entry[data-type="warn"]  { border-left-color: var(--gold); }
.log-entry[data-type="info"]  { border-left-color: var(--blue); }
.log-entry[data-type="muted"] { border-left-color: rgba(148, 163, 184, 0.28); }

.log-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}

.log-label {
  font-size: .88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: .3rem;
}

.log-entry[data-type="ok"]    .log-label { color: var(--green); }
.log-entry[data-type="error"] .log-label { color: var(--red); }
.log-entry[data-type="warn"]  .log-label { color: var(--gold); }
.log-entry[data-type="info"]  .log-label { color: var(--blue); }
.log-entry[data-type="muted"] .log-label { color: var(--muted); }

.log-icon { font-size: .78rem; opacity: .85; }

.log-time {
  font-size: .74rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.log-detail {
  margin-top: .3rem;
  font-size: .8rem;
  display: flex;
  align-items: center;
  gap: .35rem;
  flex-wrap: wrap;
  color: var(--muted);
}

/* Specificity fix: .timeline-entry span overrides plain .log-actor */
.log-detail .log-actor { color: var(--text); font-weight: 600; }
.log-detail .log-target { color: var(--muted); }
.log-entry .log-weapon { color: var(--gold); font-weight: 600; }

/* Assignment cards */
.assignment-card {
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-left: 3px solid var(--green);
  border-radius: 0 16px 16px 0;
  background: rgba(8, 15, 26, 0.78);
  padding: .95rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .45rem;
}

.assignment-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
}

.assignment-player-id {
  font-size: .95rem;
  font-weight: 600;
  color: var(--text);
}

.assignment-weapon {
  font-size: .84rem;
  color: var(--gold);
  margin-top: .15rem;
}

.assignment-reason {
  font-size: .82rem;
  color: #cbd5e1;
  line-height: 1.4;
}

.assignment-instructor {
  font-size: .78rem;
  color: var(--muted);
}

.assignment-instructor strong {
  color: var(--text);
  font-weight: 500;
}

.assignment-time {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .8rem;
  color: var(--muted);
  flex-wrap: wrap;
}

.assignment-arrow { color: var(--gold); opacity: .6; }

.assignment-actions {
  display: flex;
  gap: .5rem;
  margin-top: .2rem;
}

.btn-sm {
  font-size: .76rem !important;
  padding: .28rem .65rem !important;
}

.search-wrapper {
  position: relative;
}

