/**
 * ОБЩИЕ СТИЛИ ДЛЯ ТАБЛИЦ И МОДАЛЬНЫХ ОКОН
 */

/* === ОБЩИЕ СТИЛИ ДЛЯ ТАБЛИЦ === */
/* Блокировка прокрутки при открытой модалке */
body.client-modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}


.clients-table-wrapper,
.applications-table-wrapper {
    width: 100%;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
}

/* === УНИФИЦИРОВАННЫЕ СТИЛИ ТАБЛИЦ === */

.clients-table,
.applications-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 1px solid #dee2e6;
    font-family: 'Segoe UI', system-ui, sans-serif;
    margin-bottom: 20px;
    table-layout: fixed;
    display: table;
}

/* Заголовки таблиц */
.clients-table .table-headers,
.applications-table .table-headers {
    display: table-row;
    background: #165470;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.clients-table .table-header,
.applications-table .table-header {
    display: table-cell;
    padding: 16px 12px;
    border-bottom: 1px solid #0d3a4f;
    text-align: left;
    vertical-align: middle;
}

/* Ширины колонок для КЛИЕНТОВ */
.clients-table .header-name { width: 25%; min-width: 150px; }
.clients-table .header-phone { width: 20%; min-width: 120px; }
.clients-table .header-email { width: 25%; min-width: 180px; }
.clients-table .header-city { width: 15%; min-width: 100px; }
.clients-table .header-applications { width: 15%; min-width: 100px; text-align: center; }

/* Ширины колонок для ЗАЯВОК */
.applications-table .header-number { width: 8%; min-width: 60px; }
.applications-table .header-client { width: 32%; min-width: 200px; }
.applications-table .header-date { width: 20%; min-width: 140px; }
.applications-table .header-languages { width: 25%; min-width: 180px; }
.applications-table .header-status { width: 10%; min-width: 100px; text-align: center; }

/* Тело таблиц */
.clients-table .table-body,
.applications-table .table-body {
    display: table-row-group;
}

/* Строки данных */
.clients-table .client-row,
.applications-table .application-row {
    display: table-row;
    background: white;
    border-bottom: 1px solid #dee2e6;
}

.clients-table .client-row:hover,
.applications-table .application-row:hover {
    background-color: #f8f9fa;
    cursor: pointer;
}

/* Ячейки таблиц */
.clients-table .client-cell,
.applications-table .application-cell {
    display: table-cell;
    padding: 14px 12px;
    vertical-align: middle;
    font-size: 14px;
    color: #333;
    text-align: left;
    line-height: 1.4;
    border-bottom: 1px solid #dee2e6;
}

/* Стили для КЛИЕНТОВ */
.clients-table .cell-number {
    font-weight: 600;
    color: #165470;
    width: 8%;
    min-width: 60px;
    padding-left: 16px;
}

.clients-table .cell-name {
    font-weight: 500;
    color: #333;
    width: 25%;
    min-width: 150px;
}

.clients-table .cell-name a {
    color: #333;
    text-decoration: none;
    display: block;
    width: 100%;
}

.clients-table .cell-name a:hover {
    color: #165470;
    text-decoration: underline;
}

.clients-table .cell-phone {
    color: #333;
    width: 20%;
    min-width: 120px;
}
.clients-table .cell-phone a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.clients-table .cell-phone a:hover {
    color: #007cba;
    text-decoration: underline;
}
.clients-table .cell-email {
    color: #333;
    width: 25%;
    min-width: 180px;
}

.clients-table .cell-email a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.clients-table .cell-email a:hover {
    color: #007cba;
    text-decoration: underline;
}

.clients-table .cell-city {
    color: #666;
    width: 15%;
    min-width: 100px;
}

.clients-table .cell-applications {
    text-align: center;
    width: 15%;
    min-width: 100px;
}

/* Стили для ЗАЯВОК */
.applications-table .cell-number {
    font-weight: 600;
    color: #165470;
    width: 8%;
    min-width: 60px;
    padding-left: 16px;
}

.applications-table .cell-client {
    font-weight: 500;
    color: #333;
    width: 32%;
    min-width: 200px;
}

.applications-table .cell-client a {
    color: #333;
    text-decoration: none;
    display: block;
    width: 100%;
}

.applications-table .cell-client a:hover {
    color: #165470;
    text-decoration: underline;
}

.applications-table .cell-date {
    color: #666;
    width: 20%;
    min-width: 140px;
}

.applications-table .cell-languages {
    color: #444;
    width: 25%;
    min-width: 180px;
}

.applications-table .cell-status {
    font-weight: 600;
    font-size: 12px;
    padding: 8px 12px;
text-transform: capitalize;
    width: 15%;
    min-width: 100px;
    text-align: center;
    white-space: nowrap;
    box-sizing: border-box;
    vertical-align: middle;
    margin: 4px 8px;
    display: inline-block;
}

.applications-table .cell-status::first-letter {
    text-transform: uppercase;
}

/* === ОБЪЕДИНЕННЫЕ СТИЛИ СТАТУСОВ === */
.status-новая,
.application-status.новая,
.invoice-status.draft {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-в-работе,
.application-status.в-работе,
.invoice-status.sent {
    background: #d1edff;
    color: #165470;
    border: 1px solid #a8d8ff;
}

.status-выполнена,
.application-status.выполнена,
.invoice-status.paid {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.invoice-status.overdue {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* === СТИЛИ ДЛЯ КНОПКИ ЗАЯВОК === */
.applications-count {
    display: inline-block;
    background: #165470;
    color: white;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    min-width: 30px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-family: inherit;
}

.applications-count:hover {
    background: #0d3a4f;
    color: white;
    text-decoration: none;
    transform: scale(1.05);
}

/* Неактивная кнопка (0 заявок) */
.applications-count[style*="background: #6c757d"],
.applications-count:not([href]) {
    background: #6c757d !important;
    cursor: not-allowed;
    transform: none !important;
}

.applications-count[style*="background: #6c757d"]:hover,
.applications-count:not([href]):hover {
    background: #6c757d !important;
    transform: none !important;
}

/* === ПАГИНАЦИЯ === */
.clients-pagination,
.applications-pagination {
    margin-top: 30px;
    text-align: center;
    width: 100%;
}

.clients-pagination .page-numbers,
.applications-pagination .page-numbers {
    display: inline-flex;
    gap: 5px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.clients-pagination .page-numbers li,
.applications-pagination .page-numbers li {
    display: inline;
}

.clients-pagination .page-numbers a,
.clients-pagination .page-numbers span,
.applications-pagination .page-numbers a,
.applications-pagination .page-numbers span {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    text-decoration: none;
    color: #165470;
    font-weight: 500;
}

.clients-pagination .page-numbers .current,
.applications-pagination .page-numbers .current {
    background: #165470;
    color: white;
    border-color: #165470;
}

.clients-pagination .page-numbers a:hover,
.applications-pagination .page-numbers a:hover {
    background: #f8f9fa;
}

/* === СООБЩЕНИЯ ОТСУТСТВИЯ РЕЗУЛЬТАТОВ === */
.clients-table .no-results,
.applications-table .no-results {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-style: italic;
    width: 300px;
    display: inline-flex;
    font-size: 16px;
}

/* === ФИЛЬТРЫ ТАБЛИЦ === */
.clients-table-filter,
.applications-table-filter {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    width: 100%;
    box-sizing: border-box;
}

.filter-form {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    width: 100%;
}

.form-group {
    flex: 1;
    min-width: 200px;
}

.form-group select,
.form-group input {
    width: 100%;
    border: 1px solid #ced4da;
    box-sizing: border-box;
    font-size: 14px;
    background: #ffffff;
    height: 44px;
    font-family: inherit;
}

.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: #165470;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

.form-actions {
    display: flex;
    gap: 10px;
    height: 44px;
}

/* === ОБЪЕДИНЕННЫЕ СТИЛИ КНОПОК === */
.modal-btn,
.filter-btn,
.reset-btn,
.create-btn-table {
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    font-family: inherit;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    border-radius: 4px;
}

.modal-btn.primary-btn,
.filter-btn,
.create-btn-table {
    background: #165470;
    color: white;
}

.modal-btn.secondary-btn,
.reset-btn {
    background: #6c757d;
    color: white;
}

.modal-btn:hover,
.filter-btn:hover,
.reset-btn:hover,
.create-btn-table:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.modal-btn.primary-btn:hover,
.filter-btn:hover,
.create-btn-table:hover {
    background: #0d3a4f;
}

.modal-btn.secondary-btn:hover,
.reset-btn:hover {
    background: #545b62;
}
#delete-application-btn{
	background-color:#cc2f2f;
	color:#fff;
}
/* === ОБЪЕДИНЕННЫЕ СТИЛИ ФОРМ === */
.application-form-input,
.client-input,
.company-settings-form input,
.company-settings-form select,
.company-settings-form textarea,
.status-select,
.language-pair-select,
.comment-textarea,
.internal-note-textarea {
    border: 1px solid #ced4da;
    font-size: 14px;
    font-family: inherit;
    width: 100%;
    background: white;
    transition: all 0.2s ease;
    box-sizing: border-box;
    border-radius: 4px;
}

.application-form-input:focus,
.client-input:focus,
.company-settings-form input:focus,
.company-settings-form select:focus,
.company-settings-form textarea:focus,
.status-select:focus,
.language-pair-select:focus,
.comment-textarea:focus,
.internal-note-textarea:focus {
    outline: none;
    border-color: #165470;
    box-shadow: 0 0 0 2px rgba(22, 84, 112, 0.15);
}

.comment-textarea,
.internal-note-textarea {
    resize: vertical;
    min-height: 80px;
}

/* === ОСНОВНЫЕ СТИЛИ МОДАЛЬНЫХ ОКОН === */
.client-modal-overlay,
.application-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.client-modal,
.application-modal {
    background: white;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #165470;
    color: white;
}

.modal-header h3 {
    margin: 0;
    color: #fff;
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    font-size: 24px;
    cursor: pointer;
    color: #fff;
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    border-radius: 4px;
}

.modal-close:hover {
    background-color: rgba(255,255,255,0.1);
}

.modal-body {
    padding: 24px;
}

.modal-section {
    margin-bottom: 24px;
}

.modal-section h4 {
    margin: 0 0 16px 0;
    color: #165470;
    font-size: 16px;
    font-weight: 600;
    padding-bottom: 8px;
    border-bottom: 1px solid #e9ecef;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-item label {
    font-weight: 600;
    color: #495057;
    font-size: 13px;
}

.info-item span {
    color: #333;
    font-size: 14px;
    padding: 4px 0;
}

.consent-options {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-top: 5px;
}

.consent-options label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: normal;
    cursor: pointer;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

/* === СТИЛИ ДЛЯ ВЛОЖЕНИЙ === */
.attachments-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.attachment-item {
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.attachment-link {
    color: #165470;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.attachment-link:hover {
    text-decoration: underline;
}

/* === КОМПАКТНЫЙ КОНТЕЙНЕР КОНТАКТОВ И СЧЕТА === */
.compact-contact-invoice {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #e9ecef;
}

.compact-contact-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #dee2e6;
}

.compact-contact-item {
    flex: 1;
    min-width: 200px;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    font-size: 14px;
    color: #333;
}

.compact-contact-item strong {
    color: #165470;
    margin-right: 5px;
}

/* Компактная строка с информацией о счете */
.compact-invoice-row {
    display: flex;
    align-items: center;
    gap: 16px;
    background: white;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.compact-invoice-info {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    font-size: 14px;
}

.compact-invoice-info div {
    padding: 4px 0;
}

.compact-invoice-info strong {
    color: #165470;
    margin-right: 5px;
}

.compact-invoice-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.compact-invoice-actions .modal-btn {
    padding: 8px 12px;
    font-size: 13px;
    white-space: nowrap;
    text-decoration: none;
    height: auto;
}

/* Строка без счета */
.no-invoice-compact {
    background: white;
    padding: 16px;
    border-radius: 6px;
    border: 1px dashed #dee2e6;
    text-align: center;
}

.no-invoice-text {
    margin-bottom: 12px;
    color: #333;
    font-size: 14px;
}

/* === ИСПРАВЛЕННЫЙ СТИЛЬ ДЛЯ ФАЙЛОВОГО INPUT === */
.modal-section .file-wrapper {
    position: relative;
    display: block;
    margin-top: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    background: #f8f9fa;
    height: 46px;
	cursor:pointer;
}

.modal-section #translated-files-input  {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer!important;
    z-index: 2;
}

.modal-section .file-label  {
	font-size:10px!important;
}

.modal-section .file-label {
    display: inline-block;
    padding: 12px 16px;
    background: #165470;
    color: white;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
    text-align: center;
    width: 200px;
    border-right: 1px solid #0d3a4f;
    height: 46px;
    box-sizing: border-box;
    line-height: 20px;
}

.modal-section .file-label:hover {
    background: #0d3a4f;
}

.modal-section #translated-files-name {
    display: inline-block;
    padding: 12px 16px;
    color: #333;
    font-size: 14px;
    vertical-align: top;
    margin-left: 10px;
    line-height: 20px;
    height: 46px;
    box-sizing: border-box;
}

/* Стиль для списка файлов */
#translated-file-list {
    margin-top: 10px;
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid #eee;
    padding: 10px;
    background: white;
    border-radius: 4px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 13px;
}

.file-item:last-child {
    border-bottom: none;
}

.file-size {
    color: #888;
    font-size: 12px;
}

/* === СТИЛИ ДЛЯ ГОТОВЫХ ПЕРЕВОДОВ === */
.translated-section-title {
    color: #165470;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.translated-count {
    background: #165470;
    color: white;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 10px;
}

.translated-attachments-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 5px;
}

.translated-attachment {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.translated-attachment .attachment-link {
    color: #165470;
    text-decoration: none;
    flex-grow: 1;
    font-size: 14px;
}

.translated-attachment .attachment-link:hover {
    text-decoration: underline;
}

.translated-attachment .delete-translated-btn {
    background: none;
    border: 1px solid #dc3545;
    color: #dc3545;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.translated-attachment .delete-translated-btn:hover {
    background: #dc3545;
    color: white;
}

.no-translations-message {
    text-align: center;
    padding: 20px;
    color: #6c757d;
    font-style: italic;
    background: #f8f9fa;
    border: 1px dashed #dee2e6;
    border-radius: 4px;
    margin: 10px 0;
}

/* === СТИЛИ ДЛЯ НАСТРОЕК КОМПАНИИ === */
/* === АДАПТИВНЫЕ СТИЛИ ДЛЯ СТРАНИЦЫ КОМПАНИИ === */

/* Десктопная версия (базовые стили) */
.company-dashboard {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

.company-header {
    background: linear-gradient(135deg, #165470 0%, #0d3a4f 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.company-logo-container {
    flex-shrink: 0;
}

.company-logo {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    object-fit: cover;
    border: 4px solid rgba(255,255,255,0.2);
    background: white;
}

.company-info {
    flex: 1;
}

.company-info h1 {
    margin: 0 0 10px 0;
    font-size: 32px;
    font-weight: 700;
}

.company-description {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    opacity: 0.9;
}

.company-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.stat-value {
    display: block;
    font-size: 36px;
    font-weight: 700;
    color: #165470;
    margin-bottom: 8px;
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.company-sections {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.section-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.section-header {
    background: #f8f9fa;
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header h3 {
    margin: 0;
    color: #165470;
    font-size: 18px;
    font-weight: 600;
}

.section-content {
    padding: 25px;
}

/* Стили для таблицы сотрудников в компании */
.employees-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

.employees-table .table-headers {
    display: table-row;
    background: #165470;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.employees-table .table-header {
    display: table-cell;
    padding: 16px 12px;
    border-bottom: 1px solid #0d3a4f;
    text-align: left;
    vertical-align: middle;
}

.employees-table .header-name { width: 25%; min-width: 150px; }
.employees-table .header-role { width: 25%; min-width: 150px; }
.employees-table .header-email { width: 30%; min-width: 180px; }
.employees-table .header-phone { width: 20%; min-width: 120px; }

.employees-table .table-body {
    display: table-row-group;
}

.employees-table .employee-row {
    display: table-row;
    background: white;
    border-bottom: 1px solid #dee2e6;
}

.employees-table .employee-row:hover {
    background-color: #f8f9fa;
}

.employees-table .employee-cell {
    display: table-cell;
    padding: 14px 12px;
    vertical-align: middle;
    font-size: 14px;
    color: #333;
    text-align: left;
    line-height: 1.4;
    border-bottom: 1px solid #dee2e6;
}

.employees-table .cell-name {
    font-weight: 500;
    color: #333;
}

.employees-table .cell-role {
    color: #666;
}

.employees-table .cell-email a {
    color: #165470;
    text-decoration: none;
}

.employees-table .cell-email a:hover {
    text-decoration: underline;
}

.employees-table .cell-phone {
    color: #333;
}

/* Стили для уведомлений компании */
.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid;
    transition: all 0.2s ease;
}

.notification-item:hover {
    background: #e9ecef;
    transform: translateX(2px);
}

.notification-item.info {
    border-left-color: #17a2b8;
}

.notification-item.warning {
    border-left-color: #ffc107;
}

.notification-item.important {
    border-left-color: #dc3545;
}

.notification-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    margin: 0 0 4px 0;
    color: #333;
    font-size: 14px;
}

.notification-text {
    margin: 0;
    color: #666;
    font-size: 13px;
    line-height: 1.4;
}

.notification-time {
    color: #888;
    font-size: 12px;
    margin-top: 4px;
}

/* Кнопки действий компании */
.company-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 12px 24px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    font-family: inherit;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    border-radius: 6px;
    min-width: 160px;
}

.action-btn.primary {
    background: #165470;
    color: white;
}

.action-btn.secondary {
    background: #6c757d;
    color: white;
}

.action-btn.danger {
    background: #dc3545;
    color: white;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.action-btn.primary:hover {
    background: #0d3a4f;
}

.action-btn.secondary:hover {
    background: #545b62;
}

.action-btn.danger:hover {
    background: #bd2130;
}

/* === ПЛАНШЕТНАЯ ВЕРСИЯ (1024px и меньше) === */
@media (max-width: 1024px) {
    .company-dashboard {
        padding: 15px;
    }
    
    .company-header {
        padding: 25px;
        gap: 25px;
    }
    
    .company-logo {
        width: 100px;
        height: 100px;
    }
    
    .company-info h1 {
        font-size: 28px;
    }
    
    .company-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .company-sections {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .employees-table .table-header,
    .employees-table .employee-cell {
        padding: 12px 10px;
        font-size: 13px;
    }
    
    .employees-table .header-name,
    .employees-table .header-role,
    .employees-table .header-email,
    .employees-table .header-phone {
        min-width: 120px;
    }
}

/* === МОБИЛЬНАЯ ВЕРСИЯ (768px и меньше) === */
@media (max-width: 768px) {
    .company-dashboard {
        padding: 10px;
    }
    
    .company-header {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        gap: 20px;
    }
    
    .company-logo {
        width: 80px;
        height: 80px;
        margin: 0 auto;
    }
    
    .company-info h1 {
        font-size: 24px;
        margin-bottom: 8px;
    }
    
    .company-description {
        font-size: 15px;
        line-height: 1.5;
    }
    
    .company-stats {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-value {
        font-size: 32px;
    }
    
    .stat-label {
        font-size: 13px;
    }
    
    .section-header {
        padding: 16px 20px;
    }
    
    .section-content {
        padding: 20px;
    }
    
    /* Преобразование таблицы сотрудников в карточки */
    .employees-table {
        display: block;
        border: none;
        background: transparent;
    }
    
    .employees-table .table-headers {
        display: none;
    }
    
    .employees-table .table-body {
        display: block;
    }
    
    .employees-table .employee-row {
        display: block;
        margin-bottom: 15px;
        background: white;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        overflow: hidden;
    }
    
    .employees-table .employee-cell {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        padding: 12px 15px;
        border-bottom: 1px solid #f1f1f1;
        width: 100%;
        box-sizing: border-box;
        font-size: 14px;
        text-align: left !important;
    }
    
    .employees-table .employee-cell:last-child {
        border-bottom: none;
    }
    
    .employees-table .employee-cell::before {
        content: attr(data-label);
        font-weight: 600;
        color: #165470;
        margin-right: 15px;
        min-width: 120px;
        font-size: 14px;
        flex-shrink: 0;
    }
    
    .employees-table .cell-email a,
    .employees-table .cell-phone a {
        color: #165470 !important;
        text-decoration: none !important;
    }
    
    .employees-table .cell-email a:hover,
    .employees-table .cell-phone a:hover {
        text-decoration: underline !important;
    }
    
    /* Уведомления на мобильных */
    .notifications-list {
        gap: 10px;
    }
    
    .notification-item {
        padding: 14px;
        flex-direction: column;
        gap: 8px;
    }
    
    .notification-icon {
        align-self: flex-start;
    }
    
    /* Кнопки действий на мобильных */
    .company-actions {
        flex-direction: column;
        gap: 10px;
        margin-top: 20px;
    }
    
    .action-btn {
        width: 100%;
        min-width: auto;
        padding: 14px 20px;
        font-size: 15px;
    }
    
    /* Адаптивные стили для формы настроек компании */
    .company-settings-form {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .company-settings-form .settings-section,
    .company-settings-form .settings-grid {
        grid-column: 1 !important;
    }
    
    .company-settings-form .form-group.full-width {
        grid-column: 1 !important;
    }
    
    .company-settings-form .settings-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .company-settings-form h3 {
        font-size: 18px !important;
        padding-bottom: 8px !important;
        margin-top: 15px !important;
    }
    
    .company-settings-form .file-wrapper {
        flex-direction: column !important;
        height: auto !important;
    }
    
    .company-settings-form .file-label {
        width: 100% !important;
        padding: 12px !important;
    }
    
    .company-settings-form .file-name {
        width: 100% !important;
        padding: 12px !important;
        text-align: center !important;
        min-height: 44px !important;
    }
    
    .company-settings-form input[type="file"] {
        width: 100% !important;
    }
    
    .company-settings-form button[type="submit"] {
        width: 100% !important;
        padding: 16px !important;
        font-size: 16px !important;
    }
    
    .logo-upload-wrapper {
        gap: 10px !important;
    }
    
    .logo-buttons {
        flex-direction: column !important;
    }
    
    .logo-buttons .modal-btn,
    .logo-buttons .remove-logo-btn {
        width: 100% !important;
    }
}

/* === МОБИЛЬНАЯ ВЕРСИЯ (480px и меньше) === */
@media (max-width: 480px) {
    .company-header {
        padding: 15px;
    }
    
    .company-info h1 {
        font-size: 20px;
    }
    
    .company-description {
        font-size: 14px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-value {
        font-size: 28px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    .section-header {
        padding: 14px 16px;
    }
    
    .section-header h3 {
        font-size: 16px;
    }
    
    .section-content {
        padding: 16px;
    }
    
    .employees-table .employee-cell {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px;
        gap: 6px;
    }
    
    .employees-table .employee-cell::before {
        margin-bottom: 0;
        min-width: 100%;
        font-size: 13px;
        margin-right: 0;
    }
    
    .employees-table .employee-cell > *:not(::before) {
        width: 100%;
        text-align: left;
        font-size: 14px;
        color: #333;
    }
    
    .notification-item {
        padding: 12px;
    }
    
    .notification-title {
        font-size: 13px;
    }
    
    .notification-text {
        font-size: 12px;
    }
    
    /* Для очень маленьких экранов - скрываем иконки уведомлений */
    @media (max-width: 360px) {
        .notification-item {
            flex-direction: column;
            align-items: stretch;
        }
        
        .notification-icon {
            align-self: center;
            margin-bottom: 8px;
        }
    }
}

/* === ОБЩИЕ МЕДИА-ЗАПРОСЫ ДЛЯ ЛОГОТИПОВ === */
@media (max-width: 1024px) {
    .company-logo,
    .logo-preview img {
        max-width: 150px !important;
        max-height: 80px !important;
    }
}

@media (max-width: 768px) {
    .company-logo,
    .logo-preview img {
        max-width: 120px !important;
        max-height: 60px !important;
    }
}

@media (max-width: 480px) {
    .company-logo,
    .logo-preview img {
        max-width: 100px !important;
        max-height: 50px !important;
    }
}

/* === СТИЛИ ДЛЯ ПУСТЫХ СОСТОЯНИЙ === */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-style: italic;
    background: #f8f9fa;
    border: 1px dashed #dee2e6;
    border-radius: 8px;
    margin: 20px 0;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    margin: 0;
    font-size: 16px;
}

/* === АДАПТИВНЫЕ ТАБЛИЦЫ ДЛЯ ИСТОРИИ ДЕЙСТВИЙ (если есть) === */
.activity-table {
    width: 100%;
    border-collapse: collapse;
}

@media (max-width: 768px) {
    .activity-table {
        display: block;
    }
    
    .activity-table thead {
        display: none;
    }
    
    .activity-table tbody {
        display: block;
    }
    
    .activity-table tr {
        display: block;
        margin-bottom: 15px;
        background: white;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        overflow: hidden;
    }
    
    .activity-table td {
        display: flex;
        justify-content: space-between;
        padding: 12px 15px;
        border-bottom: 1px solid #f1f1f1;
        width: 100%;
        box-sizing: border-box;
    }
    
    .activity-table td:last-child {
        border-bottom: none;
    }
    
    .activity-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #165470;
        margin-right: 15px;
        min-width: 120px;
        font-size: 14px;
        flex-shrink: 0;
    }
}

/* === АДАПТИВНЫЙ ВАРИАНТ ДЛЯ КАРТОЧЕК ФАЙЛОВ/ДОКУМЕНТОВ === */
.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

@media (max-width: 768px) {
    .documents-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .documents-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 12px;
    }
}

/* === СОВМЕСТИМОСТЬ С СУЩЕСТВУЮЩИМИ СТИЛЯМИ === */
.company-settings-form {
    /* Уже есть в основном файле, оставляем как есть */
}

.company-dashboard .create-btn-table {
    width: auto;
    margin: 0;
}

/* Дополнительные медиа-запросы для особых случаев */
@media (max-height: 600px) and (orientation: landscape) {
    .company-dashboard {
        padding: 10px;
    }
    
    .company-header {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .company-stats {
        margin-bottom: 15px;
    }
    
    .section-content {
        max-height: 200px;
        overflow-y: auto;
    }
}

/* === УВЕДОМЛЕНИЯ === */
.save-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10001;
    border-left: 4px solid;
    animation: slideIn 0.3s ease;
    min-width: 300px;
}

.save-notification.success {
    border-left-color: #28a745;
}

.save-notification.error {
    border-left-color: #dc3545;
}

.notification-content {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-icon {
    font-size: 18px;
}

/* === АНИМАЦИИ === */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

//* === УЛУЧШЕННАЯ АДАПТИВНОСТЬ ТАБЛИЦ КЛИЕНТОВ И ЗАЯВОК === */

/* Планшетная версия */
@media (max-width: 1024px) {
    .clients-table-wrapper,
    .applications-table-wrapper {
        padding: 0 10px;
    }
    
    .clients-table,
    .applications-table {
        font-size: 13px;
    }
    
    .clients-table .table-header,
    .clients-table .client-cell,
    .applications-table .table-header,
    .applications-table .application-cell {
        padding: 12px 8px;
    }
    
    .applications-table .cell-status {
        min-width: 80px;
        padding: 6px 8px;
        font-size: 11px;
        margin: 2px 4px;
    }
}

/* Мобильная версия (до 768px) */
@media (max-width: 768px) {
    /* Преобразуем таблицы в карточки */
    .clients-table,
    .applications-table {
        display: block;
        border: none;
        background: transparent;
    }
    
    .clients-table .table-headers,
    .applications-table .table-headers {
        display: none;
    }
    
    .clients-table .table-body,
    .applications-table .table-body {
        display: block;
    }
    
    /* Карточки для строк */
    .clients-table .client-row,
    .applications-table .application-row {
        display: block;
        margin-bottom: 15px;
        background: white;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        overflow: hidden;
    }
    
    /* ВСЕ ячейки выравниваем по левому краю */
    .clients-table .client-cell,
    .applications-table .application-cell {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        padding: 12px 15px;
        border-bottom: 1px solid #f1f1f1;
        width: 100%;
        box-sizing: border-box;
        font-family: 'Segoe UI', system-ui, sans-serif;
        font-size: 14px;
        text-align: left !important;
    }
    
    .clients-table .client-cell:last-child,
    .applications-table .application-cell:last-child {
        border-bottom: none;
    }
    
    /* Добавляем заголовки для ячеек */
    .clients-table .client-cell::before,
    .applications-table .application-cell::before {
        content: attr(data-label);
        font-weight: 600;
        color: #165470;
        margin-right: 15px;
        min-width: 120px;
        font-size: 14px;
        flex-shrink: 0;
    }
    
    /* Особый стиль для статуса заявок - в ряд с цветным бейджем */
    .applications-table .cell-status {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 15px;
        margin: 0 !important;
        border-radius: 0 !important;
    }
    
    .applications-table .cell-status::before {
        content: "Статус:";
        font-weight: 600;
        color: #165470;
        margin-right: 15px;
        font-size: 14px;
    }
    
    .applications-table .cell-status .status-новая,
    .applications-table .cell-status .status-в-работе,
    .applications-table .cell-status .status-выполнена {
        min-width: 100px;
        text-align: center;
        padding: 8px 12px;
        font-weight: 600;
        font-size: 12px;
        border-radius: 12px;
        display: inline-block;
        border: 1px solid transparent;
    }
    
    /* Цвета статусов заявок */
    .status-новая,
    .application-status.новая {
        background: #fff3cd !important;
        color: #856404 !important;
        border-color: #ffeaa7 !important;
    }
    
    .status-в-работе,
    .application-status.в-работе {
        background: #d1edff !important;
        color: #165470 !important;
        border-color: #a8d8ff !important;
    }
    
    .status-выполнена,
    .application-status.выполнена {
        background: #d4edda !important;
        color: #155724 !important;
        border-color: #c3e6cb !important;
    }
    
    /* Особый стиль для кнопки заявок у клиентов */
    .clients-table .cell-applications {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 15px;
    }
    
    .clients-table .cell-applications::before {
        content: "Заявки:";
        font-weight: 600;
        color: #165470;
        margin-right: 15px;
        font-size: 14px;
    }
    
    .applications-count {
        min-width: 100px;
        text-align: left;
        padding: 8px 12px;
        font-weight: 600;
        font-size: 12px;
        display: inline-block;
    }
    
    /* Фильтры на мобильных */
    .clients-table-filter,
    .applications-table-filter {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .clients-table-filter .filter-form,
    .applications-table-filter .filter-form {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .clients-table-filter .form-group,
    .applications-table-filter .form-group {
        min-width: 100%;
    }
    
    .clients-table-filter .form-actions,
    .applications-table-filter .form-actions {
        width: 100%;
        height: auto;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid #dee2e6;
    }
    
    .clients-table-filter .filter-btn,
    .clients-table-filter .reset-btn,
    .applications-table-filter .filter-btn,
    .applications-table-filter .reset-btn {
        flex: 1;
        min-width: calc(50% - 4px);
        height: 42px;
        padding: 10px 15px;
        font-size: 14px;
        border-radius: 6px;
    }
    
    /* Кнопки создания */
    .create-btn-table {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
        font-size: 15px;
        margin-bottom: 15px;
    }
    
    /* Пагинация */
    .clients-pagination .page-numbers,
    .applications-pagination .page-numbers {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Мобильная версия (до 480px) */
@media (max-width: 480px) {
    .clients-table .client-cell,
    .applications-table .application-cell {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px;
        gap: 6px;
    }
    
    .clients-table .client-cell::before,
    .applications-table .application-cell::before {
        margin-bottom: 0;
        min-width: 100%;
        font-size: 13px;
        margin-right: 0;
    }
    
    .clients-table .client-cell > *:not(::before),
    .applications-table .application-cell > *:not(::before) {
        width: 100%;
        text-align: left;
        font-size: 14px;
        color: #333;
    }
    
    /* Статус и кнопки заявок на очень маленьких экранах */
    .applications-table .cell-status,
    .clients-table .cell-applications {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .applications-table .cell-status::before,
    .clients-table .cell-applications::before {
        margin-bottom: 0;
        margin-right: 0;
        width: 100%;
    }
    
    .applications-table .cell-status .status-новая,
    .applications-table .cell-status .status-в-работе,
    .applications-table .cell-status .status-выполнена,
    .applications-count {
        width: 100%;
        text-align: center;
        padding: 10px;
    }
    
    /* Фильтры */
    .clients-table-filter .filter-btn,
    .clients-table-filter .reset-btn,
    .applications-table-filter .filter-btn,
    .applications-table-filter .reset-btn {
        min-width: 100%;
        margin-bottom: 8px;
    }
    
    .clients-table-filter .filter-btn:last-child,
    .clients-table-filter .reset-btn:last-child,
    .applications-table-filter .filter-btn:last-child,
    .applications-table-filter .reset-btn:last-child {
        margin-bottom: 0;
    }
    
    /* Пагинация */
    .clients-pagination .page-numbers a,
    .clients-pagination .page-numbers span,
    .applications-pagination .page-numbers a,
    .applications-pagination .page-numbers span {
        padding: 6px 8px;
        font-size: 13px;
        min-width: 36px;
    }
}

/* Очень маленькие экраны (до 360px) */
@media (max-width: 360px) {
    .clients-table .client-cell,
    .applications-table .application-cell {
        padding: 10px;
    }
    
    .clients-table .client-cell::before,
    .applications-table .application-cell::before {
        font-size: 12px;
    }
    
    .clients-table .client-cell > *:not(::before),
    .applications-table .application-cell > *:not(::before) {
        font-size: 13px;
    }
    
    .applications-table .cell-status .status-новая,
    .applications-table .cell-status .status-в-работе,
    .applications-table .cell-status .status-выполнена,
    .applications-count {
        font-size: 11px;
        padding: 8px;
    }
}

/* === АДАПТИВНОСТЬ МОДАЛЬНЫХ ОКОН КЛИЕНТОВ И ЗАЯВОК === */

@media (max-width: 768px) {
    .client-modal,
    .application-modal {
        width: 100%;
        height: 100%;
        border-radius: 0;
        max-height: 100vh;
        margin: 0;
    }
    
    .modal-content {
        padding: 15px;
        padding-bottom: 80px; /* Место для кнопок */
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    /* Кнопки в футере модалки - иконки по центру */
    .modal-footer {
        padding: 12px 15px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        min-height: 60px;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 100;
        background: #f8f9fa;
        border-top: 1px solid #dee2e6;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    }
    
    .modal-footer-left,
    .modal-footer-right {
        display: flex;
        gap: 8px;
        flex: 1;
        min-width: 0;
    }
    
    .modal-footer-left {
        justify-content: flex-start;
    }
    
    .modal-footer-right {
        justify-content: flex-end;
    }
    
    
    
    /* Компактные контейнеры контактов и счета */
    .compact-contact-row {
        flex-direction: column;
        gap: 8px;
    }
    
    .compact-contact-item {
        min-width: 100%;
    }
    
    .compact-invoice-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .compact-invoice-info {
        grid-template-columns: 1fr;
    }
    
    .compact-invoice-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    /* Секции с файлами и вложениями */
    .translated-attachments-list {
        max-height: 150px;
    }
    
    /* Контейнер для позиций в модалке заявки */
    .modal-section {
        margin-bottom: 20px;
    }
    
    .modal-section h4 {
        font-size: 16px;
    }
    
    /* Файловый input в модалке */
    .modal-section .file-wrapper {
        flex-direction: column;
        height: auto;
    }
    
    .modal-section .file-label {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #0d3a4f;
    }
    
    .modal-section #translated-files-name {
        padding: 12px 16px;
        margin-left: 0;
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .modal-content {
        padding: 12px;
        padding-bottom: 70px;
    }
    
    .modal-footer {
        padding: 10px 12px;
        gap: 6px;
    }
    
    .modal-footer-left,
    .modal-footer-right {
        gap: 6px;
    }
    

    
    .compact-invoice-actions {
        flex-direction: column;
    }
    
    .compact-invoice-actions .modal-btn {
        width: 100%;
    }
}



/* Ландшафтная ориентация на мобильных */
@media (max-height: 500px) and (orientation: landscape) {
    .client-modal,
    .application-modal {
        max-height: 90vh;
    }
    
    .modal-content {
        max-height: calc(90vh - 120px);
        overflow-y: auto;
    }
    
    .modal-footer {
        position: fixed;
    }
}

/* === СТИЛИ ДЛЯ УПРАВЛЕНИЯ ПОЛЬЗОВАТЕЛЯМИ === */

/* Обертка страницы */
.users-management-wrapper {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', system-ui, sans-serif;
    box-sizing: border-box;
}


/* Кнопка создания пользователя */
#create-user-btn {
    padding: 12px 24px;
    background: #165470;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    font-family: inherit;
}

#create-user-btn:hover {
    background: #0d3a4f;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

#create-user-btn i {
    font-size: 16px;
}

/* Обертка таблицы */
.users-table-wrapper {
    background: white;
    overflow: hidden;
    margin-bottom: 30px;
}

/* Фильтры */
.users-table-filter {
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
	margin-bottom: 30px;
}

.users-table-filter .filter-form {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    width: 100%;
}

.users-table-filter .form-group {
    flex: 1;
    min-width: 200px;
}

.users-table-filter .form-group select,
.users-table-filter .form-group input {
    width: 100%;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    background: white;
    height: 44px;
    box-sizing: border-box;
}

.users-table-filter .form-group select:focus,
.users-table-filter .form-group input:focus {
    outline: none;
    border-color: #165470;
    box-shadow: 0 0 0 2px rgba(22, 84, 112, 0.1);
}

.users-table-filter .form-actions {
    display: flex;
    gap: 10px;
    height: 44px;
}

.users-table-filter .filter-btn,
.users-table-filter .reset-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.users-table-filter .filter-btn {
    background: #165470;
    color: white;
}

.users-table-filter .reset-btn {
    background: #6c757d;
    color: white;
}

.users-table-filter .filter-btn:hover {
    background: #0d3a4f;
    transform: translateY(-1px);
}

.users-table-filter .reset-btn:hover {
    background: #545b62;
    transform: translateY(-1px);
}

/* Таблица пользователей */
.users-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-family: 'Segoe UI', system-ui, sans-serif;
    display: table;
	border: 1px solid #dee2e6;
}

/* Заголовки таблицы */
.users-table .table-headers {
    display: table-row;
    background: #165470;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.users-table .table-header {
    display: table-cell;
    padding: 16px 12px;
    border-bottom: 1px solid #0d3a4f;
    text-align: left;
    vertical-align: middle;
    position: relative;
}

/* Ширины колонок */
.users-table .header-name { width: 35%; min-width: 200px; }
.users-table .header-email { width: 30%; min-width: 180px; }
.users-table .header-role { width: 20%; min-width: 120px; }
.users-table .header-status { width: 15%; min-width: 100px; }

/* Тело таблицы */
.users-table .table-body {
    display: table-row-group;
}

/* Строки пользователей */
.user-row {
    display: table-row;
    background: white;
    border-bottom: 1px solid #dee2e6;
    transition: background-color 0.2s ease;
}

.user-row:hover {
    background-color: #f8f9fa;
    cursor: pointer;
}

/* Ячейки таблицы */
.user-cell {
    display: table-cell;
    padding: 14px 12px;
    vertical-align: middle;
    font-size: 14px;
    color: #333;
    text-align: left;
    line-height: 1.4;
    border-bottom: 1px solid #dee2e6;
}

/* Стили для колонки с именем */
.cell-name {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    flex-shrink: 0;
}

.user-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-info strong {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
    font-size: 15px;
}

.user-info small {
    display: block;
    color: #666;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Стили для email */
.cell-email a {
    color: #165470;
    text-decoration: none;
    transition: color 0.2s ease;
}

.cell-email a:hover {
    color: #0d3a4f;
    text-decoration: underline;
}

/* Стили для ролей */
.role-badge {
    display: inline-block;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.role-olga_fin_owner {
    background: #165470;
    color: white;
}

.role-olga_fin_contractor {
    background: #6c757d;
    color: white;
}

/* Стили для статусов */
.cell-status {
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    color: #28a745;
}

.status-inactive {
    color: #dc3545;
}

/* Сообщение об отсутствии результатов */
.no-results {
    display: table-cell;
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-style: italic;
    width: 100%;
    font-size: 16px;
    background: #f8f9fa;
}

/* Индикатор загрузки */
.loading-indicator {
    display: table-cell;
    text-align: center;
    padding: 40px 20px;
    color: #165470;
    font-weight: 500;
    width: 100%;
    font-size: 16px;
    background: #f8f9fa;
}

/* === МОДАЛЬНОЕ ОКНО ДЛЯ ПОЛЬЗОВАТЕЛЕЙ === */
.user-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    backdrop-filter: blur(2px);
}

.user-modal {
    background: white;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
}

/* Заголовок модального окна */
.user-modal .modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #165470;
    color: white;
    flex-shrink: 0;
}

.user-modal .modal-header h3 {
    margin: 0;
    color: #fff;
    font-size: 20px;
    font-weight: 600;
}

.user-modal .modal-close {
    font-size: 24px;
    cursor: pointer;
    color: #fff;
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    border-radius: 4px;
}

.user-modal .modal-close:hover {
    background-color: rgba(255,255,255,0.1);
}

/* Тело модального окна */
.user-modal .modal-body {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
}

.user-modal .modal-section {
    margin-bottom: 30px;
}

.user-modal .modal-section h4 {
    margin: 0 0 16px 0;
    color: #165470;
    font-size: 16px;
    font-weight: 600;
    padding-bottom: 8px;
    border-bottom: 1px solid #e9ecef;
}

/* Сетка формы */
.user-modal .form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.user-modal .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.user-modal .form-group label {
    font-weight: 600;
    color: #495057;
    font-size: 13px;
}

.user-modal .form-group label:after {
    content: " *";
    color: #dc3545;
}

.user-modal .form-group input,
.user-modal .form-group select {
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.user-modal .form-group input:focus,
.user-modal .form-group select:focus {
    outline: none;
    border-color: #165470;
    box-shadow: 0 0 0 2px rgba(22, 84, 112, 0.1);
}

.user-modal .form-group input[type="password"] {
    letter-spacing: 1px;
}

.user-modal .password-hint {
    font-size: 12px;
    color: #6c757d;
    margin-top: 2px;
}

/* Секция прав подрядчика */
.permissions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 10px;
}

.permission-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.permission-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.permission-item label {
    font-weight: normal;
    color: #333;
    font-size: 14px;
    cursor: pointer;
}

.permission-item input[disabled] + label {
    color: #999;
    cursor: not-allowed;
}

/* Футер модального окна */
.user-modal .modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
    flex-shrink: 0;
}

.user-modal .modal-footer-left,
.user-modal .modal-footer-right {
    display: flex;
    gap: 12px;
}

.user-modal .modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.user-modal .primary-btn {
    background: #165470;
    color: white;
}

.user-modal .secondary-btn {
    background: #6c757d;
    color: white;
}

.user-modal .danger-btn {
    background: #dc3545;
    color: white;
}

.user-modal .modal-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.user-modal .primary-btn:hover {
    background: #0d3a4f;
}

.user-modal .secondary-btn:hover {
    background: #545b62;
}

.user-modal .danger-btn:hover {
    background: #bd2130;
}

/* Уведомления */
.save-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10001;
    border-left: 4px solid;
    animation: slideIn 0.3s ease;
    min-width: 300px;
}

.save-notification.success {
    border-left-color: #28a745;
}

.save-notification.error {
    border-left-color: #dc3545;
}

.save-notification.info {
    border-left-color: #17a2b8;
}

.save-notification .notification-content {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.save-notification .notification-content i {
    font-size: 18px;
}

.save-notification.success .notification-content i {
    color: #28a745;
}

.save-notification.error .notification-content i {
    color: #dc3545;
}

.save-notification.info .notification-content i {
    color: #17a2b8;
}

/* Анимации */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* === АДАПТИВНЫЕ СТИЛИ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ === */

/* Планшет (до 1024px) */
@media (max-width: 1024px) {
    .users-management-wrapper {
        padding: 15px;
    }
    
    .users-management-header h2 {
        font-size: 24px;
    }
    
    .users-table .table-header,
    .users-table .user-cell {
        padding: 12px 10px;
        font-size: 13px;
    }
    
    .user-info strong {
        font-size: 14px;
    }
    
    .user-info small {
        font-size: 12px;
    }
}

/* Мобильные (до 768px) */
@media (max-width: 768px) {
    .users-management-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .users-management-header h2 {
        text-align: center;
        justify-content: center;
    }
    
    #create-user-btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Преобразование таблицы в карточки */
    .users-table {
        display: block;
        border: none;
        background: transparent;
    }
    
    .users-table .table-headers {
        display: none;
    }
    
    .users-table .table-body {
        display: block;
    }
    
    .user-row {
        display: block;
        margin-bottom: 15px;
        background: white;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        overflow: hidden;
    }
    
    .user-cell {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        padding: 12px 15px;
        border-bottom: 1px solid #f1f1f1;
        width: 100%;
        box-sizing: border-box;
        font-size: 14px;
        text-align: left !important;
    }
    
    .user-cell:last-child {
        border-bottom: none;
    }
    
    .user-cell::before {
        content: attr(data-label);
        font-weight: 600;
        color: #165470;
        margin-right: 15px;
        min-width: 120px;
        font-size: 14px;
        flex-shrink: 0;
    }
    
    /* Особые стили для ячеек */
    .cell-name {
        flex-direction: row;
        align-items: center;
    }
    
    .cell-name::before {
        align-self: flex-start;
        margin-top: 3px;
    }
    
    .cell-status::before {
        margin-top: 0;
    }
    
    .cell-status.status-active,
    .cell-status.status-inactive {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
    }
    
    /* Фильтры на мобильных */
    .users-table-filter .filter-form {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .users-table-filter .form-group {
        min-width: 100%;
    }
    
    .users-table-filter .form-actions {
        width: 100%;
        height: auto;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid #dee2e6;
    }
    
    .users-table-filter .filter-btn,
    .users-table-filter .reset-btn {
        flex: 1;
        min-width: calc(50% - 4px);
        height: 42px;
    }
    
    /* Модальное окно на мобильных */
    .user-modal {
        width: 100%;
        height: 100%;
        border-radius: 0;
        max-height: 100vh;
        margin: 0;
    }
    
    .user-modal .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .user-modal .permissions-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .user-modal .modal-footer {
        flex-direction: row;
        gap: 10px;
        padding: 15px;
    }
    
    .user-modal .modal-footer-left,
    .user-modal .modal-footer-right {
        width: 100%;
        justify-content: center;
    }
    
    .user-modal .modal-btn {
        flex: 1;
        min-width: 0;
    }
}

/* Мобильные (до 480px) */
@media (max-width: 480px) {
    .users-management-wrapper {
        padding: 10px;
    }
    
    .user-cell {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px;
        gap: 6px;
    }
    
    .user-cell::before {
        margin-bottom: 0;
        min-width: 100%;
        font-size: 13px;
        margin-right: 0;
    }
    
    .user-cell > *:not(::before) {
        width: 100%;
        text-align: left;
        font-size: 14px;
        color: #333;
    }
    
    .cell-name {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cell-name::before {
        margin-bottom: 8px;
    }
    
    .user-avatar {
        align-self: flex-start;
    }
    
    /* Фильтры */
    .users-table-filter .filter-btn,
    .users-table-filter .reset-btn {
        min-width: 100%;
        margin-bottom: 8px;
    }
    
    .users-table-filter .filter-btn:last-child,
    .users-table-filter .reset-btn:last-child {
        margin-bottom: 0;
    }
    
    /* Модальное окно */
    .user-modal .modal-body {
        padding: 15px;
    }
    
    .user-modal .modal-section h4 {
        font-size: 15px;
    }
}

/* Ландшафтная ориентация на мобильных */
@media (max-height: 500px) and (orientation: landscape) {
    .user-modal {
        max-height: 90vh;
    }
    
    .user-modal .modal-body {
        max-height: calc(90vh - 120px);
        overflow-y: auto;
    }
}

/* === СТИЛИ ДЛЯ ДОПОЛНИТЕЛЬНЫХ ВЛОЖЕНИЙ === */

/* Улучшенные стили для файлового input */
.modal-section .file-wrapper {
    position: relative;
    display: block;
    margin-top: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    background: #f8f9fa;
    height: 46px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-section .file-wrapper:hover {
    border-color: #165470;
    background: #f0f7ff;
}

.modal-section #translated-files-input,
.modal-section #new-attachments-input {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer !important;
    z-index: 2;
}

.modal-section .file-label {
    display: inline-block;
    padding: 12px 16px;
    background: #165470;
    color: white;
    cursor: pointer;
    font-weight: 500;
    font-size: 13px !important;
    transition: background 0.2s;
    text-align: center;
    width: 200px;
    border-right: 1px solid #0d3a4f;
    height: 46px;
    box-sizing: border-box;
    line-height: 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modal-section .file-label:hover {
    background: #0d3a4f;
}

.modal-section #translated-files-name,
.modal-section #new-attachments-name {
    display: inline-block;
    padding: 12px 16px;
    color: #333;
    font-size: 14px;
    vertical-align: top;
    margin-left: 10px;
    line-height: 20px;
    height: 46px;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 220px);
}

/* Стиль для списка файлов */
#translated-file-list,
#new-attachments-list {
    margin-top: 10px;
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid #eee;
    padding: 10px;
    background: white;
    border-radius: 4px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid #f5f5f5;
    font-size: 13px;
    transition: background-color 0.2s ease;
}

.file-item:hover {
    background-color: #f8f9fa;
}

.file-item:last-child {
    border-bottom: none;
}

.file-item span:first-child {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 10px;
}

.file-size {
    color: #888;
    font-size: 12px;
    font-weight: 500;
    flex-shrink: 0;
}

/* Улучшенные стили для кнопок удаления */
.delete-attachment-btn,
.delete-translated-btn {
    background: none;
    border: 1px solid #dc3545;
    color: #dc3545;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 8px;
    margin-left: 10px;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}

.delete-attachment-btn:hover,
.delete-translated-btn:hover {
    background: #dc3545;
    color: white;
    transform: scale(1.05);
}

/* Улучшенные стили для списков вложений и переводов */
.attachment-item,
.translated-attachment {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.attachment-item:hover,
.translated-attachment:hover {
    border-color: #165470;
    box-shadow: 0 2px 4px rgba(22, 84, 112, 0.1);
}

.attachment-item:last-child,
.translated-attachment:last-child {
    margin-bottom: 0;
}

.attachment-link,
.translated-attachment .attachment-link {
    flex-grow: 1;
    text-decoration: none;
    color: #165470;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 10px;
}

.attachment-link:hover,
.translated-attachment .attachment-link:hover {
    text-decoration: underline;
    color: #0d3a4f;
}

.attachment-link:before {
    content: "📎";
    font-size: 16px;
}

.translated-attachment .attachment-link:before {
    content: "📝";
    font-size: 16px;
}

/* Улучшенные заголовки секций */
.attachments-section-title,
.translated-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #165470;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #e9ecef;
}

.attachments-count,
.translated-count {
    background: #165470;
    color: white;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

/* Состояния загрузки */
.uploading-status {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    animation: pulse 1.5s infinite;
}

.uploading-status:before {
    content: "⏳";
    font-size: 16px;
}

.upload-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.upload-success:before {
    content: "✅";
    font-size: 16px;
}

.upload-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.upload-error:before {
    content: "❌";
    font-size: 16px;
}

/* Анимация пульсации для индикатора загрузки */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Сообщение об отсутствии файлов */
.no-translations-message,
.no-files {
    text-align: center;
    padding: 30px 20px;
    color: #6c757d;
    font-style: italic;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    margin: 15px 0;
    font-size: 14px;
}

.no-translations-message:before,
.no-files:before {
    content: "📁";
    display: block;
    font-size: 32px;
    margin-bottom: 10px;
    opacity: 0.5;
}

/* === СТИЛИ ДЛЯ ОТОБРАЖЕНИЯ РАЗМЕРА ФАЙЛА В СПИСКЕ === */
.file-size-badge {
    background: #e9ecef;
    color: #495057;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
    font-weight: 500;
}

/* === РАЗДЕЛ ДЛЯ НОВЫХ ВЛОЖЕНИЙ === */
.new-attachments-section {
    background: linear-gradient(to right, #f8f9fa, #f0f7ff);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.new-attachments-section h4 {
    color: #165470;
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.new-attachments-section h4:before {
    content: "⬆️";
    font-size: 18px;
}

/* Стили для заголовков в модалке */
.modal-section > h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #165470;
}

.modal-section > h4:before {
    font-size: 18px;
}

/* Секция вложений */
.modal-section:nth-child(5) > h4:before { /* 5-й ребенок - секция вложений */
    content: "📎";
}

/* Секция готовых переводов */
.modal-section:nth-child(6) > h4:before { /* 6-й ребенок - секция переводов */
    content: "📝";
}

/* Секция новых вложений */
.modal-section:nth-child(7) > h4:before { /* 7-й ребенок - секция новых вложений */
    content: "➕";
}

/* Секция новых переводов */
.modal-section:nth-child(8) > h4:before { /* 8-й ребенок - секция новых переводов */
    content: "⬆️";
}

/* === АДАПТИВНЫЕ СТИЛИ ДЛЯ МОБИЛЬНЫХ === */
@media (max-width: 768px) {
    .modal-section .file-wrapper {
        flex-direction: column;
        height: auto;
        min-height: 80px;
    }
    
    .modal-section .file-label {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #0d3a4f;
        height: 44px;
        font-size: 14px !important;
        line-height: 20px;
        padding: 12px;
    }
    
    .modal-section #translated-files-name,
    .modal-section #new-attachments-name {
        width: 100%;
        margin-left: 0;
        padding: 12px;
        text-align: center;
        max-width: 100%;
        height: auto;
        min-height: 44px;
        border-top: 1px solid #eee;
    }
    
    .attachment-item,
    .translated-attachment {
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        gap: 10px;
    }
    
    .attachment-link,
    .translated-attachment .attachment-link {
        padding-right: 0;
        justify-content: space-between;
    }
    
    .delete-attachment-btn,
    .delete-translated-btn {
        width: 100%;
        margin-left: 0;
        margin-top: 8px;
        height: 36px;
    }
    
    .new-attachments-section {
        padding: 15px;
    }
    
    #translated-file-list,
    #new-attachments-list {
        max-height: 120px;
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 8px;
    }
    
    .file-item span:first-child {
        margin-right: 0;
    }
    
    .file-size {
        align-self: flex-end;
    }
    
    /* Скрываем иконки в заголовках на мобильных */
    .modal-section > h4:before {
        display: none;
    }
    
    .new-attachments-section h4:before {
        display: none;
    }
    
    .attachments-section-title,
    .translated-section-title {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .modal-section .file-label {
        font-size: 13px !important;
        padding: 10px 12px;
    }
    
    .modal-section #translated-files-name,
    .modal-section #new-attachments-name {
        font-size: 13px;
        padding: 10px 12px;
    }
    
    .attachment-link,
    .translated-attachment .attachment-link {
        font-size: 13px;
    }
    
    .uploading-status,
    .upload-success,
    .upload-error {
        padding: 10px 12px;
        font-size: 13px;
        flex-direction: column;
        text-align: center;
        gap: 6px;
    }
    
    .no-translations-message,
    .no-files {
        padding: 20px 15px;
        font-size: 13px;
    }
    
    .attachments-count,
    .translated-count {
        font-size: 11px;
        padding: 3px 8px;
    }
}

/* === СТИЛИ ДЛЯ ПОДСКАЗОК О ФАЙЛАХ === */
.file-hint {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
    padding: 5px 10px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #165470;
}

.file-hint strong {
    color: #165470;
    font-weight: 600;
}

/* === СТИЛИ ДЛЯ ПРЕВЬЮ ИМЕНИ ФАЙЛА === */
.file-name-preview {
    display: inline-block;
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

/* === СТИЛИ ДЛЯ КНОПОК УДАЛЕНИЯ С ИКОНКАМИ === */
.delete-attachment-btn:before {
    content: "🗑️";
}

.delete-translated-btn:before {
    content: "🗑️";
}

/* На десктопе показываем текст */
@media (min-width: 769px) {
    .delete-attachment-btn:before,
    .delete-translated-btn:before {
        display: none;
    }
    
    .delete-attachment-btn,
    .delete-translated-btn {
        width: auto;
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .delete-attachment-btn:after {
        content: "Удалить";
    }
    
    .delete-translated-btn:after {
        content: "Удалить";
    }
}

/* На мобильных показываем только иконку */
@media (max-width: 768px) {
    .delete-attachment-btn:after,
    .delete-translated-btn:after {
        display: none;
    }
}

/* === СТИЛИ ДЛЯ ПОЛОСЫ ПРОГРЕССА (если добавите прогресс бар) === */
.upload-progress {
    width: 100%;
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    margin-top: 10px;
    overflow: hidden;
}

.upload-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #165470, #0d3a4f);
    width: 0%;
    transition: width 0.3s ease;
}

/* === АНИМАЦИЯ ДОБАВЛЕНИЯ НОВЫХ ФАЙЛОВ === */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.attachment-item.new-file,
.translated-attachment.new-file,
.file-item.new-file {
    animation: slideDown 0.3s ease;
    background: #f0f7ff;
}

/* === СТИЛИ ДЛЯ ПРЕДУПРЕЖДЕНИЙ О РАЗМЕРЕ ФАЙЛА === */
.file-size-warning {
    color: #dc3545;
    font-size: 11px;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.file-size-warning:before {
    content: "⚠️";
    font-size: 10px;
}