/* ============================================================
   SIDEBAR
   RAG + ABSA PEMERINTAH KABUPATEN WAJO
============================================================ */

:root {

    --sidebar-width: 260px;

    --sidebar-bg: #ffffff;

    --sidebar-border: #e8edf3;

    --sidebar-text: #475569;

    --sidebar-muted: #94a3b8;

    --sidebar-primary: #2563eb;

    --sidebar-primary-dark: #1d4ed8;

}


/* ============================================================
   SIDEBAR
============================================================ */

.sidebar {

    position: fixed;

    top: var(--header-height);

    left: 0;

    bottom: 0;

    width: var(--sidebar-width);

    z-index: 900;

    display: flex;

    flex-direction: column;

    background: var(--sidebar-bg);

    border-right: 1px solid var(--sidebar-border);

    box-sizing: border-box;

    overflow-y: auto;

    overflow-x: hidden;

    transition:
        transform .25s ease,
        box-shadow .25s ease;

}


/* ============================================================
   SCROLLBAR
============================================================ */

.sidebar::-webkit-scrollbar {

    width: 4px;

}


.sidebar::-webkit-scrollbar-track {

    background: transparent;

}


.sidebar::-webkit-scrollbar-thumb {

    background: #dbe2ea;

    border-radius: 10px;

}


.sidebar::-webkit-scrollbar-thumb:hover {

    background: #cbd5e1;

}


/* ============================================================
   SIDEBAR BRAND
============================================================ */

.sidebar-brand {

    min-height: 78px;

    padding: 17px 20px;

    display: flex;

    align-items: center;

    gap: 12px;

    box-sizing: border-box;

    border-bottom: 1px solid #f1f5f9;

}


/* ============================================================
   BRAND ICON
============================================================ */

.sidebar-brand-icon {

    width: 40px;

    height: 40px;

    flex: 0 0 40px;

    display: flex;

    align-items: center;

    justify-content: center;

    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            #1d4ed8,
            #3b82f6
        );

    border-radius: 11px;

    font-size: 15px;

    box-shadow:
        0 7px 18px
        rgba(37, 99, 235, .18);

}


/* ============================================================
   BRAND INFORMATION
============================================================ */

.sidebar-brand-info {

    min-width: 0;

    display: flex;

    flex-direction: column;

}


.sidebar-brand-info strong {

    color: #172033;

    font-size: 12px;

    font-weight: 800;

    line-height: 1.3;

    letter-spacing: -.01em;

}


.sidebar-brand-info span {

    margin-top: 3px;

    color: #94a3b8;

    font-size: 8px;

    font-weight: 600;

    line-height: 1.3;

}


/* ============================================================
   NAVIGATION
============================================================ */

.sidebar-navigation {

    padding: 20px 12px 10px;

}


/* ============================================================
   SECTION LABEL
============================================================ */

.sidebar-section-label {

    padding:

        0
        10px
        8px;

    color: #a0aec0;

    font-size: 8px;

    font-weight: 800;

    letter-spacing: .1em;

    line-height: 1.4;

    text-transform: uppercase;

}


/* ============================================================
   MENU
============================================================ */

.sidebar-menu {

    position: relative;

    min-height: 52px;

    margin: 3px 0;

    padding:

        6px
        10px;

    display: flex;

    align-items: center;

    gap: 11px;

    color: var(--sidebar-text);

    background: transparent;

    text-decoration: none;

    border-radius: 11px;

    box-sizing: border-box;

    transition:

        background .2s ease,

        color .2s ease,

        transform .2s ease;

}


/* ============================================================
   MENU HOVER
============================================================ */

.sidebar-menu:hover {

    color: var(--sidebar-primary);

    background: #f8fafc;

    transform: translateX(2px);

}


/* ============================================================
   MENU ACTIVE
============================================================ */

.sidebar-menu.active {

    color: var(--sidebar-primary);

    background:
        linear-gradient(
            90deg,
            #eff6ff 0%,
            #f8fbff 100%
        );

    box-shadow:
        inset 0 0 0 1px
        rgba(37, 99, 235, .04);

}


/* ============================================================
   ACTIVE INDICATOR
============================================================ */

.menu-active-indicator {

    position: absolute;

    left: 0;

    top: 9px;

    bottom: 9px;

    width: 3px;

    background:
        linear-gradient(
            180deg,
            #2563eb,
            #60a5fa
        );

    border-radius:
        0
        5px
        5px
        0;

    opacity: 0;

    transform: scaleY(.4);

    transition:

        opacity .2s ease,

        transform .2s ease;

}


.sidebar-menu.active
.menu-active-indicator {

    opacity: 1;

    transform: scaleY(1);

}


/* ============================================================
   MENU ICON
============================================================ */

.menu-icon {

    width: 34px;

    height: 34px;

    flex: 0 0 34px;

    display: flex;

    align-items: center;

    justify-content: center;

    color: #64748b;

    background: transparent;

    border-radius: 9px;

    font-size: 12px;

    transition:

        color .2s ease,

        background .2s ease,

        box-shadow .2s ease,

        transform .2s ease;

}


.sidebar-menu:hover
.menu-icon {

    color: #2563eb;

    background: #ffffff;

}


.sidebar-menu.active
.menu-icon {

    color: #2563eb;

    background: #ffffff;

    box-shadow:
        0 3px 10px
        rgba(37, 99, 235, .10);

}


.sidebar-menu:hover
.menu-icon i {

    transform: scale(1.08);

}


/* ============================================================
   MENU CONTENT
============================================================ */

.menu-content {

    min-width: 0;

    flex: 1;

    display: flex;

    flex-direction: column;

}


.menu-text {

    color: inherit;

    font-size: 10px;

    font-weight: 700;

    line-height: 1.3;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;

}


.menu-description {

    margin-top: 3px;

    color: #a0aec0;

    font-size: 7.5px;

    font-weight: 500;

    line-height: 1.3;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;

}


.sidebar-menu.active
.menu-description {

    color: #7da7e8;

}


/* ============================================================
   MENU BADGE
============================================================ */

.menu-badge {

    min-width: 20px;

    height: 20px;

    padding: 0 6px;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    color: #2563eb;

    background: #dbeafe;

    border-radius: 6px;

    font-size: 7px;

    font-weight: 800;

}


/* ============================================================
   DIVIDER
============================================================ */

.sidebar-divider {

    height: 1px;

    margin:

        15px
        10px;

    background:
        linear-gradient(
            90deg,
            transparent,
            #e9eef4,
            transparent
        );

}


/* ============================================================
   SIDEBAR BOTTOM
============================================================ */

.sidebar-bottom {

    margin-top: auto;

    padding:

        10px
        14px
        18px;

}


/* ============================================================
   SYSTEM CARD
============================================================ */

.sidebar-system-card {

    padding: 13px;

    background:
        linear-gradient(
            145deg,
            #f8fbff,
            #f8fafc
        );

    border:
        1px solid
        #e5edf7;

    border-radius: 12px;

    box-sizing: border-box;

}


/* ============================================================
   SYSTEM CARD TOP
============================================================ */

.system-card-top {

    display: flex;

    align-items: center;

    justify-content: space-between;

}


/* ============================================================
   SYSTEM CARD ICON
============================================================ */

.system-card-icon {

    width: 32px;

    height: 32px;

    display: flex;

    align-items: center;

    justify-content: center;

    color: #2563eb;

    background: #eff6ff;

    border-radius: 8px;

    font-size: 11px;

}


/* ============================================================
   SYSTEM STATUS
============================================================ */

.system-card-status {

    display: inline-flex;

    align-items: center;

    gap: 5px;

    padding:

        4px
        7px;

    color: #15803d;

    background: #f0fdf4;

    border:
        1px solid
        #dcfce7;

    border-radius: 999px;

    font-size: 7px;

    font-weight: 700;

}


.system-status-dot {

    width: 5px;

    height: 5px;

    border-radius: 50%;

    background: #22c55e;

    box-shadow:
        0 0 0 3px
        rgba(34, 197, 94, .10);

}


/* ============================================================
   SYSTEM CONTENT
============================================================ */

.system-card-content {

    margin-top: 11px;

}


.system-card-content strong {

    display: block;

    color: #334155;

    font-size: 9px;

    font-weight: 800;

    line-height: 1.3;

}


.system-card-content span {

    display: block;

    margin-top: 4px;

    color: #94a3b8;

    font-size: 7.5px;

    font-weight: 500;

    line-height: 1.5;

}


/* ============================================================
   SYSTEM CARD FOOTER
============================================================ */

.system-card-footer {

    margin-top: 11px;

    padding-top: 9px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    border-top: 1px solid #e8eef5;

}


.system-card-footer span {

    color: #a0aec0;

    font-size: 7px;

    font-weight: 600;

}


.system-card-footer strong {

    color: #64748b;

    font-size: 7px;

    font-weight: 800;

}


/* ============================================================
   COPYRIGHT
============================================================ */

.sidebar-copyright {

    margin-top: 10px;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 5px;

    color: #c1cad6;

    font-size: 7px;

    font-weight: 600;

}


.sidebar-copyright i {

    font-size: 7px;

}


/* ============================================================
   MAIN CONTENT POSITION
============================================================ */

.main-container {

    width:
        calc(
            100% - var(--sidebar-width)
        );

    min-height: 100vh;

    margin-left:
        var(--sidebar-width);

    padding-top:
        var(--header-height);

    box-sizing: border-box;

}


.site-footer {

    margin-left:
        var(--sidebar-width);

}


/* ============================================================
   MOBILE
============================================================ */

@media (max-width: 900px) {

    .sidebar {

        width: 260px;

        transform:
            translateX(-100%);

        box-shadow:
            12px 0 35px
            rgba(15, 23, 42, .12);

    }


    .sidebar.open {

        transform:
            translateX(0);

    }


    .main-container {

        width: 100%;

        margin-left: 0;

    }


    .site-footer {

        margin-left: 0;

    }

}


/* ============================================================
   SMALL MOBILE
============================================================ */

@media (max-width: 520px) {

    .sidebar {

        width: 245px;

    }


    .sidebar-brand {

        min-height: 70px;

        padding:

            15px
            17px;

    }


    .sidebar-navigation {

        padding:

            17px
            10px
            8px;

    }


    .sidebar-bottom {

        padding:

            8px
            11px
            15px;

    }

}

/* ============================================================
   SIDEBAR SYSTEM STATUS
============================================================ */

.system-card-status.checking {

    color: #b45309;

    background: #fffbeb;

    border-color: #fde68a;

}


.system-card-status.online {

    color: #15803d;

    background: #f0fdf4;

    border-color: #dcfce7;

}


.system-card-status.offline {

    color: #b91c1c;

    background: #fef2f2;

    border-color: #fecaca;

}


/* ============================================================
   STATUS DOT
============================================================ */

.system-status-dot.checking {

    background: #f59e0b;

    box-shadow:
        0 0 0 3px
        rgba(245, 158, 11, .10);

}


.system-status-dot.online {

    background: #22c55e;

    box-shadow:
        0 0 0 3px
        rgba(34, 197, 94, .10);

}


.system-status-dot.offline {

    background: #ef4444;

    box-shadow:
        0 0 0 3px
        rgba(239, 68, 68, .10);

}