:root {
    --dentalos-ink: #102d3c;
    --dentalos-muted: #789097;
    --dentalos-page: #f5f8f7;
    --dentalos-line: #e5eeef;
    --dentalos-primary: #16a89c;
    --dentalos-primary-dark: #118c83;
    --dentalos-soft: #e4f8f5;
    --dentalos-shadow: 0 16px 40px rgba(16, 66, 72, .07);
    --dentalos-sidebar-w: 260px;
}

body {
    background: var(--dentalos-page) !important;
    color: var(--dentalos-ink);
}

body.mobile-menu-open {
    overflow: hidden;
}

.login-body {
    background:
        radial-gradient(circle at 12% 14%, rgba(22,168,156,.18), transparent 32%),
        linear-gradient(145deg, #eff8f7, #f7faf9) !important;
}

.login-body .login-image-bg,
.login-body .login-image-overlay {
    opacity: .12 !important;
}

.login-card {
    border: 1px solid rgba(255,255,255,.82) !important;
    border-radius: 22px !important;
    box-shadow: 0 22px 56px rgba(16,66,72,.12) !important;
}

.app-main {
    max-width: 1680px;
    margin-left: var(--dentalos-sidebar-w) !important;
    padding: 104px 32px 40px !important;
    transition: margin-left .22s ease;
}

.app-sidebar.top-nav {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    width: var(--dentalos-sidebar-w) !important;
    min-height: 100vh !important;
    padding: 20px 14px 18px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    overflow-y: auto !important;
    background:
        radial-gradient(circle at 20% 0%, rgba(82, 232, 218, .20), transparent 31%),
        radial-gradient(circle at 92% 22%, rgba(112, 159, 255, .13), transparent 35%),
        linear-gradient(168deg, #103844 0%, #102f3b 47%, #0b2632 100%) !important;
    border-right: 1px solid rgba(255,255,255,.08) !important;
    box-shadow: 16px 0 46px rgba(17, 38, 57, .14) !important;
    color: #fff !important;
    transition: width .22s ease, padding .22s ease;
}

.app-sidebar.top-nav::before {
    content: "";
    position: absolute;
    inset: 10px;
    pointer-events: none;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 24px;
}

.top-nav-brand {
    position: relative;
    z-index: 1;
    flex: 0 0 auto !important;
    padding: 2px 2px 10px;
}

.sidebar-logo {
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
    min-height: 54px;
    padding: 4px 12px !important;
    text-decoration: none;
}

.sidebar-logo-image {
    width: 162px !important;
    max-height: 46px !important;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.sidebar-nav.top-nav-links {
    position: relative;
    z-index: 1;
    display: flex !important;
    flex: 1 !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 5px !important;
}

.sidebar-link {
    position: relative;
    min-height: 44px;
    display: flex !important;
    align-items: center !important;
    gap: 11px;
    padding: 11px 12px !important;
    justify-content: flex-start !important;
    border: 1px solid transparent !important;
    border-radius: 14px !important;
    color: rgba(231, 248, 249, .74) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    letter-spacing: -.01em;
    text-decoration: none !important;
    transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}

.sidebar-link-icon {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(255,255,255,.07);
    color: rgba(233, 255, 253, .86);
    font-size: 14px;
    font-weight: 500;
}

.sidebar-link-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-link:hover {
    background: rgba(255,255,255,.075) !important;
    border-color: rgba(255,255,255,.08) !important;
    color: #fff !important;
    transform: translateX(2px);
}

.sidebar-link.active {
    background: linear-gradient(135deg, rgba(84,215,204,.22), rgba(255,255,255,.08)) !important;
    border-color: rgba(140,236,226,.22) !important;
    color: #fff !important;
    box-shadow: inset 3px 0 #54d7cc, 0 12px 24px rgba(0,0,0,.10) !important;
}

.sidebar-footer {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,.09);
}

.sidebar-settings-link {
    min-height: 42px;
}

.sidebar-collapse-button {
    width: 100%;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 11px;
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 14px;
    background: rgba(255,255,255,.055);
    color: rgba(231, 248, 249, .78);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.sidebar-collapse-button:hover {
    background: rgba(255,255,255,.10);
    color: #fff;
}

.sidebar-collapse-icon {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(255,255,255,.08);
    font-size: 20px;
    line-height: 1;
    transition: transform .22s ease;
}

.nav-actions {
    position: fixed;
    top: 14px;
    right: 24px;
    z-index: 1200;
    width: auto !important;
    margin: 0 !important;
    padding: 6px !important;
    border: 1px solid var(--dentalos-line);
    border-radius: 16px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 10px 28px rgba(16,66,72,.08);
    backdrop-filter: blur(16px);
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
}

.notification-button,
.admin-apps-button {
    border: 1px solid var(--dentalos-line) !important;
    background: #fff !important;
    color: #58737d !important;
}

.admin-apps-button span {
    background: #58737d !important;
}

.admin-apps-menu,
.notification-menu,
.user-profile-menu {
    border: 1px solid var(--dentalos-line) !important;
    box-shadow: 0 18px 42px rgba(16,66,72,.14) !important;
}

.admin-app-label,
.mobile-menu-link,
.sidebar-link,
.sidebar-collapse-button {
    font-weight: 500 !important;
}

.page-header {
    margin-bottom: 22px !important;
}

.page-header h1 {
    color: var(--dentalos-ink);
    font-size: 27px !important;
    letter-spacing: -.055em !important;
}

.page-header p {
    color: var(--dentalos-muted) !important;
}

.card,
.data-card,
.stat-card,
.modal-card,
.form-card {
    border-color: var(--dentalos-line) !important;
    border-radius: 15px !important;
    box-shadow: var(--dentalos-shadow) !important;
}

.data-card {
    padding: 18px !important;
}

.btn {
    border-radius: 10px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
}

.btn-primary {
    background: var(--dentalos-primary) !important;
    box-shadow: 0 9px 18px rgba(22,168,156,.18) !important;
}

.btn-primary:hover {
    background: var(--dentalos-primary-dark) !important;
}

.btn-light {
    border-color: var(--dentalos-line) !important;
    color: #58737d !important;
}

.table-modern {
    border-spacing: 0 7px !important;
}

.table-modern td {
    border-color: var(--dentalos-line) !important;
    padding: 13px 14px !important;
}

.table-modern td:first-child {
    border-radius: 11px 0 0 11px !important;
}

.table-modern td:last-child {
    border-radius: 0 11px 11px 0 !important;
}

input,
textarea,
select {
    border-color: #dce8e9 !important;
    border-radius: 10px !important;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #8ed8d2 !important;
    box-shadow: 0 0 0 3px rgba(22,168,156,.1) !important;
}

.dashboard-day-card {
    margin-bottom: 18px;
    overflow: hidden;
}

.dashboard-day-head,
.dashboard-day-row {
    display: flex;
    align-items: center;
}

.dashboard-day-head {
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 13px;
    border-bottom: 1px solid var(--dentalos-line);
}

.dashboard-day-head h2 {
    margin: 0;
    color: var(--dentalos-ink);
    font-size: 15px;
    letter-spacing: -.025em;
}

.dashboard-day-head span {
    color: #93a5aa;
    font-size: 11px;
}

.dashboard-day-list {
    padding-top: 3px;
}

.dashboard-day-row {
    min-height: 64px;
    gap: 12px;
    border-bottom: 1px solid #eff3f4;
}

.dashboard-day-row:last-child {
    border-bottom: 0;
}

.dashboard-day-time {
    width: 54px;
    flex: 0 0 54px;
    color: var(--dentalos-ink);
    font-size: 12px;
    font-weight: 600;
}

.dashboard-day-line {
    width: 4px;
    align-self: stretch;
    margin: 7px 0;
    border-radius: 5px;
    background: #ccdadd;
}

.dashboard-day-row.is-active .dashboard-day-line {
    background: var(--dentalos-primary);
}

.dashboard-day-row.is-done .dashboard-day-line {
    background: #8bd4cd;
}

.dashboard-day-patient {
    min-width: 0;
    flex: 1;
}

.dashboard-day-patient strong {
    display: block;
    color: #24434e;
    font-size: 12px;
    font-weight: 600;
}

.dashboard-day-patient span {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    color: #97a8ad;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-call-button {
    flex: 0 0 auto;
    padding: 8px 11px;
    border: 1px solid #bde4e0;
    border-radius: 9px;
    background: #eefaf8;
    color: #13877f;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

.dashboard-call-button:hover {
    background: #dff6f3;
}

.dashboard-call-button:disabled {
    cursor: default;
    opacity: .72;
}

.dashboard-call-button.is-called {
    background: #dff6f3;
    color: #0f766e;
}

.dashboard-call-button.is-finished {
    background: #e9f7ef;
    border-color: #caead7;
    color: #24845e;
}

.dashboard-day-empty {
    padding: 18px 0 3px;
    color: #94a6ab;
    font-size: 12px;
}

.mobile-topbar {
    display: none;
}

.mobile-topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.mobile-topbar-logo {
    display: flex;
    align-items: center;
    min-width: 0;
    text-decoration: none;
}

.mobile-topbar-logo-image {
    width: auto;
    max-width: 142px;
    max-height: 30px;
    object-fit: contain;
}

.mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1990;
    background: rgba(15, 23, 42, .34);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
}

.mobile-menu-backdrop.open {
    display: block;
    opacity: 1;
    visibility: visible;
}

.mobile-menu-drawer {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2000;
    width: min(88vw, 360px);
    height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at 0% 0%, rgba(22,168,156,.18), transparent 34%),
        #ffffff;
    box-shadow: 28px 0 70px rgba(15, 23, 42, .24);
    transform: translateX(-104%);
    transition: transform .24s ease;
}

.mobile-menu-drawer.open {
    display: flex;
    transform: translateX(0);
}

.mobile-menu-header {
    min-height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--dentalos-line);
}

.mobile-menu-header strong {
    font-size: 16px;
    font-weight: 600;
    color: var(--dentalos-ink);
}

.mobile-menu-close {
    width: 38px;
    height: 38px;
    border: 1px solid var(--dentalos-line);
    border-radius: 14px;
    background: #fff;
    color: #334155;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-menu-link {
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 12px;
    border: 1px solid transparent;
    border-radius: 15px;
    color: #254653;
    text-decoration: none;
    font-size: 14px;
    transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.mobile-menu-link-icon {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #edf8f7;
    color: #13877f;
}

.mobile-menu-link:hover,
.mobile-menu-link.active {
    background: #eefaf8;
    border-color: #cdece8;
    color: #0f766e;
}

.mobile-menu-section-title {
    margin: 12px 8px 4px;
    color: #8aa0a8;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.mobile-menu-logout {
    margin-top: 8px;
    color: #b94d4d;
}

.mobile-menu-logout .mobile-menu-link-icon {
    background: #fff3f3;
    color: #b94d4d;
}



/* Desktop premium toolbar */
.dentalos-desktop-toolbar {
    position: fixed;
    top: 14px;
    left: calc(var(--dentalos-sidebar-w) + 18px);
    right: 24px;
    z-index: 1190;
    min-height: 60px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 22px;
    background:
        radial-gradient(circle at 0% 0%, rgba(82, 232, 218, .16), transparent 32%),
        radial-gradient(circle at 88% 0%, rgba(112,159,255,.11), transparent 30%),
        linear-gradient(168deg, #103844 0%, #102f3b 48%, #0b2632 100%);
    box-shadow: 0 18px 44px rgba(17, 38, 57, .16);
    color: #fff;
    transition: left .22s ease;
}

.app-shell.sidebar-collapsed .dentalos-desktop-toolbar {
    left: 102px;
}

.desktop-toolbar-clock {
    min-width: 116px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1px;
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 16px;
    background: rgba(255,255,255,.07);
}

.desktop-toolbar-clock-label {
    color: rgba(231,248,249,.62);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.desktop-toolbar-clock strong {
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -.04em;
    line-height: 1;
}

.desktop-quick-actions {
    display: flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
}

.desktop-quick-action {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 10px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 15px;
    background: rgba(255,255,255,.065);
    color: rgba(231,248,249,.82);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: background .18s ease, color .18s ease, transform .18s ease, border-color .18s ease;
}

.desktop-quick-action span {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: rgba(84,215,204,.18);
    color: #86fff2;
    font-size: 17px;
    line-height: 1;
}

.desktop-quick-action em {
    font-style: normal;
    white-space: nowrap;
}

.desktop-quick-action:hover {
    background: rgba(255,255,255,.12);
    border-color: rgba(140,236,226,.20);
    color: #fff;
    transform: translateY(-1px);
}

.desktop-global-search {
    position: relative;
    flex: 1 1 420px;
    min-width: 260px;
}

.desktop-global-search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    color: rgba(231,248,249,.70);
    font-size: 18px;
    pointer-events: none;
}

.desktop-global-search input {
    width: 100%;
    height: 44px;
    padding: 0 16px 0 42px;
    border: 1px solid rgba(255,255,255,.12) !important;
    border-radius: 16px !important;
    background: rgba(255,255,255,.96) !important;
    color: #102d3c !important;
    font-size: 13px;
    font-weight: 500;
    outline: none;
    box-shadow: none !important;
}

.desktop-global-search input::placeholder {
    color: #8aa0a8;
    font-weight: 400;
}

.desktop-global-search-results {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: none;
    max-height: min(430px, calc(100vh - 120px));
    overflow-y: auto;
    padding: 10px;
    border: 1px solid var(--dentalos-line);
    border-radius: 18px;
    background: rgba(255,255,255,.98);
    box-shadow: 0 24px 60px rgba(15,23,42,.20);
    backdrop-filter: blur(16px);
}

.desktop-global-search-results.open {
    display: block;
}

.desktop-search-result {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 3px 12px;
    padding: 11px 12px;
    border-radius: 14px;
    color: #102d3c;
    text-decoration: none;
}

.desktop-search-result:hover {
    background: #eefaf8;
}

.desktop-search-result-module {
    grid-row: span 2;
    align-self: center;
    display: inline-flex;
    justify-content: center;
    padding: 5px 8px;
    border-radius: 999px;
    background: #e4f8f5;
    color: #13877f;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.desktop-search-result strong {
    min-width: 0;
    overflow: hidden;
    color: #102d3c;
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.desktop-search-result small {
    min-width: 0;
    overflow: hidden;
    color: #789097;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.desktop-search-empty {
    padding: 16px;
    color: #789097;
    font-size: 13px;
}

.desktop-toolbar-right {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

.dentalos-desktop-toolbar .nav-actions {
    position: static !important;
    top: auto !important;
    right: auto !important;
    z-index: auto !important;
    border-color: rgba(255,255,255,.10) !important;
    background: rgba(255,255,255,.08) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

.dentalos-desktop-toolbar .notification-menu,
.dentalos-desktop-toolbar .admin-apps-menu,
.dentalos-desktop-toolbar .user-profile-menu {
    top: 56px !important;
}

@media (max-width: 1180px) {
    .desktop-quick-action em {
        display: none;
    }

    .desktop-quick-action {
        padding: 8px;
    }

    .desktop-toolbar-clock {
        min-width: 92px;
    }
}

@media (max-width: 768px) {
    .dentalos-desktop-toolbar {
        display: none !important;
    }

    .app-main {
        margin-left: 0 !important;
        padding: 76px 14px 24px !important;
    }

    .app-shell.sidebar-collapsed .app-main {
        margin-left: 0 !important;
    }

    #sidebar.app-sidebar.top-nav {
        display: none !important;
    }

    .mobile-topbar {
        position: fixed;
        inset: 0 0 auto 0;
        z-index: 1150;
        height: 58px;
        min-height: 58px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        padding: 8px 162px 8px 10px;
        background: rgba(255,255,255,.96);
        border-bottom: 1px solid var(--dentalos-line);
        box-shadow: 0 10px 30px rgba(16,66,72,.08);
        backdrop-filter: blur(16px);
    }

    .mobile-topbar .mobile-menu-button {
        display: block;
        flex: 0 0 auto;
    }

    .nav-actions {
        top: 8px !important;
        right: 10px !important;
        padding: 3px !important;
        border-radius: 14px;
        gap: 4px !important;
    }

    .notification-button,
    .admin-apps-button,
    .user-profile-button {
        width: 40px !important;
        height: 40px !important;
        min-height: 40px !important;
    }

    .user-profile-copy,
    .user-profile-chevron {
        display: none;
    }

    .user-profile-button {
        padding: 4px !important;
    }

    .notification-menu,
    .admin-apps-menu,
    .user-profile-menu {
        top: 50px !important;
        right: 0 !important;
    }
}

@media (max-width: 430px) {
    .waiting-room-button,
    .admin-apps-wrapper {
        display: none !important;
    }

    .mobile-menu-drawer {
        width: min(92vw, 350px);
    }
}


/* FINAL MOBILE NAV FIX - obican hamburger, bez sidebar-a na telefonu */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden !important;
    }

    .app-main {
        margin-left: 0 !important;
        padding-top: 76px !important;
    }

    .app-shell.sidebar-collapsed .app-main {
        margin-left: 0 !important;
    }

    #sidebar.app-sidebar.top-nav,
    .app-sidebar.top-nav,
    aside#sidebar {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        min-width: 0 !important;
        transform: translateX(-120%) !important;
        pointer-events: none !important;
    }

    #mobileTopbar.mobile-topbar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 5000 !important;
        height: 60px !important;
        min-height: 60px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        padding: 8px 150px 8px 12px !important;
        background: rgba(255,255,255,.98) !important;
        border-bottom: 1px solid rgba(229,238,239,.95) !important;
        box-shadow: 0 10px 30px rgba(16,66,72,.10) !important;
        backdrop-filter: blur(16px) !important;
    }

    #mobileTopbar .mobile-topbar-brand {
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
        min-width: 0 !important;
    }

    #mobileMenuButton.mobile-menu-button {
        position: relative !important;
        z-index: 5100 !important;
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        flex: 0 0 44px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-direction: column !important;
        gap: 4px !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 1px solid #dce8e9 !important;
        border-radius: 14px !important;
        background: #ffffff !important;
        box-shadow: 0 8px 18px rgba(16,66,72,.10) !important;
        cursor: pointer !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    #mobileMenuButton.mobile-menu-button span {
        display: block !important;
        width: 20px !important;
        height: 2px !important;
        margin: 0 !important;
        border-radius: 999px !important;
        background: #102d3c !important;
    }

    .mobile-topbar-logo-image {
        display: block !important;
        max-width: 132px !important;
        max-height: 30px !important;
        object-fit: contain !important;
    }

    #mobileMenuBackdrop.mobile-menu-backdrop {
        position: fixed !important;
        inset: 0 !important;
        z-index: 5200 !important;
        display: block !important;
        background: rgba(15,23,42,.35) !important;
        backdrop-filter: blur(4px) !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transition: opacity .2s ease, visibility .2s ease !important;
    }

    #mobileMenuBackdrop.mobile-menu-backdrop.open {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    #mobileMenuDrawer.mobile-menu-drawer {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        z-index: 5300 !important;
        width: min(88vw, 360px) !important;
        height: 100dvh !important;
        display: flex !important;
        flex-direction: column !important;
        background: radial-gradient(circle at 0% 0%, rgba(22,168,156,.18), transparent 34%), #ffffff !important;
        box-shadow: 28px 0 70px rgba(15,23,42,.24) !important;
        transform: translateX(-105%) !important;
        transition: transform .24s ease !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    #mobileMenuDrawer.mobile-menu-drawer.open {
        transform: translateX(0) !important;
    }

    .mobile-menu-links {
        flex: 1 1 auto !important;
        display: flex !important;
        flex-direction: column !important;
        min-height: 0 !important;
        overflow-y: auto !important;
    }

    .mobile-menu-powered {
        margin-top: auto !important;
        padding: 18px 8px 8px !important;
        border-top: 1px solid #e5eeef !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 7px !important;
        color: #8aa0a8 !important;
        font-size: 11px !important;
        font-weight: 500 !important;
    }

    .mobile-menu-powered-logo {
        display: block !important;
        width: auto !important;
        max-width: 86px !important;
        max-height: 18px !important;
        object-fit: contain !important;
    }

    .nav-actions {
        z-index: 5050 !important;
    }
}

@media (max-width: 430px) {
    #mobileTopbar.mobile-topbar {
        padding-right: 106px !important;
    }

    .mobile-topbar-logo-image {
        max-width: 116px !important;
    }

    #mobileMenuDrawer.mobile-menu-drawer {
        width: min(92vw, 350px) !important;
    }
}

/* DentalOS mobile navigation polish - full-card drawer links + admin button in header */
@media (max-width: 768px) {
    #mobileTopbar.mobile-topbar {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        height: 62px !important;
        min-height: 62px !important;
        padding: 8px 152px 8px 10px !important;
        overflow: visible !important;
    }

    .mobile-topbar-brand {
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
        min-width: 0 !important;
        flex: 1 1 auto !important;
    }

    #mobileMenuButton.mobile-menu-button {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-direction: column !important;
        padding: 0 !important;
        border: 1px solid rgba(16, 66, 72, .11) !important;
        border-radius: 15px !important;
        background: linear-gradient(180deg, #ffffff 0%, #f3fbfa 100%) !important;
        box-shadow: 0 8px 18px rgba(16, 66, 72, .08) !important;
        position: relative !important;
        z-index: 1300 !important;
    }

    #mobileMenuButton.mobile-menu-button span {
        width: 20px !important;
        height: 2px !important;
        margin: 2.5px 0 !important;
        display: block !important;
        border-radius: 999px !important;
        background: #123744 !important;
    }

    .mobile-topbar-logo-image {
        max-width: 132px !important;
        max-height: 31px !important;
        display: block !important;
    }

    .nav-actions {
        top: 8px !important;
        right: 8px !important;
        height: 46px !important;
        display: flex !important;
        align-items: center !important;
        gap: 5px !important;
        padding: 3px !important;
        border-radius: 16px !important;
        z-index: 1305 !important;
        background: rgba(255, 255, 255, .94) !important;
        border: 1px solid rgba(16, 66, 72, .09) !important;
        box-shadow: 0 8px 22px rgba(16, 66, 72, .08) !important;
    }

    .admin-apps-wrapper {
        display: flex !important;
        align-items: center !important;
        flex-shrink: 0 !important;
        position: relative !important;
    }

    .admin-apps-button,
    .notification-button,
    .user-profile-button {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        border-radius: 14px !important;
    }

    .admin-apps-menu,
    .notification-menu,
    .user-profile-menu {
        top: 50px !important;
        right: 0 !important;
    }

    #mobileMenuDrawer.mobile-menu-drawer {
        width: min(92vw, 380px) !important;
        background:
            radial-gradient(circle at 0% 0%, rgba(22, 168, 156, .18), transparent 34%),
            linear-gradient(180deg, #ffffff 0%, #f7fbfb 100%) !important;
    }

    .mobile-menu-header {
        min-height: 72px !important;
        padding: 16px 18px !important;
    }

    .mobile-menu-header strong {
        color: #102d3c !important;
        font-size: 18px !important;
        font-weight: 650 !important;
        letter-spacing: -.03em !important;
    }

    .mobile-menu-links {
        gap: 10px !important;
        padding: 16px 14px 14px !important;
    }

    .mobile-menu-link {
        min-height: 58px !important;
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        gap: 13px !important;
        padding: 13px 14px !important;
        border: 1px solid rgba(16, 66, 72, .08) !important;
        border-radius: 18px !important;
        background: rgba(255, 255, 255, .86) !important;
        box-shadow: 0 8px 20px rgba(16, 66, 72, .055) !important;
        color: #24434e !important;
        font-size: 15px !important;
        font-weight: 500 !important;
        line-height: 1.2 !important;
        letter-spacing: -.015em !important;
        text-decoration: none !important;
    }

    .mobile-menu-link-icon {
        width: 38px !important;
        height: 38px !important;
        flex: 0 0 38px !important;
        display: grid !important;
        place-items: center !important;
        border-radius: 14px !important;
        background: #e7f8f5 !important;
        color: #118c83 !important;
        font-size: 17px !important;
        box-shadow: inset 0 0 0 1px rgba(22, 168, 156, .10) !important;
    }

    .mobile-menu-link span:last-child {
        display: block !important;
        min-width: 0 !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    .mobile-menu-link:hover,
    .mobile-menu-link.active {
        background: linear-gradient(135deg, #16a89c 0%, #118c83 100%) !important;
        border-color: rgba(17, 140, 131, .22) !important;
        color: #ffffff !important;
        box-shadow: 0 14px 30px rgba(22, 168, 156, .24) !important;
        transform: translateY(-1px) !important;
    }

    .mobile-menu-link:hover .mobile-menu-link-icon,
    .mobile-menu-link.active .mobile-menu-link-icon {
        background: rgba(255, 255, 255, .20) !important;
        color: #ffffff !important;
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22) !important;
    }

    .mobile-menu-section-title {
        margin: 14px 8px 2px !important;
        color: #789097 !important;
        font-size: 11px !important;
        font-weight: 650 !important;
        letter-spacing: .13em !important;
        text-transform: uppercase !important;
    }

    .mobile-menu-logout {
        color: #b94d4d !important;
    }

    .mobile-menu-logout .mobile-menu-link-icon {
        background: #fff0f0 !important;
        color: #b94d4d !important;
    }

    .mobile-menu-logout:hover,
    .mobile-menu-logout.active {
        background: linear-gradient(135deg, #d85c5c 0%, #b94d4d 100%) !important;
        color: #ffffff !important;
        box-shadow: 0 14px 30px rgba(185, 77, 77, .20) !important;
    }
}

@media (max-width: 430px) {
    #mobileTopbar.mobile-topbar {
        padding-right: 144px !important;
    }

    .mobile-topbar-logo-image {
        max-width: 112px !important;
    }

    .waiting-room-button {
        display: none !important;
    }

    .admin-apps-wrapper {
        display: flex !important;
    }
}



/* MOBILE POLISHED DRAWER - forsira kartice i header akcije, bez obzira na redosled CSS fajlova */
@media (max-width: 768px) {
        #mobileTopbar.mobile-topbar {
            display: flex !important;
            align-items: center !important;
            justify-content: flex-start !important;
            height: 64px !important;
            min-height: 64px !important;
            padding: 8px 176px 8px 12px !important;
            gap: 10px !important;
        }

        #mobileTopbar .mobile-topbar-brand {
            height: 48px !important;
            display: flex !important;
            align-items: center !important;
            gap: 10px !important;
        }

        #mobileMenuButton.mobile-menu-button {
            width: 46px !important;
            height: 46px !important;
            min-width: 46px !important;
            border-radius: 16px !important;
            background: linear-gradient(180deg, #ffffff, #f7fbfb) !important;
            border: 1px solid #d6e7e9 !important;
            box-shadow: 0 10px 24px rgba(16, 66, 72, .12) !important;
        }

        #mobileMenuButton.mobile-menu-button span {
            width: 22px !important;
            height: 2px !important;
            background: #102d3c !important;
        }

        .mobile-topbar-logo-image {
            max-width: 134px !important;
            max-height: 32px !important;
        }

        .nav-actions {
            position: fixed !important;
            top: 8px !important;
            right: 10px !important;
            z-index: 5050 !important;
            height: 48px !important;
            min-height: 48px !important;
            display: flex !important;
            align-items: center !important;
            gap: 5px !important;
            padding: 3px !important;
            border-radius: 18px !important;
            background: rgba(255,255,255,.96) !important;
            border: 1px solid #dce8e9 !important;
            box-shadow: 0 10px 26px rgba(16, 66, 72, .10) !important;
            backdrop-filter: blur(16px) !important;
        }

        .notification-button,
        .admin-apps-button,
        .user-profile-button,
        .waiting-room-button {
            width: 42px !important;
            height: 42px !important;
            min-width: 42px !important;
            min-height: 42px !important;
            border-radius: 15px !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            padding: 0 !important;
            margin: 0 !important;
            background: #ffffff !important;
            border: 1px solid #e0ecee !important;
            box-shadow: none !important;
        }

        .admin-apps-button {
            display: grid !important;
            grid-template-columns: repeat(3, 4px) !important;
            grid-template-rows: repeat(3, 4px) !important;
            gap: 5px !important;
            align-content: center !important;
            justify-content: center !important;
        }

        .admin-apps-button span {
            width: 4px !important;
            height: 4px !important;
            border-radius: 999px !important;
            background: #789097 !important;
        }

        .user-profile-copy,
        .user-profile-chevron {
            display: none !important;
        }

        .user-profile-avatar {
            width: 28px !important;
            height: 28px !important;
            border-radius: 11px !important;
            font-size: 16px !important;
        }

        #mobileMenuBackdrop.mobile-menu-backdrop {
            background: rgba(15, 23, 42, .42) !important;
        }

        #mobileMenuDrawer.mobile-menu-drawer {
            width: min(88vw, 372px) !important;
            max-width: 372px !important;
            background:
                radial-gradient(circle at 8% 0%, rgba(22,168,156,.20), transparent 30%),
                linear-gradient(180deg, #ffffff 0%, #f7fbfb 100%) !important;
            box-shadow: 28px 0 70px rgba(15, 23, 42, .28) !important;
            border-right: 1px solid rgba(220,232,233,.9) !important;
        }

        #mobileMenuDrawer .mobile-menu-header {
            min-height: 72px !important;
            display: flex !important;
            align-items: center !important;
            justify-content: space-between !important;
            padding: 16px 18px 12px !important;
            border-bottom: 1px solid #e5eeef !important;
            background: rgba(255,255,255,.76) !important;
            backdrop-filter: blur(14px) !important;
        }

        #mobileMenuDrawer .mobile-menu-header strong {
            display: block !important;
            color: #102d3c !important;
            font-size: 20px !important;
            line-height: 1.1 !important;
            font-weight: 600 !important;
            letter-spacing: -.035em !important;
        }

        #mobileMenuDrawer .mobile-menu-close {
            width: 40px !important;
            height: 40px !important;
            display: grid !important;
            place-items: center !important;
            border: 1px solid #dce8e9 !important;
            border-radius: 15px !important;
            background: #ffffff !important;
            color: #102d3c !important;
            font-size: 24px !important;
            line-height: 1 !important;
            box-shadow: 0 8px 20px rgba(16,66,72,.08) !important;
        }

        #mobileMenuDrawer .mobile-menu-links {
            flex: 1 1 auto !important;
            display: flex !important;
            flex-direction: column !important;
            gap: 9px !important;
            padding: 14px 14px 0 !important;
            overflow-y: auto !important;
            -webkit-overflow-scrolling: touch !important;
        }

        #mobileMenuDrawer .mobile-menu-link {
            min-height: 58px !important;
            width: 100% !important;
            display: flex !important;
            align-items: center !important;
            gap: 13px !important;
            padding: 12px 14px !important;
            border: 1px solid #e2eef0 !important;
            border-radius: 19px !important;
            background: rgba(255,255,255,.92) !important;
            color: #173846 !important;
            box-shadow: 0 10px 26px rgba(16,66,72,.055) !important;
            text-decoration: none !important;
            font-size: 16px !important;
            line-height: 1.15 !important;
            font-weight: 500 !important;
            letter-spacing: -.018em !important;
        }

        #mobileMenuDrawer .mobile-menu-link-icon {
            width: 38px !important;
            height: 38px !important;
            min-width: 38px !important;
            display: grid !important;
            place-items: center !important;
            border-radius: 14px !important;
            background: #e8f8f6 !important;
            color: #118c83 !important;
            font-size: 18px !important;
            line-height: 1 !important;
        }

        #mobileMenuDrawer .mobile-menu-link span:last-child {
            display: block !important;
            flex: 1 1 auto !important;
            min-width: 0 !important;
            overflow: hidden !important;
            text-overflow: ellipsis !important;
            white-space: nowrap !important;
        }

        #mobileMenuDrawer .mobile-menu-link.active,
        #mobileMenuDrawer .mobile-menu-link:hover {
            background: linear-gradient(135deg, #16a89c 0%, #118c83 100%) !important;
            border-color: rgba(22,168,156,.22) !important;
            color: #ffffff !important;
            box-shadow: 0 14px 30px rgba(22,168,156,.20) !important;
        }

        #mobileMenuDrawer .mobile-menu-link.active .mobile-menu-link-icon,
        #mobileMenuDrawer .mobile-menu-link:hover .mobile-menu-link-icon {
            background: rgba(255,255,255,.22) !important;
            color: #ffffff !important;
        }

        #mobileMenuDrawer .mobile-menu-section-title {
            margin: 14px 6px 4px !important;
            color: #7d949c !important;
            font-size: 11px !important;
            font-weight: 700 !important;
            letter-spacing: .14em !important;
            text-transform: uppercase !important;
        }

        #mobileMenuDrawer .mobile-menu-logout {
            color: #b94d4d !important;
        }

        #mobileMenuDrawer .mobile-menu-logout .mobile-menu-link-icon {
            background: #fff0f0 !important;
            color: #b94d4d !important;
        }

        #mobileMenuDrawer .mobile-menu-logout:hover,
        #mobileMenuDrawer .mobile-menu-logout.active {
            background: linear-gradient(135deg, #d85d5d, #b94d4d) !important;
            color: #ffffff !important;
        }

        #mobileMenuDrawer .mobile-menu-powered {
            margin-top: auto !important;
            min-height: 64px !important;
            padding: 14px 10px calc(14px + env(safe-area-inset-bottom)) !important;
            border-top: 1px solid #e5eeef !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            gap: 8px !important;
            color: #8aa0a8 !important;
            font-size: 12px !important;
            font-weight: 500 !important;
            background: rgba(255,255,255,.90) !important;
        }

        #mobileMenuDrawer .mobile-menu-powered-logo {
            display: block !important;
            width: auto !important;
            max-width: 88px !important;
            max-height: 18px !important;
            object-fit: contain !important;
        }
}

@media (max-width: 430px) {
        #mobileTopbar.mobile-topbar {
            padding-right: 178px !important;
        }

        .mobile-topbar-logo-image {
            max-width: 122px !important;
        }

        .nav-actions {
            right: 8px !important;
            gap: 4px !important;
        }

        .notification-button,
        .admin-apps-button,
        .user-profile-button,
        .waiting-room-button {
            width: 39px !important;
            height: 39px !important;
            min-width: 39px !important;
            min-height: 39px !important;
        }
}

/* Desktop toolbar - integrated with sidebar */
@media (min-width: 769px) {
    .dentalos-desktop-toolbar {
        top: 0 !important;
        left: var(--dentalos-sidebar-w) !important;
        right: 0 !important;
        min-height: 78px !important;
        padding: 10px 18px 10px 20px !important;
        gap: 14px !important;
        border-top: 0 !important;
        border-left: 0 !important;
        border-right: 0 !important;
        border-radius: 0 0 0 24px !important;
        background:
            radial-gradient(circle at 0% 0%, rgba(82, 232, 218, .18), transparent 34%),
            radial-gradient(circle at 92% 0%, rgba(112,159,255,.13), transparent 32%),
            linear-gradient(168deg, #103844 0%, #102f3b 48%, #0b2632 100%) !important;
        box-shadow: 0 16px 44px rgba(17, 38, 57, .14) !important;
    }

    .app-shell.sidebar-collapsed .dentalos-desktop-toolbar {
        left: var(--dentalos-sidebar-w) !important;
    }

    .app-main {
        padding-top: 112px !important;
    }

    .desktop-toolbar-clock {
        min-width: 126px !important;
        min-height: 52px !important;
        border-radius: 17px !important;
        background: rgba(255,255,255,.075) !important;
    }

    .desktop-create-wrapper {
        position: relative;
        flex: 0 0 auto;
    }

    .desktop-create-button {
        min-height: 52px;
        display: inline-flex;
        align-items: center;
        gap: 10px;
        padding: 11px 15px 11px 12px;
        border: 1px solid rgba(255,255,255,.12);
        border-radius: 17px;
        background: rgba(255,255,255,.075);
        color: rgba(231,248,249,.88);
        cursor: pointer;
        font-size: 13px;
        font-weight: 500;
        white-space: nowrap;
        transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
    }

    .desktop-create-button span {
        width: 30px;
        height: 30px;
        display: grid;
        place-items: center;
        border-radius: 12px;
        background: rgba(84,215,204,.20);
        color: #86fff2;
        font-size: 24px;
        line-height: 1;
        font-weight: 500;
    }

    .desktop-create-button strong {
        font-weight: 500;
        letter-spacing: -.01em;
    }

    .desktop-create-button:hover,
    .desktop-create-wrapper.open .desktop-create-button {
        background: rgba(255,255,255,.13);
        border-color: rgba(140,236,226,.22);
        color: #fff;
        transform: translateY(-1px);
    }

    .desktop-create-menu {
        position: absolute;
        top: calc(100% + 10px);
        left: 0;
        z-index: 9999;
        display: none;
        width: 286px;
        padding: 10px;
        border: 1px solid var(--dentalos-line);
        border-radius: 20px;
        background: rgba(255,255,255,.98);
        box-shadow: 0 24px 60px rgba(15,23,42,.20);
        backdrop-filter: blur(16px);
    }

    .desktop-create-wrapper.open .desktop-create-menu {
        display: block;
    }

    .desktop-create-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px;
        border-radius: 15px;
        color: #102d3c;
        text-decoration: none;
        transition: background .18s ease, transform .18s ease;
    }

    .desktop-create-item:hover {
        background: #eefaf8;
        transform: translateX(2px);
    }

    .desktop-create-item-icon {
        width: 38px;
        height: 38px;
        flex: 0 0 38px;
        display: grid;
        place-items: center;
        border-radius: 14px;
        background: #e4f8f5;
        color: #13877f;
        font-size: 18px;
    }

    .desktop-create-item-copy {
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 3px;
    }

    .desktop-create-item-copy strong {
        color: #102d3c;
        font-size: 13px;
        font-weight: 600;
    }

    .desktop-create-item-copy small {
        color: #789097;
        font-size: 11px;
        font-weight: 400;
    }

    .desktop-quick-actions,
    .desktop-quick-action {
        display: none !important;
    }

    .desktop-global-search {
        flex: 1 1 auto !important;
        min-width: 320px !important;
        max-width: 620px;
        margin-left: auto;
    }

    .desktop-global-search input {
        height: 52px !important;
        border-radius: 17px !important;
        font-size: 14px !important;
    }

    .desktop-toolbar-right {
        min-width: 0;
        flex: 0 0 auto;
    }

    .dentalos-desktop-toolbar .nav-actions {
        padding: 0 !important;
        gap: 8px !important;
        background: transparent !important;
        border: 0 !important;
    }

    .dentalos-desktop-toolbar .notification-button,
    .dentalos-desktop-toolbar .admin-apps-button,
    .dentalos-desktop-toolbar .user-profile-button {
        min-height: 52px !important;
        height: 52px !important;
        border-radius: 17px !important;
    }

    .dentalos-desktop-toolbar .user-profile-copy strong {
        max-width: 150px;
    }
}

/* =========================================================
   Desktop toolbar seamless integration fix
   Sidebar + toolbar are one visual unit, with no floating pill gap.
   ========================================================= */
@media (min-width: 769px) {
    .app-sidebar.top-nav {
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        border-right: 0 !important;
        box-shadow: 16px 0 46px rgba(17, 38, 57, .10) !important;
    }

    .dentalos-desktop-toolbar {
        position: fixed !important;
        top: 0 !important;
        left: var(--dentalos-sidebar-w) !important;
        right: 0 !important;
        min-height: 78px !important;
        height: 78px !important;
        display: flex !important;
        align-items: center !important;
        gap: 14px !important;
        padding: 10px 24px 10px 20px !important;
        margin: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background:
            radial-gradient(circle at 0% 0%, rgba(82, 232, 218, .18), transparent 34%),
            radial-gradient(circle at 92% 0%, rgba(112,159,255,.13), transparent 32%),
            linear-gradient(168deg, #103844 0%, #102f3b 48%, #0b2632 100%) !important;
        box-shadow: 0 16px 44px rgba(17, 38, 57, .14) !important;
        transform: none !important;
        transition: left .22s ease !important;
    }

    .app-shell.sidebar-collapsed .dentalos-desktop-toolbar {
        left: 84px !important;
    }

    .app-main {
        margin-left: var(--dentalos-sidebar-w) !important;
        padding-top: 112px !important;
        transition: margin-left .22s ease !important;
    }

    .app-shell.sidebar-collapsed .app-main {
        margin-left: 84px !important;
    }

    .desktop-toolbar-clock,
    .desktop-create-button {
        min-height: 52px !important;
        height: 52px !important;
        border-radius: 17px !important;
    }

    .desktop-global-search {
        flex: 1 1 auto !important;
        max-width: none !important;
        min-width: 280px !important;
        margin-left: 4px !important;
    }

    .desktop-global-search input {
        height: 52px !important;
    }

    .desktop-toolbar-right {
        flex: 0 0 auto !important;
        min-width: 0 !important;
        display: flex !important;
        align-items: center !important;
    }

    .dentalos-desktop-toolbar .nav-actions {
        position: static !important;
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        width: auto !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
    }

    .dentalos-desktop-toolbar .notification-button,
    .dentalos-desktop-toolbar .admin-apps-button,
    .dentalos-desktop-toolbar .waiting-room-button,
    .dentalos-desktop-toolbar .user-profile-button {
        min-height: 52px !important;
        height: 52px !important;
        border-radius: 17px !important;
    }

    .dentalos-desktop-toolbar .user-profile-button {
        max-width: 260px !important;
    }

    .dentalos-desktop-toolbar .user-profile-copy strong {
        max-width: 145px !important;
    }

    .desktop-create-menu,
    .desktop-global-search-results,
    .dentalos-desktop-toolbar .notification-menu,
    .dentalos-desktop-toolbar .admin-apps-menu,
    .dentalos-desktop-toolbar .user-profile-menu {
        top: calc(100% + 10px) !important;
    }
}

@media (min-width: 769px) and (max-width: 1280px) {
    .desktop-toolbar-clock {
        min-width: 104px !important;
    }

    .desktop-create-button strong {
        display: none !important;
    }

    .desktop-create-button {
        padding: 10px 12px !important;
    }

    .dentalos-desktop-toolbar .user-profile-copy {
        display: none !important;
    }

    .dentalos-desktop-toolbar .user-profile-chevron {
        display: none !important;
    }
}

/* =========================================================
   FINAL FIX: sidebar i desktop traka kao jedna vizuelna celina
   ========================================================= */
@media (min-width: 769px) {
    :root {
        --dentalos-shell-bg:
            radial-gradient(circle at 11% 0%, rgba(82, 232, 218, .20), transparent 30%),
            radial-gradient(circle at 92% 0%, rgba(112,159,255,.13), transparent 34%),
            linear-gradient(118deg, #103844 0%, #123b47 18%, #102f3b 58%, #0b2632 100%);
    }

    .app-sidebar.top-nav,
    .dentalos-desktop-toolbar {
        background: var(--dentalos-shell-bg) !important;
        background-size: calc(var(--dentalos-sidebar-w) + 100vw) 100vh !important;
        border: 0 !important;
    }

    .app-sidebar.top-nav {
        background-position: left top !important;
        box-shadow: none !important;
    }

    .dentalos-desktop-toolbar {
        top: 0 !important;
        left: var(--dentalos-sidebar-w) !important;
        right: 0 !important;
        height: 78px !important;
        min-height: 78px !important;
        border-radius: 0 !important;
        background-position: calc(-1 * var(--dentalos-sidebar-w)) top !important;
        box-shadow: 0 20px 42px rgba(17, 38, 57, .13) !important;
    }

    .app-shell.sidebar-collapsed .dentalos-desktop-toolbar {
        left: 84px !important;
        background-position: -84px top !important;
    }

    .app-sidebar.top-nav::after {
        content: "";
        position: absolute;
        top: 0;
        right: -1px;
        width: 1px;
        height: 78px;
        background: transparent;
        pointer-events: none;
    }
}

/* =========================================================
   FINAL FIX: mobile ne sme nikada da prikaze desktop traku/+ stavke
   ========================================================= */
@media (max-width: 900px) {
    html body .dentalos-desktop-toolbar,
    html body #dentalosDesktopToolbar,
    html body .desktop-toolbar-clock,
    html body .desktop-create-wrapper,
    html body .desktop-create-menu,
    html body .desktop-global-search,
    html body .desktop-toolbar-right {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
        height: 0 !important;
        min-height: 0 !important;
        max-height: 0 !important;
        overflow: hidden !important;
    }

    html body #sidebar.app-sidebar.top-nav,
    html body .app-sidebar.top-nav {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
        width: 0 !important;
        min-width: 0 !important;
    }

    html body .mobile-topbar {
        display: flex !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 5000 !important;
        height: 64px !important;
        min-height: 64px !important;
        align-items: center !important;
        padding: 8px 156px 8px 12px !important;
        background: rgba(255,255,255,.96) !important;
        border-bottom: 1px solid rgba(214,229,231,.95) !important;
        box-shadow: 0 12px 28px rgba(16,66,72,.08) !important;
        backdrop-filter: blur(18px) !important;
    }

    html body .mobile-menu-button {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-direction: column !important;
        width: 48px !important;
        height: 48px !important;
        min-width: 48px !important;
        border: 1px solid rgba(205, 226, 228, .95) !important;
        border-radius: 17px !important;
        background: rgba(255,255,255,.95) !important;
        box-shadow: 0 8px 20px rgba(16,66,72,.08) !important;
    }

    html body .mobile-menu-button span {
        width: 24px !important;
        height: 2px !important;
        margin: 3px 0 !important;
        background: #103844 !important;
    }

    html body .mobile-topbar-logo-image {
        max-width: 150px !important;
        max-height: 34px !important;
    }

    html body .app-top-toolbar.nav-actions {
        position: fixed !important;
        top: 8px !important;
        right: 10px !important;
        z-index: 5010 !important;
        display: flex !important;
        width: auto !important;
        max-width: 148px !important;
        padding: 4px !important;
        gap: 4px !important;
        border-radius: 18px !important;
        background: rgba(255,255,255,.95) !important;
        border: 1px solid rgba(205,226,228,.9) !important;
        box-shadow: 0 8px 22px rgba(16,66,72,.10) !important;
    }

    html body .app-main {
        margin-left: 0 !important;
        padding-top: 84px !important;
    }
}


/* =========================================================
   FINAL HARD MOBILE FIX, desktop toolbar and quick-create must never leak on phones
   ========================================================= */
@media (max-width: 1024px) and (hover: none), (max-width: 900px) {
    html body .dentalos-desktop-toolbar,
    html body #dentalosDesktopToolbar,
    html body #dentalosDesktopToolbar *,
    html body .desktop-create-wrapper,
    html body .desktop-create-button,
    html body .desktop-create-menu,
    html body .desktop-create-item,
    html body .desktop-create-item-copy,
    html body .desktop-create-item-icon,
    html body .desktop-global-search,
    html body .desktop-global-search *,
    html body .desktop-toolbar-clock,
    html body .desktop-toolbar-right {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        width: 0 !important;
        height: 0 !important;
        min-width: 0 !important;
        min-height: 0 !important;
        max-width: 0 !important;
        max-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        left: -99999px !important;
        top: -99999px !important;
    }

    html body #sidebar.app-sidebar.top-nav,
    html body .app-sidebar.top-nav {
        display: none !important;
    }

    html body .mobile-topbar {
        display: flex !important;
    }

    html body .app-main {
        margin-left: 0 !important;
        padding-top: 84px !important;
    }
}

html body.dentalos-mobile-layout .dentalos-desktop-toolbar,
html body.dentalos-mobile-layout #dentalosDesktopToolbar,
html body.dentalos-mobile-layout #dentalosDesktopToolbar *,
html body.dentalos-mobile-layout .desktop-create-wrapper,
html body.dentalos-mobile-layout .desktop-create-button,
html body.dentalos-mobile-layout .desktop-create-menu,
html body.dentalos-mobile-layout .desktop-create-item,
html body.dentalos-mobile-layout .desktop-global-search,
html body.dentalos-mobile-layout .desktop-toolbar-clock,
html body.dentalos-mobile-layout .desktop-toolbar-right {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
    max-width: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -99999px !important;
    top: -99999px !important;
}

html body.dentalos-mobile-layout .app-sidebar.top-nav {
    display: none !important;
}

html body.dentalos-mobile-layout .mobile-topbar {
    display: flex !important;
}

/* =========================================================
   FINAL FIX 02.06: mobile header actions + desktop sidebar without scrollbar
   ========================================================= */
@media (min-width: 769px) {
    html body .app-sidebar.top-nav {
        overflow-x: hidden !important;
        overflow-y: hidden !important;
    }

    html body .sidebar-nav.top-nav-links {
        min-height: 0 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        scrollbar-width: none !important;
    }

    html body .sidebar-nav.top-nav-links::-webkit-scrollbar {
        width: 0 !important;
        height: 0 !important;
        display: none !important;
    }
}

@media (max-width: 900px) {
    html body.dentalos-mobile-layout .app-top-toolbar.nav-actions,
    html body .app-top-toolbar.nav-actions {
        position: fixed !important;
        top: 8px !important;
        right: 8px !important;
        left: auto !important;
        z-index: 5100 !important;
        width: auto !important;
        max-width: none !important;
        height: 48px !important;
        min-height: 48px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 5px !important;
        padding: 3px !important;
        margin: 0 !important;
        overflow: visible !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        border-radius: 18px !important;
        background: rgba(255,255,255,.96) !important;
        border: 1px solid rgba(205,226,228,.92) !important;
        box-shadow: 0 10px 26px rgba(16,66,72,.10) !important;
        backdrop-filter: blur(16px) !important;
    }

    html body.dentalos-mobile-layout .notification-wrapper,
    html body.dentalos-mobile-layout .admin-apps-wrapper,
    html body.dentalos-mobile-layout .user-profile-wrapper,
    html body.dentalos-mobile-layout .waiting-room-button,
    html body .notification-wrapper,
    html body .admin-apps-wrapper,
    html body .user-profile-wrapper,
    html body .waiting-room-button {
        display: flex !important;
        align-items: center !important;
        flex: 0 0 auto !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    html body.dentalos-mobile-layout .notification-button,
    html body.dentalos-mobile-layout .admin-apps-button,
    html body.dentalos-mobile-layout .user-profile-button,
    html body.dentalos-mobile-layout .waiting-room-button,
    html body .notification-button,
    html body .admin-apps-button,
    html body .user-profile-button,
    html body .waiting-room-button {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        margin: 0 !important;
        border-radius: 15px !important;
        background: #ffffff !important;
        border: 1px solid #e0ecee !important;
        box-shadow: none !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    html body.dentalos-mobile-layout .admin-apps-button,
    html body .admin-apps-button {
        display: grid !important;
        grid-template-columns: repeat(3, 4px) !important;
        grid-template-rows: repeat(3, 4px) !important;
        gap: 5px !important;
        align-content: center !important;
        justify-content: center !important;
    }

    html body.dentalos-mobile-layout .user-profile-copy,
    html body.dentalos-mobile-layout .user-profile-chevron,
    html body .user-profile-copy,
    html body .user-profile-chevron {
        display: none !important;
    }

    html body.dentalos-mobile-layout .user-profile-avatar,
    html body .user-profile-avatar {
        width: 28px !important;
        height: 28px !important;
        border-radius: 11px !important;
        font-size: 16px !important;
    }

    html body .admin-apps-menu,
    html body .notification-menu,
    html body .user-profile-menu {
        top: 52px !important;
        right: 0 !important;
    }
}

@media (max-width: 430px) {
    html body .mobile-topbar,
    html body #mobileTopbar.mobile-topbar {
        padding-right: 184px !important;
    }

    html body .mobile-topbar-logo-image {
        max-width: 112px !important;
    }

    html body.dentalos-mobile-layout .app-top-toolbar.nav-actions,
    html body .app-top-toolbar.nav-actions {
        right: 7px !important;
        gap: 4px !important;
        padding: 3px !important;
    }

    html body.dentalos-mobile-layout .notification-button,
    html body.dentalos-mobile-layout .admin-apps-button,
    html body.dentalos-mobile-layout .user-profile-button,
    html body.dentalos-mobile-layout .waiting-room-button,
    html body .notification-button,
    html body .admin-apps-button,
    html body .user-profile-button,
    html body .waiting-room-button {
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
        min-height: 38px !important;
    }
}

/* =========================================================
   NAVIGATION FONT WEIGHT FIX
   Stavke navigacije bez boldovanja, desktop i mobile.
   ========================================================= */
html body .sidebar-link,
html body .sidebar-link.active,
html body .sidebar-link:hover,
html body .sidebar-link-label,
html body .sidebar-settings-link,
html body .sidebar-collapse-button,
html body .sidebar-collapse-label,
html body .mobile-menu-link,
html body .mobile-menu-link.active,
html body .mobile-menu-link:hover,
html body .mobile-menu-link span,
html body .mobile-menu-section-title,
html body .admin-app-item,
html body .admin-app-label,
html body .desktop-create-button,
html body .desktop-create-button strong,
html body .desktop-create-item-copy strong,
html body .desktop-create-item-copy small {
    font-weight: 400 !important;
}

html body .sidebar-link-icon,
html body .mobile-menu-link-icon,
html body .sidebar-collapse-icon {
    font-weight: 400 !important;
}


/* DentalOS licenca - diskretan red iznad Podešavanja */
.sidebar-license-warning{display:flex;align-items:center;gap:6px;margin:4px 10px 8px;padding:7px 10px;border-radius:12px;font-size:11px;font-weight:700;line-height:1.2;text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:rgba(250,204,21,.13);color:#a16207;border:1px solid rgba(250,204,21,.22)}
.sidebar-license-warning.orange{background:rgba(251,146,60,.14);color:#c2410c;border-color:rgba(251,146,60,.24)}
.sidebar-license-warning.danger{background:rgba(239,68,68,.13);color:#b42318;border-color:rgba(239,68,68,.24)}
.sidebar-license-warning:hover{filter:brightness(.98);transform:translateY(-1px)}
body.sidebar-collapsed .sidebar-license-warning{justify-content:center;font-size:0;padding:9px 0}body.sidebar-collapsed .sidebar-license-warning:before{content:'⚠';font-size:13px}


/* Core integration hotfix 2 - kompaktniji sidebar */
@media (min-width: 981px){
  :root{--dentalos-sidebar-w:244px;}
  html body .app-sidebar.top-nav{padding:14px 12px !important;}
  html body .sidebar-logo{padding:8px 10px 12px !important;margin-bottom:8px !important;}
  html body .sidebar-logo-image{max-height:38px !important;width:auto !important;}
  html body .sidebar-nav.top-nav-links{gap:4px !important;padding:4px 4px 8px !important;}
  html body .sidebar-link{min-height:34px !important;padding:7px 9px !important;border-radius:12px !important;font-size:11px !important;line-height:1.15 !important;gap:8px !important;}
  html body .sidebar-link-icon{width:22px !important;height:22px !important;min-width:22px !important;border-radius:9px !important;font-size:12px !important;}
  html body .sidebar-link-label{font-size:11px !important;font-weight:600 !important;letter-spacing:-.01em !important;}
  html body .sidebar-footer{padding:8px 8px 10px !important;gap:6px !important;}
  html body .sidebar-settings-link,
  html body .sidebar-collapse-button{min-height:32px !important;padding:7px 9px !important;border-radius:12px !important;font-size:11px !important;}
  html body .sidebar-license-warning{margin:3px 6px 6px !important;padding:6px 8px !important;border-radius:11px !important;font-size:10px !important;}
}
