/* ======================================================================
   MOBILNI SLOJ (2026-09-24) - fullscreen meni, donja tab traka, Kendo grid
   i tablice kao kartice na uskim ekranima. JS dio: Scripts/app/mu-mobile.js.
   Učitava se POSLIJE mojured-theme.css (vidi _LayoutKendo.cshtml).
   Opt-out za pojedinačni grid/tablicu: klasa "mu-no-cards" na elementu ili
   roditelju.
   ====================================================================== */

/* ---------------------------------------------------------------------
   FULLSCREEN MENI (#muMenu)
   Otvara se kružnim "reveal" efektom iz pozicije dugmeta koje ga je otvorilo
   (--mu-ox/--mu-oy postavlja JS), pločice ulijeću s malim zakašnjenjem.
   --------------------------------------------------------------------- */
#muMenu {
    --mu-ox: 36px;
    --mu-oy: 36px;
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: none;
    flex-direction: column;
    color: #fff;
    background: #0d2b33;
    clip-path: circle(0 at var(--mu-ox) var(--mu-oy));
    -webkit-clip-path: circle(0 at var(--mu-ox) var(--mu-oy));
    transition: clip-path .5s cubic-bezier(.7, 0, .2, 1), -webkit-clip-path .5s cubic-bezier(.7, 0, .2, 1);
    overscroll-behavior: contain;
}

#muMenu.is-mounted { display: flex; }

#muMenu.is-open {
    clip-path: circle(150% at var(--mu-ox) var(--mu-oy));
    -webkit-clip-path: circle(150% at var(--mu-ox) var(--mu-oy));
}

body.mu-menu-open { overflow: hidden !important; }

/* Pozadina: dvije mutne "aurora" mrlje u brand boji koje se sporo pomjeraju */
.mu-menu-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    background: radial-gradient(120% 80% at 100% 0%, #124a52 0%, #0d2b33 55%, #0a1f26 100%);
}
.mu-menu-bg::before,
.mu-menu-bg::after {
    content: "";
    position: absolute;
    width: 70vmax;
    height: 70vmax;
    border-radius: 50%;
    filter: blur(60px);
    opacity: .35;
    animation: muAurora 14s ease-in-out infinite alternate;
}
.mu-menu-bg::before {
    background: var(--brand-primary);
    top: -30vmax;
    right: -25vmax;
}
.mu-menu-bg::after {
    background: #3b6fd8;
    bottom: -35vmax;
    left: -30vmax;
    opacity: .22;
    animation-delay: -7s;
}
@keyframes muAurora {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(-6vmax, 8vmax) scale(1.15); }
}

.mu-menu-top,
.mu-menu-search,
.mu-menu-quick,
.mu-menu-scroll,
.mu-menu-foot {
    position: relative; /* iznad .mu-menu-bg */
}

.mu-menu-top {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: calc(16px + env(safe-area-inset-top)) 18px 10px;
}
.mu-menu-initials { display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 16px; font-weight: 700; letter-spacing: .5px; }
.mu-menu-avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,.25);
    flex-shrink: 0;
    background: rgba(255,255,255,.1);
}
.mu-menu-who { flex: 1; min-width: 0; }
.mu-menu-greet {
    font-size: 12px;
    color: rgba(255,255,255,.55);
    letter-spacing: .02em;
}
.mu-menu-name {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mu-menu-close {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 0;
    background: rgba(255,255,255,.1);
    color: #fff;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform .35s cubic-bezier(.3, 1.6, .5, 1), background .15s;
}
#muMenu.is-open .mu-menu-close { transform: rotate(90deg); }
.mu-menu-close:active { background: rgba(255,255,255,.2); }

.mu-menu-search {
    margin: 6px 18px 12px;
}
.mu-menu-search input {
    width: 100%;
    height: 48px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: 16px; /* 16px = iOS ne zumira na fokus */
    padding: 0 16px 0 44px;
    outline: none;
    transition: border-color .15s, background .15s;
}
.mu-menu-search input::placeholder { color: rgba(255,255,255,.45); }
.mu-menu-search input:focus {
    border-color: var(--brand-primary-tint);
    background: rgba(255,255,255,.12);
}
.mu-menu-search .fa {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,.5);
    font-size: 16px;
}

/* Brze akcije: horizontalno skrolajući "čipovi" */
.mu-menu-quick {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 18px 14px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.mu-menu-quick::-webkit-scrollbar { display: none; }
.mu-menu-quick:empty { display: none; }
.mu-chip {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--brand-primary);
    color: #fff !important;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    box-shadow: 0 6px 18px rgba(var(--brand-rgb),.35);
}
.mu-chip .fa { font-size: 13px; }
.mu-chip:active { transform: scale(.96); }

.mu-menu-scroll {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 14px 20px;
    scrollbar-width: none;
}
.mu-menu-scroll::-webkit-scrollbar { display: none; }

.mu-sec { margin-bottom: 14px; }
.mu-sec-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 6px 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--brand-primary-tint);
}
.mu-sec-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(79,197,193,.35), transparent);
}

.mu-tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
@media (max-width: 340px) {
    .mu-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.mu-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 92px;
    padding: 12px 6px 10px;
    border-radius: 18px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    color: rgba(255,255,255,.88) !important;
    text-align: center;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none !important;
    opacity: 0;
    transform: translateY(14px) scale(.96);
    transition: background .15s, border-color .15s;
}
#muMenu.is-open .mu-tile {
    animation: muTileIn .42s cubic-bezier(.2, .9, .3, 1.2) forwards;
    animation-delay: calc(120ms + var(--i, 0) * 28ms);
}
@keyframes muTileIn {
    to { opacity: 1; transform: none; }
}
.mu-tile:active {
    background: rgba(255,255,255,.14);
    transform: scale(.95);
}
.mu-tile-ico {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    background: linear-gradient(135deg, hsl(var(--h, 178), 70%, 45%), hsl(calc(var(--h, 178) + 30), 70%, 35%));
    box-shadow: 0 6px 14px hsla(var(--h, 178), 70%, 30%, .45);
}
.mu-tile.is-active {
    background: rgba(var(--brand-rgb),.2);
    border-color: var(--brand-primary-tint);
}
.mu-tile.is-active::after {
    content: "";
    position: absolute;
    top: 8px;
    right: 8px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #5dead5;
    box-shadow: 0 0 0 3px rgba(93,234,213,.25);
}
.mu-tile.is-soon { opacity: .4 !important; pointer-events: none; }

.mu-menu-empty {
    display: none;
    text-align: center;
    padding: 40px 20px;
    color: rgba(255,255,255,.55);
    font-size: 14px;
}
.mu-menu-empty .fa { display: block; font-size: 30px; margin-bottom: 10px; opacity: .6; }
#muMenu.is-filtered-empty .mu-menu-empty { display: block; }

.mu-menu-foot {
    display: flex;
    gap: 10px;
    padding: 12px 18px calc(14px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(255,255,255,.08);
    background: rgba(0,0,0,.15);
}
.mu-menu-foot a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    border-radius: 14px;
    background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.85) !important;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none !important;
}
.mu-menu-foot a.mu-danger { color: #ff9d9d !important; }
.mu-menu-foot a:active { background: rgba(255,255,255,.16); }

@media (prefers-reduced-motion: reduce) {
    #muMenu, .mu-tile, .mu-menu-bg::before, .mu-menu-bg::after { transition: none !important; animation: none !important; }
    .mu-tile { opacity: 1; transform: none; }
}

@media (min-width: 769px) {
    #muMenu, #muTabbar { display: none !important; }
}

/* ---------------------------------------------------------------------
   DONJA TAB TRAKA (#muTabbar) - samo mobitel
   --------------------------------------------------------------------- */
#muTabbar { display: none; }

@media (max-width: 768px) {
    #muTabbar {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: calc(10px + env(safe-area-inset-bottom));
        z-index: 1040;
        display: flex;
        align-items: stretch;
        justify-content: space-around;
        height: 62px;
        padding: 0 6px;
        border-radius: 22px;
        background: rgba(255,255,255,.92);
        -webkit-backdrop-filter: blur(14px) saturate(1.6);
        backdrop-filter: blur(14px) saturate(1.6);
        box-shadow: 0 10px 30px rgba(15, 40, 50, .18), 0 0 0 1px rgba(15, 40, 50, .06);
        transition: transform .3s ease;
    }
    body.mu-tabbar-hidden #muTabbar { transform: translateY(calc(100% + 20px)); }

    #muTabbar a {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        color: #7b8494 !important;
        font-size: 10.5px;
        font-weight: 600;
        text-decoration: none !important;
        -webkit-tap-highlight-color: transparent;
        min-width: 0;
    }
    #muTabbar a span {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    #muTabbar a .fa { font-size: 19px; }
    #muTabbar a.is-active { color: var(--brand-primary) !important; }
    #muTabbar a.is-active .fa { transform: translateY(-1px); }

    /* Središnje dugme "Meni" - izdignuto, brand gradijent */
    #muTabbar a.mu-tab-fab { flex: 0 0 64px; }
    #muTabbar a.mu-tab-fab i {
        width: 54px;
        height: 54px;
        margin-top: -26px;
        border-radius: 18px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-size: 22px;
        background: linear-gradient(135deg, var(--brand-primary-tint), var(--brand-primary-active));
        box-shadow: 0 10px 22px rgba(var(--brand-rgb),.45), 0 0 0 5px #fff;
        transition: transform .2s;
    }
    #muTabbar a.mu-tab-fab:active i { transform: scale(.92) rotate(-8deg); }

    /* Mjesto za traku ispod sadržaja */
    body.mu-has-tabbar #page-wrapper { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
    body.mu-has-tabbar .footer { position: static !important; }
}

/* ---------------------------------------------------------------------
   OPŠTE MOBILNO: top navbar, forme, dugmad, modali
   --------------------------------------------------------------------- */
@media (max-width: 768px) {
    body #navTop.mu-topbar {
        height: 60px;
        position: sticky;
        top: 0;
        z-index: 1030;
        background: rgba(249,249,250,.94);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
    }
    /* Sticky mora biti na omotaču (.row.border-bottom): sticky element se lijepi
       samo unutar svog roditelja, a omotač je visok tačno kao sam navbar. */
    #page-wrapper > .row.border-bottom:has(> #navTop) {
        position: sticky;
        top: 0;
        z-index: 1030;
        margin-left: 0;
        margin-right: 0;
    }
    body .mu-topbar-inner { padding: 0 8px 0 10px; gap: 4px; }
    .mu-topbar-left .navbar-minimalize {
        width: 42px;
        height: 42px;
        margin: 0 !important;
        border-radius: 13px;
        display: flex !important;
        align-items: center;
        justify-content: center;
        padding: 0 !important;
        font-size: 17px;
    }
    /* Naslov trenutne stranice u top baru (JS ga ubacuje) */
    .mu-topbar-title {
        flex: 1;
        min-width: 0;
        font-size: 16px;
        font-weight: 700;
        color: var(--sidebar-text-strong, #1f2230);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Forme: 16px font da iOS ne zumira, veće dodirne površine */
    input.form-control,
    select.form-control,
    textarea.form-control,
    .k-textbox, .k-input, .k-dropdown .k-input,
    .select2-container .select2-selection {
        font-size: 16px !important;
    }
    .form-control, .k-textbox, .k-widget.k-dropdown, .k-widget.k-datepicker,
    .k-widget.k-combobox, .k-widget.k-numerictextbox, .k-widget.k-autocomplete,
    .k-widget.k-multiselect, .k-widget.k-datetimepicker {
        width: 100% !important;
        max-width: 100%;
    }
    .form-control { min-height: 42px; border-radius: 10px; }
    textarea.form-control { min-height: 90px; }
    .form-horizontal .control-label {
        text-align: left !important;
        padding-top: 0;
        margin-bottom: 4px;
        font-size: 12px;
        font-weight: 600;
        color: #6b7280;
        text-transform: uppercase;
        letter-spacing: .03em;
    }
    .form-horizontal .form-group { margin-left: 0; margin-right: 0; }
    .form-horizontal .form-group > [class*="col-"] { padding-left: 0; padding-right: 0; }

    .btn { min-height: 40px; border-radius: 10px; }
    .btn-xs, .btn-sm { min-height: 32px; }
    .k-grid .k-button { min-height: 34px; }

    /* Bootstrap modal -> "bottom sheet" koji izlazi odozdo */
    .modal.fade .modal-dialog {
        transform: translateY(40px);
        transition: transform .28s cubic-bezier(.2, .9, .3, 1);
    }
    .modal.in .modal-dialog { transform: none; }
    .modal-dialog {
        margin: 0 !important;
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100% !important;
        max-height: 92vh;
    }
    .modal-content {
        border-radius: 22px 22px 0 0 !important;
        border: 0;
        max-height: 92vh;
        overflow-y: auto;
        padding-bottom: env(safe-area-inset-bottom);
    }
    .modal-content::before {
        content: "";
        display: block;
        width: 42px;
        height: 5px;
        border-radius: 3px;
        background: #d5d9e0;
        margin: 8px auto 0;
    }
    .modal-footer {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    .modal-footer .btn { flex: 1 1 auto; margin: 0 !important; }

    /* Kendo prozor preko cijelog ekrana */
    .k-window {
        top: 8px !important;
        left: 8px !important;
        width: calc(100vw - 16px) !important;
        max-width: none !important;
        max-height: calc(100vh - 16px);
        border-radius: 16px;
        overflow: hidden;
    }
    .k-window-content { max-height: calc(100vh - 70px); overflow-y: auto; }

    /* Toastr iznad tab trake */
    #toast-container.toast-bottom-right,
    #toast-container.toast-bottom-left,
    #toast-container.toast-bottom-center,
    #toast-container.toast-bottom-full-width { bottom: 90px; }
    #toast-container > div { width: calc(100vw - 24px) !important; }
}

/* ---------------------------------------------------------------------
   KENDO GRID KAO KARTICE (.mu-cards postavlja JS, samo za ne-editabilne
   i ne-locked gridove). Ćelije dobijaju data-label iz naslova kolone.
   --------------------------------------------------------------------- */
@media (max-width: 767px) {
    .k-grid.mu-cards {
        height: auto !important; /* .Height(543) / style="height:..." - kartice rastu same */
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }
    .k-grid.mu-cards > .k-grid-header,
    .k-grid.mu-cards .k-grid-header { display: none !important; }
    .k-grid.mu-cards .k-grid-content {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        background: transparent;
    }
    .k-grid.mu-cards table {
        display: block;
        width: 100% !important;
        min-width: 0 !important;
        table-layout: auto;
        background: transparent;
    }
    .k-grid.mu-cards colgroup { display: none; }
    .k-grid.mu-cards tbody { display: block; }

    .k-grid.mu-cards tbody > tr:not(.k-grouping-row):not(.k-detail-row) {
        display: block;
        position: relative;
        margin: 0 0 10px;
        padding: 12px 14px 10px;
        border-radius: 16px;
        background: #fff !important;
        border: 1px solid #eceef2;
        box-shadow: 0 2px 10px rgba(20, 30, 50, .05);
        animation: muCardIn .3s ease both;
    }
    .k-grid.mu-cards tbody > tr.k-state-selected,
    .k-grid.mu-cards tbody > tr.k-selected {
        border-color: var(--brand-primary);
        box-shadow: 0 0 0 2px var(--brand-primary-soft);
    }
    .k-grid.mu-cards tbody > tr.k-grouping-row {
        display: block;
        background: transparent !important;
    }
    .k-grid.mu-cards tbody > tr.k-grouping-row td {
        display: block;
        border: 0 !important;
        padding: 12px 4px 6px !important;
        font-weight: 700;
        color: var(--brand-primary-active);
        background: transparent !important;
    }
    .k-grid.mu-cards tbody > tr.k-detail-row { display: block; }
    .k-grid.mu-cards tbody > tr.k-detail-row > td { display: block; border: 0 !important; }

    .k-grid.mu-cards tbody > tr:not(.k-grouping-row):not(.k-detail-row) > td {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 14px;
        width: auto !important;
        padding: 5px 0 !important;
        border: 0 !important;
        background: transparent !important;
        text-align: right !important;
        white-space: normal !important;
        overflow-wrap: anywhere;
        font-size: 14px;
        line-height: 1.35;
        color: #2a2f3a;
    }
    .k-grid.mu-cards tbody > tr > td::before {
        content: attr(data-label);
        flex: 0 0 auto;
        max-width: 48%;
        text-align: left;
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: .04em;
        color: #9099a8;
    }
    .k-grid.mu-cards tbody > tr > td[data-label=""]::before,
    .k-grid.mu-cards tbody > tr > td:not([data-label])::before { display: none; }
    .k-grid.mu-cards tbody > tr > td[data-label=""] { justify-content: flex-start; text-align: left !important; }

    .k-grid.mu-cards tbody > tr > td.mu-card-title {
        font-size: 16px;
        font-weight: 700;
        text-align: left !important;
        justify-content: flex-start;
        padding: 0 28px 8px 0 !important;
        margin-bottom: 4px;
        border-bottom: 1px dashed #eceef2 !important;
    }
    .k-grid.mu-cards tbody > tr > td.mu-card-title::before { display: none; }
    /* Kartica koja vodi na detalje - chevron desno gore */
    .k-grid.mu-cards tbody > tr.mu-tap::after {
        content: "\f105"; /* fa-angle-right */
        font-family: FontAwesome;
        position: absolute;
        top: 12px;
        right: 14px;
        font-size: 20px;
        line-height: 1;
        color: #c3c8d1;
    }
    .k-grid.mu-cards tbody > tr.mu-tap:active { transform: scale(.985); }

    .k-grid.mu-cards tbody > tr > td.k-group-cell { display: none; }
    /* Detail/hierarchy grid: strelica za proširenje ostaje, kao dugme gore desno */
    .k-grid.mu-cards tbody > tr > td.k-hierarchy-cell {
        position: absolute;
        top: 6px;
        right: 34px;
        width: 36px !important;
        padding: 0 !important;
        justify-content: center;
        z-index: 2;
    }
    .k-grid.mu-cards tbody > tr > td.k-hierarchy-cell::before { display: none; }
    .k-grid.mu-cards tbody > tr > td.k-hierarchy-cell .k-icon { width: 32px; height: 32px; line-height: 32px; }

    .k-grid.mu-cards tbody > tr > td.mu-cmd {
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 6px;
        margin-top: 6px;
        padding-top: 10px !important;
        border-top: 1px solid #f1f2f5 !important;
    }
    .k-grid.mu-cards tbody > tr > td.mu-cmd::before { display: none; }
    .k-grid.mu-cards tbody > tr > td.mu-cmd .k-button,
    .k-grid.mu-cards tbody > tr > td.mu-cmd .btn {
        margin: 0 !important;
        min-height: 36px;
        border-radius: 10px;
    }

    .k-grid.mu-cards .k-grid-norecords,
    .k-grid.mu-cards .k-grid-norecords-template {
        display: block;
        text-align: center;
        padding: 30px 10px;
        color: #9099a8;
        background: transparent;
        border: 0;
    }

    .k-grid.mu-cards .k-pager-wrap,
    .k-grid.mu-cards .k-grid-pager {
        border: 0;
        background: transparent;
        justify-content: center;
        display: flex;
        flex-wrap: wrap;
        padding: 6px 0 !important;
    }
    .k-grid.mu-cards .k-grid-footer { display: none; }

    /* Plain / DataTables tablice kao kartice */
    table.mu-cards-table { display: block; width: 100% !important; min-width: 0 !important; border: 0 !important; }
    table.mu-cards-table > thead { display: none; }
    table.mu-cards-table > tbody { display: block; }
    table.mu-cards-table > tbody > tr {
        display: block;
        margin: 0 0 10px;
        padding: 10px 14px;
        border-radius: 14px;
        background: #fff !important;
        border: 1px solid #eceef2;
        box-shadow: 0 2px 10px rgba(20, 30, 50, .05);
    }
    table.mu-cards-table > tbody > tr > td {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 14px;
        border: 0 !important;
        padding: 5px 0 !important;
        text-align: right;
        white-space: normal !important;
        overflow-wrap: anywhere;
    }
    table.mu-cards-table > tbody > tr > td::before {
        content: attr(data-label);
        flex: 0 0 auto;
        max-width: 48%;
        text-align: left;
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: .04em;
        color: #9099a8;
    }
    table.mu-cards-table > tbody > tr > td[data-label=""]::before { display: none; }
    table.mu-cards-table > tbody > tr > td[data-label=""] { justify-content: flex-start; text-align: left; }
    table.mu-cards-table > tbody > tr > td.mu-card-title {
        font-weight: 700;
        font-size: 15px;
        text-align: left;
        justify-content: flex-start;
        border-bottom: 1px dashed #eceef2 !important;
        padding-bottom: 8px !important;
        margin-bottom: 4px;
    }
    table.mu-cards-table > tbody > tr > td.mu-card-title::before { display: none; }
    table.mu-cards-table:not(.dataTable) > tbody > tr > td.mu-prazno:not(.mu-card-title),
    .k-grid.mu-cards tbody > tr > td.mu-prazno:not(.mu-card-title) { display: none !important; }
    table.mu-cards-table > tbody > tr > td.mu-cmd {
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 6px;
        margin-top: 6px;
        padding-top: 10px !important;
        border-top: 1px solid #f1f2f5 !important;
    }
    table.mu-cards-table > tbody > tr > td.mu-cmd::before { display: none; }
    table.mu-cards-table > tbody > tr > td.mu-cmd .btn { min-height: 36px; }
    table.mu-cards-table > tbody > tr > td.mu-cmd form { display: inline-flex !important; margin: 0; }
    /* Kontekstualne boje reda (danger/warning/success) kao traka lijevo na kartici */
    table.mu-cards-table > tbody > tr.danger,
    .k-grid.mu-cards tbody > tr.danger { border-left: 4px solid #ed5565 !important; }
    table.mu-cards-table > tbody > tr.warning,
    .k-grid.mu-cards tbody > tr.warning { border-left: 4px solid #f8ac59 !important; }
    table.mu-cards-table > tbody > tr.success,
    .k-grid.mu-cards tbody > tr.success { border-left: 4px solid var(--brand-primary) !important; }
    table.mu-cards-table > tbody > tr.info,
    .k-grid.mu-cards tbody > tr.info { border-left: 4px solid #23c6c8 !important; }
    table.mu-cards-table > tbody > tr > td.mu-card-title a { font-weight: 700; }
    table.mu-cards-table > tfoot { display: block; }
    table.mu-cards-table > tfoot > tr { display: flex; flex-wrap: wrap; justify-content: space-between; }
    table.mu-cards-table > tfoot > tr > * { border: 0 !important; }
}

@keyframes muCardIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

.mu-topbar-title { display: none; }
@media (max-width: 768px) {
    .mu-topbar-title { display: block; }
}

/* =====================================================================
   FAZA 2 MOBILNOG SLOJA
   ===================================================================== */

/* ---------------------------------------------------------------------
   Sidebar na mobitelu NIKAD - zamjena je #muMenu. Inspinia inače prikaže
   70px traku preko sadržaja kad je u localStorage ostalo "mini-navbar".
   --------------------------------------------------------------------- */
@media (max-width: 768px) {
    body .navbar-static-side,
    body.mini-navbar .navbar-static-side,
    body.body-small.mini-navbar .navbar-static-side { display: none !important; }
    body.mini-navbar #page-wrapper,
    body.body-small #page-wrapper { margin: 0 !important; }
    #page-wrapper { min-height: 100vh !important; }

    /* Top bar: bez avatara/dividera (korisnik je u meniju), veće ikone */
    .mu-topbar-right { gap: 2px !important; }
    .mu-topbar-right .mu-user-menu,
    .mu-topbar-right .mu-topbar-divider { display: none !important; }
    .mu-topbar-right .mu-icon-btn { width: 38px; height: 38px; font-size: 18px; }
    .mu-topbar-title { padding-left: 4px; }

    /* Notifikacije / poruke dropdown - puna širina ispod top bara */
    .mu-notif .dropdown-menu {
        position: fixed !important;
        top: 64px !important;
        left: 8px !important;
        right: 8px !important;
        width: auto !important;
        min-width: 0 !important;
        max-height: 70vh;
        overflow-y: auto;
        border-radius: 16px !important;
        box-shadow: 0 18px 40px rgba(15, 40, 50, .22) !important;
    }

    /* Dugme "nazad" i "više akcija" u top baru (JS ih ubacuje) */
    .mu-tb-btn {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        border: 0;
        background: transparent;
        color: var(--sidebar-text-strong, #1f2230) !important;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        flex-shrink: 0;
        padding: 0;
        -webkit-tap-highlight-color: transparent;
        text-decoration: none !important;
    }
    .mu-tb-btn:active { background: rgba(0,0,0,.06); }

    /* Sadržaj: ništa ne smije biti šire od ekrana */
    #content-wrap img,
    #content-wrap iframe,
    #content-wrap video,
    #content-wrap canvas { max-width: 100%; }
    #content-wrap div[style*="width"],
    #content-wrap input[style*="width"],
    #content-wrap select[style*="width"],
    #content-wrap textarea[style*="width"],
    #content-wrap table[style*="width"] { max-width: 100% !important; }
    #content-wrap pre { white-space: pre-wrap; word-break: break-word; }
    .mu-scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }

    /* Page heading na mobitelu: naslov je već u top baru */
    .page-heading.mu-heading-lite h2,
    .page-heading.mu-heading-lite .breadcrumb { display: none !important; }
    .page-heading .title-action.mu-moved { display: none !important; }
    .page-heading.mu-heading-empty { display: none !important; }

    /* Tabovi: horizontalni skrol umjesto lomljenja u 3 reda */
    .nav-tabs {
        display: flex !important;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        border-bottom: 1px solid #e7eaec;
    }
    .nav-tabs::-webkit-scrollbar { display: none; }
    .nav-tabs > li { float: none; flex: 0 0 auto; }
    .nav-tabs > li > a { white-space: nowrap; padding: 10px 14px; margin-right: 0; }
    .tabs-container .tab-pane .panel-body { padding: 12px 10px; }
    .nav-pills { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .nav-pills::-webkit-scrollbar { display: none; }
    .nav-pills > li { float: none; flex: 0 0 auto; }

    /* Kendo prozor: fiksno u viewportu (inače "top:8px" od vrha DOKUMENTA) */
    .k-window { position: fixed !important; }
    /* Mali Kendo dijalozi (potvrde) - po sredini ekrana, ne zalijepljeni gore */
    .k-window.k-dialog { top: 50% !important; transform: translateY(-50%); max-height: 90vh; }
    .k-dialog .k-dialog-buttongroup .k-button { min-height: 46px; }

    /* Kendo tabstrip isto kao bootstrap tabovi */
    .k-tabstrip-items { display: flex !important; flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; }
    .k-tabstrip-items .k-item { flex: 0 0 auto; }

    /* Kendo grid toolbar: pretraga punom širinom */
    .k-grid-toolbar .k-grid-search { width: 100% !important; margin: 4px 0 0 !important; order: 99; }
    .k-grid-toolbar .k-grid-search input { width: 100% !important; }

    /* SweetAlert */
    .sweet-alert {
        width: auto !important;
        left: 12px !important;
        right: 12px !important;
        margin-left: 0 !important;
        padding: 18px !important;
        border-radius: 20px !important;
    }
    .sweet-alert button { min-height: 44px; margin: 6px 4px !important; border-radius: 12px !important; }

    /* select2 dropdown ne izlazi iz ekrana */
    .select2-container--open .select2-dropdown { max-width: calc(100vw - 16px); }
    .select2-results__option { padding: 10px 12px; }

    /* Bootstrap dropdown u sadržaju (npr. "Akcije" na karticama) */
    #content-wrap .dropdown-menu { max-width: calc(100vw - 24px); }
    #content-wrap .dropdown-menu > li > a { padding: 10px 16px; }

    /* Checkbox/radio - veća meta za prst */
    #content-wrap input[type=checkbox]:not(.k-checkbox),
    #content-wrap input[type=radio]:not(.k-radio) { width: 20px; height: 20px; vertical-align: middle; }

    /* Statistika kartice (col-lg-3 col-md-6 s ibox-om) - 2 po redu umjesto 1 */
    .row > .col-lg-3.col-md-6:has(> .ibox) {
        width: 50%;
        float: left;
    }
    .row > .col-lg-3.col-md-6:has(> .ibox):nth-child(2n+1) { clear: left; }
    .row > .col-lg-3.col-md-6 > .ibox { margin-bottom: 12px; }
    .row > .col-lg-3.col-md-6 > .ibox .ibox-title { padding: 10px 12px 4px; }
    .row > .col-lg-3.col-md-6 > .ibox .ibox-title h5 { font-size: 12px; margin: 0; }
    .row > .col-lg-3.col-md-6 > .ibox .ibox-title .label { font-size: 9px; padding: 2px 6px; margin-bottom: 4px; display: inline-block; }
    .row > .col-lg-3.col-md-6 > .ibox .ibox-content { padding: 6px 12px 12px; }
    .row > .col-lg-3.col-md-6 > .ibox .ibox-content h1 { font-size: 20px; word-break: break-word; }
    .row > .col-lg-3.col-md-6 > .ibox .stat-percent { float: none; display: block; font-size: 11px; margin-top: 2px; }
    .row > .col-lg-3.col-md-6 > .ibox .stat-value { font-size: 17px; word-break: break-word; }
    .row > .col-lg-3.col-md-6 > .ibox .stat-label { font-size: 10px; }
    .row > .col-lg-3.col-md-6 > .ibox-stat .ibox-content { padding: 10px 12px; }

    /* Liste s vlastitim mobilnim karticama (Računi/Ponude/Stranke...) -
       sticky filter ispod top bara (60px), zaobljene kartice u stilu sloja */
    .mob-list-filters { top: 60px !important; border-radius: 0 0 16px 16px; box-shadow: 0 6px 14px rgba(20,30,50,.05); }
    .mob-list-filters .form-control { font-size: 16px !important; height: 44px !important; border-radius: 12px; }
    [class^="mob-"][class$="-card"] { border-radius: 16px !important; border-color: #eceef2 !important; box-shadow: 0 2px 10px rgba(20,30,50,.05) !important; transition: transform .12s; }
    [class^="mob-"][class$="-card"]:active { transform: scale(.985); }
}

/* ---------------------------------------------------------------------
   PLUTAJUĆE AKCIJSKO DUGME (FAB) + SHEET S AKCIJAMA STRANICE
   --------------------------------------------------------------------- */
#muFab, #muSheet, #muSheetBackdrop { display: none; }
@media (min-width: 769px) {
    .mu-tb-btn, #muFab, #muSheet, #muSheetBackdrop { display: none !important; }
}

@media (max-width: 768px) {
    #muFab {
        position: fixed;
        right: 16px;
        bottom: calc(86px + env(safe-area-inset-bottom));
        z-index: 1035;
        display: flex;
        align-items: center;
        gap: 10px;
        height: 54px;
        max-width: calc(100vw - 32px);
        padding: 0 20px 0 18px;
        border: 0;
        border-radius: 18px;
        color: #fff !important;
        font-size: 15px;
        font-weight: 700;
        text-decoration: none !important;
        background: linear-gradient(135deg, var(--brand-primary-tint), var(--brand-primary-active));
        box-shadow: 0 12px 26px rgba(10, 111, 108, .38);
        transition: padding .25s ease, transform .3s ease, bottom .3s ease;
        -webkit-tap-highlight-color: transparent;
        animation: muFabIn .45s cubic-bezier(.2, .9, .3, 1.3) both;
    }
    #muFab .fa { font-size: 19px; }
    #muFab span {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 220px;
        transition: max-width .25s ease, opacity .2s;
    }
    #muFab.is-mini { padding: 0 17px; }
    #muFab.is-mini span { max-width: 0; opacity: 0; }
    #muFab:active { transform: scale(.94); }
    body.mu-tabbar-hidden #muFab,
    body:not(.mu-has-tabbar) #muFab { bottom: calc(18px + env(safe-area-inset-bottom)); }
    body.mu-kbd-open #muFab { display: none; }

    #muSheetBackdrop {
        position: fixed;
        inset: 0;
        z-index: 10040;
        background: rgba(10, 25, 35, .45);
        opacity: 0;
        transition: opacity .25s;
    }
    #muSheet {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 10041;
        max-height: 80vh;
        overflow-y: auto;
        padding: 8px 14px calc(16px + env(safe-area-inset-bottom));
        background: #fff;
        border-radius: 24px 24px 0 0;
        box-shadow: 0 -12px 40px rgba(10, 25, 35, .2);
        transform: translateY(105%);
        transition: transform .32s cubic-bezier(.2, .9, .3, 1);
    }
    #muSheet.is-mounted, #muSheetBackdrop.is-mounted { display: block; }
    #muSheet.is-open { transform: none; }
    #muSheetBackdrop.is-open { opacity: 1; }
    .mu-sheet-grip { width: 42px; height: 5px; border-radius: 3px; background: #d5d9e0; margin: 2px auto 10px; }
    .mu-sheet-title {
        font-size: 12px;
        font-weight: 700;
        letter-spacing: .08em;
        text-transform: uppercase;
        color: #9099a8;
        padding: 0 6px 8px;
    }
    .mu-sheet-item {
        display: flex;
        align-items: center;
        gap: 14px;
        width: 100%;
        min-height: 54px;
        padding: 8px;
        border: 0;
        border-radius: 14px;
        background: transparent;
        color: #1f2230 !important;
        font-size: 15px;
        font-weight: 600;
        text-align: left;
        text-decoration: none !important;
    }
    .mu-sheet-item:active { background: #f1f4f6; }
    .mu-sheet-ico {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        font-size: 17px;
        color: var(--brand-primary-active);
        background: var(--brand-primary-soft);
    }
    .mu-sheet-item.is-danger { color: #c0392b !important; }
    .mu-sheet-item.is-danger .mu-sheet-ico { color: #c0392b; background: #fdecea; }
    .mu-sheet-item.is-warn .mu-sheet-ico { color: #b7791f; background: #fdf3e1; }
    .mu-sheet-cancel {
        display: block;
        width: 100%;
        height: 50px;
        margin-top: 8px;
        border: 0;
        border-radius: 14px;
        background: #f1f4f6;
        color: #5b6072;
        font-size: 15px;
        font-weight: 700;
    }
    body.mu-sheet-open { overflow: hidden !important; }
}

/* ---------------------------------------------------------------------
   FORME RAČUNA / PONUDA - unos stavke kompaktnije na mobitelu
   --------------------------------------------------------------------- */
@media (max-width: 767px) {
    /* Iznos | Količina | Rabat u jednom redu */
    .row:has(> .col-sm-4 #kolicinaStavke) > .col-sm-4 { width: 33.333%; float: left; }
    .row:has(> .col-sm-4 #kolicinaStavke) > .col-sm-4 label { font-size: 11px; white-space: nowrap; }
    .row:has(> .col-sm-4 #kolicinaStavke) .input-group-addon { padding: 6px 6px; font-size: 11px; }
    /* Dodaj | Obriši jedno pored drugog */
    .row:has(> div > #dodajStavku) > .col-sm-1 { width: 50%; float: left; margin-top: 8px; }
    .row:has(> div > #dodajStavku) #dodajStavku,
    .row:has(> div > #dodajStavku) #obrisiStavku { min-height: 46px; font-size: 15px; font-weight: 700; }
    /* Datum + vrijeme isporuke jedno pored drugog */
    .row:has(> #data_1) > [class*="col-"] { width: 50%; float: left; }
}

/* Postojeće donje trake na Details/Edit stranicama (.mob-detail-stickybar) -
   isti "plutajući" izgled kao tab traka / traka Spremi */
@media (max-width: 768px) {
    .mob-detail-stickybar {
        left: 10px !important;
        right: 10px !important;
        bottom: calc(10px + env(safe-area-inset-bottom)) !important;
        z-index: 1040 !important;
        padding: 8px !important;
        gap: 8px !important;
        border: 0 !important;
        border-radius: 22px;
        background: rgba(255,255,255,.95) !important;
        -webkit-backdrop-filter: blur(14px) saturate(1.6);
        backdrop-filter: blur(14px) saturate(1.6);
        box-shadow: 0 10px 30px rgba(15, 40, 50, .2), 0 0 0 1px rgba(15, 40, 50, .06);
    }
    .mob-detail-stickybar .mob-detail-stickybar__btn,
    .mob-detail-stickybar .btn {
        border-radius: 14px !important;
        min-height: 50px;
        border: 0;
    }
    .mob-detail-stickybar .btn-default { background: #f1f4f6; }
    body:has(.mob-detail-stickybar) #page-wrapper { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
    body.mu-kbd-open .mob-detail-stickybar { display: none !important; }
}

/* Traka "Spremi" (data-mu-save) */
#muSaveBar { display: none; }
@media (max-width: 768px) {
    #muSaveBar {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: calc(10px + env(safe-area-inset-bottom));
        z-index: 1040;
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 8px 8px 8px 18px;
        border-radius: 22px;
        background: rgba(255,255,255,.95);
        -webkit-backdrop-filter: blur(14px) saturate(1.6);
        backdrop-filter: blur(14px) saturate(1.6);
        box-shadow: 0 10px 30px rgba(15, 40, 50, .2), 0 0 0 1px rgba(15, 40, 50, .06);
        animation: muFabIn .4s cubic-bezier(.2, .9, .3, 1.2) both;
    }
    #muSaveBar.is-solo { padding-left: 8px; }
    #muSaveBar.is-hidden { display: none; }
    .mu-sb-total { flex: 1; min-width: 0; line-height: 1.15; }
    .mu-sb-total small {
        display: block;
        font-size: 10.5px;
        font-weight: 700;
        letter-spacing: .06em;
        text-transform: uppercase;
        color: #9099a8;
    }
    .mu-sb-total b {
        display: block;
        font-size: 18px;
        color: #1f2230;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .mu-sb-total b.mu-pulse { animation: muPulse .5s ease; }
    .mu-sb-btn {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        height: 50px;
        min-width: 130px;
        padding: 0 22px;
        border: 0;
        border-radius: 16px;
        color: #fff;
        font-size: 16px;
        font-weight: 700;
        background: linear-gradient(135deg, var(--brand-primary-tint), var(--brand-primary-active));
        box-shadow: 0 8px 18px rgba(10, 111, 108, .35);
    }
    #muSaveBar.is-solo .mu-sb-btn { flex: 1; }
    .mu-sb-btn:active { transform: scale(.97); }
    .mu-sb-btn[disabled] { opacity: .75; }
}
@keyframes muPulse {
    0% { color: var(--brand-primary); transform: scale(1.06); }
    100% { color: #1f2230; transform: none; }
}

@keyframes muFabIn {
    from { opacity: 0; transform: translateY(20px) scale(.8); }
    to { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------------------
   GLOBALNA PRETRAGA U MENIJU (računi, stranke, stavke... preko
   Pocetna/GlobalnaPretraga) - rezultati iznad pločica modula
   --------------------------------------------------------------------- */
.mu-menu-results { display: none; margin: 0 0 14px; }
.mu-menu-results.is-visible { display: block; }
.mu-res-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 6px;
    border-radius: 14px;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.08);
    color: #fff !important;
    font-size: 14px;
    text-decoration: none !important;
}
.mu-res-item .fa { color: var(--brand-primary-tint); width: 18px; text-align: center; }
.mu-res-item span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mu-res-item:active { background: rgba(255,255,255,.16); }
.mu-res-info { color: rgba(255,255,255,.5); font-size: 13px; padding: 6px 8px; }
#muMenu.has-results .mu-menu-empty { display: none !important; }

/* ---------------------------------------------------------------------
   KENDO SCHEDULER (Termini) i KANBAN na mobitelu
   --------------------------------------------------------------------- */
@media (max-width: 768px) {
    .k-scheduler { border-radius: 16px; overflow: hidden; }
    .k-scheduler-toolbar {
        display: flex !important;
        flex-wrap: wrap;
        gap: 6px;
        padding: 8px !important;
    }
    .k-scheduler-toolbar .k-scheduler-views,
    .k-scheduler-toolbar .k-scheduler-navigation { float: none !important; margin: 0 !important; }
    .k-scheduler-toolbar .k-nav-current { font-size: 14px; }
    .k-scheduler-toolbar .k-scheduler-views { display: flex; flex-wrap: nowrap; overflow-x: auto; width: 100%; }
    .k-scheduler-toolbar .k-scheduler-views li { flex: 0 0 auto; }
    .k-scheduler .k-event { border-radius: 8px; }
    .k-scheduler-agendaview .k-scheduler-table td { white-space: normal; }

    /* Kanban: kolone kao "trake" koje se listaju prstom, jedna po ekranu */
    .mu-kanban-scroll {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 10px;
        margin-left: -10px !important;
        margin-right: -10px !important;
        padding: 0 10px 10px;
        scrollbar-width: none;
    }
    .mu-kanban-scroll::-webkit-scrollbar { display: none; }
    .mu-kanban-scroll > * {
        flex: 0 0 86vw !important;
        max-width: 86vw !important;
        width: 86vw !important;
        float: none !important;
        scroll-snap-align: center;
    }
}

/* ---------------------------------------------------------------------
   DataTables Responsive + kartice: kartica sama prikazuje sve kolone,
   pa isključi Responsive "+" dugme i child redove
   --------------------------------------------------------------------- */
@media (max-width: 767px) {
    table.dtr-inline.mu-cards-table > tbody > tr > td { display: flex !important; }
    table.mu-cards-table > tbody > tr.child { display: none !important; }
    table.dataTable.mu-cards-table.dtr-inline.collapsed > tbody > tr > td:first-child { padding-left: 0 !important; }
    table.dataTable.mu-cards-table.dtr-inline.collapsed > tbody > tr > td:first-child::before {
        position: static !important;
        box-shadow: none !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        height: auto !important;
        width: auto !important;
        line-height: inherit !important;
        font-family: inherit !important;
        text-indent: 0 !important;
        color: #9099a8 !important;
        content: attr(data-label) !important;
    }
    table.mu-cards-table > tbody > tr > td.dataTables_empty { justify-content: center; }
    table.mu-cards-table > tbody > tr > td.dataTables_empty::before { display: none !important; }
    .dataTables_wrapper:has(table.mu-cards-table) .dataTables_scrollHead { display: none; }
    .dataTables_wrapper:has(table.mu-cards-table) .dataTables_scrollBody { overflow: visible !important; height: auto !important; max-height: none !important; }
}

/* ---------------------------------------------------------------------
   FAZA 3: sitnice sadržaja koje se ponavljaju kroz stranice
   --------------------------------------------------------------------- */
@media (max-width: 767px) {
    /* Kolone s desktop "poravnanjem uz labelu" (style="padding-top:24px") -
       na mobitelu su ispod polja, pa bi razmak samo visio */
    .row > [class*="col-"][style*="padding-top"] { padding-top: 4px !important; }

    /* Desno poravnata kolona s dugmadima (akcije ispod filtera) - lijevo,
       dugmad se lome u redove i ne izlaze iz ekrana */
    .row > [class*="col-sm-"].text-right:has(> .btn),
    .row > [class*="col-md-"].text-right:has(> .btn),
    .row > [class*="col-lg-"].text-right:has(> .btn) {
        text-align: left !important;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
    }
    .row > [class*="col-"].text-right:has(> .btn) > .btn { margin: 0 !important; }

    /* Forme: "Spremi/Odustani" s pull-right - poredane, bez preklapanja */
    form .btn.pull-right + .btn,
    form .btn + .btn.pull-right { margin-right: 6px; }

    /* Panel naslovi s dugmadima */
    .panel-heading { overflow-wrap: anywhere; }
    .panel-heading .pull-right { float: none !important; display: inline-block; margin-top: 6px; }

    /* Dugački tekstovi (e-mail, IBAN, URL) ne razvlače karticu */
    .ibox-content dd, .ibox-content td, .ibox-content p { overflow-wrap: anywhere; }

    /* dl-horizontal: labela iznad vrijednosti */
    .dl-horizontal dt { float: none; width: auto; text-align: left; color: #9099a8; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
    .dl-horizontal dd { margin-left: 0; margin-bottom: 10px; }

    /* Checkbox liste (ovlasti, šifre...) - veći razmak za prst */
    #content-wrap .checkbox label,
    #content-wrap label > input[type=checkbox] { line-height: 1.6; }
    #content-wrap .checkbox { margin: 6px 0 10px; }

    /* FullCalendar (Oglasna ploča, Evidencija) - traka u dva reda, manji naslov */
    .fc-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
    .fc-toolbar .fc-left, .fc-toolbar .fc-right { float: none; }
    .fc-toolbar .fc-center { order: -1; flex: 1 1 100%; text-align: center; display: block; }
    .fc-toolbar .fc-right { margin-left: auto; }
    .fc-toolbar h2 { font-size: 17px; margin: 2px 0 4px; float: none; }
    .fc-toolbar .fc-button { height: 36px; padding: 0 12px; }
    .fc-day-grid-event .fc-content { white-space: normal; font-size: 11px; }

    /* Nav tabs unutar tabs-container: bez okvira oko sadržaja */
    .tabs-container .tab-content > .tab-pane > .panel-body { border-left: 0; border-right: 0; }
}

/* Tastatura otvorena - ništa fiksno dole */
@media (max-width: 768px) {
    /* Brzi chat (_LoginPartial #muChatSidebar) - preko cijelog ekrana */
    #muChatSidebar { width: 100vw !important; max-width: 100vw !important; border-left: 0 !important; }
    #muChatHeader { padding: calc(10px + env(safe-area-inset-top)) 12px 10px !important; }
    .mu-chat-icon-btn { width: 40px !important; height: 40px !important; font-size: 17px; }
    #muChatInput { font-size: 16px !important; min-height: 44px; }
    #muChatInputBar { padding-bottom: calc(8px + env(safe-area-inset-bottom)) !important; }

    body.mu-no-tabbar .footer { display: none; }
    body.mu-no-tabbar #muTabbar { display: none !important; }
    body.mu-no-tabbar #page-wrapper { padding-bottom: 0; }
    body.mu-has-savebar #page-wrapper { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
    body.mu-has-savebar #muFab { display: none; }
    body.mu-kbd-open #muSaveBar { display: none; }
    body.mu-kbd-open #muTabbar { transform: translateY(calc(100% + 20px)); }
}
