/* =========================================================
   GTKZ FORGE — FINAL SIDEBAR OWNER
   Tight continuous groups + matching header/footer
   ========================================================= */

@media (min-width: 901px) {

    .sidebar {
        display: flex !important;
        flex-direction: column !important;

        width: 210px !important;
        min-width: 210px !important;

        height: auto !important;
        min-height: 100% !important;
        max-height: none !important;

        padding: 14px 10px !important;

        overflow: visible !important;

        background:
            linear-gradient(
                180deg,
                #031321 0%,
                #020c16 100%
            ) !important;

        border-right:
            1px solid rgba(47,132,185,.34) !important;

        box-sizing: border-box !important;
    }


    /* -----------------------------------------------------
       SECTION BANDS
       ----------------------------------------------------- */

    .sidebar .gtkz-sidebar-section {
        width: 100% !important;

        min-height: 31px !important;

        margin: 3px 0 1px !important;
        padding: 6px 9px !important;

        display: flex !important;
        align-items: center !important;

        border:
            1px solid rgba(57,153,210,.28) !important;

        border-radius: 7px !important;

        background:
            linear-gradient(
                90deg,
                rgba(8,44,70,.55),
                rgba(5,28,47,.22)
            ) !important;

        color: #19d7ff !important;

        font-size: 12px !important;
        font-weight: 900 !important;

        line-height: 1.15 !important;

        letter-spacing: .065em !important;

        text-transform: uppercase !important;
    }


    /* -----------------------------------------------------
       SUBSECTIONS / LINKS
       ----------------------------------------------------- */

    .sidebar .gtkz-sidebar-link {
        width: 100% !important;

        min-height: 26px !important;

        margin: 0 !important;
        padding: 3px 8px !important;

        display: flex !important;
        align-items: center !important;

        gap: 7px !important;

        border-radius: 6px !important;

        color: #dceefa !important;

        font-size: 10.5px !important;
        font-weight: 700 !important;

        line-height: 1.1 !important;

        letter-spacing: .025em !important;

        text-transform: uppercase !important;
    }


    .sidebar .gtkz-sidebar-link:hover {
        background:
            rgba(19,94,145,.20) !important;

        color: #ffffff !important;
    }


    /* Critical: no dead gaps between groups */

    .sidebar .gtkz-sidebar-link
    +
    .gtkz-sidebar-section {
        margin-top: 3px !important;
    }


    .sidebar .gtkz-sidebar-section
    +
    .gtkz-sidebar-link {
        margin-top: 0 !important;
    }


    .sidebar h2,
    .sidebar h3,
    .sidebar h4,
    .sidebar h5,
    .sidebar .section-title,
    .sidebar .nav-section-title,
    .sidebar .group-title,
    .sidebar a,
    .sidebar .nav-item {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }


    /* -----------------------------------------------------
       FOOTER
       ----------------------------------------------------- */

    .sidebar .gtkz-sidebar-final-footer {
        width: 100% !important;

        min-height: 94px !important;

        margin: 4px 0 0 !important;
        padding: 10px 8px !important;

        display: flex !important;
        flex-direction: column !important;

        align-items: center !important;
        justify-content: center !important;

        gap: 4px !important;

        flex: 0 0 auto !important;

        border:
            1px solid rgba(47,145,204,.42) !important;

        border-radius: 9px !important;

        background:
            linear-gradient(
                180deg,
                rgba(5,31,51,.92),
                rgba(2,18,31,.98)
            ) !important;
    }


    /*
     * Defeat every older rule that pushed the footer
     * to the bottom with a giant empty gap.
     */
    .sidebar > :last-child,
    .sidebar .sidebar-bottom,
    .sidebar .bottom-brand,
    .sidebar .brand-card,
    .sidebar .forge-card,
    .sidebar .gtkz-forge-card {
        margin-top: 4px !important;
    }


    .gtkz-footer-brand {
        display: flex !important;

        align-items: center !important;

        gap: 6px !important;
    }


    .gtkz-footer-crown {
        color: #ffffff !important;

        font-size: 15px !important;
    }


    .gtkz-footer-name {
        color: #ffffff !important;

        font-size: 15px !important;

        font-weight: 900 !important;

        letter-spacing: .04em !important;
    }


    .gtkz-footer-name .forge {
        color: #1fe1ff !important;
    }


    .gtkz-footer-command {
        color: #8ecfff !important;

        font-size: 7.5px !important;

        font-weight: 850 !important;

        letter-spacing: .10em !important;

        text-transform: uppercase !important;
    }


    .gtkz-footer-tagline {
        color: #ffffff !important;

        font-size: 7.5px !important;

        font-weight: 650 !important;
    }
}


@media (min-width: 1500px) {

    .sidebar {
        width: 220px !important;
        min-width: 220px !important;
    }

    .sidebar .gtkz-sidebar-section {
        font-size: 12.5px !important;
    }

    .sidebar .gtkz-sidebar-link {
        font-size: 11px !important;
    }
}


/* =========================================================
   GTKZ FORGE — ULTRA TIGHT SIDEBAR RHYTHM
   Remove remaining dead vertical space.
   ========================================================= */

@media (min-width: 901px) {

    /* -----------------------------------------------------
       SECTION BANDS
       ----------------------------------------------------- */

    .sidebar .gtkz-sidebar-section {
        margin:
            2px 0 0 !important;

        padding:
            5px 8px !important;

        min-height:
            29px !important;
    }


    /* -----------------------------------------------------
       NAV LINKS
       ----------------------------------------------------- */

    .sidebar .gtkz-sidebar-link {
        min-height:
            24px !important;

        padding:
            2px 8px !important;

        margin:
            0 !important;

        line-height:
            1.05 !important;
    }


    /* -----------------------------------------------------
       DIRECT CHILD RHYTHM
       ----------------------------------------------------- */

    .sidebar > *,
    .sidebar nav > *,
    .sidebar .nav > *,
    .sidebar .sidebar-nav > *,
    .sidebar .menu > * {
        margin-top:
            0 !important;

        margin-bottom:
            0 !important;
    }


    /* -----------------------------------------------------
       BETWEEN LAST LINK AND NEXT SECTION HEADER
       ----------------------------------------------------- */

    .sidebar .gtkz-sidebar-link
    +
    .gtkz-sidebar-section {
        margin-top:
            2px !important;
    }


    .sidebar .gtkz-sidebar-section
    +
    .gtkz-sidebar-link {
        margin-top:
            0 !important;
    }


    /* -----------------------------------------------------
       KILL ALL OLD GROUP MARGINS
       ----------------------------------------------------- */

    .sidebar .nav-group,
    .sidebar .menu-group,
    .sidebar .sidebar-group,
    .sidebar .section-group,
    .sidebar .nav-section,
    .sidebar .menu-section {
        margin:
            0 !important;

        padding:
            0 !important;
    }


    /* -----------------------------------------------------
       KILL OLD HEADER SPACING
       ----------------------------------------------------- */

    .sidebar h2,
    .sidebar h3,
    .sidebar h4,
    .sidebar h5,
    .sidebar .section-title,
    .sidebar .nav-section-title,
    .sidebar .group-title {
        margin:
            0 !important;

        padding-top:
            0 !important;

        padding-bottom:
            0 !important;
    }


    /* -----------------------------------------------------
       FOOTER DIRECTLY AFTER SYSTEM SETTINGS
       ----------------------------------------------------- */

    .sidebar .gtkz-sidebar-final-footer {
        margin:
            2px 0 0 !important;

        min-height:
            86px !important;

        padding:
            8px !important;
    }


    .sidebar > :last-child,
    .sidebar .sidebar-bottom,
    .sidebar .bottom-brand,
    .sidebar .brand-card,
    .sidebar .forge-card,
    .sidebar .gtkz-forge-card {
        margin-top:
            2px !important;
    }


    /* -----------------------------------------------------
       SIDEBAR ITSELF
       ----------------------------------------------------- */

    .sidebar {
        padding-top:
            12px !important;

        padding-bottom:
            10px !important;
    }
}


/* =========================================================
   GTKZ FORGE — SIDEBAR MICRO RHYTHM
   Small breathing space, no dead zones.
   ========================================================= */

@media (min-width: 901px) {

    /* Dashboard to first section */
    .sidebar .gtkz-sidebar-dashboard {
        margin-bottom:
            6px !important;
    }


    /* Section header to first subtitle */
    .sidebar .gtkz-sidebar-section {
        margin-top:
            5px !important;

        margin-bottom:
            4px !important;
    }


    /* Keep subtitle rows tight but readable */
    .sidebar .gtkz-sidebar-link {
        min-height:
            26px !important;

        padding-top:
            3px !important;

        padding-bottom:
            3px !important;
    }


    /* Last subtitle to next section header */
    .sidebar .gtkz-sidebar-link
    +
    .gtkz-sidebar-section {
        margin-top:
            6px !important;
    }


    /* First subtitle immediately under section box */
    .sidebar .gtkz-sidebar-section
    +
    .gtkz-sidebar-link {
        margin-top:
            1px !important;
    }


    /* Footer separation stays short */
    .sidebar .gtkz-sidebar-final-footer {
        margin-top:
            6px !important;
    }


    .sidebar > :last-child {
        margin-top:
            6px !important;
    }
}


/* =========================================================
   GTKZ — DASHBOARD TO FIRST SECTION MICRO GAP
   ========================================================= */

@media (min-width: 901px) {

    .sidebar .gtkz-sidebar-dashboard {
        margin-bottom:
            10px !important;
    }


    /*
     * First section gets a touch more breathing room,
     * without affecting the rest of the sidebar rhythm.
     */
    .sidebar .gtkz-sidebar-dashboard
    +
    .gtkz-sidebar-section {
        margin-top:
            0 !important;
    }
}

/* GTKZ — DASHBOARD TO TENANTS FINAL MICRO GAP */

@media (min-width: 901px) {

    .sidebar .gtkz-sidebar-dashboard {
        margin-bottom: 14px !important;
    }

}

/* GTKZ — DASHBOARD TO TENANTS MICRO GAP V2 */

@media (min-width: 901px) {

    .sidebar .gtkz-sidebar-dashboard {
        margin-bottom: 18px !important;
    }

}

/* GTKZ — DASHBOARD TO TENANTS FINAL DROP */

@media (min-width: 901px) {

    .sidebar .gtkz-sidebar-dashboard {
        margin-bottom: 288px !important;
    }

}


/* =========================================================
   GTKZ — FINAL SIDEBAR DROP + INNER RHYTHM
   ========================================================= */

@media (min-width: 901px) {

    /* Move TENANTS & PROVIDERS and everything below farther down */
    .sidebar .gtkz-sidebar-dashboard {
        margin-bottom:
            330px !important;
    }


    /* Give each subtitle more vertical breathing room */
    .sidebar .gtkz-sidebar-link {
        min-height:
            30px !important;

        padding-top:
            5px !important;

        padding-bottom:
            5px !important;

        line-height:
            1.15 !important;
    }


    /* Slightly more air under each section title box */
    .sidebar .gtkz-sidebar-section {
        margin-bottom:
            5px !important;
    }


    /* Small separation before the next section title */
    .sidebar .gtkz-sidebar-link
    +
    .gtkz-sidebar-section {
        margin-top:
            7px !important;
    }


    /* Footer still follows SYSTEM SETTINGS closely */
    .sidebar .gtkz-sidebar-final-footer {
        margin-top:
            7px !important;
    }
}


/* =========================================================
   GTKZ — SIDEBAR RHYTHM FINAL
   Exact breathing room between hierarchy levels.
   ========================================================= */

@media (min-width: 901px) {

    /* Dashboard → TENANTS & PROVIDERS */
    .sidebar .gtkz-sidebar-dashboard {
        margin-bottom:
            22px !important;
    }


    /* Section band → first subtitle */
    .sidebar .gtkz-sidebar-section {
        margin-top:
            7px !important;

        margin-bottom:
            8px !important;
    }


    /* Individual subtitle rows */
    .sidebar .gtkz-sidebar-link {
        min-height:
            29px !important;

        padding-top:
            4px !important;

        padding-bottom:
            4px !important;
    }


    /* Last subtitle → next section band */
    .sidebar .gtkz-sidebar-link
    +
    .gtkz-sidebar-section {
        margin-top:
            8px !important;
    }


    /* Section band → first subtitle */
    .sidebar .gtkz-sidebar-section
    +
    .gtkz-sidebar-link {
        margin-top:
            0 !important;
    }
}


/* =========================================================
   GTKZ — FIRST SIDEBAR SECTION GAP
   Dashboard -> TENANTS & PROVIDERS
   ========================================================= */

@media (min-width: 901px) {

    .sidebar .gtkz-first-section {
        margin-top:
            20px !important;
    }

}
