﻿/* ── Student Dashboard Specific Styles ──────────────────────
   Extends the shared admin dashboard CSS.
   Import AFTER your main dashboard.css
   ─────────────────────────────────────────────────────────── */

/* ── Mid Grid: Lab Cards + Right Column ────────────────────── */
.std-mid-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 16px;
    margin-bottom: 16px;
}

.std-right-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── Bottom Grid: Monthly + Completed ─────────────────────── */
.std-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

/* ── Section Card (shared wrapper) ───────────────────────── */
.std-section-card {
    display: flex;
    flex-direction: column;
}

    .std-section-card .card-header {
        display: flex;
        align-items: center;
        gap: 8px;
    }

        .std-section-card .card-header h3 {
            flex: 1;
        }

/* ── Header Badges ────────────────────────────────────────── */
.header-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 11px;
    font-size: 11px;
    font-weight: 700;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.badge-danger {
    background: #fee2e2;
    color: #dc2626;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-pending {
    background: #fef3c7;
    color: #d97706;
}

/* ── Lab Progress Items ───────────────────────────────────── */
.std-lab-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    overflow-y: auto;
    max-height: 480px;
}

    .std-lab-list::-webkit-scrollbar {
        width: 6px;
    }

    .std-lab-list::-webkit-scrollbar-track {
        background: transparent;
    }

    .std-lab-list::-webkit-scrollbar-thumb {
        background: var(--border-dark, #e2e8f0);
        border-radius: 10px;
    }

.std-lab-item {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: background 0.12s;
}

    .std-lab-item:last-child {
        border-bottom: none;
    }

    .std-lab-item:hover {
        background: #f8f9fc;
    }

.std-lab-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.std-lab-name-row {
    display: flex;
    align-items: center;
    gap: 7px;
    flex: 1;
}

.std-lab-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

.std-lab-pct {
    font-size: 16px;
    font-weight: 800;
    min-width: 42px;
    text-align: right;
}

.std-lab-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
}

.std-lab-status {
    font-weight: 600;
    font-size: 11px;
}

.text-success {
    color: var(--success);
}

.text-info {
    color: var(--info);
}

.text-warning {
    color: var(--warning);
}

/* ── Session Attendance Dots ──────────────────────────────── */
.session-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.session-dot-sm {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    cursor: default;
    flex-shrink: 0;
    transition: transform 0.15s;
}

    .session-dot-sm:hover {
        transform: scale(1.4);
    }

.dot-present {
    background: var(--success);
}

.dot-absent {
    background: var(--danger);
}

.dot-upcoming {
    background: transparent;
    border: 1.5px solid var(--border-dark, #94a3b8);
}

/* ── Days Badge (Upcoming) ────────────────────────────────── */
.std-days-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
    background: #eff6ff;
    color: var(--info, #2563eb);
    white-space: nowrap;
}

/* ── Monthly Report Bars ──────────────────────────────────── */
.monthly-bars {
    padding: 12px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    max-height: 320px;
}

    .monthly-bars::-webkit-scrollbar {
        width: 4px;
    }

    .monthly-bars::-webkit-scrollbar-thumb {
        background: var(--border-dark, #e2e8f0);
        border-radius: 4px;
    }

.monthly-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.monthly-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    width: 52px;
    flex-shrink: 0;
}

.monthly-track {
    flex: 1;
    height: 10px;
    background: var(--border, #e9ecef);
    border-radius: 5px;
    overflow: hidden;
}

.monthly-fill {
    height: 100%;
    background: #dbeafe;
    border-radius: 5px;
    position: relative;
    transition: width 0.5s ease;
}

.monthly-attended {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: var(--info, #2563eb);
    border-radius: 5px;
    transition: width 0.5s ease;
}

.monthly-meta {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-main);
    min-width: 70px;
    text-align: right;
}

/* ── Session List scroll ──────────────────────────────────── */
.session-list::-webkit-scrollbar {
    width: 6px;
}

.session-list::-webkit-scrollbar-track {
    background: transparent;
}

.session-list::-webkit-scrollbar-thumb {
    background: var(--border-dark, #e2e8f0);
    border-radius: 10px;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1100px) {
    .std-mid-grid {
        grid-template-columns: 1fr;
    }

    .std-right-col {
        flex-direction: row;
    }

        .std-right-col .card {
            flex: 1;
        }
}

@media (max-width: 900px) {
    .std-bottom-grid {
        grid-template-columns: 1fr;
    }

    .std-right-col {
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    .std-mid-grid,
    .std-bottom-grid {
        grid-template-columns: 1fr;
    }

    .std-right-col {
        flex-direction: column;
    }
}
