:root {
    --bg: #f4f6f9;
    --card: #ffffff;
    --ink: #1f2733;
    --muted: #6b7684;
    --line: #dde3ea;
    /* Markaszin (fejlec, gombok, linkek). A valaszthato stilusok ezt az 5
       valtozot irjak felul - lasd theme_list() a store.php-ban. */
    --brand: #008542;
    --brand-dark: #006733;
    --brand-soft: #eef7f1;      /* halvany hatter */
    --brand-line: #cfe8d9;      /* halvany keret */
    --brand-pale: #bfe4cf;      /* vilagos szoveg a fejlecben */
    --ok-bg: #e6f5ea; --ok-ink: #1e7a37;
    --err-bg: #fdeaea; --err-ink: #b12a2a;
    --danger: #c0392b;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg); color: var(--ink); line-height: 1.5;
}
a { color: var(--brand); }

.topbar {
    display: flex; align-items: center; gap: 20px;
    background: var(--brand); color: #fff; padding: 10px 18px; flex-wrap: wrap;
    /* TELEFONON: a sav soha ne logjon ki oldalra. A hatter csak a kepernyo
       szeleig er, ezert a kilogo reszen a feher szoveg lathatatlan lenne. */
    box-sizing: border-box; max-width: 100%; overflow-wrap: anywhere;
    /* ha a lap TARTALMA (pl. egy szeles tablazat) miatt megis van oldalra
       gorgetes, a sav a kepernyo bal szelehez ragad -> a szines hatter es a
       feher felirat vegig egyutt mozog, nem marad feher savon feher szoveg */
    position: sticky; left: 0; z-index: 5;
}
.brand { font-weight: 700; font-size: 18px; }
/* a menu TORDELHETO: keskeny kepernyon tobb sorba kerul, nem logik ki jobbra */
.mainnav { display: flex; gap: 14px; flex-wrap: wrap; row-gap: 6px; min-width: 0; }
.mainnav a { color: #fff; text-decoration: none; opacity: .9; }
.mainnav a:hover { opacity: 1; text-decoration: underline; }
/* fuggo cserekerelem jelzese a fejlecben */
.mainnav a.has-alert { opacity: 1; font-weight: 700; }
.navbadge {
    display: inline-block; margin-left: 5px; padding: 0 7px;
    background: #e8492b; color: #fff; border-radius: 10px;
    font-size: 12px; font-weight: 700; line-height: 18px; white-space: nowrap;
    box-shadow: 0 0 0 0 rgba(232, 73, 43, .7); animation: badgepulse 2s infinite;
}
@keyframes badgepulse {
    0%   { box-shadow: 0 0 0 0 rgba(255, 255, 255, .6); }
    70%  { box-shadow: 0 0 0 7px rgba(255, 255, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}
@media (prefers-reduced-motion: reduce) { .navbadge { animation: none; } }
/* higgadt szamlalo a fejlecben (nyitott hibajegyek) - nem villog */
.navcount {
    display: inline-block; margin-left: 5px; padding: 0 6px;
    background: rgba(255, 255, 255, .22); color: #fff; border-radius: 10px;
    font-size: 11px; font-weight: 700; line-height: 17px;
}

.userbox { margin-left: auto; font-size: 14px; }
.userbox .role { color: var(--brand-pale); }
.userbox .mebox { color: #fff; text-decoration: none; border-bottom: 1px dotted rgba(255,255,255,.55); }
.userbox .mebox:hover { border-bottom-color: #fff; }

/* SMTP kuldesi naplo */
.maillog { background: #1f2733; color: #d7e2ee; padding: 10px 12px; border-radius: 6px;
    font-size: 12px; line-height: 1.45; overflow-x: auto; max-height: 340px; }

/* beosztasi igenyek jelentese */
.prfl { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; font-weight: 700; }
.prfl-on    { background: #e6f5ea; color: #1e7a37; }
.prfl-day   { background: #d6e8ff; color: #1f5fa8; }
.prfl-night { background: #e6d6ff; color: #5b3a9e; }
.prfl-noday   { background: #fde8e8; color: #b12a2a; }
.prfl-nonight { background: #fde8e8; color: #b12a2a; }
.prfl-pend  { background: #fff4d6; color: #8a4b00; text-decoration: none; white-space: nowrap; }
.prfl-pend:hover { background: #ffe9b0; }
.swst-pending { background: #fff4d6; color: #8a4b00; }

/* Felhasznalok: szerepkor-fulek */
.rtabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0 4px;
    border-bottom: 2px solid var(--line); padding-bottom: 0; }
.rtab { display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
    background: transparent; border: 1px solid transparent; border-bottom: none;
    border-radius: 8px 8px 0 0; padding: 8px 14px; font-size: 14px; color: var(--muted);
    margin-bottom: -2px; }
.rtab:hover { background: #eef3f0; color: var(--ink); }
.rtab.active { background: #fff; border-color: var(--line); border-bottom: 2px solid #fff;
    color: var(--brand); font-weight: 700; }
.rtab-n { display: inline-block; min-width: 20px; text-align: center; padding: 0 6px;
    border-radius: 10px; background: #e6ebe8; color: var(--muted); font-size: 12px; font-weight: 700; }
.rtab.active .rtab-n { background: var(--brand); color: #fff; }

/* szerepkor-cimke a nev mellett */
.rolechip { display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: 11px;
    font-weight: 700; vertical-align: 1px; }
.rolechip-admin  { background: #fde8e8; color: #b12a2a; }
.rolechip-editor { background: var(--brand-soft); color: var(--brand-dark); }
.rolechip-worker { background: #e6f5ea; color: #1e7a37; }
.rolechip-viewer { background: #eceff3; color: var(--muted); }

/* felhasznaloi ertesites-sor a Felhasznalok tablaban */
.tbl tr.notifyrow td { border-bottom: 1px solid var(--line); background: #fbfcfd; padding-top: 2px; }
/* csoport-fejlec sor a tablazatokban (pl. Funkciok oldal) */
.tbl tr.grouphead td { background: #e7edea; font-weight: 600; text-align: left; padding: 5px 10px; }
.notifyform { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; }
.notifyform .nlabel { color: var(--muted); font-size: 13px; }
.notifyform .chk { margin: 0; font-size: 13px; }
.notifyform input[type=email] { padding: 4px 8px; font-size: 13px; }
.userbox .logout { color: #fff; margin-left: 10px; text-decoration: underline; }

.container { max-width: 1000px; margin: 24px auto; padding: 0 16px; }
.container.container-wide { max-width: 100%; }

.card {
    background: var(--card); border: 1px solid var(--line); border-radius: 10px;
    padding: 22px 24px; box-shadow: 0 1px 3px rgba(0,0,0,.05); margin-bottom: 20px;
}
.card-narrow { max-width: 400px; margin-left: auto; margin-right: auto; }
h1 { margin-top: 0; font-size: 22px; }
h2 { font-size: 17px; margin-top: 26px; }

.form { display: flex; flex-direction: column; gap: 12px; max-width: 360px; }
.form-row { flex-direction: row; flex-wrap: wrap; align-items: flex-end; max-width: none; }
.form label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--muted); }
input, select, textarea {
    padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px;
    font-size: 14px; background: #fff; color: var(--ink);
}
textarea { font-family: inherit; resize: vertical; min-height: 60px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; }

.btn {
    background: var(--brand); color: #fff; border: none; border-radius: 6px;
    padding: 9px 16px; font-size: 14px; cursor: pointer; text-decoration: none;
    display: inline-block;
}
.btn:hover { background: var(--brand-dark); }
.btn-sm { padding: 5px 9px; font-size: 13px; }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #96271b; }
/* masodlagos gomb (pl. Telepules kereso) */
.btn-alt { background: #fff; color: var(--brand); border: 1px solid var(--brand); }
.btn-alt:hover { background: var(--brand); color: #fff; }

.tbl { width: 100%; border-collapse: collapse; margin-top: 8px; }
.tbl th, .tbl td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 14px; }
.tbl th { color: var(--muted); font-weight: 600; }
.inline { display: inline; }
.ops { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ops input[type=password] { width: 120px; }

/* --- "Vihet muszakot?" a dolgozoi adatlap Jogosultsagok blokkjaban -------- */
.qshift { border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 10px; }

/* --- Lapon beluli fulek (Beallitasok, Attekintes) ------------------------- */
.sectabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.sectab { display: inline-block; padding: 7px 14px; border-radius: 8px; font-size: 14px;
          text-decoration: none; background: var(--brand-soft); color: var(--brand-dark);
          border: 1px solid var(--brand-line); }
.sectab:hover { background: var(--brand-pale); }
.sectab.on { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 600; }
@media (max-width: 600px) { .sectab { padding: 6px 10px; font-size: 13px; } }

/* --- Honap-lapozo: elozo / kovetkezo honap egy kattintassal --------------- */
.mnav { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0 0 10px; }
.mnav .btn { line-height: 1; min-width: 34px; text-align: center; }
.mnav-lbl { font-size: 16px; font-weight: 700; color: var(--ink); }
/* a lista/ablak szelen: a gomb a helyen marad, de nem kattinthato */
.mnav-off { background: var(--brand-soft); color: var(--muted); cursor: default;
            pointer-events: none; opacity: .65; }

.flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; font-size: 14px; }
.flash-ok { background: var(--ok-bg); color: var(--ok-ink); }
.flash-error { background: var(--err-bg); color: var(--err-ink); }
.ok { color: var(--ok-ink); }

.todo { color: var(--muted); }
.hint { color: var(--muted); font-size: 13px; margin-top: 16px; }

.tbl-wrap { overflow-x: auto; }
.tbl td.small, .tbl th.small, .small { font-size: 13px; }
.muted-inline { color: var(--muted); }

.fs { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin: 4px 0; }
.fs legend { padding: 0 6px; color: var(--muted); font-size: 13px; }
.chk { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); margin: 4px 0; }
/* nagyobb specificitas, hogy legyozze a .form label { flex-direction: column } szabalyt */
.form .chk, .fs .chk, .fs label { flex-direction: row; align-items: center; }
.chk input { width: auto; margin: 0; }
.chk-inline, .form .chk-inline { display: inline-flex; margin-right: 14px; }
.area-group { margin: 8px 0; }
.area-title { font-weight: 600; margin-right: 10px; }

.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grid3 label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 700px) { .grid3, .grid2 { grid-template-columns: 1fr; } }

.reqbox { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; }
.reqbox h3 { margin: 4px 0 8px; font-size: 15px; }
.slotlist { list-style: none; padding: 0; margin: 0 0 10px; }
.slotlist li { display: flex; align-items: center; gap: 6px; padding: 3px 0; font-size: 14px; border-bottom: 1px dashed var(--line); }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 2px 8px; margin: 2px 2px; font-size: 13px; }
.linkbtn { background: none; border: none; color: var(--danger); cursor: pointer; font-size: 14px; padding: 0 2px; line-height: 1; }
.linkbtn:hover { color: #96271b; }
.inline-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.inline-form input, .inline-form select { padding: 5px 8px; font-size: 13px; }

.warnlist { color: #8a4b00; font-size: 14px; }
.warnlist li { padding: 2px 0; }

.matrix { border-collapse: collapse; font-size: 13px; }
.matrix th, .matrix td { border: 1px solid var(--line); padding: 3px 6px; text-align: center; min-width: 26px; }
.matrix thead th { background: #eef3f0; color: var(--ink); font-weight: 600; }
.matrix .wd { font-size: 11px; color: var(--muted); font-weight: 400; }
.matrix .rowhead { text-align: left; white-space: nowrap; background: #f7f9fb; font-weight: 600; position: sticky; left: 0; }
.matrix td.special, .matrix th.special { background: #fff7cc; }
.matrix td.na { color: #c9d2dc; }
.matrix td.empty { color: #fff; background: var(--danger); font-weight: 700; }
.matrix td.editc { padding: 1px; }
.matrix select.cellsel { border: 1px solid transparent; background: transparent; font-size: 13px; padding: 2px 1px; width: 100%; min-width: 44px; cursor: pointer; -webkit-appearance: none; appearance: none; text-align: center; text-align-last: center; border-radius: 3px; }
.matrix select.cellsel:hover { border-color: var(--line); background: #fff; }
.matrix select.cellsel:focus { outline: none; border-color: var(--brand); background: #fff; }
.matrix select.cellsel.cell-empty { background: #ffe3e3; color: var(--danger); font-weight: 700; }
.matrix select.cellsel.cell-add { color: #9aa7b4; }
.matrix select.cellsel.cell-add:hover { color: var(--brand); background: var(--brand-soft); }
.matrix select.cellsel.saved-flash { background: #d6f5df; }

.flash-warn { background: #fff4d6; color: #8a4b00; }
.flash-warn .warnlist { margin: 6px 0 0; }
/* UTKOZES-SAV: ugyanaz a KEK, mint az utkozo cella (user keres: "ahol irja,
   hogy utkozes van, az is legyen olyan szinu, mint a teglalap"). Igy a sav es a
   tablazatban a jelolt cella egy szempillantas alatt osszekapcsolhato. */
.flash-conf { background: #d6e8ff; color: #14507f; }
/* A lenyithato "Mutasd, mi utkozik" lista is a sav KEK hatteren all, es a
   szovege is a sav szinet koveti (user keres: "a mutasd mi utkozik hatteret
   szinezd olyannal mint a cellajat kekre"). Kimondjuk, hogy egy esetleges
   kulso .flash / .theme-dark szabaly se irja felul. */
.flash-conf .conflist,
.flash-conf .conflist ul,
.flash-conf .conflist li { background: #d6e8ff; color: #14507f; }
.flash-conf .conflist > summary { color: #14507f; }
.flash-conf .conflist .cfmsg { color: #14507f; opacity: .9; }
.flash-conf * { color: #14507f; }

.example { background: var(--brand-soft); border: 1px solid var(--brand-line); border-left: 4px solid var(--brand);
    border-radius: 8px; padding: 12px 16px; margin: 14px 0; font-size: 14px; }
.example ol { margin: 8px 0; padding-left: 22px; }
.example li { margin: 3px 0; }
.example p { margin: 6px 0; }

.reqtable { max-width: 520px; }
.reqtable td, .reqtable th { padding: 5px 10px; }
.reqtable tr.special-row td { background: #fff7cc; }
.reqsel { min-width: 130px; }

/* matrix blokk-fejlec (1./2. muszak) */
.matrix tr.blockhead td { background: #e7edea; font-weight: 600; text-align: left; padding: 4px 8px; }
/* rogzitett (kezzel modositott) cella jelzes */
.matrix select.cellsel.cell-locked { border-color: #4ea87a; box-shadow: inset 0 0 0 2px var(--brand-line); }
/* URES HONAP - kezzel beirt FIX ember (genfix.php), es az abbol generalt
   elonezetben ami a helyen maradt. TURKIZ, mert a zold a kiemeles, a kek az
   utkozes, a magenta a kezi elteres - ez egyikkel sem keverheto. */
.matrix select.cellsel.cell-fixed { background: #d3eff0; color: #0b5d5e; font-weight: 700;
                                    box-shadow: inset 0 0 0 2px #1a9c9e; }
.matrix td.hl select.cellsel.cell-fixed { background: transparent; }
.fixed-key { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; border-radius: 2px;
             background: #d3eff0; box-shadow: inset 0 0 0 2px #1a9c9e; }

/* szabadsagkeres-attekinto jelolesei (a special utan, hogy nyerjenek) */
/* kiemeles: a kivalasztott dolgozo napjai */
.matrix td.hl { background: #6fcf97 !important; box-shadow: inset 0 0 0 2px #219653; }
/* Az ELCSERELT (a legenerlttol elterő, kezzel atirt) cella: VASTAG MAGENTA
   KERET - user keres. 2px helyett 3px, hogy jol latszodjon. */
.matrix td.gdiff { box-shadow: inset 0 0 0 3px #d6009a; }
.matrix td.gdiff.hl { box-shadow: inset 0 0 0 2px #219653, inset 0 0 0 5px #d6009a; }
.gdiff-key { display: inline-block; width: 14px; height: 14px; vertical-align: -2px;
             border: 3px solid #d6009a; border-radius: 2px; }
/* UTKOZO cella: KEK SZINEZES - user keres ("kek szinezessel mutasd az
   utkozest"). A BETOLTETLEN hely (.empty) piros, a szabadsag sarga, ezert a kek
   semmi masra nem hasonlit a tablazatban.
   !important kell, mert a kiemeles (.hl), a csere (.sw) es az oktatas (.ev)
   sajat hatteret ad, es az utkozes MINDEGYIKNEL fontosabb: az a HIBA.
   Ha a cella egyszerre utkozo ES elcserelt, a kek hatteren ott a vastag magenta
   keret - a ket jelzes igy egyszerre, keveredes nelkul olvashato. */
.matrix td.conflict { background: #d6e8ff !important; color: #14507f !important; font-weight: 700; }
.matrix td.conflict select.cellsel { background: transparent; color: #14507f; font-weight: 700; }
.matrix td.conflict select.cellsel:hover,
.matrix td.conflict select.cellsel:focus { background: rgba(255, 255, 255, .5); color: #14507f; }
.matrix td.conflict.gdiff { box-shadow: inset 0 0 0 3px #d6009a; }
.matrix td.conflict.hl { box-shadow: inset 0 0 0 3px #219653; }
.conflict-key { display: inline-block; width: 14px; height: 14px; vertical-align: -2px;
                background: #d6e8ff; border: 1px solid #8fb5e0; border-radius: 2px; }
/* Lenyithato utkozes-lista (user keres: "azt lehessen lenyitni es irja ki, mi utkozik").
   Alapbol zarva: a szam kell elsore, a 10-20 tetelu lista eltolna a tablazatot. */
.conflist { margin-top: 6px; }
.conflist > summary { cursor: pointer; font-weight: 600; display: inline-block;
                      padding: 2px 0; user-select: none; }
.conflist > summary:hover { text-decoration: underline; }
.conflist ul { margin: 6px 0 0; padding-left: 18px; max-height: 300px; overflow-y: auto; }
.conflist li { margin-bottom: 6px; line-height: 1.35; }
.conflist .cfmsg { font-size: 13px; opacity: .85; }
/* SZABADSAG a kiemelt dolgozonal: PIROS nap-fejlec (user keres). A .special
   (hetvege/unnep sarga) utan all, hogy azon is atlassek. */
.matrix th.daycol.hlvac, .matrix th.daycol.special.hlvac {
    background: #d92b2b; color: #fff; }
.matrix th.daycol.hlvac .wd, .matrix th.daycol.hlvac .dtbadge { color: #ffe3e3; }
.hlvacnote { font-size: 13px; color: #b42318; font-weight: 600; }
.matrix td.hl select.cellsel { font-weight: 700; }
.toolrow { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.hlpick { font-size: 14px; }
.hlpick select { padding: 5px 8px; margin-left: 4px; }

.matrix td.mk-vac { background: #fff3b0; font-weight: 700; }
.matrix td.mk-off { background: #ffdca8; font-weight: 700; }
.matrix td.mk-day { background: #d6e8ff; font-weight: 700; }
.matrix td.mk-night { background: #e6d6ff; font-weight: 700; }
.matrix td.mk-sick { background: #ffd6d6; font-weight: 700; }
/* VISSZAVONT szabadsag/szabadnap: mas szin + athuzas, a buborek mondja meg, miert */
.matrix td.mk-rev {
    background: #e7e2f0; color: #6b5b86; font-weight: 700;
    text-decoration: line-through; text-decoration-thickness: 2px;
}
.lg { display: inline-block; padding: 1px 6px; border-radius: 3px; margin: 0 2px; font-weight: 700; }
/* jelmagyarazat-chipek (a matrixon kivul is szinesek legyenek) */
.lg.mk-vac   { background: #fff3b0; }
.lg.mk-off   { background: #ffdca8; }
.lg.mk-day   { background: #d6e8ff; }
.lg.mk-night { background: #e6d6ff; }
.lg.mk-sick  { background: #ffd6d6; }
.lg.mk-rev   { background: #e7e2f0; color: #6b5b86; text-decoration: line-through; }

/* szabadsagos attekinto: KOMPAKT, hogy az egesz honap kiferjen gorgetes nelkul */
.matrix.compact { width: 100%; table-layout: fixed; }
.matrix.compact th, .matrix.compact td {
    padding: 2px 1px; min-width: 0; font-size: 12px; line-height: 1.3;
    overflow: hidden; text-overflow: ellipsis;
}
.matrix.compact .wd { font-size: 10px; }
.matrix.compact .rowhead {
    width: 168px; max-width: 168px; white-space: nowrap; padding-right: 8px;
    text-align: left; font-size: 12px;
}
@media (max-width: 1200px) { .matrix.compact .rowhead { width: 120px; max-width: 120px; } }
@media (max-width: 900px)  {
    .matrix.compact { table-layout: auto; }
    .matrix.compact th, .matrix.compact td { min-width: 22px; }
}

/* szerkesztesi zar jelzese */
.lockmine { color: var(--ok-ink); font-weight: 600; }
#lockbox .idle { font-weight: 600; }

/* szabadsagos attekinto: kattinthato cellak + napi letszam sor */
.matrix td.rq-edit { cursor: pointer; }
.matrix td.rq-edit:hover { outline: 2px solid var(--brand); outline-offset: -2px; }
/* kiadott honap: a meglevo szabadsagot csak a beoszto veheti le (buborekban az oka) */
.matrix td.rq-lock { cursor: not-allowed; }
.reqlock { font-weight: 600; }
.revchip {
    display: inline-block; padding: 1px 7px; border-radius: 10px; margin-left: 6px;
    background: #e7e2f0; color: #6b5b86; font-size: 12px; font-weight: 600;
    text-decoration: line-through; cursor: help;
}
.matrix td.rq-saved { animation: rqflash .9s ease-out; }
@keyframes rqflash { 0% { background: #d6f5df; } 100% { background: transparent; } }
.matrix tfoot td.vaccnt { font-size: 12px; color: var(--muted); background: #f7f9fb;
    border-top: 2px solid var(--line); font-weight: 600; }
.matrix tfoot td.vaccnt.special { background: #fff7cc; }
.matrix tfoot td.vaccnt.over, .lg.vaccnt.over { background: var(--danger); color: #fff; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .matrix td.rq-saved { animation: none; } }

/* inaktiv (letiltott) felhasznalo a listaban */
.tbl tr.urow-off > td { background: #f4f5f7; color: var(--muted); }
.offchip {
    display: inline-block; background: #6b7280; color: #fff; border-radius: 3px;
    padding: 0 5px; font-size: 11px; font-weight: 700; text-transform: uppercase;
}

/* "ki van most a naptarban" sav (parhuzamos szerkesztes) */
.presbox {
    margin: 8px 0 4px; padding: 7px 10px; border-radius: 6px; font-size: 13px;
    background: var(--brand-soft); border: 1px solid var(--brand-line); color: var(--ink);
}
.presbox .pres-alone { color: var(--muted); }
.presbox .pres-idle { color: var(--muted); }
.presbox .pres-note { color: var(--muted); }

.summary { max-width: 1100px; }
.summary td, .summary th { text-align: center; }
.summary td:nth-child(2), .summary th:nth-child(2) { text-align: left; }
.summary tr.sumtot td { font-weight: 700; border-top: 2px solid var(--muted); background: #eef3f0; }
/* tulora: a havi norma feletti ora - feltuno, de nem riasztas */
.summary td.ot { color: #b25000; font-weight: 700; background: #fff4e8; }

/* nap-tipus felulbiralas */
.matrix th.daycol.clickable { cursor: pointer; }
.matrix th.daycol.clickable:hover { outline: 2px solid var(--brand); outline-offset: -2px; }
.dtbadge { display: inline-block; background: var(--brand); color: #fff; border-radius: 3px; padding: 0 4px; font-size: 10px; font-weight: 700; }
.dtpopup { position: absolute; z-index: 50; background: #fff; border: 1px solid var(--line); border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,.18); padding: 6px; min-width: 180px; display: flex; flex-direction: column; gap: 4px; }
.dtpopup .dttitle { font-size: 12px; color: var(--muted); padding: 2px 4px 4px; }
.dtpopup button { text-align: left; background: #f4f6f9; border: 1px solid var(--line); border-radius: 5px;
    padding: 6px 10px; font-size: 13px; cursor: pointer; }
.dtpopup button:hover { background: var(--brand); color: #fff; }

/* cserelt szolgalat: narancs keret + halvany hatter (a special/hl melle) */
.matrix td.sw { outline: 2px solid #e07b00; outline-offset: -2px; background: #ffe9d1; cursor: help; }
.matrix td.sw.special { background: #ffedb8; }
.matrix td.sw select.cellsel { font-weight: 700; }
/* a csere MASIK oldala: ra huzva mindket cella kivilagit */
.matrix td.sw.sw-pair { outline: 3px solid #c2410c; outline-offset: -3px;
    background: #ffc98a; box-shadow: inset 0 0 0 1px #fff; }
.matrix td.sw.sw-pair select.cellsel { background: #ffc98a; }

/* csere: utkozes-elonezet a dontes elott */
.btn-warn { background: #e07b00; }
.btn-warn:hover { background: #b96500; }
.tbl tr.sw-warnrow td { border-bottom: none; }
.tbl tr.sw-detail td { padding-top: 2px; padding-bottom: 10px; font-size: 13px; background: #fbfcfd; }
.swflag { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; font-weight: 700; margin-right: 6px; }
.swflag-ok { background: var(--ok-bg); color: var(--ok-ink); }
.swflag-warn { background: #fff4d6; color: #8a4b00; }
.swflag-err { background: var(--err-bg); color: var(--err-ink); }
.swwarn { margin: 6px 0 4px; padding-left: 20px; color: #8a4b00; }
.swwarn li { padding: 1px 0; }
/* elutasitas indoklasa */
.rejform input[type=text] { width: 190px; padding: 4px 8px; font-size: 12px; }
.rejreason { color: var(--err-ink); font-style: italic; }

/* csere-allapot cimkek */
.swst { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; }
.swst-pending { background: #fff4d6; color: #8a4b00; }
.swst-approved { background: var(--ok-bg); color: var(--ok-ink); }
.swst-rejected { background: var(--err-bg); color: var(--err-ink); }
.swst-cancelled { background: #e8ecf1; color: var(--muted); }
.swst-reverted { background: #ffe9d1; color: #8a4b00; }

/* stilusvalaszto (Sajat ertesitesek oldal) */
.themegrid { display: flex; flex-wrap: wrap; gap: 10px; }
.themeopt { display: flex; align-items: center; gap: 10px; cursor: pointer;
    border: 2px solid var(--line); border-radius: 10px; padding: 10px 14px;
    background: var(--card); font-size: 14px; min-width: 190px; }
.themeopt:hover { border-color: var(--brand); }
.themeopt.sel { border-color: var(--brand); background: var(--brand-soft); }
.themeopt .sw { display: inline-block; width: 26px; height: 26px; border-radius: 6px;
    border: 1px solid rgba(0,0,0,.15); flex: none; }
.themeopt input[type=radio] { margin: 0; }

/* --- Hibajegyek ---------------------------------------------------------- */
.tkst { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; }
.tkst-open     { background: var(--err-bg); color: var(--err-ink); }
.tkst-progress { background: #fff4d6; color: #8a4b00; }
.tkst-done     { background: var(--ok-bg); color: var(--ok-ink); }
.tkurg { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px;
    font-weight: 700; background: #e8492b; color: #fff; letter-spacing: .3px; }
.tkurg-txt { color: #c0392b; }
.tbl tr.tk-detail td { border-bottom: 1px solid var(--line); background: #fbfcfd;
    padding-top: 0; padding-bottom: 9px; color: var(--muted); }
.tk-sol { color: var(--ok-ink); }

.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 24px 0; }

@media (max-width: 600px) {
    .userbox { margin-left: 0; width: 100%; }
    .ops { flex-direction: column; align-items: flex-start; }
    /* telefon: kompaktabb fejlec, hogy a sok menupont keves sorba ferjen */
    .topbar { gap: 8px 14px; padding: 9px 12px; }
    .brand { font-size: 16px; width: 100%; }
    .mainnav { gap: 6px 12px; font-size: 15px; }
    .container { padding: 0 10px; margin: 16px auto; }
}

/* ==========================================================================
   SOTET MOD (a body.theme-dark osztallyal kapcsolodik be).
   A szinvaltozokat a fejlecbe beszurt <style> allitja; itt azok a helyek
   vannak felulirva, ahol a vilagos hatter/szoveg fixen szerepel.
   ========================================================================== */
.theme-dark input, .theme-dark select, .theme-dark textarea {
    background: #2b333d; color: var(--ink); border-color: var(--line);
}
.theme-dark input[readonly] { background: #222932 !important; color: var(--muted); }
/* vilagos hatteru feluletek sotetitese */
.theme-dark .matrix thead th,
.theme-dark .matrix tr.blockhead td,
.theme-dark .summary tr.sumtot td,
.theme-dark .rtab:hover { background: #2b333d; }
.theme-dark .summary td.ot { background: #3a2a1c; color: #ffb066; }
.theme-dark .tbl tr.urow-off > td { background: #232a33; color: var(--muted); }
.theme-dark .matrix .rowhead,
.theme-dark .matrix tfoot td.vaccnt,
.theme-dark .tbl tr.notifyrow td,
.theme-dark .tbl tr.sw-detail td,
.theme-dark .tbl tr.grouphead td { background: #262e37; }
.theme-dark .tbl tr.grouphead td { color: var(--ink); }
.theme-dark .rtab.active { background: var(--card); border-bottom-color: var(--card); }
.theme-dark .rtab-n { background: #38414d; }
.theme-dark .dtpopup { background: var(--card); }
.theme-dark .dtpopup button { background: #2b333d; color: var(--ink); }
.theme-dark .matrix select.cellsel:hover,
.theme-dark .matrix select.cellsel:focus { background: var(--card); }
.theme-dark .maillog { background: #12171d; }
.theme-dark .btn-alt { background: var(--card); }
.theme-dark .matrix td.na { color: #4b5563; }
/* vilagos cimkek, amiknek a szovegszine var(--muted) - sotetben olvashatatlan */
.theme-dark .rolechip-viewer, .theme-dark .swst-cancelled { color: #4a5568; }

/* A SZINES JELOLESEK vilagos hatteruek maradnak (szabadsag, csere, unnep,
   kiemeles), ezert ott a szoveget SOTETRE kell allitani - kulonben vilagos
   szoveg lenne vilagos hatteren. Ez erinti a beosztas- es a szabadsag-naptart. */
.theme-dark .matrix td.mk-vac, .theme-dark .matrix td.mk-off,
.theme-dark .matrix td.mk-day, .theme-dark .matrix td.mk-night,
.theme-dark .matrix td.mk-sick, .theme-dark .matrix td.hl,
.theme-dark .matrix td.sw, .theme-dark .matrix td.sw.special,
.theme-dark .matrix td.rq-saved,
.theme-dark .matrix select.cellsel.saved-flash,
.theme-dark .lg,
.theme-dark .flash { color: #1f2733; }

/* HETVEGE / UNNEP sotet modban: sotet borostyan hatter vilagos szoveggel
   (vilagosban sarga marad). A JELOLT cellak - szabadsag, csere, kiemeles -
   megtartjak a sajat vilagos hatterukat, ezert azokat kihagyjuk. */
.theme-dark .matrix th.special,
.theme-dark .matrix td.special:not([class*="mk-"]):not(.hl):not(.sw),
.theme-dark .matrix tfoot td.vaccnt.special,
.theme-dark .reqtable tr.special-row td { background: #3d3520; color: var(--ink); }
.theme-dark .matrix tfoot td.vaccnt.special { color: var(--muted); }
.theme-dark .matrix td.special:not([class*="mk-"]):not(.hl):not(.sw) select.cellsel {
    background: transparent; color: var(--ink);
}
/* A vilagos hatteru sav (flash) MINDEN gyereke oroklje a sotet szoveget -
   kulonben a sajat szinnel rendelkezo elemek (pl. .chk cimke: var(--ink))
   vilagos szoveggel jelennenek meg vilagos hatteren. */
.theme-dark .flash * { color: inherit; }
.theme-dark .flash a { color: #14507f; }
.theme-dark .flash .muted-inline, .theme-dark .flash .small,
.theme-dark .flash .hint { color: #4a5568; }
/* a jelolt cellakban a legordulo is atlassza a szines hatteret */
.theme-dark .matrix td.mk-vac select.cellsel,
.theme-dark .matrix td.mk-off select.cellsel,
.theme-dark .matrix td.mk-day select.cellsel,
.theme-dark .matrix td.mk-night select.cellsel,
.theme-dark .matrix td.mk-sick select.cellsel,
.theme-dark .matrix td.hl select.cellsel,
.theme-dark .matrix td.sw select.cellsel { background: transparent; color: #1f2733; }
/* a rendes (jeloletlen) cellak legorduloje viszont a sotet hattert kapja */
.theme-dark .matrix select.cellsel { color: var(--ink); }
.theme-dark .matrix td.empty, .theme-dark .matrix select.cellsel.cell-empty { color: #fff; }
.theme-dark .matrix select.cellsel.cell-empty { background: #b3352c; }
/* hibajegyek sotet modban: a reszletsor sotet hatteret kap, az allapot-cimkek
   vilagos hatteruek maradnak, ezert ott a szoveg sotet (mint a .lg-nel) */
.theme-dark .tbl tr.tk-detail td { background: #262e37; color: var(--muted); }
.theme-dark .tkst { color: #1f2733; }
.theme-dark .tkurg-txt { color: #ff8a7a; }
.theme-dark .navcount { background: rgba(255, 255, 255, .18); }

/* jogosultsag-matrix (Jogosultsagok lap, felhasznalo adatlapja) */
.accesstbl td:first-child { max-width: 420px; }
.accesstbl select { min-width: 150px; }
.accesstbl .small { font-size: 12px; }

/* --- Ugyeleti beosztas: feltoltott Excel-tablazatok nezete ---------------- */
.dutyhead { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start;
            justify-content: space-between; margin-bottom: 8px; }
.dutytabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 8px;
            border-bottom: 2px solid var(--brand-line); padding-bottom: 6px; }
.dutytab { display: inline-block; padding: 4px 10px; border-radius: 6px 6px 0 0;
           background: var(--brand-soft); color: var(--brand-dark); text-decoration: none;
           font-size: 13px; border: 1px solid var(--brand-line); border-bottom: none; }
.dutytab:hover { background: var(--brand-pale); }
.dutytab.on { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 700; }
.dutytab.empty { opacity: .55; font-style: italic; }

/* A tablazat maga MINDIG "papir" (feher alap, sotet szoveg) - az eredeti
   Excel-szinek csak igy jonnek ki helyesen, sotet modban is. */
.xvwrap { overflow-x: auto; background: #fff; border: 1px solid var(--line);
          border-radius: 6px; padding: 4px; }
table.xv { border-collapse: collapse; table-layout: fixed; background: #fff; color: #111;
           font-family: Arial, Helvetica, sans-serif; }
table.xv td { border: 1px solid #dfe3e8; padding: 1px 3px; font-size: 11px; height: 17px;
              overflow: hidden; white-space: nowrap; vertical-align: middle; }
/* rovid jeloles (N, K1) nem forgatva - a weben ugy olvashato */
.xv td.norot { writing-mode: horizontal-tb !important; transform: none !important;
               text-orientation: mixed !important; }
/* hosszu szoveg atloghat az ures szomszedba (mint Excelben) */
.xv td.ovf { overflow: visible !important; }

/* --- Oktatas / egyeb esemeny --------------------------------------------- */
/* A beosztas-matrix "Esemeny" sorai: aki itt van, azt aznap nem osztjuk be.
   Turkiz - szandekosan mas, mint a nappal (kek) / ejszaka (lila) jeloles. */
.matrix td.ev { background: #d3efe9; color: #0b5852; font-weight: 700; }
.lg.ev-lg { background: #d3efe9; color: #0b5852; }
.theme-dark .matrix td.ev { background: #1f4f49; color: #cdeae4; }
/* resztvevo-valaszto (Oktatas lap): tobb oszlopos pipa-racs */
.evgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 2px 14px; }
.evgrid .chk { margin: 2px 0; }
/* "generald ujra" panel az Oktatas lapon (esemeny mentese/torlese utan) */
.card.ev-regen { border-left: 4px solid var(--brand); background: var(--brand-soft); }
.theme-dark .card.ev-regen { background: var(--brand-soft); }
/* resztvevo-valaszto jelzesei: ki van aznap tavol / mar beosztva (event_day.php) */
.prfl-vac  { background: #fff3b0; color: #7a5b00; }
.prfl-off  { background: #ffdca8; color: #8a4b00; }
.prfl-sick { background: #ffd6d6; color: #a32020; }
.prfl-ev   { background: #d3efe9; color: #0b5852; }
.evgrid .chk .evmark { display: inline-flex; flex-wrap: wrap; gap: 3px; margin-left: 6px; }
.evgrid .chk { align-items: center; }

/* --- Lap-fulsav: a Beosztas kore tartozo lapok (beosztas / generalas /
   oktatas / igenyek / csere) egy helyen, a fejlec-menu helyett ------------- */
.pgtabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 14px;
          border-bottom: 2px solid var(--brand-line); padding-bottom: 6px; }
.pgtab { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px;
         border-radius: 8px 8px 0 0; background: var(--brand-soft); color: var(--brand-dark);
         text-decoration: none; font-size: 14px; font-weight: 600;
         border: 1px solid var(--brand-line); border-bottom: none; }
.pgtab:hover { background: var(--brand-pale); }
.pgtab.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.pgtab .navbadge { margin-left: 0; }
@media (max-width: 600px) { .pgtab { padding: 5px 10px; font-size: 13px; } }

/* --- TESZT MOD (homokozo) sav ---------------------------------------------
   Minden lap tetejen latszik, ha a belepett admin a teszt masolaton dolgozik.
   Szandekosan feltuno (bordo), hogy sose lehessen osszekeverni az elessel. */
.sbbar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    background: #8a2b2b; color: #fff; padding: 8px 18px; font-size: 14px;
    box-sizing: border-box; max-width: 100%; overflow-wrap: anywhere;
    position: sticky; left: 0; z-index: 6;
}
.sbbar .sbtag { font-weight: 700; letter-spacing: .5px; white-space: nowrap; }
.sbbar .sbtxt { flex: 1 1 240px; min-width: 0; }
.sbbar .btn { background: #fff; color: #8a2b2b; font-weight: 700; }
.sbbar .btn:hover { background: #ffe1e1; }
.sbbar .btn-danger { background: #4a1414; color: #fff; }
.sbbar .btn-danger:hover { background: #661c1c; }
.sbmini {
    display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 8px;
    background: #8a2b2b; color: #fff; font-size: 11px; font-weight: 700; vertical-align: middle;
}

/* "Miert ez lett?" - fejenkenti indoklas a generalasi elonezetben */
.expl { border: 1px solid var(--line, #d6dde6); border-radius: 6px; padding: 6px 10px; margin-bottom: 6px; }
.expl > summary { cursor: pointer; padding: 2px 0; }
.expl > summary:hover { color: var(--brand, #1f7a4d); }
.expl[open] { background: rgba(0, 0, 0, .02); }
.expl .warnlist { font-size: 14px; }
.theme-dark .expl { border-color: #3a4657; }
.theme-dark .expl[open] { background: rgba(255, 255, 255, .04); }

/* "Az én hónapom" - mobilon is olvashato, napokat listazó nezet */
.mysch { list-style: none; margin: 8px 0 0 0; padding: 0; }
.mysch li { display: grid; grid-template-columns: 116px 1fr; gap: 2px 10px;
            padding: 8px 10px; border-bottom: 1px solid var(--line, #e2e8f0); align-items: baseline; }
.mysch li:last-child { border-bottom: 0; }
.mysch .ms-d { color: var(--muted, #64748b); white-space: nowrap; }
.mysch .ms-w { font-weight: 600; }
.mysch .ms-t { grid-column: 2; font-size: 13px; color: var(--muted, #64748b); }
.mysch .ms-we { background: #f4f7fb; }
.mysch .ms-today { box-shadow: inset 3px 0 0 var(--brand, #1f7a4d); }
.mysch .ms-day .ms-w   { color: #1d4ed8; }
.mysch .ms-night .ms-w { color: #6d28d9; }
.mysch .ms-standby .ms-w { color: #b45309; }
.mysch .ms-vac .ms-w   { color: #047857; }
.mysch .ms-sick .ms-w  { color: #b91c1c; }
.mysch .ms-event .ms-w { color: #0e7490; }
.mysch .ms-free .ms-w, .mysch .ms-off .ms-w { color: var(--muted, #64748b); font-weight: 500; }
.theme-dark .mysch li { border-bottom-color: #3a4657; }
.theme-dark .mysch .ms-we { background: rgba(255, 255, 255, .04); }
.theme-dark .mysch .ms-day .ms-w   { color: #93c5fd; }
.theme-dark .mysch .ms-night .ms-w { color: #c4b5fd; }
.theme-dark .mysch .ms-standby .ms-w { color: #fcd34d; }
.theme-dark .mysch .ms-vac .ms-w   { color: #6ee7b7; }
.theme-dark .mysch .ms-sick .ms-w  { color: #fca5a5; }
.theme-dark .mysch .ms-event .ms-w { color: #67e8f9; }
@media (max-width: 560px) {
  .mysch li { grid-template-columns: 92px 1fr; padding: 7px 6px; }
  .mysch .ms-t { font-size: 12px; }
}

/* Beosztási igény: több hónap egyszerre (jelölőnégyzet-rács) */
.ymgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 2px 10px; }
.ymgrid .chk { display: flex; align-items: center; gap: 6px; padding: 3px 0; }
.ymgrid .chk .small { margin-left: auto; }
.ymgrid .ymoff { opacity: .5; }

/* sotet tema: a KEK utkozes-cella. A ".theme-dark .matrix select.cellsel"
   vilagos szoveget ad, azt itt ki kell venni, kulonben a keken nem olvashato. */
/* A kek hatter sotet temaban is MEGMARAD (mint a tobbi szines jeloles), ezert
   ott a szoveget sotetre kell venni - lasd a .mk-* cellakat. */
.theme-dark .matrix td.conflict { background: #d6e8ff !important; color: #14507f !important; }
.theme-dark .matrix td.conflict select.cellsel { background: transparent; color: #14507f; }
.theme-dark .matrix td.conflict select.cellsel:hover,
.theme-dark .matrix td.conflict select.cellsel:focus { background: rgba(255, 255, 255, .5); color: #14507f; }
.theme-dark .matrix td.conflict.gdiff { box-shadow: inset 0 0 0 3px #ff5ec8; }
.theme-dark .matrix td.conflict.hl { box-shadow: inset 0 0 0 3px #219653; }
.theme-dark .conflict-key { background: #d6e8ff; border-color: #8fb5e0; }
/* sotet tema: a kek utkozes-sav (es a benne levo lenyithato lista) vilagos
   hatteru marad, ezert ott a szoveg sotet - mint a tobbi szines jelolesnel */
.theme-dark .flash-conf,
.theme-dark .flash-conf .conflist,
.theme-dark .flash-conf .conflist ul,
.theme-dark .flash-conf .conflist li { background: #d6e8ff; }
.theme-dark .flash-conf,
.theme-dark .flash-conf * { color: #14507f; }

/* sotet tema: a piros szabadsag-fejlec es a jegyzet */
.theme-dark .matrix th.daycol.hlvac, .theme-dark .matrix th.daycol.special.hlvac {
    background: #a32020; color: #fff; }
.theme-dark .hlvacnote { color: #ff8f8f; }

/* "Csere igeny erkezett" - a lap tetejen, annak, AKITOL a cseret kerik.
   Ugyanaz a piros hangsuly, mint a fejlec-jelvenyen: ez varja a valaszat. */
.card.swreq { border-left: 4px solid #c0392b; }
.card.swreq h1 { color: #c0392b; }
.swreq-item { padding: 10px 0; border-top: 1px solid var(--line, #e3e3e3); }
.swreq-item:first-of-type { border-top: none; }
.swreq-list { margin: 4px 0 8px 0; padding-left: 20px; }
.swreq-item .ops { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.swreq-item .ops input[type=text] { min-width: 200px; }
.theme-dark .card.swreq { border-left-color: #ff6b6b; }
.theme-dark .card.swreq h1 { color: #ff8f8f; }

/* Naptar-export: ha atallitottak a jelolonegyzeteket, a kiirt darabszam mar nem
   pontos (a letoltes-link viszont mar a jo) - halvanyitva jelezzuk. */
#calcount.stale { opacity: .45; font-style: italic; }
#calcount.stale strong { font-weight: 400; }

/* Szolgalatvezeto-csuszka (Beallitasok -> Mt. szabalyok) */
.leadslider { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0 4px; }
.leadslider input[type=range] { flex: 1 1 240px; max-width: 380px; }
.leadslider output { font-weight: 700; min-width: 260px; }
@media (max-width: 640px) { .leadslider output { min-width: 0; } }

/* sotet tema: a turkiz "fix ember" cella (ures honap) - sotet alapon vilagos szoveg */
.theme-dark .matrix select.cellsel.cell-fixed { background: #1f4a4b; color: #d9f7f7; }
.theme-dark .fixed-key { background: #1f4a4b; }

/* "CSAK A KIEMELES SZINE" (user keres: "ki lehessen kapcsolni a szinezeseket,
   pl. modositott stb, csak a dolgozo kiszinezese maradjon"). A <html> kapja a
   .plainview osztalyt (schedule_view.php, #plainsel). A cella-jelolesek
   (magenta modositott, kek utkozes, narancs csere, oktatas, piros betoltetlen,
   turkiz fix, hetvegi sarga) elnyomva; a nap-fejlec (ünnep, piros szabadsag)
   es a zold kiemeles marad. !important, mert az utkozes is az. */
.hlplain { font-size: 14px; margin-left: 10px; white-space: nowrap; cursor: pointer; }
.hlplain input { vertical-align: -2px; margin-right: 3px; }
html.plainview .matrix td.gdiff, html.plainview .matrix td.conflict,
html.plainview .matrix td.sw, html.plainview .matrix td.ev,
html.plainview .matrix td.empty, html.plainview .matrix td.special {
    background: transparent !important; color: inherit !important;
    outline: none !important; box-shadow: none !important; font-weight: inherit; }
html.plainview .matrix select.cellsel.cell-empty, html.plainview .matrix select.cellsel.cell-fixed,
html.plainview .matrix select.cellsel.cell-locked, html.plainview .matrix td select.cellsel {
    background: transparent !important; color: inherit !important;
    box-shadow: none !important; font-weight: inherit; }
html.plainview .matrix select.cellsel.cell-locked { border-color: var(--line); }
html.plainview .matrix td.hl { background: #6fcf97 !important; box-shadow: inset 0 0 0 2px #219653 !important; }
html.plainview .matrix td.hl, html.plainview .matrix td.hl select.cellsel { color: #1f2733 !important; }

/* MASODIK KIEMELES - LILA (user keres: "pluszba tudok meg mast is kijelolni,
   hogy mutassa a napjait, de az mas szinnel jelolodjon"). schedule_view.php
   #hlsel2 -> .hl2 a cellan, .hlvac2 a szabadsag-fejlecen. Ugyanott all, ahol a
   zold .hl: az utkozes (kek) es a modositott (magenta) keret mellett is. */
.hl-key, .hl2-key { display: inline-block; width: 12px; height: 12px; vertical-align: -1px;
    border-radius: 2px; margin-right: 2px; }
.hl-key { background: #6fcf97; box-shadow: inset 0 0 0 2px #219653; }
.hl2-key { background: #c9b3f5; box-shadow: inset 0 0 0 2px #7c4dcc; }
.matrix td.hl2 { background: #c9b3f5 !important; box-shadow: inset 0 0 0 2px #7c4dcc; }
.matrix td.hl2 select.cellsel { font-weight: 700; background: transparent; }
.matrix td.gdiff.hl2 { box-shadow: inset 0 0 0 2px #7c4dcc, inset 0 0 0 5px #d6009a; }
.matrix td.conflict.hl2 { box-shadow: inset 0 0 0 3px #7c4dcc; }
.theme-dark .matrix td.hl2, .theme-dark .matrix td.hl2 select.cellsel { color: #1f2733; }
.matrix th.daycol.hlvac2, .matrix th.daycol.special.hlvac2 { background: #7c4dcc; color: #fff; }
.matrix th.daycol.hlvac2 .wd, .matrix th.daycol.hlvac2 .dtbadge { color: #ece3ff; }
/* mindketten szabadsagon: felig piros, felig lila */
.matrix th.daycol.hlvac.hlvac2 { background: linear-gradient(135deg, #d92b2b 50%, #7c4dcc 50%); }
html.plainview .matrix td.hl2 { background: #c9b3f5 !important; box-shadow: inset 0 0 0 2px #7c4dcc !important; }
html.plainview .matrix td.hl2, html.plainview .matrix td.hl2 select.cellsel { color: #1f2733 !important; }

/* SZABADSAG-KEROK SORRENDJE (request_overview.php): a kis szam az "Sz" mellett
   = hanyadikkent irta be a weben ezen a napon. KIF kulon szamolodik (kek szam),
   mert nem szamit a KOF/KDSZ-be. A sarga szabadsag-hatteren mindket temaban
   ugyanaz a sotet szoveg marad. */
sup.vord { font-size: 10px; font-weight: 700; margin-left: 1px; color: #9a3412; line-height: 0; }
sup.vord.vord-kif { color: #1d4ed8; }

/* SZABADSAG A HATARON TUL (user keres: "ami mar tulmegy a beirt erteken,
   annak a negyzete legyen piros-feher csikos"). request_overview.php: a csoport
   (KOF/KDSZ vagy KIF) napi hataran tuli kero(k) cellaja. A szoveg feher
   "parnat" kap, hogy a csikokon is olvashato legyen. */
.matrix td.mk-vac.vac-over, .lg.mk-vac.vac-over {
    background: repeating-linear-gradient(45deg, #e02424 0 5px, #ffffff 5px 10px) !important;
    color: #7f1d1d !important; font-weight: 700;
    text-shadow: 0 0 2px #fff, 0 0 2px #fff, 0 0 3px #fff; }
.theme-dark .matrix td.mk-vac.vac-over { color: #7f1d1d !important; }

/* JOVAHAGYASRA VARO szabadsag (hataron tuli, de a dolgozo megtartotta - a
   beoszto dont rola): szaggatott sotet keret + homokora a sarokban. */
.matrix td.vac-pend, .lg.vac-pend { outline: 2px dashed #111827; outline-offset: -3px; position: relative; }
.matrix td.vac-pend::after { content: "⏳"; position: absolute; top: -1px; right: 0; font-size: 9px; line-height: 1; }
.vpbox .vplist { margin: 6px 0 0; padding-left: 18px; }
.vpbox .vplist li { margin: 4px 0; }
.vpbox .vplist .btn { margin-left: 4px; }

/* SZABADSAG JOVAHAGYASRA VAR: a menu "Szabadságkérés" pontjan VILLOGO "!"
   (user keres: "a szabadsagkeresnel egy felkialtojel villogjon, es ott
   lehessen jovahagyni"). Erosebb, mint a tobbi jelveny lassu lukteteese. */
.navbadge.navblink { animation: badgepulse 2s infinite, navblink 1s steps(2, start) infinite; }
@keyframes navblink { to { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .navbadge.navblink { animation: none; } }
/* a #fuggo horgonyra erkezve a donto doboz egy pillanatra kiemelkedik */
.vpbox:target { animation: rqflash 1.6s ease-out 2; scroll-margin-top: 80px; }
/* a dolgozo sajat elbiralasai (request_overview.php #dontes) */
.vdec-ok { color: #157f3b; font-weight: 700; }
.vdec-no { color: #b42318; font-weight: 700; }
.theme-dark .vdec-ok { color: #6ee7a0; }
.theme-dark .vdec-no { color: #ff8f8f; }

/* NYOMTATAS (user keres: "nyomtatasi nezetben nem fer ra egy fekvo A4 oldalra",
   "nincsenek bekeretezve"). A Beosztas lap Ctrl+P-re: fekvo A4, a menu, gombok,
   sávok, magyarazatok nelkul; a tablazat kitolti a lap szelesseget, FEKETE
   keretes racs, a sarga hetvege megmarad. Az osszesito uj oldalra kerul. */
@media print {
    @page { size: A4 landscape; margin: 8mm; }
    html, body { background: #fff !important; color: #000 !important; }
    * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .topbar, .mainnav, .userbox, .pgtabs, .foot, .btn, .ops, .flash, .hint, .toolrow,
    .hlpick, .hlplain, .hlvacnote, form.form, .mnav a, .presbox, #rqmsg, .vpbox, .example,
    .card > h1, details, .warnlist { display: none !important; }
    main.container, .container { max-width: none !important; width: auto !important;
                                  padding: 0 !important; margin: 0 !important; }
    .card { border: 0 !important; box-shadow: none !important; padding: 0 !important; margin: 0 0 4mm !important;
            background: #fff !important; }
    .mnav { margin: 0 0 2mm !important; }
    .mnav-lbl { font-size: 14pt; font-weight: 700; }
    .tbl-wrap { overflow: visible !important; }
    table.matrix { width: 100% !important; table-layout: fixed; border-collapse: collapse;
                   font-size: 8.5pt; page-break-inside: avoid; border: 2px solid #000 !important; }
    table.matrix th, table.matrix td { border: 1px solid #000 !important; padding: 1px 0 !important;
                                       min-width: 0 !important; line-height: 1.25; color: #000 !important; }
    table.matrix th.rowhead, table.matrix td.rowhead { width: 11%; text-align: left; padding-left: 3px !important; }
    table.matrix tr.blockhead td { border-top: 2px solid #000 !important; }
    table.matrix select.cellsel { -webkit-appearance: none; appearance: none; border: 0 !important;
                                  background: transparent !important; color: #000 !important; font: inherit;
                                  width: 100%; text-align: center; text-align-last: center; padding: 0; }
    table.matrix td.special, table.matrix th.special { background: #ff0 !important; }
    table.summary { page-break-before: always; font-size: 8pt; width: 100%; }
    table.summary th, table.summary td { border: 1px solid #000 !important; padding: 1px 3px !important; }
}

/* SZABADSAGKERES: TOBB NAP EGYSZERRE (request_overview.php). A kijelolt cella
   kek belso keretet kap (a jeloles szine latszik alatta), alul ragado sav a
   muveletekkel. */
.matrix td.rq-sel { box-shadow: inset 0 0 0 3px #2563eb !important; }
.matrix td.rq-edit { user-select: none; -webkit-user-select: none; }
.rqseltgl { margin: 6px 0 8px; }
#rqmulti.on { background: #2563eb; border-color: #2563eb; color: #fff; }
.rqselbar { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 30;
            display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center;
            background: #fff; border: 2px solid #2563eb; border-radius: 10px; padding: 8px 12px;
            box-shadow: 0 6px 24px rgba(0, 0, 0, .18); max-width: calc(100vw - 24px); }
.rqselbar[hidden] { display: none; }
.rqselbar .rqselcnt { font-weight: 700; margin-right: 4px; }
.theme-dark .rqselbar { background: var(--card, #1f2733); }
@media print { .rqselbar, .rqseltgl { display: none !important; } }

/* HIBAFELVETEL (incidents.php) + UGYELETES MUNKAIRANYITOK (dispatch.php).
   Ketoszlopos urlap: balra a bejelentes, jobbra az aznapi ugyeletes; telefonon
   egymas ala. A megjegyzes nagy, atmeretezheto ablak (user keres). */
.incgrid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; align-items: start; }
.incrow { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 8px; }
.incrow label { display: flex; flex-direction: column; gap: 3px; font-weight: 600; font-size: 14px; }
.incrow .inctown { flex: 1 1 260px; }
.incrow .inctown input { font-size: 16px; padding: 7px 9px; }
.incrow .incaddr { flex: 1 1 260px; }
.increg { padding: 8px 4px; font-size: 14px; }
.incnew { background: #fff7cc; border: 1px solid #e6c200; border-radius: 6px; padding: 6px 10px; margin: 0 0 8px; }
.incnotel { display: flex; flex-direction: column; gap: 3px; font-weight: 600; margin: 6px 0 10px; }
textarea.incnote { width: 100%; min-height: 200px; resize: vertical; font: inherit; font-weight: 400;
                   font-size: 15px; line-height: 1.45; padding: 8px 10px; box-sizing: border-box; }
.incduty { border: 2px solid var(--brand, #008542); border-radius: 10px; padding: 12px 14px;
           background: var(--brand-soft, #eef7f1); position: sticky; top: 70px; }
.incduty-h { font-weight: 700; font-size: 15px; }
.incduty-d { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.incduty-area { font-size: 13px; color: var(--muted); }
.incduty-name { font-size: 20px; font-weight: 700; margin: 4px 0; }
.incduty-tel { font-size: 18px; font-weight: 700; }
.incduty-warn { color: #8a4b00; font-weight: 600; }
.incchip { display: inline-block; padding: 1px 9px; border-radius: 10px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.incchip-new { background: #ffe3e3; color: #b42318; }
.incchip-progress { background: #fff4d6; color: #8a4b00; }
.incchip-closed { background: #e6f4ea; color: #1e6b34; }
.inclist .incops form { margin: 2px 0; }
.inclist tr.incdet td { border-top: 0; padding-top: 0; }
.incnotev { white-space: normal; background: var(--bg); border-left: 3px solid var(--line); padding: 6px 10px; margin: 6px 0; }
.incadd { display: flex; gap: 6px; align-items: flex-start; margin: 6px 0; }
.incadd textarea { flex: 1; min-height: 44px; resize: vertical; }
.inclog { margin: 4px 0 6px; padding-left: 18px; font-size: 13px; color: var(--muted); }
.dspgrid select.dspsel { font-size: 12px; max-width: 110px; }
.dspgrid select.dspsel.dspchg { outline: 2px solid #2563eb; }
.dspgrid button.dspcopy { font-size: 11px; padding: 0 4px; margin-top: 2px; cursor: pointer; }
.dsparea legend input { font-weight: 700; }
.theme-dark .incnew { background: #4a3d00; border-color: #8a7400; }
.theme-dark .incduty { background: var(--brand-soft); }
@media (max-width: 760px) {
    .incgrid { grid-template-columns: 1fr; }
    .incduty { position: static; order: -1; }
}

/* HIBAFELVETEL - VIZSZINTES elrendezes (user keres: "legyen vizszintes
   elrendezes" - "egymas ala rakja"). Az ok: az altalanos .form 360px szeles
   oszlop volt. Most: felul az ugyeletes-sav, alatta EGY sorban a mezok,
   legalul a teljes szelessegu megjegyzes. Keskenyebb kepernyon tordel. */
.incform { max-width: none; display: block; }
.incform .incrow { display: flex; flex-wrap: nowrap; gap: 10px; align-items: flex-end; margin: 10px 0 8px; }
.incform .incrow > label, .incform .incrow > .increg { flex: 1 1 0; min-width: 0; }
.incform .incrow > .inctown, .incform .incrow > .incaddr { flex: 2 1 0; }
.incform .incrow > .increg { flex: 0.8 1 0; }
.incform .incrow input, .incform .incrow select { width: 100%; box-sizing: border-box; }
.incform .increg { display: flex; flex-direction: column; gap: 4px; padding: 0; font-size: 14px; color: var(--muted); }
.incform .increg strong { color: var(--text, inherit); font-size: 15px; padding: 6px 0; }
.incform .incduty { position: static; display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
                    padding: 8px 14px; margin-bottom: 4px; }
.incform .incduty-b { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.incform .incduty-name { font-size: 20px; margin: 0; }
.incform .incnew { margin: 0 0 8px; }
.incform textarea.incnote { min-height: 160px; }
@media (max-width: 1000px) {
    .incform .incrow { flex-wrap: wrap; }
    /* ugyanakkora (vagy nagyobb) specificitas, mint a .inctown/.incaddr szabalye */
    .incform .incrow > label, .incform .incrow > .increg,
    .incform .incrow > .inctown, .incform .incrow > .incaddr { flex: 1 1 220px; }
    .incform .incrow > .inctown, .incform .incrow > .incaddr { flex-basis: 100%; }
}
/* hibafelvetel: ki vette fel / ki zarta le - jol lathatoan */
.inclist .incby { margin-top: 2px; font-size: 13px; }
/* hibafelvetel: a megjegyzes mindig lathato a sor alatt */
.inclist .incnotev { margin: 0 0 4px; }
.inclist .incnote-empty { color: var(--muted); font-style: italic; border-left-color: transparent; }

/* HIBAFELVETEL: a sor hattere az allapot szerint (user keres: "uj, folyamatban,
   lezarva - zold, narancs, piros"). A megjegyzes-sor (incdet) ugyanazt kapja,
   a jelvenyek szine is ehhez igazodik. */
.inclist tr.incst-new > td      { background: #dcf3e3; }
.inclist tr.incst-progress > td { background: #ffe6c7; }
.inclist tr.incst-closed > td   { background: #fbdcdc; }
.inclist tr.incdet > td { border-top: 0; }
.inclist tr:not(.incdet) > td { border-top: 2px solid var(--card, #fff); }
.inclist .incnotev { background: rgba(255, 255, 255, .6); }
.incchip-new      { background: #1e8e3e; color: #fff; }
.incchip-progress { background: #e8710a; color: #fff; }
.incchip-closed   { background: #c5221f; color: #fff; }
.theme-dark .inclist tr.incst-new > td      { background: #1d3a26; }
.theme-dark .inclist tr.incst-progress > td { background: #4a3214; }
.theme-dark .inclist tr.incst-closed > td   { background: #4a1f1f; }
.theme-dark .inclist .incnotev { background: rgba(0, 0, 0, .25); }

/* HIBAFELVETEL: "Atadva MIR-nek" (a folyamat utan) - KEK gomb, jelveny es sor
   (user keres: "atadva MIR-nek gomb, kek szinu hatterrel"). */
.btn.btn-mir { background: #1a5fd0; border-color: #1a5fd0; color: #fff; }
.btn.btn-mir:hover { background: #154ea9; border-color: #154ea9; color: #fff; }
.incchip-mir { background: #1a5fd0; color: #fff; }
.inclist tr.incst-mir > td { background: #dbe7fb; }
.theme-dark .inclist tr.incst-mir > td { background: #1c2f52; }
