.layout {
    width: 100%;
    min-width: 0;
    background: transparent;
}

.sidebar {
    position: sticky;
    top: 0;
    width: 248px;
    min-height: 100vh;
    padding: 20px 16px;
    color: var(--sn-text);
    background: rgba(251, 249, 243, 0.78);
    border-right: 1px solid var(--sn-border);
    box-shadow: 1px 0 0 rgba(251, 249, 243, 0.55);
    backdrop-filter: blur(12px);
}

.brand {
    margin-bottom: 22px;
    padding: 3px 4px 18px;
    border-bottom: 1px solid rgba(217, 211, 194, 0.82);
}

.brand-title {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--sn-text);
    font-size: 17px;
    font-weight: 800;
    line-height: 1.2;
}

.brand-title::before {
    content: "SNS";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    border-radius: var(--sn-radius-sm);
    color: var(--sn-white);
    background: var(--sn-coral);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
}

.brand-subtitle {
    margin-top: 7px;
    padding-left: 42px;
    color: var(--sn-text-subtle);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nav {
    gap: 5px;
}

.nav a {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 36px;
    padding: 9px 11px;
    color: var(--sn-text-muted);
    border: 1px solid transparent;
    border-radius: var(--sn-radius-sm);
    font-size: 13px;
    font-weight: 650;
    line-height: 1.25;
    transition:
        color var(--sn-dur-base) var(--sn-ease),
        background var(--sn-dur-base) var(--sn-ease),
        border-color var(--sn-dur-base) var(--sn-ease);
}

.nav a:hover {
    color: var(--sn-text);
    background: rgba(234, 230, 216, 0.72);
    border-color: rgba(217, 211, 194, 0.82);
}

.sidebar .nav a.active,
.nav a.active {
    color: var(--sn-success-hover);
    background: var(--sn-success-soft);
    border-color: var(--sn-success-border);
}

.sidebar .nav a.active::before,
.nav a.active::before {
    content: "";
    position: absolute;
    left: -5px;
    top: 9px;
    bottom: 9px;
    width: 3px;
    border-radius: 99px;
    background: var(--sn-success);
}

.sidebar-footer {
    padding-top: 20px;
    color: var(--sn-text-subtle);
    font-size: 11px;
    line-height: 1.5;
}

.content {
    min-width: 0;
    max-width: 1440px;
    margin: 0 auto;
    padding: 26px 28px 36px;
}

.page-header {
    gap: 16px;
    margin-bottom: 16px;
}

.page-header h1 {
    color: var(--sn-text);
    font-size: 22px;
    font-weight: 800;
    line-height: 1.24;
    letter-spacing: 0;
}

.header-actions {
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.page-body {
    min-width: 0;
    padding: 22px;
    background: rgba(251, 249, 243, 0.9);
    border: 1px solid rgba(217, 211, 194, 0.86);
    border-radius: var(--sn-radius-lg);
    box-shadow: var(--sn-shadow-sm);
}

@media (max-width: 860px) {
    .layout {
        display: block;
    }

    .sidebar {
        position: relative;
        width: 100%;
        min-height: 0;
        padding: 14px 14px 12px;
        border-right: 0;
        border-bottom: 1px solid var(--sn-border);
    }

    .brand {
        margin-bottom: 12px;
        padding-bottom: 12px;
    }

    .brand-title {
        font-size: 16px;
    }

    .brand-subtitle {
        font-size: 10.5px;
    }

    .nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .nav a {
        min-height: 34px;
        padding: 8px 10px;
        font-size: 12.5px;
    }

    .nav a.active::before {
        display: none;
    }

    .sidebar-footer {
        margin-top: 12px;
        padding-top: 12px;
    }

    .content {
        padding: 18px 14px 28px;
    }

    .page-header {
        align-items: flex-start;
        margin-bottom: 12px;
    }

    .page-header h1 {
        font-size: 20px;
    }

    .header-actions {
        width: 100%;
        align-items: flex-start;
        justify-content: flex-start;
    }

    .page-body {
        padding: 16px;
        border-radius: var(--sn-radius-md);
    }
}

@media (max-width: 520px) {
    .nav {
        grid-template-columns: 1fr;
    }

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