/* ════════════════════════════════════════════════════════
   NPA — Stylesheet
   ════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #07091A;
  --surface:   #0D1128;
  --surface2:  #131B30;
  --border:    rgba(255,255,255,0.07);
  --accent:    #00CEB8;
  --accent-lo: rgba(0,206,184,0.12);
  --accent-md: rgba(0,206,184,0.25);
  --green:     #00CEB8;
  --red:       #FF4D6A;
  --yellow:    #FFB84D;
  --text:      #E8EEF8;
  --muted:     #4A5880;
}

html, body {
  height: 100%;
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}

body {
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0,206,184,0.08) 0%, transparent 60%);
  background-attachment: fixed;
}

a { color: var(--accent); text-decoration: none; }

/* ── Layout ── */
#app  { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
#main { flex: 1; overflow-y: auto; min-height: 0; }

/* ── Top nav ── */
#topnav {
  flex-shrink: 0; height: 60px;
  background: rgba(13,17,40,0.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center;
  padding: 0 24px; gap: 4px; position: relative; overflow: hidden;
  box-shadow: 0 1px 30px rgba(0,0,0,0.4);
}
.nav-sep { width: 1px; height: 20px; background: var(--border); margin: 0 8px; flex-shrink: 0; }
.nav-item {
  display: flex; align-items: center; gap: 8px; padding: 7px 16px;
  cursor: pointer; color: var(--muted); transition: all .2s;
  font-size: 13px; font-weight: 500; white-space: nowrap; flex-shrink: 0;
  border-radius: 10px;
}
.nav-item:hover  { background: var(--accent-lo); color: var(--text); }
.nav-item.active { background: var(--accent-lo); color: var(--accent); font-weight: 600; }
.nav-item.active .icon { color: var(--accent); }
.nav-item .icon  { font-size: 13px; }

/* ── Page container ── */
.page              { display: none; padding: 40px 48px; max-width: 1200px; margin: 0 auto; width: 100%; }
.page.active       { display: block; }
.page-map-full        { display: none; padding: 0 !important; max-width: none; }
.page-map-full.active { display: flex; flex-direction: column; height: 100%; }

.page-header { margin-bottom: 32px; }
.page-title {
  font-size: 30px; font-weight: 800; letter-spacing: -.5px;
  background: linear-gradient(135deg, var(--text) 40%, var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-bottom: 6px;
}
.page-desc { color: var(--muted); font-size: 13px; }

/* ── Cards ── */
.card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.35);
  transition: box-shadow .2s;
}
.card:hover { box-shadow: 0 6px 32px rgba(0,0,0,0.45); }
.card-title {
  font-size: 11px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 1.2px; margin-bottom: 18px;
}

/* ── Dashboard accent card ── */
.dash-card { border-top: 2px solid var(--accent); }

/* ── Inputs ── */
input, select, textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px; color: var(--text);
  padding: 11px 16px; font-size: 14px; outline: none;
  transition: border-color .2s, box-shadow .2s;
  font-family: inherit;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-lo);
}
input.full, select.full, textarea.full { width: 100%; }
input::placeholder { color: var(--muted); }
label { font-size: 12px; color: var(--muted); margin-bottom: 5px; display: block; }

/* ── Buttons ── */
.btn {
  padding: 10px 20px; border-radius: 10px; border: none; cursor: pointer;
  font-size: 13px; font-weight: 600; transition: all .2s;
  font-family: inherit; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 7px;
}
.btn-primary {
  background: var(--accent); color: #07091A;
  box-shadow: 0 4px 16px var(--accent-md);
}
.btn-primary:hover {
  background: #00E0C8;
  box-shadow: 0 6px 24px var(--accent-md);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-lo);
}
.btn-sm  { padding: 6px 12px; font-size: 11px; border-radius: 8px; }
.btn-green { background: var(--accent); color: #07091A; box-shadow: 0 4px 16px var(--accent-md); }
.btn-green:hover { background: #00E0C8; transform: translateY(-1px); }

/* ── Input row ── */
.input-row     { display: flex; gap: 10px; margin-bottom: 12px; }
.input-row.col { flex-direction: column; }

/* ── Copy rows ── */
.copy-row   { display: flex; align-items: center; gap: 10px; margin: 5px 0; }
.copy-label { font-size: 11px; color: var(--muted); width: 140px; flex-shrink: 0; font-weight: 500; }
.copy-val   {
  flex: 1; background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 7px 12px; font-family: monospace; font-size: 12px;
  color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.copy-btn {
  flex-shrink: 0; padding: 6px 12px;
  background: transparent; border: 1px solid var(--border);
  border-radius: 8px; cursor: pointer; color: var(--muted);
  font-size: 11px; transition: all .2s; font-family: inherit;
}
.copy-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-lo); }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 600;
  border: 1px solid; letter-spacing: .3px;
}
.badge-online  { background: rgba(0,206,184,0.1); color: var(--green);  border-color: rgba(0,206,184,0.3); }
.badge-offline { background: rgba(255,255,255,0.04); color: var(--muted); border-color: var(--border); }
.badge-private { background: rgba(255,77,106,0.1); color: var(--red);    border-color: rgba(255,77,106,0.3); }
.badge-away    { background: rgba(255,184,77,0.1); color: var(--yellow); border-color: rgba(255,184,77,0.3); }

/* ── Dots ── */
.dot        { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-right: 3px; }
.dot-green  { background: var(--green); box-shadow: 0 0 6px var(--green); }
.dot-gray   { background: var(--muted); }
.dot-yellow { background: var(--yellow); }

/* ── Sub-tabs ── */
.sub-tabs {
  display: flex; gap: 4px; margin-bottom: 24px;
  background: var(--surface); border-radius: 12px; padding: 5px;
  width: fit-content;
}
.sub-tab {
  padding: 7px 18px; cursor: pointer; color: var(--muted);
  font-size: 13px; border-radius: 9px; transition: all .2s; font-weight: 500;
}
.sub-tab.active { background: var(--accent-lo); color: var(--accent); font-weight: 600; }
.sub-tab:hover:not(.active)  { color: var(--text); background: rgba(255,255,255,0.04); }
.sub-panel        { display: none; }
.sub-panel.active { display: block; }

/* ── Converter ── */
.converter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 700px) { .converter-grid { grid-template-columns: 1fr; } }
.result-box {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 11px 14px; font-family: monospace; font-size: 12px; min-height: 40px;
  color: var(--text); display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.result-val { flex: 1; }

/* ── Steam profile ── */
.steam-hero      { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 20px; }
.steam-avatar    { width: 100px; height: 100px; border-radius: 14px; border: 2px solid rgba(0,206,184,0.3); object-fit: cover; flex-shrink: 0; box-shadow: 0 0 20px rgba(0,206,184,0.15); }
.steam-hero-info { flex: 1; }
.steam-name      { font-size: 24px; font-weight: 800; letter-spacing: -.4px; }
.profile-meta    { font-size: 12px; color: var(--muted); margin-top: 4px; }

.steam-bans { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.steam-ban-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: 8px; font-size: 12px; font-weight: 600; border: 1px solid;
}
.steam-ban-ok  { background: rgba(0,206,184,0.08); color: var(--green); border-color: rgba(0,206,184,0.25); }
.steam-ban-bad { background: rgba(255,77,106,0.08); color: var(--red);   border-color: rgba(255,77,106,0.25); }

/* ── Stat grid ── */
.stat-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin: 18px 0 16px; }
.stat-box  {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px 12px; text-align: center;
  transition: all .2s;
}
.stat-box:hover { border-color: rgba(0,206,184,0.4); box-shadow: 0 0 15px rgba(0,206,184,0.08); }
.stat-value { font-size: 16px; font-weight: 800; color: var(--accent); margin-bottom: 6px; line-height: 1.2; word-break: break-word; }
.stat-label { font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }

/* ── ID grid ── */
.id-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.id-wide { grid-column: 1 / -1; }
.id-item { display: flex; flex-direction: column; gap: 6px; }
.id-lbl  { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; font-weight: 700; }
.id-row  { display: flex; gap: 7px; align-items: center; }
.id-row .copy-val { flex: 1; font-size: 12px; }

/* ── Alias history ── */
.alias-item { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
.alias-item:last-child { border-bottom: none; }
.alias-name { color: var(--text); font-family: monospace; }
.alias-time { color: var(--muted); font-size: 11px; }

/* ── GTA Map ── */
/* WARNING: display rules for .page-map-full are at line ~67 — do NOT add display:flex here */
.page-map-full .map-controls {
  padding: 10px 20px; flex-wrap: wrap; gap: 8px;
  border-bottom: 1px solid var(--border); background: rgba(13,17,40,0.95);
  backdrop-filter: blur(12px);
}
#map-wrap    { flex: 1; min-height: 0; overflow: hidden; }
#gta-map     { width: 100%; height: 100%; }
.leaflet-container { background: #07101E; }
.map-controls { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; align-items: flex-end; }
.coord-group  { display: flex; flex-direction: column; gap: 4px; }
.coord-group input { width: 130px; }

/* ── Hash card grid ── */
.hash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px; padding-bottom: 4px;
}
.hash-card {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden; display: flex; flex-direction: column;
  transition: all .2s; box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
.hash-card:hover {
  border-color: rgba(0,206,184,0.35);
  box-shadow: 0 6px 24px rgba(0,0,0,0.4), 0 0 0 1px rgba(0,206,184,0.1);
  transform: translateY(-2px);
}
.hash-card-img {
  width: 100%; height: 160px; background: var(--surface);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.hash-card-img img { width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; }
.hash-card-fallback {
  display: none; align-items: center; justify-content: center;
  width: 100%; height: 100%; color: var(--muted); font-size: 38px;
}
.hash-card-info { padding: 12px 14px 8px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.hash-card-field { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; font-size: 12px; }
.hash-card-field-label { color: var(--muted); font-weight: 700; font-size: 10px; white-space: nowrap; text-transform: uppercase; letter-spacing: .5px; }
.hash-card-field-value { font-family: monospace; color: var(--text); word-break: break-all; }
.hash-card-actions { padding: 6px 14px 12px; display: flex; gap: 5px; flex-wrap: wrap; }

/* ── Pagination ── */
.hash-pager {
  display: flex; gap: 5px; align-items: center; justify-content: center;
  padding: 18px 0 4px; flex-wrap: wrap;
}
.hash-pager button {
  min-width: 34px; height: 34px; padding: 0 10px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; color: var(--muted); font-size: 12px;
  cursor: pointer; transition: all .2s; font-family: inherit;
}
.hash-pager button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); background: var(--accent-lo); }
.hash-pager button.active { background: var(--accent); border-color: var(--accent); color: #07091A; font-weight: 700; box-shadow: 0 4px 12px var(--accent-md); }
.hash-pager button:disabled { opacity: .3; cursor: default; }

/* ── Weapon / hash table ── */
.table-wrap { max-height: calc(100vh - 260px); overflow-y: auto; border-radius: 14px; border: 1px solid var(--border); box-shadow: 0 4px 20px rgba(0,0,0,0.3); }
.weapon-table { width: 100%; border-collapse: collapse; }
.weapon-table th {
  text-align: left; padding: 10px 16px; font-size: 10px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 1px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--surface2);
}
.weapon-table td { padding: 9px 16px; border-bottom: 1px solid var(--border); font-size: 12px; vertical-align: middle; }
.weapon-table tr:last-child td { border-bottom: none; }
.weapon-table tr:hover td { background: rgba(255,255,255,0.02); }
.weapon-name { font-family: monospace; color: var(--accent); font-size: 11px; }
.weapon-cat  { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 10px; background: var(--accent-lo); border: 1px solid rgba(0,206,184,0.2); color: var(--accent); }

/* ── Weapon images ── */
.weapon-img-cell    { width: 52px; padding: 4px 8px !important; text-align: center; }
.weapon-img         { width: 40px; height: 40px; object-fit: contain; display: block; }
.weapon-img-fallback { display: none; width: 40px; height: 40px; align-items: center; justify-content: center; color: var(--muted); font-size: 18px; }

/* ── Notices ── */
.error-box { background: rgba(255,77,106,0.08); border: 1px solid rgba(255,77,106,0.25); border-radius: 10px; padding: 12px 16px; color: var(--red);    font-size: 12px; margin-top: 8px; }
.info-box  { background: rgba(255,255,255,0.03); border: 1px solid var(--border);       border-radius: 10px; padding: 12px 16px; color: var(--muted); font-size: 12px; margin-top: 8px; }
.warn-box  { background: rgba(255,184,77,0.08);  border: 1px solid rgba(255,184,77,0.25); border-radius: 10px; padding: 12px 16px; color: var(--yellow); font-size: 12px; margin-top: 8px; }
.no-results { text-align: center; padding: 48px; color: var(--muted); font-style: italic; }

/* ── Video ── */
.video-preview { width: 100%; border-radius: 12px; margin-top: 14px; max-height: 400px; background: #000; }

/* ── Toast ── */
#toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--accent); color: #07091A;
  padding: 11px 22px; border-radius: 12px; font-size: 13px; font-weight: 700;
  transform: translateY(60px); opacity: 0; transition: .25s; z-index: 2000;
  pointer-events: none; box-shadow: 0 8px 24px var(--accent-md);
}
#toast.show  { transform: translateY(0); opacity: 1; }
#toast.error { background: var(--red); color: #fff; box-shadow: 0 8px 24px rgba(255,77,106,0.3); }

/* ── Spinner ── */
.spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .6s linear infinite; vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Scrollbar ── */
::-webkit-scrollbar       { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }
