/* =========================================================
   RFORCAR SIDEBAR
========================================================= */

.rfc-navbar-inner {
    max-width: none;
    margin: 0;
    padding-right: 16px;
    padding-left: 16px;
}

.rfc-navbar .rfc-sidebar-search-form {
    flex: 0 1 360px;
    width: 100%;
    max-width: 360px;
    min-width: 0;
}

@media (max-width: 900px) {
    .rfc-navbar .rfc-sidebar-search-form {
        display: none;
    }
}

.rfc-sidebar-search-form {
    display: block;
    width: 100%;
}

.rfc-sidebar-search-box {
    width: 100%;
    height: 44px;
    min-width: 0;
    padding: 0;
    border-radius: 10px;
    overflow: hidden;
}

.rfc-sidebar-search-box:focus-within {
    border-color: #6b7280;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.08);
}

.rfc-sidebar-search-box > .fa-magnifying-glass {
    flex: 0 0 auto;
    margin-left: 12px;
}

.rfc-sidebar-search-box input {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    padding: 0 8px;
    font-size: 14px;
}

.rfc-sidebar-search-clear {
    display: grid;
    flex: 0 0 28px;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
}

.rfc-sidebar-search-clear:hover {
    background: #e5e7eb;
    color: #111827;
}

.rfc-sidebar-search-clear[hidden] {
    display: none;
}

.rfc-sidebar-search-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    align-self: stretch;
    flex: 0 0 auto;
    height: 100%;
    padding: 0 14px;
    border: 0;
    border-radius: 0;
    background: #111827;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.rfc-sidebar-search-submit:hover {
    background: #2b3545;
}

#sidebar-wrapper {
    position: fixed;
    top: 0;
    left: 0;

    width: 340px;
    max-width: 90vw;
    height: 100vh;

    background: #ffffff;

    z-index: 1050;

    transform: translateX(-100%);
    transition: transform .30s ease;

    overflow-y: auto;
    overflow-x: hidden;

    box-shadow: 5px 0 25px rgba(0, 0, 0, .12);

    -webkit-overflow-scrolling: touch;
}

#wrapper.sidebar-open #sidebar-wrapper {
    transform: translateX(0);
}


/* =========================================================
   OVERLAY
========================================================= */

#sidebar-overlay {

    display: none;

    position: fixed;

    inset: 0;

    background: rgba(0, 0, 0, .45);

    backdrop-filter: blur(2px);

    z-index: 1040;
}

#wrapper.sidebar-open #sidebar-overlay {
    display: block;
}


/* =========================================================
   SIDEBAR
========================================================= */

.rfc-sidebar {
    min-height: 100%;
    padding: 20px;
}


/* =========================================================
   HEADER
========================================================= */

.rfc-sidebar-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding-bottom: 18px;

    border-bottom: 1px solid #eeeeee;
}

.rfc-sidebar-logo img {

    width: 155px;

    max-width: 100%;

    height: auto;

    display: block;
}

.rfc-sidebar-close {

    border: none;

    background: transparent;

    font-size: 22px;

    color: #222;

    cursor: pointer;

    width: 40px;

    height: 40px;

    border-radius: 10px;

    display: flex;

    align-items: center;

    justify-content: center;
}

.rfc-sidebar-close:hover {

    background: #f3f3f3;

}


/* =========================================================
   USER CARD
========================================================= */

.rfc-user-card {

    display: flex;

    align-items: center;

    gap: 12px;

    margin-top: 20px;

    padding: 15px;

    border-radius: 15px;

    background: #f7f8fa;

    border: 1px solid #eeeeee;
}

.rfc-user-avatar {

    width: 45px;

    height: 45px;

    border-radius: 50%;

    background: #111827;

    color: #ffffff;

    display: flex;

    align-items: center;

    justify-content: center;

    flex-shrink: 0;
}

.rfc-user-greeting {

    font-size: 12px;

    color: #777;
}

.rfc-user-name {

    font-size: 15px;

    font-weight: 700;

    color: #111;
}

.rfc-sidebar .sidebar-user-card {
    display: none;
}

@media (max-width: 900px) {
    .rfc-sidebar .sidebar-user-card {
        display: block;
        margin: 16px 0 10px;
    }

    .rfc-sidebar .sidebar-user-card a {
        display: flex;
        align-items: center;
        gap: 11px;
        min-height: 62px;
        padding: 10px 12px;
        border: 1px solid #e5e7eb;
        border-left: 3px solid #0f766e;
        border-radius: 8px;
        background: #f7faf9;
        color: #1f2937;
        text-decoration: none;
        transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
    }

    .rfc-sidebar .sidebar-user-card a:hover {
        border-color: #cbd5e1;
        background: #eef5f3;
        transform: translateY(-1px);
    }

    .rfc-sidebar .sidebar-user-card a:focus-visible {
        outline: 2px solid #2563eb;
        outline-offset: 2px;
    }

    .rfc-sidebar .sidebar-user-avatar {
        display: grid;
        flex: 0 0 34px;
        width: 34px;
        height: 34px;
        place-items: center;
        border-radius: 50%;
        background: #dceeea;
        color: #0f766e;
        font-size: 14px;
    }

    .rfc-sidebar .sidebar-user-copy {
        display: grid;
        flex: 1 1 auto;
        gap: 2px;
        min-width: 0;
    }

    .rfc-sidebar .sidebar-user-label {
        color: #64748b;
        font-size: 10px;
        font-weight: 600;
        line-height: 1.2;
        text-transform: uppercase;
    }

    .rfc-sidebar .sidebar-user-card .user-name {
        display: block;
        min-width: 0;
        overflow: hidden;
        color: #1f2937;
        font-size: 14px;
        font-weight: 650;
        line-height: 1.35;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .rfc-sidebar .sidebar-user-chevron {
        flex: 0 0 auto;
        margin-left: auto;
        color: #94a3b8;
        font-size: 12px;
    }
}


/* =========================================================
   SECTION
========================================================= */

.rfc-sidebar-section {

    margin-top: 25px;
}

.rfc-sidebar-title {

    font-size: 11px;

    font-weight: 700;

    letter-spacing: 1px;

    color: #8a8a8a;

    margin-bottom: 8px;

    padding-left: 10px;
}


/* =========================================================
   LINKS
========================================================= */

.rfc-sidebar-link {

    position: relative;

    display: flex;

    align-items: center;

    gap: 13px;

    width: 100%;

    padding: 12px 13px;

    margin-bottom: 4px;

    border-radius: 11px;

    text-decoration: none;

    color: #333333;

    font-size: 14px;

    font-weight: 500;

    transition: all .2s ease;
}

.rfc-sidebar-link:hover {

    background: #f2f4f7;

    color: #111111;

}

.rfc-sidebar-link.active {

    background: #111111;

    color: #ffffff;

}

.rfc-sidebar-icon {

    width: 22px;

    text-align: center;

    font-size: 16px;
}

.rfc-sidebar-link:hover .rfc-sidebar-icon {

    color: #111111;

}


/* =========================================================
   BADGE
========================================================= */

.rfc-sidebar-badge {

    margin-left: auto;

    min-width: 20px;

    height: 20px;

    padding: 0 6px;

    border-radius: 10px;

    background: #dc3545;

    color: #ffffff;

    font-size: 11px;

    display: flex;

    align-items: center;

    justify-content: center;
}


/* =========================================================
   BOTTOM
========================================================= */

.rfc-sidebar-bottom {

    margin-top: 35px;

    padding-top: 15px;

    border-top: 1px solid #eeeeee;
}

.rfc-sidebar-link.rfc-logout {

    color: #dc3545;
}

.rfc-sidebar-link.rfc-logout:hover {

    background: #fff1f1;

    color: #dc3545;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 480px) {

    #sidebar-wrapper {

        width: 100%;

        max-width: 100%;
    }

    .rfc-sidebar {

        padding: 16px;
    }

    .rfc-sidebar-logo img {

        width: 140px;
    }

    .rfc-sidebar-link {

        padding: 14px;

        font-size: 15px;
    }
}

@media (min-width: 901px) {
    #sidebar-wrapper {
        top: 70px;
        width: 280px;
        max-width: none;
        height: calc(100vh - 70px);
        transform: translateX(0);
        z-index: 1020;
        box-shadow: none;
        border-right: 1px solid #e5e7eb;
    }

    #wrapper.sidebar-collapsed #sidebar-wrapper {
        transform: translateX(-100%);
    }

    html.rforcar-sidebar-collapsed #sidebar-wrapper {
        transform: translateX(-100%);
    }

    #wrapper.sidebar-open #sidebar-wrapper {
        transform: translateX(0);
    }

    #wrapper.sidebar-open #sidebar-overlay {
        display: none;
    }

    #sidebarToggle {
        display: flex;
    }

}