/* Portal Layout & UI styles */
:root {
    --purple-primary: #9828c8;
    --purple-dark: #6d28d9;
    --purple-light: #f3e8ff;
    --bg-canvas: #f8f7fb;
    --card-bg: #ffffff;
    --text-main: #1e1731;
    --text-muted: #716b80;
    --border-color: #e9e5ef;
    --sidebar-width: 260px;
    --header-height: 68px;
}

.portal-wrapper {
    display: flex;
    min-height: 100vh;
    background: var(--bg-canvas);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
}

/* Sidebar */
.portal-sidebar {
    width: var(--sidebar-width);
    background: #ffffff;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
    height: 38px;
}

.sidebar-nav {
    flex: 1;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-muted);
    padding: 12px 12px 6px 12px;
    text-transform: uppercase;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s;
}

.nav-item:hover {
    background: var(--purple-light);
    color: var(--purple-primary);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--purple-primary), var(--purple-dark));
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(152, 40, 200, 0.25);
}

.nav-item.active svg {
    stroke: #ffffff;
}

.sidebar-user {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    background: #faf9fd;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.user-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.user-code {
    font-size: 11px;
    font-weight: 600;
    color: var(--purple-primary);
}

/* Main Content Area */
.portal-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.portal-topbar {
    height: var(--header-height);
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 90;
}

.topbar-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-logout:hover {
    border-color: #dc2626;
    color: #dc2626;
    background: #fef2f2;
}

.portal-body {
    flex: 1;
    padding: 32px;
}

@media (max-width: 900px) {
    .portal-sidebar {
        transform: translateX(-100%);
    }
    .portal-sidebar.open {
        transform: translateX(0);
    }
    .portal-main {
        margin-left: 0;
    }
}
