:root {
    --primary: #5c55ff;
    --primary-2: #7671ff;
    --primary-soft: rgba(92, 85, 255, 0.12);
    --text: #11214c;
    --text-soft: #5d6b89;
    --white: #ffffff;
    --glass: rgba(246, 249, 255, 0.62);
    --glass-strong: rgba(255, 255, 255, 0.78);
    --glass-border: rgba(255, 255, 255, 0.76);
    --card-border: rgba(117, 136, 177, 0.14);
    --shadow: 0 20px 55px rgba(45, 65, 105, 0.12);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 17px;
    --sidebar-width: 286px;
    --transition: 180ms ease;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background: #dce5f2;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(rgba(226, 235, 247, 0.54), rgba(213, 226, 242, 0.52)),
        url('../img/background.jpg') center / cover no-repeat;
    filter: saturate(0.72);
    transform: scale(1.015);
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(circle at 78% 8%, rgba(255,255,255,.68), transparent 27%),
        linear-gradient(110deg, rgba(180,199,226,.14), rgba(255,255,255,.03));
}

button,
input,
a {
    font: inherit;
}

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

button {
    color: inherit;
}

svg {
    width: 1em;
    height: 1em;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.glass-panel {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
    backdrop-filter: blur(22px) saturate(1.15);
    -webkit-backdrop-filter: blur(22px) saturate(1.15);
}

.app-shell {
    width: min(1720px, 100%);
    min-height: 100vh;
    margin: 0 auto;
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    gap: 28px;
    padding: 24px;
}

.app-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.sidebar {
    position: sticky;
    top: 24px;
    height: calc(100vh - 48px);
    min-height: 670px;
    border-radius: var(--radius-xl);
    padding: 30px 22px 22px;
    display: flex;
    flex-direction: column;
    overflow: auto;
    scrollbar-width: none;
    z-index: 30;
}

.sidebar::-webkit-scrollbar {
    display: none;
}

.sidebar-close {
    display: none;
    position: absolute;
    right: 15px;
    top: 10px;
    border: 0;
    background: transparent;
    font-size: 30px;
    cursor: pointer;
}

.sidebar-profile {
    text-align: center;
    padding: 4px 0 23px;
}

.sidebar-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    object-position: 50% 25%;
    border: 4px solid rgba(255,255,255,.62);
    box-shadow: 0 11px 26px rgba(39, 55, 91, .13);
}

.sidebar-profile h2 {
    margin: 14px 0 3px;
    font-size: 22px;
    letter-spacing: -0.03em;
}

.sidebar-profile p {
    margin: 0;
    color: var(--text-soft);
    font-size: 14px;
}

.sidebar-nav {
    display: grid;
    gap: 7px;
}

.sidebar-link {
    min-height: 52px;
    padding: 0 17px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 14px;
    color: #465776;
    transition: background var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.sidebar-link:hover {
    background: rgba(255,255,255,.46);
    color: var(--text);
    transform: translateX(2px);
}

.sidebar-link.is-active {
    color: #fff;
    background: linear-gradient(135deg, var(--primary-2), #5149f5);
    box-shadow: 0 12px 26px rgba(83, 74, 244, .23);
}

.nav-icon {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    font-size: 22px;
}

.sidebar-bottom {
    margin-top: auto;
    padding-top: 30px;
}

.sidebar-quote {
    margin: 0 0 22px;
    padding: 18px 14px;
    text-align: center;
    border: 1px solid rgba(255,255,255,.45);
    border-radius: 16px;
    background: rgba(255,255,255,.18);
    color: #66738f;
    font-size: 12px;
}

.sidebar-quote p {
    margin: 0 0 7px;
}

.sidebar-quote cite {
    font-style: normal;
}

.social-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 9px;
    margin-bottom: 24px;
}

.social-links a {
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(255,255,255,.28);
    border: 1px solid rgba(255,255,255,.38);
    color: #74829e;
    font-size: 20px;
    transition: transform var(--transition), background var(--transition), color var(--transition);
}

.social-links a:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,.58);
    color: var(--primary);
}

.sidebar-footer {
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,.45);
    display: grid;
    gap: 2px;
    color: #677591;
    font-size: 11px;
}

.topbar {
    min-height: 72px;
    border-radius: 20px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.mobile-menu-button {
    display: none;
    width: 43px;
    height: 43px;
    flex: 0 0 43px;
    place-items: center;
    border-radius: 13px;
    border: 1px solid rgba(112, 130, 172, .15);
    background: rgba(255,255,255,.45);
    cursor: pointer;
    font-size: 23px;
}

.topbar-search {
    width: min(720px, 100%);
    height: 49px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 14px;
    border: 1px solid rgba(108, 127, 167, .14);
    border-radius: 14px;
    background: rgba(255,255,255,.42);
}

.topbar-search > svg {
    flex: 0 0 23px;
    font-size: 23px;
    color: #425476;
}

.topbar-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
}

.topbar-search input::placeholder {
    color: #74819a;
}

.search-shortcut {
    padding: 4px 7px;
    border: 1px solid rgba(99, 117, 157, .15);
    border-radius: 7px;
    background: rgba(255,255,255,.48);
    color: #60708f;
    font-size: 11px;
}

.topbar-profile {
    margin-left: auto;
    min-width: 184px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding-right: 2px;
}

.topbar-profile img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    object-position: 50% 25%;
}

.topbar-profile-copy {
    display: grid;
}

.topbar-profile-copy strong {
    font-size: 13px;
}

.topbar-profile-copy small {
    color: #24a56f;
    font-size: 11px;
}

.availability-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #28bb7b;
    box-shadow: 0 0 0 4px rgba(40, 187, 123, .08);
}

.simple-page {
    border-radius: var(--radius-xl);
    padding: clamp(28px, 5vw, 70px);
    min-height: 460px;
}

.simple-page-kicker {
    display: inline-flex;
    margin-bottom: 9px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.simple-page h1 {
    margin: 0 0 10px;
    font-size: clamp(34px, 5vw, 54px);
    letter-spacing: -.04em;
}

.simple-page p {
    max-width: 680px;
    margin: 0;
    color: var(--text-soft);
}

.sidebar-backdrop {
    display: none;
}

@media (max-width: 1100px) {
    .app-shell {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .sidebar {
        position: fixed;
        left: 16px;
        top: 16px;
        bottom: 16px;
        width: min(300px, calc(100vw - 32px));
        height: auto;
        min-height: 0;
        transform: translateX(calc(-100% - 32px));
        transition: transform 240ms ease;
    }

    body.sidebar-open {
        overflow: hidden;
    }

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

    .sidebar-close {
        display: block;
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 20;
        background: rgba(18, 29, 50, .32);
        backdrop-filter: blur(3px);
    }

    body.sidebar-open .sidebar-backdrop {
        display: block;
    }

    .mobile-menu-button {
        display: grid;
    }
}

@media (max-width: 700px) {
    .app-shell {
        padding: 10px;
        gap: 12px;
    }

    .app-main {
        gap: 12px;
    }

    .topbar {
        min-height: 62px;
        padding: 8px;
        gap: 8px;
        border-radius: 17px;
    }

    .topbar-search {
        height: 44px;
        border: 0;
        background: transparent;
        padding: 0 5px;
    }

    .search-shortcut,
    .topbar-profile-copy,
    .availability-dot {
        display: none;
    }

    .topbar-profile {
        min-width: 42px;
        width: 42px;
        margin-left: 0;
    }

    .topbar-profile img {
        width: 38px;
        height: 38px;
    }
}
