:root {
  --brand: #034087;
  --brand-2: #0165b2;
  --accent: #f4a259;
}
body { background: #f4f6f9; }
.bg-brand { background: var(--brand) !important; }
.text-brand { color: var(--brand) !important; }
.btn-brand { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-brand:hover, .btn-brand:focus { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }

/* Nyilvános oldal */
.form-card {
  margin-top: 0; position: relative; border: 0; border-radius: 1rem;
  /* többrétegű, a kék háttérhez illő sötétkék árnyék: közeli éles + távoli puha */
  box-shadow:
    0 1px 2px rgba(1, 34, 72, .12),
    0 4px 10px rgba(1, 34, 72, .14),
    0 18px 40px -8px rgba(1, 34, 72, .35),
    0 40px 80px -20px rgba(1, 34, 72, .4);
}
.period-row { border: 1px solid #e3e8ef; border-left: 4px solid var(--brand-2); background: #f8fafc; border-radius: .5rem; padding: .75rem 1rem; }
.period-row.fixed { border-left-color: #adb5bd; }
.period-num { font-weight: 700; color: var(--brand); min-width: 4.5rem; }
.qr-box img { max-width: 220px; width: 100%; }
.footer { color: #6c757d; font-size: .875rem; }

/* Admin */
.admin-body .card { border: 0; box-shadow: 0 1px 3px rgba(0, 0, 0, .06); }
.stat-card .value { font-size: 2rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-card .label { color: #6c757d; font-size: .875rem; }
.stat-card i { font-size: 1.75rem; opacity: .35; }
.table td, .table th { vertical-align: middle; }
.free-badge { min-width: 3.2rem; }
#reader { width: 100%; max-width: 480px; margin: auto; border-radius: .75rem; overflow: hidden; }
#reader video { border-radius: .75rem; }
.scan-result { transition: background-color .3s; }
.scan-ok { background: #d1e7dd !important; }
.scan-warn { background: #fff3cd !important; }
.scan-err { background: #f8d7da !important; }
.ts-wrapper.form-select, .ts-wrapper.form-control { padding: 0; }
.lesson-option-full { color: #adb5bd; }

@media (max-width: 575.98px) {
  .table-responsive-stack td { display: block; }
  main.container-xl { padding-left: .75rem; padding-right: .75rem; }
}

@media print {
  .navbar, .btn, form, .no-print { display: none !important; }
  /* a színes sávok, diagramok és háttérszínek is kerüljenek papírra */
  body { -webkit-print-color-adjust: exact; print-color-adjust: exact; background: #fff !important; }
  .card { break-inside: avoid; box-shadow: none !important; border: 1px solid #dee2e6 !important; }
  .print-full { flex: 0 0 100% !important; max-width: 100% !important; }
  /* vezérlőpult: a statisztika kártyák egy sorban, a fülek tartalma egymás alatt */
  .admin-body .row > .col-xl { flex: 1 0 0 !important; max-width: none !important; }
  .tab-content > .tab-pane { display: block !important; opacity: 1 !important; }
  #seatViz .card-body > .row > .col-md-5 { flex: 0 0 38%; max-width: 38%; }
  #seatViz .card-body > .row > .col-md-7 { flex: 0 0 62%; max-width: 62%; }
  .viz-tip { display: none !important; }
  .stat-card .bi { display: none; }
}
.print-only { display: none; }
@media print { .print-only { display: block; } }
.navbar .nav-link { white-space: nowrap; }

/* ===== Nyilvános fejléc – a nyílt napi plakát stílusában ===== */
.hero {
  --p-navy: #034087;
  --p-blue: #0157a4;
  --p-mid: #038cdc;
  --p-light: #95e1fd;
  position: relative;
  overflow-x: clip;
  background: linear-gradient(180deg, #ffffff 0%, #f1f8fd 100%);
  color: var(--p-navy);
  font-family: 'Poppins', system-ui, sans-serif;
}
.hero-corner { position: absolute; top: 0; left: 0; width: 100%; height: 80px; z-index: 0; }

/* Iskola fotója jobbra, balra fehérbe olvadva */
.hero-photo {
  /* a hullámok mögé is lenyúlik, így látszik a tér és a lépcső */
  position: absolute; top: 0; right: 0; bottom: 46px; z-index: 1;
  width: min(50vw, 780px);
  -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,0.000) 0.0%, rgba(0,0,0,0.013) 3.9%, rgba(0,0,0,0.049) 7.7%, rgba(0,0,0,0.104) 11.6%, rgba(0,0,0,0.175) 15.5%, rgba(0,0,0,0.259) 19.3%, rgba(0,0,0,0.352) 23.2%, rgba(0,0,0,0.450) 27.1%, rgba(0,0,0,0.550) 30.9%, rgba(0,0,0,0.648) 34.8%, rgba(0,0,0,0.741) 38.7%, rgba(0,0,0,0.825) 42.5%, rgba(0,0,0,0.896) 46.4%, rgba(0,0,0,0.951) 50.3%, rgba(0,0,0,0.987) 54.1%, rgba(0,0,0,1.000) 58.0%);
  mask-image: linear-gradient(to right, rgba(0,0,0,0.000) 0.0%, rgba(0,0,0,0.013) 3.9%, rgba(0,0,0,0.049) 7.7%, rgba(0,0,0,0.104) 11.6%, rgba(0,0,0,0.175) 15.5%, rgba(0,0,0,0.259) 19.3%, rgba(0,0,0,0.352) 23.2%, rgba(0,0,0,0.450) 27.1%, rgba(0,0,0,0.550) 30.9%, rgba(0,0,0,0.648) 34.8%, rgba(0,0,0,0.741) 38.7%, rgba(0,0,0,0.825) 42.5%, rgba(0,0,0,0.896) 46.4%, rgba(0,0,0,0.951) 50.3%, rgba(0,0,0,0.987) 54.1%, rgba(0,0,0,1.000) 58.0%);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: right bottom; display: block; }

/* A feliratok bal széle az űrlap kártya bal széléhez igazodik (820px széles, középre igazított),
   de legfeljebb addig, hogy a fotóig (min(48vw, 640px)) elférjen a ~520px széles szövegblokk */
.hero-inner {
  position: relative; z-index: 2;
  padding: 3.4rem 1.25rem 5.5rem clamp(1.25rem, min((100vw - 820px) / 2 + 12px, 100vw - min(50vw, 780px) - 440px), 40rem);
}
.hero-school { font-weight: 700; font-size: clamp(1.35rem, 2.4vw, 1.9rem); line-height: 1.12; letter-spacing: -.01em; }

.hero-title { margin: .35rem 0 .2rem -1.1rem; line-height: 0; }
.hero-title img { width: min(480px, 92vw); height: auto; }

.hero-date {
  /* --date-h: a sáv magassága; az ikon teste pontosan ugyanekkora, csak a gyűrűk lógnak ki felül */
  --date-h: 4.1rem;
  display: inline-flex; align-items: flex-end; position: relative; margin-left: .1rem;
}
.hero-date-icon {
  position: relative; z-index: 1; flex: none;
  width: calc(var(--date-h) * 80 / 77); height: calc(var(--date-h) * 92 / 77);
  margin-bottom: calc(var(--date-h) * -3 / 77);
  filter: drop-shadow(0 3px 5px rgba(1, 60, 120, .3));
}
.hero-date-icon svg { width: 100%; height: 100%; display: block; }
.hero-date-text {
  height: var(--date-h); display: inline-flex; align-items: center; box-sizing: border-box;
  margin-left: calc(var(--date-h) * -0.06); padding: 0 1.4rem 0 .9rem;
  background: linear-gradient(90deg, #0b5cad 0%, #0b5cad 82%, #1f73c4 94%, #4a95dc 100%);
  color: #fff; border-radius: 0 999px 999px 0;
  font-family: 'Fira Sans Condensed', 'Roboto Condensed', sans-serif; font-weight: 800;
  font-size: calc(var(--date-h) * .6); letter-spacing: 0; white-space: nowrap;
  box-shadow: 0 6px 14px rgba(1, 87, 164, .25);
}

.hero-info { display: flex; align-items: center; gap: 1.1rem; margin-top: 1.1rem; flex-wrap: wrap; }
.hero-info-item { display: flex; align-items: center; gap: .6rem; font-size: 1.05rem; line-height: 1.2; font-weight: 500; }
.hero-info-item strong { font-weight: 700; }
.hero-info-item .bi-clock { font-size: 2.3rem; color: var(--p-navy); }
.hero-info-item .bi-people-fill { font-size: 2.5rem; color: var(--p-blue); }
.hero-info-sep { width: 2px; height: 2.6rem; background: var(--p-navy); }

.hero-wave { position: absolute; left: 0; right: 0; bottom: -1px; height: 190px; z-index: 1; pointer-events: none; }
.hero-wave > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-slogan {
  position: absolute; z-index: 5; right: clamp(1rem, 4.5vw, 5.5rem); bottom: -22px;
  transform: rotate(var(--tilt, -5deg)); translate: 0 var(--lift, 0px); color: #fff; padding-bottom: 6px;
}
.hero-slogan span { display: block; font-family: 'Kaushan Script', cursive; font-size: clamp(1.3rem, 2.3vw, 1.9rem); line-height: 1.1; text-shadow: 0 1px 1px rgba(1, 30, 66, .55), 0 2px 4px rgba(1, 30, 66, .45), 0 4px 14px rgba(1, 30, 66, .5); }
.hero-slogan svg { position: absolute; left: 12%; bottom: -6px; width: 85%; height: 14px; overflow: visible; filter: drop-shadow(0 1px 1px rgba(1, 30, 66, .55)) drop-shadow(0 3px 6px rgba(1, 30, 66, .45)); }

/* Az űrlap kártya a hullám bal, alacsonyabb részére csúszik */
.page-narrow { max-width: 820px; position: relative; z-index: 3; margin-top: -3.5rem; }

@media (max-width: 1199.98px) {
  .hero-inner { padding-top: 3.6rem; }
}
/* ahol a kártya vízszintesen a szlogen alá érne, ne csússzon a hullámra */
@media (max-width: 1599.98px) {
  .page-narrow { margin-top: 1.75rem; }
}
@media (max-width: 991.98px) {
  .hero-photo { width: 56vw; }
  .hero-slogan { bottom: 18px; right: clamp(1rem, 4vw, 3.5rem); }
}
@media (max-width: 991.98px) {
  /* Tableten és mobilon a fotó felül sávként, alul fehérbe olvad */
  .hero-photo {
    position: relative; width: 100%; height: clamp(230px, 42vw, 380px); bottom: auto;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.35) 8%, rgba(0,0,0,.85) 18%, #000 24%), linear-gradient(to bottom, #000 75%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.35) 8%, rgba(0,0,0,.85) 18%, #000 24%), linear-gradient(to bottom, #000 75%, transparent 100%);
    mask-composite: intersect;
  }
  .hero-corner { height: 46px; }
  /* mobilon minden középre igazítva, egyforma oldalsó margóval */
  .hero-inner { padding: 0 1rem 5.5rem; margin-top: -2rem; text-align: center; }
  .hero-title { margin: .35rem auto .2rem; }
  .hero-title img { width: min(400px, 100%); }
  .hero-date { margin-left: 0; }
  .hero-info { justify-content: center; text-align: left; }
  .hero-date { --date-h: 3rem; }
  .hero-info-item { font-size: .95rem; }
  .hero-info-item .bi-clock { font-size: 1.9rem; }
  .hero-info-item .bi-people-fill { font-size: 2rem; }
  .hero-wave { height: 110px; }
  .hero-slogan { right: 1.75rem; bottom: -10px; }
  .page-narrow { margin-top: 2.25rem; }
}

/* A nyilvános oldal háttere a hullám alsó kék színe, így a fejléc folytatódik */
.public-body { background: #0157a4; }
.public-body .footer { color: rgba(255, 255, 255, .75); }
.public-body .footer a { color: #fff; }
@media (max-width: 399.98px) {
  .hero-info { gap: .6rem; flex-wrap: nowrap; }
  .hero-info-item { font-size: .8rem; gap: .4rem; }
  .hero-info-item .bi-clock { font-size: 1.55rem; }
  .hero-info-item .bi-people-fill { font-size: 1.7rem; }
  .hero-info-sep { height: 2.1rem; }
}

/* Floating label űrlap: a hosszú címke ne törjön, a letiltott 1. óra halványan */
.form-floating > label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* label második sora (pl. "nem kötelező"): csak üres, nem fókuszált mezőnél látszik */
.form-floating > label .ffl-hint { display: block; font-size: .75em; line-height: 1.2; color: var(--bs-secondary-color); }
.form-floating > .form-control:placeholder-shown:not(:focus) ~ label:has(.ffl-hint) { padding-top: .6rem; }
.form-floating > .form-control:focus ~ label .ffl-hint,
.form-floating > .form-control:not(:placeholder-shown) ~ label .ffl-hint { display: none; }
.form-floating > .form-control:disabled { background-color: #f1f5f9; }
.form-floating > .form-control:disabled ~ label::after { background-color: transparent; }

/* Óra-választók előtti ikon: kék körben az óra száma */
.period-group > .input-group-text, .icon-group > .input-group-text { background: #eef5fc; border-color: #dee2e6; padding: 0 .85rem; }
.period-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.1rem; height: 2.1rem; border-radius: 50%;
  background: linear-gradient(135deg, #0b6cc2, #034087); color: #fff;
  font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1rem;
  box-shadow: 0 2px 5px rgba(1, 60, 120, .3);
}
.period-icon-fixed { background: #adb5bd; box-shadow: none; }
.was-validated .period-group:has(:invalid) > .invalid-feedback { display: block; }
.was-validated .period-group:has(:invalid) > .input-group-text { border-color: var(--bs-form-invalid-border-color); }
/* Óráim: óránkénti kártya, bal oldalon az óra száma (a period-group színeivel) */
.period-card { flex-direction: row; overflow: hidden; }
.period-card > .period-side { flex: none; display: flex; align-items: center; padding: 0 .85rem; background: #eef5fc; border-right: var(--bs-border-width) solid #dee2e6; }
.period-card > .period-main { flex: 1; min-width: 0; }
.icon-group .period-icon i { font-size: 1rem; line-height: 1; }

/* "Floating" stílusú kapcsoló-doboz: ugyanakkora és ugyanolyan keretes, mint a floating mezők */
.form-floating-check {
  height: calc(3.5rem + calc(var(--bs-border-width) * 2));
  padding: .45rem .75rem .35rem;
  border: var(--bs-border-width) solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  background: var(--bs-body-bg);
  display: flex; flex-direction: column; justify-content: space-between;
  transition: border-color .15s, box-shadow .15s;
}
.form-floating-check:focus-within { border-color: #86b7fe; box-shadow: 0 0 0 .25rem rgba(13, 110, 253, .25); }
.form-floating-check .ffc-caption { font-size: .8rem; line-height: 1.1; color: rgba(var(--bs-body-color-rgb), .65); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.form-floating-check .form-check { min-height: 0; }
.form-floating-check .form-check-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.form-floating-check .form-check-input:focus { box-shadow: none; }
/* minden jelölő az app kék színében */
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }

/* Nagyobb, jól kattintható jelölők és kapcsolók */
.form-check-input { width: 1.35em; height: 1.35em; margin-top: .1em; cursor: pointer; }
.form-check { display: flex; align-items: center; gap: .55rem; padding-left: 0; }
.form-check .form-check-input { float: none; margin-left: 0; flex: none; }
.form-check-label { cursor: pointer; }
.form-floating-check .form-check-input { margin-top: 0; }
/* Rendezhető táblázat fejléc */
.sort-btn { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: inherit; white-space: nowrap; }
.sort-btn i { opacity: .35; font-size: .85em; }
.sort-btn.active i, .sort-btn:hover i { opacity: 1; }
.sort-btn.active { color: var(--brand); }

/* Táblázatok élő keresője a táblázat felett jobbra */
@media (min-width: 768px) { .table-search { width: 26rem; } }

/* Résztvevők száma: keskeny szám mező, mellette a magyarázat */
@media (min-width: 576px) { .attendee-count { width: 15rem; } }

/* Ágazat jelölők: többsoros felirat, a jelölő az első sorhoz igazodik */
.sector-check { align-items: flex-start; }
.sector-check .form-check-input { margin-top: .1em; }
/* táblázatok kijelölő négyzetei */
td > .form-check-input, th > .form-check-input { width: 1.3rem; height: 1.3rem; margin-top: 0; vertical-align: middle; }

/* Nyílt órák: minden órasáv táblázata azonos, rögzített oszlopbeosztású, így egymás alatt egybevágnak */
.lessons-table { table-layout: fixed; min-width: 860px; }
.lessons-table td, .lessons-table th { overflow-wrap: anywhere; }
.lessons-table .badge { white-space: normal; text-align: left; }
.lessons-table td:last-child { overflow-wrap: normal; }

/* Gomb-ikonok: nagyobbak, és több hely a felirattól */
.btn .bi { font-size: 1.2em; line-height: 1; vertical-align: -.15em; }
.btn .bi.me-1, .btn .bi.me-2 { margin-right: .5rem !important; }
.btn-sm .bi { font-size: 1.1em; }

/* Vezérlőpult – helykihasználtság diagram (egy árnyalatú skála: megjelent sötét, foglalt közép, szabad halvány) */
.viz-root {
  --viz-attended: #034087;
  --viz-booked: #2a78d6;
  --viz-free: #e3e8ef;
  --viz-surface: #fff;
  position: relative;
}
.viz-attended { background: var(--viz-attended); stroke: var(--viz-attended); }
.viz-booked { background: var(--viz-booked); stroke: var(--viz-booked); }
.viz-free { background: var(--viz-free); stroke: var(--viz-free); }
.viz-bar { display: flex; gap: 2px; height: 12px; border-radius: 4px; background: var(--viz-free); overflow: hidden; }
.viz-seg { display: block; height: 100%; }
.viz-seg:last-child { border-radius: 0 4px 4px 0; }
.viz-row { border-radius: 6px; padding: 2px 4px; margin: -2px -4px; cursor: default; outline: none; }
.viz-row:hover, .viz-row:focus-visible { background: #f3f6fa; }
.viz-donut-wrap { position: relative; max-width: 210px; margin: 0 auto; }
.viz-donut { width: 100%; display: block; }
.viz-donut circle { fill: none; stroke-width: 5; }
.viz-donut-track { stroke: var(--viz-free); }
.viz-donut-seg { background: none !important; transition: stroke-width .15s; cursor: default; }
.viz-donut-seg:hover { stroke-width: 6; }
.viz-donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.viz-hero { font-size: 2.6rem; font-weight: 700; line-height: 1; color: var(--brand); font-variant-numeric: tabular-nums; }
.viz-hero-unit { font-size: 1.2rem; margin-left: .1rem; }
.viz-legend li { display: flex; align-items: center; gap: .5rem; padding: .15rem 0; }
.viz-key { display: inline-block; width: .8rem; height: .8rem; border-radius: 3px; flex: none; margin-right: .35rem; vertical-align: -1px; }
.viz-legend .viz-key { margin-right: 0; }
.viz-tip { position: absolute; z-index: 10; min-width: 12rem; padding: .5rem .65rem; font-size: .8rem; line-height: 1.45;
  background: var(--viz-surface); border: 1px solid #dee2e6; border-radius: 6px; box-shadow: 0 6px 18px rgba(0, 0, 0, .12); pointer-events: none; }
.nav-pills-sm .nav-link { padding: .25rem .7rem; font-size: .85rem; }
.nav-pills .nav-link.active { background: var(--brand); }

/* Húzással rendezhető listák (SortableJS) */
.drag-handle { border: 0; background: none; padding: .5rem .25rem; color: #8a96a3; font-size: 1.35rem; line-height: 1; cursor: grab; touch-action: none; border-radius: 6px; }
.drag-handle:hover, .drag-handle:focus-visible { color: var(--brand); background: #eef5fc; }
.drag-handle:active { cursor: grabbing; }
.sortable-ghost { opacity: .4; }
.sortable-chosen { box-shadow: 0 6px 18px rgba(0, 0, 0, .12); }
#orderSaved { transition: opacity .3s; }
/* Megtekintő / szerkesztő sor váltás (pl. Ágazatok) */
.sortable-item:not(.is-editing) .edit-only, .sortable-item.is-editing .view-only { display: none !important; }

/* Admin táblázatok egységes megjelenése (Beállítások → Táblázatok megjelenése; a <body> osztályai) */
.admin-body { --tbl-hover: #e8f0fa; --tbl-stripe: #f6f8fb; }
/* sűrűség: kompakt / normál / szellős (felülírja a table-sm-et is, hogy minden táblázat egyforma legyen) */
.tbl-density-compact .table > :not(caption) > * > * { padding: .25rem .5rem; }
.tbl-density-normal .table > :not(caption) > * > * { padding: .5rem .6rem; }
.tbl-density-relaxed .table > :not(caption) > * > * { padding: .85rem .75rem; }
/* páros-páratlan sorok: csak a látható sorokat számolja (lapozás / keresés után is váltakozik) */
.tbl-striped .table > tbody > tr:nth-child(even of :not(.d-none)) > * { --bs-table-bg-type: var(--tbl-stripe); }
/* oszlopok szegélye */
.tbl-colborders .table > :not(caption) > * > * + * { border-left: var(--bs-border-width) solid var(--bs-border-color); }
/* hover szín minden admin táblázatban */
.admin-body .table > tbody > tr:not(.dt-empty):hover > * { --bs-table-bg-state: var(--tbl-hover); }

/* ===== Statisztika nyomtatvány (A4, egy oldal) ===== */
@page stats { size: A4 portrait; margin: 10mm; }
.stats-print-body { background: #e9edf2; font-size: 10.5pt; color: #1d2733; }
.sp-toolbar { position: sticky; top: 0; z-index: 5; display: flex; justify-content: center; gap: .5rem; padding: .75rem; background: #e9edf2; }
.sp-sheet { page: stats; width: 190mm; min-height: 277mm; margin: 0 auto 2rem; padding: 0; background: #fff; box-shadow: 0 4px 24px rgba(0, 0, 0, .12); display: flex; flex-direction: column; }
.sp-header { display: flex; align-items: center; gap: 5mm; padding: 4.5mm 7mm; background: linear-gradient(100deg, #034087 0%, #0157a4 70%, #038cdc 100%); color: #fff; }
.sp-logo { height: 11mm; width: auto; flex: none; }
.sp-head-text { flex: 1; border-left: 1px solid rgba(255, 255, 255, .4); padding-left: 5mm; }
.sp-school { font-size: 9pt; opacity: .85; letter-spacing: .02em; }
.sp-title { font-size: 16pt; font-weight: 700; line-height: 1.2; }
.sp-sub { font-size: 9.5pt; opacity: .9; }
.sp-printed { font-size: 8pt; text-align: right; opacity: .85; flex: none; }
.sp-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3mm; padding: 4mm 7mm 0; }
.sp-kpi { border: 1px solid #dfe5ec; border-radius: 2.5mm; padding: 2.5mm 3mm; }
.sp-kpi-value { font-size: 18pt; font-weight: 700; line-height: 1; color: var(--brand); font-variant-numeric: tabular-nums; }
.sp-kpi-accent .sp-kpi-value { color: #198754; }
.sp-kpi-label { font-size: 8.5pt; color: #5b6673; margin-top: 1mm; }
.sp-kpi-sub { font-size: 7.5pt; color: #8a94a0; }
.sp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3.5mm; padding: 3.5mm 7mm; flex: 1; align-content: start; }
.sp-box { border: 1px solid #dfe5ec; border-radius: 2.5mm; padding: 3mm 3.5mm; break-inside: avoid; min-width: 0; }
.sp-hint { float: right; font-size: 7pt; font-weight: 400; color: #8a94a0; margin-top: .9mm; }
/* tömör bontás sor: név | sáv | számok */
.sp-crow { display: grid; grid-template-columns: minmax(0, 50%) minmax(0, 1fr) auto; align-items: center; gap: 2.5mm; font-size: 8pt; padding: .7mm 0; }
.sp-cname { font-weight: 600; line-height: 1.15; overflow-wrap: anywhere; }
.sp-cnums { white-space: nowrap; color: #5b6673; font-variant-numeric: tabular-nums; min-width: 14mm; text-align: right; }
.sp-cnums b { color: #1d2733; }
.sp-crow .sp-bar { height: 2.4mm; }
.sp-wide { grid-column: 1 / -1; }
.sp-cols { columns: 2; column-gap: 8mm; }
.sp-cols .sp-bar-row { break-inside: avoid; }
.sp-cols .sp-bar-row:last-child { margin-bottom: 0; }
.sp-h { font-size: 10.5pt; font-weight: 700; color: var(--brand); margin: 0 0 2.5mm; }
.sp-muted { color: #8a94a0; font-weight: 400; }
.sp-bar-row { margin-bottom: 2.2mm; }
.sp-bar-row:last-child { margin-bottom: 0; }
.sp-bar-label { display: flex; justify-content: space-between; gap: 2mm; font-size: 8.5pt; margin-bottom: .6mm; min-width: 0; }
.sp-bar-name { font-weight: 600; min-width: 0; }
.sp-bar-label { align-items: flex-end; }
.sp-bar-nums { white-space: nowrap; color: #5b6673; font-variant-numeric: tabular-nums; }
.sp-bar-nums b { color: #1d2733; }
.sp-bar { height: 2.6mm; border-radius: 1mm; }
.sp-progress { height: 2.6mm; }
.sp-donut-row { display: flex; align-items: center; gap: 4mm; min-width: 0; }
.sp-donut { position: relative; width: 30mm; flex: none; }
.sp-donut svg { width: 100%; display: block; }
.sp-donut circle { fill: none; stroke-width: 5; }
.sp-donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.sp-donut-center b { font-size: 15pt; color: var(--brand); }
.sp-donut-center span { font-size: 7.5pt; color: #5b6673; }
.sp-legend { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 0; font-size: 8.5pt; }
.sp-legend li { display: flex; align-items: center; gap: 1.5mm; padding: .6mm 0; }
.sp-legend li b { margin-left: auto; font-variant-numeric: tabular-nums; }
.sp-legend .viz-key { margin-right: 0; }
.sp-legend-total { border-top: 1px solid #dfe5ec; margin-top: 1mm; padding-top: 1.2mm !important; }
.sp-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 1mm 5mm; padding: 3mm 7mm 5mm; font-size: 7.5pt; color: #6b7682; border-top: 1px solid #eef1f5; }
.sp-footer .viz-key { width: .65rem; height: .65rem; }
@media print {
  .stats-print-body { background: #fff !important; }
  .sp-sheet { width: auto; min-height: 0; margin: 0; box-shadow: none; }
}

/* Adatkezelési tájékoztató: szerkesztő (Beállítások) és megjelenítés (regisztrációs oldal felugró ablaka) */
.privacy-editor { min-height: 260px; font-size: 1rem; }
.privacy-editor .ql-editor { min-height: 260px; max-height: 60vh; overflow-y: auto; font-family: inherit; font-size: 1rem; line-height: 1.5; }
.ql-toolbar.ql-snow, .privacy-editor.ql-container { border-color: var(--bs-border-color); }
.ql-toolbar.ql-snow { border-radius: var(--bs-border-radius) var(--bs-border-radius) 0 0; }
.privacy-editor.ql-container { border-radius: 0 0 var(--bs-border-radius) var(--bs-border-radius); }
.privacy-content h2 { font-size: 1.2rem; color: var(--brand); margin-top: 1rem; }
.privacy-content h3 { font-size: 1.05rem; margin-top: .85rem; }
.privacy-content :first-child { margin-top: 0; }
.privacy-content .ql-align-center { text-align: center; }
.privacy-content .ql-align-right { text-align: right; }
.privacy-content .ql-align-justify { text-align: justify; }
.privacy-content blockquote { border-left: 4px solid #dee2e6; padding-left: .75rem; color: #555; }

/* Beállítások oldal: rögzített tartalomjegyzék + szakaszok */
@media (min-width: 992px) { .settings-nav { position: sticky; top: 5rem; } }
.settings-nav .list-group-item { border-left: 3px solid transparent; }
.settings-nav .list-group-item.active { background: #eef5fc; color: var(--brand); border-color: var(--bs-list-group-border-color); border-left-color: var(--brand); font-weight: 600; }
.settings-section { scroll-margin-top: 5rem; }
.settings-section > .card-header { padding-top: .85rem; padding-bottom: .85rem; }
.settings-label { font-size: .85rem; font-weight: 600; color: #5b6673; text-transform: uppercase; letter-spacing: .03em; margin-bottom: .5rem; }
.settings-hero-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* automatikusan eltűnő üzenetek: lassabb elhalványulás */
.alert-autohide.fade { transition: opacity .6s ease; }

/* megerősítő ablak (public/js/confirm.js) */
.confirm-modal .modal-content { border: 0; border-radius: 1rem; box-shadow: 0 1rem 3rem rgba(1, 30, 66, .25); }
.confirm-icon { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.9rem; }
.confirm-icon.is-danger { background: rgba(var(--bs-danger-rgb), .12); color: var(--bs-danger); }
.confirm-icon.is-info { background: rgba(3, 64, 135, .1); color: var(--brand); }

/* Nyílt nap évek: ikon a sorok elején (az aktív év kiemelve) */
.year-icon { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; background: rgba(3, 64, 135, .08); color: var(--brand); }
.year-icon.is-active { background: var(--brand); color: #fff; }
/* Felhasználók: ugyanez az ikon (admin = kitöltött), inaktív felhasználónál szürke */
.year-icon.is-muted { background: rgba(var(--bs-secondary-rgb), .15); color: var(--bs-secondary-color); }

/* sorkizárt szöveg (Bootstrap 5-ben nincs ilyen segédosztály) */
.text-justify { text-align: justify; hyphens: auto; }

/* Tantárgyak: szakmák jelölői (public/js/subject-professions.js) */
.subject-professions, .teacher-subjects { padding: .45rem .75rem .5rem; border: var(--bs-border-width) solid var(--bs-border-color); border-radius: var(--bs-border-radius); background: var(--bs-body-bg); }
.subject-professions .ffc-caption, .teacher-subjects .ffc-caption { font-size: .8rem; line-height: 1.1; color: rgba(var(--bs-body-color-rgb), .65); }
/* Tanárok: tantárgyak jelölői egymás alatt, görgethető listában */
.teacher-subjects .ts-list { display: flex; flex-direction: column; row-gap: .15rem; max-height: 14rem; overflow-y: auto; }
.subject-meta { display: flex; flex-wrap: wrap; column-gap: 1rem; row-gap: .1rem; font-size: .875rem; color: var(--bs-secondary-color); }
.subject-meta .bi { margin-right: .3rem; opacity: .8; }
.profession-pill { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .55rem; border-radius: 50rem; font-size: .8rem; line-height: 1.3; background: rgba(3, 64, 135, .08); color: var(--brand); }

/* kijelöltek törlése (sortable-list.js): a "mind" jelölő a kereső előtt */
/* ugyanolyan halvány doboz, mint a kereső ikonjáé; magassága a kereső mezőé */
.bulk-all { display: flex; align-items: center; align-self: stretch; padding: 0 .85rem; background: #eef5fc; border: var(--bs-border-width) solid #dee2e6; border-radius: var(--bs-border-radius); }
.bulk-check { margin: 0; }

/* Import ablak konzolja (public/js/import-dialog.js) */
.import-console { height: 16rem; overflow-y: auto; padding: .75rem 1rem; border-radius: var(--bs-border-radius); background: #0b0c0f; color: #d6d9de; font-family: var(--bs-font-monospace); font-size: .82rem; line-height: 1.5; }
.import-console .import-empty { text-align: center; font-family: var(--bs-body-font-family); font-size: 1rem; color: #c3c7cd; }
.import-console .log-ok { color: #6fdc8c; }
.import-console .log-update { color: #78a9ff; }
.import-console .log-skip { color: #8d939b; }
.import-console .log-warn { color: #f1c21b; }
.import-console .log-error { color: #ff8389; }
.import-console .log-info { color: #d6d9de; }

/* Óratípusok: szín (órarend nyomtatvány) */
.type-swatch { display: inline-block; width: .9rem; height: .9rem; border-radius: .25rem; border: 1px solid rgba(0, 0, 0, .15); margin-right: .45rem; vertical-align: -.1rem; }
.type-color-input { width: 3.25rem; height: 1.9rem; padding: .15rem; }

/* ===== Órarend nyomtatvány (fekvő A4) – a fejléc a statisztika nyomtatványé (sp-*) ===== */
@page timetable { size: A4 landscape; margin: 8mm; }
.tt-sheet { page: timetable; width: 281mm; min-height: 0; }
.tt-body { padding: 4mm 6mm 5mm; }
.tt-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 9pt; }
.tt-table th, .tt-table td { border: 1px solid #c9d2dc; padding: 1.6mm 2mm; vertical-align: top; }
.tt-table thead th { background: #eef3f9; color: var(--brand); text-align: center; font-weight: 700; }
.tt-table thead th .tt-time { display: block; font-weight: 400; font-size: 8pt; color: #5b6673; }
.tt-table thead th.tt-room-col { width: 30mm; text-align: left; }
.tt-table tbody th { background: #f7f9fb; text-align: left; font-weight: 700; }
.tt-table tbody th .tt-floor { display: block; font-weight: 400; font-size: 8pt; color: #5b6673; }
.tt-table tr { break-inside: avoid; }
.tt-lesson + .tt-lesson { margin-top: 1.5mm; padding-top: 1.5mm; border-top: 1px dashed #c9d2dc; }
.tt-subject { font-weight: 700; line-height: 1.2; }
.tt-meta { color: #3a4552; line-height: 1.3; }
.tt-meta .bi { color: #8a94a0; margin-right: 1mm; }
.tt-empty { color: #b5bdc6; text-align: center; }
.tt-legend { display: flex; flex-wrap: wrap; gap: 1.5mm 5mm; margin-top: 3mm; font-size: 8pt; color: #3a4552; }
.tt-legend .type-swatch { width: 3.2mm; height: 3.2mm; margin-right: 1.2mm; vertical-align: -.5mm; }
@media print {
  .tt-sheet { width: auto; }
  .tt-table th, .tt-table td, .tt-legend .type-swatch { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
