:root {
    color-scheme: light;
    --background: #f5f7fb;
    --border: #dfe4ec;
    --focus: #7c3aed;
    --ink: #182230;
    --muted: #667085;
    --panel: #ffffff;
    --sidebar: #111827;
    --sidebar-active: #7c3aed;
    --sidebar-expanded: 272px;
    --sidebar-collapsed: 72px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--background);
    color: var(--ink);
    font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

button,
a {
    font: inherit;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

.sidebar {
    position: fixed;
    z-index: 30;
    inset: 0 auto 0 0;
    display: flex;
    width: var(--sidebar-expanded);
    flex-direction: column;
    overflow: hidden;
    background: var(--sidebar);
    color: #ffffff;
    transition: width 180ms ease, transform 180ms ease;
}

.brand {
    display: flex;
    min-height: 72px;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.brand-mark,
.navigation-marker {
    display: grid;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 9px;
    background: var(--sidebar-active);
    color: #ffffff;
    font-weight: 700;
}

.navigation {
    padding: 14px 12px;
}

.navigation ul {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.navigation-link {
    display: flex;
    min-height: 48px;
    align-items: center;
    gap: 12px;
    border-radius: 10px;
    padding: 8px 12px;
    color: #cbd5e1;
    text-decoration: none;
    white-space: nowrap;
}

.navigation-link:hover {
    background: #1f2937;
    color: #ffffff;
}

.navigation-link.is-active {
    background: #2d2251;
    color: #ffffff;
}

.navigation-link.is-active .navigation-marker {
    background: #8b5cf6;
}

.application-frame {
    min-height: 100vh;
    margin-left: var(--sidebar-expanded);
    transition: margin-left 180ms ease;
}

.application-header {
    position: sticky;
    z-index: 20;
    top: 0;
    display: flex;
    min-height: 72px;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    padding: 0 28px;
    background: rgb(255 255 255 / 94%);
    backdrop-filter: blur(12px);
}

.menu-button {
    display: grid;
    width: 44px;
    height: 44px;
    place-content: center;
    gap: 5px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #ffffff;
    color: var(--ink);
    cursor: pointer;
}

.menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: currentcolor;
}

.header-title {
    font-weight: 650;
}

.content {
    padding: 48px 28px;
}

.content-panel {
    width: min(100%, 920px);
    min-height: 320px;
    margin: 0 auto;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: clamp(28px, 6vw, 64px);
    background: var(--panel);
    box-shadow: 0 18px 50px rgb(16 24 40 / 6%);
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--sidebar-active);
    font-size: 13px;
    font-weight: 750;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-size: clamp(32px, 5vw, 48px);
    letter-spacing: -0.04em;
}

.content-panel > p:last-child {
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.6;
}

.sidebar-backdrop {
    display: none;
}

body.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed);
}

body.sidebar-collapsed .application-frame {
    margin-left: var(--sidebar-collapsed);
}

body.sidebar-collapsed .brand {
    justify-content: center;
    padding-inline: 0;
}

body.sidebar-collapsed .brand-name,
body.sidebar-collapsed .navigation-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

body.sidebar-collapsed .navigation-link {
    justify-content: center;
    padding-inline: 0;
}

@media (max-width: 767px) {
    .sidebar {
        width: min(var(--sidebar-expanded), 86vw);
        transform: translateX(-100%);
        box-shadow: 18px 0 48px rgb(15 23 42 / 22%);
    }

    .application-frame,
    body.sidebar-collapsed .application-frame {
        margin-left: 0;
    }

    .application-header {
        padding-inline: 18px;
    }

    .content {
        padding: 28px 18px;
    }

    .content-panel {
        min-height: 260px;
        border-radius: 14px;
    }

    body.sidebar-open {
        overflow: hidden;
    }

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

    .sidebar-backdrop {
        position: fixed;
        z-index: 25;
        inset: 0;
        display: block;
        width: 100%;
        height: 100%;
        border: 0;
        padding: 0;
        background: rgb(15 23 42 / 48%);
        cursor: default;
    }

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

@media (prefers-reduced-motion: reduce) {
    .sidebar,
    .application-frame {
        transition: none;
    }
}
