








:root {
    --sd-width: 320px;
    --sd-teal: #4B778D;
    --sd-teal-dark: #2F5468;
    --sd-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --sd-dur: 0.42s;
}

 
@media (min-width: 993px) {
    .site-drawer,
    .site-drawer-scrim {
        display: none !important;
    }
}

 
.site-drawer-scrim {
    position: fixed;
    inset: 0;
    background: rgba(8, 15, 26, 0.45);
    backdrop-filter: blur(2px);
    opacity: 0;
    z-index: 1100;
    transition: opacity 0.35s ease, visibility 0s linear 0.35s;
    visibility: hidden;
}

.site-drawer-scrim.visible {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.35s ease, visibility 0s linear 0s;
}

 
.site-drawer {
    position: fixed;
    top: 0;
    right: 0;
    left: auto;
    bottom: 0;
    width: var(--sd-width);
    max-width: 86vw;

    background: #FFFFFF;
    border-left: 1px solid #E4E9ED;
    border-right: none;

    display: flex;
    flex-direction: column;
    padding: 22px 0 20px;

     
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;

    z-index: 1200;
    overflow-y: auto;
    overscroll-behavior: contain;

    box-shadow: none;
    transition:
        transform var(--sd-dur) var(--sd-ease),
        opacity 0.32s ease,
        visibility 0s linear var(--sd-dur),
        box-shadow var(--sd-dur) var(--sd-ease);
    will-change: transform, opacity;
}

.site-drawer.open {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    box-shadow: -18px 0 48px rgba(0, 0, 0, 0.16);
    transition:
        transform var(--sd-dur) var(--sd-ease),
        opacity 0.32s ease,
        visibility 0s linear 0s,
        box-shadow var(--sd-dur) var(--sd-ease);
}

body.dark-mode .site-drawer {
    background: #0D1521;
    border-left-color: #223046;
    border-right-color: transparent;
}

 
body.site-drawer-open {
    overflow: hidden;
}

 
body.site-drawer-open header {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(-100%) !important;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease, visibility 0.25s ease !important;
}

@media (min-width: 993px) {
    body.site-drawer-open header {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: none !important;
    }
}

 
.site-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px 12px;
    border-bottom: 1px solid #EEF2F4;
    margin-bottom: 12px;
}

body.dark-mode .site-drawer__head { border-bottom-color: #1E2A3A; }

.site-drawer__head-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

 
.site-drawer__head-actions .theme-toggle {
    margin: 0;
    transform: scale(0.85);
    transform-origin: center;
}

.site-drawer__close {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: #64748B;
    border-radius: 10px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.site-drawer__close:hover {
    background: #F1F4F6;
    color: var(--sd-teal-dark);
}

 
.site-drawer__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    min-width: 0;
}

.site-drawer__brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--sd-teal) 0%, var(--sd-teal-dark) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.site-drawer__brand-text { display: flex; flex-direction: column; min-width: 0; }

.site-drawer__brand-text strong {
    font-size: 18px;
    color: var(--sd-teal-dark);
    letter-spacing: -0.2px;
}

body.dark-mode .site-drawer__brand-text strong { color: #DCE7EE; }

.site-drawer__brand-text small {
    font-size: 11px;
    color: #8A9BA6;
    margin-top: 1px;
}

 
.site-drawer__menu {
    list-style: none;
    margin: 0;
    padding: 0 14px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}

.site-drawer__link {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 13px 14px;
    border: none;
    background: transparent;
    border-radius: 12px;
    color: #334A5A;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    text-align: right;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    transition: background 0.3s ease, color 0.3s ease, padding-inline-start 0.3s var(--sd-ease);
}

.site-drawer__link > i:first-child {
    width: 22px;
    text-align: center;
    font-size: 16px;
    color: var(--sd-teal);
    flex-shrink: 0;
    transition: transform 0.3s var(--sd-ease), color 0.3s ease;
}

body.dark-mode .site-drawer__link { color: #C7D4DE; }
body.dark-mode .site-drawer__link > i:first-child { color: #7FB2C6; }

 
.site-drawer__link::before {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    top: 50%;
    width: 3px;
    height: 0;
    border-radius: 3px 0 0 3px;
    background: var(--sd-teal);
    transform: translateY(-50%);
    transition: height 0.3s var(--sd-ease);
}

.site-drawer__link:hover::before,
.site-drawer__link:focus-visible::before {
    height: 60%;
}

.site-drawer__link:hover,
.site-drawer__link:focus-visible {
    background: #E8F1F5;
    color: var(--sd-teal-dark);
    padding-inline-start: 20px;
    outline: none;
}

.site-drawer__link:hover > i:first-child {
    transform: scale(1.08);
}

body.dark-mode .site-drawer__link:hover,
body.dark-mode .site-drawer__link:focus-visible {
    background: #16222F;
    color: #EAF3F8;
}

 
.site-drawer__bottom {
    padding: 16px 14px 0;
    margin-top: 14px;
    border-top: 1px solid #EEF2F4;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

body.dark-mode .site-drawer__bottom { border-top-color: #1E2A3A; }

.site-drawer__cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--sd-teal) 0%, var(--sd-teal-dark) 100%);
    color: #fff;
    text-decoration: none;
    font-size: 14.5px;
    font-weight: 700;
    transition: transform 0.3s var(--sd-ease), box-shadow 0.3s ease;
    box-shadow: 0 4px 14px rgba(79, 119, 141, 0.24);
}

.site-drawer__cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(79, 119, 141, 0.32);
}

.site-drawer__cta--ghost {
    background: transparent;
    color: var(--sd-teal-dark);
    border: 1px solid #D8E0E6;
    box-shadow: none;
}

body.dark-mode .site-drawer__cta--ghost {
    color: #CFE0E9;
    border-color: #2A3A4C;
}

 
.site-drawer__user-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #F1F5F9;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    margin-bottom: 4px;
}

.site-drawer__user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--sd-teal), #28B5B5);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.site-drawer__user-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.site-drawer__user-name {
    font-size: 13.5px;
    font-weight: 800;
    color: #1E293B;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-drawer__user-role {
    font-size: 11px;
    font-weight: 700;
    color: var(--sd-teal);
}

body.dark-mode .site-drawer__user-box {
    background: #141D2B;
    border-color: #223046;
}

body.dark-mode .site-drawer__user-name {
    color: #E2E8F0;
}

body.dark-mode .site-drawer__user-role {
    color: #5EEAD4;
}

.site-drawer__cta--logout {
    background: #FEE2E2 !important;
    color: #EF4444 !important;
    border: 1px solid #FECACA !important;
    box-shadow: none !important;
}

.site-drawer__cta--logout:hover {
    background: #EF4444 !important;
    color: #FFFFFF !important;
}

body.dark-mode .site-drawer__cta--logout {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #F87171 !important;
    border-color: rgba(239, 68, 68, 0.35) !important;
}

body.dark-mode .site-drawer__cta--logout:hover {
    background: #EF4444 !important;
    color: #FFFFFF !important;
}

 
@media (prefers-reduced-motion: reduce) {
    .site-drawer,
    .site-drawer-scrim,
    .site-drawer__link,
    .site-drawer__cta {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}