/* Dashboard Stylesheet */

.dashboard-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    min-height: 100vh;
    background-color: var(--gray-50);
}

/* Sidebar */
.sidebar {
    background:  #1a2340;
    color: white;
    padding: 2rem 0;
    position: fixed;
    width: 250px;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ===== FORCE SIDEBAR LOGO SIZE ===== */

.sidebar-logo{
    display:flex !important;
    justify-content:center !important;
    align-items:center !important;
    padding:20px 15px !important;
    overflow:hidden !important;
}

.sidebar-logo img,
.sidebar-logo .sidebar-logo-img{

    width:140px !important;
    max-width:140px !important;
    min-width:140px !important;

    height:auto !important;
    max-height:60px !important;

    object-fit:contain !important;
    display:block !important;
    flex:none !important;

}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu-item {
    margin: 0;
}

.sidebar-menu-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.sidebar-menu-link:hover,
.sidebar-menu-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    padding-left: 2rem;
}

.sidebar-menu-link i {
    font-size: 1.2rem;
}

.sidebar-menu-link span {
    flex: 1;
}

.sidebar-divider {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.1);
    margin: 1rem 0;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.sidebar-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.sidebar-user-info {
    flex: 1;
}

.sidebar-user-name {
    font-size: 0.9rem;
    font-weight: 600;
    display: block;
}

.sidebar-user-role {
    font-size: 0.8rem;
    opacity: 0.8;
    display: block;
}

.sidebar-logout {
    width: 100%;
    padding: 0.75rem;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sidebar-logout:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Main Content */
.main-content {
    grid-column: 2;
    padding: 2rem;
    overflow-y: auto;
}

/* Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dashboard-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.dashboard-header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.search-box {
    position: relative;
}

.search-box input {
    padding: 10px 40px 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    width: 250px;
    font-size: 0.95rem;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    cursor: pointer;
}

.notification-bell,
.profile-dropdown {
    position: relative;
    cursor: pointer;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background-color: var(--danger-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-card.blue {
    border-color: #3b82f6;
}

.stat-card.green {
    border-color: var(--success-color);
}

.stat-card.orange {
    border-color: var(--warning-color);
}

.stat-card.purple {
    border-color: var(--secondary-color);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.stat-change {
    font-size: 0.85rem;
    color: var(--success-color);
}

.stat-change.negative {
    color: var(--danger-color);
}

/* Charts Section */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.chart-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.chart-options {
    display: flex;
    gap: 0.5rem;
}

.chart-option {
    background: var(--gray-100);
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.chart-option.active {
    background: var(--primary-color);
    color: white;
}

.chart-container {
    position: relative;
    height: 300px;
}

/* Activity Feed */
.activity-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.activity-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.activity-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.activity-list {
    list-style: none;
}

.activity-item {
    padding: 1rem;
    border-left: 3px solid var(--primary-color);
    margin-bottom: 1rem;
    background: var(--gray-50);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.activity-item:hover {
    background: white;
    border-left-color: var(--primary-dark);
}

.activity-time {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.activity-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.activity-desc {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Quick Stats */
.quick-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.quick-stat-item {
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quick-stat-label {
    font-size: 0.95rem;
    color: var(--text-light);
}

.quick-stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

.modal-close:hover {
    color: var(--text-dark);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .dashboard-container {
        grid-template-columns: 200px 1fr;
    }

    .sidebar {
        width: 200px;
    }

    .main-content {
        padding: 1.5rem;
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }

    .activity-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        left: -250px;
        transition: left 0.3s ease;
        z-index: 900;
        width: 250px;
    }

    .sidebar.active {
        left: 0;
    }

    .main-content {
        grid-column: 1;
        padding: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        flex-direction: column;
        gap: 1rem;
    }

    .dashboard-header-right {
        width: 100%;
        justify-content: space-between;
    }

    .search-box input {
        width: 100%;
    }
}







/* ============================
   RESPONSIVE DASHBOARD
============================ */

.menu-toggle {
    display: none;
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 8px;
    background: #1a2340;
    color: #fff;
    cursor: pointer;
    font-size: 1.2rem;
    align-items: center;
    justify-content: center;
    transition: .3s;
}

.menu-toggle:hover {
    background: #2b3a67;
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    opacity: 0;
    visibility: hidden;
    transition: .3s;
    z-index: 998;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

@media (max-width:1024px){

    .charts-grid{
        grid-template-columns:1fr;
    }

    .activity-section{
        grid-template-columns:1fr;
    }

    .dashboard-header{
        flex-wrap:wrap;
        gap:15px;
    }

    .search-box input{
        width:220px;
    }

}

@media (max-width:768px){

    .dashboard-container{
        display:block;
    }

    .sidebar{

        position:fixed;
        top:0;
        left:-270px;
        width:260px;
        height:100%;
        z-index:999;
        transition:left .35s ease;
        overflow-y:auto;

    }

    .sidebar.active{

        left:0;

    }

    .main-content{

        margin-left:0;
        padding:1rem;

    }

    .menu-toggle{

        display:flex;

    }

    .dashboard-header{

        flex-direction:column;
        align-items:flex-start;
        gap:15px;

    }

    .dashboard-header-right{

        width:100%;
        display:flex;
        justify-content:space-between;
        align-items:center;
        flex-wrap:wrap;
        gap:10px;

    }

    .search-box{

        width:100%;

    }

    .search-box input{

        width:100%;

    }

    .stats-grid{

        grid-template-columns:1fr;

    }

    .charts-grid{

        grid-template-columns:1fr;

    }

    .activity-section{

        grid-template-columns:1fr;

    }

    .chart-card{

        padding:1rem;

    }

    .activity-card{

        padding:1rem;

    }

    table{

        display:block;
        overflow-x:auto;
        white-space:nowrap;

    }

}

@media (max-width:576px){

    .dashboard-title{

        font-size:1.4rem;

    }

    .stat-value{

        font-size:1.6rem;

    }

    .dashboard-header{

        padding:1rem;

    }

    .sidebar{

        width:240px;

    }

}


@media (max-width:768px){

    .sidebar-logo{

        padding:20px 15px;

    }

    .sidebar-logo-img{

        width:40px;
        height:40px;

    }

    .sidebar-logo span{

        font-size:20px;

    }

}





.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,.1);
    overflow: hidden;
}

.sidebar-logo-img {
    width: 45px;
    height: 45px;
    object-fit: contain;
    flex-shrink: 0;
}

.sidebar-logo span {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}



/* ============================
   DEFAULT PROFILE AVATAR
============================ */

.profile-avatar,
.profile-avatar-default{
    width:44px;
    height:44px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
    cursor:pointer;
    transition:.3s;
}

.profile-avatar{

    object-fit:cover;
    border:3px solid #ffffff;
    box-shadow:0 4px 12px rgba(0,0,0,.15);

}

.profile-avatar-default{

    width:46px;
    height:46px;
    border-radius:50%;

    background:linear-gradient(145deg,#5b5ff7,#7b4dff);

    color:#fff;
    font-size:20px;
    font-weight:700;

    display:flex;
    align-items:center;
    justify-content:center;

    border:3px solid #fff;
    outline:2px solid #5b5ff7;

    box-shadow:0 8px 18px rgba(91,95,247,.35);

}

.profile-avatar:hover,
.profile-avatar-default:hover{

    transform:scale(1.08);

}