﻿.portal-shell {
    min-height: 100vh;
    display: flex;
    background: #f4f7fb;
    color: #1f2937;
}

.portal-sidebar {
    width: 270px;
    background: #111827;
    color: #e5e7eb;
    display: flex;
    flex-direction: column;
    padding: 22px 18px 18px;
    box-sizing: border-box;
    transition: transform .25s ease;
}

.portal-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 26px;
}

.portal-brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portal-brand-title {
    font-size: 17px;
    font-weight: 600;
    color: #fff;
}

.portal-brand-subtitle {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 2px;
}

.portal-nav-section-title {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #6b7280;
    margin: 12px 8px 10px;
}

.portal-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.portal-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 10px;
    color: #d1d5db;
    text-decoration: none;
    transition: background .2s ease, color .2s ease;
}

    .portal-nav-link:hover {
        background: rgba(255,255,255,.06);
        color: #fff;
    }

    .portal-nav-link.active {
        background: #2563eb;
        color: #fff;
    }

.portal-nav-icon {
    font-size: 14px;
    line-height: 1;
}

.portal-sidebar-spacer {
    flex: 1;
}

.portal-user-card {
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 14px;
    padding: 12px;
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 20px;
}

.portal-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #374151;
    color: #fff;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portal-user-name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.portal-user-email {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 2px;
    word-break: break-word;
}

.portal-user-role {
    font-size: 11px;
    color: #60a5fa;
    margin-top: 4px;
}

.portal-sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.portal-theme-toggle,
.portal-logout-link {
    height: 38px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(255,255,255,.04);
    color: #e5e7eb;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
}

    .portal-theme-toggle:hover,
    .portal-logout-link:hover {
        background: rgba(255,255,255,.08);
    }

.portal-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.portal-topbar {
    height: 72px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 22px;
    box-sizing: border-box;
}

.portal-topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.portal-menu-toggle {
    display: none;
    width: 38px;
    height: 38px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    font-size: 18px;
}

.portal-topbar-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.portal-topbar-subtitle {
    font-size: 12px;
    color: #6b7280;
    margin-top: 3px;
}

.portal-topbar-user-name {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

.portal-content {
    padding: 24px;
    box-sizing: border-box;
}

body.dark .portal-shell {
    background: #0f172a;
    color: #e5e7eb;
}

body.dark .portal-topbar {
    background: #111827;
    border-bottom-color: #1f2937;
}

body.dark .portal-topbar-title {
    color: #f9fafb;
}

body.dark .portal-topbar-subtitle,
body.dark .portal-topbar-user-name {
    color: #9ca3af;
}

body.dark .portal-menu-toggle {
    background: #111827;
    border-color: #374151;
    color: #e5e7eb;
}

body.dark .portal-content {
    background: #0f172a;
}

@media (max-width: 991px) {
    .portal-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 1000;
        transform: translateX(-100%);
    }

        .portal-sidebar.open {
            transform: translateX(0);
        }

    .portal-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .portal-content {
        padding: 18px;
    }
}
