:root {
    color-scheme: dark;
    --bg: #07040a;
    --bg-2: #0e0711;
    --panel: rgba(18, 12, 24, 0.86);
    --panel-strong: rgba(31, 17, 39, 0.92);
    --panel-soft: rgba(255, 255, 255, 0.045);
    --text: #fbf4ff;
    --muted: #b8a8c0;
    --faint: #756579;
    --accent: #A63E6A;
    --accent-2: #6f2b79;
    --accent-3: #e06aa2;
    --accent-glow: rgba(166, 62, 106, 0.34);
    --border: rgba(255, 255, 255, 0.09);
    --success: #5ee59a;
    --danger: #ff607d;
    --warning: #ffc05f;
    --info: #b89cff;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    min-height: 100%;
    background:
        radial-gradient(circle at 12% 10%, rgba(166, 62, 106, 0.28), transparent 26%),
        radial-gradient(circle at 90% 8%, rgba(111, 43, 121, 0.22), transparent 26%),
        radial-gradient(circle at 70% 92%, rgba(166, 62, 106, 0.12), transparent 34%),
        linear-gradient(135deg, var(--bg) 0%, #050208 55%, var(--bg-2) 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    overflow: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,0.024) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.024) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.7), transparent 72%);
}

.app-shell {
    display: grid;
    grid-template-columns: 292px 1fr;
    min-height: 100vh;
    position: relative;
}

.sidebar {
    background: linear-gradient(180deg, rgba(20, 11, 27, 0.94), rgba(9, 5, 13, 0.98));
    border-right: 1px solid rgba(255, 255, 255, 0.075);
    padding: 26px 20px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    backdrop-filter: blur(18px);
}

.brand-card {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background:
        linear-gradient(145deg, rgba(166, 62, 106, 0.17), rgba(255,255,255,0.035)),
        rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255,255,255,0.09);
    padding: 22px;
    box-shadow: 0 24px 80px rgba(166, 62, 106, 0.16);
}

.brand-card::after {
    content: "";
    position: absolute;
    width: 130px;
    height: 130px;
    right: -60px;
    top: -60px;
    border-radius: 999px;
    background: rgba(166, 62, 106, 0.32);
    filter: blur(18px);
}

.brand-top {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.brand-logo-wrap {
    width: 60px;
    height: 60px;
    border-radius: 20px;
    background: linear-gradient(135deg, #d95f96, #A63E6A 45%, #421449);
    display: grid;
    place-items: center;
    box-shadow: 0 0 34px rgba(166, 62, 106, 0.36);
}

.brand-logo {
    font-size: 29px;
    font-weight: 900;
    color: white;
    text-shadow: 0 2px 18px rgba(0,0,0,0.35);
}

.brand-title {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.brand-subtitle {
    margin-top: 4px;
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.nav-group {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.nav-label {
    padding-left: 6px;
    font-size: 11px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--faint);
}

#sidebar-nav {
    display: grid;
    gap: 10px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 16px;
    border-radius: 18px;
    color: var(--text);
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    border: 1px solid transparent;
    user-select: none;
}

.nav-item:hover {
    transform: translateX(3px);
    background: rgba(166, 62, 106, 0.12);
    border-color: rgba(255,255,255,0.06);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(166, 62, 106, 0.26), rgba(111, 43, 121, 0.14));
    border-color: rgba(166, 62, 106, 0.4);
    box-shadow: 0 12px 38px rgba(166, 62, 106, 0.16);
}

.nav-icon {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: rgba(255,255,255,0.055);
    font-size: 15px;
}

.main-content {
    padding: 32px;
    overflow-y: auto;
    max-height: 100vh;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.page-title {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -0.055em;
}

.page-description {
    margin-top: 8px;
    color: var(--muted);
    max-width: 560px;
    line-height: 1.6;
}

.page {
    animation: fadeIn 0.24s ease;
}

@keyframes fadeIn {
    from {opacity: 0; transform: translateY(10px);}
    to {opacity: 1; transform: translateY(0);}
}

@media (max-width: 860px) {
    body {
        overflow: auto;
    }

    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: sticky;
        top: 0;
        z-index: 20;
        padding: 16px;
    }

    .brand-card {
        padding: 16px;
    }

    .nav-group {
        gap: 10px;
    }

    #sidebar-nav {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }

    .main-content {
        max-height: none;
        padding: 18px;
        overflow: visible;
    }
}
