.admin-drawer-toggle {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--admin-text);
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 36px;
    height: 36px;
    justify-content: center;
    padding: 0;
}

.admin-drawer-toggle:hover {
    background: var(--admin-surface-muted);
    border-radius: var(--admin-radius);
}

.admin-drawer-toggle:focus-visible,
.admin-drawer__close:focus-visible,
.admin-drawer-backdrop:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.admin-drawer-toggle__icon {
    display: flex;
    height: 1.25rem;
    stroke-width: 1.8;
    width: 1.25rem;
}

.admin-drawer {
    background: var(--admin-surface);
    box-shadow: var(--admin-shadow);
    display: flex;
    flex-direction: column;
    block-size: 100vh;
    block-size: 100dvh;
    inset-block: 0;
    inset-inline-start: 0;
    max-width: calc(100vw - 32px);
    overflow: hidden;
    position: fixed;
    translate: -105% 0;
    transition: translate 180ms ease;
    visibility: hidden;
    inline-size: 20rem;
    z-index: 1201;
}

.admin-drawer.is-open {
    translate: 0;
    visibility: visible;
}

.admin-drawer__header {
    align-items: center;
    border-bottom: 1px solid var(--admin-border);
    display: flex;
    justify-content: space-between;
    min-block-size: 3.5rem;
    padding: 8px 20px;
}

.admin-drawer__brand {
    align-items: center;
    display: flex;
    gap: 0.625rem;
    min-inline-size: 0;
}

.admin-drawer__brand img {
    block-size: 1.75rem;
    display: block;
    flex: 0 0 1.75rem;
    inline-size: 1.75rem;
}

.admin-drawer__brand strong {
    color: var(--admin-text);
    font-size: 0.95rem;
    font-weight: 650;
    line-height: 1.2;
}

.admin-drawer__close {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--admin-text);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    height: 2rem;
    justify-content: center;
    padding: 0;
    width: 2rem;
}

.admin-drawer__close svg {
    block-size: 1rem;
    inline-size: 1rem;
    stroke-width: 1.8;
}

.admin-drawer__environment {
    flex: 0 0 auto;
    padding: 1rem 1.25rem;
}

.admin-drawer__environment-heading {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    margin-block-end: 0.75rem;
}

.admin-drawer__environment-icon {
    block-size: 1.25rem;
    color: var(--admin-brand);
    flex: 0 0 1.25rem;
    inline-size: 1.25rem;
    stroke-width: 1.8;
}

.admin-drawer__environment-copy {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-inline-size: 0;
}

.admin-drawer__environment-copy label {
    color: var(--admin-text);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
}

.admin-drawer__environment-copy span {
    color: var(--admin-muted);
    font-size: 0.75rem;
    line-height: 1.35;
}

.admin-drawer__environment-select {
    appearance: none;
    background-color: var(--admin-surface);
    background-image: linear-gradient(45deg, transparent 50%, var(--admin-muted) 50%), linear-gradient(135deg, var(--admin-muted) 50%, transparent 50%);
    background-position: calc(100% - 1rem) 50%, calc(100% - 0.72rem) 50%;
    background-repeat: no-repeat;
    background-size: 0.3rem 0.3rem, 0.3rem 0.3rem;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    color: var(--admin-text);
    cursor: pointer;
    font: inherit;
    font-size: 0.875rem;
    min-block-size: 2.5rem;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    width: 100%;
}

.admin-drawer__environment-select:focus-visible {
    border-color: var(--admin-brand);
    outline: 2px solid color-mix(in srgb, var(--admin-brand) 18%, transparent);
    outline-offset: 1px;
}

.admin-drawer__environment-select option {
    background: var(--admin-surface);
    color: var(--admin-text);
}

.admin-drawer__nav {
    flex: 1 1 auto;
    min-block-size: 0;
    overflow-y: auto;
    padding: 12px 0 24px;
}

.admin-drawer__footer {
    background: var(--admin-surface);
    border-block-start: 1px solid var(--admin-border);
    flex: 0 0 auto;
}

.admin-drawer__section {
    margin-block-start: 0.5rem;
}

.admin-drawer__section-title {
    align-items: center;
    background: transparent;
    border-block-start: 1px solid var(--admin-border-soft);
    color: var(--admin-muted);
    display: flex;
    font-size: 0.675rem;
    font-weight: 700;
    justify-content: space-between;
    letter-spacing: 0.07em;
    margin: 0;
    padding: 0.85rem 1.25rem 0.4rem;
    text-transform: uppercase;
}

.admin-drawer__context {
    background: var(--admin-brand-soft);
    border-radius: 999px;
    color: var(--admin-brand-strong);
    letter-spacing: normal;
    max-inline-size: 55%;
    overflow: hidden;
    padding: 3px 9px;
    text-overflow: ellipsis;
    text-transform: none;
    white-space: nowrap;
}

.admin-drawer__item {
    align-items: center;
    color: var(--admin-text);
    display: flex;
    font-size: 0.875rem;
    gap: 0.75rem;
    padding: 0.7rem 1.25rem;
    text-decoration: none;
}

.admin-drawer__icon {
    block-size: 1.125rem;
    color: var(--admin-muted);
    flex: 0 0 1.125rem;
    inline-size: 1.125rem;
    stroke-width: 1.8;
}

.admin-drawer__item:hover,
.admin-drawer__item.is-current {
    background: var(--admin-brand-soft);
    color: var(--admin-brand-strong);
}

.admin-drawer__item.is-current {
    font-weight: 700;
}

.admin-drawer__item.is-current .admin-drawer__icon {
    color: var(--admin-brand);
}

.admin-drawer-backdrop {
    background: rgb(15 25 30 / 38%);
    border: 0;
    inset: 0;
    padding: 0;
    position: fixed;
    z-index: 1200;
}

.admin-drawer-backdrop[hidden] {
    display: none;
}

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

@media (prefers-reduced-motion: reduce) {
    .admin-drawer {
        transition: none;
    }
}
