:root {
    color-scheme: light;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-synthesis: none;
    color: #202c46;
    background: #edeef3;
    --sidebar-width: 224px;
    --sidebar-background: #252735;
    --sidebar-muted: #a3a8be;
    --accent: #23c875;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

a:focus-visible,
button.nav-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -3px;
    border-radius: 4px;
}

.app-shell {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    min-height: 100vh;
    min-height: 100dvh;
}

.sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    color: var(--sidebar-muted);
    background: var(--sidebar-background);
}

.sidebar-header {
    flex-shrink: 0;
    padding: 22px 24px;
    background: #2d3041;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
}

.brand-mark {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.brand-name {
    font-size: 19px;
    font-weight: 650;
    letter-spacing: -0.4px;
}

.brand-caption {
    color: #aeb3cb;
    font-size: 11px;
    letter-spacing: 0.3px;
}

.main-nav {
    padding: 24px 0;
}

.nav-search {
    position: relative;
    margin: 0 16px 16px;
}

.nav-search input[type="search"] {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 10px 40px 10px 12px;
    border: 1px solid #45495e;
    border-radius: 6px;
    color: #fff;
    background: #2d3041;
    font: inherit;
    font-size: 14px;
}

.nav-search input::placeholder {
    color: var(--sidebar-muted);
    opacity: 1;
}

.nav-search input::-webkit-search-cancel-button,
.nav-search input::-webkit-search-decoration {
    -webkit-appearance: none;
}

.nav-search-submit {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    color: #fff;
    background: transparent;
    cursor: pointer;
}

.nav-search-submit:hover {
    background: #45495e;
}

.nav-search-submit svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: var(--sidebar-muted);
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-search input:focus-visible,
.nav-search-submit:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.nav-list,
.subnav {
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-item + .nav-item {
    margin-top: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 46px;
    padding: 12px 24px;
    border: 0;
    border-left: 3px solid transparent;
    color: inherit;
    background: transparent;
    font-family: inherit;
    font-size: 14px;
    line-height: 20px;
    transition: color 120ms ease, background-color 120ms ease;
}

button.nav-link {
    appearance: none;
    width: 100%;
    margin: 0;
    text-align: start;
    cursor: pointer;
}

.nav-link:hover {
    color: #fff;
    background: #2d3041;
}

.is-active > .nav-link {
    border-left-color: var(--accent);
    color: #fff;
    background: #1e202d;
    font-weight: 600;
}

.nav-icon,
.subnav-icon {
    flex-shrink: 0;
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.is-active > .nav-link .nav-icon {
    color: var(--accent);
}

.subnav {
    padding: 7px 16px 10px 49px;
}

.subnav a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 4px;
    color: var(--sidebar-muted);
    font-size: 13px;
    line-height: 20px;
}

.subnav a:hover {
    color: #fff;
    background: #2d3041;
}

.subnav a[aria-current] {
    color: var(--accent);
    background: #293a38;
}

.subnav-icon {
    width: 16px;
    height: 16px;
}

.sidebar-footer {
    margin-top: auto;
    padding: 20px 24px;
    border-top: 1px solid #343747;
    color: #a3a8be;
    font-size: 11px;
    line-height: 18px;
}

.page-body {
    min-width: 0;
    padding: 32px;
}

.skip-link {
    position: fixed;
    z-index: 10;
    top: 8px;
    left: 8px;
    padding: 12px 16px;
    color: #202c46;
    background: #fff;
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: translateY(0);
}

@media (max-width: 600px) {
    :root {
        --sidebar-width: 68px;
    }

    .sidebar-header {
        padding: 22px 19px;
    }

    .nav-search {
        margin-right: 6px;
        margin-left: 6px;
    }

    .nav-search input[type="search"] {
        padding: 10px 3px;
        font-size: 11px;
    }

    .nav-search input:not(:placeholder-shown) {
        padding-right: 22px;
    }

    .nav-search-submit {
        width: 22px;
    }

    .nav-search-submit svg {
        width: 16px;
        height: 16px;
    }

    .nav-search input:placeholder-shown + .nav-search-submit {
        visibility: hidden;
    }

    .brand-text,
    .nav-label,
    .sidebar-footer {
        display: none;
    }

    .nav-link {
        justify-content: center;
        min-height: 48px;
        padding: 12px 0;
        padding-right: 3px;
    }

    .subnav {
        padding: 6px 10px 10px;
    }

    .subnav a {
        justify-content: center;
        min-height: 42px;
        padding: 10px;
    }

    .page-body {
        padding: 20px;
    }
}

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