/* --- TEACHER PANEL UNIVERSAL SYSTEM --- */
:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --bg-main: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #f1f5f9;
    --success: #10b981;
    --danger: #ef4444;
    --radius: 24px;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

/* --- Base Styles --- */
* { box-sizing: border-box; }
body { background-color: var(--bg-main); color: var(--text-main); font-family: 'Inter', system-ui, -apple-system, sans-serif; margin: 0; }

/* Layout & Container */
.teacher-container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 30px 20px; 
    width: 100%;
}

.glass-card { 
    background: var(--card-bg); 
    border: 1px solid var(--border); 
    border-radius: var(--radius); 
    box-shadow: var(--shadow); 
    padding: 30px; 
    width: 100%;
}

.page-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 30px; 
    gap: 20px;
    flex-wrap: wrap; /* Mobil uchun muhim */
}

.title { font-size: 28px; font-weight: 850; margin: 0; }
.subtitle { color: var(--text-muted); font-size: 14px; margin: 5px 0 0; }

.animate-in { animation: teacherFadeUp 0.5s ease-out; }
@keyframes teacherFadeUp { 
    from { opacity: 0; transform: translateY(15px); } 
    to { opacity: 1; transform: translateY(0); } 
}

/* --- Forms & Buttons --- */
.t-input { 
    width: 100%; 
    padding: 12px 16px; 
    border-radius: 12px; 
    border: 1.5px solid var(--border); 
    outline: none; 
    transition: 0.2s; 
    font-size: 14px;
}
.t-input:focus { border-color: var(--primary); background: #fff; }

.t-btn { 
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary); 
    color: #fff; 
    padding: 12px 24px; 
    border-radius: 12px; 
    border: none; 
    font-weight: 700; 
    cursor: pointer; 
    transition: 0.2s;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
}
.t-btn:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2); }

/* --- Table Responsiveness --- */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.t-table { width: 100%; border-collapse: collapse; min-width: 600px; }
.t-table th { text-align: left; padding: 15px; color: var(--text-muted); font-size: 11px; text-transform: uppercase; border-bottom: 1px solid var(--border); letter-spacing: 1px; }
.t-table td { padding: 15px; border-bottom: 1px solid var(--border); font-size: 14px; vertical-align: middle; }

/* --- Namespaced Elements --- */
.t-classes .class-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
    gap: 20px; 
}

.t-student-profile .stat-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 15px; 
}

/* --- RESPONSIVE MEDIA QUERIES --- */

/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
    .teacher-container { padding: 20px 15px; }
    .t-student-profile .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile Large (max-width: 768px) */
@media (max-width: 768px) {
    .page-header { flex-direction: column; align-items: flex-start; }
    .header-actions { width: 100%; display: flex; gap: 10px; }
    .header-actions .t-btn { flex: 1; justify-content: center; }
    
    .glass-card { padding: 20px; border-radius: 20px; }
    .title { font-size: 22px; }
    
    .t-student-profile .profile-top { flex-direction: column; text-align: center; }
    .t-student-profile .stat-grid { grid-template-columns: 1fr; }
}

/* Mobile Small (max-width: 480px) */
@media (max-width: 480px) {
    .t-classes .class-grid { grid-template-columns: 1fr; }
    
    /* 404 sahifasidagi katta raqam uchun */
    div[style*="font-size: 140px"] { font-size: 90px !important; }
    
    .t-btn { width: 100%; justify-content: center; }
}

/* Utility Badges */
.t-badge { 
    padding: 4px 10px; 
    border-radius: 8px; 
    font-size: 12px; 
    font-weight: 700; 
    display: inline-block;
}