/* ==========================
   VARIABLES GLOBALES
========================== */
:root {
    --main-purple: #9C04DA;
    --light-purple-bg: #E7C6FF;
    --accent-yellow: #FFEB3B;
    --white: #FFFFFF;
    --bg-light: #F8F9FA;
    --text-dark: #000000;
    --text-gray: #6B7280;
    --shadow-soft: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-strong: 0 15px 30px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}

/* ==========================
   LAYOUT PRINCIPAL
========================== */
.dashboard-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
    background-color: var(--bg-light);
    transition: all 0.3s;
}

.main-content {
    padding: 30px;
    overflow-x: hidden;
}

/* ==========================
   SIDEBAR
========================== */
.sidebar {
    background-color: var(--light-purple-bg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: width 0.3s ease;
    position: relative;
}

.sidebar.collapsed {
    width: 70px;
    padding: 20px 10px;
}

.sidebar .brand {
    margin-bottom: 40px;
    font-weight: bold;
    font-size: 22px;
    color: var(--main-purple);
    transition: opacity 0.3s;
}

.sidebar.collapsed .brand span {
    opacity: 0;
}

.profile-box {
    text-align: center;
    margin-bottom: 30px;
    transition: opacity 0.3s;
}

.sidebar.collapsed .profile-box h3,
.sidebar.collapsed .profile-box a {
    display: none;
}

.profile-box .circle img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--white);
    object-fit: cover;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 10px;
    transition: all 0.3s;
}

.nav-item {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 0 25px 25px 0;
    transition: all 0.3s;
    font-weight: 500;
    color: var(--text-dark);
}

.sidebar.collapsed .nav-item span {
    display: none;
}

.nav-item:hover,
.nav-item.active {
    background-color: var(--main-purple);
    color: var(--white);
}

.logout-btn {
    background-color: var(--accent-yellow);
    border: none;
    padding: 15px 40px;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s;
}

.logout-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-strong);
}

/* ==========================
   HEADER
========================== */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.top-header h1 {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin: 0;
}

.date-now {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-top: 5px;
}

.btn-home-circle {
    width: 45px;
    height: 45px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--main-purple);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.btn-home-circle:hover {
    background: var(--main-purple);
    color: var(--white);
    transform: translateY(-3px) scale(1.05);
}

/* ==========================
   WELCOME BANNER
========================== */
.welcome-banner {
    background: linear-gradient(135deg, var(--main-purple), #6c0296);
    padding: 40px;
    border-radius: 24px;
    color: white;
    margin-bottom: 40px;
    box-shadow: var(--shadow-strong);
    transition: transform 0.5s;
}

.welcome-banner:hover {
    transform: translateY(-5px) scale(1.02);
}

.welcome-banner h2 span {
    color: var(--accent-yellow);
    font-weight: 800;
}

.welcome-banner p {
    opacity: 0.9;
    margin-top: 10px;
}

/* ==========================
   STAT CARDS
========================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background: var(--white);
    padding: 25px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0; left: 0;
   /* background: linear-gradient(135deg, #9C04DA55, #FFEB3B55);*/
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: 24px;
}

.stat-card:hover::after {
    opacity: 1;
}

.stat-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: var(--shadow-strong);
}

.stat-card.purple-solid {
    background: var(--main-purple);
    color: white;
}

.stat-icon-bg {
    width: 50px;
    height: 50px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.purple-light {
    background: #F3E8FF;
    color: var(--main-purple);
}

.yellow-light {
    background: #FFFBEB;
    color: #D97706;
}

.white-alpha {
    background: rgba(255,255,255,0.2);
    color: white;
}

.stat-info strong {
    font-size: 1.8rem;
    display: block;
    line-height: 1;
}

.stat-info p {
    font-size: 0.85rem;
    margin-top: 5px;
    opacity: 0.7;
}

/* ==========================
   MEDIA QUERIES RESPONSIVE
========================== */
@media (max-width: 1024px) {
    .dashboard-container {
        grid-template-columns: 220px 1fr;
    }

    .top-header h1 {
        font-size: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        flex-direction: row;
        justify-content: space-between;
        padding: 10px;
    }

    .sidebar-nav {
        flex-direction: row;
        gap: 10px;
    }

    .nav-item {
        margin-bottom: 0;
        padding: 8px 12px;
        border-radius: 12px;
        font-size: 0.9rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .welcome-banner {
        padding: 20px;
        font-size: 0.9rem;
        text-align: center;
    }

    .top-header {
        flex-direction: column;
        gap: 10px;
    }

    .btn-home-circle {
        margin-top: 10px;
    }
}
