@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --dashboard-purple: #4A1B9D;
    --dashboard-purple-dark: #351372;
    --dashboard-purple-soft: #5a22b5;
    --dashboard-orange: #ff7900;
    --dashboard-page: #F6F5FA;
    --dashboard-line: #E8E5F0;
    --dashboard-text: #1C1726;
    --dashboard-muted: #6F6A7C;
    --dashboard-sidebar-width: 300px;
    --dashboard-topbar-height: 70px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--dashboard-page);
}

body.dashboard-page {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background: var(--dashboard-page);
    color: var(--dashboard-text);
    font-family: 'Inter', Arial, sans-serif;
}

body.dashboard-sidebar-open {
    overflow: hidden;
}

button,
input,
textarea,
select {
    font: inherit;
}

.dashboard-skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1000;
    transform: translateY(-150%);
    border-radius: 6px;
    background: #fff;
    color: var(--dashboard-purple);
    padding: 10px 14px;
    text-decoration: none;
}

.dashboard-skip-link:focus {
    transform: translateY(0);
}

.dashboard-icon-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* Sidebar */
.dashboard-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 300;
    width: var(--dashboard-sidebar-width);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: linear-gradient(180deg, var(--dashboard-purple) 0%, #4b20a1 100%);
    color: #fff;
    scrollbar-color: rgba(255, 255, 255, .25) transparent;
    scrollbar-width: thin;
    transform: translateX(-100%);
    transition: transform var(--dashboard-transition);
    box-shadow: 18px 0 50px rgba(24, 10, 50, .22);
}

.dashboard-sidebar.open {
    transform: translateX(0);
}

.dashboard-sidebar::-webkit-scrollbar {
    width: 5px;
}

.dashboard-sidebar::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background: rgba(255, 255, 255, .25);
}

.dashboard-brand {
    display: flex;
    min-height: var(--dashboard-topbar-height);
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid rgba(255, 255, 255, .05);
    color: #fff;
    gap: 12px;
}

.dashboard-brand-home {
    display: flex;
    align-items: center;
    gap: 10px;
    color: inherit;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 1.4px;
    text-decoration: none;
    white-space: nowrap;
}

.dashboard-brand-logo {
    height: 44px;
    width: auto;
    object-fit: contain;
    display: block;
}

.dashboard-sidebar-close {
    display: none;
    margin-left: auto;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-size: 26px;
    line-height: 1;
}

.dashboard-navigation {
    padding: 12px 0 28px;
}

.dashboard-nav-label {
    margin: 0;
    padding: 20px 22px 8px;
    color: rgba(255, 255, 255, .38);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.dashboard-nav-item,
.dashboard-nav-parent {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 50px;
    align-items: center;
    gap: 15px;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, .83);
    cursor: pointer;
    padding: 0 22px 0 28px;
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    text-decoration: none;
    transition: background .18s ease, color .18s ease;
}

.dashboard-nav-item:hover,
.dashboard-nav-parent:hover,
.dashboard-nav-item:focus-visible,
.dashboard-nav-parent:focus-visible {
    outline: none;
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.dashboard-nav-parent.active,
.dashboard-nav-item.active {
    background: rgba(39, 16, 82, .38);
    color: var(--dashboard-orange);
    font-weight: 700;
}

.dashboard-nav-parent.active::before,
.dashboard-nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: var(--dashboard-orange, #FF7900);
    border-radius: 0 4px 4px 0;
}

.dashboard-nav-icon {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    stroke: currentColor;
}

.dashboard-nav-chevron {
    width: 15px;
    height: 15px;
    margin-left: auto;
    fill: none;
    stroke: currentColor;
    transition: transform .2s ease;
}

.dashboard-nav-parent[aria-expanded='true'] .dashboard-nav-chevron {
    transform: rotate(90deg);
}

.dashboard-subnav {
    display: none;
    padding: 3px 0 10px 70px;
    background: rgba(38, 15, 79, .23);
}

.dashboard-subnav.open {
    display: block;
}

.dashboard-subnav a {
    position: relative;
    display: block;
    padding: 10px 16px;
    color: rgba(255, 255, 255, .72);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
}

.dashboard-subnav a:hover,
.dashboard-subnav a:focus-visible,
.dashboard-subnav a.active {
    outline: none;
    color: var(--dashboard-orange);
}

/* Main shell and topbar */
.dashboard-shell {
    min-height: 100vh;
    margin-left: var(--dashboard-sidebar-width);
}

.dashboard-topbar {
    position: sticky;
    top: 0;
    z-index: 200;
    display: flex;
    height: var(--dashboard-topbar-height);
    align-items: center;
    justify-content: space-between;
    background: var(--dashboard-purple);
    color: #fff;
    padding: 0 38px;
}

.dashboard-topbar-left,
.dashboard-user-button {
    display: flex;
    align-items: center;
}

.dashboard-topbar-left {
    min-width: 0;
    gap: 22px;
}

.dashboard-menu-toggle {
    display: inline-grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #fff;
    cursor: pointer;
}

.dashboard-menu-toggle:hover,
.dashboard-menu-toggle:focus-visible {
    outline: none;
    background: rgba(255, 255, 255, .12);
}

.dashboard-menu-toggle svg {
    width: 23px;
    height: 23px;
}

.dashboard-university {
    display: flex;
    align-items: center;
}

.dashboard-university-logo {
    display: block;
    width: 210px;
    max-height: 58px;
    object-fit: contain;
    object-position: left center;
}

.dashboard-user {
    position: relative;
}

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

.dashboard-notification-button {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #fff;
    cursor: pointer;
}

.dashboard-notification-button:hover,
.dashboard-notification-button:focus-visible {
    outline: none;
    background: rgba(255, 255, 255, .12);
}

.dashboard-notification-button svg {
    width: 22px;
    height: 22px;
}

.dashboard-user-button {
    gap: 10px;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    padding: 8px;
    font-size: 13px;
    font-weight: 700;
}

.dashboard-user-avatar {
    display: block;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 50%;
    background: #fff;
    object-fit: contain;
    padding: 4px;
}

.dashboard-user-chevron {
    width: 13px;
    height: 13px;
}

/* DPL & Mentor topbar follows the Figma account and notification treatment. */
.dpl-dashboard-page .dashboard-topbar-actions,
.mentor-dashboard-page .dashboard-topbar-actions {
    gap: 20px;
}

.dpl-dashboard-page .dashboard-notification-button,
.mentor-dashboard-page .dashboard-notification-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.dpl-dashboard-page .dashboard-notification-button svg,
.mentor-dashboard-page .dashboard-notification-button svg {
    width: 19px;
    height: 19px;
}

.dpl-dashboard-page .dashboard-user-button,
.mentor-dashboard-page .dashboard-user-button {
    width: 344px;
    max-width: 100%;
    min-height: 36px;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 999px;
    background: #FDFDFF;
    color: #5F5B6B;
    padding: 3px 14px 3px 5px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .01em;
}

.dpl-dashboard-page .dashboard-user-button:hover,
.mentor-dashboard-page .dashboard-user-button:hover {
    background: #F6F5FA;
}

.dpl-dashboard-page .dashboard-user-button:focus-visible,
.dpl-dashboard-page .dashboard-notification-button:focus-visible,
.mentor-dashboard-page .dashboard-user-button:focus-visible,
.mentor-dashboard-page .dashboard-notification-button:focus-visible {
    outline: 2px solid #FFFFFF;
    outline-offset: 2px;
}

.dpl-dashboard-page .dashboard-user-avatar,
.mentor-dashboard-page .dashboard-user-avatar {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
    padding: 3px;
}

.dpl-dashboard-page .dashboard-user-name,
.mentor-dashboard-page .dashboard-user-name {
    flex: 1;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dpl-dashboard-page .dashboard-user-chevron,
.mentor-dashboard-page .dashboard-user-chevron {
    flex: 0 0 12px;
}

.dashboard-user-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 9999;
    display: none;
    min-width: 190px;
    overflow: hidden;
    border: 1px solid var(--dashboard-line);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 14px 35px rgba(37, 32, 45, .15);
}

.dashboard-user-menu.open {
    display: block;
    z-index: 9999;
}

.dashboard-user-menu a {
    display: block;
    padding: 12px 16px;
    color: var(--dashboard-text);
    font-size: 13px;
    text-decoration: none;
}

.dashboard-user-menu a:hover,
.dashboard-user-menu a:focus-visible {
    outline: none;
    background: var(--dashboard-page);
}

/* Content */
.dashboard-main {
    display: flex;
    min-height: calc(100vh - var(--dashboard-topbar-height));
    flex-direction: column;
    padding: 18px 20px 0;
}

.dashboard-panel {
    width: 100%;
    min-height: calc(100vh - var(--dashboard-topbar-height) - 103px);
    overflow: hidden;
    border-radius: 20px;
    background: #fff;
}

.dashboard-toolbar {
    display: flex;
    min-height: 100px;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    padding: 20px 52px;
}

.dashboard-search {
    display: flex;
    width: min(264px, 100%);
    height: 48px;
    overflow: hidden;
    border: 1px solid #e6e3eb;
    border-radius: 10px;
    background: #fff;
}

.dashboard-search:focus-within {
    border-color: var(--dashboard-purple);
    box-shadow: 0 0 0 3px rgba(79, 29, 168, .1);
}

.dashboard-search input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    padding: 0 14px;
    color: var(--dashboard-text);
    font-size: 12px;
}

.dashboard-search input::placeholder {
    color: #aaa6b0;
}

.dashboard-search button {
    display: grid;
    width: 48px;
    place-items: center;
    border: 0;
    background: var(--dashboard-purple);
    color: #fff;
    cursor: pointer;
}

.dashboard-search button:hover,
.dashboard-search button:focus-visible {
    outline: none;
    background: var(--dashboard-purple-dark);
}

.dashboard-search svg {
    width: 17px;
    height: 17px;
}

.dashboard-panel-divider {
    height: 1px;
    margin: 0 22px;
    background: var(--dashboard-line);
}

.dashboard-content {
    padding: 28px 34px 48px;
}

.dashboard-footer {
    display: flex;
    min-height: 84px;
    align-items: center;
    justify-content: space-between;
    margin-top: 80px;
    border-top: 1px solid #e8e6ed;
    color: #b0abb8;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.dashboard-overlay {
    position: fixed;
    inset: 0;
    z-index: 250;
    display: none;
    border: 0;
    background: rgba(23, 12, 42, .52);
    opacity: 0;
    transition: opacity .2s ease;
}

.dashboard-overlay.visible {
    display: block;
    opacity: 1;
}

@media (max-width: 1199px) {
    :root {
        --dashboard-sidebar-width: 260px;
    }

    .dashboard-brand {
        padding: 0 38px;
    }

    .dpl-dashboard-page .dashboard-user-button {
        width: 280px;
    }
}

@media (max-width: 991px) {
    :root {
        --dashboard-topbar-height: 72px;
    }

    .dashboard-sidebar {
        width: min(320px, 86vw);
        transform: translateX(-101%);
        box-shadow: 18px 0 50px rgba(24, 10, 50, .22);
        transition: transform .25s ease;
    }

    .dashboard-sidebar.open {
        transform: translateX(0);
    }

    .dashboard-brand {
        min-height: var(--dashboard-topbar-height);
        padding: 0 22px;
    }

    .dashboard-sidebar-close {
        display: block;
    }

    .dashboard-shell {
        margin-left: 0;
    }

    .dashboard-topbar {
        padding: 0 18px;
    }

    .dashboard-overlay.visible {
        display: block;
        opacity: 1;
    }

    .dashboard-main {
        min-height: calc(100vh - var(--dashboard-topbar-height));
        padding: 14px 14px 0;
    }

    .dashboard-panel {
        min-height: calc(100vh - var(--dashboard-topbar-height) - 90px);
        border-radius: 14px;
    }

    .dashboard-toolbar {
        min-height: 82px;
        padding: 16px 20px;
    }

    .dashboard-content {
        padding: 24px 22px 36px;
    }

    .dashboard-footer {
        min-height: 70px;
        margin-top: 48px;
    }
}

@media (max-width: 640px) {
    .dashboard-university-logo {
        width: 142px;
        max-height: 44px;
    }

    .dashboard-topbar-left {
        gap: 8px;
    }

    .dashboard-user-name,
    .dashboard-user-chevron {
        display: none;
    }

    .dashboard-topbar-actions {
        gap: 4px;
    }

    .dashboard-user-button {
        padding: 4px;
    }

    .dpl-dashboard-page .dashboard-user-button {
        width: 40px;
        min-height: 40px;
        border-radius: 50%;
    }

    .dpl-dashboard-page .dashboard-notification-button {
        width: 40px;
        height: 40px;
    }

    .dashboard-main {
        padding: 10px 8px 0;
    }

    .dashboard-panel {
        border-radius: 12px;
    }

    .dashboard-toolbar {
        min-height: 72px;
        justify-content: stretch;
        padding: 12px;
    }

    .dashboard-search {
        width: 100%;
        height: 44px;
    }

    .dashboard-panel-divider {
        margin: 0 12px;
    }

    .dashboard-content {
        padding: 22px 16px 32px;
    }

    .dashboard-footer {
        min-height: 82px;
        flex-direction: column;
        justify-content: center;
        gap: 7px;
        margin-top: 32px;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}

@media (min-width: 992px) {
    .dashboard-sidebar {
        transform: translateX(0);
        transition: transform .25s ease;
    }
    body.dashboard-sidebar-closed .dashboard-sidebar {
        transform: translateX(-100%) !important;
    }
    .dashboard-shell {
        margin-left: var(--dashboard-sidebar-width);
        transition: margin-left .25s ease;
    }
    body.dashboard-sidebar-closed .dashboard-shell {
        margin-left: 0 !important;
    }
    .dashboard-overlay {
        display: none !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
}
