/* Layout */
.wrapper {
    display: flex;
    min-height: 100vh;
    height: auto;
    width: 100%;
}

/* Sidebar */
.sidebar {
    width: 230px;
    background-color: var(--primary-color);
    display: flex;
    flex-direction: column;
    padding: 50px 0;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    align-self: flex-start;
}

.sidebar-top {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.sidebar-logo {
    width: 100px;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    justify-content: flex-start;
    flex: 1;
    padding-top: 50px;
}

#sidebar-guest {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
    padding-top: 50px;
}

.menu-link {
    color: #CDCDCD;
    text-decoration: none;
    font-size: 16px;
    padding: 10px 30px;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 100ms ease-in-out;
    cursor: pointer;
}

.menu-link img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.menu-link:hover,
.menu-link.active {
    color: var(--white);
    background-color: #2A3D59;
    font-weight: bold;
}

.sidebar-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: auto;
}

.legal-link {
    color: #A8A8A8;
    font-size: 16px;
    text-decoration: none;
}

.legal-link:hover {
    color: var(--secondary-color);
}

/* Profile Dropdown */
.profile-dropdown {
    position: absolute;
    top: 60px;
    right: 0;
    background-color: var(--primary-color);
    border-radius: 20px 0 20px 20px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 999;
    box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.1);
}

.profile-dropdown a {
    color: #CDCDCD;
    text-decoration: none;
    font-size: 16px;
    white-space: nowrap;
}

.profile-dropdown a:hover {
    color: var(--secondary-color);
}

/* Main Area & Content */
.main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-color);
    min-width: 0;
}

.content {
    flex: 1;
    padding: 50px;
    overflow-y: visible;
    min-width: 0;
}

.content h1 {
    font-size: 60px;
    font-weight: 700;
}

.dashboard-header {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-bottom: 50px;
}

.dashboard-header h1 {
    font-size: 64px;
    font-weight: 700;
}

.header-divider {
    width: 3px;
    height: 60px;
    background-color: var(--secondary-color);
}

.header-subtitle {
    font-size: 20px;
    font-weight: 400;
}

.dashboard-content {
    display: flex;
    align-items: center;
    gap: 60px;
}

/* Metrics Cards */
.metrics-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
    flex: 2;
}

.metrics-row {
    display: flex;
    gap: 25px;
}

.metric-card {
    background-color: var(--white);
    border-radius: 30px;
    box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 125ms ease-in-out;
}

.card-number-box {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card-number {
    font-size: 64px;
    font-weight: 600;
    line-height: 1;
}

.card-label {
    font-size: 20px;
    color: var(--primary-color);
    text-align: center;
}

.square-card {
    flex: 1;
    height: 150px;
    gap: 20px;
}

.small-card {
    flex: 1;
    height: 150px;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.wide-card {
    width: 100%;
    height: 150px;
    justify-content: flex-start;
    padding: 0 40px;
    gap: 40px;
}

/* Urgent Card Details */
.urgent-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.urgent-divider {
    width: 2px;
    height: 100px;
    background-color: #D1D1D1;
}

.urgent-right {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.urgent-date {
    font-size: 21px;
    font-weight: 700;
}

.urgent-deadline-label {
    font-size: 16px;
}

/* Card Icons */
.card-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    transition: background-color 125ms ease-in-out;
    position: relative;
}

.card-icon img {
    width: 64px;
    height: auto;
    object-fit: contain;
    position: absolute;
    transition: opacity 125ms ease-in-out;
}

.urgent-icon {
    background-color: #FF3D00;
}

/* Greeting */
.greeting-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 40px;
}

.greeting-text {
    font-size: 47px;
    font-weight: 500;
}

.greeting-name {
    font-size: 64px;
    font-weight: 700;
    color: var(--secondary-color);
}

/* Hover Effects */
.metric-card:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.08);
}

.metric-card:hover .card-label,
.metric-card:hover .card-number,
.metric-card:hover .urgent-date,
.metric-card:hover .urgent-deadline-label {
    color: var(--white);
}

.metric-card:hover .urgent-divider {
    background-color: var(--white);
}

.metric-card:hover .edit-icon,
.metric-card:hover .check-icon {
    background-color: var(--white);
}

/* Icon Swap on Hover */
.icon-hover {
    opacity: 0;
}

.metric-card:hover .icon-default {
    opacity: 0;
}

.metric-card:hover .icon-hover {
    opacity: 1;
}

/* Mobile Elements */
.mobile-greeting-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeOutUp 1s ease-in-out 2s forwards;
}

.mobile-greeting-overlay .greeting-content {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
}

@keyframes fadeOutUp {
    0% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(-100%);
        visibility: hidden;
    }
}

/* Responsive (1000px - 1400px) */
@media (max-width: 1400px) {
    .dashboard-header h1 {
        font-size: 48px;
    }

    .greeting-name {
        font-size: 48px;
    }

    .greeting-text {
        font-size: 36px;
    }

    .card-number {
        font-size: 48px;
    }

    .metric-card {
        padding: 10px;
    }

    .dashboard-content {
        gap: 30px;
    }
}

/* Responsive (1000px - 1150px) */
@media (max-width: 1150px) {
    .dashboard-content {
        flex-direction: column;
        align-items: stretch;
    }

    .greeting-container {
        padding-left: 0;
        text-align: center;
        margin-bottom: 30px;
    }
}

/* Responsive (< 1000px) */
@media (max-width: 1000px) {
    .wrapper {
        flex-direction: column;
        height: auto;
        overflow: visible;
    }

    /* Sidebar moves to bottom */
    .sidebar {
        width: 100%;
        height: 80px;
        padding: 0;
        flex-direction: row;
        justify-content: center;
        position: fixed;
        top: unset;
        bottom: 0;
        left: 0;
        z-index: 100;
        align-self: unset;
    }

    .sidebar-top,
    .sidebar-bottom {
        display: none;
    }

    .sidebar.guest-mode {
        justify-content: space-evenly;
        padding: 0 5px;
    }

    .sidebar.guest-mode .sidebar-bottom {
        display: flex !important;
        flex-direction: row;
        gap: 8px;
        align-items: center;
        margin-top: 0;
    }

    .sidebar.guest-mode .sidebar-bottom .legal-link {
        color: #CDCDCD;
        font-size: 13px;
        border: 1px solid #CDCDCD;
        padding: 6px 10px;
        border-radius: 18px;
        white-space: nowrap;
        text-align: center;
    }

    .sidebar-menu {
        flex-direction: row;
        padding-top: 0;
        width: 100%;
        justify-content: space-around;
        align-items: center;
    }

    #sidebar-guest {
        flex-direction: row;
        padding-top: 0;
        width: auto;
        justify-content: center;
        align-items: center;
    }

    #sidebar-guest .menu-link {
        color: var(--secondary-color) !important;
        font-weight: bold;
    }

    .menu-link {
        flex-direction: column;
        padding: 8px 5px;
        gap: 5px;
        font-size: 16px;
        width: auto;
        border-radius: 16px;
    }

    .main-area {
        margin-bottom: 0;
        width: 100%;
        height: auto;
        overflow: visible;
    }

    .header {
        padding: 0 20px;
        justify-content: flex-end;
    }

    .help-icon {
        display: none;
    }

    .header-title {
        display: none;
    }

    /* Content Layout */
    .content {
        padding: 30px 20px;
        padding-bottom: 100px;
        overflow-y: visible;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 30px;
    }

    .header-divider {
        display: block;
        width: 90px;
        height: 3px;
        background-color: var(--secondary-color);
        order: 3;
        margin-top: 5px;
    }

    .dashboard-content {
        flex-direction: column;
        gap: 30px;
        align-items: initial;
    }

    .metrics-container {
        width: 100%;
    }

    .greeting-container {
        display: none;
    }

    .metrics-row.row-3-cols {
        flex-direction: row;
        gap: 10px;
    }

    .wide-card {
        justify-content: space-evenly;
    }

    .urgent-right {
        align-items: center;
        text-align: center;
    }

    .small-card {
        height: 124px;
        padding: 10px;
    }

    .card-icon {
        width: 64px;
        height: 64px;
    }

    .card-label {
        font-size: 16px;
    }

    .card-number {
        font-size: 54px;
    }
}

/* Responsive (< 400px) */
@media (max-width: 400px) {
    .wide-card {
        padding: 0 15px;
        gap: 15px;
    }

    .urgent-left {
        gap: 10px;
    }

    .card-icon {
        width: 40px;
        height: 40px;
    }

    .card-icon img {
        width: 24px;
    }

    .card-number {
        font-size: 36px;
    }

    .urgent-date {
        font-size: 16px;
    }

    .urgent-deadline-label {
        font-size: 16px;
    }
}

@media (max-width: 360px) {
    .menu-link {
        padding: 4px 2px;
        gap: 2px;
    }

    .sidebar-menu {
        justify-content: space-evenly;
        gap: 0;
    }
}