:root {
    --driver-navy: #041c2c;
    --driver-navy-soft: #0b2d40;
    --driver-green: #006b4f;
    --driver-green-dark: #004e3a;
    --driver-gold: #f5b400;
    --driver-page: #f4f7fa;
    --driver-border: #e3e8ef;
    --driver-text: #101828;
    --driver-muted: #667085;
}

body {
    background: var(--driver-page);
}

body .driver-portal-shell {
    min-height: calc(100vh - 42px);
    display: grid !important;
    grid-template-columns: 252px minmax(0, 1fr) !important;
    align-items: stretch;
    background: var(--driver-page);
}

body .driver-portal-sidebar {
    position: sticky;
    top: 42px;
    z-index: 20;
    width: auto;
    height: calc(100vh - 42px);
    min-height: calc(100vh - 42px);
    display: flex;
    flex-direction: column;
    padding: 1.7rem 1.45rem;
    overflow-y: auto;
    color: #fff;
    background:
        radial-gradient(
            circle at 20% 10%,
            rgba(0, 107, 79, .28),
            transparent 32%
        ),
        var(--driver-navy);
}

.driver-portal-brand {
    display: flex;
    gap: .85rem;
    align-items: center;
    padding: 0 .5rem 1.45rem;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.driver-brand-icon {
    font-size: 1.8rem;
}

.driver-brand-title {
    font-size: 1.28rem;
    font-weight: 950;
    letter-spacing: .12em;
}

.driver-brand-subtitle {
    color: var(--driver-gold);
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: .05em;
}

.driver-portal-profile {
    display: flex;
    gap: .8rem;
    align-items: center;
    padding: 1.15rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.driver-portal-avatar,
.driver-user-initial {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    font-weight: 950;
}

.driver-portal-avatar {
    width: 46px;
    height: 46px;
    color: #fff;
    background: var(--driver-green);
    border: 2px solid var(--driver-gold);
}

.driver-profile-copy {
    min-width: 0;
}

.driver-profile-name {
    overflow: hidden;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.driver-profile-status {
    display: inline-flex;
    margin-top: .25rem;
    padding: .2rem .55rem;
    color: #d1fadf;
    background: rgba(18, 183, 106, .2);
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 800;
}

.driver-portal-nav {
    display: grid;
    gap: .42rem;
    margin-top: 1rem;
}

.driver-portal-nav a {
    position: relative;
    min-height: 43px;
    display: flex;
    gap: .7rem;
    align-items: center;
    padding: .68rem .75rem;
    color: rgba(255, 255, 255, .88);
    border-radius: 12px;
    font-size: .82rem;
    font-weight: 800;
    text-decoration: none;
    transition:
        color .15s ease,
        background .15s ease,
        transform .15s ease;
}

.driver-portal-nav a i {
    width: 17px;
    flex: 0 0 17px;
    text-align: center;
}

.driver-portal-nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, .08);
    transform: translateX(2px);
}

.driver-portal-nav a.active {
    color: var(--driver-gold);
    background: rgba(245, 180, 0, .14);
}

.driver-portal-nav .driver-portal-signout {
    margin-top: .4rem;
    color: #fda29b;
}

.driver-portal-nav .driver-portal-signout:hover {
    color: #fff;
    background: rgba(240, 68, 56, .16);
}

.driver-portal-help {
    margin-top: auto;
    padding: 1rem;
    color: #d0d5dd;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 16px;
}

.driver-portal-help strong {
    color: #fff;
    font-size: .82rem;
}

.driver-portal-help p {
    margin: .4rem 0 .8rem;
    font-size: .72rem;
    line-height: 1.5;
}

.driver-marketplace-btn {
    display: block;
    padding: .58rem .7rem;
    color: #101828;
    background: var(--driver-gold);
    border-radius: 10px;
    font-size: .75rem;
    font-weight: 900;
    text-align: center;
    text-decoration: none;
}

body .driver-portal-main {
    position: relative;
    min-width: 0;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 1.7rem 1.7rem 2rem;
}

.driver-portal-topbar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.35rem;
}

.driver-portal-topbar h1 {
    margin: 0;
    color: var(--driver-text);
    font-size: 1.45rem;
    font-weight: 950;
}

.driver-portal-topbar p {
    margin: .35rem 0 0;
    color: var(--driver-muted);
    font-size: .82rem;
}

.driver-user-pill {
    display: flex;
    gap: .55rem;
    align-items: center;
    padding: .55rem .8rem;
    background: #fff;
    border: 1px solid var(--driver-border);
    border-radius: 13px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .05);
    font-size: .78rem;
}

.driver-user-initial {
    width: 28px;
    height: 28px;
    color: #fff;
    background: var(--driver-green);
    font-size: .72rem;
}

.driver-portal-content {
    min-width: 0;
}

/*
 * Existing driver screens often use a centred Bootstrap container.
 * Inside the portal, let that content use the available main-column width.
 */
.driver-portal-content > .container,
.driver-portal-content > .container-sm,
.driver-portal-content > .container-md,
.driver-portal-content > .container-lg,
.driver-portal-content > .container-xl,
.driver-portal-content > .container-xxl {
    width: 100%;
    max-width: none;
    padding-right: 0;
    padding-left: 0;
}

/*
 * Existing MyJobs content is already polished. These selectors only
 * correct its outer alignment when placed inside the shared shell.
 */
.driver-portal-content .jobs-dashboard,
.driver-portal-content .driver-dashboard,
.driver-portal-content .driver-marketplace-page,
.driver-portal-content .driver-alerts-page {
    width: 100%;
    max-width: none;
    margin-right: 0;
    margin-left: 0;
}

@media (max-width: 991.98px) {
    body .driver-portal-shell {
        grid-template-columns: 1fr !important;
    }

    body .driver-portal-sidebar {
        position: relative;
        top: auto;
        width: 100%;
        height: auto;
        min-height: auto;
        padding: 1rem;
    }

    .driver-portal-profile,
    .driver-portal-help {
        display: none;
    }

    .driver-portal-brand {
        padding-bottom: .8rem;
    }

    .driver-portal-nav {
        display: flex;
        overflow-x: auto;
        padding-bottom: .2rem;
    }

    .driver-portal-nav a {
        flex: 0 0 auto;
    }

    body .driver-portal-main {
        padding: 1rem;
    }
}

@media (max-width: 767.98px) {
    .driver-portal-topbar {
        align-items: flex-start;
    }

    .driver-user-pill {
        display: none;
    }
}
