/* Dashboard Specific Layout */
body {
    background-color: var(--black);
    color: var(--white);
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    overflow-y: auto; /* Override login page overflow */
    padding: 0; /* Override login page padding */
}

/* --- SIDEBAR --- */
.sidebar {
    width: 260px;
    height: 100vh;
    background-color: var(--dark-gray);
    border-right: 1px solid var(--medium-gray);
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-logo {
    padding: 25px 20px;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -1px;
    color: var(--red);
    border-bottom: 1px solid var(--medium-gray);
    text-align: center;
}

.sidebar-logo span {
    color: var(--white);
}

.nav-links {
    list-style: none;
    padding: 20px 0;
    flex: 1;
}

.nav-links li {
    padding: 5px 20px;
}

.nav-links a {
    display: block;
    padding: 12px 20px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-links a:hover, .nav-links a.active {
    background-color: var(--red);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(211, 47, 47, 0.3);
}

/* --- MAIN WRAPPER --- */
.main-wrapper {
    margin-left: 260px;
    width: calc(100% - 260px);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- HEADER --- */
.top-header {
    height: 75px;
    background-color: var(--dark-gray);
    border-bottom: 1px solid var(--medium-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 98; /* Lowered slightly to 98 so sidebar can cover it */
}

/* Hamburger Menu & Overlay */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
    margin-right: 15px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99;
}

.header-title {
    display: flex;
    align-items: center;
}

.header-title h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--white);
}

/* Account Menu */
.account-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
}

.account-info {
    text-align: right;
    display: flex;
    flex-direction: column;
}

.account-name {
    font-size: 14px;
    font-weight: bold;
    color: var(--white);
}

.account-role {
    font-size: 12px;
    color: var(--red);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.avatar {
    width: 40px;
    height: 40px;
    background-color: var(--medium-gray);
    border: 2px solid var(--red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--white);
}

.logout-btn-header {
    padding: 8px 15px;
    background-color: transparent;
    border: 1px solid var(--red);
    color: var(--red);
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: 0.3s;
}

.logout-btn-header:hover {
    background-color: var(--red);
    color: var(--white);
}

/* --- CONTENT AREA --- */
.content-area {
    flex: 1;
    padding: 40px;
    background-color: var(--black);
}

.welcome-card {
    background: var(--dark-gray);
    padding: 30px;
    border-radius: 12px;
    border-top: 4px solid var(--red);
    margin-bottom: 30px;
}

.welcome-card h3 {
    margin-bottom: 10px;
    font-size: 24px;
}

.welcome-card p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
}

/* --- FOOTER --- */
.dashboard-footer {
    text-align: center;
    padding: 20px;
    background-color: var(--dark-gray);
    border-top: 1px solid var(--medium-gray);
    color: var(--text-muted);
    font-size: 13px;
}

/* Responsive Layout for Mobile */
@media (max-width: 768px) {
    .menu-toggle {
        display: block; /* Show hamburger menu on mobile */
    }
    .sidebar {
        width: 260px; /* Keep fixed width */
        height: 100vh;
        position: fixed;
        border-right: 1px solid var(--medium-gray);
        border-bottom: none;
        transform: translateX(-100%); /* Hide completely to the left by default */
        transition: transform 0.3s ease;
        z-index: 100;
    }
    .sidebar.active {
        transform: translateX(0); /* Slide in when active */
    }
    .sidebar-overlay.active {
        display: block; /* Show dark background when active */
    }
    .main-wrapper {
        margin-left: 0;
        width: 100%;
    }
    .top-header {
        padding: 0 15px;
    }
    .content-area {
        padding: 20px;
    }
    .account-info {
        display: none; /* Hide name text on small phones to save space */
    }
}

