/* Стили для блока информации АВН */
.avn-info-bd {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

/* Стили для отклоненного АВН */
.avn-card.rejected-by-analyst {
    background-color: #f8f9fa;
    border-left: 4px solid #dc3545;
}

.disabled-btn {
    opacity: 0.5;
    cursor: not-allowed !important;
    pointer-events: none;
}

.highlight-field {
    border: 2px solid #dc3545 !important;
    background-color: #fff5f5 !important;
}

.status-rejected {
    background-color: #dc3545;
    color: white;
}

.rejection-notice {
    background: #f8f9fa;
    border-left: 4px solid #dc3545;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.checkbox-label:hover {
    background-color: #f8f9fa;
}

.rejection-section {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.rejection-section h4 {
    color: #495057;
    margin-bottom: 0.75rem;
}

/* Стили для ошибки валидации */
.validation-error {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: linear-gradient(135deg, #fff3f3 0%, #ffeaea 100%);
    border: 1px solid #ffcdd2;
    border-radius: 8px;
    color: #d32f2f;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    box-shadow: 0 2px 4px rgba(211, 47, 47, 0.1);
    animation: shake 0.5s ease-in-out;
    position: relative; /* Добавляем это */
}

.validation-error i {
    font-size: 16px;
    color: #f44336;
    flex-shrink: 0;
}

.validation-error::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #f44336;
    border-radius: 4px 0 0 4px;
}

.avn-warning-banner {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #856404;
    font-weight: 500;
}

.avn-warning-banner i {
    color: #f39c12;
    font-size: 16px;
}

.hint-label.warning {
    color: #e74c3c;
    font-weight: 500;
}

.issue-status-block {
    display: flex;
    align-items: center;
    gap: 2px;
    text-wrap: nowrap;
    flex-wrap: nowrap;
    font-size: 12px;
}

.status-arrow {
    font-weight: bold;
    color: #9ca3af; /* gray-400 */
    font-size: 12px;
}

/* AVN Card Specific Styles */
.avn-card {
    width: 100%;
    background: var(--avn-bg, #ffffff);
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 8px;
    border: 1px solid var(--border-color, #e2e8f0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.avn-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.avn-header {
    display: flex;
    flex-direction: row; /* Use row to align content and arrow */
    align-items: center; /* Center items vertically */
    padding: 10px 14px;
    background: var(--card-bg, #eff6ff);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.avn-header:hover {
    background: var(--card-hover, #eff6ff);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.avn-header-content {
    display: flex;
    flex-direction: column; /* Stack title and statuses vertically */
    flex-grow: 1; /* Take available space */
}

.avn-title {
    display: flex;
    flex-direction: row; /* Keep identifier and issue-date side by side */
    gap: 4px;
    align-items: center;
}

.avn-statuses {
    display: flex;
    flex-wrap: wrap; /* Разрешаем перенос на новую строку */
    gap: 4px;
    margin-top: 4px;
    align-items: flex-start; /* Выравнивание по верхнему краю */
    max-width: 100%; /* Ограничиваем ширину */
}


.avn-title .avn-identifier {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
}

.avn-title .issue-date {
    font-size: 12px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 4px;
}

.avn-statuses .issue-avn {
    font-size: 12px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap; /* Запрещаем перенос текста внутри одного статуса */
    overflow: hidden;
    text-overflow: ellipsis; /* Добавляем многоточие если текст не помещается */
    max-width: 100%; /* Ограничиваем ширину элемента */
    flex-shrink: 0; /* Запрещаем сжатие элементов */
}

.avn-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out;
}

.avn-card:not(.collapsed) .avn-details {
    padding-top: 8px;
    max-height: 80vh; /* Restrict max height to 80% of viewport height */
    overflow-y: auto; /* Enable vertical scrollbar when content overflows */
    scrollbar-width: thin; /* Use thin scrollbar for Firefox */
    scrollbar-color: var(--text-light) var(--card-bg); /* Custom scrollbar colors */
}

.avn-arrow {
    color: #6b7280;
    font-size: 16px;
    transition: transform 0.3s ease;
    margin-left: auto; /* Push to the right */
}

.avn-card:not(.collapsed) .avn-arrow {
    transform: rotate(0deg);
}

/* Tracker Links Block */
.tracker-links {
    display: flex;
    flex-direction: column;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 1px solid #2563eb;
}

.tracker-links div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tracker-links .avn-info-label {
    font-weight: 600;
    color: #374151;
    min-width: 100px;
}

.tracker-links a {
    color: #2563eb;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.tracker-links a:hover {
    color: #1e40af;
    text-decoration: underline;
}


/* Rest of the CSS remains unchanged */
.avn-info {
    font-size: 15px;
    line-height: 1.7;
    padding: 16px;
    background: var(--card-bg, #eff6ff);
    border-radius: 6px;
    width: 100%;
    box-sizing: border-box;
}

.avn-info div {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
}

.avn-info-label {
    font-weight: 600;
    color: #374151;
    min-width: 140px;
    display: inline-block;
}

.avn-info a {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s ease;
}

.avn-info a:hover {
    color: #1e40af;
    text-decoration: underline;
}

.avn-prescription-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    height: 35px;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: #ffffff;
    border-radius: 4px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.2s ease;
    width: 100%;
    box-sizing: border-box;
    gap: 8px;
}

.avn-prescription-btn:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    transform: scale(0.98);
}

.avn-prescription-btn i {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.refuse-download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    height: 35px;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: #ffffff;
    border-radius: 4px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.2s ease;
    width: 100%;
    box-sizing: border-box;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.refuse-download-btn:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    transform: scale(0.98);
}

.refuse-download-btn i {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.avn-download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    height: 35px;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: #ffffff;
    border-radius: 4px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.2s ease;
    width: 100%;
    box-sizing: border-box;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.avn-download-btn:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    transform: scale(0.98);
}

.avn-download-btn i {
    font-size: 18px;
    transition: transform 0.3s ease;
}

/* Стили для кнопки в перезарядке */
.avn-download-btn.cooldown {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
    cursor: not-allowed;
    transform: none;
}

.avn-download-btn.cooldown:hover {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
    transform: none;
}

.avn-download-btn.cooldown::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    animation: cooldownProgress 8s linear forwards;
}

@keyframes cooldownProgress {
    from { width: 100%; }
    to { width: 0%; }
}

.cooldown-timer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.avn-download-container {
    display: flex;
    flex-direction: column;
    justify-content: stretch;
    width: 100%;
    box-sizing: border-box;
    gap: 8px;
    padding: 8px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-top: 8px;
    margin-bottom: 8px;
}

.avn-refusal-actions {
    display: flex;
    flex-direction: column;
    justify-content: stretch;
    width: 100%;
    box-sizing: border-box;
    gap: 8px;
    padding: 8px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-top: 8px;
    margin-bottom: 8px;
}

.avn-eliminated-container {
    display: flex;
    flex-direction: column;
    justify-content: stretch;
    width: 100%;
    box-sizing: border-box;
    gap: 8px;
    padding: 8px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-top: 8px;
    margin-bottom: 8px;
}

/* File Input Styling */
.avn-file-input {
    width: 100%;
    padding: 8px;
    border: 1px dashed var(--border-color, #d1d1d1);
    border-radius: 4px;
    font-size: 14px;
    color: var(--text-color, #333);
    background: var(--input-bg, #f9f9f9);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-sizing: border-box;
    cursor: pointer;
}

.avn-file-input:hover {
    border-color: var(--primary-color, #007bff);
    background: var(--input-hover-bg, #f0f6ff);
}

.avn-file-input:focus {
    outline: none;
    border-color: var(--primary-color, #0077ff);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Upload Button States */
.avn-upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    height: 35px;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: #ffffff;
    border-radius: 4px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.2s ease;
    width: 100%;
    box-sizing: border-box;
    gap: 8px;
}

.avn-upload-btn:disabled {
    background: var(--disabled-bg, #cccccc);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.avn-upload-btn.loading {
    color: transparent;
}

.avn-upload-btn.loading::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    border: 3px solid var(--card-bg, #ffffff);
    border-top: 3px solid var(--primary-color, #007bff);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.avn-upload-btn.success {
    background: var(--success-color, #28a745);
}

.avn-upload-btn.success .success-checkmark {
    font-size: 22px;
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    animation: checkmarkAppear 0.3s ease forwards;
}

/* Issues Section */
.avn-issues-section {
    background: #f9fafb;
    border-radius: 10px;
    width: 100%;
    margin: 0;
    padding: 16px;
    border: 1px solid #e5e7eb;
    box-sizing: border-box;
    position: relative;
    left: 0;
}

.avn-issues-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    background: #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #374151;
    transition: background 0.3s ease;
}

.avn-issues-toggle:hover {
    background: #d1d5db;
}

.avn-issues-arrow {
    margin-left: auto;
    font-size: 16px;
    color: #6b7280;
    transition: transform 0.3s ease;
}

.avn-issues-section.collapsed .avn-issues-arrow {
    transform: rotate(0deg);
}

.avn-issues-section:not(.collapsed) .avn-issues-arrow {
    transform: rotate(180deg);
}

.avn-issues-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out;
}

.avn-issues-section:not(.collapsed) .avn-issues-content {
    max-height: 900px;
    overflow-y: auto;
}

/* Individual Issue Card */
.avn-issue-item {
    background: #ffffff;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.avn-issue-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* Issue Header */
.avn-issue-title {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.avn-issue-id {
    font-size: 15px;
    font-weight: 600;
    color: #2563eb;
}

.avn-issue-status {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
}

.avn-issue-status.status-open {
    background: #dbeafe;
    color: #1e40af;
}

.avn-issue-status.status-resolved {
    background: #fef3c7;
    color: #d97706;
}

.avn-issue-status.status-overdue {
    background: #fee2e2;
    color: #b91c1c;
}

/* Overdue Glow */
.avn-overdue-indicator {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #b91c1c;
    background: rgba(231, 76, 60, 0.15);
    box-shadow: 0 0 8px rgba(185, 28, 28, 0.3);
    display: inline-block;
    white-space: nowrap;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Issue Details */
.avn-issue-info {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 10px;
}

.avn-issue-info div {
    margin-bottom: 8px;
}

.avn-issue-label {
    font-weight: 600;
    color: #374151;
}

.avn-issue-info a {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s ease;
}

.avn-issue-info a:hover {
    text-decoration: underline;
    color: #1e40af;
}

/* Empty State for Issues */
.avn-issues-empty {
    padding: 16px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
}

.avn-issues-empty .empty-icon {
    font-size: 28px;
    color: #d1d5db;
    margin-bottom: 10px;
}

/* Complex AVN List (unchanged for compatibility) */
.complex-avn-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: max-height 0.4s ease;
    max-height: 0;
    overflow: hidden;
}

.complex-avn-list.collapsed {
    max-height: 0;
    overflow: hidden;
    padding: 0;
}

.complex-card:not(.collapsed) .complex-avn-list {
    max-height: none;
}

/* AVN Expand Icon (unchanged for compatibility) */
.avn-expand-icon {
    color: #6b7280;
    font-size: 18px;
    transition: transform 0.3s ease;
}

.avn-container.expanded .avn-expand-icon {
    transform: rotate(180deg);
}

.avn-uploaded-files {
    margin-top: 12px;
    border-top: 1px solid #eaeef2;
    padding-top: 8px;
}

.uploaded-file-entry {
    font-size: 13px;
    padding: 8px;
    margin: 4px 0;
    line-height: 1.4;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 1px solid #2563eb;
}

.file-link {
    color: #1a73e8;
    text-decoration: none;
    font-weight: 500;
    margin-left: 5px;
}

.file-link:hover {
    text-decoration: underline;
}

.file-meta {
    color: #5f6368;
    font-size: 12px;
    margin-left: 8px;
}

.analyst-comment {
    margin-top: 4px;
    padding: 8px;
    background: #fff8e6;
    font-size: 12px;
    color: #5f6368;
}

.loading-status {
    text-align: center;
    margin-top: 8px;
    min-height: 24px; /* Ensure consistent height to prevent layout shift */
    display: flex;
    justify-content: center;
    align-items: center;
}

.status-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-light, #666);
    opacity: 0.7; /* Semi-transparent */
    background: var(--card-bg, #ffffff);
    padding: 4px 12px;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    display: inline-block;
    animation: fadeInStatus 0.3s ease-in-out;
    transition: opacity 0.2s ease;
}

.status-text::before {
    content: 'Загрузка: ';
    color: var(--primary-color, #007bff);
    font-weight: 600;
}

.avn-claim-container {
    display: flex;
    flex-direction: column; /* Stack buttons and hint vertically */
    align-items: stretch; /* Ensure buttons stretch to equal width */
    width: 100%;
    padding: 8px;
    background: rgba(231, 76, 60, 0.15);
    border-radius: 6px;
    margin: 8px 0;
    box-shadow: 0 0 8px rgba(231, 76, 60, 0.3);
    animation: pulseGlow 1.5s ease-in-out infinite;
    position: relative;
}

.avn-claim-container.frosted-glass {
    background: rgba(220, 231, 60, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    opacity: 0.8;
}

.avn-claim-container.frosted-glass button {
    cursor: not-allowed;
    opacity: 0.6;
}

.avn-claim-container .timer-label {
    margin-top: 8px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.avn-claim-container .avn-timer {
    color: #e74c3c;
    font-weight: 700;
}

.avn-claim-container > div:first-child {
    display: flex;
    flex-direction: row; /* Buttons side by side */
    gap: 8px; /* Space between buttons */
    justify-content: space-between; /* Ensure buttons are spaced evenly */
}

.avn-claim-container .hint-label {
    margin-top: 8px; /* Space between buttons and hint */
    text-align: center; /* Center the hint text */
}

.avn-eliminated-container .hint-label {
    margin-top: 8px; /* Space between buttons and hint */
    text-align: center; /* Center the hint text */
}

.avn-eliminated-container .hint-label {
    margin-top: 8px; /* Space between buttons and hint */
    text-align: center; /* Center the hint text */
}

.avn-claim-btn,
.avn-change-elim-btn {
    flex: 1; /* Равномерное распределение пространства */
    width: 50%; /* Явно задаем половину ширины контейнера */
    min-width: 0; /* Предотвращаем расширение из-за текста */
    max-width: calc(50% - 4px); /* Учитываем gap (8px / 2 = 4px на кнопку) */
    margin: 0;
    padding: 8px;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    text-align: center;
    box-sizing: border-box;
    white-space: normal;
    line-height: 1.2;
    overflow: hidden; /* Обрезаем текст, если он не помещается */
    text-overflow: ellipsis; /* Добавляем многоточие для длинного текста */
}

.avn-claim-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.avn-claim-btn:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a5291b 100%);
    transform: scale(0.98);
}

.avn-change-elim-btn {
    background: linear-gradient(135deg, #e7d03c 0%, #c0b42b 100%);
}

.avn-change-elim-btn:hover {
    background: linear-gradient(135deg, #c0ac2b 0%, #a58e1b 100%);
    transform: scale(0.98);
}

.avn-canceled-btn {
    flex-grow: 1;
    margin: 0;
    padding: 8px;
    background: linear-gradient(135deg, #474545 0%, #494c46 100%);
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.avn-canceled-btn:hover {
    background: linear-gradient(135deg, #2c2c2c 0%, #212321 100%);
    transform: scale(0.98);
}

.avn-elim-btn {
    flex-grow: 1;
    margin: 0;
    padding: 8px 16px;
    background: linear-gradient(135deg, #aee73c 0%, #8ec02b 100%);
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.avn-elim-btn:hover {
    background: linear-gradient(135deg, #46c02b 0%, #24a51b 100%);
    transform: scale(0.98);
}

.avn-issues-card {
    background: var(--card-bg);
    margin-bottom: 10px;
    border-radius: 6px;
    padding: 8px;
    box-shadow: var(--menu-shadow);
    transition: var(--menu-transition);
    overflow: hidden;
    position: relative;
}

.avn-issues-card:hover {
    box-shadow: var(--menu-hover-shadow);
}

.contract-number-group label {
    display: block;
    margin-bottom: 5px;
}

.contract-number-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.contract-number {
    flex: 1;
    min-width: 100px;
}

.contract-date {
    flex: 1;
    min-width: 120px;
}

.contract-number-separator {
    white-space: nowrap;
}


/* Refusal uploaded message */
.refusal-uploaded {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 10px 12px;
    background: #e0f2fe;
    border-radius: 8px;
    color: #1e40af;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease, transform 0.2s ease;
    animation: slideIn 0.3s ease-in-out;
}

/* Icon styling inside refusal-uploaded */
.refusal-uploaded i {
    margin-right: 8px;
    color: #1e40af;
    font-size: 16px;
}

/* Hover effect for refusal-uploaded */
.refusal-uploaded:hover {
    background: #bfdbfe;
    transform: translateY(-2px);
}

/* Refuses to Sign Checkbox Container */
.avn-refuses-sign-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Выравнивание по началу оси X */
    justify-content: flex-start;
    width: 100%;
    padding: 4px;
    background: #f9fafb;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
    box-sizing: border-box;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.avn-refuses-sign-checkbox-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    padding: 8px;
    margin-top: 8px;
    margin-bottom: 8px;
    box-sizing: border-box;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.avn-refuses-sign-container:hover {
    background: #f1f5f9;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Checkbox Styling */
.avn-refuses-sign-checkbox {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #6b7280;
    border-radius: 2px;
    background: #ffffff;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    margin-right: 8px;
}

.avn-refuses-sign-checkbox:checked {
    background: #e74c3c; /* Red to indicate refusal */
    border-color: #e74c3c;
    transform: scale(1.1);
}

.avn-refuses-sign-checkbox:checked::after {
    content: '\f00c'; /* FontAwesome check icon */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: #ffffff;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.avn-refuses-sign-checkbox:disabled {
    background: #d1d5db;
    border-color: #d1d5db;
    cursor: not-allowed;
    opacity: 0.6;
}

.avn-refuses-sign-checkbox:disabled:checked {
    background: #e74c3c;
    border-color: #e74c3c;
    opacity: 0.8;
}

/* Checkbox Label */
.avn-refuses-sign-label {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: color 0.2s ease;
}

.avn-refuses-sign-container:hover .avn-refuses-sign-label {
    color: #1f2937;
}

.avn-refuses-sign-checkbox:disabled + .avn-refuses-sign-label {
    color: #6b7280;
    cursor: not-allowed;
}

/* Approval Buttons for Analyst COP */
.approve-btn {
    flex-grow: 1;
    margin: 0;
    padding: 8px;
    background: linear-gradient(135deg, #aee73c 0%, #8ec02b 100%);
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.approve-btn:hover {
    background: linear-gradient(135deg, #46c02b 0%, #24a51b 100%);
    transform: scale(0.98);
}

.reject-btn {
    flex-grow: 1;
    margin: 0;
    padding: 8px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.reject-btn:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a5291b 100%);
    transform: scale(0.98);
}

.approval-buttons {
    display: flex;
    flex-direction: row;
    gap: 8px;
    justify-content: space-between;
    width: 100%;
}

.approval-comment {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 10px;
    font-size: 14px;
    color: var(--text-color, #2d3748);
    background: var(--input-bg, #f7fafc);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    box-sizing: border-box;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    min-height: 80px;
    resize: vertical;
}

.approval-comment:focus {
    outline: none;
    border-color: var(--primary-color, #4f46e5);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
    background: #fff;
}

.analyst-cop-approval-container {
    display: flex;
    flex-direction: column;
    justify-content: stretch;
    width: 100%;
    box-sizing: border-box;
    gap: 8px;
    padding: 8px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-top: 8px;
    margin-bottom: 8px;
}

.copy-field {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    position: relative;
}

.copy-label {
    font-weight: bold;
    margin-right: 8px;
    min-width: 80px;
}

.copy-value {
    flex-grow: 1;
    margin-right: 8px;
    word-break: break-word;
}

.copy-btn {
    background: #f0f0f0;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    transition: background 0.2s;
}

.copy-btn:hover {
    background: #e0e0e0;
}

.copy-btn.copied {
    background: #4CAF50;
    color: white;
}

.copy-btn.full-width {
    width: 100%;
    justify-content: center;
    padding: 8px;
    margin-top: 8px;
}

.avn-info-value {
    margin-right: 8px;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 2px rgba(231, 76, 60, 0.3);
    }
    50% {
        box-shadow: 0 0 4px rgba(231, 76, 60, 0.5);
    }
}

@keyframes fadeInStatus {
    0% {
        opacity: 0;
        transform: translateY(4px);
    }
    100% {
        opacity: 0.7;
        transform: translateY(0);
    }
}

/* Animation for checkmark */
@keyframes checkmarkAppear {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}