/* ===========================================================================
   Responzivita portálu My sme Mensa (od 0.19.0)
   Hranice: mobil pod 768 px, tablet 768 až 1199 px, laptop 1200 až 1439 px, široký monitor od 1440 px.
   Pravidlo: čím užšia obrazovka, tým menej údajov. Riadky ostávajú na jeden riadok, nič sa neposúva do strany.
   =========================================================================== */

html { background: var(--vz-body-bg); }
.main-content { min-height: 100vh; }

/* ---------------------------------------------------------------------------
   Bočné menu
   Od 1200 px široké, od 992 do 1199 px úzke s ikonami, pod 992 px vysúvací panel. */
@media (min-width: 992px) {
  :root[data-sidebar-size=sm] .app-menu { position: fixed !important; top: 0; bottom: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
  :root[data-sidebar-size=sm] .app-menu::-webkit-scrollbar { display: none; }
}
@media (max-width: 991.98px) {
  :root .app-menu { margin-left: -100% !important; width: 280px !important; max-width: 85vw; padding: 0 0 20px !important; transition: margin-left .25s ease; box-shadow: 0 0 40px rgba(0, 0, 0, .25); }
  body.vertical-sidebar-enable .app-menu { margin-left: 0 !important; z-index: 1005; }
  :root .app-menu .navbar-brand-box { display: block !important; text-align: left; padding: 0 20px; }
  :root .app-menu .navbar-brand-box .logo-lg { display: inline-block !important; }
  :root .app-menu .navbar-brand-box .logo-sm { display: none !important; }
  :root .main-content { margin-left: 0 !important; }
  :root #page-topbar, :root .footer { left: 0 !important; }
  body.vertical-sidebar-enable .vertical-overlay { display: block; z-index: 1004; }
  .vertical-overlay { display: none; }
}
@media (prefers-reduced-motion: reduce) { .app-menu { transition: none !important; } }

/* ---------------------------------------------------------------------------
   Horná lišta: všetky ikonky rovnaký kruh, rovnaké podfarbenie, rovnaká bublina s počtom. */
#page-topbar .header-item { height: 64px; }
#page-topbar .navbar-header { height: 64px; padding: 0 16px 0 8px; }
#page-topbar .btn-topbar,
#page-topbar .topbar-user-btn { width: 40px; height: 40px; padding: 0; border-radius: 50% !important; display: inline-flex; align-items: center; justify-content: center; color: var(--vz-header-item-sub-color); background: transparent; border: 0; transition: background-color .15s, color .15s; }
#page-topbar .btn-topbar i { font-size: 21px !important; line-height: 1; }
#page-topbar .btn-topbar:hover, #page-topbar .btn-topbar:focus-visible,
#page-topbar .btn-topbar[aria-expanded=true], #page-topbar .btn-topbar.show,
#page-topbar .topbar-user-btn:hover, #page-topbar .topbar-user-btn[aria-expanded=true] { background: var(--vz-header-item-bg); color: var(--vz-header-item-color); }
#page-topbar .topbar-badge { position: absolute; top: 3px !important; right: 1px !important; left: auto !important; transform: none !important; min-width: 17px; height: 17px; padding: 0 4px; font-size: 10px !important; line-height: 17px; border: 2px solid var(--vz-header-bg); box-sizing: content-box; }
#page-topbar .topbar-user { background: transparent !important; }
#page-topbar .topbar-user-btn .header-profile-user, #page-topbar .topbar-user-btn .avatar-initials { width: 34px; height: 34px; }
#page-topbar .topbar-user-btn .avatar-initials { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--m-navy); color: #fff; font-size: 12px; font-weight: 700; }
@media (min-width: 1400px) {
  #page-topbar .topbar-user-btn { width: auto; border-radius: 24px !important; padding: 3px 14px 3px 3px; }
}
.page-heading { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 26vw; font-size: 17px; }
.gsearch { width: 300px; }
@media (max-width: 1439.98px) { .gsearch { width: 240px; } }
@media (max-width: 1199.98px) { .gsearch { width: 280px; } }
@media (max-width: 991.98px) { .gsearch { width: 220px; } #page-topbar .navbar-header { padding: 0 10px 0 4px; } }

/* Nadpis stránky nad obsahom na tablete a mobile. */
.ms-page-title { font-size: 20px; font-weight: 700; color: var(--vz-heading-color); margin: 0 0 14px; line-height: 1.25; }

/* Mobil: vyhľadávanie sa otvorí lupou ako pole pod lištou, panely na celú šírku. */
@media (max-width: 767.98px) {
  body.gs-mobile-open .gsearch { display: block !important; position: fixed; top: 64px; left: 0; right: 0; width: auto; margin: 0 !important; padding: 10px 12px; background: var(--vz-header-bg); border-bottom: 1px solid var(--vz-border-color); z-index: 1003; }
  body.gs-mobile-open .gs-panel { position: absolute; top: 100%; left: 0; right: 0; width: auto; max-width: none; margin: 0; border-radius: 0 0 8px 8px; border-top: 1px solid var(--vz-border-color); box-shadow: 0 12px 24px rgba(var(--m-navy-rgb), .14); }
  body.gs-mobile-open .gs-results { max-height: calc(100vh - 64px - 140px); overflow-y: auto; }
  .navbar-header .dropdown { position: static; }
  .navbar-header .dropdown .dropdown-menu { width: 100%; max-width: none; left: 0 !important; right: 0 !important; top: 100% !important; margin-top: 0 !important; border-radius: 0 0 8px 8px; }
  .notif-panel { width: 100%; max-width: none; }
  .notif-list { max-height: calc(100vh - 64px - 130px); }
  .ms-toasts { top: 74px; right: 12px; }
  .page-content { padding: calc(64px + 14px) 0 72px; }
  .page-content > .container-fluid { padding-left: 12px; padding-right: 12px; }
  .page-content .mx-n4 { margin-left: -12px !important; margin-right: -12px !important; }
  .page-content .mt-n4 { margin-top: -14px !important; }
  .page-content .ms-phead-bg { left: -12px; right: -12px; }
  .ms-page-title { font-size: 19px; margin-bottom: 12px; }
  .card { margin-bottom: 12px; }
  .card-body { padding: 14px; }
  .card-header { padding: 12px 14px; }
  .row.g-4, .row.g-3 { --bs-gutter-x: 12px; --bs-gutter-y: 12px; }
}
@media (min-width: 768px) and (max-width: 1199.98px) {
  .page-content { padding-top: calc(64px + 18px); }
}

/* ---------------------------------------------------------------------------
   Panel nástrojov nad zoznamom (.ms-tb)
   Laptop jeden riadok. Tablet: hľadanie a Filtre, pod tým zobrazenia a hlavné tlačidlo vpravo.
   Mobil: hľadanie s ikonkou filtra, zobrazenia na celú šírku, hlavné tlačidlo plávajúce vpravo dole. */
.ms-tb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ms-tb > * { flex: 0 0 auto; }
.ms-tb .ms-tb-search { flex: 1 1 220px; min-width: 0; order: 1; }
.ms-tb .ms-tb-add { order: 0; }
.ms-tb .ms-tb-filter { order: 2; }
.ms-tb .ms-tb-more { order: 3; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ms-tb .ms-tb-more > .form-select { width: auto; max-width: 230px; }
.ms-tb .ms-tb-more-btn { order: 2; display: none; }
.ms-tb .ms-tb-break { display: none; }
.ms-tb .ms-tb-seg { order: 5; }
.ms-tb .ms-tb-views { order: 6; }
.ms-tb .ms-tb-extra { order: 7; }
.ms-tb .ms-vl { display: none; }
.ms-tb-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 10px; }
.ms-tb-meta .pd-chips { flex: 1 1 auto; }
@media (max-width: 1439.98px) {
  .ms-tb .ms-tb-more-btn { display: inline-flex; align-items: center; }
  .ms-tb .ms-tb-more { display: none; flex: 0 0 100%; order: 8; padding: 10px; background: var(--vz-tertiary-bg); border-radius: 8px; }
  .ms-tb.is-more .ms-tb-more { display: flex; }
  .ms-tb .ms-tb-more > .form-select, .ms-tb .ms-tb-more > .btn { flex: 1 1 200px; max-width: none; }
}
@media (max-width: 1199.98px) {
  .ms-tb .ms-tb-break { display: block; flex: 0 0 100%; height: 0; order: 4; }
  .ms-tb .ms-tb-more { order: 3; }
  .ms-tb .ms-tb-add { order: 9; margin-left: auto; }
  .ms-tb .ms-vl { display: inline; margin-left: 6px; }
}
/* Kanban na laptope: všetky stĺpce sa zmestia bez posúvania. */
@media (min-width: 1200px) {
  .tasks-board .tasks-list { min-width: 0 !important; flex: 1 1 0; }
  .tasks-board { overflow-x: visible; }
}
@media (max-width: 767.98px) {
  .ms-tb .ms-tb-filter .ms-tb-flbl, .ms-tb .ms-tb-more-btn .ms-tb-flbl { display: none; }
  .ms-tb .ms-tb-filter, .ms-tb .ms-tb-more-btn { padding-left: 11px; padding-right: 11px; }
  .ms-tb .ms-tb-views { flex: 1 1 100%; display: flex; }
  .ms-tb .ms-tb-views > .btn { flex: 1 1 0; padding-left: 4px; padding-right: 4px; white-space: nowrap; font-size: 13px; }
  .ms-tb .ms-tb-seg { flex: 1 1 auto; display: flex; }
  .ms-tb .ms-tb-seg > .btn { flex: 1 1 0; white-space: nowrap; }
  .ms-tb .ms-vl { margin-left: 4px; }
  .ms-tb-meta { font-size: 12px; }
}

/* Plávajúce tlačidlo na mobile. */
@media (max-width: 767.98px) {
  .ms-tb .ms-tb-add, .ms-fab { position: fixed !important; right: 16px; bottom: 18px; z-index: 1001; width: 56px; height: 56px; padding: 0 !important; border-radius: 50% !important; display: inline-flex !important; align-items: center; justify-content: center; box-shadow: 0 8px 22px rgba(var(--m-navy-rgb), .38); margin: 0 !important; }
  .ms-tb .ms-tb-add i, .ms-fab i { font-size: 26px; margin: 0 !important; }
  .ms-tb .ms-tb-add .ms-tb-alb, .ms-fab .ms-tb-alb { display: none; }
  .main-content:has(.ms-tb-add) .footer { padding-bottom: 84px; }
}

/* ---------------------------------------------------------------------------
   Súhrnné dlaždice: na tablete a mobile len riadok čísel. */
@media (max-width: 1199.98px) {
  .task-stats, .dash-tiles { display: flex !important; flex-wrap: nowrap; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 0 12px !important; padding: 0; }
  .task-stats::-webkit-scrollbar, .dash-tiles::-webkit-scrollbar { display: none; }
  .task-stats > *, .dash-tiles > * { flex: 0 0 auto; width: auto !important; max-width: none; padding: 0 !important; margin: 0 !important; }
  .task-stats .card, .dash-tiles .card { margin: 0 !important; border-radius: 20px; box-shadow: none; transform: none !important; }
  .task-stats .card-body, .dash-tiles .card-body { padding: 6px 14px !important; }
  .task-stats .card-body > .d-flex, .dash-tiles .card-body { display: flex; align-items: center; }
  .task-stats .avatar-sm, .dash-tiles .ms-tile-ico { display: none !important; }
  .task-stats .card-body > .d-flex > div:first-child, .dash-tiles .card-body > div:first-child { display: flex; flex-direction: row-reverse; align-items: baseline; gap: 5px; }
  .task-stats p, .dash-tiles p { margin: 0 !important; font-size: 12px; font-weight: 500 !important; text-transform: none !important; white-space: nowrap; color: var(--vz-secondary-color); }
  .task-stats h3, .dash-tiles h4 { margin: 0 !important; font-size: 15px !important; font-weight: 700; }
}
@media (min-width: 1200px) {
  .task-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin: 0 0 1rem !important; }
  .task-stats > .col { width: auto; max-width: none; padding: 0; margin: 0; min-width: 0; }
  .task-stats .card-body { padding: 14px 16px; }
  .task-stats .card-body p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* ---------------------------------------------------------------------------
   Kanban v záložkách na tablete a mobile. Záložky vytvorí app.js (.ms-ktabs). */
.ms-ktabs { display: none; }
@media (max-width: 1199.98px) {
  .ms-ktabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 12px; padding: 2px; }
  .ms-ktabs::-webkit-scrollbar { display: none; }
  .ms-ktabs button { flex: 0 0 auto; border: 0; border-radius: 8px; padding: 8px 14px; background: var(--vz-secondary-bg); color: var(--vz-body-color); font-size: 13px; font-weight: 500; white-space: nowrap; box-shadow: 0 1px 2px rgba(56, 65, 74, .1); }
  .ms-ktabs button .n { margin-left: 6px; opacity: .65; font-weight: 600; }
  .ms-ktabs button.is-on { background: var(--m-navy); color: #fff; }
  [data-bs-theme=dark] .ms-ktabs button.is-on { background: #73BBFA; color: #081F34; }
  .tasks-board.ms-kt { display: block !important; overflow: visible; }
  .tasks-board.ms-kt .tasks-list { display: none; min-width: 0 !important; width: auto; margin: 0 !important; padding: 0; background: transparent; }
  .tasks-board.ms-kt .tasks-list.is-on { display: block; }
  .tasks-board.ms-kt .tasks-list > .d-flex:first-child { display: none !important; }
  .tasks-board.ms-kt .tasks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .tasks-board.ms-kt .tasks > .card { margin: 0; }
  .tasks-board.ms-kt .tk-handle { display: none; }
  .tasks-board.ms-kt .tasks-wrapper { min-height: 0; }
}
@media (max-width: 767.98px) {
  .tasks-board.ms-kt .tasks { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .tasks-board .tk-desc, .tasks-board .tasks-box .progress, .tasks-board .tasks-box .badge.bg-primary-subtle { display: none !important; }
  .tasks-board .tasks-box .card-body { padding: 12px 14px; }
  .tasks-board .tasks-box .card-footer { padding: 8px 14px; }
}

/* ---------------------------------------------------------------------------
   Tabuľky: na mobile riadok so zaškrtnutím, hlavnou bunkou a jedným údajom vpravo. Ostatné bunky sú skryté.
   Hlavná bunka (.ms-main) má meno a pod ním jeden riadok podrobností (.ms-sub), obe orezané na jeden riadok. */
.ms-main-in { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ms-main-in > .ms-tx { min-width: 0; flex: 1 1 auto; }
.ms-tx > .ms-t, .ms-tx > .ms-sub { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-tx > .ms-t { font-weight: 500; color: var(--vz-body-color); }
.ms-tx > .ms-sub { font-size: 12px; color: var(--vz-secondary-color); margin-top: 1px; }
table td.ms-main { max-width: 0; width: 42%; }
table td.ms-wide { max-width: 0; width: 55%; }
table.ms-stack td, table.ms-stack th { white-space: nowrap; }
@media (max-width: 767.98px) {
  table.ms-stack, table.ms-stack tbody { display: block; width: 100%; }
  table.ms-stack thead { display: none; }
  table.ms-stack tr { display: flex; flex-wrap: nowrap; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--vz-border-color); }
  table.ms-stack tr:last-child { border-bottom: 0; }
  table.ms-stack td { display: none; padding: 0 !important; border: 0 !important; }
  table.ms-stack td.ms-check, table.ms-stack td.ms-main, table.ms-stack td.ms-wide, table.ms-stack td.ms-end, table.ms-stack td[colspan] { display: block; }
  table.ms-stack td.ms-main, table.ms-stack td.ms-wide { flex: 1 1 auto; min-width: 0; max-width: none; width: auto; }
  table.ms-stack td.ms-end { flex: 0 0 auto; margin-left: auto; text-align: right; font-size: 12px; }
  table.ms-stack td[colspan] { flex: 1 1 100%; }
  table.ms-stack tr.d-none { display: none; }
  .table-responsive:has(> table.ms-stack) { overflow: visible; }
  .table-card:has(> table.ms-stack) { margin: -14px; }
}

/* ---------------------------------------------------------------------------
   Mriežky kariet podľa skutočnej šírky obsahu. */
.pd-cards:not(.d-none), .ev-cards:not(.d-none), .pb-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr)); gap: 16px; margin: 0; }
.pd-cards > *, .ev-cards > *, .pb-cards > * { min-width: 0; width: auto; max-width: none; padding: 0; margin: 0; }
.pd-cards > .d-none, .ev-cards > .d-none, .pb-cards > .d-none { display: none !important; }
@media (max-width: 1199.98px) {
  .pd-cards .pd-prof { display: none !important; }
  .pd-cards .card-body { padding: 16px !important; }
}
@media (max-width: 767.98px) {
  .pd-cards:not(.d-none), .ev-cards:not(.d-none), .pb-cards { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .pd-cards .card-body { padding: 12px 14px !important; }
  .pd-cards .card-body > .d-flex.mb-3 { margin-bottom: 8px !important; }
  .pd-cards .ms-user-meta { display: none !important; }
  .pd-cards .border-top-dashed { padding-top: 6px !important; }
}

/* ---------------------------------------------------------------------------
   Záložky: na užšej obrazovke v jednom riadku s posúvaním do strany. */
@media (max-width: 1199.98px) {
  .nav-tabs-custom:not(.nav-justified), .ms-subnav, .project-tabs { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .nav-tabs-custom:not(.nav-justified)::-webkit-scrollbar, .ms-subnav::-webkit-scrollbar, .project-tabs::-webkit-scrollbar { display: none; }
  .nav-tabs-custom .nav-item, .ms-subnav .nav-item, .project-tabs .nav-item { flex: 0 0 auto; }
  .nav-tabs-custom .nav-link, .ms-subnav .nav-link, .project-tabs .nav-link { white-space: nowrap; }
}

/* Dokumenty: druhy na tablete a mobile ako vodorovný pás. */
@media (max-width: 991.98px) {
  .doc-kinds { display: flex; flex-direction: row; overflow-x: auto; scrollbar-width: none; gap: 6px; padding: 10px; }
  .doc-kinds::-webkit-scrollbar { display: none; }
  .doc-kinds .list-group-item { flex: 0 0 auto; border: 1px solid var(--vz-border-color) !important; border-radius: 20px !important; padding: 6px 12px; gap: 8px; white-space: nowrap; }
  .doc-kinds .list-group-item + .list-group-item { margin-top: 0; }
}

/* Vyplnenie profilu: percento nad pruhom neprekrýva nadpis. */
.custom-progress.progress-label { margin-top: 30px !important; overflow: visible; }
.custom-progress.progress-label .progress-bar .label { right: auto; left: max(0px, calc(100% - 18px)); }

/* Druhy vo vyhľadávaní: na mobile mriežka s rovnakými tlačidlami. */
@media (max-width: 575.98px) {
  .page-content .gs-types.btn-group { display: grid; grid-template-columns: repeat(5, 1fr); width: 100%; }
  .page-content .gs-types.btn-group > .btn { width: auto; border-radius: 6px !important; margin: 2px; }
}

/* Malý dátum v zozname udalostí. */
.ev-date.ev-date-sm { width: 42px; border-radius: 8px; align-self: center; }
.ev-date.ev-date-sm .m { font-size: 9px; padding: 1px 0; }
.ev-date.ev-date-sm .d { font-size: 16px; line-height: 1.45; }
.ms-tb .ms-tb-sel { width: auto; max-width: 200px; flex: 0 1 auto; }
@media (max-width: 767.98px) { .ms-tb .ms-tb-sel { max-width: 140px; } }

/* Rad tlačidiel ako vodorovný pás bez zalamovania na mobile (prepínače uznesení a podobne). */
.ms-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ms-strip > .ms-auto { margin-left: auto; }
@media (max-width: 767.98px) {
  .ms-strip { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -14px; margin-right: -14px; padding: 2px 14px; }
  .ms-strip::-webkit-scrollbar { display: none; }
  .ms-strip > * { flex: 0 0 auto; white-space: nowrap; }
}
.ms-clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; }
table td.res-text-cell { white-space: normal !important; max-width: 0; width: auto; }
table td.res-src-cell { max-width: 230px; }
table td.res-src-cell, table td.res-text-cell .text-truncate { white-space: nowrap; }
/* Druhy dokumentov ako pás pod panelom až do 1199 px. */
@media (max-width: 1199.98px) {
  .doc-kinds { display: flex; flex-direction: row; overflow-x: auto; scrollbar-width: none; gap: 6px; padding: 4px; }
  .doc-kinds::-webkit-scrollbar { display: none; }
  .doc-kinds .list-group-item { flex: 0 0 auto; border: 1px solid var(--vz-border-color) !important; border-radius: 20px !important; padding: 6px 12px; gap: 8px; white-space: nowrap; }
  .doc-kinds .list-group-item + .list-group-item { margin-top: 0; }
  .doc-kinds-card { margin-bottom: 0; }
}
@media (max-width: 1199.98px) { .ms-tb .ms-tb-extra .ms-tb-alb2 { display: none; } }
table.audit-table td.audit-detail { max-width: 0; width: 34%; }
table.audit-table td.ms-main { width: 26%; }
@media (max-width: 575.98px) { .audit-filter label { display: none; } .audit-filter .form-select { flex: 1 1 0; width: auto !important; min-width: 0; } }
table td.dash-cell-msg { max-width: 0; width: 45%; }

/* Detail úlohy a požiadavky: na tablete a mobile najprv obsah a diskusia, údaje a stav pod nimi. */
@media (max-width: 1199.98px) { .row > .ms-side-last { order: 2; } }

/* Kanban s piatimi stĺpcami (požiadavky) má záložky aj na laptope, karty v troch stĺpcoch. */
@media (min-width: 1200px) and (max-width: 1439.98px) {
  .ms-ktabs.ms-ktabs-wide { display: flex; gap: 6px; margin-bottom: 12px; padding: 2px; }
  .ms-ktabs.ms-ktabs-wide button { flex: 0 0 auto; border: 0; border-radius: 8px; padding: 8px 14px; background: var(--vz-secondary-bg); color: var(--vz-body-color); font-size: 13px; font-weight: 500; white-space: nowrap; box-shadow: 0 1px 2px rgba(56, 65, 74, .1); }
  .ms-ktabs.ms-ktabs-wide button .n { margin-left: 6px; opacity: .65; font-weight: 600; }
  .ms-ktabs.ms-ktabs-wide button.is-on { background: var(--m-navy); color: #fff; }
  .tasks-board.ms-kt-wide { display: block !important; }
  .tasks-board.ms-kt-wide .tasks-list { display: none; width: auto; margin: 0 !important; padding: 0; background: transparent; }
  .tasks-board.ms-kt-wide .tasks-list.is-on { display: block; }
  .tasks-board.ms-kt-wide .tasks-list > .d-flex:first-child { display: none !important; }
  .tasks-board.ms-kt-wide .tasks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .tasks-board.ms-kt-wide .tasks > .card { margin: 0; }
}
/* Udalosti na tablete: Nová udalosť v prvom riadku, aby sa druhý riadok zmestil. */
@media (min-width: 768px) and (max-width: 1199.98px) { .ev-toolbar .ms-tb .ms-tb-add { order: 2; margin-left: 0; } }
/* Mobil: doplnkové tlačidlo (odber kalendára, import) vedľa hľadania ako ikonka. */
@media (max-width: 767.98px) {
  .ms-tb .ms-tb-extra { order: 2; }
  .ms-tb .ms-tb-extra .ms-tb-xlbl { display: none; }
  .ms-tb .ms-tb-extra i { margin: 0 !important; }
  .ms-tb .ms-tb-sel { max-width: 150px; }
}

/* Mobil: preukaz sa zmenší na šírku obrazovky, široké správcovské tabuľky sa posúvajú vo svojej karte. */
@media (max-width: 575.98px) {
  .ms-badge-screen { max-width: 100%; overflow: hidden; }
  .ms-badge-screen .ms-badge { zoom: .9; }
}
@media (max-width: 991.98px) {
  #s-ciselniky .table-responsive > table, #s-google .table-responsive > table { min-width: 620px; }
}

/* 0.19.1 Päta: copyright vľavo, verzia vpravo na každej šírke. */
.footer .row { display: flex; flex-wrap: nowrap; justify-content: space-between; align-items: center; }
.footer .row > div { width: auto; flex: 0 1 auto; text-align: left; }
.footer .row > div:last-child { text-align: right !important; }

/* Tabuľky: obsah zarovnaný hore, hover na celý riadok bez medzier. */
.table { border-collapse: collapse; border-spacing: 0; }
.table > tbody > tr > td, .table > tbody > tr > th { vertical-align: top; }
.table.align-middle > tbody > tr > td, .table.table-centered > tbody > tr > td { vertical-align: top; }
.table > tbody > tr > td .ms-main-in { align-items: flex-start; }
.table > tbody > tr > td .avatar-group, .table > tbody > tr > td.ms-check { padding-top: 2px; }
.table:not(.profile-info):not(.tk-details):not(.ms-list-table) > tbody > tr:not(.rq-list-empty):hover > * { background-color: var(--ms-hover) !important; box-shadow: none !important; }

/* Na tablete a mobile filter členov bez profesií a udalosti bez kalendára. */
@media (max-width: 1199.98px) {
  .pf-nav-btn[data-bs-target="#pf-prof"], #pf-prof { display: none !important; }
  .ev-view[data-view="cal"] { display: none !important; }
}

/* Detail udalosti: odpoveď a Pridať do kalendára v jednom poriadku. */
.ev-answer { display: grid !important; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px 14px !important; }
.ev-answer > .dropdown { margin-left: 0 !important; justify-self: end; }
.ev-answer .rsvp { justify-self: start; }
@media (max-width: 1199.98px) {
  .ev-answer { grid-template-columns: 1fr auto; }
  .ev-answer > span.fw-semibold { grid-column: 1 / -1; margin: 0 !important; }
}
@media (max-width: 575.98px) {
  .ev-answer { grid-template-columns: 1fr; }
  .ev-answer .rsvp { width: 100%; display: flex; }
  .ev-answer .rsvp .btn { flex: 1 1 0; }
  .ev-answer > .dropdown, .ev-answer > .dropdown > .btn { width: 100%; justify-self: stretch; }
}

/* ===========================================================================
   0.19.2 Opravy pre tablet a mobil */

/* Hover tabuliek: na mobile sú riadky flex, preto sa farbí celý riadok a nie jednotlivé bunky. */
@media (max-width: 767.98px) {
  table.ms-stack tr { align-items: flex-start; }
  .table:not(.profile-info):not(.tk-details):not(.ms-list-table) > tbody > tr:not(.rq-list-empty):hover > * { background-color: transparent !important; }
  table.ms-stack > tbody > tr:not(.rq-list-empty):hover { background-color: var(--ms-hover); }
  table.ms-stack td.ms-end { padding-top: 2px !important; }
  table.ms-stack td.ms-check { padding-top: 3px !important; }
}
/* Obsah buniek vždy hore, aj v hlavnej bunke s fotkou alebo dátumom. */
.table > tbody > tr > td { vertical-align: top !important; }
.ms-main-in { align-items: flex-start !important; }
.ms-main-in > .flex-shrink-0, .ms-main-in > .position-relative, .ms-main-in > .channel-hash, .ms-main-in > .ev-date { margin-top: 1px; }

/* Horná lišta na mobile: ponuky profilu a upozornení sú pevne hneď pod lištou, na celú šírku. */
@media (max-width: 767.98px) {
  #page-topbar .navbar-header .dropdown .dropdown-menu.show { position: fixed !important; top: 64px !important; left: 0 !important; right: 0 !important; width: 100% !important; transform: none !important; inset: 64px 0 auto 0 !important; margin: 0 !important; border-radius: 0 0 10px 10px; box-shadow: 0 14px 28px rgba(var(--m-navy-rgb), .18); max-height: calc(100vh - 64px); overflow-y: auto; }
  .topbar-user .dropdown-menu { padding: 6px 0; }
  .topbar-user .dropdown-item, .topbar-user form .btn-link { padding: 11px 18px !important; font-size: 15px; }
  .topbar-user form { padding: 0 !important; }
  .topbar-user form .btn-link { width: 100%; text-align: left; text-decoration: none; }
}
#page-topbar .btn-topbar:focus, #page-topbar .topbar-user-btn:focus { box-shadow: none !important; outline: none; }
#page-topbar .btn-topbar:focus-visible, #page-topbar .topbar-user-btn:focus-visible { box-shadow: 0 0 0 2px var(--m-dot) !important; }
#page-topbar .topbar-badge { top: 2px !important; right: -2px !important; min-width: 16px; height: 16px; line-height: 16px; font-size: 10px !important; }

/* Záložky na tablete a mobile: posuvný pás s jednotným vzhľadom, aktívna záložka len podčiarknutá. */
@media (max-width: 1199.98px) {
  .card-header:has(> .nav-tabs-custom) { padding: 0 6px !important; }
  .card-header > .nav-tabs-custom.card-header-tabs { margin: 0 !important; border: 0 !important; }
  .nav-tabs-custom .nav-link { border: 0 !important; border-radius: 0 !important; background: transparent !important; color: var(--vz-secondary-color) !important; padding: 14px 12px !important; font-weight: 500; margin: 0 !important; }
  .nav-tabs-custom .nav-link.active { color: var(--m-navy) !important; }
  [data-bs-theme=dark] .nav-tabs-custom .nav-link.active { color: #73BBFA !important; }
  .nav-tabs-custom .nav-item .nav-link::after { width: auto !important; left: 12px !important; right: 12px !important; height: 2px !important; bottom: 0 !important; }
}

/* Nastavenia profilu na tablete a mobile: fotka, potom záložky s formulárom, vyplnenie a siete až na konci. */
@media (max-width: 991.98px) {
  .ms-prof-row { display: flex; flex-direction: column; margin-left: 0 !important; margin-right: 0 !important; }
  .ms-prof-left { display: contents; }
  .ms-prof-left > .card, .ms-prof-row > .ms-prof-main { width: 100% !important; max-width: 100% !important; flex: 0 0 auto; margin-left: 0 !important; margin-right: 0 !important; padding: 0 !important; min-width: 0; }
  .ms-prof-left > .card:first-child { order: 0; }
  .ms-prof-main { order: 1; }
  .ms-prof-left > .card:not(:first-child) { order: 2; }
  .ms-prof-main > .card { margin-top: 0 !important; }
}

/* ===========================================================================
   0.19.4 Mobil: okná a výbery */

/* Všetky okná sú vycentrované s rovnakým okrajom vľavo aj vpravo. */
@media (max-width: 575.98px) {
  .modal-dialog { margin: 12px auto !important; width: calc(100% - 24px) !important; max-width: none !important; }
  .modal-dialog-centered { min-height: calc(100% - 24px); }
}
/* Okno so všetkými filtrami je na mobile na celú obrazovku ako v aplikácii. */
@media (max-width: 767.98px) {
  .pf-modal .modal-dialog { margin: 0 !important; width: 100% !important; max-width: none !important; height: 100%; min-height: 100%; }
  .pf-modal .modal-content { height: 100% !important; border: 0; border-radius: 0; }
  .pf-modal .pf-nav { flex-wrap: nowrap; scrollbar-width: none; background: var(--vz-secondary-bg); }
  .pf-modal .pf-nav::-webkit-scrollbar { display: none; }
  .pf-modal .pf-nav-btn { flex: 0 0 auto; border-right: 0; background: transparent; padding: 12px 14px; color: var(--vz-secondary-color); }
  .pf-modal .pf-nav-btn.active { background: transparent; color: var(--m-navy); box-shadow: inset 0 -2px 0 var(--m-navy); }
  .pf-modal .pf-foot { flex-wrap: nowrap; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
  .pf-modal .pf-foot > * { margin: 0; }
  .pf-modal .pf-foot [data-bs-dismiss="modal"].btn-light { display: none; }
  .pf-modal .pf-foot .pf-clear { padding-left: 4px; padding-right: 4px; font-size: 14px; }
  .pf-modal .pf-foot .pf-apply { flex: 1 1 auto; margin-left: 8px !important; }
}

/* Výber v paneli nástrojov: šípka nezakrýva text, dlhý text sa skráti. */
.ms-tb .form-select { padding-right: 2.1rem !important; background-position: right .7rem center !important; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }
@media (max-width: 767.98px) { .ms-tb .ms-tb-sel { max-width: none; flex: 0 0 auto; width: 9.5rem !important; } }

/* ===========================================================================
   0.19.5 Doladenie */

/* Modrá plocha profilu začína hneď pod hornou lištou, bez svetlej medzery. Presah hore zakryje lišta. */
.ms-cover { top: -16px; height: 196px; margin-bottom: -16px; }
.profile-wid-bg.ms-cover-bg { top: -16px; height: 336px; }
@media (max-width: 991.98px) { .profile-wid-bg.ms-cover-bg { height: 436px; } }
.ms-phead-bg { top: calc(-1.5rem - 16px); }

/* Výber v paneli nástrojov je na mobile na celú šírku. */
@media (max-width: 767.98px) { .ms-tb .ms-tb-sel { flex: 1 1 100% !important; width: 100% !important; max-width: none !important; } }

/* Okná na nastavenie, filtre a zoznamy sú na mobile na celú obrazovku. */
@media (max-width: 767.98px) {
  .ms-modal-full .modal-dialog { margin: 0 !important; width: 100% !important; max-width: none !important; height: 100%; min-height: 100%; }
  .ms-modal-full .modal-content { height: 100%; border: 0; border-radius: 0; }
  .ms-modal-full .modal-body { flex: 1 1 auto; overflow-y: auto; }
  .ms-modal-full .modal-footer { flex-wrap: nowrap; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
  .ms-modal-full .modal-footer > * { margin: 0; }
  .ms-modal-full .modal-footer .btn-primary { flex: 1 1 auto; margin-left: 8px !important; }
}

/* Spodok stránky: pätička nie je pod plávajúcim tlačidlom. */
@media (max-width: 767.98px) {
  .main-content:has(.ms-tb-add, .ms-fab) .footer { height: calc(60px + 88px) !important; padding-bottom: 88px !important; }
}
@media (max-width: 767.98px) { .ms-modal-full .modal-footer .btn[data-bs-dismiss="modal"] { display: none; } .ms-modal-full .modal-footer .btn-link, .ms-modal-full .modal-footer .text-danger { margin-right: auto !important; } }
@media (max-width: 767.98px) { .ms-modal-full .modal-footer:not(:has(> :not([data-bs-dismiss="modal"]))) { display: none; } }

/* Horná lišta: neprečítané sú len červená bodka ako pri online stave, bez čísla, aby bola vidno ikonka. */
#page-topbar .topbar-badge { top: 9px !important; right: 9px !important; left: auto !important; transform: none !important; width: 10px !important; height: 10px !important; min-width: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 50% !important; font-size: 0 !important; line-height: 0 !important; color: transparent !important; overflow: hidden; background: #E5383B !important; box-shadow: 0 0 0 2px var(--vz-header-bg); box-sizing: border-box; }
/* Záložky upozornení: aj tu len červená bodka namiesto čísla. */
.notif-tbadge { position: absolute !important; top: -3px !important; right: -3px !important; left: auto !important; transform: none !important; width: 10px !important; height: 10px !important; min-width: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 50% !important; font-size: 0 !important; line-height: 0 !important; color: transparent !important; overflow: hidden; background: #E5383B !important; box-shadow: 0 0 0 2px var(--vz-dropdown-bg, #fff); box-sizing: border-box; }

/* Zaškrtávacie políčka v tabuľkách sú na výšku v strede riadku. */
.table > thead > tr > th:has(> .form-check-input), .table > tbody > tr > td:has(> .form-check-input), .table > tbody > tr > td.ms-check, .table > tbody > tr > td:has(> .form-check) { vertical-align: middle !important; padding-top: .75rem !important; padding-bottom: .75rem !important; }
@media (max-width: 767.98px) { table.ms-stack td.ms-check { align-self: center; padding-top: 0 !important; } }

/* Chat: nástroje kanála sú v jednom riadku vedľa názvu. */
.ms-chat-ttl { min-width: 0; }
.ms-chat-tools { display: flex; align-items: center; justify-content: flex-end; flex-wrap: nowrap; gap: 2px; }
.ms-chat-tools form { display: inline-flex; margin: 0; }
@media (max-width: 575.98px) { .user-chat-topbar { padding: 10px 12px !important; } .ms-chat-tools .btn-icon { width: 34px; height: 34px; } .ms-chat-tools .channel-members-btn { width: auto; } }

/* Dlhý zástupný text vo vyhľadávaní sa skráti trojbodkou. */
.form-control { text-overflow: ellipsis; }
.form-control::placeholder { text-overflow: ellipsis; }
/* Mobil: pravý stĺpec tabuľky nezoberie miesto menu, dlhý text sa skráti. */
@media (max-width: 767.98px) { table.ms-stack td.ms-end { flex: 0 1 auto; max-width: 42%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } table.ms-stack td.ms-main, table.ms-stack td.ms-wide { flex: 1 1 auto; min-width: 0; } }
/* Mobil: hlavička sekcie bez ikonky, tlačidlo ostane vpravo hore. */
@media (max-width: 575.98px) { .ms-sec-head .ms-sec-ico { display: none; } .ms-sec-head { align-items: flex-start; gap: 10px; } .ms-sec-head > .btn { margin-top: 1px; } }

/* Jednotný hover kariet: jemný tieň, mierne nadvihnutie a modrý nadpis. Platí pre projekty, ľudí, udalosti, úlohy aj požiadavky. */
.project-tile, .ev-card, .tasks-box, .profile-project-card { transition: box-shadow .18s ease, transform .18s ease; }
@media (hover: hover) {
  .project-tile:hover, .ev-card:hover, .tasks-box:hover, .profile-project-card:hover { box-shadow: 0 6px 18px rgba(var(--m-navy-rgb), .12) !important; transform: translateY(-1px); }
  .project-tile:hover h5 a, .project-tile:hover h5, .ev-card:hover .ev-title a, .tasks-box:hover .task-title-line a { color: var(--m-blue) !important; }
}
@media (hover: none) { .project-tile:hover, .ev-card:hover, .tasks-box:hover { transform: none; } }
@media (min-width: 1600px) { .table .ms-w1600 { display: table-cell !important; } }
/* Aktívna položka zoznamu má rovnakú tmavomodrú ako tlačidlá. */
.list-group-item.active { background-color: var(--m-navy) !important; border-color: var(--m-navy) !important; color: #fff; }
/* Kanban v zozname: skrytá tabuľa aj jej záložky ostanú skryté. */
.tasks-board.ms-kt.d-none, .ms-ktabs:has(+ .tasks-board.d-none) { display: none !important; }
/* Záložky sú vždy v jednom riadku, pri nedostatku miesta sa posúvajú. */
.nav-tabs-custom, .nav-tabs { flex-wrap: nowrap !important; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.nav-tabs-custom::-webkit-scrollbar, .nav-tabs::-webkit-scrollbar { display: none; }
.nav-tabs-custom .nav-item, .nav-tabs .nav-item { flex: 0 0 auto; }
.nav-tabs-custom .nav-link, .nav-tabs .nav-link { white-space: nowrap; }

/* Velzon pri úzkom bočnom menu nastavuje výšku stránky aspoň 1400 px. Vtedy vznikla pod obsahom prázdna plocha. */
:is([data-layout=vertical],[data-layout=semibox])[data-sidebar-size=sm], [data-sidebar-size=sm] #layout-wrapper, [data-sidebar-size=sm] .main-content { min-height: 0 !important; }
[data-sidebar-size=sm] .main-content { min-height: 100vh !important; }

/* Uznesenia: číslo má len potrebnú šírku, znenie je hneď vedľa. */
@media (min-width: 768px) { .res-table th.res-code, .res-table > tbody > tr > td:first-child { width: 10.5rem; white-space: nowrap; padding-right: 1rem; } }
/* Uznesenia na mobile: stav je len farebná bodka, záložky hore ho vysvetľujú. */
@media (max-width: 767.98px) {
  .res-table td.ms-end { flex: 0 0 auto; max-width: none; padding-top: 8px !important; }
  .res-table td.ms-end .badge { display: inline-block; width: 10px; height: 10px; padding: 0; border-radius: 50%; font-size: 0; line-height: 0; background-color: currentColor !important; vertical-align: middle; }
  .res-table td.ms-end .fs-11 { display: none; }
}
@media (min-width: 768px) { .res-table > tbody > tr > td:first-child .ms-tx, .res-table > tbody > tr > td:first-child .ms-t { overflow: visible; text-overflow: clip; white-space: nowrap; max-width: none; } }
@media (max-width: 767.98px) { .res-table td.ms-end { overflow: visible !important; width: 26px; flex: 0 0 26px !important; padding: 8px 4px 0 0 !important; text-align: right; } }

/* Tabuľky v Systéme a v profile sú na mobile karty: názov hore, ďalšie údaje s popisom pod ním. */
.sys-check > .sys-go { position: absolute; inset: 0; z-index: 1; }
@media (max-width: 767.98px) {
  .table-responsive:has(> .ms-cards) { overflow: visible; }
  table.ms-cards, table.ms-cards tbody { display: block; width: 100%; }
  table.ms-cards thead { display: none; }
  table.ms-cards tr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--vz-border-color); }
  table.ms-cards tr.table-light { background: transparent; padding-bottom: 4px; border-bottom: 0; }
  table.ms-cards tr.d-none { display: none; }
  table.ms-cards td { display: flex; align-items: center; gap: 10px; width: 100%; padding: 0 !important; border: 0 !important; background: transparent !important; text-align: left !important; min-width: 0; }
  table.ms-cards td.d-none { display: none !important; }
  table.ms-cards td[data-label]::before { content: attr(data-label); flex: 0 0 34%; max-width: 34%; font-size: 12px; color: var(--vz-secondary-color); }
  table.ms-cards td > :not(form) { min-width: 0; }
  table.ms-cards td > .form-control, table.ms-cards td > .form-select { flex: 1 1 auto; width: auto; }
  table.ms-cards td.ms-card-title { font-weight: 600; width: auto; flex: 1 1 auto; }
  table.ms-cards td.ms-card-full { width: 100%; }
  table.ms-cards td.ms-card-act { width: auto; flex: 0 0 auto; order: -1; margin-left: auto; }
  table.ms-cards td.ms-card-title + td.ms-card-act, table.ms-cards tr > td.ms-card-act { order: 0; }
  table.ms-cards tr:has(> td.ms-card-title) > td.ms-card-act { order: 1; }
  table.ms-cards tr:has(> td.ms-card-title) > td.ms-card-title { order: 0; }
  table.ms-cards tr:has(> td.ms-card-title) > td:not(.ms-card-title):not(.ms-card-act) { order: 2; }
  table.ms-cards code { white-space: normal; overflow-wrap: anywhere; }
}
@media (max-width: 767.98px) {
  table.ms-cards { min-width: 0 !important; max-width: 100%; table-layout: auto; }
  table.ms-cards tr { width: 100%; }
  table.ms-cards td > .form-control, table.ms-cards td > .form-select { min-width: 0; width: 100% !important; flex: 1 1 0; }
}
