/* ════════════════════════════════════════════════════════════════════════
   pp-mobile.css — mobilná vrstva petpass2 (lekári na telefóne)

   Načítava sa POSLEDNÁ v <head> (layouts/head.blade.php), takže prebíja tému.
   Desktop (≥ 992 px) nemení VÔBEC — všetko je zavreté v media queries.

   Rozsahy:
     • ≤ 991.98 px  (tablet + telefón): drobné úpravy hlavičky
     • ≤ 767.98 px  (telefón): plný mobilný režim — spodná navigácia,
       fullscreen vyhľadávanie, menu sheet, kartová čakáreň, login…
   Spodnú navigáciu, vyhľadávanie a sheet kreslí assets/js/pp-mobile.js.
   ════════════════════════════════════════════════════════════════════════ */

/* Mobilné prvky sú mimo telefónu VŽDY schované. JS ich na desktope nestavia,
   ale prechodná malá šírka (otváranie okna, rotácia) ich postaviť môže —
   bez tejto poistky by na širokom okne ostali visieť neoštýlované. */
#pp-mnav, #pp-msearch, #pp-msheet, #pp-mday, #pp-mdayfs { display: none; }

/* ── TABLET + TELEFÓN ──────────────────────────────────────────────────── */
@media (max-width: 991.98px) {
    html { -webkit-text-size-adjust: 100%; }
}

/* ── TELEFÓN ───────────────────────────────────────────────────────────── */
@media (max-width: 767.98px) {

    /* ═ 1 ═ CHRÓM APPKY ─ hlavička, menu, plocha ═══════════════════════ */

    /* miesto pre spodnú navigáciu (+ iPhone home-indicator) */
    body.app.pp-mobile-app { padding-bottom: calc(66px + env(safe-area-inset-bottom)) !important; }

    /* Hlavička: jeden kompaktný riadok — logo vľavo, ikony vpravo.
       Téma ju drží fixne (position:fixed) a rezervuje 96px — na telefóne nech
       scrolluje s obsahom, stálym chrómom je spodná navigácia. */
    body.pp-mobile-app .hor-header {
        position: static !important; min-height: 0; height: auto;
        padding: 0; border-bottom: 1px solid #eceafa;
    }
    .hor-header .container { padding-left: 12px; padding-right: 12px; }
    .hor-header > .container > .d-flex { align-items: center; min-height: 54px; }
    /* téma značku na malých displejoch skrýva — vraciame ju */
    .hor-header .header-brand { display: flex !important; align-items: center; margin: 0 auto 0 0; padding: 0; line-height: 0; }
    .hor-header .header-brand-img { height: 30px; width: auto; margin: 0 !important; display: inline-block; }
    /* téma na mobile prepína na .mobile-logo — máme jeden obrázok, ukáž ho */
    .hor-header .header-brand-img.desktop-lgo,
    .hor-header .header-brand-img.dark-logo,
    .hor-header .header-brand-img.darkmobile-logo { display: none !important; }
    .hor-header .header-brand-img.mobile-logo { display: inline-block !important; }

    /* hamburger témy a select2 vyhľadávanie z hlavičky preč (nahrádza ich
       spodná navigácia + fullscreen vyhľadávanie) */
    .animated-arrow.hor-toggle { display: none !important; }
    .hor-header .form-inline, .hor-header .search-element { display: none !important; }

    /* hračky pre desktop: fluid prepínač a dark-mode switch */
    #fluid-button, .hor-header .dropdown.dark-mode { display: none !important; }

    /* lupa v hlavičke — otvára mobilné vyhľadávanie (pp-mobile.js) */
    .hor-header .navsearch { display: flex !important; align-items: center; padding: 8px !important; }
    .hor-header .navsearch .header-icon { width: 24px; height: 24px; fill: #5c678f; }

    .hor-header .nav-link.icon { padding: 8px; }
    .hor-header .profile-dropdown .avatar-md { width: 34px; height: 34px; line-height: 34px; }

    /* horné menu je na telefóne nahradené spodnou navigáciou */
    body.pp-mobile-app .sticky,
    body.pp-mobile-app .horizontal-main { display: none !important; }
    /* téma rezervuje miesto pod fixné menu — bez menu netreba */
    body.pp-mobile-app .hor-content.main-content { margin-top: 0 !important; }

    /* plocha: pokojné svetlé pozadie, obsah od kraja ku kraju s dychom */
    body.pp-mobile-app { background: #f6f5fc; }
    #mainContainer { padding-left: 12px; padding-right: 12px; max-width: none; }

    /* Plávajúce doky: pacienti a rozvrh sa na telefón nevojdú a ostávajú
       skryté. CHAT ale musí byť dostupný aj z telefónu — žijú v ňom hlásenia
       chýb (#5536); sedí nad spodnou navigáciou (#pp-mnav, ~60px + safe area). */
    body.pp-mobile-app #patients-container,
    body.pp-mobile-app #timetable-container { display: none !important; }
    body.pp-mobile-app #chat_dock { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
    body.pp-mobile-app #chat_dock .cd-toast { bottom: calc(120px + env(safe-area-inset-bottom, 0px)); }
    body.pp-mobile-app footer.footer { display: none !important; }
    #back-to-top { display: none !important; }
    /* lokálny debugbar by prekryl spodnú navigáciu (na prode nie je) */
    body.pp-mobile-app .phpdebugbar { display: none !important; }

    /* hlavička stránky: len titulok, breadcrumb je balast */
    .page-header { margin: 14px 0 10px; padding: 0; display: block; }
    .page-header .breadcrumb, .page-rightheader { display: none !important; }
    .page-title { font-size: 19px; line-height: 1.25; }

    /* ═ 2 ═ VŠEOBECNÉ ─ karty, tabuľky, formuláre, modály ══════════════ */

    .card { border-radius: 14px; border: 1px solid #eceafa; box-shadow: 0 4px 18px -8px rgba(42, 36, 64, .10); margin-bottom: 14px; }
    .card-header { padding: 12px 14px; }
    .card-title { font-size: 15px; }
    .card-body { padding: 12px; }
    .card-footer { padding: 9px 14px; font-size: 12px; color: #8a85a8; }

    /* tabuľky: menšie písmo + hladký horizontálny posun namiesto rozbitia */
    .card .table { font-size: 12.5px; }
    .card .table th, .card .table td { padding: 8px 10px; }
    .table-responsive { -webkit-overflow-scrolling: touch; }

    /* DataTables (história návštev, knihy…): bez lámania textu po znakoch —
       riadky sa zrazia na výšku obsahu a šírku rieši horizontálny posun */
    table.dataTable td, table.dataTable th { white-space: nowrap; }
    table.dataTable { font-size: 12.5px; }
    table.dataTable td .btn-sm { padding: 4px 9px; }
    .dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter { text-align: left; margin-bottom: 6px; float: none; }
    .dataTables_wrapper .dataTables_info { font-size: 12px; }

    /* prepínač „Starý | Nový" prehľad — na telefóne zbytočný chróm */
    body.pp-mobile-app .float-right.btn-group { display: none !important; }

    /* formuláre: 16px = iOS Safari pri fokusе nezoomuje */
    .form-control, .select2-search__field, input, select, textarea { font-size: 16px !important; }
    .form-control { min-height: 44px; }
    select.form-control:not([size]):not([multiple]) { height: 44px; }
    /* POZOR: btn-sm nechať malé — 42px min-height nafukovalo tlačidlá v tabuľkách
       (2 pod sebou = 84px vysoký riadok a strany plné prázdneho miesta) */
    .btn:not(.btn-sm) { min-height: 42px; }
    .btn:not(.btn-sm):not(.btn-lg) { padding-top: 9px; padding-bottom: 9px; }

    /* modály: skoro celá obrazovka, veľké dotykové ciele.
       !important: štýly Vue komponentov (napr. .qs-dialog 720px) sa vstrekujú
       za behu AŽ ZA tento súbor, inak by na telefóne pretiekli displej. */
    .modal-dialog { margin: 10px auto; max-width: calc(100vw - 20px) !important; width: auto; }
    .modal-content { border-radius: 14px; }
    .modal-body { max-height: calc(100dvh - 190px); overflow-y: auto; -webkit-overflow-scrolling: touch; }

    /* select2 dropdown nech nikdy nepretečie displej */
    .select2-container { max-width: 100%; }
    .select2-dropdown { max-width: calc(100vw - 20px); }

    /* SweetAlert2 */
    .swal2-popup { width: calc(100vw - 28px) !important; border-radius: 16px !important; }

    /* ═ 3 ═ NÁSTENKA ═══════════════════════════════════════════════════ */

    /* počítadlá v hlavičkách kariet (čakáreň, hospitalizácia): mriežka 2×2 */
    .wr-header, .hosp-header { flex-wrap: wrap; gap: 8px; }
    /* dekoračný fialový jazýček témy pri titulku — na fullbleed layoute trčí z kraja */
    .wr-header::before, .hosp-header::before { display: none !important; content: none !important; }
    .wr-counters, .hosp-counters { display: grid !important; grid-template-columns: 1fr 1fr; gap: 6px; width: 100%; margin: 2px 0 0; }
    .wr-counter, .hosp-counter { background: #faf9ff; border: 1px solid #efecfb; border-radius: 10px; padding: 6px 10px; margin: 0 !important; }

    /* ── Čakáreň: z tabuľky sú karty pacientov ── */
    #waiting-room-component .card { background: transparent; border: 0; box-shadow: none; }
    #waiting-room-component > .card > .card-header { background: transparent; border: 0; padding: 2px 2px 10px; }
    #waiting-room-component .card-body { padding: 0 !important; background: transparent; }
    #waiting-room-component .table-responsive { overflow: visible; }
    #waiting-room-component .table { display: block; background: transparent; border: 0 !important; }
    #waiting-room-component .table thead { display: none; }
    #waiting-room-component .table tbody { display: block; }
    #waiting-room-component .table tbody > tr {
        display: grid; grid-template-columns: 1fr 1fr; gap: 5px 10px;
        background: #fff; border: 1px solid #eceafa !important; border-radius: 14px;
        /* každá karta nesie stavový prúžok; bez stavovej triedy = Čakanie na príjem */
        border-left: 6px solid #b9b3e0 !important;
        padding: 10px 12px; margin-bottom: 10px;
        box-shadow: 0 4px 18px -8px rgba(42, 36, 64, .10);
    }
    #waiting-room-component .table tbody > tr > td {
        display: block; border: 0 !important; padding: 0 !important; background: transparent !important; white-space: normal;
    }
    /* stavové podfarbenie karty: prúžok + jemný nádych celej karty, nech je stav
       (Ambulancia / Hospitalizácia / Operácia / zaplatené) vidno na prvý pohľad */
    #waiting-room-component .table tbody > tr.bg-waiting-room-success { border-left-color: #22c993 !important; background: #e9faf3; }
    #waiting-room-component .table tbody > tr.bg-waiting-room-warning { border-left-color: #fdb901 !important; background: #fff7e0; }
    #waiting-room-component .table tbody > tr.bg-waiting-room-info    { border-left-color: #45aaf2 !important; background: #ebf6fe; }
    #waiting-room-component .table tbody > tr.bg-waiting-room-danger  { border-left-color: #fb5454 !important; background: #ffeded; }
    /* pás úhrady pod pacientom má vlastný jantárový akcent */
    #waiting-room-component .table tbody > tr.wr-pay-row { border-left-color: #f59e0b !important; }

    /* 1 klient/pacient  2 problém  3 rezervácia  4 časovače  5 nálada  6 lekár  7 stav */
    #waiting-room-component .table tbody > tr > td:nth-child(1) { grid-column: 1 / -1; font-size: 15px; }
    #waiting-room-component .table tbody > tr > td:nth-child(2) { grid-column: 1 / -1; font-size: 13px; color: #6b6b80; }
    #waiting-room-component .table tbody > tr > td:nth-child(2) a { color: #6b6b80; }
    #waiting-room-component .table tbody > tr > td:nth-child(3) { grid-column: 1; align-self: center; }
    #waiting-room-component .table tbody > tr > td:nth-child(4) { grid-column: 2; text-align: right; align-self: center; font-variant-numeric: tabular-nums; }
    #waiting-room-component .table tbody > tr > td:nth-child(5) { grid-column: 1; align-self: center; }
    #waiting-room-component .table tbody > tr > td:nth-child(6) { grid-column: 2; align-self: center; }
    #waiting-room-component .table tbody > tr > td:nth-child(7) { grid-column: 1 / -1; }
    /* prázdny stav („nikto nečaká") má jediné td */
    #waiting-room-component .table tbody > tr > td:only-child { grid-column: 1 / -1; text-align: center; }
    /* kompaktné prvky v karte pacienta čakárne: <br> medzery preč, selecty nižšie */
    #waiting-room-component .table tbody > tr > td:nth-child(1) br { display: none; }
    #waiting-room-component .table tbody > tr > td:nth-child(1) > * { margin-right: 5px; }
    #waiting-room-component .wr-mood { display: inline-flex; gap: 6px; }
    #waiting-room-component .wr-mood-btn { width: 38px; height: 38px; }
    #waiting-room-component .select2-container .select2-selection--single { height: 38px !important; }
    #waiting-room-component .select2-selection__rendered { line-height: 36px !important; }

    /* strip úhrady pod pacientom */
    #waiting-room-component tr.wr-pay-row { margin-top: -6px; border-top-left-radius: 0; border-top-right-radius: 0; }
    #waiting-room-component .wr-pay-strip { flex-wrap: wrap; gap: 8px; }
    #waiting-room-component .wr-pay-types { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
    #waiting-room-component .wr-pay-type { flex: 1 1 40%; min-height: 40px; }

    /* prázdny riadok „Recepcia:" pod čakárňou je na telefóne len šum */
    #waiting-room-component .card-footer { display: none; }

    /* ── Hospitalizácia (b-table #hosp-table): z tabuľky karty pacientov ── */
    #hosp-board .card { background: transparent; border: 0; box-shadow: none; }
    #hosp-board > .card > .card-header { background: transparent; border: 0; padding: 2px 2px 10px; }
    #hosp-board .card-body { padding: 0 !important; background: transparent; }
    #hosp-board .table-responsive { overflow: visible; }
    #hosp-table { display: block; background: transparent; border: 0 !important; }
    #hosp-table thead { display: none; }
    #hosp-table tbody { display: block; }
    #hosp-table tbody > tr {
        display: grid; grid-template-columns: 1fr auto; gap: 7px 12px;
        background: #fff; border: 1px solid #eceafa !important; border-radius: 14px;
        padding: 12px; margin-bottom: 10px;
        box-shadow: 0 4px 18px -8px rgba(42, 36, 64, .10);
    }
    #hosp-table tbody > tr > td {
        display: block; border: 0 !important; padding: 0 !important;
        background: transparent !important; white-space: normal; text-align: left !important;
    }
    /* 1 pacient · 2 dg/lekár · 3 pobyt · 4 nasleduje · 5 dnes · 6 akcie */
    #hosp-table tbody > tr > td:nth-child(1) { grid-column: 1; grid-row: 1; font-size: 14px; }
    #hosp-table tbody > tr > td:nth-child(5) { grid-column: 2; grid-row: 1; text-align: right !important; white-space: nowrap; align-self: start; }
    #hosp-table tbody > tr > td:nth-child(5) br { display: none; }
    #hosp-table tbody > tr > td:nth-child(5) .text-muted { margin-left: 4px; }
    #hosp-table tbody > tr > td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; font-size: 12.5px; color: #6b6b80; }
    #hosp-table tbody > tr > td:nth-child(2) br { display: none; }
    #hosp-table tbody > tr > td:nth-child(2) .text-muted { margin-left: 6px; }
    #hosp-table tbody > tr > td:nth-child(3) { grid-column: 1 / -1; grid-row: 3; font-size: 12.5px; }
    #hosp-table tbody > tr > td:nth-child(3) br { display: none; }
    #hosp-table tbody > tr > td:nth-child(3) > * { margin-right: 8px; }
    #hosp-table tbody > tr > td:nth-child(4) { grid-column: 1 / -1; grid-row: 4; background: #faf9ff; border: 1px solid #efecfb; border-radius: 10px; padding: 8px 10px !important; font-size: 12.5px; }
    #hosp-table tbody > tr > td:nth-child(6) { grid-column: 1 / -1; grid-row: 5; }
    #hosp-table .hosp-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
    #hosp-table .hosp-actions .btn { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; margin: 0 !important; }
    /* prázdny stav a rozbalený detail pobytu (colspan riadky) na celú šírku */
    #hosp-table tbody > tr > td:only-child { grid-column: 1 / -1; }
    #hosp-table tbody > tr.b-table-details { margin-top: -6px; border-top-left-radius: 0; border-top-right-radius: 0; }
    #hosp-table tbody > tr.b-table-details > td { grid-column: 1 / -1; }
    #hosp-table .lab-chevron { margin-right: 5px; }

    /* ostatné knihy na nástenke: nadpisy + posuvné tabuľky ostávajú */
    #medical-book-component .card-header { flex-wrap: wrap; gap: 8px; }

    /* štatistické grafy: jeden stĺpec (col-md-6 padá na 100 % samo, len dych) */
    #dashboard-container { margin-bottom: 4px; }

    /* ═ 3b ═ KARTA PACIENTA ─ bočné záložky → vodorovný pruh chipov ════ */

    /* stĺpec so záložkami na celú šírku; bez min-width:0 by ho nowrap
       obsah roztiahol na max-content a celá stránka by scrollovala do boku */
    .pp-side-col { flex: 0 0 100% !important; width: 100% !important; max-width: 100% !important; min-width: 0 !important; }
    .pp-side { width: 100%; max-width: 100%; }
    .pp-side .panel-tabs li { width: auto !important; min-width: 0; }
    .pp-side .panel-tabs {
        display: flex; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
        gap: 7px; padding: 2px 2px 10px; margin: 0; list-style: none;
        scrollbar-width: none;
    }
    .pp-side .panel-tabs::-webkit-scrollbar { display: none; }
    .pp-side .panel-tabs li { flex: 0 0 auto; float: none; margin: 0 !important; }
    .pp-side .panel-tabs li a {
        display: inline-flex !important; align-items: center; white-space: nowrap;
        width: auto !important; margin: 0 !important;
        border-radius: 22px !important; padding: 9px 14px !important;
    }
    .pp-side .pp-side-sep { display: inline-flex; align-items: center; color: #9a92c4; font-size: 12px; }

    /* ═ 3b2 ═ HISTÓRIA NÁVŠTEV (Diagnózy) ─ tabuľky → karty ═══════════ */

    /* Prípady mali 1 132 px a návštevy 1 089 px v 325 px kontajneri, ktorý má
       bootstrapácke `overflow-hidden` — obsah sa teda odrezal a nedal sa ani
       odscrollovať (lekár videl len diagnózu a kus dátumu). Riadok preto
       skladáme do karty, rovnako ako v čakárni a na hospitalizácii.
       Stĺpce návštev sa adresujú triedami pp-c-* (nie poradím): pri cudzej
       klinike chýbajú Uhradené/Cena a nth-child by ukazovalo na iné údaje. */
    #pp-patient-page .table-responsive.overflow-hidden { overflow: visible !important; }

    #tbl { display: block; background: transparent; border: 0 !important; }
    #tbl > thead { display: none; }
    #tbl > tbody { display: block; }
    #tbl > tbody > tr {
        display: grid; grid-template-columns: 1fr auto; gap: 6px 12px;
        background: #fff; border: 1px solid #eceafa !important; border-radius: 14px;
        padding: 12px; margin-bottom: 10px;
        box-shadow: 0 4px 18px -8px rgba(42, 36, 64, .10);
    }
    #tbl > tbody > tr > td {
        display: block; border: 0 !important; padding: 0 !important;
        background: transparent !important; white-space: normal; text-align: left !important;
        font-size: 12.5px;
    }
    /* 1 diagnóza · 2 od · 3 do · 4 plán · 5 lekár · 6 stav · 7 návštevy · 8 cena · 9 akcie */
    #tbl > tbody > tr > td:nth-child(1) { grid-column: 1 / -1; grid-row: 1; font-size: 15px; font-weight: 600; }
    #tbl > tbody > tr > td:nth-child(2) { grid-column: 1; grid-row: 2; }
    #tbl > tbody > tr > td:nth-child(3) { grid-column: 2; grid-row: 2; text-align: right !important; }
    #tbl > tbody > tr > td:nth-child(4) { grid-column: 1; grid-row: 3; }
    #tbl > tbody > tr > td:nth-child(7) { grid-column: 2; grid-row: 3; text-align: right !important; }
    #tbl > tbody > tr > td:nth-child(5) { grid-column: 1 / -1; grid-row: 4; color: #6b6b80; }
    #tbl > tbody > tr > td:nth-child(6) { grid-column: 1; grid-row: 5; align-self: center; }
    #tbl > tbody > tr > td:nth-child(8) { grid-column: 2; grid-row: 5; text-align: right !important; align-self: center; }
    #tbl > tbody > tr > td:nth-child(9) { grid-column: 1 / -1; grid-row: 6; }
    #tbl > tbody > tr > td:nth-child(2)::before { content: 'Od '; }
    #tbl > tbody > tr > td:nth-child(3)::before { content: 'Do '; }
    #tbl > tbody > tr > td:nth-child(4)::before { content: 'Kontrola '; }
    #tbl > tbody > tr > td:nth-child(7)::before { content: 'Návštevy '; }
    /* prázdny stav / „Žiadne záznamy" (colspan) nech nedelí kartu na polovice */
    #tbl > tbody > tr > td:only-child { grid-column: 1 / -1; text-align: center !important; }

    /* rozbalené návštevy prípadu (child row) */
    #tbl > tbody > tr.case-open { margin-bottom: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
    #tbl > tbody > tr.child { display: block; padding: 0; margin-top: -1px;
        border-top-left-radius: 0; border-top-right-radius: 0; }
    #tbl > tbody > tr.child > td { grid-column: 1 / -1; }
    .case-visits-child { width: auto; padding: 8px; }
    .pp-visits { display: block; background: transparent; }
    .pp-visits thead { display: none; }
    .pp-visits tbody { display: block; }
    .pp-visits tbody > tr {
        display: grid; grid-template-columns: 1fr auto; gap: 5px 12px;
        background: #fff; border: 1px solid #eceafa; border-radius: 12px;
        padding: 10px; margin-bottom: 8px;
    }
    .pp-visits tbody > tr:last-child { margin-bottom: 0; }
    .pp-visits tbody > tr > td {
        display: block; border: 0 !important; padding: 0 !important;
        background: transparent !important; white-space: normal; text-align: left !important;
        font-size: 12.5px;
    }
    .pp-visits .pp-c-date   { grid-column: 1; grid-row: 1; font-size: 14px; font-weight: 600; }
    .pp-visits .pp-c-price  { grid-column: 2; grid-row: 1; text-align: right !important; font-size: 14px; }
    .pp-visits .pp-c-user   { grid-column: 1 / -1; grid-row: 2; color: #6b6b80; }
    .pp-visits .pp-c-dur    { grid-column: 1; grid-row: 3; }
    .pp-visits .pp-c-report { grid-column: 2; grid-row: 3; text-align: right !important; }
    .pp-visits .pp-c-status { grid-column: 1; grid-row: 4; }
    .pp-visits .pp-c-paid   { grid-column: 2; grid-row: 4; text-align: right !important; }
    .pp-visits .pp-c-plan   { grid-column: 1 / -1; grid-row: 5; }
    .pp-visits .pp-c-act    { grid-column: 1 / -1; grid-row: 6; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
    .pp-visits .pp-c-act .btn { min-height: 38px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; margin: 0 !important; }
    .pp-visits .pp-c-dur::before    { content: 'Trvanie '; }
    .pp-visits .pp-c-report::before { content: 'Report '; }
    .pp-visits .pp-c-status::before { content: 'Stav '; }
    .pp-visits .pp-c-paid::before   { content: 'Uhradené '; }
    .pp-visits .pp-c-plan::before   { content: 'Kontrola '; }
    .pp-visits tbody > tr > td:only-child { grid-column: 1 / -1; text-align: center !important; }

    /* spoločný vzhľad popiskov v oboch kartách */
    #tbl > tbody > tr > td::before, .pp-visits tbody > tr > td::before {
        color: #9a92c4; font-size: 11px; text-transform: uppercase; letter-spacing: .3px; margin-right: 4px;
    }

    /* DataTables pätička (počet záznamov + stránkovanie) pod kartami */
    #tbl_wrapper .dataTables_info { padding-top: 4px; }
    #tbl_wrapper .dataTables_paginate { float: none; text-align: center; }

    /* ═ 3c ═ VYŠETRENIE (modul A/KV/PKV/DG/T/P + prílohy + účet) ═══════ */

    /* hlavný obsah + bočný súhrn pod sebou (affix sa sám vypína ≤991px) */
    .exm-body { display: block !important; }
    .exm-side { width: 100% !important; flex: none !important; margin-top: 18px; transform: none !important; }

    /* pruh tabov A/KV/PKV… : vodorovný posun, veľké dotykové ciele */
    .exm-tabs { flex-wrap: nowrap !important; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; gap: 6px !important; }
    .exm-tabs::-webkit-scrollbar { display: none; }
    .exm-tab { flex: 0 0 auto; padding: 11px 15px !important; font-size: 14.5px !important; }
    .exm-emergency, .exm-report, .exm-ai, .exm-hosp-btn, .exm-del { flex: 0 0 auto; align-self: center; }

    .exm-textarea { min-height: 38vh; font-size: 16px !important; line-height: 1.5; }
    .exm-actions { text-align: stretch; }
    .exm-actions .exm-btn { width: 100%; min-height: 48px; font-size: 16px; }

    /* modál správy / náhľadu — celá obrazovka */
    .exm-modal-bg { padding: 0 !important; align-items: stretch !important; }
    .exm-modal { width: 100% !important; max-width: 100% !important; height: 100dvh; max-height: 100dvh !important; border-radius: 0 !important; }

    /* ── T tab: nahadzovanie položiek terapie ── */
    .th-search { max-width: none !important; }
    .th-search input { height: 48px; border-radius: 12px !important; padding-left: 38px !important; }
    .th-search .fa-search { top: 16px !important; }
    .th-search-x { top: 12px !important; width: 26px !important; height: 26px !important; }
    .th-drop { max-height: 55vh; }
    .th-res { padding: 12px 10px !important; }
    .th-res-n { font-size: 15px !important; }
    .th-res-m { font-size: 12.5px !important; }

    /* účet: riadky tabuľky ako karty — názov hore, množstvo + suma + kôš pod ním
       (cena/jednotku a DPH sa na telefóne skrývajú, súčet riadku ostáva) */
    .th-tbl { display: block; }
    .th-tbl thead { display: none; }
    .th-tbl tbody { display: block; }
    .th-tbl tbody > tr { display: grid; grid-template-columns: 1fr auto auto; gap: 6px 12px; align-items: center; padding: 12px 2px; border-bottom: 1px solid #f0eefb; }
    .th-tbl tbody > tr > td { display: block; border: 0 !important; padding: 0 !important; text-align: left !important; }
    .th-tbl tbody > tr > td:nth-child(1) { grid-column: 1 / -1; }
    /* po #99 pribudol stlpec Autor: 2=Mnoz., 3=Autor, 4=Cena/j, 5=DPH, 6=Spolu, 7=kos */
    .th-tbl tbody > tr > td:nth-child(3) { grid-column: 1 / -1; grid-row: 3; }
    .th-tbl tbody > tr > td:nth-child(3) .th-au-sel { width: 100%; min-height: 40px; }
    .th-tbl tbody > tr > td:nth-child(4), .th-tbl tbody > tr > td:nth-child(5) { display: none; }
    .th-tbl tbody > tr > td:nth-child(6) { grid-column: 2; text-align: right !important; font-size: 15px; white-space: nowrap; }
    .th-tbl tbody > tr > td:nth-child(7) { grid-column: 3; text-align: right !important; }
    .th-tbl tbody > tr > td:only-child { grid-column: 1 / -1; }
    .th-pn { font-size: 15px; }
    .th-qty { width: 84px !important; height: 42px; font-size: 16px !important; text-align: center !important; }
    .th-unit-tog { min-height: 42px; padding: 0 10px; }
    .th-del { width: 42px; height: 42px; font-size: 17px; }
    .th-dose-ed input, .th-dose-ed select { min-height: 40px; }
    .th-dose-save, .th-dose-clear, .th-dose-cancel { min-height: 40px; padding: 0 14px; }

    /* ── P tab: plán + objednanie kontroly ── */
    .pl-choice { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
    .pl-radio { display: flex; align-items: center; gap: 10px; background: #faf9ff; border: 1px solid #efecfb; border-radius: 12px; padding: 12px 14px; margin: 0 !important; }
    .pl-text { min-height: 26vh; font-size: 16px !important; }
    .pl-bk-bar { flex-wrap: wrap; gap: 10px; }
    .pl-week { flex-wrap: wrap; }

    /* súčet + schválenie účtu: pod sebou, veľké tlačidlo */
    .th-foot { display: block !important; }
    .th-sum { min-width: 0 !important; margin-left: 0 !important; }
    .th-actions { margin-top: 12px; }
    .th-approve { width: 100%; min-height: 50px; font-size: 16px !important; border-radius: 12px !important; }

    /* ═ 3d ═ KLIENT ─ bootstrap .nav-tabs ako posuvné chipy ════════════ */

    .nav-tabs { flex-wrap: nowrap !important; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; gap: 6px; padding: 2px 2px 8px !important; border-bottom: 0 !important; }
    .nav-tabs::-webkit-scrollbar { display: none; }
    .nav-tabs .nav-item { flex: 0 0 auto; margin: 0 !important; }
    .nav-tabs .nav-link { white-space: nowrap; border-radius: 20px !important; padding: 9px 14px !important; border: 1px solid #e3def7 !important; background: #faf9ff; }
    .nav-tabs .nav-link.active { background: #6c5ce7 !important; color: #fff !important; border-color: #6c5ce7 !important; }

    /* mobilná karta klienta (blade blok .pp-mcust v customers/details) */
    .pp-mcust { display: block; }
    .pp-mcust .mc-head { display: flex; align-items: center; gap: 13px; padding: 4px 2px 12px; }
    .pp-mcust .mc-ava { flex: 0 0 46px; width: 46px; height: 46px; border-radius: 50%; background: #e8f4fd; color: #2f9de8; display: flex; align-items: center; justify-content: center; font-size: 20px; }
    .pp-mcust .mc-nm { font: 700 19px/1.2 'Roboto', -apple-system, "Segoe UI", Arial, sans-serif; color: #2a2440; }
    .pp-mcust .mc-sub { font-size: 12.5px; color: #8a85a8; margin-top: 2px; }
    .pp-mcust .mc-contacts { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 12px; }
    .pp-mcust .mc-chip { display: inline-flex; align-items: center; gap: 7px; background: #fff; border: 1px solid #e3def7; border-radius: 22px; padding: 9px 14px; color: #5b4bd6; font: 600 13.5px 'Roboto', -apple-system, "Segoe UI", Arial, sans-serif; text-decoration: none; max-width: 100%; overflow: hidden; }
    .pp-mcust .mc-chip i { color: #9a92c4; }
    .pp-mcust .mc-sect { font: 700 11px/1 'Roboto', -apple-system, "Segoe UI", Arial, sans-serif; color: #9a92c4; text-transform: uppercase; letter-spacing: .07em; margin: 8px 2px 8px; }
    .pp-mcust .mc-pat { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid #efecfb; border-radius: 13px; padding: 12px 13px; margin-bottom: 8px; text-decoration: none; }
    .pp-mcust .mc-pat:active { background: #f4f1ff; }
    .pp-mcust .mc-pava { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; background: #f1eefc; color: #6c5ce7; display: flex; align-items: center; justify-content: center; font-size: 17px; }
    .pp-mcust .mc-pat.is-dead { opacity: .55; }
    .pp-mcust .mc-pt { flex: 1; min-width: 0; }
    .pp-mcust .mc-pt .t { display: block; font: 600 15px/1.3 'Roboto', -apple-system, "Segoe UI", Arial, sans-serif; color: #2a2440; }
    .pp-mcust .mc-pt .d { display: block; font-size: 12.5px; color: #8a85a8; margin-top: 2px; }
    .pp-mcust .mc-chev { flex: 0 0 auto; color: #c9c3e8; }
    /* desktopová tabuľka pacientov je na telefóne nahradená kartou */
    .pp-mcust-desktop { display: none !important; }

    /* ═ 3f ═ RECEPCIA ─ FullCalendar kompaktne ═════════════════════════ */

    .fc .fc-toolbar.fc-header-toolbar { flex-wrap: wrap; gap: 8px; margin-bottom: 10px !important; }
    .fc .fc-toolbar-title { font-size: 17px !important; line-height: 1.2; }
    .fc .fc-button { padding: 6px 10px !important; font-size: 13px !important; }
    .fc .fc-timegrid-slot { height: 2em !important; }

    /* ═ 3e ═ MÔJ DEŇ ─ kalendár rezervácií lekára na nástenke ══════════ */

    #pp-mday { display: block; margin: 0 0 14px; }
    #pp-mday .md-card { background: #fff; border: 1px solid #eceafa; border-radius: 14px; box-shadow: 0 4px 18px -8px rgba(42, 36, 64, .10); overflow: hidden; }
    #pp-mday .md-head { display: flex; align-items: center; gap: 10px; padding: 13px 14px 11px; border-bottom: 1px solid #f0eefb; }
    #pp-mday .md-ico { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(145deg, #7b6cf0, #5b4bd6); color: #fff; display: flex; align-items: center; justify-content: center; }
    #pp-mday .md-ico svg { width: 20px; height: 20px; fill: #fff; }
    #pp-mday .md-tt { flex: 1; min-width: 0; }
    #pp-mday .md-tt .t { display: block; font: 700 15.5px/1.2 'Roboto', -apple-system, "Segoe UI", Arial, sans-serif; color: #2a2440; }
    #pp-mday .md-tt .d { display: block; font-size: 12px; color: #8a85a8; margin-top: 2px; }
    #pp-mday .md-full { border: 0; background: #f1eefc; color: #5b4bd6; border-radius: 10px; padding: 8px 12px; font: 600 12.5px 'Roboto', -apple-system, "Segoe UI", Arial, sans-serif; }
    #pp-mday .md-list { padding: 6px 8px 8px; }
    #pp-mday .md-row { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; background: transparent; border: 0; border-bottom: 1px solid #f5f3fd; padding: 11px 6px; -webkit-tap-highlight-color: transparent; }
    #pp-mday .md-row:last-child { border-bottom: 0; }
    #pp-mday .md-row:active { background: #f4f1ff; }
    #pp-mday .md-time { flex: 0 0 auto; background: #f1eefc; color: #5b4bd6; border-radius: 9px; padding: 6px 9px; font: 700 13.5px/1 'Roboto', -apple-system, "Segoe UI", Arial, sans-serif; font-variant-numeric: tabular-nums; }
    #pp-mday .md-row.is-past .md-time { background: #f3f2f8; color: #a29cc4; }
    #pp-mday .md-txt { flex: 1; min-width: 0; }
    #pp-mday .md-txt .t { display: block; font: 600 14.5px/1.3 'Roboto', -apple-system, "Segoe UI", Arial, sans-serif; color: #2a2440; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    #pp-mday .md-txt .d { display: block; font-size: 12px; color: #8a85a8; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    #pp-mday .md-chev { flex: 0 0 auto; width: 16px; height: 16px; fill: #c9c3e8; }
    #pp-mday .md-empty { padding: 18px 14px; text-align: center; color: #9a92c4; font-size: 13.5px; }
    #pp-mday .md-more { width: 100%; border: 0; background: #faf9ff; color: #5b4bd6; font: 600 13.5px 'Roboto', -apple-system, "Segoe UI", Arial, sans-serif; padding: 12px; border-top: 1px solid #f0eefb; }

    /* fullscreen „Môj deň" — rovnaký vzor ako vyhľadávanie */
    #pp-mdayfs { position: fixed; inset: 0; z-index: 12800; background: #f6f5fc; display: none; flex-direction: column; }
    #pp-mdayfs.open { display: flex; }
    #pp-mdayfs .fs-head { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; background: #fff; border-bottom: 1px solid #eceafa; padding: calc(12px + env(safe-area-inset-top)) 14px 12px; }
    #pp-mdayfs .fs-tt { flex: 1; font: 700 17px/1.2 'Roboto', -apple-system, "Segoe UI", Arial, sans-serif; color: #2a2440; }
    #pp-mdayfs .fs-tt small { display: block; font-size: 12px; color: #8a85a8; font-weight: 400; margin-top: 2px; }
    #pp-mdayfs .fs-close { border: 0; background: none; color: #6c5ce7; font: 600 15px 'Roboto', -apple-system, "Segoe UI", Arial, sans-serif; padding: 8px 2px; }
    #pp-mdayfs .fs-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 12px 12px calc(24px + env(safe-area-inset-bottom)); }
    #pp-mdayfs .md-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: #fff; border: 1px solid #efecfb; border-radius: 13px; padding: 13px; margin-bottom: 8px; }
    #pp-mdayfs .md-time { flex: 0 0 auto; background: #f1eefc; color: #5b4bd6; border-radius: 10px; padding: 8px 10px; font: 700 15px/1 'Roboto', -apple-system, "Segoe UI", Arial, sans-serif; font-variant-numeric: tabular-nums; }
    #pp-mdayfs .md-row.is-past { opacity: .6; }
    #pp-mdayfs .md-txt { flex: 1; min-width: 0; }
    #pp-mdayfs .md-txt .t { display: block; font: 600 15.5px/1.3 'Roboto', -apple-system, "Segoe UI", Arial, sans-serif; color: #2a2440; }
    #pp-mdayfs .md-txt .d { display: block; font-size: 13px; color: #8a85a8; margin-top: 2px; }
    #pp-mdayfs .md-chev { flex: 0 0 auto; width: 18px; height: 18px; fill: #c9c3e8; }
    #pp-mdayfs .md-empty { padding: 40px 20px; text-align: center; color: #9a92c4; }

    /* ═ 4 ═ LOGIN RODINA (layouts.simple: uni-login, dochádzka…) ═══════ */

    .page-single { padding: 18px 0; }
    .page-single .p-0.p-md-5 { padding: 0 !important; }
    .page-single .card { border-radius: 18px; box-shadow: 0 18px 60px -18px rgba(30, 20, 80, .45); border: 0; }
    .page-single .card-body { padding: 26px 20px 22px; }
    .page-single h1 { font-size: 23px; }
    .page-single .input-group-text { min-width: 44px; justify-content: center; }
    .page-single .input-group .form-control { height: 48px; }
    .page-single .btn-block { min-height: 48px; font-size: 16px; }

    /* ═ 5 ═ SPODNÁ NAVIGÁCIA (kreslí pp-mobile.js) ═════════════════════ */

    #pp-mnav {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 11800;
        display: flex; align-items: stretch;
        background: rgba(255, 255, 255, .96);
        -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
        border-top: 1px solid #eceafa;
        padding: 4px 6px calc(4px + env(safe-area-inset-bottom));
        box-shadow: 0 -10px 34px -14px rgba(42, 36, 64, .25);
    }
    #pp-mnav .mn-item {
        flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
        border: 0; background: none; padding: 7px 0 5px; margin: 0;
        color: #8a85a8; font: 500 10.5px/1 'Roboto', -apple-system, "Segoe UI", Arial, sans-serif;
        text-decoration: none; -webkit-tap-highlight-color: transparent;
    }
    #pp-mnav .mn-item:hover, #pp-mnav .mn-item:focus { text-decoration: none; color: #8a85a8; }
    #pp-mnav .mn-item svg { width: 23px; height: 23px; fill: currentColor; }
    #pp-mnav .mn-item.active { color: #6c5ce7; }
    /* stredné veľké „Hľadať" */
    #pp-mnav .mn-search {
        flex: 0 0 76px; position: relative; color: #fff;
    }
    #pp-mnav .mn-search .mn-fab {
        position: absolute; top: -24px; left: 50%; transform: translateX(-50%);
        width: 54px; height: 54px; border-radius: 50%;
        background: linear-gradient(145deg, #7b6cf0, #5b4bd6);
        display: flex; align-items: center; justify-content: center;
        box-shadow: 0 10px 24px -6px rgba(108, 92, 231, .55), 0 0 0 5px #fff;
    }
    #pp-mnav .mn-search .mn-fab svg { width: 25px; height: 25px; fill: #fff; }
    #pp-mnav .mn-search .mn-label { margin-top: 32px; color: #6c5ce7; font-weight: 600; }
    #pp-mnav .mn-search:active .mn-fab { transform: translateX(-50%) scale(.94); }
    /* otvorený modál (bootstrap / vyšetrenie / SweetAlert) → navigácia sa skryje,
       aby neprekrývala spodné tlačidlá modálu */
    body.modal-open #pp-mnav,
    body.swal2-shown #pp-mnav,
    body:has(.exm-modal-bg) #pp-mnav,
    body:has(.exm-hmodal) #pp-mnav { display: none; }
    .exm-modal-f { padding-bottom: calc(12px + env(safe-area-inset-bottom)) !important; }

    /* ═ 6 ═ FULLSCREEN VYHĽADÁVANIE ════════════════════════════════════ */

    #pp-msearch {
        position: fixed; inset: 0; z-index: 13000; background: #f6f5fc;
        flex-direction: column;
    }
    #pp-msearch.open { display: flex; }
    body.pp-ms-lock { overflow: hidden !important; }
    #pp-msearch .ms-head {
        flex: 0 0 auto; display: flex; align-items: center; gap: 10px;
        background: #fff; border-bottom: 1px solid #eceafa;
        padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
    }
    #pp-msearch .ms-inwrap { flex: 1 1 auto; position: relative; }
    #pp-msearch .ms-inwrap svg {
        position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
        width: 19px; height: 19px; fill: #9a92c4; pointer-events: none;
    }
    #pp-msearch input.ms-input {
        width: 100%; height: 46px; border: 1px solid #e3def7; border-radius: 12px;
        background: #faf9ff; padding: 0 38px 0 40px;
        font: 400 16px 'Roboto', -apple-system, "Segoe UI", Arial, sans-serif; color: #2a2440;
        outline: none; -webkit-appearance: none; appearance: none;
    }
    #pp-msearch input.ms-input:focus { border-color: #6c5ce7; background: #fff; box-shadow: 0 0 0 3px rgba(108, 92, 231, .12); }
    #pp-msearch input.ms-input::placeholder { color: #9a92c4; }
    #pp-msearch input.ms-input::-webkit-search-cancel-button { -webkit-appearance: none; }
    #pp-msearch .ms-clear {
        position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
        width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent;
        color: #9a92c4; font-size: 17px; line-height: 1; display: none;
    }
    #pp-msearch.has-term .ms-clear { display: block; }
    #pp-msearch .ms-cancel {
        flex: 0 0 auto; border: 0; background: none; padding: 8px 2px;
        color: #6c5ce7; font: 600 15px 'Roboto', -apple-system, "Segoe UI", Arial, sans-serif;
    }
    #pp-msearch .ms-body {
        flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        padding: 12px 12px calc(24px + env(safe-area-inset-bottom));
    }
    #pp-msearch .ms-group {
        font: 700 11px/1 'Roboto', -apple-system, "Segoe UI", Arial, sans-serif;
        color: #9a92c4; text-transform: uppercase; letter-spacing: .07em;
        margin: 14px 4px 8px;
    }
    #pp-msearch .ms-group:first-child { margin-top: 2px; }
    #pp-msearch .ms-row {
        display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
        background: #fff; border: 1px solid #efecfb; border-radius: 13px;
        padding: 11px 13px; margin-bottom: 8px; cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    #pp-msearch .ms-row:active { background: #f4f1ff; }
    #pp-msearch .ms-ava {
        flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%;
        background: #f1eefc; color: #6c5ce7;
        display: flex; align-items: center; justify-content: center;
    }
    #pp-msearch .ms-ava svg { width: 20px; height: 20px; fill: currentColor; }
    #pp-msearch .ms-ava.is-cust { background: #e8f4fd; color: #2f9de8; }
    #pp-msearch .ms-ava.is-item { background: #fdf3e4; color: #dd8b12; }
    #pp-msearch .ms-txt { flex: 1 1 auto; min-width: 0; }
    #pp-msearch .ms-txt .t { display: block; font: 600 15px/1.3 'Roboto', -apple-system, "Segoe UI", Arial, sans-serif; color: #2a2440; overflow: hidden; text-overflow: ellipsis; }
    #pp-msearch .ms-txt .d { display: block; font-size: 12.5px; color: #8a85a8; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; }
    #pp-msearch .ms-row .ms-chev { flex: 0 0 auto; width: 18px; height: 18px; fill: #c9c3e8; }
    #pp-msearch .ms-note { text-align: center; color: #9a92c4; font-size: 13.5px; padding: 26px 18px; line-height: 1.5; }
    #pp-msearch .ms-note .big { font-size: 34px; display: block; margin-bottom: 10px; }
    #pp-msearch .ms-spin {
        margin: 30px auto; width: 30px; height: 30px; border-radius: 50%;
        border: 3px solid #e3def7; border-top-color: #6c5ce7;
        animation: ppms-spin .7s linear infinite;
    }
    @keyframes ppms-spin { to { transform: rotate(360deg); } }
    #pp-msearch .ms-recent-head { display: flex; align-items: baseline; justify-content: space-between; margin: 2px 4px 8px; }
    #pp-msearch .ms-recent-head .ms-group { margin: 0; }
    #pp-msearch .ms-recent-clear { border: 0; background: none; color: #9a92c4; font-size: 12px; padding: 2px 4px; }

    /* ═ 7 ═ MENU SHEET ═════════════════════════════════════════════════ */

    #pp-msheet { position: fixed; inset: 0; z-index: 12500; }
    #pp-msheet.open { display: block; }
    #pp-msheet .msh-back { position: absolute; inset: 0; background: rgba(26, 20, 48, .55); }
    #pp-msheet .msh-panel {
        position: absolute; left: 0; right: 0; bottom: 0;
        background: #fff; border-radius: 20px 20px 0 0;
        max-height: 84dvh; overflow-y: auto; -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        padding: 8px 16px calc(18px + env(safe-area-inset-bottom));
        animation: ppmsh-up .22s ease-out;
    }
    @keyframes ppmsh-up { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
    #pp-msheet .msh-grab { width: 40px; height: 4px; border-radius: 4px; background: #e3def7; margin: 4px auto 12px; }
    #pp-msheet .msh-user { display: flex; align-items: center; gap: 12px; padding: 2px 2px 12px; }
    #pp-msheet .msh-user img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
    #pp-msheet .msh-user .nm { font: 700 16px/1.2 'Roboto', -apple-system, "Segoe UI", Arial, sans-serif; color: #2a2440; }
    #pp-msheet .msh-user .ps { font-size: 12.5px; color: #8a85a8; margin-top: 2px; }
    #pp-msheet .msh-sect {
        font: 700 11px/1 'Roboto', -apple-system, "Segoe UI", Arial, sans-serif;
        color: #9a92c4; text-transform: uppercase; letter-spacing: .07em;
        margin: 14px 2px 8px;
    }
    #pp-msheet .msh-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
    #pp-msheet .msh-cell {
        display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
        background: #faf9ff; border: 1px solid #efecfb; border-radius: 14px;
        padding: 14px 6px 12px; text-align: center;
        color: #2a2440; font: 600 12.5px/1.25 'Roboto', -apple-system, "Segoe UI", Arial, sans-serif;
        text-decoration: none; -webkit-tap-highlight-color: transparent;
    }
    #pp-msheet .msh-cell:active { background: #f1eefc; }
    #pp-msheet .msh-cell:hover { text-decoration: none; color: #2a2440; }
    #pp-msheet .msh-cell svg { width: 24px; height: 24px; fill: #6c5ce7; }
    #pp-msheet .msh-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 16px; }
    #pp-msheet .msh-act {
        display: flex; align-items: center; justify-content: center; gap: 8px;
        border-radius: 12px; padding: 13px 8px; border: 1px solid #e3def7; background: #fff;
        color: #5b4bd6; font: 600 14px 'Roboto', -apple-system, "Segoe UI", Arial, sans-serif;
        text-decoration: none;
    }
    #pp-msheet .msh-act svg { width: 18px; height: 18px; fill: currentColor; }
    #pp-msheet .msh-act.is-logout { color: #d34b5e; border-color: #f3d5da; }
    #pp-msheet .msh-act:hover { text-decoration: none; }

    /* ═ 8 ═ DARK MODE (body.dark-mode) ═════════════════════════════════ */

    body.dark-mode.pp-mobile-app { background: #171827; }
    .dark-mode #pp-mnav { background: rgba(24, 25, 41, .96); border-top-color: #2b2c44; box-shadow: 0 -10px 34px -14px rgba(0, 0, 0, .6); }
    .dark-mode #pp-mnav .mn-item { color: #8f8fb1; }
    .dark-mode #pp-mnav .mn-search .mn-fab { box-shadow: 0 10px 24px -6px rgba(108, 92, 231, .55), 0 0 0 5px #181929; }
    .dark-mode #pp-msearch { background: #171827; }
    .dark-mode #pp-msearch .ms-head { background: #1e1f33; border-bottom-color: #2b2c44; }
    .dark-mode #pp-msearch input.ms-input { background: #171827; border-color: #34355299; color: #e6e4f5; }
    .dark-mode #pp-msearch .ms-row { background: #1e1f33; border-color: #2b2c44; }
    .dark-mode #pp-msearch .ms-txt .t { color: #e6e4f5; }
    .dark-mode #pp-msheet .msh-panel { background: #1e1f33; }
    .dark-mode #pp-msheet .msh-user .nm { color: #e6e4f5; }
    .dark-mode #pp-msheet .msh-grab { background: #343552; }
    .dark-mode #pp-msheet .msh-cell { background: #171827; border-color: #2b2c44; color: #d8d5ec; }
    .dark-mode #pp-msheet .msh-act { background: #171827; border-color: #34355299; }
    .dark-mode #waiting-room-component .table tbody > tr { background: #1e1f33; border-color: #2b2c44 !important; border-left-color: #494566 !important; }
    .dark-mode #waiting-room-component .table tbody > tr.bg-waiting-room-success { border-left-color: #22c993 !important; background: #16332a; }
    .dark-mode #waiting-room-component .table tbody > tr.bg-waiting-room-warning { border-left-color: #fdb901 !important; background: #332d15; }
    .dark-mode #waiting-room-component .table tbody > tr.bg-waiting-room-info    { border-left-color: #45aaf2 !important; background: #182f45; }
    .dark-mode #waiting-room-component .table tbody > tr.bg-waiting-room-danger  { border-left-color: #fb5454 !important; background: #3a2126; }
    .dark-mode #waiting-room-component .table tbody > tr.wr-pay-row { border-left-color: #f59e0b !important; }
}

/* Hospitalizácia V1: modály hárku na telefóne nad spodným menu a dokom chatu, s vlastným rolovaním,
   aby bol riadok s tlačidlami (Uložiť) vždy dostupný (hlásenie #5803, Romana Školek). */
@media (max-width: 991.98px) {
    body.pp-mobile-app .ppv1 .veil { z-index: 30000; align-items: flex-start; padding: 10px 8px calc(84px + env(safe-area-inset-bottom, 0px)); overflow-y: auto; -webkit-overflow-scrolling: touch; }
    body.pp-mobile-app .ppv1 .v1modal { max-height: none; overflow: visible; margin: 0 auto; }
    body.pp-mobile-app .ppv1 .v1modal .mact { position: sticky; bottom: 0; background: var(--card, #fff); padding: 10px 0 6px; margin-top: 14px; border-top: 1px solid #eceafa; }
}

/* Môj deň: potvrdenie termínu z SMS deň vopred (#5770/#5793) */
#pp-mday .md-conf, #pp-mdayfs .md-conf { display: inline-block; margin-top: 3px; padding: 1px 8px; border-radius: 9px; font-size: 11px; font-weight: 600; white-space: nowrap; }
#pp-mday .md-conf-nepotvrdeny, #pp-mdayfs .md-conf-nepotvrdeny { background: #fef3c7; color: #92400e; }
#pp-mday .md-conf-nepride, #pp-mdayfs .md-conf-nepride { background: #fee2e2; color: #b91c1c; }
#pp-mday .md-conf-potvrdeny, #pp-mdayfs .md-conf-potvrdeny { background: #d1fae5; color: #047857; }
