/* ============================================================
   ROOT VARIABLES
   ============================================================ */
:root {
    /* Images */
    --auth-hero-image: url('/images/Background.jpg');
    /* Core colors */
    --color-white: #ffffff;
    --color-black: #000000;
    --color-surface: #ffffff;
    --color-surface-muted: #f5f5f5;
    --color-border: #d3d3d3;
    --color-border-subtle: rgba(0, 0, 0, 0.10);
    --color-text: #000000;
    --color-text-inverse: #ffffff;
    /* Theme colors */
    --color-theme-1: #2b53a7;
    --color-theme-1-hover: #254559;
    --color-theme-1-rgb: 37 69 89;
    /* Overlays */
    --overlay-auth: rgba(0, 0, 0, 0.50);
    --overlay-content: rgba(255, 255, 255, 0.80);
    /* Radii */
    --radius-sm: 2px;
    --radius-md: 8px;
    --radius-lg: 12px;
    /* Shadows */
    --shadow-soft: 0 8px 20px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08);
    --shadow-primary: 0 10px 25px rgba(var(--color-theme-1-rgb), 0.15);
    /* Layout */
    --sidebar-width: 280px;
}

/* ============================================================
   GLOBAL STYLES
   ============================================================ */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* Utilities */
.fs-12 {
    font-size: 12px;
}

.fw-bold {
    font-weight: 600 !important;
}

table.table.dataTable > thead > tr > th {
    font-weight: 500 !important;
}

/* Intl Tel */
.iti {
    width: 100%;
}

    .iti input.form-control {
        width: 100%;
    }

.iti--separate-dial-code .iti__selected-flag {
    background-color: transparent;
}

.accordion-button {
    background: var(--color-surface-muted);
}

.dataTables_wrapper,
.dataTables_scroll,
.dataTables_scrollBody,
.table-responsive {
    overflow: visible !important;
}

.js-member-locations-map {
    width: 100%;
    height: 520px;
    min-height: 420px;
}

/* Bootstrap modal(s) */
.system-modal-body-scroll {
    max-height: calc(100vh - 220px);
    overflow-y: auto;
    padding-bottom: 1rem;
}

.system-modal-sticky-actions {
    position: sticky;
    text-align: right;
    bottom: 0;
    z-index: 10;
    background: #fff;
    border-top: 1px solid #dee2e6;
    padding: 1rem;
    border-bottom-left-radius: calc(.3rem - 1px);
    border-bottom-right-radius: calc(.3rem - 1px);
}

    .system-modal-sticky-actions .btn {
        min-width: 120px;
    }

/* ============================================================
   AUTH LAYOUT (LOGIN / REGISTER)
   ============================================================ */
.system-auth-wrapper {
    height: 100vh;
}

.system-auth-left {
    position: relative;
    background: var(--auth-hero-image) center center / cover no-repeat;
    overflow: hidden;
}

    .system-auth-left::before {
        content: "";
        position: absolute;
        inset: 0;
        background: var(--overlay-auth);
        z-index: 0;
    }

    .system-auth-left > * {
        position: relative;
        z-index: 1;
    }

.system-auth-overlay {
    height: 100%;
    color: var(--color-text-inverse);
    padding: 48px; /* 3rem */
}

.system-auth-right {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface-muted);
}

.system-auth-box {
    width: 100%;
    max-width: 380px;
}

.system-auth-btn {
    color: var(--color-white) !important;
    background: var(--color-theme-1) !important;
    border-color: var(--color-theme-1) !important;
}

    .system-auth-btn:hover,
    .system-auth-btn:active
    .system-auth-btn:focus {
        background: var(--color-theme-1-hover) !important;
    }

/* ============================================================
   LAYOUT / CONTENT HEADER
   ============================================================ */
.system-content-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

/* ============================================================
   DASHBOARD LAYOUT
   ============================================================ */
.system-body {
}

.system-main-content {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    transition: margin-left 0.25s ease;
    background: linear-gradient(var(--overlay-content), var(--overlay-content)), var(--auth-hero-image) center center / cover no-repeat;
    background-attachment: scroll;
    overflow-x: visible;
}

    .system-main-content::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 0;
    }

    .system-main-content > * {
        position: relative;
    }

/* Breadcrumbs */
.breadcrumb-item {
    font-size: 12px;
}

    .breadcrumb-item a {
        text-decoration: none;
        cursor: pointer;
    }

        .breadcrumb-item a:hover {
            color: var(--color-theme-1-hover) !important;
        }

    .breadcrumb-item.active > a {
        text-decoration: none;
        color: var(--color-theme-1) !important;
        cursor: text;
    }

.system-breadcrumb {
    background: var(--color-surface-muted);
    border-radius: var(--radius-sm);
}

/* ============================================================
   SIDEBAR (BOOTSTRAP-LIKE, LIGHT)
   ============================================================ */
.system-sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: sticky;
    top: 0;
    left: 0;
    background: var(--color-surface);
    border-right: 1px solid var(--bs-border-color);
    color: var(--bs-body-color);
    overflow: hidden;
    min-width: 280px;
}

.sidebar-header {
    background: transparent;
    margin: 0 auto;
}

    .sidebar-header img {
        display: block;
        max-width: 100%;
    }

.sidebar-divider {
    border: 0;
    border-top: 1px solid var(--bs-border-color);
    margin: 0;
    opacity: 1;
}

.sidebar-menu {
    overflow-y: auto;
    overflow-x: hidden;
    padding-top: 4px;
    padding-bottom: 4px;
}

    .sidebar-menu::-webkit-scrollbar {
        width: 8px;
    }

    .sidebar-menu::-webkit-scrollbar-thumb {
        border-radius: 0px;
        background: var(--color-border);
    }

    .sidebar-menu::-webkit-scrollbar-track {
        background: transparent;
    }

.system-sidebar-section {
    letter-spacing: 0.04em;
    font-weight: 600;
    color: var(--bs-secondary-color);
    padding-left: 4px;
}

/* Links */
.system-nav-link {
    /*display: flex;*/
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin-bottom: 4px;
    border-radius: var(--radius-sm);
    color: var(--bs-body-color);
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

    .system-nav-link:hover {
        background: rgba(var(--color-theme-1-rgb), 0.10);
        color: var(--bs-body-color);
        font-weight: 600;
    }

    .system-nav-link.active {
        background: var(--color-theme-1);
        color: var(--color-text-inverse) !important;
        font-weight: 600;
    }

    .system-nav-link i {
        font-size: 16.8px; /* 1.05rem */
        line-height: 1;
    }

    .system-nav-link .bi-chevron-down {
        margin-left: auto;
        opacity: 0.75;
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    .system-nav-link.collapsed .bi-chevron-down {
        transform: rotate(-90deg);
        opacity: 0.75;
    }

    .system-nav-link:focus {
        outline: 0;
        box-shadow: 0 0 0 4px rgba(var(--color-theme-1-rgb), 0.25);
    }

    /*.system-nav-link:not(.collapsed):not(.active) {*/
    .system-nav-link:not(.active) {
        background: rgba(0, 0, 0, 0.03);
    }

/* Nested */
.system-nav-link-child {
    position: relative;
    margin-left: 12px;
    padding-left: 8px;
    border-left: 1px solid rgba(0, 0, 0, 0.10);
}

    .system-nav-link-child .system-nav-link {
        padding: 6px 12px;
        font-size: 15px;
    }

        .system-nav-link-child .system-nav-link.active {
            color: var(--color-text-inverse) !important;
            background: var(--color-theme-1);
            border-color: var(--color-theme-1);
        }

/* Sidebar collapsed */
.sidebar-collapsed .system-sidebar {
    transform: translateX(calc(-1 * var(--sidebar-width)));
    transition: transform 0.25s ease;
}

.sidebar-collapsed .system-main-content {
    margin-left: 0;
}

.system-mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    min-height: 64px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border-subtle);
}

.system-mobile-toggle {
    border: 1px solid var(--color-border-subtle);
    background: var(--color-surface);
    color: #212529;
    box-shadow: none;
    padding: 0.35rem 0.65rem;
    border-radius: 0.5rem;
}

    .system-mobile-toggle:hover,
    .system-mobile-toggle:focus,
    .system-mobile-toggle:active {
        background: #f8f9fa;
        color: #212529;
        box-shadow: none;
    }

    .system-mobile-toggle i {
        color: #212529;
    }

/* ============================================================
   PROFILE DROPDOWN (SIDEBAR FOOTER)
   ============================================================ */
.sidebar-footer .dropdown > a.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-lg);
    color: var(--bs-body-color) !important;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

    .sidebar-footer .dropdown > a.dropdown-toggle:hover,
    .sidebar-footer .dropdown > a.dropdown-toggle:focus {
        background: rgba(var(--color-theme-1-rgb), 0.10);
        outline: 0;
    }

    .sidebar-footer .dropdown > a.dropdown-toggle::after {
        margin-left: auto;
        opacity: 0.8;
    }

.sidebar-footer .dropdown > a .text-truncate {
    max-width: 170px;
    font-weight: 600;
}

.sidebar-footer .dropdown-menu {
    background: var(--color-surface);
    border: 1px solid rgba(var(--color-theme-1-rgb), 0.25);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-primary);
    padding: 8px;
    min-width: 100%;
}

    .sidebar-footer .dropdown-menu.dropdown-menu-dark {
        background: var(--bs-body-bg);
        border: 1px solid var(--bs-border-color);
        color: var(--bs-body-color);
    }

    .sidebar-footer .dropdown-menu .dropdown-item {
        border-radius: var(--radius-sm);
        padding: 7px 12px;
        color: var(--bs-body-color);
        font-size: 15px;
        transition: background-color 0.12s ease;
    }

        .sidebar-footer .dropdown-menu .dropdown-item:hover,
        .sidebar-footer .dropdown-menu .dropdown-item:focus {
            background: rgba(0, 0, 0, 0.06);
            color: var(--bs-body-color);
        }

    .sidebar-footer .dropdown-menu .dropdown-divider {
        margin: 8px 0;
        border-top: 1px solid var(--bs-border-color);
        opacity: 1;
    }

    .sidebar-footer .dropdown-menu .dropdown-item.text-danger {
        color: var(--bs-body-color) !important;
    }

        .sidebar-footer .dropdown-menu .dropdown-item.text-danger:hover,
        .sidebar-footer .dropdown-menu .dropdown-item.text-danger:focus {
            background: rgba(0, 0, 0, 0.06);
        }

/* ============================================================
   DASHBOARD CARDS
   ============================================================ */
.system-stat-card {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    min-height: 110px;
}

.system-stat-title {
    letter-spacing: 0.04em;
    font-weight: 600;
    font-size: 13px;
    color: var(--bs-secondary-color);
}

.system-stat-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--bs-dark);
    line-height: 1.1;
}

.system-stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

    .system-stat-icon i {
        font-size: 24px;
        line-height: 1;
    }

.icon-soft-warning {
    background: rgba(var(--bs-warning-rgb), 0.15);
    color: var(--bs-warning);
}

.icon-soft-info {
    background: rgba(var(--bs-info-rgb), 0.15);
    color: var(--bs-info);
}

.icon-soft-primary {
    color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb), 0.15);
}

.system-stat-trend {
    font-size: 14px;
    color: var(--bs-secondary-color);
}

/* ============================================================
   JQUERY LOADER
   ============================================================ */
.section-loader-overlay {
    position: absolute;
    inset: 0;
    z-index: 1060;
    background: rgba(255, 255, 255, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: inherit;
}

.section-loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (min-width: 768px) {
    .system-main-content {
        padding-top: 0;
        background-attachment: fixed;
    }

    .system-mobile-header {
        display: none !important;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 16px;
    }

    .system-main-content {
        padding-top: 74px !important;
        min-height: 100vh;
        min-height: 100dvh;
        overflow-x: hidden;
    }

    .system-sidebar {
        max-width: auto;
    }

    .system-mobile-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        min-height: 64px;
        z-index: 1050;
        background: #ffffff;
        border-bottom: 1px solid #dee2e6;
        box-sizing: border-box;
    }

    .system-mobile-toggle {
        border: 1px solid #dee2e6;
        background: #ffffff;
        color: #212529;
        border-radius: 0.5rem;
        padding: 0.35rem 0.65rem;
        box-shadow: none;
    }

        .system-mobile-toggle:hover,
        .system-mobile-toggle:focus,
        .system-mobile-toggle:active {
            background: #f8f9fa;
            color: #212529;
            box-shadow: none;
        }

        .system-mobile-toggle i {
            color: #212529;
        }

    .system-mobile-offcanvas {
        width: 300px;
        max-width: 85%;
    }

        .system-mobile-offcanvas .offcanvas-header {
            background: #ffffff;
            border-bottom: 1px solid #dee2e6;
        }

        .system-mobile-offcanvas .offcanvas-body {
            background: #ffffff;
            overflow-x: hidden;
        }
}
