* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #eef2f5;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Segoe UI', 'Roboto', 'Arial', sans-serif;
}

.header {
    background: #1e3a5f;
    border-bottom: 2px solid #ff8c42;
    padding: 8px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 24px;
    color: #ff8c42;
}

.logo-text {
    font-size: 16px;
    font-weight: 600;
    color: white;
    letter-spacing: 0.5px;
}

.logo-sub {
    font-size: 10px;
    color: #8ba0bc;
    margin-top: 2px;
}

.school-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #0f2b44;
    padding: 4px 16px;
    border-radius: 6px;
}

.school-label {
    font-size: 11px;
    font-weight: 600;
    color: #8ba0bc;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.school-select {
    padding: 5px 10px;
    border: 1px solid #2c4c7c;
    border-radius: 3px;
    font-size: 12px;
    min-width: 260px;
    background: white;
    font-family: inherit;
}

.school-select:focus {
    outline: none;
    border-color: #ff8c42;
}

.checkbox-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    cursor: pointer;
    color: #8ba0bc;
    background: #0f2b44;
    padding: 4px 12px;
    border-radius: 6px;
}

.checkbox-header input {
    cursor: pointer;
}

.stats-badge-header {
    background: #2c4c7c;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 500;
    color: white;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn {
    padding: 5px 14px;
    border: none;
    border-radius: 3px;
    background: #2c4c7c;
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    color: white;
    font-weight: 500;
}

.btn:hover {
    background: #ff8c42;
}

.btn-save {
    background: #198754;
}

.btn-save:hover {
    background: #146c43;
}

.btn-sm {
    padding: 4px 12px;
    font-size: 11px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #0f2b44;
    padding: 4px 12px;
    border-radius: 20px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e74c3c;
}

.status-dot.active {
    background: #2ecc71;
}

.status-text {
    font-size: 11px;
    color: #8ba0bc;
}

.tabs {
    display: flex;
    background: white;
    border-bottom: 1px solid #dce4ec;
    padding: 0 20px;
    gap: 4px;
}

.tab {
    padding: 10px 20px;
    font-size: 12px;
    font-weight: 600;
    color: #5f7f9e;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.tab:hover {
    color: #1e3a5f;
}

.tab.active {
    color: #ff8c42;
    border-bottom-color: #ff8c42;
}

.tab-badge {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
}

.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #f5f7fa;
}

.pane {
    display: none;
    height: 100%;
    flex-direction: column;
    overflow: hidden;
}

.pane.active {
    display: flex;
}

.details-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
    gap: 1px;
    background: #e5e9f0;
}

.details-table-section {
    flex: 3;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: white;
}

.details-comments-section {
    flex: 1;
    min-width: 320px;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    background: white;
    border-left: 1px solid #e5e9f0;
}

.comments-header {
    background: #f8fafc;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e9f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comments-header h4 {
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.comments-count {
    background: #ff8c42;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
}

.comments-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.comment-item {
    background: #f8fafc;
    border-left: 3px solid #ff8c42;
    padding: 10px 12px;
    margin-bottom: 12px;
    border-radius: 6px;
    font-size: 12px;
}

.comment-text {
    color: #2c3e50;
    line-height: 1.4;
    margin-bottom: 6px;
    word-wrap: break-word;
}

.comment-meta {
    font-size: 10px;
    color: #8ba0bc;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comment-date {
    font-family: monospace;
}

.delete-comment {
    cursor: pointer;
    color: #dc3545;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.delete-comment:hover {
    opacity: 1;
}

.comment-input-area {
    padding: 12px;
    border-top: 1px solid #e5e9f0;
    background: #fafbfd;
}

.comment-input-area textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    font-size: 12px;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
}

.comment-input-area textarea:focus {
    outline: none;
    border-color: #ff8c42;
}

.comment-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 10px;
}

.no-comments {
    text-align: center;
    padding: 40px 20px;
    color: #8ba0bc;
    font-size: 12px;
}

.action-bar {
    background: #f8f9fa;
    padding: 8px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid #e5e9f0;
    flex-wrap: wrap;
}

.action-group {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 4px 12px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.action-label {
    font-size: 11px;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
}

.status-select {
    padding: 4px 8px;
    border: 1px solid #ced4da;
    border-radius: 3px;
    font-size: 11px;
    background: white;
    cursor: pointer;
}

.subnav {
    background: #fafbfd;
    padding: 0 20px;
    display: flex;
    gap: 4px;
    border-bottom: 1px solid #e5e9f0;
}

.subnav-item {
    padding: 7px 16px;
    font-size: 12px;
    font-weight: 500;
    color: #6c7e9a;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.subnav-item:hover {
    color: #1e3a5f;
}

.subnav-item.active {
    color: #ff8c42;
    border-bottom-color: #ff8c42;
}

.info-panel {
    background: #fafbfd;
    padding: 6px 20px;
    display: flex;
    align-items: center;
    gap: 24px;
    border-bottom: 1px solid #e5e9f0;
    font-size: 11px;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-label {
    font-weight: 600;
    color: #5f7f9e;
    text-transform: uppercase;
    font-size: 10px;
}

.info-value {
    color: #2c3e50;
    font-weight: 500;
}

.table-wrapper {
    flex: 1;
    overflow: auto;
    background: white;
    display: inline-block;
    width: auto;
    min-width: 100%;
}

.table-container {
    display: inline-block;
    min-width: 100%;
}

table {
    border-collapse: collapse;
    font-family: 'Segoe UI', 'Roboto', monospace;
    width: auto;
    white-space: nowrap;
}

th {
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid #e2e8f0;
    border-right: 1px solid #f1f5f9;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

td {
    border-bottom: 1px solid #f0f2f5;
    border-right: 1px solid #f8fafc;
    color: #1e293b;
    position: relative;
}

td.center {
    text-align: center;
}

td.clickable {
    cursor: pointer;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 2px;
}

td.clickable:hover {
    background-color: #fef9e6;
    color: #ff8c42;
}

td.editable {
    background-color: #fffef7;
    cursor: pointer;
    transition: background-color 0.1s;
    box-sizing: border-box;
}

td.editable:hover {
    background-color: #fff8e7;
}

td.editing {
    background-color: #fff8e7;
    overflow: hidden;
}

td.editing div {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
}

td.editing input {
    width: 100%;
    height: 100%;
    padding: 0 2px;
    border: 1px solid #ff8c42;
    border-radius: 2px;
    font-family: monospace;
    text-align: right;
    background: white;
    outline: none;
    box-sizing: border-box;
}

tr:hover td {
    background-color: #fef9e6;
}

tr:nth-child(even) {
    background-color: #fefefe;
}

tr.no-data {
    display: none;
}

tr.hide-average {
    display: none;
}

.row-label {
    background: white;
    font-weight: 500;
    position: sticky;
    left: 0;
    z-index: 10;
    border-right: 1px solid #e2e8f0;
    text-align: left;
    white-space: normal;
    word-break: break-word;
    line-height: 1.3;
}

.row-code {
    background: #fafcff;
    font-weight: 500;
    text-align: center;
    position: sticky;
    left: 200px;
    z-index: 10;
    border-right: 1px solid #e2e8f0;
    font-family: monospace;
}

.total-row {
    background-color: #fffbf0 !important;
    font-weight: 600;
}

.total-row td {
    background-color: #fffbf0;
    font-weight: 600;
}

.total-column {
    background-color: #fff8e7 !important;
    font-weight: 600;
}

td:empty::before {
    content: "\2014";
    color: #94a3b8;
}

.report-status {
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
    display: inline-block;
    text-align: center;
    min-width: 80px;
}

.report-status.check {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.report-status.approved {
    background: #1e7e34;
    color: white;
    border: 1px solid #155724;
}

.report-status.saved {
    background: white;
    color: #495057;
    border: 1px solid #dee2e6;
}

.report-status.rework {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.report-status.no-data {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.footer {
    background: white;
    border-top: 1px solid #e5e9f0;
    padding: 6px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 10px;
    color: #6c7e9a;
}

.badge {
    background: #f0f2f5;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 10px;
}

.editor-panel {
    background: white;
    margin: 12px;
    border-radius: 6px;
    border: 1px solid #e5e9f0;
    overflow: hidden;
}

.editor-header {
    background: #f8fafc;
    padding: 10px 16px;
    border-bottom: 1px solid #e5e9f0;
    font-size: 12px;
    font-weight: 600;
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.add-form {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    background: white;
    border-bottom: 1px solid #e5e9f0;
}

.add-form input {
    padding: 6px 10px;
    border: 1px solid #d0d7de;
    border-radius: 3px;
    font-size: 12px;
    font-family: inherit;
}

.add-form input:first-child {
    flex: 1;
}

.add-form input:nth-child(2) {
    width: 120px;
}

.add-form input:focus {
    outline: none;
    border-color: #ff8c42;
}

.schools-list {
    max-height: calc(100vh - 220px);
    overflow-y: auto;
}

.school-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    border-bottom: 1px solid #f0f2f5;
}

.school-row:hover {
    background: #fef9e6;
}

.school-name {
    flex: 1;
    font-size: 12px;
}

.school-inn {
    font-family: monospace;
    font-size: 11px;
    color: #5f7f9e;
    min-width: 100px;
}

.edit-input {
    padding: 4px 8px;
    border: 1px solid #d0d7de;
    border-radius: 3px;
    font-size: 11px;
    margin-right: 6px;
    width: 200px;
}

.filters-panel {
    background: white;
    border-bottom: 1px solid #e5e9f0;
    padding: 12px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-group label {
    font-size: 10px;
    font-weight: 600;
    color: #5f7f9e;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.filter-group input, 
.filter-group select {
    padding: 5px 8px;
    border: 1px solid #d0d7de;
    border-radius: 3px;
    font-size: 11px;
    min-width: 140px;
    font-family: inherit;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: #ff8c42;
}

.filter-group .status-badge-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.status-filter-btn {
    padding: 4px 10px;
    border: 1px solid #dee2e6;
    border-radius: 15px;
    background: white;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.status-filter-btn:hover {
    background: #f8f9fa;
    border-color: #ff8c42;
}

.status-filter-btn.active {
    background: #ff8c42;
    color: white;
    border-color: #ff8c42;
}

.filter-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.cache-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    color: #5f7f9e;
    padding: 3px 8px;
    background: #f0f2f5;
    border-radius: 12px;
}

.cache-info.updating {
    background: #fff4e6;
    color: #c2410c;
}

.progress-bar {
    height: 2px;
    background: #e2e8f0;
}

.progress-fill {
    height: 100%;
    background: #ff8c42;
    width: 0%;
    transition: width 0.3s;
}

.loader {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loader.active {
    display: flex;
}

.loader-content {
    background: white;
    padding: 16px 24px;
    border-radius: 6px;
    text-align: center;
    font-size: 12px;
    color: #2c3e50;
}

.loader-spinner {
    border: 2px solid #e2e8f0;
    border-top: 2px solid #ff8c42;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 0.6s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    border-left: 3px solid #ff8c42;
    padding: 10px 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateX(400px);
    transition: transform 0.3s;
    z-index: 1001;
    font-size: 12px;
    border-radius: 3px;
}

.toast.show {
    transform: translateX(0);
}

.toast.error {
    border-left-color: #e74c3c;
}

.table-wrapper::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.table-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.changed {
    background-color: #fff3cd !important;
}

.saving-indicator {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: #2c3e50;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    display: none;
    z-index: 1000;
}

.saving-indicator.active {
    display: block;
}

.cell-value {
    display: inline-block;
    width: 100%;
    min-height: 18px;
}

/* ========== СТИЛИ ДЛЯ РАЗМЕРОВ ШРИФТА ========== */

.data-table {
    transition: all 0.2s ease;
}

/* Маленький размер шрифта */
.data-table.font-small {
    font-size: 10px;
}

.data-table.font-small th {
    font-size: 9px;
    padding: 4px 6px;
}

.data-table.font-small td {
    font-size: 9px;
    padding: 3px 5px;
}

.data-table.font-small .row-label {
    font-size: 9px;
    min-width: 180px;
    max-width: 180px;
}

.data-table.font-small .row-code {
    font-size: 8px;
    min-width: 35px;
}

.data-table.font-small td.editing input {
    font-size: 9px;
}

/* Средний размер шрифта (по умолчанию) */
.data-table.font-normal {
    font-size: 12px;
}

.data-table.font-normal th {
    font-size: 11px;
    padding: 6px 8px;
}

.data-table.font-normal td {
    font-size: 11px;
    padding: 5px 7px;
}

.data-table.font-normal .row-label {
    font-size: 11px;
    min-width: 200px;
    max-width: 200px;
}

.data-table.font-normal .row-code {
    font-size: 10px;
    min-width: 40px;
}

.data-table.font-normal td.editing input {
    font-size: 11px;
}

/* Большой размер шрифта */
.data-table.font-large {
    font-size: 14px;
}

.data-table.font-large th {
    font-size: 13px;
    padding: 8px 10px;
}

.data-table.font-large td {
    font-size: 13px;
    padding: 7px 9px;
}

.data-table.font-large .row-label {
    font-size: 13px;
    min-width: 220px;
    max-width: 220px;
}

.data-table.font-large .row-code {
    font-size: 12px;
    min-width: 45px;
}

.data-table.font-large td.editing input {
    font-size: 13px;
}

/* Очень большой размер шрифта */
.data-table.font-xlarge {
    font-size: 16px;
}

.data-table.font-xlarge th {
    font-size: 15px;
    padding: 10px 12px;
}

.data-table.font-xlarge td {
    font-size: 15px;
    padding: 9px 11px;
}

.data-table.font-xlarge .row-label {
    font-size: 15px;
    min-width: 240px;
    max-width: 240px;
}

.data-table.font-xlarge .row-code {
    font-size: 14px;
    min-width: 50px;
}

.data-table.font-xlarge td.editing input {
    font-size: 15px;
}

/* Подсветка строки и столбца при наведении */
.table-wrapper {
    position: relative;
    overflow: auto;
}

.data-table td, 
.data-table th {
    transition: background-color 0.1s ease;
}

/* Подсветка строки при наведении */
.data-table tr:hover td {
    background-color: #fff3e0 !important;
}

/* Для зафиксированных столбцов при наведении на строку */
.data-table tr:hover .row-label,
.data-table tr:hover .row-code {
    background-color: #fff3e0 !important;
}

/* Подсветка столбца при наведении на ячейку (CSS только для текущей ячейки) */
.data-table td:hover {
    background-color: #ffe6b3 !important;
    cursor: pointer;
}

/* Подсветка столбца через JavaScript (для всех ячеек в столбце) */
.data-table td.column-hover {
    background-color: #ffe6b3 !important;
}

.data-table th.column-hover {
    background-color: #ffd966 !important;
}

/* Для зафиксированных столбцов */
.data-table .row-label,
.data-table .row-code {
    background-color: #f8f9fa;
    position: sticky;
    z-index: 15;
}

.data-table .row-label {
    left: 0;
}

.data-table .row-code {
    left: 200px;
}

/* Для ячеек, которые уже имеют класс changed, сохраняем их цвет при наведении */
.data-table td.changed {
    background-color: #fff3cd !important;
}

.data-table td.changed:hover,
.data-table td.changed.column-hover {
    background-color: #ffe6b3 !important;
}

/* Для итоговых строк и столбцов */
.data-table .total-row td,
.data-table .total-column {
    background-color: #fffbf0 !important;
}

.data-table .total-row td:hover,
.data-table .total-column:hover,
.data-table .total-row td.column-hover,
.data-table .total-column.column-hover {
    background-color: #ffe6b3 !important;
}

.data-table tr.total-row:hover td {
    background-color: #fff3e0 !important;
}

/* Для заголовков таблицы при наведении */
.data-table th {
    background-color: #f8fafc;
}

.data-table th:hover {
    background-color: #ffd966 !important;
    cursor: pointer;
}
/* ========== СТИЛИ ДЛЯ РАЗМЕРОВ ШРИФТА ДЛЯ ВСЕХ ТАБЛИЦ ========== */

/* Базовые стили для всех таблиц */
.data-table {
    transition: all 0.2s ease;
}

/* Маленький размер шрифта */
.data-table.font-small,
.history-table.font-small,
.schools-table.font-small {
    font-size: 10px;
}

.data-table.font-small th,
.history-table.font-small th,
.schools-table.font-small th {
    font-size: 9px;
    padding: 4px 6px;
}

.data-table.font-small td,
.history-table.font-small td,
.schools-table.font-small td {
    font-size: 9px;
    padding: 3px 5px;
}

.data-table.font-small .row-label,
.history-table.font-small .row-label,
.schools-table.font-small .row-label {
    font-size: 9px;
    min-width: 180px;
    max-width: 180px;
}

.data-table.font-small .row-code,
.history-table.font-small .row-code,
.schools-table.font-small .row-code {
    font-size: 8px;
    min-width: 35px;
}

.data-table.font-small td.editing input {
    font-size: 9px;
}

/* Средний размер шрифта (по умолчанию) */
.data-table.font-normal,
.history-table.font-normal,
.schools-table.font-normal {
    font-size: 12px;
}

.data-table.font-normal th,
.history-table.font-normal th,
.schools-table.font-normal th {
    font-size: 11px;
    padding: 6px 8px;
}

.data-table.font-normal td,
.history-table.font-normal td,
.schools-table.font-normal td {
    font-size: 11px;
    padding: 5px 7px;
}

.data-table.font-normal .row-label,
.history-table.font-normal .row-label,
.schools-table.font-normal .row-label {
    font-size: 11px;
    min-width: 200px;
    max-width: 200px;
}

.data-table.font-normal .row-code,
.history-table.font-normal .row-code,
.schools-table.font-normal .row-code {
    font-size: 10px;
    min-width: 40px;
}

.data-table.font-normal td.editing input {
    font-size: 11px;
}

/* Большой размер шрифта */
.data-table.font-large,
.history-table.font-large,
.schools-table.font-large {
    font-size: 14px;
}

.data-table.font-large th,
.history-table.font-large th,
.schools-table.font-large th {
    font-size: 13px;
    padding: 8px 10px;
}

.data-table.font-large td,
.history-table.font-large td,
.schools-table.font-large td {
    font-size: 13px;
    padding: 7px 9px;
}

.data-table.font-large .row-label,
.history-table.font-large .row-label,
.schools-table.font-large .row-label {
    font-size: 13px;
    min-width: 220px;
    max-width: 220px;
}

.data-table.font-large .row-code,
.history-table.font-large .row-code,
.schools-table.font-large .row-code {
    font-size: 12px;
    min-width: 45px;
}

.data-table.font-large td.editing input {
    font-size: 13px;
}

/* Очень большой размер шрифта */
.data-table.font-xlarge,
.history-table.font-xlarge,
.schools-table.font-xlarge {
    font-size: 16px;
}

.data-table.font-xlarge th,
.history-table.font-xlarge th,
.schools-table.font-xlarge th {
    font-size: 15px;
    padding: 10px 12px;
}

.data-table.font-xlarge td,
.history-table.font-xlarge td,
.schools-table.font-xlarge td {
    font-size: 15px;
    padding: 9px 11px;
}

.data-table.font-xlarge .row-label,
.history-table.font-xlarge .row-label,
.schools-table.font-xlarge .row-label {
    font-size: 15px;
    min-width: 240px;
    max-width: 240px;
}

.data-table.font-xlarge .row-code,
.history-table.font-xlarge .row-code,
.schools-table.font-xlarge .row-code {
    font-size: 14px;
    min-width: 50px;
}

.data-table.font-xlarge td.editing input {
    font-size: 15px;
}
/* Стили для фокусированной ячейки */
.data-table td.focused-cell {
    outline: 2px solid #ff8c42;
    outline-offset: -1px;
    background-color: #fff8e7 !important;
    position: relative;
    z-index: 25;
}

/* Подсветка строки при фокусе на ячейке */
.data-table tr:has(td.focused-cell) td {
    background-color: #fff3e0 !important;
}

.data-table tr:has(td.focused-cell) .row-label,
.data-table tr:has(td.focused-cell) .row-code {
    background-color: #fff3e0 !important;
}

/* Подсветка столбца при фокусе на ячейке */
.data-table td.column-hover {
    background-color: #ffe6b3 !important;
}

.data-table th.column-hover {
    background-color: #ffd966 !important;
}

/* Для ячеек, которые уже имеют класс changed, сохраняем их цвет при фокусе */
.data-table td.changed.focused-cell {
    background-color: #ffe6b3 !important;
}

/* Анимация для плавного перехода */
.data-table td {
    transition: background-color 0.1s ease, outline 0.1s ease;
}
/* Подсветка строки при фокусе на ячейке */
.data-table tr.row-focused td {
    background-color: #fff3e0 !important;
}

.data-table tr.row-focused .row-label,
.data-table tr.row-focused .row-code {
    background-color: #fff3e0 !important;
}
/* Стили для курсоров в зависимости от типа ячейки */

/* Редактируемые ячейки - курсор в виде текстового указателя (как в Excel) */
.data-table td.editable {
    cursor: text;
    background-color: #fffef7;
}

.data-table td.editable:hover {
    background-color: #fff8e7;
}

/* Нередактируемые ячейки (итоговые, средние, суммарные столбцы) - курсор-запрет */
.data-table td:not(.editable) {
    cursor: not-allowed;
    background-color: #fafbfd;
}

.data-table td:not(.editable):hover {
    background-color: #f5f6f8;
}

/* Заголовки таблицы - курсор по умолчанию */
.data-table th {
    cursor: default;
    background-color: #f8fafc;
}

.data-table th:hover {
    background-color: #f0f2f5;
}

/* Строка с кодом и названием - не редактируются */
.data-table .row-label,
.data-table .row-code {
    cursor: default;
    background-color: #f8fafc;
}

.data-table .row-label:hover,
.data-table .row-code:hover {
    background-color: #f0f2f5;
}

/* Итоговые строки и столбцы */
.data-table .total-row td:not(.editable) {
    cursor: not-allowed;
}

.data-table .total-column {
    cursor: not-allowed;
}

/* Ячейки в режиме редактирования */
.data-table td.editing {
    cursor: text;
}

.data-table td.editing input {
    cursor: text;
}

/* Фокусированная ячейка */
.data-table td.focused-cell {
    outline: 2px solid #ff8c42;
    outline-offset: -1px;
    background-color: #fff8e7 !important;
    position: relative;
    z-index: 25;
}

/* Подсветка строки при фокусе */
.data-table tr.row-focused td {
    background-color: #fff3e0 !important;
}

.data-table tr.row-focused .row-label,
.data-table tr.row-focused .row-code {
    background-color: #fff3e0 !important;
}

/* Подсветка столбца при наведении или фокусе */
.data-table td.column-hover,
.data-table th.column-hover {
    background-color: #ffe6b3 !important;
}

/* Для ячеек, которые уже имеют класс changed */
.data-table td.changed {
    background-color: #fff3cd !important;
}

.data-table td.changed:hover {
    background-color: #ffe6b3 !important;
}

.data-table td.changed.focused-cell {
    background-color: #ffe6b3 !important;
}
/* Стили для подсказок при наведении */
.data-table td {
    position: relative;
}

.data-table td[title] {
    cursor: help;
}

.data-table td.editable[title] {
    cursor: text;
}

.data-table td:not(.editable)[title] {
    cursor: not-allowed;
}
/* Стили для ячеек с ошибками валидации */
.data-table td.validation-error {
    background-color: #ffebee !important;
    border: 1px solid #f44336 !important;
    box-shadow: inset 0 0 0 1px #f44336;
    position: relative;
}

.data-table td.validation-error:hover {
    background-color: #ffcdd2 !important;
}

.data-table td.validation-error.focused-cell {
    outline: 2px solid #f44336;
    outline-offset: -1px;
    background-color: #ffcdd2 !important;
}

.data-table td.validation-error.column-hover {
    background-color: #ffcdd2 !important;
}

.data-table tr.row-focused td.validation-error {
    background-color: #ffcdd2 !important;
}

/* Анимация для подсветки ошибок */
@keyframes errorPulse {
    0% { box-shadow: inset 0 0 0 0 #f44336; }
    50% { box-shadow: inset 0 0 0 2px #f44336; }
    100% { box-shadow: inset 0 0 0 0 #f44336; }
}

.data-table td.validation-error {
    animation: errorPulse 0.5s ease-out;
}
/* Стили для форматирования результатов валидации в комментариях */
.comment-text {
    font-family: 'Segoe UI', 'Roboto', sans-serif;
    line-height: 1.5;
}

/* Заголовок ошибок */
.comment-text .validation-header {
    font-weight: bold;
    color: #d32f2f;
    margin-bottom: 8px;
    font-size: 12px;
    border-bottom: 1px solid #ffcdd2;
    padding-bottom: 4px;
}

/* Отдельная ошибка в списке */
.comment-text .validation-error-item {
    color: #c62828;
    margin: 4px 0;
    padding-left: 16px;
    position: relative;
    font-size: 11px;
}

.comment-text .validation-error-item::before {
    content: "•";
    position: absolute;
    left: 4px;
    color: #f44336;
    font-weight: bold;
}

/* Пояснение о выделении ячеек */
.comment-text .validation-note {
    color: #ff9800;
    font-style: italic;
    margin-top: 8px;
    padding-top: 4px;
    border-top: 1px dashed #ffcc80;
    font-size: 10px;
}

/* Успешная проверка */
.comment-text .validation-success {
    color: #2e7d32;
    font-weight: 500;
    margin: 8px 0;
    font-size: 12px;
}

/* Обычный текст комментария */
.comment-text .comment-text-content {
    color: #2c3e50;
    white-space: pre-wrap;
    word-break: break-word;
}
/* Скрыть вкладку */
.tab.hidden {
    display: none;
}