/* — Sidebar — */
/* --- Sidebar sub-menu indentation --- */
#sidebar-menu ul li ul.sub-menu li a {
    padding: 0.4rem 1rem 0.4rem 3.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#sidebar-menu ul li ul.sub-menu li a::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #7f8387;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
    flex-shrink: 0;
}
#sidebar-menu ul li ul.sub-menu li a:hover::before,
#sidebar-menu ul li ul.sub-menu li.mm-active > a::before {
    background-color: #556ee6;
}

/* --- LTR layout override (app.css RTL kurallarini LTR'ye cevir) --- */
.vertical-menu {
    left: 0;
    right: auto;
}
.main-content {
    margin-right: 0 !important;
    margin-left: 308px;
}
@media (max-width: 992px) {
    .main-content {
        margin-left: 0 !important;
    }
}
.vertical-collpsed .main-content {
    margin-left: 70px;
    margin-right: 0 !important;
}

/* Sidebar */
.vertical-menu {
    background-color: #eef0f5 !important;
    border-right: 1px solid #e9ebf1;
    width: 308px;
}

#sidebar-menu ul li a {
    color: #495057;
}

#sidebar-menu ul li a:hover,
#sidebar-menu ul li a:focus {
    background-color: #edeef4;
    color: #556ee6;
}

#sidebar-menu ul li.mm-active > a {
    color: #556ee6 !important;
    background-color: #dde0ff !important;
    border-left: 3px solid #556ee6;
    font-weight: 600;
}

/* Group headers should NOT get active background */
#sidebar-menu > ul > li.mm-active > a.has-arrow {
    background-color: transparent !important;
    border-left: none !important;
}

/* Accordion group headers */
#sidebar-menu > ul > li > a.has-arrow {
    font-size: 13px;
    letter-spacing: .05em;
    color: #7f8387;
    font-weight: 600;
    padding: 12px 20px;
}

#sidebar-menu > ul > li > a.has-arrow:hover {
    color: #556ee6;
    background-color: transparent;
}

/* Sub-menu items keep icons */
#sidebar-menu ul li ul.sub-menu li a i {
    display: inline-block;
    min-width: 1.75rem;
    font-size: 1.1rem;
    vertical-align: middle;
    color: #7f8387;
    margin-right: 0.25rem;
}

.menu-title {
    color: #9098ad !important;
}

/* — Topbar — */
#page-topbar {
    background-color: #eef0f5 !important;
    border-bottom: 1px solid #e9ebf1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.navbar-header .header-item {
    color: #495057;
}

/* — Logo area — */
.navbar-brand-box {
    background-color: #eef0f5 !important;
    width: 308px;
}

/* — Content area — */
.page-content {
    background-color: #f8f9fc;
    padding-top: 24px !important;
}

/* Scroll fix: make .main-content a fixed scrollable area beside the sidebar */
.main-content {
    position: fixed !important;
    top: 70px;
    left: 308px;
    right: 0;
    bottom: 0;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    margin-left: 0 !important;
}

/* When sidebar is collapsed */
.vertical-collpsed .main-content {
    left: 70px;
}

.vertical-collpsed .vertical-menu {
    width: 70px !important;
}

.vertical-collpsed .navbar-brand-box {
    width: 70px !important;
}

.vertical-collpsed .branding-logo-wrapper {
    display: none !important;
}

/* Mobile: no sidebar offset */
@media (max-width: 992px) {
    .main-content {
        left: 0 !important;
    }
}

/* Footer: flow at bottom of scrollable content, not fixed over it */
.footer {
    position: relative !important;
    left: 0 !important;
    bottom: auto !important;
}

/* — Grid rows - vertical center all cells — */
.dx-datagrid-rowsview .dx-row > td {
    vertical-align: middle !important;
}

/* — Reduce gap between checkbox and edit button — */
.dx-datagrid .dx-command-select {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    padding-right: 0 !important;
}

.dx-datagrid .dx-command-edit {
    padding-left: 0 !important;
}

.dx-datagrid-rowsview .dx-command-edit .dx-link {
    position: relative;
    top: 2px;
}

/* — Toastr: always float on viewport regardless of scroll — */
#toast-container {
    position: fixed !important;
    z-index: 999999 !important;
}

/* Fix Turkish uppercase issue */
.page-title-box h4,
#sidebar-menu ul li a,
#sidebar-menu > ul > li > a.has-arrow,
.menu-title {
    text-transform: none !important;
}

/* — Page-blocking loading overlay (centered spinner) — */
.app-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(1px);
    z-index: 100000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .75rem;
}

    .app-loading-overlay .spinner-border {
        width: 3.25rem;
        height: 3.25rem;
        border-width: .3rem;
    }

    .app-loading-overlay .app-loading-text {
        font-weight: 600;
        color: #495057;
        letter-spacing: .02em;
    }
