[data-bs-theme=light] {
    --bs-blue: #0d6efd;
    --bs-indigo: #6610f2;
    --bs-purple: #6f42c1;
    --bs-pink: #d63384;
    --bs-red: #dc3545;
    --bs-orange: #fd7e14;
    --bs-yellow: #ffc107;
    --bs-green: #198754;
    --bs-teal: #20c997;
    --bs-cyan: #0dcaf0;
    --bs-black: #000;
    --bs-white: #fff;
    --bs-gray: #6c757d;
    --bs-gray-dark: #343a40;
    --bs-gray-100: #f8f9fa;
    --bs-gray-200: #e9ecef;
    --bs-gray-300: #dee2e6;
    --bs-gray-400: #ced4da;
    --bs-gray-500: #adb5bd;
    --bs-gray-600: #6c757d;
    --bs-gray-700: #495057;
    --bs-gray-800: #343a40;
    --bs-gray-900: #212529;
        --bs-primary: hsl(208,70%,38%);
    --bs-secondary: #6c757d;
    --bs-success: #198754;
    --bs-info: #0dcaf0;
    --bs-warning: #ffc107;
    --bs-danger: #dc3545;
    --bs-light: #f8f9fa;
    --bs-dark: #212529;
        --bs-primary-rgb: 29, 103, 166;
    --bs-secondary-rgb: 108, 117, 125;
    --bs-success-rgb: 25, 135, 84;
    --bs-info-rgb: 13, 202, 240;
    --bs-warning-rgb: 255, 193, 7;
    --bs-danger-rgb: 220, 53, 69;
    --bs-light-rgb: 248, 249, 250;
    --bs-dark-rgb: 33, 37, 41;
    --bs-primary-text-emphasis: #052c65;
    --bs-secondary-text-emphasis: #2b2f32;
    --bs-success-text-emphasis: #0a3622;
    --bs-info-text-emphasis: #055160;
    --bs-warning-text-emphasis: #664d03;
    --bs-danger-text-emphasis: #58151c;
    --bs-light-text-emphasis: #495057;
    --bs-dark-text-emphasis: #495057;
    --bs-primary-bg-subtle: #cfe2ff;
    --bs-secondary-bg-subtle: #e2e3e5;
    --bs-success-bg-subtle: #d1e7dd;
    --bs-info-bg-subtle: #cff4fc;
    --bs-warning-bg-subtle: #fff3cd;
    --bs-danger-bg-subtle: #f8d7da;
    --bs-light-bg-subtle: #fcfcfd;
    --bs-dark-bg-subtle: #ced4da;
    --bs-primary-border-subtle: #9ec5fe;
    --bs-secondary-border-subtle: #c4c8cb;
    --bs-success-border-subtle: #a3cfbb;
    --bs-info-border-subtle: #9eeaf9;
    --bs-warning-border-subtle: #ffe69c;
    --bs-danger-border-subtle: #f1aeb5;
    --bs-light-border-subtle: #e9ecef;
    --bs-dark-border-subtle: #adb5bd;
    --bs-white-rgb: 255, 255, 255;
    --bs-black-rgb: 0, 0, 0;
    --bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    --bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
    --bs-body-font-family: var(--bs-font-sans-serif);
    --bs-body-font-size: 1rem;
    --bs-body-font-weight: 400;
    --bs-body-line-height: 1.5;
    --bs-body-color: #212529;
    --bs-body-color-rgb: 33, 37, 41;
    --bs-body-bg: #fff;
    --bs-body-bg-rgb: 255, 255, 255;
    --bs-emphasis-color: #000;
    --bs-emphasis-color-rgb: 0, 0, 0;
    --bs-secondary-color: rgba(33, 37, 41, 0.75);
    --bs-secondary-color-rgb: 33, 37, 41;
    --bs-secondary-bg: #e9ecef;
    --bs-secondary-bg-rgb: 233, 236, 239;
    --bs-tertiary-color: rgba(33, 37, 41, 0.5);
    --bs-tertiary-color-rgb: 33, 37, 41;
    --bs-tertiary-bg: #f8f9fa;
    --bs-tertiary-bg-rgb: 248, 249, 250;
    --bs-heading-color: inherit;
    --bs-link-color: #0d6efd;
    --bs-link-color-rgb: 13, 110, 253;
    --bs-link-decoration: underline;
    --bs-link-hover-color: #0a58ca;
    --bs-link-hover-color-rgb: 10, 88, 202;
    --bs-code-color: #d63384;
    --bs-highlight-color: #212529;
    --bs-highlight-bg: #fff3cd;
    --bs-border-width: 1px;
    --bs-border-style: solid;
    --bs-border-color: #dee2e6;
    --bs-border-color-translucent: rgba(0, 0, 0, 0.175);
        --bs-border-radius: 0;
        --bs-border-radius-sm: 0;
        --bs-border-radius-lg: 0;
        --bs-border-radius-xl: 0;
        --bs-border-radius-xxl: 0;
        --bs-border-radius-2xl: var(--bs-border-radius-xxl);
    --bs-border-radius-pill: 50rem;
    --bs-box-shadow: none;
    --bs-box-shadow-sm: none;
    --bs-box-shadow-lg: none;
    --bs-box-shadow-inset: none;
    --bs-focus-ring-width: 0.25rem;
    --bs-focus-ring-opacity: 0.25;
    --bs-focus-ring-color: rgba(13, 110, 253, 0.25);
    --bs-form-valid-color: #198754;
    --bs-form-valid-border-color: #198754;
    --bs-form-invalid-color: #dc3545;
    --bs-form-invalid-border-color: #dc3545;
}

/* Širine sidebara (normalni i compact mode). */
:root {
    --bs-font-sans-serif: "Muli", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --bs-body-font-family: "Muli", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --app-topbar-height: 56px;
    --app-sidebar-expanded-width: 320px;
    --app-sidebar-compact-width: 92px;
    --app-footer-row-height: 56px;
}

.list-group,
.text-bg-primary {
    --bs-list-group-active-bg: hsl(208,70%,38%);
}

.btn-primary {
    --bs-btn-bg: hsl(208,70%,38%);
    --bs-btn-border-color: hsl(208,70%,38%);
    --bs-btn-hover-bg: hsl(208,70%,25%);
    --bs-btn-hover-border-color: hsl(208,70%,25%);
    --bs-btn-active-bg: hsl(208,70%,45%);
    --bs-btn-active-border-color: hsl(208,70%,45%);
    --bs-btn-disabled-bg: hsl(208,70%,65%);
    --bs-btn-disabled-border-color: hsl(208,70%,65%);
}

.h1, .h2, .h3, .h4, .h5, .h6, h1, h2, h3, h4, h5, h6 {
    font-family: 'Fira Sans', sans-serif;
}

.sidebar-logo {
    display: flex;
    height: 100%;
    align-items: center;
}

.sidebar-logo img {
    width: 280px;
    height: 43px;
    transition: .16s all ease-in-out;
}

.sidebar-suzen .sidebar-logo img {
    width: 55px;
}

/* Osnovni desktop sidebar layout i visina stavki. */
#desktopSidebar {
    position: sticky;
    top: 0;
    align-self: flex-start;
    width: var(--app-sidebar-expanded-width);
    height: 100vh;
    max-height: 100vh;
    min-height: 100vh;
    transition: width .28s ease;
    overflow: visible;
    z-index: 1035;
}

#desktopSidebar .desktop-izbornik-stavka {
    min-height: 56px;
}

.app-topbar {
    min-height: var(--app-topbar-height);
}

.sidebar-brand-bar {
    min-height: var(--app-topbar-height);
    background-color: var(--bs-body-bg);
}

#desktopSidebar .sidebar-nav-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Logo u sidebaru */
.sidebar-brand {
    display: inline-flex;
    align-items: end;
    justify-content: start;
    gap: .65rem;
    font-weight: 600;
}

#desktopSidebar .sidebar-brand-wrap {
    width: 100%;
    display: flex;
}

.sidebar-brand-logo {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 38px;
}

.sidebar-brand-logo img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
}

/* Fiksna kutija za ikonu da ne skače pri učitavanju. */
.app-ikona {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    min-width: 1em;
    line-height: 1;
    flex-shrink: 0;
}

.app-ikona::before {
    display: block;
    line-height: 1;
}

/* Mali rounded gumb na samoj liniji sidebara. */
.sidebar-line-toggle {
    position: absolute;
    top: var(--app-topbar-height);
    right: 0;
    transform: translate(50%, -50%);
    width: 30px;
    height: 30px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid var(--bs-border-color);
    background-color: var(--bs-body-bg);
    color: var(--bs-secondary-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
}

.sidebar-line-toggle:hover {
    background-color: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
}

.sidebar-line-toggle:focus-visible {
    box-shadow: 0 0 0 .2rem rgba(var(--bs-primary-rgb), .2);
}

.sidebar-line-toggle i {
    font-size: .8rem;
    line-height: 1;
}

/* Theme gumb bez kocke, s okruglim hover efektom. */
.theme-toggle-btn {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--bs-secondary-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color .18s ease, color .18s ease;
}

.theme-toggle-btn:hover {
    background-color: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
}

.theme-toggle-btn:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 .2rem rgba(var(--bs-primary-rgb), .2);
}

.theme-toggle-btn i {
    font-size: 1rem;
    line-height: 1;
}

.topbar-notifications-toggle {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color .18s ease, color .18s ease;
}

.topbar-notifications-toggle:hover {
    background-color: var(--bs-tertiary-bg);
}

.topbar-notifications-toggle i {
    font-size: 1rem;
    line-height: 1;
}

.topbar-notifications-badge {
    position: absolute;
    top: 3px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background-color: #dc3545;
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
}

.topbar-notifications-menu {
    min-width: 340px;
}

.mobile-notifications-dialog {
    width: min(94vw, 640px);
    max-width: min(94vw, 640px);
    margin: 0 auto;
}

.mobile-notifications-modal .modal-content {
    border-radius: 14px;
}

.mobile-notifications-modal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

/* User traka i footer imaju istu visinu. */
.app-footer-bar {
    height: var(--app-footer-row-height);
    min-height: var(--app-footer-row-height);
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    display: flex;
    align-items: center;
}

.app-footer-bar .container-fluid {
    width: 100%;
}

#desktopSidebar .sidebar-userbar {
    height: var(--app-footer-row-height);
    min-height: var(--app-footer-row-height);
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    display: flex;
    align-items: center;
}

#desktopSidebar .sidebar-userbar > a {
    min-height: var(--app-footer-row-height);
    width: 100%;
    display: flex;
    align-items: center;
}

/* Početni compact prikaz prije JS inicijalizacije. */
.sidebar-dropdown-toggle {
    width: 100%;
    text-align: left;
    justify-content: space-between;
}

.sidebar-dropdown-toggle .sidebar-dropdown-chevron {
    margin-left: auto;
    transition: transform .2s ease;
}

.sidebar-dropdown-toggle[aria-expanded="true"] .sidebar-dropdown-chevron {
    transform: rotate(180deg);
}

#desktopSidebar:not(.sidebar-suzen) .sidebar-dropdown-toggle > span:first-child {
    flex: 1 1 auto;
}

.sidebar-dropdown-card .sidebar-dropdown-toggle {
    border: 0 !important;
}

.sidebar-dropdown-card .sidebar-dropdown-collapse {
    border-top: 1px solid var(--bs-border-color);
}

.sidebar-dropdown-card .list-group-item {
    border-radius: 0 !important;
}

html[data-sidebar-state="compact"] #desktopSidebar {
    width: var(--app-sidebar-compact-width) !important;
    transition: none !important;
}

html[data-sidebar-state="compact"] #desktopSidebar .desktop-izbornik-stavka {
    justify-content: center !important;
    gap: 0 !important;
}

html[data-sidebar-state="compact"] #desktopSidebar .sidebar-oznaka {
    display: none !important;
}

html[data-sidebar-state="compact"] #desktopSidebar .sidebar-dropdown-toggle,
#desktopSidebar.sidebar-suzen .sidebar-dropdown-toggle {
    justify-content: center !important;
}

html[data-sidebar-state="compact"] #desktopSidebar .sidebar-dropdown-toggle > span:first-child,
#desktopSidebar.sidebar-suzen .sidebar-dropdown-toggle > span:first-child {
    flex: 0 0 auto;
    justify-content: center;
}

html[data-sidebar-state="compact"] #desktopSidebar .sidebar-dropdown-card .list-group-item,
#desktopSidebar.sidebar-suzen .sidebar-dropdown-card .list-group-item {
    padding-left: .75rem !important;
    padding-right: .75rem !important;
    justify-content: center !important;
}

/* U compact modu ostaje samo logo brenda. */
html[data-sidebar-state="compact"] #desktopSidebar .sidebar-brand {
    width: 100%;
    justify-content: center;
    gap: 0;
}

html[data-sidebar-state="compact"] #desktopSidebar .sidebar-brand-wrap {
    width: 100%;
}

#desktopSidebar.sidebar-suzen .sidebar-brand {
    width: 100%;
    justify-content: center;
    gap: 0;
}

#desktopSidebar.sidebar-suzen .sidebar-brand-wrap {
    width: 100%;
}

.app-kalendar-wrapper .datepicker-inline,
.app-kalendar-wrapper .datepicker {
    width: 100%;
}

.app-kalendar-wrapper {
    max-width: 920px;
    margin-inline: auto;
}

.app-kalendar-small-datepicker .datepicker {
    width: 220px;
    max-width: 220px;
}

.app-kalendar-wrapper .datepicker table {
    width: 100%;
    margin: 0;
}

.app-kalendar-wrapper .datepicker th,
.app-kalendar-wrapper .datepicker td {
    width: 14.285%;
    height: 70px;
    border-radius: .65rem;
    font-weight: 500;
    position: relative;
    vertical-align: middle;
    font-size: 1.08rem;
    text-align: center;
}

.app-kalendar-wrapper .datepicker .datepicker-switch,
.app-kalendar-wrapper .datepicker .next,
.app-kalendar-wrapper .datepicker .prev {
    height: 62px;
    font-weight: 600;
    font-size: 1.1rem;
}

.app-kalendar-wrapper .datepicker .day {
    line-height: 1.1;
}

.app-kalendar-wrapper .datepicker .day.app-kalendar-dan-ima-dogadaj::after {
    content: attr(data-event-count);
    position: absolute;
    top: 2px;
    right: 2px;
    transform: translate(38%, -38%);
    width: 1rem;
    min-width: 1rem;
    height: 1rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .56rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    background-color: #dc3545;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .22);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .28);
    pointer-events: none;
    z-index: 2;
}

.app-kalendar-wrapper .datepicker .day.app-kalendar-dan-ima-dogadaj {
    font-weight: 700;
}

@media (max-width: 991.98px) {
    .app-kalendar-wrapper .datepicker th,
    .app-kalendar-wrapper .datepicker td {
        height: 62px;
        font-size: 1rem;
    }
}
