/* ═══════════════════════════════════════════════════════════
   LELTÁR RENDSZER — Bethesda Glass Design
   Primary: #e41b48  |  Blue: #0C4DA2  |  Fonts: Montserrat/Poppins
   ═══════════════════════════════════════════════════════════ */

/* ── CSS VÁLTOZÓK ───────────────────────────────────────────── */
:root {
  --red:         #e41b48;
  --red-dark:    #b8153a;
  --red-light:   #ff4d72;
  --red-alpha:   rgba(228, 27, 72, 0.12);
  --blue:        #0C4DA2;
  --blue-light:  #1565c0;

  --bg:          #eef1f6;
  --bg-2:        #e4e8f0;
  --glass:       rgba(255, 255, 255, 0.82);
  --glass-2:     rgba(255, 255, 255, 0.60);
  --glass-border:rgba(255, 255, 255, 0.70);
  --glass-shadow:0 8px 32px rgba(31, 38, 135, 0.10);

  --text:        #1a1d2e;
  --text-2:      #4a5168;
  --text-3:      #8a93a8;
  --border:      rgba(0, 0, 0, 0.07);

  --sidebar-w:   260px;
  --bottom-h:    68px;
  --topbar-h:    60px;
  --radius:      16px;
  --radius-sm:   10px;
  --radius-xs:   6px;

  --transition:  0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm:   0 2px 8px rgba(0,0,0,0.06);
  --shadow:      0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg:   0 12px 40px rgba(0,0,0,0.12);
}

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

html { height: 100%; -webkit-tap-highlight-color: transparent; }

body {
  font-family: 'Poppins', 'Montserrat', sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  min-height: 100%;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse at 0% 0%, rgba(228,27,72,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 100% 100%, rgba(12,77,162,0.06) 0%, transparent 50%);
  background-attachment: fixed;
}

.hidden { display: none !important; }
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── UTILITY ─────────────────────────────────────────────────── */
.flex       { display: flex; }
.flex-col   { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2      { gap: 8px; }
.gap-3      { gap: 12px; }
.gap-4      { gap: 16px; }
.mt-4       { margin-top: 16px; }
.mt-6       { margin-top: 24px; }
.fw-600     { font-weight: 600; }
.text-red   { color: var(--red); }
.text-muted { color: var(--text-3); }
.text-sm    { font-size: 12px; }

/* ══════════════════════════════════════════════════════════════
   LOGIN KÉPERNYŐ
   ══════════════════════════════════════════════════════════════ */

.login-screen {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
}

.login-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(228,27,72,0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(12,77,162,0.12) 0%, transparent 50%),
    linear-gradient(135deg, #f0f4f8 0%, #dce3ed 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}

.login-card {
  background: var(--glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,0.5) inset;
  padding: 40px 36px;
  width: 100%; max-width: 420px;
  position: relative; z-index: 1;
}

.login-logo {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 32px;
}

.logo-mark svg { width: 44px; height: 44px; }
.logo-mark.small svg { width: 36px; height: 36px; }

.login-title h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: 20px; font-weight: 800;
  color: var(--text); line-height: 1.1;
}
.login-title span {
  font-size: 11px; font-weight: 500;
  color: var(--text-3); text-transform: uppercase; letter-spacing: 1px;
}

.login-card h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 17px; font-weight: 700;
  margin-bottom: 20px; color: var(--text);
}

.totp-hint {
  font-size: 13px; color: var(--text-2);
  margin-bottom: 20px; line-height: 1.5;
}

.login-forgot {
  text-align: center; margin-top: 16px;
  font-size: 13px; color: var(--text-3);
}

/* ══════════════════════════════════════════════════════════════
   FORM ELEMEK
   ══════════════════════════════════════════════════════════════ */

.form-group { margin-bottom: 16px; }

.form-group label {
  display: block;
  font-size: 12px; font-weight: 600;
  color: var(--text-2);
  margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  background: rgba(255,255,255,0.9);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Poppins', sans-serif;
  font-size: 14px; color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-alpha);
}

.form-group textarea { resize: vertical; min-height: 80px; }

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%238a93a8' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 36px;
  cursor: pointer;
}

.input-with-icon { position: relative; }
.input-with-icon input { padding-right: 44px; }
.pw-toggle {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--text-3); padding: 4px;
  display: flex; align-items: center;
}
.pw-toggle svg { width: 18px; height: 18px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.error-msg {
  background: rgba(228,27,72,0.08);
  border: 1px solid rgba(228,27,72,0.2);
  border-radius: var(--radius-xs);
  color: var(--red-dark);
  padding: 10px 14px;
  font-size: 13px; margin-bottom: 12px;
}

.success-msg {
  background: rgba(4,211,127,0.08);
  border: 1px solid rgba(4,211,127,0.25);
  border-radius: var(--radius-xs);
  color: #0a7a52;
  padding: 10px 14px;
  font-size: 13px; margin-bottom: 12px;
}

/* ══════════════════════════════════════════════════════════════
   GOMBOK
   ══════════════════════════════════════════════════════════════ */

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--red);
  color: white; border: none;
  border-radius: var(--radius-sm);
  padding: 11px 20px;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary:hover {
  background: var(--red-dark);
  box-shadow: 0 4px 16px rgba(228,27,72,0.35);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); box-shadow: none; }

.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: rgba(228,27,72,0.08);
  color: var(--red); border: 1.5px solid rgba(228,27,72,0.2);
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-secondary:hover {
  background: rgba(228,27,72,0.14);
  border-color: var(--red);
}

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: transparent; color: var(--text-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-family: 'Poppins', sans-serif;
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-ghost:hover { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.12); }

.btn-danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: #fff0f3; color: var(--red-dark);
  border: 1.5px solid rgba(228,27,72,0.25);
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-family: 'Poppins', sans-serif; font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all var(--transition);
}
.btn-danger:hover { background: var(--red); color: white; border-color: var(--red); }

.btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  background: transparent; border: none;
  border-radius: var(--radius-xs);
  color: var(--text-2); cursor: pointer;
  transition: all var(--transition);
}
.btn-icon:hover { background: var(--red-alpha); color: var(--red); }
.btn-icon svg { width: 16px; height: 16px; }

.btn-full { width: 100%; margin-top: 4px; }
.btn-sm { padding: 7px 14px; font-size: 12px; }

.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* ══════════════════════════════════════════════════════════════
   APP LAYOUT
   ══════════════════════════════════════════════════════════════ */

.app {
  display: flex; min-height: 100vh;
}

/* ── Oldalsáv ─────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid var(--glass-border);
  box-shadow: 4px 0 24px rgba(0,0,0,0.06);
  display: flex; flex-direction: column;
  position: fixed; left: 0; top: 0; bottom: 0;
  z-index: 100;
  transition: transform var(--transition);
}

.sidebar-header {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar-brand strong {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: 15px; font-weight: 800; color: var(--text);
}
.sidebar-brand span {
  font-size: 10px; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 1px;
}

.sidebar-nav {
  flex: 1; padding: 12px 12px;
  overflow-y: auto;
}

.nav-section-title {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-3); padding: 8px 8px 4px;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-2);
  font-size: 13px; font-weight: 500;
  transition: all var(--transition);
  margin-bottom: 2px;
  border: none; background: none; width: 100%; text-align: left;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.7; }
.nav-item:hover { background: rgba(228,27,72,0.06); color: var(--red); }
.nav-item:hover svg { opacity: 1; }
.nav-item.active {
  background: var(--red-alpha);
  color: var(--red);
  font-weight: 600;
}
.nav-item.active svg { opacity: 1; }

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border);
}

.user-info {
  padding: 10px 8px;
  font-size: 12px; color: var(--text-2);
  margin-bottom: 8px;
}
.user-info strong { display: block; font-size: 13px; font-weight: 600; color: var(--text); }
.user-info .role-badge { margin-top: 3px; }

.btn-logout {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 9px 12px;
  background: none; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-2); font-size: 12px; font-weight: 500;
  cursor: pointer; transition: all var(--transition);
}
.btn-logout:hover { background: #fff0f3; color: var(--red); border-color: rgba(228,27,72,0.3); }
.btn-logout svg { width: 15px; height: 15px; }

/* ── Top Bar ────────────────────────────────────────────────── */
.top-bar {
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 12px;
  padding: 0 24px;
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}

.top-bar h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px; font-weight: 700;
  color: var(--text); flex: 1;
}

.hamburger {
  display: none; background: none; border: none;
  cursor: pointer; color: var(--text-2);
  padding: 6px; border-radius: var(--radius-xs);
}
.hamburger svg { width: 22px; height: 22px; }
.hamburger:hover { background: var(--red-alpha); color: var(--red); }

.top-bar-right { display: flex; align-items: center; gap: 8px; }

.user-avatar {
  width: 36px; height: 36px;
  background: var(--red);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; color: white;
  font-family: 'Montserrat', sans-serif;
  cursor: pointer;
  flex-shrink: 0;
}

/* ── Fő tartalom ─────────────────────────────────────────────── */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex; flex-direction: column;
}

.view-container {
  flex: 1;
  padding: 24px;
  padding-bottom: 32px;
}

/* ── Alsó navigáció (mobil) ───────────────────────────────────── */
.bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--bottom-h);
  background: var(--glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--glass-border);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.08);
  z-index: 100;
  padding: 0 8px;
  padding-bottom: env(safe-area-inset-bottom);
  display: none;
  align-items: center; justify-content: space-around;
}

.bottom-nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 12px;
  border: none; background: none; cursor: pointer;
  color: var(--text-3);
  font-size: 10px; font-weight: 600;
  font-family: 'Poppins', sans-serif;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  min-width: 56px;
}
.bottom-nav-item svg { width: 22px; height: 22px; }
.bottom-nav-item.active { color: var(--red); }
.bottom-nav-item.active svg { stroke: var(--red); }

/* ══════════════════════════════════════════════════════════════
   KÁRTYÁK
   ══════════════════════════════════════════════════════════════ */

.card {
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; gap: 12px;
}
.card-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 15px; font-weight: 700; color: var(--text);
}
.card-subtitle { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* ── Stat kártyák (dashboard) ─────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  position: relative; overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--red);
  border-radius: var(--radius) var(--radius) 0 0;
}
.stat-card.blue::before { background: var(--blue); }
.stat-card.green::before { background: #04d37f; }
.stat-card.orange::before { background: #f59e0b; }

.stat-value {
  font-family: 'Montserrat', sans-serif;
  font-size: 32px; font-weight: 800;
  color: var(--text); line-height: 1;
  margin-bottom: 4px;
}
.stat-label { font-size: 12px; font-weight: 500; color: var(--text-3); }
.stat-icon {
  position: absolute; right: 16px; top: 16px;
  width: 36px; height: 36px;
  background: var(--red-alpha);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--red);
}
.stat-icon svg { width: 18px; height: 18px; }
.stat-card.blue .stat-icon { background: rgba(12,77,162,0.1); color: var(--blue); }
.stat-card.green .stat-icon { background: rgba(4,211,127,0.1); color: #04a864; }
.stat-card.orange .stat-icon { background: rgba(245,158,11,0.1); color: #d97706; }

/* ── Tartalom fejléc ──────────────────────────────────────────── */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 20px; gap: 16px; flex-wrap: wrap;
}
.page-header h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 20px; font-weight: 800; color: var(--text);
}
.page-header p { font-size: 13px; color: var(--text-2); margin-top: 4px; }

/* ── Keresősáv ────────────────────────────────────────────────── */
.search-bar {
  display: flex; gap: 10px; align-items: center;
  margin-bottom: 16px; flex-wrap: wrap;
}
.search-input-wrap { position: relative; flex: 1; min-width: 200px; }
.search-input-wrap svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--text-3);
}
.search-input-wrap input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  background: var(--glass);
  backdrop-filter: blur(8px);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Poppins', sans-serif;
  font-size: 13px; color: var(--text);
  outline: none; transition: border-color var(--transition), box-shadow var(--transition);
}
.search-input-wrap input:focus {
  border-color: var(--red); box-shadow: 0 0 0 3px var(--red-alpha);
}

/* ══════════════════════════════════════════════════════════════
   TÁBLÁZAT
   ══════════════════════════════════════════════════════════════ */

.table-wrap {
  background: var(--glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.data-table {
  width: 100%; border-collapse: collapse;
}

.data-table th {
  padding: 10px 16px;
  background: rgba(0,0,0,0.03);
  text-align: left;
  font-size: 11px; font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 16px;
  font-size: 13px; color: var(--text);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(228,27,72,0.025); }
.data-table .actions { display: flex; gap: 4px; }

.empty-state {
  text-align: center; padding: 48px 20px;
  color: var(--text-3);
}
.empty-state svg { width: 48px; height: 48px; margin-bottom: 12px; opacity: 0.4; }
.empty-state p { font-size: 14px; }

/* ══════════════════════════════════════════════════════════════
   BADGE / STÁTUSZ
   ══════════════════════════════════════════════════════════════ */

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px; font-weight: 700;
  white-space: nowrap;
}

.badge-aktiv, .badge-rendben, .badge-lezart {
  background: rgba(4,211,127,0.12); color: #0a7a52;
}
.badge-szervizen, .badge-masik, .badge-nyitott {
  background: rgba(245,158,11,0.12); color: #b45309;
}
.badge-selejtezett, .badge-nincs, .badge-fail {
  background: rgba(228,27,72,0.10); color: var(--red-dark);
}
.badge-admin { background: rgba(12,77,162,0.10); color: var(--blue); }
.badge-leltarozo { background: rgba(139,92,246,0.10); color: #6d28d9; }
.badge-megtekinto { background: rgba(0,0,0,0.06); color: var(--text-2); }
.badge-2fa-on { background: rgba(4,211,127,0.12); color: #0a7a52; }
.badge-2fa-off { background: rgba(0,0,0,0.06); color: var(--text-3); }

/* ══════════════════════════════════════════════════════════════
   MODAL
   ══════════════════════════════════════════════════════════════ */

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(10, 15, 30, 0.45);
  backdrop-filter: blur(4px);
  z-index: 200;
}

.modal-container {
  position: fixed;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 100%; max-width: 520px;
  max-height: 90vh;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  z-index: 201;
  display: flex; flex-direction: column;
}

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px; font-weight: 700; color: var(--text);
}
.modal-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-3); padding: 4px;
  border-radius: var(--radius-xs); transition: all var(--transition);
}
.modal-close:hover { background: var(--red-alpha); color: var(--red); }
.modal-close svg { width: 18px; height: 18px; }

.modal-body {
  padding: 20px 24px 24px;
  overflow-y: auto;
}

.modal-footer {
  display: flex; gap: 10px; justify-content: flex-end;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

/* ══════════════════════════════════════════════════════════════
   TOAST
   ══════════════════════════════════════════════════════════════ */

.toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 300; display: flex; flex-direction: column; gap: 8px;
  max-width: 340px;
}

.toast {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 16px;
  background: rgba(26,29,46,0.95);
  backdrop-filter: blur(12px);
  color: white;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  animation: slideIn 0.25s ease;
  border-left: 3px solid var(--text-3);
}
.toast-success { border-left-color: #04d37f; }
.toast-error   { border-left-color: var(--red); }
.toast-info    { border-left-color: var(--blue); }
.toast button  { background: none; border: none; color: rgba(255,255,255,0.5); cursor: pointer; font-size: 16px; }

@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ══════════════════════════════════════════════════════════════
   VONALKÓD + LELTÁR
   ══════════════════════════════════════════════════════════════ */

.scan-result {
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 16px;
  display: flex; align-items: center; gap: 16px;
  border: 2px solid;
  animation: pulse-in 0.3s ease;
}
.scan-result.rendben    { background: rgba(4,211,127,0.08); border-color: rgba(4,211,127,0.35); }
.scan-result.masik      { background: rgba(245,158,11,0.08); border-color: rgba(245,158,11,0.35); }
.scan-result.nincs      { background: rgba(228,27,72,0.08); border-color: rgba(228,27,72,0.3); }
.scan-icon { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.scan-result.rendben .scan-icon { background: rgba(4,211,127,0.15); color: #04a864; }
.scan-result.masik .scan-icon   { background: rgba(245,158,11,0.15); color: #b45309; }
.scan-result.nincs .scan-icon   { background: rgba(228,27,72,0.12); color: var(--red); }
.scan-icon svg { width: 22px; height: 22px; }
.scan-info strong { font-size: 14px; font-weight: 700; display: block; }
.scan-info span   { font-size: 12px; color: var(--text-2); }

@keyframes pulse-in {
  from { transform: scale(0.96); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.barcode-input-row {
  display: flex; gap: 10px; align-items: flex-end;
}
.barcode-input-row .form-group { flex: 1; margin-bottom: 0; }

/* ══════════════════════════════════════════════════════════════
   LOCATION TREE
   ══════════════════════════════════════════════════════════════ */

.location-tree { list-style: none; }
.location-tree-item {
  margin-bottom: 8px;
}
.location-node {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}
.location-node:hover { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-alpha); }
.location-node-icon { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.node-telephely { background: rgba(12,77,162,0.1); color: var(--blue); }
.node-epulet    { background: rgba(245,158,11,0.1); color: #b45309; }
.node-szoba     { background: rgba(4,211,127,0.1); color: #04a864; }
.location-node-info strong { font-size: 13px; font-weight: 600; display: block; }
.location-node-info span   { font-size: 11px; color: var(--text-3); }
.location-children { padding-left: 24px; margin-top: 6px; }

/* ══════════════════════════════════════════════════════════════
   ÁTADÁS-ÁTVÉTEL
   ══════════════════════════════════════════════════════════════ */

.signature-pad {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  background: white;
  width: 100%; height: 160px;
  cursor: crosshair;
  touch-action: none;
  display: block;
}
.signature-pad:focus { border-color: var(--red); outline: none; }

.transfer-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  border-left: 4px solid var(--red);
}
.transfer-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }

/* ══════════════════════════════════════════════════════════════
   FOTÓ GALÉRIA
   ══════════════════════════════════════════════════════════════ */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px; margin-top: 12px;
}
.photo-thumb {
  aspect-ratio: 1; border-radius: var(--radius-sm);
  overflow: hidden; position: relative;
  background: var(--bg-2); cursor: pointer;
}
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-thumb:hover .photo-overlay { opacity: 1; }
.photo-overlay {
  position: absolute; inset: 0;
  background: rgba(228,27,72,0.6);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity var(--transition);
}
.photo-overlay svg { color: white; width: 24px; height: 24px; }
.photo-badge {
  position: absolute; top: 6px; left: 6px;
  background: rgba(0,0,0,0.65);
  color: white; font-size: 9px; font-weight: 700;
  padding: 2px 6px; border-radius: 10px;
  text-transform: uppercase; letter-spacing: 0.5px;
}

/* ══════════════════════════════════════════════════════════════
   NAPLÓ
   ══════════════════════════════════════════════════════════════ */

.log-entry {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.log-entry:last-child { border-bottom: none; }
.log-dot {
  width: 8px; height: 8px; border-radius: 50%;
  flex-shrink: 0; margin-top: 5px;
  background: var(--text-3);
}
.log-dot.LOGIN, .log-dot.LOGIN_2FA_OK { background: #04d37f; }
.log-dot.LOGIN_FAIL, .log-dot._2FA_FAIL { background: var(--red); }
.log-dot.DEVICE_CREATE, .log-dot.DEVICE_UPDATE { background: var(--blue); }
.log-dot.INVENTORY_SCAN, .log-dot.INVENTORY_START { background: #8b5cf6; }
.log-dot.TRANSFER_CREATE { background: #f59e0b; }
.log-info strong { font-size: 12px; font-weight: 700; display: block; }
.log-info span   { font-size: 11px; color: var(--text-3); }
.log-time        { font-size: 11px; color: var(--text-3); margin-left: auto; white-space: nowrap; }

/* ══════════════════════════════════════════════════════════════
   TABS
   ══════════════════════════════════════════════════════════════ */

.tabs {
  display: flex; gap: 4px;
  background: rgba(0,0,0,0.04);
  border-radius: var(--radius-sm);
  padding: 4px; margin-bottom: 20px;
  width: fit-content;
}
.tab-btn {
  padding: 7px 18px;
  border-radius: var(--radius-xs);
  border: none; background: none;
  font-family: 'Poppins', sans-serif;
  font-size: 13px; font-weight: 500;
  color: var(--text-2); cursor: pointer;
  transition: all var(--transition);
}
.tab-btn.active {
  background: white;
  color: var(--red); font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* ══════════════════════════════════════════════════════════════
   2FA BEÁLLÍTÁS
   ══════════════════════════════════════════════════════════════ */

.qr-box {
  background: white; border-radius: var(--radius-sm);
  padding: 16px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); margin-bottom: 16px;
}
.qr-box img { max-width: 200px; }
.secret-code {
  background: var(--bg); border-radius: var(--radius-xs);
  padding: 10px 14px; font-family: 'Courier New', monospace;
  font-size: 14px; letter-spacing: 2px;
  text-align: center; color: var(--text);
  border: 1px solid var(--border); margin-bottom: 16px;
}

/* ══════════════════════════════════════════════════════════════
   HÁLÓZATI MONITOR — STÁTUSZLÁMPA
   ══════════════════════════════════════════════════════════════ */

.status-lamp {
  width: 12px; height: 12px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.status-lamp.online  { background: #04d37f; box-shadow: 0 0 6px rgba(4,211,127,0.6); animation: lamp-pulse 2s infinite; }
.status-lamp.offline { background: var(--red); box-shadow: 0 0 6px rgba(228,27,72,0.6); }
.status-lamp.unknown { background: var(--text-3); }

@keyframes lamp-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.55; }
}

.latency-badge {
  background: rgba(4,211,127,0.12);
  color: #0a7a52;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.stat-card.red::before { background: var(--red); }
.stat-card.red .stat-icon { background: rgba(228,27,72,0.10); color: var(--red); }

/* ══════════════════════════════════════════════════════════════
   RESZPONZÍV — TABLET / MOBIL
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }
  .main-content { margin-left: 0; }
  .hamburger { display: flex; }

  .bottom-nav { display: flex; }
  .view-container { padding-bottom: calc(var(--bottom-h) + 20px); }

  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row  { grid-template-columns: 1fr; }

  .modal-container {
    bottom: 0; top: auto; left: 0; right: 0;
    transform: none; max-width: 100%;
    border-radius: 20px 20px 0 0;
    max-height: 90vh;
  }
}

@media (max-width: 600px) {
  .view-container { padding: 16px; padding-bottom: calc(var(--bottom-h) + 20px); }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-value { font-size: 26px; }
  .data-table th:nth-child(n+4),
  .data-table td:nth-child(n+4) { display: none; }
  .toast-container { bottom: calc(var(--bottom-h) + 12px); right: 12px; left: 12px; max-width: 100%; }
  .page-header { flex-direction: column; gap: 12px; }
  .page-header .btn-group { width: 100%; }
}
