/* Основные стили */
body {
    background-color: #ffffff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    line-height: 1.6;
}

/* Верхнее меню */
.navbar-brand {
    color: #2e7d32 !important;
    font-weight: 600;
}

.navbar-nav .nav-link {
    color: #555 !important;
    font-weight: 400;
    transition: color 0.2s ease;
}

.navbar-nav .nav-link:hover {
    color: #2e7d32 !important;
}

/* Карточки предметов */
.subject-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    border: 1px solid #e8f5e8;
    border-radius: 8px;
    background: #ffffff;
}

.subject-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.1);
    border-color: #2e7d32;
}

.subject-card .card-body {
    padding: 1.25rem;
}

/* Статистические карточки */
.stat-card {
    background: linear-gradient(135deg, #f8fbf8 0%, #f1f8e9 100%);
    color: #2e7d32;
    border: none;
    border-radius: 8px;
    border-left: 2px solid #2e7d32;
}

.stat-card .card-body {
    padding: 1.25rem;
}

.stat-card h5 {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.stat-card h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0;
}

/* Таблица результатов */
.results-table {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e8f5e8;
}

.results-table thead {
    background-color: #f8fbf8;
}

.results-table th {
    border: none;
    font-weight: 500;
    color: #2e7d32;
    padding: 0.875rem;
    border-bottom: 1px solid #e8f5e8;
}

.results-table td {
    padding: 0.875rem;
    vertical-align: middle;
    border-color: #f8fbf8;
}

/* Заголовки разделов */
.section-title {
    color: #2e7d32;
    font-weight: 500;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e8f5e8;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 1px;
    background: #2e7d32;
}

/* Стили для отображения баллов */
.score-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    display: inline-block;
    min-width: 50px;
}

.score-zero {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.score-max {
    background-color: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.score-partial {
    background-color: #fff3e0;
    color: #ef6c00;
    border: 1px solid #ffe0b2;
}

.not-attempted {
    font-size: 0.9rem;
    padding: 0.375rem 0.75rem;
    background-color: #f5f5f5;
    color: #757575;
    border-radius: 6px;
    display: inline-block;
    min-width: 50px;
    border: 1px solid #e0e0e0;
}

/* Хлебные крошки */
.breadcrumb {
    background-color: #f8fbf8;
    border-radius: 6px;
    padding: 0.625rem 1rem;
    border: 1px solid #e8f5e8;
}

.breadcrumb-item a {
    color: #2e7d32;
    text-decoration: none;
    font-weight: 400;
}

.breadcrumb-item.active {
    color: #666;
}

/* Кнопки */
.btn-outline-primary {
    color: #2e7d32;
    border-color: #2e7d32;
    font-weight: 400;
}

.btn-outline-primary:hover {
    background-color: #2e7d32;
    border-color: #2e7d32;
    color: white;
}

/* Стили для учительского интерфейса */
.teacher-card {
    border: 1px solid #e8f5e8 !important;
    border-left: 2px solid #2e7d32 !important;
}

.teacher-card .card-body {
    padding: 1rem;
}

/* Таблицы для учителя */
.table-teacher {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e8f5e8;
}

.table-teacher thead {
    background: linear-gradient(135deg, #f8fbf8 0%, #f1f8e9 100%);
}

.table-teacher th {
    color: #2e7d32;
    font-weight: 500;
    border-bottom: 1px solid #e8f5e8;
    padding: 0.875rem;
}

.table-teacher td {
    padding: 0.875rem;
    border-color: #f8fbf8;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: #fafefa;
}

/* Цвета для текста */
.text-success { color: #2e7d32 !important; }
.text-primary { color: #1b5e20 !important; }
.text-warning { color: #f57c00 !important; }
.text-danger { color: #c62828 !important; }
.text-muted { color: #666 !important; }

/* Адаптивность */
@media (max-width: 768px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .stat-card h2 {
        font-size: 1.5rem;
    }
    
    .results-table,
    .table-teacher {
        font-size: 0.8rem;
    }
    
    .score-badge,
    .not-attempted {
        padding: 0.3rem 0.6rem;
        font-size: 0.85rem;
        min-width: 45px;
    }
    
    .table th, 
    .table td {
        padding: 0.625rem;
    }
}

/* Ховер-эффекты */
.table-hover tbody tr:hover {
    background-color: #f8fbf8 !important;
}

/* Утилитарные классы */
.bg-light {
    background-color: #f8fbf8 !important;
}

.border-light {
    border-color: #e8f5e8 !important;
}

/* Бейджи */
.badge {
    font-weight: 400;
}

/* Заголовки страниц */
h1, h2, h3, h4, h5, h6 {
    font-weight: 500;
}

/* Стили для формы добавления результата */
.task-row td {
    vertical-align: middle;
}

.score-input {
    text-align: center;
    max-width: 80px;
    margin: 0 auto;
}

.form-check-input {
    transform: scale(1.2);
}

.is-invalid {
    border-color: #dc3545 !important;
}

/* Адаптивность для таблицы заданий */
@media (max-width: 768px) {
    .table-responsive table {
        font-size: 0.8rem;
    }
    
    .score-input {
        max-width: 60px;
        font-size: 0.8rem;
    }
}