/* ===================================================================
   Allem Tasad Academy - Teacher App Mobile Styles
   =================================================================== */

.teacher-hero {
    background: #163f5f;
    color: white;
    padding: 18px;
    border-radius: var(--border-radius);
    margin-bottom: 14px;
    position: relative;
    overflow: hidden;
}

.teacher-hero h2 {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.teacher-hero p {
    font-size: 0.82rem;
    opacity: 0.88;
    margin-bottom: 0;
    line-height: 1.4;
}

/* --- Student Row in Teacher View (Privacy Preserved) --- */
.student-privacy-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 6px;
}

.student-privacy-row .student-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.student-privacy-row .student-grade {
    font-size: 0.76rem;
    color: var(--text-muted);
}

/* --- Groups & Schedules Cards (Matching Website Behavior) --- */
.teacher-group-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.teacher-group-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
    margin-bottom: 10px;
}

.teacher-group-subject {
    font-size: 1rem;
    font-weight: 800;
    color: var(--secondary-color);
    line-height: 1.2;
    margin-bottom: 2px;
}

.teacher-group-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.teacher-group-info-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.84rem;
    margin-bottom: 6px;
    color: var(--text-color);
}

.teacher-group-info-row i {
    width: 16px;
    color: var(--primary-dark);
    text-align: center;
}

.seats-summary-box {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 6px 4px;
    margin: 10px 0;
    text-align: center;
}

.seat-column {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.seat-column:not(:last-child) {
    border-left: 1px solid var(--border-color);
}

.seat-val {
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--secondary-color);
}

.seat-lbl {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.seat-avail-green {
    color: #15803d !important;
}

.seat-avail-red {
    color: #dc2626 !important;
}

.teacher-group-actions {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.teacher-group-actions .btn {
    flex: 1;
    min-width: 80px;
    font-size: 0.78rem;
    padding: 6px 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

/* ===================================================================
   Responsive Desktop Layout Enhancements (>= 900px)
   =================================================================== */
@media (min-width: 900px) {
    body {
        padding-top: 80px;
        padding-bottom: 32px;
    }
    .mobile-header {
        height: 68px;
        padding: 0 32px;
    }
    .desktop-teacher-nav {
        display: flex !important;
        align-items: center;
        gap: 6px;
    }
    .desktop-nav-link {
        color: var(--secondary-color);
        font-weight: 700;
        font-size: 0.88rem;
        padding: 8px 12px;
        border-radius: 8px;
        text-decoration: none;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        transition: all 0.2s ease;
        background: transparent;
        border: none;
    }
    .desktop-nav-link:hover, .desktop-nav-link.active {
        background: #f1f5f9;
        color: var(--primary-dark);
    }
    .desktop-teacher-badge {
        display: inline-flex !important;
        align-items: center;
        gap: 6px;
    }
    .desktop-logout-btn {
        display: inline-flex !important;
    }
    .app-container {
        max-width: 1240px !important;
        padding: 24px 32px;
    }
    .bottom-nav {
        display: none !important;
    }
    .groups-grid, .sessions-grid, .teacher-cards-grid {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)) !important;
        gap: 16px !important;
    }
    /* Centered Modals for Desktop */
    .mobile-modal {
        align-items: center !important;
        justify-content: center !important;
        background: rgba(15, 23, 42, 0.6) !important;
        backdrop-filter: blur(4px) !important;
    }
    .mobile-modal-sheet {
        border-radius: 16px !important;
        max-width: 720px !important;
        width: 90% !important;
        margin: auto !important;
        max-height: 88vh !important;
        box-shadow: 0 20px 40px rgba(0,0,0,0.2) !important;
        animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }
    .sheet-handle {
        display: none !important;
    }
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

@media (max-width: 899px) {
    .desktop-teacher-nav {
        display: none !important;
    }
    .desktop-teacher-badge {
        display: none !important;
    }
    .desktop-logout-btn {
        display: none !important;
    }
}

