/* ===== DASHBOARD STYLES ===== */

.dashboard-section {
    padding: 30px 0;
    min-height: calc(100vh - 80px);
}

.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 25px;
}

/* ===== SIDEBAR ===== */
.admin-sidebar,
.student-sidebar {
    width: 260px;
    min-width: 260px;
    padding: 25px 20px;
    position: sticky;
    top: 100px;
    height: fit-content;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    border-radius: var(--border-radius-lg);
}

.sidebar-profile {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 20px;
}

.sidebar-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 12px;
    border: 3px solid var(--accent-primary);
    box-shadow: 0 0 20px var(--accent-glow);
}

.sidebar-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-profile h3 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: var(--transition);
    position: relative;
}

.sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 0.95rem;
}

.sidebar-link:hover {
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent-primary);
}

.sidebar-link.active {
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent-primary);
    font-weight: 600;
    border-right: 3px solid var(--accent-primary);
}

.sidebar-badge {
    position: absolute;
    left: 12px;
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 50px;
    font-weight: 700;
}

.sidebar-divider {
    height: 1px;
    background: var(--glass-border);
    margin: 10px 0;
}

.sidebar-toggle-btn {
    display: none;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-sm);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
}

/* ===== MAIN CONTENT ===== */
.dashboard-main {
    flex: 1;
    min-width: 0;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.dashboard-header h1 {
    font-size: 1.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-header h1 i {
    color: var(--accent-primary);
}

.dashboard-header p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 5px;
}

/* ===== STAT CARDS ===== */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card .stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 1.3rem;
}

.stat-card .stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ===== DASHBOARD CARDS ===== */
.dashboard-card {
    padding: 25px;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
}

.dashboard-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--glass-border);
}

.dashboard-card .card-header h3 {
    font-size: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dashboard-card .card-header h3 i {
    color: var(--accent-primary);
}

/* ===== DASHBOARD GRID ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

/* ===== QUICK ACTIONS ===== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 15px;
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    transition: var(--transition);
    text-decoration: none;
    font-size: 0.85rem;
}

.quick-action-btn i {
    font-size: 1.5rem;
    color: var(--accent-primary);
}

.quick-action-btn:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-3px);
}

/* ===== RECENT ITEMS ===== */
.recent-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.recent-item:last-child {
    border-bottom: none;
}

.recent-item-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.recent-item-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recent-item-info {
    flex: 1;
    min-width: 0;
}

.recent-item-info h4 {
    font-size: 0.9rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-item-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.recent-item-badge {
    flex-shrink: 0;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 0.95rem;
}

/* ===== FORM ROW ===== */
.form-row {
    display: grid;
    gap: 15px;
    margin-bottom: 15px;
}

/* ===== ACTION BUTTONS ===== */
.action-btns {
    display: flex;
    gap: 6px;
    align-items: center;
}

/* ===== STUDENT PROFILE CARD ===== */
.profile-header-card {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 30px;
    margin-bottom: 25px;
}

.profile-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--accent-primary);
    box-shadow: 0 0 30px var(--accent-glow);
    flex-shrink: 0;
}

.profile-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.profile-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.profile-meta {
    display: flex;
    gap: 20px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.profile-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.profile-meta-item i {
    color: var(--accent-primary);
}

/* ===== SCHEDULE CARDS ===== */
.schedule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.schedule-card {
    padding: 20px;
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

.schedule-card:hover {
    border-color: rgba(139, 92, 246, 0.3);
    transform: translateY(-3px);
}

.schedule-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.schedule-card-header h4 {
    font-size: 0.95rem;
    color: var(--text-primary);
}

.schedule-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.schedule-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.schedule-detail i {
    color: var(--accent-primary);
    width: 16px;
    text-align: center;
}

.schedule-card-footer {
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid var(--glass-border);
}

/* ===== NOTIFICATION ITEMS ===== */
.notification-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    border-radius: var(--border-radius-sm);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    margin-bottom: 10px;
    transition: var(--transition);
}

.notification-item.unread {
    border-right: 3px solid var(--accent-primary);
    background: rgba(139, 92, 246, 0.05);
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-icon.info { background: rgba(59, 130, 246, 0.15); color: var(--info); }
.notification-icon.success { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.notification-icon.warning { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.notification-icon.danger { background: rgba(239, 68, 68, 0.15); color: var(--danger); }

.notification-content h4 {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.notification-content p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.notification-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 5px;
}

/* ===== RESPONSIVE DASHBOARD ===== */
@media (max-width: 992px) {
    .dashboard-container {
        flex-direction: column;
    }

    .admin-sidebar,
    .student-sidebar {
        position: fixed;
        top: 80px;
        right: -280px;
        width: 260px;
        min-width: 260px;
        height: calc(100vh - 80px);
        max-height: calc(100vh - 80px);
        z-index: 1000;
        transition: var(--transition-slow);
        border-radius: 0;
        border-left: 1px solid var(--glass-border);
    }

    .admin-sidebar.active,
    .student-sidebar.active {
        right: 0;
    }

    .sidebar-toggle-btn {
        display: flex;
    }

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

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

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

    .profile-header-card {
        flex-direction: column;
        text-align: center;
    }

    .profile-meta {
        justify-content: center;
    }
}

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

    .quick-actions {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr !important;
    }

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

/* ===== SIDEBAR OVERLAY ===== */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

@media (max-width: 992px) {
    .admin-sidebar.active ~ .sidebar-overlay,
    .student-sidebar.active ~ .sidebar-overlay {
        display: block;
    }
}

/* ===== CHART PLACEHOLDER ===== */
.chart-container {
    position: relative;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-placeholder {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 200px;
    padding: 0 20px;
}

.chart-bar {
    width: 30px;
    background: var(--accent-gradient);
    border-radius: 4px 4px 0 0;
    transition: var(--transition);
    position: relative;
    opacity: 0.7;
}

.chart-bar:hover {
    opacity: 1;
    transform: scaleY(1.05);
    transform-origin: bottom;
}

.chart-bar-label {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
}
