:root {
    --portal-sidebar-width: 268px;
    --portal-sidebar-bg: #0f172a;
    --portal-sidebar-hover: #1e293b;
    --portal-sidebar-active: #2563eb;
    --portal-topbar-height: 64px;
    --portal-bg: #f1f5f9;
    --portal-card-border: #e2e8f0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--portal-bg);
    color: #0f172a;
    overflow-x: hidden;
}

.portal-wrapper {
    display: flex;
    min-height: 100vh;
}

.portal-sidebar {
    width: var(--portal-sidebar-width);
    background-color: var(--portal-sidebar-bg);
    color: #cbd5e1;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, width 0.25s ease;
    z-index: 1040;
}

.portal-brand {
    height: var(--portal-topbar-height);
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    text-decoration: none;
}

.portal-brand-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #fff;
    flex-shrink: 0;
}

.portal-sidebar-nav {
    padding: 1rem 0.75rem;
    flex-grow: 1;
    overflow-y: auto;
}

.portal-nav-section {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    padding: 0.75rem 0.75rem 0.35rem;
}

.portal-nav-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.75rem;
    border-radius: 0.5rem;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background-color 0.15s ease, color 0.15s ease;
    margin-bottom: 0.15rem;
}

.portal-nav-link:hover {
    background-color: var(--portal-sidebar-hover);
    color: #fff;
}

.portal-nav-link.active {
    background-color: var(--portal-sidebar-active);
    color: #fff;
}

.portal-nav-link.disabled-phase {
    opacity: 0.55;
    cursor: not-allowed;
}

.portal-main {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

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

.portal-content {
    padding: 1.5rem;
    flex-grow: 1;
}

.portal-card {
    background: #ffffff;
    border: 1px solid var(--portal-card-border);
    border-radius: 0.75rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.portal-stat-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.portal-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.auth-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

@media (max-width: 991.98px) {
    .portal-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        transform: translateX(-100%);
    }

    .portal-sidebar.show {
        transform: translateX(0);
    }

    .portal-sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.5);
        z-index: 1035;
    }

    .portal-sidebar-backdrop.show {
        display: block;
    }
}
