* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: Arial, sans-serif; background: #f0f2f5; }
.teacher-container { max-width: 1400px; margin: 20px auto; padding: 20px; }
.teacher-header { 
    background: linear-gradient(135deg, #2196F3, #1976D2); 
    color: white; 
    padding: 20px; 
    border-radius: 10px; 
    margin-bottom: 20px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}
.teacher-header h1 { font-size: 24px; }
.logout-btn { 
    background: #ff4444; 
    color: white; 
    padding: 10px 20px; 
    border-radius: 5px; 
    text-decoration: none; 
    font-weight: bold;
}
.tabs { 
    display: flex; 
    gap: 5px; 
    margin-bottom: 20px; 
    flex-wrap: wrap;
    background: white;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.tab { 
    padding: 12px 20px; 
    background: #e0e0e0; 
    border-radius: 5px; 
    cursor: pointer; 
    font-weight: bold;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.tab:hover { background: #d0d0d0; }
.tab.active { 
    background: #2196F3; 
    color: white;
    box-shadow: 0 3px 10px rgba(33,150,243,0.3);
}
.tab-content { 
    display: none; 
    background: white; 
    padding: 30px; 
    border-radius: 10px; 
    box-shadow: 0 2px 15px rgba(0,0,0,0.1); 
    margin-bottom: 20px;
    min-height: 500px;
}
.tab-content.active { display: block; }
.form-group { margin-bottom: 20px; }
label { display: block; margin-bottom: 8px; font-weight: bold; color: #333; }
input, textarea, select { 
    width: 100%; 
    padding: 12px; 
    border: 1px solid #ddd; 
    border-radius: 5px; 
    font-size: 14px;
}
textarea { min-height: 100px; resize: vertical; }
.btn { 
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px; 
    border: none; 
    border-radius: 5px; 
    font-weight: bold; 
    cursor: pointer; 
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}
.save-btn { background: #4CAF50; color: white; }
.save-btn:hover { background: #45a049; }
.cancel-btn { background: #f44336; color: white; }
.cancel-btn:hover { background: #d32f2f; }
.add-btn { background: #2196F3; color: white; }
.add-btn:hover { background: #1976D2; }
.message { 
    background: #d4edda; 
    color: #155724; 
    padding: 15px; 
    border-radius: 5px; 
    margin-bottom: 20px; 
    border: 1px solid #c3e6cb;
}
.error { 
    background: #f8d7da; 
    color: #721c24; 
    padding: 15px; 
    border-radius: 5px; 
    margin-bottom: 20px; 
    border: 1px solid #f5c6cb;
}

/* Dashboard стили */
.dashboard-cards { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 20px; 
    margin-top: 20px; 
}
.dashboard-card { 
    background: white; 
    padding: 20px; 
    border-radius: 10px; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-top: 4px solid #2196F3;
}
.dashboard-card h3 { 
    color: #2196F3; 
    margin-bottom: 15px; 
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}
.stat-value { font-size: 32px; font-weight: bold; color: #1976D2; text-align: center; margin: 10px 0; }
.info-item { margin-bottom: 12px; padding: 10px; background: #f8f9fa; border-radius: 5px; }
.info-label { font-weight: bold; color: #666; font-size: 12px; margin-bottom: 3px; }
.info-value { color: #333; }

/* Расписание */
.schedule-container { margin-top: 20px; }
.schedule-grid { 
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin-top: 20px;
}
.schedule-day { 
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    border: 2px solid #e0e0e0;
}
.schedule-day h4 { 
    text-align: center; 
    color: #2196F3; 
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #2196F3;
}
.schedule-lesson { 
    background: white;
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 5px;
    border-left: 3px solid #4CAF50;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.lesson-time { font-size: 11px; color: #666; }
.lesson-subject { font-weight: bold; color: #333; margin: 3px 0; }
.lesson-info { font-size: 12px; color: #777; }
.lesson-actions { margin-top: 5px; }
.btn-small { 
    padding: 4px 8px; 
    font-size: 11px; 
    margin-right: 5px;
    border-radius: 3px;
}
.btn-delete { background: #f44336; color: white; }

/* Таблицы */
.table-container {
    overflow-x: auto;
    margin-top: 20px;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}
.data-table th {
    background: #2196F3;
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: bold;
}
.data-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}
.data-table tr:hover {
    background: #f5f5f5;
}
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
}
.status-public { background: #4CAF50; color: white; }
.status-private { background: #ff9800; color: white; }
.file-icon {
    font-size: 20px;
    margin-right: 10px;
}
.due-date {
    font-weight: bold;
    color: #f44336;
}
.file-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #2196F3;
    text-decoration: none;
}
.file-link:hover {
    text-decoration: underline;
}

/* Формы */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}
.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}
.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Добавочные формы */
.add-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    border: 1px solid #ddd;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .schedule-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .schedule-grid { grid-template-columns: repeat(2, 1fr); }
    .form-row { flex-direction: column; }
    .teacher-header { flex-direction: column; gap: 15px; text-align: center; }
    .tabs { justify-content: center; }
    .tab { padding: 10px 15px; }
}
@media (max-width: 480px) {
    .schedule-grid { grid-template-columns: 1fr; }
    .dashboard-cards { grid-template-columns: 1fr; }
    .tab { padding: 8px 12px; font-size: 13px; }
    .btn { padding: 10px 15px; font-size: 13px; }
}