/* ===================================================
   NLPD – NightLite Police Department – Közös stílusok
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-primary: #09090b;
  --bg-header: #1C1C1C;
  --bg-card: #141414;
  --bg-card-hover: #1a1a1a;
  --border: #242424;
  --border-light: #2e2e2e;
  --accent: #6366F1;
  --accent-hover: #4f52d1;
  --accent-shadow: rgba(99,102,241,0.25);
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #52525b;
  --emerald: #34d399;
  --emerald-border: rgba(52,211,153,0.2);
  --emerald-bg: rgba(52,211,153,0.05);
  --red: #f87171;
  --yellow: #fbbf24;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

/* ── Logo animáció ── */
#site-logo {
  opacity: 0;
  transform: translateY(-12px) scale(0.95);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
#site-logo.loaded {
  opacity: 1;
  transform: translateY(0) scale(1);
}
#site-logo:hover { transform: scale(1.06) !important; }
#site-logo:active { transform: scale(0.95) !important; }

/* ── Navigáció ── */
.nav-link {
  position: relative;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0.5rem;
  letter-spacing: -0.015em;
  transition: all 0.15s ease;
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
}
.nav-link:hover { color: var(--text-primary); background: rgba(36,36,36,0.6); }
.nav-link.active { background: var(--accent); color: #fff; box-shadow: 0 4px 16px var(--accent-shadow); }
.nav-link.emerald-link { color: var(--emerald); border: 1px solid var(--emerald-border); }
.nav-link.emerald-link:hover { color: #6ee7b7; background: var(--emerald-bg); }
.nav-link.emerald-link.active { background: rgba(52,211,153,0.15); }

/* ── Kártyák ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.25rem;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.card:hover { background: var(--bg-card-hover); border-color: var(--border-light); }
.card-hover:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.4); }

/* ── Táblázatok ── */
.table-wrap { overflow-x: auto; border-radius: 0.75rem; border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
thead tr { background: rgba(36,36,36,0.8); }
th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}
td {
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  border-bottom: 1px solid rgba(36,36,36,0.6);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background 0.15s; }
tbody tr:hover { background: rgba(36,36,36,0.4); }

/* ── Gombok ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
  text-decoration: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 4px 12px var(--accent-shadow); }
.btn-secondary { background: rgba(36,36,36,0.8); color: var(--text-secondary); border: 1px solid var(--border); }
.btn-secondary:hover { color: var(--text-primary); background: rgba(50,50,50,0.8); }
.btn-danger { background: rgba(239,68,68,0.1); color: var(--red); border: 1px solid rgba(239,68,68,0.2); }
.btn-danger:hover { background: rgba(239,68,68,0.2); }
.btn-emerald { background: rgba(52,211,153,0.1); color: var(--emerald); border: 1px solid var(--emerald-border); }
.btn-emerald:hover { background: rgba(52,211,153,0.2); }

/* ── Badge-ek ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge-indigo { background: rgba(99,102,241,0.15); color: #818cf8; border: 1px solid rgba(99,102,241,0.2); }
.badge-emerald { background: rgba(52,211,153,0.1); color: var(--emerald); border: 1px solid var(--emerald-border); }
.badge-red { background: rgba(248,113,113,0.1); color: var(--red); border: 1px solid rgba(248,113,113,0.2); }
.badge-yellow { background: rgba(251,191,36,0.1); color: var(--yellow); border: 1px solid rgba(251,191,36,0.2); }
.badge-zinc { background: rgba(82,82,91,0.2); color: var(--text-secondary); border: 1px solid rgba(82,82,91,0.3); }

/* ── Input / Select ── */
.input, .select-input {
  background: rgba(20,20,20,0.8);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--text-primary);
  padding: 0.6rem 0.875rem;
  font-size: 0.875rem;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  font-family: 'Inter', sans-serif;
}
.input:focus, .select-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(99,102,241,0.2);
}
.input::placeholder { color: var(--text-muted); }
.select-input option { background: #1c1c1c; color: var(--text-primary); }

label { font-size: 0.8rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 0.35rem; display: block; }

/* ── Stat kártyák ── */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.25rem;
}
.stat-value { font-size: 1.75rem; font-weight: 700; line-height: 1; margin-bottom: 0.25rem; }
.stat-label { font-size: 0.8rem; color: var(--text-secondary); font-weight: 500; }

/* ── Mobil menü ── */
#mobile-menu {
  position: fixed;
  inset-y: 0;
  right: 0;
  z-index: 50;
  width: 100%;
  max-width: 20rem;
  background: var(--bg-header);
  border-left: 1px solid var(--border);
  box-shadow: -8px 0 32px rgba(0,0,0,0.6);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  display: flex;
  flex-direction: column;
}
#mobile-menu.open { transform: translateX(0); }

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: all 0.15s;
  color: #d4d4d8;
  text-decoration: none;
}
.mobile-nav-link:hover { background: rgba(36,36,36,0.6); color: #fff; }
.mobile-nav-link.active { background: var(--accent); color: #fff; box-shadow: 0 4px 12px var(--accent-shadow); }
.mobile-nav-link.emerald-link { color: var(--emerald); background: var(--emerald-bg); border: 1px solid var(--emerald-border); }

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-box {
  background: #1a1a1a;
  border: 1px solid var(--border-light);
  border-radius: 1rem;
  padding: 1.5rem;
  width: 100%;
  max-width: 32rem;
  transform: scale(0.95);
  transition: transform 0.2s;
}
.modal-overlay.open .modal-box { transform: scale(1); }

/* ── Reszponzív segédek ── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 768px) { .container { padding: 0 1.5rem; } }

.page-header { padding: 2rem 0 1.5rem; border-bottom: 1px solid var(--border); margin-bottom: 2rem; }
.page-title { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.03em; }
.page-subtitle { font-size: 0.875rem; color: var(--text-secondary); margin-top: 0.25rem; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #3f3f46; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #52525b; }

/* ── Animációk ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.4s ease forwards; }
.fade-up-1 { animation-delay: 0.05s; opacity: 0; }
.fade-up-2 { animation-delay: 0.1s;  opacity: 0; }
.fade-up-3 { animation-delay: 0.15s; opacity: 0; }
.fade-up-4 { animation-delay: 0.2s;  opacity: 0; }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}
.pulse-dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--emerald);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

/* ── Footer ── */
footer {
  border-top: 1px solid #18181b;
  background: rgba(9,9,11,0.5);
  backdrop-filter: blur(4px);
  padding: 1.5rem 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}
footer a { color: #a1a1aa; font-weight: 500; text-decoration: underline; text-decoration-color: #3f3f46; transition: all 0.15s; }
footer a:hover { color: #fbbf24; text-decoration-color: rgba(251,191,36,0.4); }
