/* файл status-styles.css */

/* ========== СТИЛИ ДЛЯ СТАТУСОВ ========== */

/* Статусы с цветными индикаторами */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.4rem 0.25rem 1.2rem;
    border-radius: var(--radius-lg);
    font-size: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1;
    border: 1.5px solid transparent;
    width: auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    position: relative;
}

/* Общий стиль для индикатора */
.status-badge::before {
    content: '';
    position: absolute;
    left: 0.4rem;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8);
    transition: transform 0.2s ease;
}

.status-badge:hover {
    animation: statusPulse 0.3s ease;
}

.status-badge:hover::before {
    transform: translateY(-50%) scale(1.2);
}

/* Бейдж текущего статуса */


/* Статусы через data-атрибуты с цветными индикаторами */
.status-badge[data-status="secondary"],
.status-badge-secondary {
    background: #f8f9fa;
    color: #6c757d;
    border-color: #6c757d;
}

.status-badge[data-status="secondary"]::before,
.status-badge-secondary::before {
    background: #6c757d;
}

.status-badge[data-status="warning"],
.status-badge-warning {
    background: var(--warning-light);
    color: var(--warning);
    border-color: color-mix(in srgb, var(--warning) 70%, transparent);
}

.status-badge[data-status="warning"]::before,
.status-badge-warning::before {
    background: var(--warning);
}

.status-badge[data-status="info"],
.status-badge-info {
    background: var(--info-light);
    color: var(--info);
    border-color: color-mix(in srgb, var(--info) 70%, transparent);
}

.status-badge[data-status="info"]::before,
.status-badge-info::before {
    background: var(--info);
}

.status-badge[data-status="primary"],
.status-badge-primary {
    background: var(--primary-light);
    color: var(--primary);
    border-color: color-mix(in srgb, var(--primary) 70%, transparent);
}

.status-badge[data-status="primary"]::before,
.status-badge-primary::before {
    background: var(--primary);
}

.status-badge[data-status="success"],
.status-badge-success {
    background: var(--success-light);
    color: var(--success);
    border-color: color-mix(in srgb, var(--success) 70%, transparent);
}

.status-badge[data-status="success"]::before,
.status-badge-success::before {
    background: var(--success);
}

.status-badge[data-status="danger"] {
    background: var(--error-light);
    color: var(--error);
    border-color: color-mix(in srgb, var(--error) 70%, transparent);
}

.status-badge[data-status="danger"]::before {
    background: var(--error);
}

/* Специальные бейджи */
.storage-days-badge {
    background: linear-gradient(135deg, var(--warning), #f59e0b);
    color: white;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-size: 1.1rem;
    text-align: center;
    box-shadow: var(--shadow-md);
}

/* ========== СТИЛИ ДЛЯ ТАЙМЛАЙНА ========== */

.timeline {
    display: flex;
    flex-direction: row;
    gap: var(--space-2xl);
}

.timeline-item {
    display: flex;
    gap: var(--space-md);
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-lg);
    border-left: 3px solid;
    position: relative;
    line-height: 1.5;
    align-items: flex-start;
    background: var(--background-alt);
    transition: all 0.3s ease;
}

.timeline-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.timeline-content {
    flex: 1;
    min-width: 0;
}

.timeline-title {
    font-weight: 600;
    font-size: 0.8rem;
    margin-bottom: 0.1rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.timeline-date {
    font-size: 0.7rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.timeline-status {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-lg);
    margin-top: 0.25rem;
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid var(--primary);
}

.timeline-storage-info {
    margin-left: auto;
    font-size: 0.7rem;
    color: var(--text-muted);
    padding: 0.2rem 0.5rem;
    background: rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-lg);
}

/* Состояния таймлайна */
.timeline-item.active {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-left-color: var(--info);
    background: linear-gradient(135deg, var(--info-light), transparent 70%);
}

.timeline-item.completed {
    border-left-color: var(--success);
    background: linear-gradient(135deg, var(--success-light), transparent 70%);
    opacity: 0.9;
}

.timeline-item.current-status {
    border-left-width: 4px;
    animation: pulse 2s infinite;
    border-left-color: var(--primary);
    background: linear-gradient(135deg, var(--primary-light), transparent 70%);
    box-shadow: 0 4px 12px rgba(33, 98, 239, 0.1);
}

.timeline-item.future-status {
    opacity: 0.7;
    border-left-color: var(--border);
    background: var(--background);
}

.timeline-item.past-status {
    background: #f8f9fa;
    border-left-color: #e9ecef;
}

.timeline-item.past-status .timeline-icon {
    background: #e9ecef;
    color: var(--text-muted);
}

/* Специальные типы статусов в таймлайне */

.timeline-item.auto-status {
    border-left-color: #36cfc9;
    background: linear-gradient(135deg, rgba(54, 207, 201, 0.1), transparent 70%);
}

.timeline-item.auto-status .timeline-icon {
    background: #36cfc9;
}

.timeline-item.storage-status {
    border-left-color: var(--warning);
    background: linear-gradient(135deg, var(--warning-light), transparent 70%);
}

.timeline-item.storage-status .timeline-icon {
    background: #faad14;
}

.timeline-item.frozen-status {
    background: linear-gradient(135deg, #e6f7ff, #f0f9ff);
    border-left-color: #1890ff;
}

.timeline-item.frozen-status .timeline-icon {
    background: #1890ff;
    animation: pulse 2s infinite;
}

.timeline-item.manual-status {
    border-left-width: 4px;
}

/* ========== СТИЛИ ДЛЯ КНОПОК СТАТУСОВ В МОДАЛКЕ ========== */

.status-actions {
    display: flex;
    /* align-items: center; */
    justify-content: end;
    gap: 0.75rem;
    pointer-events: auto;
}

.status-btn {
    padding: 1rem 0.75rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-height: 120px;
    user-select: none;
}

.status-btn:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Текущий статус */
.status-btn.active.current {
    box-shadow: 0 4px 12px rgba(33, 98, 239, 0.15);
    border-color: var(--success) !important;
    background: var(--success-light) !important;
    color: var(--success) !important;
}

.status-btn.active.current:hover {
    border-color: var(--primary-hover);
    background: var(--primary-light);
}

/* Завершенный статус */
.status-btn.completed {
    border-color: var(--success);
    background: var(--success-light);
    color: var(--success);
    opacity: 0.9;
}

.status-btn.completed:hover {
    opacity: 1;
    transform: translateY(-1px);
}

/* Будущий статус */
.status-btn.future {
    border-color: var(--border);
    background: var(--background);
    color: var(--text-muted);
    opacity: 0.7;
}

.status-btn.future:hover {
    opacity: 0.9;
    border-color: var(--primary-light);
}

.status-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

.status-btn.disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

.status-btn .status-icon {
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}

.status-btn .status-label {
    font-weight: 600;
    font-size: 0.75rem;
}

.status-btn .status-description {
    font-size: 0.65rem;
    opacity: 0.8;
    line-height: 1.2;
}

/* ========== ВСПОМОГАТЕЛЬНЫЕ СТИЛИ ========== */

/* Стили для автоматических статусов */
.auto-status-info {
    background: linear-gradient(135deg, var(--info-light), #e6f7ff);
    border: 1px solid var(--info);
    padding: 1rem;
    border-radius: var(--radius-lg);
    margin-top: 1rem;
    font-size: 0.85rem;
    grid-column: 1 / -1;
}

.auto-fill-notification {
    background: var(--primary-light);
    color: var(--primary);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--primary);
    margin: 1rem 0;
    font-size: 0.85rem;
    animation: fadeIn 0.3s ease;
    transition: all 0.3s ease;
}

.auto-fill-notification strong {
    font-weight: 600;
}

/* Стили для предупреждения о смене статуса */
.status-warning {
    background: var(--warning-light);
    border: 1px solid var(--warning);
    border-radius: var(--radius-lg);
    color: var(--warning);
    font-size: 0.85rem;
}

/* Стили для ячеек статусов в таблице */
td.status-cell {
    padding: 0.5rem;
    min-width: 120px;
}

/* Информация о доставке в форме */
.delivery-info {
    background: var(--info-light);
    color: var(--info);
    padding: var(--space-md);
    border-radius: var(--radius-lg);
    margin: var(--space-sm) 0;
    border-left: 4px solid var(--info);
    font-size: 0.85rem;
}

/* Стили для полей с авто-заполнением */
.auto-filled-field {
    background-color: #f0f9ff !important;
    border-color: #36cfc9 !important;
    box-shadow: 0 0 0 1px rgba(54, 207, 201, 0.2) !important;
    border-radius: 25px;
}

.auto-filled-field:focus {
    background-color: white !important;
    box-shadow: 0 0 0 3px rgba(54, 207, 201, 0.3) !important;
}

/* ========== АНИМАЦИИ ========== */

@keyframes statusPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(33, 98, 239, 0.7);
    }

    70% {
        box-shadow: 0 0 0 7.5px rgba(33, 98, 239, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(33, 98, 239, 0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== АДАПТИВНОСТЬ ========== */

@media (max-width: 768px) {
    .status-badge {
        font-size: 0.45rem;
        padding: 0.2rem 0.4rem 0.2rem 1rem;
        /* max-width: 100px; */
    }

    .status-badge::before {
        width: 5px;
        height: 5px;
        left: 0.3rem;
    }

    .timeline {
        flex-direction: column;
    }

    .timeline-item {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
        padding: 0.5rem 0.6rem;
        width: 100%;
    }

    .timeline-icon {
        width: 24px;
        height: 24px;
        font-size: 0.8rem;
    }

    .status-btn {
        padding: 0.75rem;
        min-height: 100px;
        flex-direction: row;
        text-align: left;
        gap: 1rem;
        justify-content: flex-start;
    }

    .status-btn .status-icon {
        margin-bottom: 0;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .timeline {
        flex-direction: column;
    }

    .timeline-item {
        width: 100%;
    }
}


.status-btn.active {
    border-color: var(--primary) !important;
    background: var(--primary-light) !important;
    color: var(--primary) !important;
    box-shadow: 0 4px 12px rgba(33, 98, 239, 0.15) !important;
    position: relative;
    z-index: 1;
}

.status-btn:not(.active):hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Подсветка текущего выбранного статуса */
.status-btn.active::after {
    content: '✓ Выбран';
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary);
    color: white;
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: var(--radius-lg);
    font-weight: 600;
}

.status-btn.active.current::after {
    content: '👈 Текущий';
    background: var(--success);
}







/* ========== УЛУЧШЕННЫЕ СТИЛИ ТАЙМЛАЙНА ========== */

.timeline-item::before {
    content: '';
    position: absolute;
    left: -9px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.timeline-item.completed::before {
    background: var(--success);
}

.timeline-item.current-status::before {
    background: var(--primary);
    animation: pulse 2s infinite;
}

.timeline-item.active::before {
    background: var(--info);
}

.timeline-item.future-status::before {
    background: var(--border);
}

/* Состояния иконок */
.timeline-item.completed .timeline-icon {
    background: var(--success);
}

.timeline-item.current-status .timeline-icon {
    background: var(--primary);
    animation: iconPulse 2s infinite;
}

.timeline-item.active .timeline-icon {
    background: var(--info);
}

.timeline-item.future-status .timeline-icon {
    background: var(--border);
    opacity: 0.5;
}

/* Контент таймлайна */

.timeline-info {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    font-style: italic;
}

.timeline-item.final-status {
    border-left-color: var(--success);
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), transparent 100%);
}

/* Анимации */
@keyframes iconPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(33, 98, 239, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(33, 98, 239, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(33, 98, 239, 0);
    }
}

/* Соединительные линии между статусами */
.timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 100%;
    /* Справа от элемента */
    top: 50%;
    /* По центру */
    height: 2px;
    width: 20px;
    /* Расстояние между элементами */
    background: var(--border);
    z-index: 1;
}

.timeline-item.completed:not(:last-child)::after {
    background: var(--success);
}

.timeline-item.current-status:not(:last-child)::after {
    background: var(--primary);
}

/* Адаптивность */
@media (max-width: 768px) {
    .timeline-item {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .timeline-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .timeline-title {
        font-size: 0.9rem;
    }

    .timeline-date {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .timeline-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .timeline-icon {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
}







/* ========== СТИЛИ ДЛЯ НОВОЙ МОДАЛКИ СТАТУСОВ ========== */

/* status-modal.css или style.css */

.status-modal-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 0.5rem 0;
}

.status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cargo-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.cargo-code {
    font-size: 1.2rem;
    font-weight: 700;
    background: var(--primary-light);
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-lg);
    color: var(--primary);
}

.system-info {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.status-grid {
    display: grid;
    grid-template-columns: 0.45fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .status-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.status-dates-panel,
.status-info-panel,
.status-column-right-2 {
    background: var(--background-alt);
    border-radius: var(--radius-lg);
    padding: 1rem;
}

.status-info-panel {
    display: flex;
    flex-direction: row;
    gap: 1rem;
}

.status-column-right-2 {
    margin-top: 1.5rem;
}

.date-fields {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.date-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.date-field label {
    font-weight: 600;
    font-size: 0.9rem;
}

.status-date-input {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: white;
}

.final-status-selector {
    margin: 1rem 0;
}

.radio-group {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.note-field textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    resize: vertical;
    margin-top: 0.5rem;
}

.status-explanation {
    background: var(--info-light);
    /* margin-top: 1rem; */
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--info);
    height: fit-content;
}

.status-explanation ul {
    margin: 0.5rem 0 0 1.2rem;
    font-size: 0.85rem;
    line-height: 1.4;
}

.current-status-info {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--border);
}

.system-status {
    margin: 0.5rem 0;
}

/* .status-preview {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
} */

.preview-badge {
    display: flex;
    align-items: center;
    margin: 0.75rem 0;
    gap: 1rem;
}

.preview-timeline {
    background-color: var(--surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1rem 1rem 1rem;
    max-height: 200px;
    overflow-y: auto;
}

@media (max-width: 768px) {
    .status-actions {
        gap: 0.5rem;
    }
}


/* ============================================
   БЛОК ФОТО ДЛЯ СТАТУСА "ПЕРЕДАН В ТК"
   (не конфликтует с cargo-photos.css)
============================================ */

.status-photo-section {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--surface);
    border-radius: var(--radius-lg, 8px);
    border: 1px solid var(--border, #E2E8F0);
    transition: all 0.2s ease;
}

.status-photo-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.status-photo-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.status-photo-title {
    font-weight: 600;
    flex: 1;
    color: var(--text, #1F2937);
}

/* Контейнер для превью (поддерживает сетку) */
.status-photo-preview {
    margin: 0.5rem 0;
    min-height: 80px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    /* ← центрирование по горизонтали */
    align-items: center;
    /* ← центрирование по вертикали (если разная высота) */
    gap: 0.75rem;
}

/* Сетка для множественных фото (используется вместо обычного flex) */
.status-photo-grid {
    display: flex;
    /* меняем grid на flex */
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    /* центрирование по горизонтали */
    align-items: center;
}

.status-photo-grid:has(.status-photo-thumb:only-child) {
    justify-content: center;
}

.status-photo-thumb {
    /* убедитесь, что миниатюра не растягивается на всю ширину */
    width: 80px;
    flex-shrink: 0;
}

/* Элемент превью (миниатюра) */
.status-photo-thumb {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: var(--radius-lg, 8px);
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--border, #E2E8F0);
    background: var(--surface, #FFFFFF);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.status-photo-thumb:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow, 0 4px 6px -1px rgba(0, 0, 0, 0.1));
}

.status-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Оверлей при наведении (глазик) */
.status-photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    opacity: 0;
    transition: opacity 0.2s ease;
    backdrop-filter: blur(2px);
}

.status-photo-thumb:hover .status-photo-overlay {
    opacity: 1;
}

/* Кнопка удаления фото (крестик в углу миниатюры) */
.status-photo-delete {
    position: absolute;
    top: 4px;
    right: 6px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.95);
    border: none;
    color: white;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 2;
    opacity: 0;
    transform: scale(0.8);

    /* ДОБАВИТЬ ЭТИ СТРОКИ: */
    padding: 0 !important;
    line-height: 1 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    box-sizing: border-box;
}

.status-photo-thumb:hover .status-photo-delete {
    opacity: 1;
    transform: scale(1);
}

.status-photo-delete:hover {
    background: #EF4444;
    transform: scale(1.1);
}

/* Счётчик фото (текст под сеткой) */
.status-photo-count {
    font-size: 0.75rem;
    color: var(--text-muted, #6B7280);
    margin-top: 0.5rem;
    text-align: center;
    width: 100%;
}

/* Плейсхолдер, когда нет фото */
.status-photo-placeholder {
    padding: 0.5rem;
    color: var(--text-muted, #6B7280);
    font-size: 0.8rem;
    /* background: var(--surface, #FFFFFF); */
    /* border-radius: var(--radius-lg, 8px); */
    text-align: center;
    /* border: 1px dashed var(--border, #E2E8F0); */
    width: 100%;
}

/* Подсказка внизу блока */
.status-photo-hint {
    font-size: 0.7rem;
    color: var(--text-muted, #6B7280);
    margin-top: 0.5rem;
    text-align: center;
}

/* Индикатор загрузки (спиннер) */
.status-photo-loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: rgba(0, 0, 0, 0.6);
    border-radius: var(--radius-lg);
    color: white;
    font-size: 0.7rem;
}

.status-photo-loading .spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Адаптивность для маленьких экранов */
@media (max-width: 480px) {
    .status-photo-thumb {
        width: 60px;
        height: 60px;
    }

    .status-photo-preview {
        gap: 0.5rem;
    }

    .status-photo-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .status-photo-header .btn-outline {
        width: 100%;
        justify-content: center;
    }

    .status-photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 0.5rem;
    }
}

/* Анимация спиннера */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}




/* Слайдер для документов передачи */
.transfer-photo-slider {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.transfer-photo-slider.active {
    display: flex;
}

.slider-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    cursor: pointer;
}

.slider-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    z-index: 10001;
    border-radius: var(--radius-lg);
}

.slider-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.slider-content img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.2s ease;
    transition: opacity 0.2s ease;
    opacity: 1;
}

.slider-content img.loading {
    opacity: 0;
}

.slider-counter {
    margin-top: 1rem;
    color: white;
    background: rgba(0, 0, 0, 0.6);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-lg);
    font-size: 0.85rem;
    backdrop-filter: blur(4px);
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10002;
}

.slider-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.slider-prev {
    left: -60px;
}

.slider-next {
    right: -60px;
}

.slider-nav.disabled,
.slider-nav[disabled] {
    opacity: 0.4;
    pointer-events: none;
    cursor: default;
}

.slider-close {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10002;
}

.status-date-input-1 {
    width: auto;
}

.slider-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.note-field {
    border: 1px solid #e4e4e4;
    border-radius: var(--radius-lg);
    padding: 0.5rem 1rem;
}

@media (max-width: 768px) {
    .slider-prev {
        left: -40px;
        width: 36px;
        height: 36px;
        font-size: 24px;
    }

    .slider-next {
        right: -40px;
        width: 36px;
        height: 36px;
        font-size: 24px;
    }

    .slider-close {
        top: -40px;
        right: -40px;
        width: 32px;
        height: 32px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .slider-prev {
        left: 10px;
    }

    .slider-next {
        right: 10px;
    }

    .slider-close {
        top: 10px;
        right: 10px;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Улучшенное позиционирование кнопок на мобильных */
@media (max-width: 768px) {
    .slider-nav {
        width: 40px;
        height: 40px;
        font-size: 28px;
        background: rgba(0, 0, 0, 0.5);
    }

    .slider-prev {
        left: 10px;
    }

    .slider-next {
        right: 10px;
    }

    .slider-close {
        top: 10px;
        right: 10px;
    }
}