/* ===== SHIFT GRID ===== */
.shift-grid-wrapper {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 75vh;
    border: 1px solid #dee2e6;
    border-radius: 6px;
}

.shift-grid {
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 0.75rem;
    margin: 0;
    width: max-content;
    min-width: 100%;
}

/* Meno zamestnanca — sticky stĺpec */
.shift-grid .employee-col {
    position: sticky;
    left: 0;
    background: #f8f9fa;
    z-index: 2;
    width: 170px;
    min-width: 170px;
    max-width: 170px;
    white-space: normal;
    word-break: break-word;
    padding: 4px 8px;
    border-right: 2px solid #adb5bd !important;
    vertical-align: middle;
    line-height: 1.3;
}

.shift-grid thead .employee-col {
    z-index: 5;
    background: #343a40;
    color: #fff;
}

/* Hlavičkové dni */
.shift-grid thead th.day-col {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #343a40;
    color: #fff;
    text-align: center;
    width: 46px;
    min-width: 46px;
    max-width: 46px;
    padding: 4px 2px;
    font-weight: 600;
}

/* Víkendy v hlavičke — [HERMES 2026-10-16] Majka: "Chýba výraznejšie farebné odlíšenie víkendov" */
.shift-grid thead th.day-col.weekend-sat {
    background: #d97706 !important;  /* výrazná oranžová — sobota +50% */
    color: #fff !important;
    box-shadow: inset 0 -3px 0 #92400e;
}
.shift-grid thead th.day-col.weekend-sun {
    background: #b91c1c !important;  /* výrazná červená — nedeľa +100% */
    color: #fff !important;
    box-shadow: inset 0 -3px 0 #7f1d1d;
}
.shift-grid thead th.day-col.holiday {
    background: #6d28d9 !important;  /* fialová — sviatok */
    color: #fff !important;
    box-shadow: inset 0 -3px 0 #4c1d95;
}
/* Stĺpce víkendov v tele tabuľky — jemné podfarbenie, aby bolo vidieť "kde som" */
.shift-grid tbody td.day-cell.col-sat {
    background-color: #fff7ed !important;
}
.shift-grid tbody td.day-cell.col-sun {
    background-color: #fef2f2 !important;
}
.shift-grid tbody td.day-cell.col-holiday {
    background-color: #f5f3ff !important;
}
/* Zachovaj starú triedu pre kompatibilitu */
.shift-grid thead th.day-col.weekend {
    background: #495057;
}
/* Brigádnička bez určenej predajne — dostupná ale bez predajne */
.shift-brig-free {
    background-color: #fffde7 !important;  /* jemná žltá — môže prísť */
    border: 1px dashed #f9a825 !important;
}

/* Brigádnička bez určenej predajne — oranžový indikátor */
.brig-no-store::after {
    content: "?";
    position: absolute;
    top: 1px;
    right: 2px;
    font-size: 0.55rem;
    color: #e67e00;
    font-weight: bold;
    line-height: 1;
}
.brig-no-store { position: relative; }

/* Oddelenie týždňov — výraznejší border na pondelok */
.shift-grid th.day-col.week-start,
.shift-grid td.day-cell.week-start {
    border-left: 2px solid #6c757d !important;
}

/* Zvýraznenie celých stĺpcov — sobota, nedeľa, sviatok */
.shift-grid td.day-cell.col-sat {
    box-shadow: inset 0 0 0 100px rgba(0,0,0,0.06);
}
.shift-grid td.day-cell.col-sun {
    box-shadow: inset 0 0 0 100px rgba(0,0,0,0.09);
}
.shift-grid td.day-cell.col-holiday {
    box-shadow: inset 0 0 0 100px rgba(80,0,120,0.07);
}

/* Dátové bunky */
.shift-grid .day-cell {
    width: 46px;
    min-width: 46px;
    max-width: 46px;
    text-align: center;
    padding: 3px 2px;
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
    font-size: 0.7rem;
    vertical-align: middle;
    line-height: 1.2;
}

.shift-grid .day-cell:hover {
    outline: 2px solid #0d6efd;
    outline-offset: -2px;
    z-index: 1;
    position: relative;
}

/* Riadok — striedavé pozadie */
.shift-grid tbody tr:nth-child(odd) .employee-col {
    background: #f8f9fa;
}
.shift-grid tbody tr:nth-child(even) .employee-col {
    background: #fff;
}

/* ===== FARBY ZMIEN ===== */
/* Práca a výpomoc sú farbené inline štýlom podľa predajne (STORE_COLORS) */
/* shift-praca a shift-vypomoc farbu riadi inline style podľa predajne */
.shift-praca   { background-color: transparent; }
.shift-vypomoc { background-color: transparent; }
/* [HERMES 2026-10-21] Majka: "A BY SOM EŠTE PRIVÍTALA KEBY OZNAČOVANIE
   DOV, PN, LV, … BOLO BEZ FARIEB, ABY SA FAREBNE NEPREKRÝVALI S PREVÁDZKAMI.
   NAPRÍKLAD V TOPE JE KATJA prec a je tam aj na žlto vyplnená prevádzka TOP"

   RIEŠENIE: absencie NEMAJÚ farebné pozadie — len biely podklad
   + farebný TEXT a ľavý pruh. Farba predajne tak zostane čitateľná.
   Predtým: .shift-dov = #ffe08a (rovnaká žltá ako TOP) -> mätúce. */

.shift-dov {
    background-color: #fff !important;
    color: #8a5a00 !important;
    box-shadow: inset 3px 0 0 #e0a800;
    font-weight: 700;
}
.shift-pn {
    background-color: #fff !important;
    color: #a30018 !important;
    box-shadow: inset 3px 0 0 #d9534f;
    font-weight: 700;
}
.shift-lv {
    background-color: #fff !important;
    color: #5200a3 !important;
    box-shadow: inset 3px 0 0 #8e44ad;
    font-weight: 700;
}
/* [HERMES 2026-10-16] A2-A4: nove kody absencii — farby odlisne od DOV/PN/LV */
.shift-ocr {
    background-color: #fff !important;
    color: #a34200 !important;
    box-shadow: inset 3px 0 0 #e07b39;
    font-weight: 700;
}
.shift-doprovod {
    background-color: #fff !important;
    color: #145c34 !important;
    box-shadow: inset 3px 0 0 #28a745;
    font-weight: 700;
}
.shift-md {
    background-color: #fff !important;
    color: #8c1245 !important;
    box-shadow: inset 3px 0 0 #d63384;
    font-weight: 700;
}
.shift-rd {
    background-color: #fff !important;
    color: #0b4a63 !important;
    box-shadow: inset 3px 0 0 #17a2b8;
    font-weight: 700;
}
.shift-ho {
    background-color: #fff !important;
    color: #003a7a !important;
    box-shadow: inset 3px 0 0 #4a90e2;
    font-weight: 700;
}
.shift-volno   { background-color: #f8f9fa !important; color: #adb5bd !important; }
.shift-ine     { background-color: #fff3cd !important; color: #664d03; }
.shift-expected-off { background-color: #f1f3f5 !important; color: #adb5bd !important; }

/* ===== LEGENDA ===== */
.legend-box {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    margin-right: 4px;
    vertical-align: middle;
    border: 1px solid rgba(0,0,0,0.18);
}

/* ===== PREDAJŇA NADPIS ===== */
.store-header {
    background: #343a40;
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px 4px 0 0;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.store-header .badge {
    font-size: 0.72rem;
}

/* ===== FILTER ===== */
.store-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}
.store-filter-bar .btn {
    font-size: 0.78rem;
    padding: 3px 10px;
}

/* ===== MENO v bunke ===== */
.emp-name {
    font-weight: 600;
    font-size: 0.78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    display: block;
}
/* [HERMES 2026-10-22] Michal: "Telefonne cislo ponechaj, ale vytvor mu vlastny stlpec" */
.emp-tel {
    font-size: 0.62rem;
    color: #adb5bd;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 105px;
    display: block;
    font-family: Consolas, monospace;
}
.emp-id {
    font-size: 0.65rem;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 155px;
    display: block;
}

/* ===== HODINY V BUNKE ===== */
.cell-shift {
    line-height: 1.15;
}
.cell-hours {
    font-size: 0.6rem;
    color: #555;
    opacity: 0.8;
    line-height: 1;
}
/* [HERMES 2026-11-25] bod 5B: stĺpec "Potvrd." v Rozpise */
.conf-badge { display:inline-block; font-size:0.64rem; font-weight:800;
              padding:1px 6px; border-radius:6px; white-space:nowrap; }
.conf-all  { background:#dcfce7; color:#166534; }
.conf-part { background:#fef3c7; color:#92400e; }
.conf-none { background:#f1f3f5; color:#6c757d; }
.emp-conf-col { width:62px; }

.cell-avail {
    color: #2f9e44;
    font-weight: 700;
    font-size: 0.85rem;
    line-height: 1;
}

/* [HERMES 2026-11-13] Michal (bod 10): "dostupnost, ktoru nam poslali v exceli
   a ktoru sme zadali v administracii my, nie on" -> admin = MODRÁ (odlíšiť
   od zelenej, ktorú zadala sama zamestnankyňa) */
.cell-avail.admin,
.cell-avail.admin .cell-avail-check,
.cell-avail.admin .cell-avail-hours {
    color: #1e6fd9 !important;
    background: #e7f2ff;
    border-radius: 4px;
    padding: 0 3px;
}
.cell-avail-badge.admin {
    background: #e7f2ff !important;
    color: #1e6fd9 !important;
    border-color: #93c5fd !important;
}

/* ===== ZAMOK RIADKU ZAMESTNANCA (Funkcia A) ===== */
.lock-icon {
    cursor: pointer;
    font-size: 0.72rem;
    margin-left: 3px;
    user-select: none;
}
.row-locked td { opacity: 0.65; }
.row-locked .day-cell { cursor: default; pointer-events: none; }

/* ===== SÚHRN RIADOK ===== */
.shift-grid tbody tr.summary-row td {
    background: #343a40 !important;
    color: #fff;
    font-weight: 600;
}
.shift-grid tbody tr.summary-row .employee-col {
    background: #343a40 !important;
    color: #fff;
}

/* ===== DOSTUPNOSŤ GRID ===== */
.avail-yes   { background-color: #b7e4c7 !important; cursor: pointer; }
.avail-no    { background-color: #ffc9ce !important; cursor: pointer; }
.avail-no-dov { background-color: #ffe8cc !important; color: #7a3000; cursor: pointer; }
.avail-no-pn  { background-color: #ffd6e0 !important; color: #7a0033; cursor: pointer; }
.avail-unset { background-color: #f8f9fa !important; cursor: pointer; }
/* [HERMES 2026-10-21] Majka: "LEN MI TAM CHÝBA MOŽNOSŤ ,,EŠTE NEVIEM,," */
.avail-unknown { background-color: #e2e3e5 !important; color: #6c757d !important;
                 cursor: pointer; font-weight: 700; }
.avail-conflict {
    box-shadow: inset 0 0 0 2px #dc3545 !important;
    position: relative;
}

/* Bunky v dostupnosti — väčšie pre lepšiu čitateľnosť */
#availabilityGrid .day-cell {
    min-width: 46px;
    height: 54px;
    vertical-align: middle;
    text-align: center;
    padding: 2px 1px;
    font-size: 0.7rem;
    line-height: 1.3;
}

.avail-reason-tag {
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.3;
    display: block;
}

/* ===== KONFLIKT DOSTUPNOSŤ ↔ ROZPIS ===== */
.day-cell.cell-conflict {
    border: 2px solid #dc3545 !important;
    position: relative;
}
.cell-conflict-badge {
    position: absolute;
    top: 1px;
    right: 2px;
    font-size: 0.62rem;
    color: #dc3545;
    line-height: 1;
    z-index: 2;
}
.day-cell.cell-avail-reason-bg {
    background-color: #fdeaea !important;
}
.cell-avail-reason {
    font-size: 0.6rem;
    color: #c92a2a;
    font-weight: 700;
    line-height: 1;
}

/* ===== RÝCHLE TLAČIDLÁ V MODÁLI (Funkcia E) ===== */
.quick-template-btn,
.quick-code-btn {
    min-width: 64px;
    font-weight: 600;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

/* ===== SELF-SERVICE STRÁNKA /me (Funkcia D) ===== */
.me-logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: #343a40;
}
.me-grid-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 4px;
}
.me-grid-header-cell {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #666;
}
.me-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}
.me-cell {
    position: relative;
    min-height: 48px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.72rem;
    padding: 4px;
    text-align: center;
    user-select: none;
}
.me-cell-check,
.me-cell-question,
.me-cell-stale-badge {
    position: absolute;
    top: 2px;
    right: 3px;
    font-size: 0.6rem;
    line-height: 1;
    font-weight: 700;
}
.me-cell-check {
    color: #6ee7a0;
}
.me-cell-question {
    color: #495057;
    background: #ffe08a;
    border-radius: 50%;
    width: 13px;
    height: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* [HERMES 2026-10-16] E5: smena sa zmenila po potvrdeni — vyzva potvrdit znovu */
.me-cell-stale {
    outline: 2px dashed #e07b1a;
    outline-offset: -2px;
}
.me-cell-stale .me-cell-shift {
    text-decoration: line-through;
    opacity: 0.65;
}
.me-cell-stale-badge {
    color: #fff;
    background: #e07b1a;
    border-radius: 50%;
    width: 13px;
    height: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.me-cell-empty {
    visibility: hidden;
    cursor: default;
}
.me-cell-day {
    font-weight: 700;
    font-size: 0.9rem;
}
.me-cell-shift {
    font-size: 0.6rem;
    margin-top: 2px;
    line-height: 1.1;
}
.me-cell-reason {
    font-size: 0.6rem;
    margin-top: 2px;
    line-height: 1.1;
    font-weight: 700;
}
.me-cell-locked {
    background-color: #495057 !important;
    color: #fff !important;
    cursor: default;
}
.me-locked {
    background-color: #495057;
}

/* ===== ZÁLOŽKY MESIACOV ===== */
.month-tabs {
    display: flex;
    align-items: center;
    gap: 14px;
}
.month-tab {
    font-size: 0.85rem;
    color: #495057;
    text-decoration: none;
    padding: 4px 6px;
}
.month-tab:hover {
    text-decoration: underline;
}
.month-tab.active {
    font-weight: 700;
    color: #212529;
    font-size: 0.95rem;
}

/* ===== PRELIV DO NASLEDUJÚCEHO MESIACA ===== */
.day-col.overflow,
.day-cell.overflow {
    background-color: #e8f4ff;
}
.day-cell.overflow.shift-volno {
    background-color: #e8f4ff !important;
}

/* ===== MULTI-SEGMENT BUNKY (BA pendlovanie) ===== */
.cell-segment {
    font-size: 0.65rem;
    line-height: 1.1;
}
.cell-seg-divider {
    border-top: 1px solid rgba(0, 0, 0, 0.15);
    margin: 1px 0;
}

/* ===== "KTO MÔŽE PRÍSŤ" KANDIDÁTI ===== */
.candidate-section-title {
    font-size: 0.78rem;
    font-weight: 700;
    margin: 10px 0 4px;
}
.candidate-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.78rem;
    margin-bottom: 3px;
}
.candidate-row:hover {
    outline: 1px solid #0d6efd;
}
.candidate-row.cand-dostupne { background-color: #d8f3dc; }
.candidate-row.cand-mozne { background-color: #ffe8b3; }
.candidate-row.cand-nezname { background-color: #f1f3f5; }
.candidate-row.cand-nedostupne { background-color: #f8d7da; cursor: default; }
.candidate-badge {
    font-size: 0.62rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(0,0,0,0.08);
}
.candidate-name {
    font-weight: 600;
    min-width: 110px;
}
.candidate-reason {
    color: #495057;
    flex: 1;
}

/* ===== COVERAGE GRID ===== */
.coverage-cell {
    text-align: center;
    padding: 4px 3px;
    cursor: pointer;
    vertical-align: middle;
    font-size: 0.68rem;
    min-width: 60px;
}
.coverage-ok   { background-color: #b7e4c7 !important; }
.coverage-warn { background-color: #ffe08a !important; }
.coverage-bad  { background-color: #f4a0aa !important; }
.coverage-names {
    font-size: 0.6rem;
    color: #333;
    white-space: normal;
    line-height: 1.1;
}

/* ===== OBSADENOSŤ — kto kde fyzicky pracuje ===== */
.cov-native  { background-color: #b7e4c7 !important; color: #1a5c35; }
.cov-vypomoc { background-color: #a0c4ff !important; color: #003a7a; }
.cov-brig    { background-color: #ffcc00 !important; color: #3d2c00; }
.cov-empty   { background-color: #e9ecef !important; }
.cov-cell-name {
    font-weight: 600;
    line-height: 1.2;
    font-size: 0.68rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}
.cov-cell-time {
    font-size: 0.62rem;
    font-weight: 500;
    opacity: 0.9;
    line-height: 1.2;
    display: block;
}
/* Zjednotenie výšky buniek v obsadenosti */
#coverageGrid .day-cell {
    height: 44px;
    vertical-align: middle;
    padding: 2px 3px;
    text-align: center;
}

/* ===== KRITICKÝ NEDOSTATOK ĽUDÍ — súhrn riadok v coverage.html ===== */
.legend-box.cov-summary-critical { background-color: #e03131; }
.legend-box.cov-summary-warning  { background-color: #2f9e44; }
.legend-box.cov-summary-ok       { background-color: #f08c00; }
.cov-summary-cell {
    cursor: pointer;
}
.cov-summary-cell:hover {
    outline: 2px solid #fff;
    outline-offset: -2px;
    position: relative;
    z-index: 1;
}
.shift-grid tbody tr.summary-row td.cov-summary-critical {
    background-color: #e03131 !important;
    color: #fff !important;
    font-weight: 700;
    box-shadow: inset 0 0 0 2px #ffa8a8;
}
.shift-grid tbody tr.summary-row td.cov-summary-warning {
    background-color: #2f9e44 !important;
    color: #fff !important;
    font-weight: 700;
}
.shift-grid tbody tr.summary-row td.cov-summary-ok_low {
    background-color: #ffb3c6 !important;
    color: #7a0033 !important;
    font-weight: 600;
}
.legend-box.cov-summary-ok_low { background-color: #ffb3c6; }

.shift-grid tbody tr.summary-row td.cov-summary-overstaffed {
    background-color: #e03131 !important;
    color: #fff !important;
    font-weight: 700;
}
.legend-box.cov-summary-overstaffed { background-color: #e03131; }

.shift-grid tbody tr.summary-row td.cov-summary-ok {
    background-color: #f08c00 !important;
    color: #fff !important;
}

/* ===== KRITICKÉ DNI — samostatný riadok pod SÚHRN v coverage.html ===== */
.shift-grid tbody tr.critical-row td.cov-crit-critical {
    background-color: #e03131 !important;
    color: #fff !important;
    font-weight: 700;
    cursor: pointer;
}
.shift-grid tbody tr.critical-row td.cov-crit-warning {
    background-color: #f08c00 !important;
    color: #fff !important;
    font-weight: 700;
    cursor: pointer;
}


/* ===== SCROLL ŠÍPKY ===== */
.grid-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 28px;
    height: 52px;
    background: rgba(52,58,64,0.85);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.15s;
}
.grid-scroll-btn:hover { background: #343a40; }
.grid-scroll-left  { left: 0; }
.grid-scroll-right { right: 0; }

.emp-contract {
    font-size: 0.58rem;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 3px;
    display: inline-block;
    margin-top: 1px;
    letter-spacing: 0.02em;
}
.emp-contract-tpp   { background: #d0e8ff; color: #003a7a; }
.emp-contract-half  { background: #fff0b3; color: #7a5000; }
.emp-contract-three { background: #ffe0b3; color: #7a3000; }
.emp-contract-brig  { background: #e8e8e8; color: #555; }

.cell-store-badge {
    font-size: 0.58rem;
    font-weight: 700;
    line-height: 1;
    opacity: 0.75;
    letter-spacing: 0.02em;
}

.emp-fond-block {
    margin-top: 2px;
    width: 100%;
}
.emp-fond-line {
    font-size: 0.68rem;
    line-height: 1.2;
    white-space: nowrap;
}

.emp-fond {
    font-size: 0.65rem;
    display: block;
    margin-top: 1px;
    line-height: 1.2;
}

/* ===== SÚHRN MESIACA (/sumar) ===== */
.sumar-cards {
    margin-top: 4px;
}
.sumar-card {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 8px 12px;
    height: 100%;
}
.sumar-card-label {
    font-size: 0.7rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.sumar-card-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: #212529;
}

.sumar-table {
    font-size: 0.8rem;
    margin: 0;
}
.sumar-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #343a40;
    color: #fff;
    white-space: nowrap;
}

.sumar-store-row td {
    background: #343a40 !important;
    color: #fff;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 5px 10px;
}

.sumar-row-full { background-color: #d8f3dc; }
.sumar-row-warn { background-color: #fff3bf; }
.sumar-row-bad  { background-color: #ffd6d6; }
.sumar-row-brig { background-color: #e9ecef; color: #666; }

.sumar-progress {
    position: relative;
    width: 100%;
    height: 16px;
    background: rgba(0,0,0,0.08);
    border-radius: 4px;
    overflow: hidden;
}
.sumar-progress-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: #2f9e44;
}
.sumar-progress-label {
    position: relative;
    z-index: 1;
    display: block;
    text-align: center;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 16px;
    color: #212529;
}

@media print {
    .navbar, form, .month-tabs, .sumar-cards .col-md-3:last-child { display: none !important; }
}

/* [HERMES 2026-10-16] D4: dostupnost s casom priamo v rozpise */
.cell-avail-time {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.05;
}
.cell-avail-time .cell-avail-check {
    font-size: 0.62rem;
}
.cell-avail-time .cell-avail-hours {
    font-size: 0.56rem;
    font-weight: 600;
    color: #1a6b3a;
    white-space: nowrap;
}

/* [HERMES 2026-10-16] Klikacia legenda — zvyraznenie predajne po prekliknuti */
.legend-highlight {
    background-color: #fff9db !important;
    border-radius: 6px;
    padding: 4px;
}

/* ===== [HERMES 2026-10-16] D1: HROMADNE OZNACOVANIE BUNIEK ===== */
.d1-bar {
    position: sticky;
    top: 0;
    z-index: 1050;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #212529;
    color: #fff;
    padding: 7px 12px;
    border-radius: 6px;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    font-size: 0.85rem;
}
.d1-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #212529;
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.85rem;
    z-index: 2000;
    transition: opacity .25s;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    pointer-events: none;
}
.d1-bar .btn { font-size: 0.75rem; }
/* oznacena bunka */
.shift-grid td.day-cell.d1-selected {
    outline: 3px solid #0d6efd !important;
    outline-offset: -3px;
    position: relative;
}
.shift-grid td.day-cell.d1-selected::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(13, 110, 253, 0.18);
    pointer-events: none;
}

/* ===== [HERMES 2026-10-16] BOD 5: VYRAZNE NEOBSADENE / PRAZDNE BUNKY =====
   Majka: "dievčatá nevidia hneď červené alebo neobsadené zmeny" */
.shift-grid td.day-cell.shift-volno:not(.overflow):not(.week-start) {
    background-image: repeating-linear-gradient(
        45deg, transparent, transparent 4px,
        rgba(220, 53, 69, 0.06) 4px, rgba(220, 53, 69, 0.06) 8px);
}
/* pracovny den, nikto nic — vyrazny cerveny ramecek */
.shift-grid td.day-cell.shift-volno.d1-empty-warn {
    outline: 2px dashed #dc3545;
    outline-offset: -2px;
}
/* konflikt — vyrazne */
.shift-grid td.day-cell.cell-conflict {
    outline: 2px solid #dc3545 !important;
    outline-offset: -2px;
    animation: d1pulse 2s ease-in-out 3;
}
@keyframes d1pulse {
    0%, 100% { box-shadow: inset 0 0 0 0 rgba(220,53,69,0); }
    50% { box-shadow: inset 0 0 12px 0 rgba(220,53,69,0.5); }
}

/* ===== [HERMES 2026-10-16] ROZDELENIE PRVEHO STLPCA (Majka: "riadok je prilis vysoky") ===== */
.shift-grid .emp-id-col,
.shift-grid .emp-uvazok-col,
.shift-grid .emp-fond-col,
.shift-grid .emp-chyba-col,
.shift-grid .emp-akcie-col {
    padding: 2px 4px !important;
    font-size: 0.66rem;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}
.shift-grid .emp-name-col {
    padding: 2px 6px !important;
    vertical-align: middle;
    min-width: 140px;
    max-width: 190px;
}
.shift-grid .emp-name-col .emp-name {
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}
/* uzke stlpce v hlavicke */
.shift-grid thead th.emp-id-col,
.shift-grid thead th.emp-uvazok-col,
.shift-grid thead th.emp-fond-col,
.shift-grid thead th.emp-chyba-col,
.shift-grid thead th.emp-akcie-col {
    font-size: 0.62rem;
    padding: 2px 3px !important;
    text-align: center;
    background: #343a40;
    color: #fff;
    white-space: nowrap;
}
.shift-grid thead th.emp-id-col { width: 76px; }
.shift-grid thead th.emp-tel-col { width: 100px; }
.shift-grid thead th.emp-uvazok-col { width: 56px; }
.shift-grid thead th.emp-fond-col { min-width: 84px; }
.shift-grid thead th.emp-chyba-col { width: 62px; }
.shift-grid thead th.emp-akcie-col { width: 58px; }

/* fond compact */
.shift-grid .emp-fond-col .emp-fond-line { font-size: 0.66rem; line-height: 1.25; }
.shift-grid .emp-fond-col .emp-fond-block { min-width: 76px; }
/* chyba stlpec */
.shift-grid .emp-chyba-col .chyba-val { font-weight: 700; font-size: 0.68rem; }
.shift-grid .emp-chyba-col .chyba-ok  { color: #198754; font-size: 0.68rem; }
.shift-grid .emp-chyba-col .chyba-miss { color: #dc3545; font-size: 0.68rem; }
/* akcie compact */
.shift-grid .emp-akcie-col .btn { font-size: 0.58rem !important; padding: 0 4px !important; line-height: 1.6; margin: 0 !important; }
/* zmensenie vysky riadku */
.shift-grid tbody tr { height: auto; }
.shift-grid td.day-cell { height: 42px; }

/* ===== [HERMES 2026-10-19] ČIASTOČNÁ DOSTUPNOSŤ (môžem len od-do) ===== */
.me-cell.avail-partial {
    background: #ffc107 !important;
    color: #664d03 !important;
}
.me-cell-time {
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 1.1;
}
.legend-box.avail-partial { background-color: #ffc107; }

/* ===== [HERMES 2026-10-19] PREDAJA V BUNKE (Michal: "musia vidiet v ktorej predajni") ===== */
.me-cell-store {
    font-size: 0.52rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.3px;
    opacity: 0.85;
    margin-top: 1px;
}
.me-cell.avail-partial { background: #ffc107 !important; color: #664d03 !important; }
.me-cell-time { font-size: 0.58rem; font-weight: 700; line-height: 1.1; }
.legend-box.avail-partial { background-color: #ffc107; }

/* [HERMES 2026-11-01] Majka: dostupnost pri obsadenej zmene musi byt VIDIET
   — pruzok pod hodinami, aby Majka pri hladani nahrady hned vedela,
     ze dievca povodne mohlo cely den */
.cell-avail-badge {
    margin-top: 2px;
    padding: 1px 3px;
    font-size: 0.56rem;
    font-weight: 800;
    line-height: 1.15;
    border-radius: 3px;
    background: #d3f9d8;
    color: #1a6b3a;
    border: 1px solid #8ce99a;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.02em;
}
/* ak ide o obmedzenu dostupnost (nie cely den) -> vyraznejsie */
.cell-avail-badge.obmedzene {
    background: #fff3bf;
    border-color: #ffd43b;
    color: #8a6100;
}

/* ══════════════════════════════════════════════════════════════════
   [HERMES 2026-11-25] Michal (bod 11): panel "Potrebné vykrytie"
   v Obsadenosti — konkrétny deň, celý deň / časť dňa, čas od-do, predajňa
   ══════════════════════════════════════════════════════════════════ */
.vykrytie-panel {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 12px;
}
.vykrytie-head {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.84rem; color: #991b1b; margin-bottom: 7px;
}
.vykrytie-n {
    background: #dc2626; color: #fff; font-size: 0.68rem;
    font-weight: 800; padding: 1px 7px; border-radius: 10px;
}
.vykrytie-link {
    margin-left: auto; font-size: 0.74rem; font-weight: 700;
    color: #991b1b; text-decoration: underline;
}
.vykrytie-list { display: flex; flex-direction: column; gap: 5px; }
.vykrytie-item {
    display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
    background: #fff; border: 1px solid #fecaca; border-radius: 7px;
    padding: 5px 9px; font-size: 0.76rem;
}
.vykrytie-datum { font-weight: 900; color: #991b1b; min-width: 52px; }
.vykrytie-store {
    font-weight: 700; background: #fee2e2; color: #991b1b;
    padding: 1px 7px; border-radius: 5px; font-size: 0.7rem;
}
.vykrytie-cas {
    font-family: ui-monospace, monospace; font-weight: 700; color: #b91c1c;
}
.vykrytie-cely {
    background: #fecaca; color: #7f1d1d; padding: 1px 7px;
    border-radius: 5px; font-size: 0.68rem; font-weight: 800;
}
.vykrytie-typ {
    background: #e5e7eb; color: #374151; padding: 1px 7px;
    border-radius: 5px; font-size: 0.66rem; font-weight: 800;
}
.vykrytie-poz { color: #6b7280; font-size: 0.72rem; font-style: italic; }
