/* ==========================================================================
   U.S.S.S. ELITE TRAINING SYSTEM — STYLE
   Paletta: mélyfekete alap, tompított arany kiemelés, hűvös acélszürke
   szöveg. Cél: elit, kormányzati, feszes — nem "gamer HUD".
   ========================================================================== */

:root {
  --bg-void:      #06070a;
  --bg-base:      #0b0d12;
  --bg-panel:     #12141b;
  --bg-panel-2:   #171a22;
  --line:         rgba(198, 166, 100, 0.14);
  --line-soft:    rgba(255, 255, 255, 0.06);
  --gold:         #c6a664;
  --gold-bright:  #e8c887;
  --gold-dim:     #8a713f;
  --text-hi:      #f2efe7;
  --text-mid:     #b9bdc8;
  --text-low:     #6d7280;
  --red:          #d1554a;
  --red-bg:       rgba(209, 85, 74, 0.12);
  --yellow:       #d9a53a;
  --yellow-bg:    rgba(217, 165, 58, 0.12);
  --green:        #4e9e6f;
  --green-bg:     rgba(78, 158, 111, 0.12);
  --orange:       #d97a35;
  --orange-bright:#f5a35c;
  --orange-dim:   #8f5423;
  --orange-bg:    rgba(217, 122, 53, 0.13);
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;

  /* Prémium fényhangsúlyok — erőteljes, de a szín-nyelv (arany/zöld/
     sárga/piros) konzisztens marad, nincs szivárvány-RGB. */
  --glow-gold:  0 0 3px rgba(244,226,176,1), 0 0 14px rgba(198,166,100,0.85), 0 0 36px rgba(198,166,100,0.55), 0 0 64px rgba(198,166,100,0.28);
  --glow-green: 0 0 3px rgba(140,224,169,1), 0 0 12px rgba(78,158,111,0.95), 0 0 30px rgba(78,158,111,0.65);
  --glow-yellow:0 0 3px rgba(230,182,80,1),  0 0 12px rgba(217,165,58,0.95), 0 0 30px rgba(217,165,58,0.65);
  --glow-red:   0 0 3px rgba(245,175,168,1), 0 0 12px rgba(209,85,74,0.95),  0 0 30px rgba(209,85,74,0.65);
  --glow-orange:0 0 3px rgba(250,203,153,1), 0 0 14px rgba(217,122,53,0.9),  0 0 34px rgba(217,122,53,0.55);
  --glow-border-gold: 0 0 0 1px rgba(198,166,100,0.4), 0 0 26px rgba(198,166,100,0.2), inset 0 0 18px rgba(198,166,100,0.06);
  --glow-border-orange: 0 0 0 1px rgba(217,122,53,0.45), 0 0 26px rgba(217,122,53,0.22), inset 0 0 18px rgba(217,122,53,0.07);
  --bevel: inset 0 1px 0 rgba(255,255,255,0.06);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(198,166,100,0.08), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(217,122,53,0.06), transparent 55%),
    radial-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(6,7,10,0.42) 0%, rgba(6,7,10,0.58) 55%, rgba(6,7,10,0.72) 100%),
    var(--brand-img, url("../assets/branding/hero-command.jpg"));
  background-size: auto, auto, 28px 28px, auto, cover;
  background-position: 0 0, 0 0, 0 0, 0 0, center 22%;
  background-attachment: fixed, fixed, fixed, fixed, fixed;
  background-repeat: no-repeat, no-repeat, repeat, no-repeat, no-repeat;
  color: var(--text-mid);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(198,166,100,.025) 1px, transparent 1px), linear-gradient(rgba(198,166,100,.018) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.8), transparent 78%);
  z-index: -1;
}

h1, h2, h3, h4 { font-family: var(--font-display); color: var(--text-hi); font-weight: 600; margin: 0; letter-spacing: 0.01em; }
h1, h2 { text-shadow: 0 0 18px rgba(198,166,100,0.16); }
a { color: inherit; text-decoration: none; }
button {
  font-family: var(--font-body); cursor: pointer;
  background: none; border: none; color: inherit; margin: 0;
  -webkit-appearance: none; appearance: none;
}
::selection { background: rgba(198,166,100,0.35); color: #fff; }

/* Scrollbars */
::-webkit-scrollbar { height: 10px; width: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(198,166,100,0.25); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(198,166,100,0.4); }

/* ---------------- Login screen ---------------- */
.login-screen {
  min-height: calc(100vh - 26px);
  margin-top: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
  background-image:
    linear-gradient(180deg, rgba(6,7,10,0.55) 0%, rgba(6,7,10,0.88) 62%, var(--bg-void) 100%),
    linear-gradient(90deg, rgba(6,7,10,0.55), transparent 45%, transparent 55%, rgba(6,7,10,0.55)),
    var(--brand-img, url("../assets/branding/hero-command.jpg"));
  background-size: cover;
  background-position: center 28%;
}
.login-watermark {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.06;
  filter: drop-shadow(0 0 120px rgba(198,166,100,0.3));
  pointer-events: none;
  z-index: 0;
}
.login-watermark .seal-svg { width: 1100px; height: 1100px; max-width: none; }
.login-card {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(180deg, rgba(23,26,34,0.7), rgba(11,13,18,0.75)), var(--bg-panel);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(198,166,100,0.45);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.04), 0 0 0 1px rgba(198,166,100,0.12), 0 0 90px rgba(198,166,100,0.28);
  position: relative;
  z-index: 1;
}
.login-seal {
  width: 74px; height: 74px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 30% 20%, rgba(198,166,100,0.32), transparent 70%);
  filter: drop-shadow(0 0 8px rgba(198,166,100,0.8)) drop-shadow(0 0 32px rgba(198,166,100,0.6));
}
.login-seal .seal-svg { width: 100%; height: 100%; }
.login-title { text-align: center; font-size: 28px; margin-bottom: 4px; letter-spacing: 0.05em; text-shadow: 0 0 26px rgba(198,166,100,0.5); }
.login-sub {
  text-align: center; color: var(--text-low); font-size: 11.5px;
  letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 30px;
}
.field { margin-bottom: 18px; }
.field label {
  display: block; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 8px;
}
.section-check-label {
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 8px;
}
.section-check-row {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 4px 0; font-size: 11.5px; color: var(--text-mid); text-transform: none;
}
.section-check-row input[type="checkbox"] { flex: none; }
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--bg-base);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  color: var(--text-hi);
  font-family: var(--font-mono);
  font-size: 13.5px;
  letter-spacing: 0.03em;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field select, .field textarea { font-family: var(--font-body); letter-spacing: normal; }
.field select {
  appearance: none; -webkit-appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 8l5 5 5-5' fill='none' stroke='%23c6a664' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 13px;
}
.field select option { background: var(--bg-panel); color: var(--text-hi); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 3px rgba(198,166,100,0.12);
}
.field .hint { color: var(--text-low); font-size: 11px; margin-top: 6px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line-soft);
  background: var(--bg-panel-2);
  color: var(--text-hi);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--bevel);
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease, transform .1s ease;
}
.btn:hover { border-color: var(--gold-dim); background: #1b1e28; box-shadow: var(--bevel), 0 0 14px rgba(198,166,100,0.12); }
.btn:active { transform: scale(.97); }
.btn-gold {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: #1a1406;
  border: 1px solid var(--gold);
  box-shadow: var(--bevel), 0 0 20px rgba(198,166,100,0.25);
}
.btn-gold:hover { filter: brightness(1.08); box-shadow: var(--bevel), 0 0 32px rgba(198,166,100,0.42); }
.btn-danger { border-color: rgba(209,85,74,0.4); color: #f0a29b; }
.btn-danger:hover { background: var(--red-bg); box-shadow: var(--bevel), 0 0 14px rgba(209,85,74,0.2); }
.btn-result-pass.active { background: var(--green-bg); border-color: rgba(78,158,111,0.5); color: #7fd19c; box-shadow: var(--glow-green); }
.btn-result-fail.active { background: var(--red-bg); border-color: rgba(209,85,74,0.5); color: #f0a29b; box-shadow: var(--glow-red); }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.login-error {
  background: var(--red-bg); border: 1px solid rgba(209,85,74,0.35);
  color: #f0a29b; padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: 12.5px; margin-bottom: 16px;
}
.login-demo { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line-soft); font-size: 11.5px; color: var(--text-low); }
.login-demo code { color: var(--gold); }

/* ---------------- Global classification ribbon ---------------- */
.global-classification {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: stretch;
  height: 26px; background: #06070a;
  border-bottom: 1px solid rgba(217,122,53,0.5);
  font: 10px var(--font-mono); letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--orange-bright); font-weight: 700;
  box-shadow: 0 2px 18px rgba(217,122,53,0.18);
}
.global-classification::before, .global-classification::after {
  content: ""; flex: 1 1 auto;
  background-image: repeating-linear-gradient(135deg, var(--orange) 0 3px, #06070a 3px 6px);
  opacity: 0.85;
}
.global-classification span { flex: none; white-space: nowrap; padding: 0 18px; display: flex; align-items: center; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 700px) {
  .global-classification::before, .global-classification::after { flex: 0 0 14px; }
  .global-classification span { flex: 1 1 auto; min-width: 0; font-size: 8.5px; letter-spacing: 0.1em; padding: 0 8px; justify-content: center; }
}

/* ---------------- App shell ---------------- */
.app-shell { display: grid; grid-template-columns: 248px 1fr; min-height: calc(100vh - 26px); margin-top: 26px; }

.sidebar {
  background: linear-gradient(180deg, rgba(21,24,32,0.72), rgba(10,12,16,0.82) 78%);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-right: 1px solid var(--line);
  padding: 22px 16px;
  display: flex; flex-direction: column;
  position: sticky; top: 26px; height: calc(100vh - 26px);
  box-shadow: inset -1px 0 0 rgba(198,166,100,0.06);
}
.sidebar::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--gold) 20%, var(--gold-bright) 50%, var(--gold) 80%, transparent); opacity: 0.55; }
.sidebar::after { content: "SECURE INTERNAL NETWORK"; position: absolute; bottom: 12px; left: 22px; font: 8px var(--font-mono); letter-spacing: .16em; color: rgba(198,166,100,.32); }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 6px 22px; border-bottom: 1px solid var(--line-soft); margin-bottom: 18px; }
.brand-seal {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex: none;
  filter: drop-shadow(0 0 5px rgba(198,166,100,0.5)) drop-shadow(0 0 16px rgba(198,166,100,0.3));
}
.brand-seal .seal-svg { width: 100%; height: 100%; }
.brand-name { font-family: var(--font-display); font-size: 15px; color: var(--text-hi); line-height: 1.2; letter-spacing: 0.02em; }
.brand-sub { font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-low); }

.nav-group { margin-bottom: 18px; }
.nav-group-label { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-low); padding: 0 10px 8px; }
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px 9px 7px; border-radius: var(--radius-sm);
  color: var(--text-mid); font-size: 13px; font-weight: 500;
  margin-bottom: 2px;
  border: 1px solid transparent;
  border-left: 3px solid transparent;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, color .15s ease;
}
.nav-link .ic {
  flex: none; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
  font-size: 12px; border-radius: 5px; border: 1px solid var(--line-soft);
  background: linear-gradient(160deg, rgba(255,255,255,0.05), rgba(0,0,0,0.15));
  opacity: .9; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.nav-link:hover { background: var(--bg-panel-2); color: var(--text-hi); }
.nav-link:hover .ic { border-color: rgba(198,166,100,0.35); }
.nav-link.active {
  background: linear-gradient(90deg, rgba(198,166,100,0.14), rgba(198,166,100,0.03));
  border-color: rgba(198,166,100,0.3);
  border-left-color: var(--gold-bright);
  color: var(--gold-bright);
  box-shadow: inset 0 0 0 1px rgba(198,166,100,0.06), 0 0 16px rgba(198,166,100,0.12);
}
.nav-link.active .ic {
  border-color: rgba(198,166,100,0.55);
  background: linear-gradient(160deg, rgba(198,166,100,0.28), rgba(198,166,100,0.06));
  box-shadow: 0 0 10px rgba(198,166,100,0.35);
  filter: drop-shadow(0 0 4px rgba(198,166,100,0.6));
}
.nav-alert-count { margin-left:auto; min-width:19px; padding:2px 5px; text-align:center; border:1px solid rgba(209,85,74,.5); background:var(--red-bg); color:#f0a29b; border-radius:3px; font:10px var(--font-mono); }

.sidebar-footer { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.session-card { padding: 10px; border-radius: var(--radius-sm); background: var(--bg-panel-2); border: 1px solid var(--line-soft); }
.session-name { color: var(--text-hi); font-size: 12.5px; font-weight: 600; }
.session-role { font-size: 10.5px; color: var(--gold); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 2px; }
.logout-link { display: block; text-align: center; font-size: 11.5px; color: var(--text-low); margin-top: 10px; }
.logout-link:hover { color: var(--red); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line-soft);
  position: sticky; top: 26px; background: rgba(11,13,18,0.85); backdrop-filter: blur(10px);
  z-index: 20;
}
.topbar::after { content: "U.S.S.S. // PERSONNEL OPERATIONS"; margin-left: auto; color: rgba(198,166,100,.38); font: 9px var(--font-mono); letter-spacing: .14em; white-space: nowrap; }
.page-heading { flex: none; }
.page-heading h1 {
  font-size: 21px;
  background: linear-gradient(135deg, var(--gold-bright) 0%, var(--orange-bright) 50%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(198,166,100,0.2));
}
.page-heading .crumb { font-size: 11px; color: var(--text-low); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 2px; }

.search-wrap { flex: 1; max-width: 460px; position: relative; }
.search-wrap input {
  width: 100%; background: var(--bg-panel); border: 1px solid var(--line-soft);
  border-radius: 999px; padding: 9px 16px 9px 34px; color: var(--text-hi); font-size: 13px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.search-wrap input:focus { outline: none; border-color: var(--gold-dim); box-shadow: 0 0 0 3px rgba(198,166,100,0.1), 0 0 16px rgba(198,166,100,0.15); }
.search-wrap .ic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-low); font-size: 13px; }
.search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: rgba(23,26,34,0.85); backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--line); border-radius: var(--radius-md);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5); max-height: 420px; overflow-y: auto; z-index: 40;
}
.search-results .sr-group { padding: 8px 10px; }
.search-results .sr-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-low); padding: 6px 6px; }
.search-results .sr-item { display: flex; justify-content: space-between; gap: 10px; padding: 8px 8px; border-radius: var(--radius-sm); font-size: 13px; color: var(--text-hi); }
.search-results .sr-item:hover { background: rgba(198,166,100,0.08); }
.search-results .sr-empty { padding: 16px; text-align: center; color: var(--text-low); font-size: 12.5px; }

.content { padding: 26px 28px 60px; flex: 1; }
.content > * { animation: page-enter .32s ease both; }
@keyframes page-enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* ---------------- Cards / grid ---------------- */
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 980px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.006)), rgba(18,20,27,0.78);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(198,166,100,0.28);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--bevel), 0 12px 26px rgba(0,0,0,0.28), 0 0 0 1px rgba(198,166,100,0.05);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.card::before, .card::after {
  content: ""; position: absolute; width: 13px; height: 13px;
  border: 1px solid var(--gold-bright); opacity: 0.4;
  transition: opacity .2s ease, border-color .2s ease; pointer-events: none;
}
.card::before { top: -1px; left: -1px; border-right: none; border-bottom: none; border-radius: var(--radius-lg) 0 0 0; }
.card::after { bottom: -1px; right: -1px; border-left: none; border-top: none; border-color: var(--orange); border-radius: 0 0 var(--radius-lg) 0; }
.card:hover::before, .card:hover::after { opacity: 0.95; }
.card:hover { border-color: rgba(198,166,100,.4); box-shadow: var(--bevel), 0 16px 32px rgba(0,0,0,.34); }
.card.row-link:hover {
  transform: translateY(-3px);
  border-color: rgba(198,166,100,0.4);
  box-shadow: var(--bevel), 0 22px 48px rgba(0,0,0,0.4), 0 0 0 1px rgba(198,166,100,0.15), 0 0 34px rgba(198,166,100,0.14);
}
.card-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-low); margin-bottom: 6px; }
.card-value {
  font-size: 30px; font-family: var(--font-display); font-weight: 600;
  background: linear-gradient(135deg, var(--text-hi) 0%, var(--gold-bright) 60%, var(--orange-bright) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 14px rgba(198,166,100,0.22));
}
.card-sub { font-size: 12px; color: var(--text-low); margin-top: 4px; }

/* ---------------- Dashboard hero banner ---------------- */
.command-hero {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  padding: 26px 30px; border-radius: var(--radius-lg);
  border: 1px solid rgba(198,166,100,0.32);
  background:
    radial-gradient(560px 220px at 0% 0%, rgba(217,122,53,0.16), transparent 62%),
    radial-gradient(560px 240px at 100% 100%, rgba(198,166,100,0.14), transparent 62%),
    linear-gradient(100deg, rgba(6,7,10,0.94) 28%, rgba(6,7,10,0.68) 62%, rgba(6,7,10,0.4) 100%),
    var(--brand-img, url("../assets/branding/hero-dashboard.jpg"));
  background-size: auto, auto, auto, cover;
  background-position: 0 0, 0 0, 0 0, center 32%;
  box-shadow: var(--bevel), 0 22px 54px rgba(0,0,0,0.38), 0 0 0 1px rgba(198,166,100,0.06);
}
.command-hero::before, .command-hero::after {
  content: ""; position: absolute; width: 20px; height: 20px; border: 1px solid var(--orange); opacity: .8; pointer-events: none;
}
.command-hero::before { top: -1px; left: -1px; border-right: none; border-bottom: none; border-radius: var(--radius-lg) 0 0 0; }
.command-hero::after { bottom: -1px; right: -1px; border-left: none; border-top: none; border-color: var(--gold-bright); border-radius: 0 0 var(--radius-lg) 0; }
.command-hero-seal { flex: none; filter: drop-shadow(0 0 6px rgba(198,166,100,.5)) drop-shadow(0 0 20px rgba(198,166,100,.3)); }
.command-hero-body { flex: 1 1 260px; min-width: 0; }
.command-hero-title {
  font-size: 32px; margin: 4px 0 6px; line-height: 1.1;
  background: linear-gradient(135deg, var(--gold-bright) 0%, var(--orange-bright) 55%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 18px rgba(198,166,100,.28));
}
.command-hero-sub { color: var(--text-mid); font-size: 13px; }
.command-hero-status { flex: none; }
.command-hero-status .badge { font-size: 11px; padding: 7px 16px; }
@media (max-width: 700px) { .command-hero { padding: 20px; } .command-hero-title { font-size: 24px; } }

.section { margin-bottom: 26px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; flex-wrap: wrap; }
.section-head h2 { font-size: 17px; }
.section-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------- Badges / progress ---------------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 4px; font-size: 10px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; border: 1px solid transparent;
}
.badge-green { background: var(--green-bg); color: #7fd19c; border-color: rgba(78,158,111,0.45); box-shadow: 0 0 10px rgba(78,158,111,0.2); }
.badge-yellow { background: var(--yellow-bg); color: var(--yellow); border-color: rgba(217,165,58,0.45); box-shadow: 0 0 10px rgba(217,165,58,0.2); }
.badge-red { background: var(--red-bg); color: #f0a29b; border-color: rgba(209,85,74,0.45); box-shadow: 0 0 10px rgba(209,85,74,0.2); animation: badge-pulse-red 2.4s ease-in-out infinite; }
@keyframes badge-pulse-red { 0%,100% { box-shadow: 0 0 10px rgba(209,85,74,0.2); } 50% { box-shadow: 0 0 18px rgba(209,85,74,0.5); } }
.badge-gray { background: rgba(255,255,255,0.05); color: var(--text-low); border-color: var(--line-soft); }
.badge-gold { background: rgba(198,166,100,0.14); color: var(--gold-bright); border-color: rgba(198,166,100,0.4); }
.badge-orange { background: var(--orange-bg); color: var(--orange-bright); border-color: rgba(217,122,53,0.5); box-shadow: 0 0 10px rgba(217,122,53,0.22); }

.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot-green { background: var(--green); box-shadow: var(--glow-green); }
.dot-yellow { background: var(--yellow); box-shadow: var(--glow-yellow); }
.dot-red { background: var(--red); box-shadow: var(--glow-red); }
.dot-gray { background: var(--text-low); }

.progress { height: 6px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,0.4); }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--gold-dim), var(--gold-bright)); box-shadow: var(--glow-gold); transition: width .7s cubic-bezier(.16,.8,.3,1); }

/* ---------------- Tables ---------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: var(--radius-lg); background: rgba(18,20,27,0.4); backdrop-filter: blur(10px); }
.table-wrap:focus-within { border-color: rgba(198,166,100,.35); box-shadow: 0 0 24px rgba(198,166,100,.08); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  text-align: left; padding: 12px 14px; background: var(--bg-panel-2);
  color: var(--gold-dim); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700;
  border-bottom: 1px solid rgba(198,166,100,0.25); white-space: nowrap; position: sticky; top: 0;
}
tbody td { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); color: var(--text-mid); white-space: nowrap; }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background-color .15s ease; }
tbody tr:hover { background: rgba(198,166,100,0.05); }
.row-link { cursor: pointer; }

.person-cell { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: linear-gradient(160deg, #2a2412, #14120a);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold-bright); font-size: 11px; font-weight: 700;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 76px; height: 76px; font-size: 24px; }
.avatar-elite { border-color: rgba(217,122,53,0.6); box-shadow: 0 0 14px rgba(217,122,53,0.3); }
.avatar-upload-row { display: flex; align-items: center; gap: 14px; }
.avatar-upload-row .avatar-lg { border-width: 2px; }
.avatar-upload-actions { display: flex; flex-direction: column; gap: 6px; }
.person-name { color: var(--text-hi); font-weight: 600; }
.person-sub { font-size: 11px; color: var(--text-low); font-family: var(--font-mono); }

/* Filters bar */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.filters select, .filters input {
  background: var(--bg-panel); border: 1px solid var(--line-soft); color: var(--text-hi);
  border-radius: var(--radius-sm); padding: 8px 10px; font-size: 12.5px;
  transition: border-color .15s ease;
}
.filters select {
  appearance: none; -webkit-appearance: none; padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 8l5 5 5-5' fill='none' stroke='%23c6a664' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 12px;
}
.filters select:focus, .filters input:focus { outline: none; border-color: var(--gold-dim); box-shadow: 0 0 0 3px rgba(198,166,100,0.1); }
.filters select option { background: var(--bg-panel); color: var(--text-hi); }

/* Matrix */
.matrix-wrap { overflow: auto; border: 1px solid var(--line-soft); border-radius: var(--radius-lg); max-height: 74vh; background: rgba(6,7,10,0.5); }
.matrix-table { border-collapse: separate; border-spacing: 0; }
.matrix-table th, .matrix-table td { border-bottom: 1px solid var(--line-soft); border-right: 1px solid var(--line-soft); }
.matrix-table th.sticky-col, .matrix-table td.sticky-col {
  position: sticky; left: 0; background: var(--bg-panel); z-index: 5; min-width: 200px;
}
.matrix-table thead th { position: sticky; top: 0; z-index: 6; background: var(--bg-panel-2); }
.matrix-table thead th.sticky-col { z-index: 10; }
.mx-group-head {
  font-family: var(--font-display); font-size: 12px; color: var(--gold-bright);
  letter-spacing: 0.04em; text-shadow: 0 0 10px rgba(198,166,100,0.35);
  border-bottom: 1px solid rgba(198,166,100,0.3) !important;
}
.matrix-cell { text-align: center; cursor: pointer; padding: 9px 10px !important; min-width: 62px; transition: background .12s ease, box-shadow .12s ease; position: relative; }
.matrix-cell .mc-icon { display: block; font-size: 15px; line-height: 1.1; }
.matrix-cell .mc-pct { display: block; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-mid); margin-top: 2px; }
.matrix-cell .mc-attempts { position: absolute; top: 3px; right: 5px; font-size: 8.5px; font-family: var(--font-mono); color: var(--text-low); }
.matrix-cell.mc-green { background: rgba(78,158,111,0.1); box-shadow: inset 0 0 14px rgba(78,158,111,0.15); }
.matrix-cell.mc-green .mc-icon { color: #7fd19c; text-shadow: var(--glow-green); }
.matrix-cell.mc-yellow { background: rgba(217,165,58,0.1); box-shadow: inset 0 0 14px rgba(217,165,58,0.12); }
.matrix-cell.mc-yellow .mc-icon { color: var(--yellow); text-shadow: var(--glow-yellow); }
.matrix-cell.mc-red { background: rgba(209,85,74,0.08); box-shadow: inset 0 0 14px rgba(209,85,74,0.1); }
.matrix-cell.mc-red .mc-icon { color: #f0a29b; text-shadow: var(--glow-red); }
.matrix-cell:hover { background: rgba(198,166,100,0.14); box-shadow: inset 0 0 0 1px rgba(198,166,100,0.2); }
.matrix-empty { color: var(--text-low); }
.level-chip { font-size: 10px; padding: 2px 8px; border-radius: 999px; border: 1px solid rgba(198,166,100,0.4); color: var(--gold-bright); box-shadow: 0 0 8px rgba(198,166,100,0.15); font-weight: 700; letter-spacing: 0.04em; }
.level-chip-elite {
  border-color: rgba(217,122,53,0.55); color: var(--orange-bright);
  background: linear-gradient(135deg, rgba(217,122,53,0.16), rgba(198,166,100,0.08));
  box-shadow: 0 0 12px rgba(217,122,53,0.3);
}

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(4,5,7,0.7); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px;
  animation: modal-fade .18s ease both;
}
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
.modal-panel {
  background: linear-gradient(180deg, rgba(23,26,34,0.75), rgba(11,13,18,0.82)), var(--bg-panel);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  max-width: 640px; width: 100%; max-height: 88vh; overflow-y: auto;
  box-shadow: 0 40px 100px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.03), 0 0 60px rgba(198,166,100,0.1); padding: 26px;
  animation: modal-pop .22s cubic-bezier(.2,.8,.3,1.1) both;
}
@keyframes modal-pop { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal-panel-lg { max-width: 96vw; width: 1100px; max-height: 94vh; }
/* A DOCX/PDF előnézet fehér "papír" háttere fölött a globális sötét témás
   h1-h4 szín (var(--text-hi), közel fehér) láthatatlanná tenné a címeket —
   itt felülírjuk sötétre. */
#preview-body h1, #preview-body h2, #preview-body h3, #preview-body h4 { color: #161616 !important; text-shadow: none !important; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.modal-close { color: var(--text-low); font-size: 20px; line-height: 1; border: none; background: none; }
.modal-close:hover { color: var(--gold); }

/* Toast */
#toast {
  position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px);
  background: rgba(23,26,34,0.85); backdrop-filter: blur(14px);
  border: 1px solid var(--line); color: var(--text-hi);
  padding: 12px 22px; border-radius: 999px; font-size: 13px; opacity: 0; pointer-events: none;
  transition: all .25s ease; z-index: 200;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 0 1px rgba(198,166,100,0.08), 0 0 24px rgba(198,166,100,0.1);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.warn { border-color: rgba(209,85,74,0.4); color: #f0a29b; box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 24px rgba(209,85,74,0.12); }

/* Profile */
.profile-head { display: flex; gap: 20px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }
.profile-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.profile-name { font-size: 24px; }
.profile-id { font-family: var(--font-mono); color: var(--gold); font-size: 13px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line-soft); margin-bottom: 18px; }
.tab-btn { padding: 10px 14px; font-size: 12.5px; color: var(--text-low); border-bottom: 2px solid transparent; font-weight: 600; border-radius: var(--radius-sm) var(--radius-sm) 0 0; transition: color .15s ease, background .15s ease; }
.tab-btn:hover { color: var(--text-hi); background: rgba(255,255,255,0.03); }
.tab-btn.active { color: var(--gold-bright); border-color: var(--gold); text-shadow: 0 0 12px rgba(198,166,100,0.4); }

.module-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: var(--radius-md); margin-bottom: 8px; background: var(--bg-panel-2); cursor: pointer; }
.module-row:hover { border-color: var(--line); }
.module-row .mr-left { display: flex; align-items: center; gap: 10px; }
.module-code { font-family: var(--font-mono); color: var(--gold); font-size: 12px; min-width: 44px; }

.participant-row { padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: var(--radius-md); margin-bottom: 8px; background: var(--bg-panel-2); }
.participant-row input[type="checkbox"] { accent-color: var(--gold); }

.history-item { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 12.5px; }
.history-item:hover { color: var(--text-hi); background: linear-gradient(90deg, rgba(198,166,100,.06), transparent); }
.history-item:last-child { border-bottom: none; }

/* Classification stamp — minősített irat jellegű fejléc, fekete-narancs */
.classification-strip {
  display: inline-block; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em;
  color: var(--orange-bright); border: 1px solid rgba(217,122,53,0.55); border-radius: 3px;
  padding: 7px 16px 7px 22px; margin-bottom: 14px; background: rgba(6,7,10,0.78);
  box-shadow: 0 0 22px rgba(217,122,53,0.22), inset 0 0 14px rgba(217,122,53,0.06); text-transform: uppercase;
  font-weight: 700; position: relative; overflow: hidden;
}
.classification-strip::before { content: "◆  "; color: var(--orange-dim); }
.classification-strip::after {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 7px;
  background-image: repeating-linear-gradient(135deg, var(--orange) 0 3px, #06070a 3px 6px);
  box-shadow: 1px 0 10px rgba(217,122,53,0.4);
}

/* Locations */
.loc-card {
  border: 1px solid var(--line-soft); border-radius: var(--radius-lg); overflow: hidden;
  background: rgba(23,26,34,0.6); backdrop-filter: blur(14px); cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.loc-card:hover {
  transform: translateY(-3px);
  border-color: rgba(198,166,100,0.35);
  box-shadow: 0 22px 48px rgba(0,0,0,0.4), 0 0 0 1px rgba(198,166,100,0.14), 0 0 26px rgba(198,166,100,0.08);
}
.loc-card-img {
  height: 140px; position: relative; overflow: hidden;
  background: linear-gradient(160deg, #1c1810, #0d0c08); display: flex; align-items: center; justify-content: center;
}
.loc-card-ic { font-size: 26px; opacity: .5; }
.loc-card-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(6,7,10,0.75) 100%); pointer-events: none; }
.loc-card-id {
  position: absolute; top: 8px; left: 8px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.08em;
  color: var(--gold-bright); background: rgba(6,7,10,0.6); border: 1px solid rgba(198,166,100,0.3);
  border-radius: 999px; padding: 2px 8px; backdrop-filter: blur(4px);
}
.loc-card-body { padding: 14px 16px; }

/* ---------------- Nagyítható/panozható térkép (mapview.js) ---------------- */
.pz-viewport {
  position: relative; width: 100%; height: 100%; overflow: hidden;
  background: radial-gradient(circle at 30% 20%, #14161c, #06070a 75%);
  border: 1px solid var(--line-soft); border-radius: var(--radius-md);
  cursor: grab; touch-action: none;
}
.pz-viewport.dragging { cursor: grabbing; }
.pz-stage { position: absolute; top: 0; left: 0; transform-origin: 0 0; will-change: transform; }
.pz-imgbox img { display: block; width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.pz-missing {
  width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--text-low); font-size: 13px; gap: 6px; text-align: center; padding: 20px;
}
.pz-missing-ic { font-size: 30px; opacity: .6; }
.pz-missing-path { font-family: var(--font-mono); font-size: 10.5px; color: var(--gold-dim); word-break: break-all; }
.pz-pins, .pz-labels { position: absolute; inset: 0; pointer-events: none; }
.pz-pin {
  position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px;
  border-radius: 50%; background: var(--gold-bright); border: 2px solid #1a1406;
  cursor: pointer; pointer-events: auto; box-shadow: 0 0 0 5px rgba(198,166,100,0.18);
  transition: transform .12s ease;
}
.pz-pin:hover { transform: scale(1.25); }
.pz-pin-entrance { width: 10px; height: 10px; margin: -5px 0 0 -5px; background: #8fb7ff; box-shadow: 0 0 0 4px rgba(143,183,255,0.18); }
.pz-label {
  position: absolute; transform: translate(-50%, -50%);
  font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-bright);
  background: rgba(6,7,10,0.6); border: 1px solid var(--line); border-radius: 999px;
  padding: 3px 9px; white-space: nowrap; pointer-events: auto; backdrop-filter: blur(4px);
}
.pz-controls { position: absolute; right: 10px; bottom: 10px; display: flex; flex-direction: column; gap: 4px; z-index: 5; }
.pz-btn {
  width: 30px; height: 30px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: rgba(23,26,34,0.85); color: var(--text-hi); font-size: 15px; line-height: 1;
  display: flex; align-items: center; justify-content: center; backdrop-filter: blur(6px);
}
.pz-btn:hover { border-color: var(--gold-dim); background: #1b1e28; }
.pz-hint {
  position: absolute; left: 10px; top: 10px; z-index: 5; font-size: 10.5px; color: var(--text-low);
  background: rgba(6,7,10,0.6); padding: 5px 10px; border-radius: 999px; backdrop-filter: blur(4px);
}

.map-page-canvas { height: 72vh; min-height: 420px; }
.loc-detail-canvas { height: 320px; }
.loc-form-canvas { height: 280px; border-radius: var(--radius-md); overflow: hidden; }

.map-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line-soft); margin-bottom: 16px; }
.map-tab-btn {
  padding: 9px 16px; font-size: 12.5px; font-weight: 600; color: var(--text-low);
  border-bottom: 2px solid transparent; background: none; border-radius: 0;
}
.map-tab-btn:hover { color: var(--text-hi); }
.map-tab-btn.active { color: var(--gold-bright); border-color: var(--gold); text-shadow: 0 0 12px rgba(198,166,100,0.4); }

.map-layout { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: start; }
@media (max-width: 980px) {
  .map-page-canvas { height: 50vh; }
  .map-layout { grid-template-columns: 1fr; }
}

/* Empty states */
.empty-state { text-align: center; padding: 50px 20px; color: var(--text-low); }
.empty-state h3 { color: var(--text-mid); margin-bottom: 6px; font-size: 16px; }

/* Access denied */
.denied { text-align: center; padding: 80px 20px; }
.denied .ic { font-size: 34px; margin-bottom: 12px; }

/* Utility */
.mt-0{margin-top:0}.mt-1{margin-top:8px}.mt-2{margin-top:16px}.mb-1{margin-bottom:8px}.mb-2{margin-bottom:16px}
.flex{display:flex}.gap-1{gap:8px}.gap-2{gap:16px}.items-center{align-items:center}.justify-between{justify-content:space-between}.flex-wrap{flex-wrap:wrap}
.text-low{color:var(--text-low)}.text-mid{color:var(--text-mid)}.text-hi{color:var(--text-hi)}.text-gold{color:var(--gold)}.text-orange{color:var(--orange-bright);font-weight:600}
.small{font-size:11.5px}
.divider{height:1px;background:var(--line-soft);margin:16px 0}

/* Mobile */
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: -260px; top: 0; width: 240px; z-index: 90; transition: left .2s ease; box-shadow: 20px 0 60px rgba(0,0,0,0.6); }
  .sidebar.open { left: 0; }
  .topbar { padding: 14px 16px; }
  .content { padding: 18px 16px 50px; }
  .menu-toggle { display: inline-flex; }
  .search-wrap { display: none; }
}

/* Shared command-desk finish across dashboard, personnel, maps and exams. */
.section-head h2 { letter-spacing: .03em; text-transform: uppercase; }
.section-head h2::before { content: "// "; color: var(--gold-dim); font-family: var(--font-mono); font-size: .72em; }
.btn { min-height: 38px; border-radius: 4px; letter-spacing: .02em; }
.btn-gold { text-shadow: 0 1px 0 rgba(255,255,255,.2); text-transform: uppercase; letter-spacing: 0.06em; font-size: 12.5px; }
.field input::placeholder, .field textarea::placeholder, .filters input::placeholder { color: #555b69; }
input[type="checkbox"] { accent-color: var(--gold); }
@media (max-width: 900px) { .topbar::after { display: none; } .sidebar::after { display: none; } }
.menu-toggle { display: none; background: var(--bg-panel-2); border: 1px solid var(--line-soft); color: var(--text-hi); width: 36px; height: 36px; border-radius: var(--radius-sm); align-items: center; justify-content: center; flex: none; }

/* ---------- Felvételi Vizsga (Recruitment Exam) ---------- */
.exam-summary-bar {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  padding: 16px 0; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
  margin: 14px 0;
}
@media (max-width: 700px) { .exam-summary-bar { grid-template-columns: 1fr 1fr; } }

.exam-q-card {
  background: rgba(18,20,27,0.5); border: 1px solid var(--line-soft); border-radius: var(--radius-md);
  padding: 16px 18px; margin-bottom: 12px; backdrop-filter: blur(8px);
}
.exam-q-head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 10px; font-size: 14.5px; line-height: 1.5; }
.exam-q-tips {
  background: rgba(198,166,100,0.05); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 14px; margin-bottom: 12px;
}
.exam-tip-list { margin: 0; padding-left: 18px; color: var(--text-mid); font-size: 12.5px; line-height: 1.7; }
.exam-tip-list li { margin-bottom: 2px; }
.exam-q-watch {
  margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line-soft);
  font-size: 12px; color: var(--gold-bright); font-style: italic;
}

.exam-score-row { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.exam-score-btn {
  width: 38px; height: 38px; border-radius: var(--radius-sm); border: 1px solid var(--line-soft);
  background: var(--bg-panel-2); color: var(--text-mid); font-family: var(--font-mono); font-size: 15px;
  font-weight: 600; display: flex; align-items: center; justify-content: center;
}
.exam-score-btn:hover { border-color: var(--gold-dim); color: var(--text-hi); }
.exam-score-btn.active {
  background: rgba(198,166,100,0.16); border-color: var(--gold); color: var(--gold-bright);
  box-shadow: var(--glow-gold);
}
.exam-note {
  width: 100%; background: var(--bg-base); border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
  color: var(--text-hi); padding: 8px 12px; font-size: 12.5px; font-family: var(--font-body); resize: vertical;
}
.exam-note:focus { border-color: var(--gold-dim); outline: none; }

/* Recruitment desk: dense, deliberate controls for live oral examinations. */
.exam-q-card {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, rgba(23,25,33,.9), rgba(12,14,19,.82));
  border-color: rgba(198,166,100,.18);
  box-shadow: 0 12px 28px rgba(0,0,0,.18);
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.exam-q-card:hover { border-color: rgba(198,166,100,.42); box-shadow: 0 16px 36px rgba(0,0,0,.28), 0 0 22px rgba(198,166,100,.08); transform: translateY(-1px); }
.exam-q-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--gold-dim); opacity: .75; }
.exam-q-head { align-items: flex-start; font-weight: 600; color: var(--text-hi); }
.exam-q-head .module-code { flex: none; min-width: 46px; padding: 4px 6px; text-align: center; border: 1px solid rgba(198,166,100,.38); border-radius: 3px; color: var(--gold-bright); background: rgba(198,166,100,.08); font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; }
.exam-q-tips { background: rgba(198,166,100,.045); border-color: rgba(198,166,100,.16); }
.exam-score-row { align-items: center; }
.exam-score-row::before { content: "PONT"; color: var(--text-low); font: 10px var(--font-mono); letter-spacing: .12em; margin-right: 2px; }
.exam-score-btn { width: 42px; height: 42px; border-radius: 3px; }
.exam-score-btn[data-score-val="0"].active { background: rgba(209,85,74,.16); border-color: rgba(209,85,74,.7); color: #f0a29b; box-shadow: 0 0 16px rgba(209,85,74,.16); }
.exam-score-btn[data-score-val="5"].active { background: rgba(78,158,111,.16); border-color: rgba(78,158,111,.7); color: #9be0b2; box-shadow: 0 0 16px rgba(78,158,111,.16); }
.exam-category-score { min-height: 62px; padding: 11px 13px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: rgba(18,20,27,.55); }
.exam-category-score strong { display: block; color: var(--text-hi); font-family: var(--font-mono); font-size: 13px; margin-bottom: 4px; }
.exam-category-score .card-title { margin-bottom: 5px; line-height: 1.35; }
details.card { border-color: rgba(198,166,100,.22); }
details.card > summary { color: var(--gold-bright); list-style: none; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::after { content: "+"; float: right; font: 18px var(--font-mono); color: var(--gold); }
details.card[open] > summary::after { content: "−"; }
[data-critical-q] { accent-color: #d1554a; width: 15px; height: 15px; vertical-align: -3px; margin-right: 5px; }
.exam-note:focus, [data-competency]:focus, #exam-recommendation:focus { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(198,166,100,.1); }
.exam-print-btn { float:right; margin-top:-4px; }
.exam-note-templates { display:flex; flex-wrap:wrap; gap:5px; margin:0 0 10px; }
.note-template { padding:4px 7px; border:1px solid var(--line-soft); border-radius:3px; color:var(--text-low); font-size:10px; background:rgba(255,255,255,.02); }
.note-template:hover { color:var(--gold-bright); border-color:var(--gold-dim); background:rgba(198,166,100,.07); }
@media print { .exam-print-btn, .exam-note-templates { display:none !important; } }
@media (max-width: 700px) {
  .exam-q-card { padding: 14px 14px 14px 16px; }
  .exam-q-head { font-size: 14px; }
  .exam-score-row::before { width: 100%; margin-bottom: 1px; }
  .exam-category-score { min-height: auto; }
}

/* Reusable photographic page banner (training / covert-ops headers) */
.page-banner {
  position: relative; overflow: hidden; min-height: 128px;
  display: flex; align-items: flex-end; margin-bottom: 18px;
  padding: 20px 26px; border-radius: var(--radius-lg);
  border: 1px solid rgba(198,166,100,0.3);
  background-size: cover; background-position: center 30%;
  box-shadow: var(--bevel), 0 18px 42px rgba(0,0,0,0.35);
}
.page-banner::before, .page-banner::after {
  content: ""; position: absolute; width: 16px; height: 16px; border: 1px solid var(--gold-bright); opacity: .7; pointer-events: none; z-index: 2;
}
.page-banner::before { top: -1px; left: -1px; border-right: none; border-bottom: none; border-color: var(--orange); border-radius: var(--radius-lg) 0 0 0; }
.page-banner::after { bottom: -1px; right: -1px; border-left: none; border-top: none; border-radius: 0 0 var(--radius-lg) 0; }
.page-banner-body { position: relative; z-index: 1; }
.page-banner-body h2 {
  font-size: 26px; margin: 4px 0 0;
  background: linear-gradient(135deg, var(--gold-bright) 0%, var(--orange-bright) 55%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 14px rgba(198,166,100,.25));
}
.page-banner-body p { color: var(--text-mid); font-size: 12.5px; margin-top: 6px; max-width: 520px; }
.page-banner-training { background-image: linear-gradient(100deg, rgba(6,7,10,0.92) 30%, rgba(6,7,10,0.45) 90%), var(--brand-img, url("../assets/branding/hero-training.jpg")); background-position: center 18%; }
.page-banner-covert { background-image: linear-gradient(100deg, rgba(6,7,10,0.92) 30%, rgba(6,7,10,0.45) 90%), var(--brand-img, url("../assets/branding/hero-covert.jpg")); background-position: center 38%; }
.page-banner-command { background-image: linear-gradient(100deg, rgba(6,7,10,0.9) 32%, rgba(6,7,10,0.4) 90%), var(--brand-img, url("../assets/branding/hero-command-ops.jpg")); background-position: center 25%; }
.page-banner-ops { background-image: linear-gradient(100deg, rgba(6,7,10,0.85) 24%, rgba(6,7,10,0.4) 90%), var(--brand-img, url("../assets/branding/hero-training-single.jpg")); background-position: center 30%; }
.page-banner-investigations { background-image: linear-gradient(100deg, rgba(6,7,10,0.9) 30%, rgba(6,7,10,0.42) 90%), var(--brand-img, url("../assets/branding/hero-investigations.jpg")); background-position: center 30%; }
.page-banner-recruitment { background-image: linear-gradient(100deg, rgba(6,7,10,0.9) 30%, rgba(6,7,10,0.42) 90%), var(--brand-img, url("../assets/branding/hero-recruitment.jpg")); background-position: center 22%; }

/* Slim photographic brand strip — decorative closer for the dashboard */
.brand-strip {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  border: 1px solid rgba(198,166,100,0.25);
  height: 90px; margin-top: 8px;
  background-image: linear-gradient(rgba(6,7,10,0.3), rgba(6,7,10,0.5)), var(--brand-img, url("../assets/branding/strip-brand-2.jpg"));
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--bevel), 0 14px 34px rgba(0,0,0,.3);
}
.brand-strip span {
  font: 10px var(--font-mono); letter-spacing: .22em; text-transform: uppercase; color: var(--gold-bright);
  text-shadow: 0 2px 10px rgba(0,0,0,.8); background: rgba(6,7,10,.55);
  padding: 7px 18px; border: 1px solid rgba(198,166,100,.4); border-radius: 999px;
}

/* Command Center operational records */
.command-page-head { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin: 8px 0 22px; padding: 20px 22px; border:1px solid rgba(198,166,100,.24); border-left:3px solid var(--gold); background:linear-gradient(110deg, rgba(198,166,100,.1), rgba(18,20,27,.48) 42%, rgba(8,9,12,.3)); box-shadow:0 18px 40px rgba(0,0,0,.2); }
.operation-head-actions { display:flex; gap:8px; flex-wrap:wrap; }
.command-page-head h2 { font-size:28px; letter-spacing:.02em; }
.eyebrow { color:var(--gold); font:10px var(--font-mono); letter-spacing:.17em; margin-bottom:6px; }
.operation-filters { align-items:center; padding:12px; border:1px solid var(--line-soft); background:rgba(18,20,27,.5); }
.operation-filters input { flex:1; min-width:240px; }
.filter-check { color:var(--text-low); font-size:12px; white-space:nowrap; }
.filter-check input { accent-color:var(--gold); }
.operation-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.operation-record { position:relative; padding:18px; border:1px solid rgba(198,166,100,.2); border-radius:var(--radius-md); background:linear-gradient(145deg,rgba(23,26,34,.86),rgba(9,11,15,.8)); box-shadow:0 12px 28px rgba(0,0,0,.2); transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease; }
.command-overview { border-left:3px solid var(--gold); }
.command-overview h2 { font-size:23px; }
.command-overview-stats { margin-top:14px; }
.command-overview-stats > div { padding:14px; border:1px solid var(--line-soft); background:rgba(6,7,10,.28); }
.command-overview-stats strong { display:block; margin:2px 0; color:var(--gold-bright); font:28px var(--font-display); }
.command-overview-stats .command-alert { color:#f0a29b; text-shadow:var(--glow-red); }
.command-alert-panel { border-color:rgba(209,85,74,.35); border-left:3px solid var(--red); }
.command-alert-panel h2 { font-size:22px; }
.command-alert-panel .history-item { padding:11px 8px; }
.command-brief { border-left:3px solid var(--gold); }
.command-brief h2 { font-size:22px; }
.command-brief p { max-width:900px; color:var(--text-mid); line-height:1.7; }
.brief-actions { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-top:14px; }
.brief-action { display:flex; gap:10px; align-items:flex-start; min-height:52px; padding:12px; border:1px solid var(--line-soft); background:rgba(6,7,10,.3); color:var(--text-mid); font-size:12px; }
.brief-index { color:var(--gold-bright); font:11px var(--font-mono); }
@media (max-width:760px) { .brief-actions { grid-template-columns:1fr; } }
.readiness-text-green { color:#7fd19c !important; }
.readiness-text-yellow { color:var(--yellow) !important; }
.readiness-text-red { color:#f0a29b !important; text-shadow:var(--glow-red); }
.readiness-head { align-items:center; }
.readiness-badge { padding:10px 14px; border:1px solid currentColor; font:11px var(--font-mono); letter-spacing:.08em; text-transform:uppercase; }
.readiness-badge.readiness-green { color:#7fd19c; background:var(--green-bg); }
.readiness-badge.readiness-yellow { color:var(--yellow); background:var(--yellow-bg); }
.readiness-badge.readiness-red { color:#f0a29b; background:var(--red-bg); }
.readiness-levels { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
.readiness-level { padding:20px; border:1px solid var(--line-soft); background:rgba(18,20,27,.78); min-height:185px; }
.readiness-level.active { border-color:rgba(198,166,100,.55); box-shadow:inset 3px 0 var(--gold),0 12px 28px rgba(0,0,0,.2); }
.readiness-level h3 { margin:12px 0 8px; font-size:19px; }
.readiness-level p { min-height:42px; color:var(--text-low); font-size:12.5px; }
.readiness-dot { display:inline-block; width:12px; height:12px; border-radius:50%; }
.readiness-dot.readiness-green { background:var(--green); box-shadow:var(--glow-green); }
.readiness-dot.readiness-yellow { background:var(--yellow); box-shadow:var(--glow-yellow); }
.readiness-dot.readiness-red { background:var(--red); box-shadow:var(--glow-red); }
.readiness-reason { min-height:44px; color:var(--text-mid); line-height:1.6; }
@media (max-width:760px) { .readiness-levels { grid-template-columns:1fr; } .readiness-head { align-items:flex-start; } }
.operation-record:hover { transform:translateY(-2px); border-color:rgba(198,166,100,.5); box-shadow:0 18px 38px rgba(0,0,0,.3),0 0 24px rgba(198,166,100,.08); }
.operation-record.operation-critical { border-color:rgba(209,85,74,.55); box-shadow:inset 3px 0 var(--red),0 12px 28px rgba(0,0,0,.2); }
.operation-record-top,.record-footer,.record-meta { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.record-id { color:var(--gold-bright); font:11px var(--font-mono); letter-spacing:.1em; }
.operation-record h3 { margin:16px 0 8px; font-size:20px; }
.operation-record p { min-height:42px; margin:0 0 16px; color:var(--text-mid); font-size:13px; line-height:1.6; }
.record-meta { justify-content:flex-start; color:var(--text-low); font:10px var(--font-mono); text-transform:uppercase; letter-spacing:.06em; }
.record-footer { padding-top:12px; border-top:1px solid var(--line-soft); color:var(--text-low); font-size:11px; }
.record-actions { margin-top:14px; display:flex; justify-content:flex-end; }
.record-actions { gap:8px; }
.operation-kpi-grid { margin:16px 0; }
.operation-kpi-grid .card { min-height:96px; }
.notification-banner { margin:16px 0; border-left:3px solid var(--yellow); }
.notification-banner h3 { margin:4px 0; font-size:21px; }
.record-detail-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.record-detail-grid > div { padding:11px; border:1px solid var(--line-soft); background:rgba(6,7,10,.3); }
.record-detail-grid strong { display:block; color:var(--text-hi); font-size:13px; margin-top:4px; }
.record-detail-text { padding:12px; border:1px solid var(--line-soft); background:rgba(6,7,10,.3); color:var(--text-mid); white-space:pre-wrap; }
@media (max-width: 700px) { .record-detail-grid { grid-template-columns:1fr 1fr; } }
@media (max-width: 760px) { .command-page-head { align-items:flex-start; flex-direction:column; } .operation-grid { grid-template-columns:1fr; } .operation-filters input { min-width:100%; } }
@media print {
  body { background:#fff; color:#111; }
  body::before, .sidebar, .topbar, .operation-filters, .command-page-head .btn, .record-actions, .btn { display:none !important; }
  .app-shell, .main, .content { display:block; padding:0; }
  .card, .operation-record { color:#111; background:#fff; border:1px solid #999; box-shadow:none; break-inside:avoid; }
  .operation-grid { display:block; }
  .operation-record { margin-bottom:14px; }
  .operation-record h3, .operation-record p, .record-footer, .record-meta, .record-id { color:#111; }
}

/* Felvételi tanúsítvány — csak nyomtatáskor jelenik meg, a teljes
   alkalmazás felett; a normál nézetben rejtve van. */
#cert-print-root { display: none; }
body.printing-cert #root { display: none !important; }
body.printing-cert #cert-print-root { display: block; }
.cert-page {
  max-width: 720px; margin: 60px auto; padding: 60px 56px; text-align: center;
  border: 2px solid #c6a664; background: #fdfcf9; color: #1a1a1a;
  font-family: var(--font-body);
}
.cert-seal { width: 90px; height: 90px; margin: 0 auto 18px; }
.cert-seal .seal-svg { width: 100%; height: 100%; }
.cert-org { font: 11px var(--font-mono); letter-spacing: 0.2em; color: #8a713f; text-transform: uppercase; margin-bottom: 10px; }
.cert-title { font-family: var(--font-display); font-size: 34px; color: #17140c; margin: 0 0 24px; letter-spacing: 0.02em; }
.cert-lede { font-size: 14px; color: #4a4a4a; margin: 6px 0; }
.cert-name { font-family: var(--font-display); font-size: 30px; color: #17140c; margin: 10px 0; font-weight: 600; border-bottom: 1px solid #c6a664; display: inline-block; padding-bottom: 6px; }
.cert-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 32px 0; text-align: left; }
.cert-stats span { display: block; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: #8a713f; margin-bottom: 3px; }
.cert-stats strong { font-size: 14px; color: #17140c; }
.cert-sign { display: flex; justify-content: space-between; margin-top: 56px; padding-top: 0; gap: 40px; }
.cert-sign-block { flex: 1; }
.cert-sign-line { border-top: 1px solid #999; padding-top: 8px; font-size: 13px; color: #17140c; }
.cert-sign-label { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: #8a713f; margin-top: 4px; }
@media print {
  .cert-page { margin: 0 auto; border: 2px solid #c6a664; box-shadow: none; }
}

/* Csatolmány-galéria — feltöltött fájlok és külső hivatkozások, kép-előnézettel */
.attachment-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-top: 8px; }
.attachment-card { position: relative; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: rgba(6,7,10,.3); padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.attachment-thumb { display: block; width: 100%; height: 110px; object-fit: cover; border-radius: 4px; border: 1px solid rgba(198,166,100,.25); background: rgba(255,255,255,.02); }
.attachment-file-icon { display: flex; align-items: center; justify-content: center; height: 110px; font-size: 34px; border-radius: 4px; border: 1px solid var(--line-soft); background: rgba(255,255,255,.02); }
.attachment-meta { display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.attachment-card [data-remove-attachment] { position: absolute; top: 6px; right: 6px; }
@media (max-width: 600px) { .attachment-grid { grid-template-columns: repeat(2, 1fr); } }

/* Csatornák — Discord-szerű "szoba" lista + tartalom, de statikus/helyi adat */
.channels-layout { display: grid; grid-template-columns: 220px 1fr; gap: 18px; align-items: start; }
.channels-sidebar {
  border: 1px solid var(--line-soft); border-radius: var(--radius-lg);
  background: rgba(18,20,27,0.5); backdrop-filter: blur(10px); padding: 14px;
  position: sticky; top: 100px;
}
.channel-link {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--radius-sm);
  color: var(--text-mid); font-size: 13px; font-weight: 500; margin-bottom: 3px; cursor: pointer;
  border: 1px solid transparent; transition: background .15s ease, color .15s ease;
}
.channel-link::before { content: "#"; color: var(--gold-dim); font-weight: 700; }
.channel-link:hover { background: var(--bg-panel-2); color: var(--text-hi); }
.channel-link.active { background: rgba(198,166,100,0.12); border-color: rgba(198,166,100,0.3); color: var(--gold-bright); }
.channel-post {
  border: 1px solid var(--line-soft); border-radius: var(--radius-lg);
  background: rgba(18,20,27,0.5); backdrop-filter: blur(10px); padding: 16px 18px; margin-bottom: 14px;
}
.channel-post-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.channel-post-title { color: var(--gold-bright); font-family: var(--font-display); font-size: 17px; }
.channel-post-meta { color: var(--text-low); font-size: 11px; white-space: nowrap; }
.channel-post-body { color: var(--text-mid); white-space: pre-wrap; font-size: 13.5px; line-height: 1.6; }
@media (max-width: 760px) { .channels-layout { grid-template-columns: 1fr; } .channels-sidebar { position: static; } }

/* Oktatási Központ (Training Center) — kategória/dokumentum kártyák + tartalom */
.tc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.tc-card {
  position: relative; overflow: hidden; border-radius: var(--radius-lg); cursor: pointer;
  border: 1px solid rgba(198,166,100,0.25); background: rgba(18,20,27,0.6);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.tc-card:hover { transform: translateY(-3px); border-color: rgba(198,166,100,.45); box-shadow: 0 18px 40px rgba(0,0,0,.4), 0 0 26px rgba(198,166,100,.1); }
.tc-card-cover { height: 110px; background: linear-gradient(160deg,#1c1810,#0d0c08); background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; position: relative; }
.tc-card-cover .ic { font-size: 26px; opacity: .5; }
.tc-card-cover::after { content:""; position:absolute; inset:0; background: linear-gradient(180deg, transparent 40%, rgba(6,7,10,.75) 100%); }
.tc-card-body { padding: 14px 16px; position: relative; z-index: 1; }
.tc-card-title { color: var(--gold-bright); font-family: var(--font-display); font-size: 16px; margin-bottom: 4px; }
.tc-card-meta { color: var(--text-low); font-size: 11.5px; }
.doc-content { color: var(--text-mid); font-size: 14px; line-height: 1.75; }
.doc-content h2 { font-size: 20px; margin: 20px 0 10px; color: var(--gold-bright); }
.doc-content h3 { font-size: 16.5px; margin: 16px 0 8px; color: var(--gold-bright); }
.doc-content h4 { font-size: 13.5px; margin: 12px 0 6px; color: var(--gold); text-transform: uppercase; letter-spacing: .06em; }
.doc-content p { margin: 0 0 10px; }
.doc-content ul { margin: 0 0 10px; padding-left: 20px; }
.doc-content li { margin-bottom: 4px; }
.doc-content hr { border: none; border-top: 1px solid var(--line-soft); margin: 18px 0; }
.doc-content blockquote {
  margin: 0 0 12px; padding: 10px 14px; border-left: 3px solid var(--orange);
  background: rgba(217,122,53,0.08); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.doc-content blockquote p { margin: 0; color: var(--text-hi); }
.doc-content strong { color: var(--text-hi); }
.doc-cover { width: 100%; max-height: 280px; object-fit: cover; border-radius: var(--radius-lg); border: 1px solid rgba(198,166,100,.3); margin-bottom: 16px; }
.doc-editor-toolbar { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 6px; }
.doc-editor-toolbar button { padding: 4px 9px; font-size: 11px; }
.save-indicator { font-size: 11px; color: var(--text-low); transition: color .2s ease; }
.save-indicator.saved { color: #7fd19c; }
.save-indicator.saving { color: var(--gold); }
