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

/* Переопределение Bootstrap контейнера для полной ширины только на больших экранах */
@media (min-width: 1200px) {
    .container {
        max-width: none !important;
        width: 100% !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    body.application-form-page .container {
        max-width: none !important;
        width: 100% !important;
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Стили для правильного отображения дат в формате DD-MM-YYYY */
input[type="date"][data-date-format="dd-mm-yyyy"] {
    direction: ltr;
}

/* Принудительное форматирование дат для всех устройств */
input[type="date"][data-date-format="dd-mm-yyyy"] {
    /* Заставляем браузер использовать европейский формат даты */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Для WebKit браузеров (Chrome, Safari) */
input[type="date"][data-date-format="dd-mm-yyyy"]::-webkit-datetime-edit-text {
    color: #495057;
}

input[type="date"][data-date-format="dd-mm-yyyy"]::-webkit-datetime-edit-month-field {
    color: #495057;
}

input[type="date"][data-date-format="dd-mm-yyyy"]::-webkit-datetime-edit-day-field {
    color: #495057;
}

input[type="date"][data-date-format="dd-mm-yyyy"]::-webkit-datetime-edit-year-field {
    color: #495057;
}

/* Дополнительные стили для мобильных устройств */
@media (max-width: 768px) {
    input[type="date"][data-date-format="dd-mm-yyyy"] {
        /* Принудительно используем европейский формат на мобильных */
        direction: ltr;
        text-align: left;
    }

    /* Для iOS Safari */
    input[type="date"][data-date-format="dd-mm-yyyy"]::-webkit-datetime-edit {
        text-align: left;
        direction: ltr;
    }

    /* Для Android Chrome */
    input[type="date"][data-date-format="dd-mm-yyyy"]::-webkit-datetime-edit-text {
        padding: 0 1px;
    }
}

input[type="date"][data-date-format="dd-mm-yyyy"]::-webkit-calendar-picker-indicator {
    filter: invert(0.5);
    cursor: pointer;
}

input[type="date"][data-date-format="dd-mm-yyyy"]:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Убираем все градиенты и делаем чистый дизайн */
body {
    background: #f8f9fa;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.animated-bg {
    background: #f8f9fa;
    min-height: 100vh;
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
}

.animated-bg .container {
    position: relative;
    z-index: 2;
    background: transparent;
    padding-top: 80px;
    max-width: none;
    width: 100%;
}

/* ===== КОНТЕНТ БЛОК ===== */
.content-box {
    background: white;
    border-radius: 15px;
    padding: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
    border: 1px solid #e9ecef;
}

/* Полная ширина только на больших экранах */
@media (min-width: 1200px) {
    .content-box {
        width: 100%;
        max-width: none;
    }
}

.hero-section {
    text-align: center;
    margin-bottom: 3rem;
}

.hero-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.hero-section p {
    font-size: 1.2rem;
    color: #6c757d;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ===== СЕКЦИИ УСЛУГ ===== */
.services-section {
    margin: 3rem 0;
}

.service-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: #3498db;
}

.service-item h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.service-item p {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.service-features {
    list-style: none;
    padding: 0;
}

.service-features li {
    padding: 0.25rem 0;
    color: #6c757d;
    position: relative;
    padding-left: 1.5rem;
}

.service-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: bold;
}

/* ===== ФОРМА ===== */
.form-section {
    background: white;
    border-radius: 15px;
    padding: 3rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin: 3rem 0;
    border: 1px solid #e9ecef;
}

/* Полная ширина только на больших экранах */
@media (min-width: 1200px) {
    .form-section {
        width: 100%;
        max-width: none;
    }
}

.form-section h2 {
    color: #2c3e50;
    margin-bottom: 2rem;
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
}

.form-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-col {
    flex: 1;
}

/* ===== УЛУЧШЕННЫЕ СТИЛИ ФОРМЫ ===== */
.form-step {
    margin-bottom: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Полная ширина только на больших экранах */
@media (min-width: 1200px) {
    .form-step {
        width: 100%;
        max-width: none;
    }
}

.form-step:hover {
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.form-step .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 2rem;
    border-bottom: none;
    position: relative;
}

.form-step .card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.form-step .card-header h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.form-step .card-header i {
    margin-right: 0.75rem;
    font-size: 1.2rem;
    opacity: 0.9;
}

.form-step .card-body {
    padding: 2rem;
    background: #fafbfc;
}

/* Группировка полей */
.field-group {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.field-group:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #3498db;
}

.field-group-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f8f9fa;
    display: flex;
    align-items: center;
}

.field-group-title i {
    margin-right: 0.5rem;
    color: #3498db;
    font-size: 1rem;
}

/* Улучшенные поля формы */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    font-size: 0.95rem;
}

.form-group label i {
    margin-right: 0.5rem;
    color: #3498db;
    font-size: 0.9rem;
    width: 16px;
    text-align: center;
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: white;
}

.form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.15);
    background: white;
}

.form-control:hover {
    border-color: #bdc3c7;
}

/* Индикатор прогресса */
.progress-indicator {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.progress-stats .stat {
    text-align: center;
    flex: 1;
}

.progress-stats .stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #3498db;
    display: block;
}

.progress-stats .stat-label {
    font-size: 0.85rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.progress-bar-container {
    background: #f8f9fa;
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    background: linear-gradient(90deg, #3498db, #2ecc71);
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Улучшенные кнопки */
.btn-action {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: normal;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    color: white;
}

.btn-action::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-action:hover::before {
    left: 100%;
}

/* Стили для кнопок добавления в заголовках секций */
.form-step .card-header .btn-primary {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(39, 174, 96, 0.3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 2;
}

.form-step .card-header .btn-primary:hover {
    background: linear-gradient(135deg, #229954 0%, #27ae60 100%);
    transform: translateY(-1px);
    box-shadow: 0 5px 12px rgba(39, 174, 96, 0.4);
    color: white;
}

.form-step .card-header .btn-primary i {
    font-size: 0.9rem;
}

/* Стили для кнопок удаления в таблицах */
.btn-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border: none;
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(231, 76, 60, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.4);
    color: white;
}

.btn-danger i {
    font-size: 0.8rem;
}

/* Стили для кнопок очистки данных */
.btn-outline-danger {
    background: transparent;
    border: 2px solid #e74c3c;
    color: #e74c3c;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-outline-danger:hover {
    background: #e74c3c;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

.btn-outline-success {
    background: transparent;
    border: 2px solid #27ae60;
    color: #27ae60;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-outline-success:hover {
    background: #27ae60;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(39, 174, 96, 0.3);
}

/* Стили для инструкций */
.application-instructions {
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    overflow: hidden;
    transition: all 0.3s ease;
}

.application-instructions:hover {
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.application-instructions .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 2rem;
    border-bottom: none;
    position: relative;
}

.application-instructions .card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.application-instructions .card-header h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.application-instructions .card-header i {
    margin-right: 0.75rem;
    font-size: 1.2rem;
    opacity: 0.9;
}

.application-instructions .card-header .btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.application-instructions .card-header .btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    transform: translateY(-1px);
}

.application-instructions .card-body {
    padding: 2rem;
    background: #fafbfc;
    transition: all 0.3s ease;
    overflow: hidden;
}

.instruction-steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.step-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.step-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #3498db;
    transform: translateX(5px);
}

.step-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.step-content h5 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

.step-content h5 i {
    margin-right: 0.5rem;
    color: #3498db;
    font-size: 1rem;
}

.step-content p {
    margin: 0;
    color: #6c757d;
    line-height: 1.6;
    font-size: 0.95rem;
}

.tips-box {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #2196f3;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.15);
}

.tips-box h5 {
    color: #1976d2;
    margin-bottom: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.tips-box h5 i {
    margin-right: 0.5rem;
    color: #ff9800;
}

.tips-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tips-list li {
    padding: 0.5rem 0;
    color: #2c3e50;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.tips-list li i {
    color: #27ae60;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

/* Стили для предустановленных документов */
.preset-documents-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #3498db;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.preset-documents-card:hover {
    border-color: #2980b9;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    transform: translateY(-2px);
}

.preset-documents-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.preset-documents-header h5 {
    margin: 0;
    color: #2c3e50;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.preset-documents-header h5 i {
    margin-right: 0.5rem;
    color: #3498db;
}

.preset-toggle-btn {
    background: white;
    border: 2px solid #3498db;
    color: #3498db;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
}

.preset-toggle-btn:hover {
    background: #3498db;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
    text-decoration: none;
}

.preset-toggle-btn i {
    font-size: 0.9rem;
}

.preset-help-text {
    background: rgba(52, 152, 219, 0.1);
    border-left: 4px solid #3498db;
    padding: 0.75rem 1rem;
    border-radius: 0 8px 8px 0;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #2c3e50;
}

.preset-help-text i {
    color: #3498db;
    margin-right: 0.5rem;
}

.preset-document-btn {
    background: white;
    border: 2px solid #e9ecef;
    color: #2c3e50;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    margin: 0.25rem;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-weight: 500;
}

.preset-document-btn:hover {
    border-color: #3498db;
    color: #3498db;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.2);
    background: #f8f9ff;
    text-decoration: none;
}

.preset-document-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.3);
}

/* ===== КНОПКИ ===== */
.btn {
    margin: 0.5rem;
    text-transform: none;
    letter-spacing: normal;
    border-radius: 8px;
    padding: 12px 24px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn::before {
    display: none;
}

.btn:hover::before {
    display: none;
}

.btn-primary {
    background: #3498db;
    border-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    border-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.btn-success {
    background: #27ae60;
    border-color: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #229954;
    border-color: #229954;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

/* ===== КАРТОЧКИ ===== */
.card {
    animation: none;
    opacity: 1;
    transform: none;
    border: 1px solid #e9ecef;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.card-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    border-radius: 15px 15px 0 0;
    padding: 1.5rem;
}

.card-body {
    padding: 2rem;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
    .content-box {
        padding: 2rem;
        margin: 1rem;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section p {
        font-size: 1rem;
    }

    .service-item {
        padding: 1.5rem;
    }

    .form-section {
        padding: 2rem;
    }

    .form-row {
        flex-direction: column;
        gap: 1rem;
    }

    .btn {
        width: 100%;
        margin: 0.5rem 0;
    }

    /* Адаптивность для новых стилей */
    .form-step .card-header {
        padding: 1rem 1.5rem;
    }

    .form-step .card-header h3 {
        font-size: 1.2rem;
    }

    .form-step .card-body {
        padding: 1.5rem;
    }

    .field-group {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .field-group-title {
        font-size: 1rem;
    }

    .progress-indicator {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }

    .progress-stats {
        flex-direction: column;
        gap: 0.5rem;
    }

    .progress-stats .stat {
        padding: 0.5rem;
        background: rgba(52, 152, 219, 0.1);
        border-radius: 8px;
    }

    .preset-documents-card {
        padding: 1rem;
    }

    .preset-documents-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .preset-toggle-btn {
        align-self: flex-end;
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
        min-height: 44px;
    }

    .application-instructions .card-header .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
        min-height: 44px;
    }

    .preset-document-btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        margin: 0.5rem 0.25rem;
        min-height: 44px;
        width: calc(50% - 0.5rem);
        text-align: center;
    }

    /* Адаптивность для кнопок добавления */
    .form-step .card-header .btn-primary {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
        min-height: 44px;
    }

    /* Адаптивность для кнопок удаления */
    .btn-danger {
        min-width: 44px;
        min-height: 44px;
        padding: 0.6rem 0.9rem;
        font-size: 0.9rem;
    }

    /* Адаптивность для кнопок очистки */
    .btn-outline-danger,
    .btn-outline-success {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
        min-height: 44px;
        width: 100%;
        margin: 0.5rem 0;
        justify-content: center;
    }

    .btn-action {
        width: 100%;
        margin: 0.5rem 0;
    }

    .form-navigation .d-flex {
        flex-direction: column;
    }

    /* Адаптивность для инструкций */
    .application-instructions .card-body {
        padding: 1.5rem;
    }

    .instruction-steps {
        gap: 1rem;
    }

    .step-item {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .step-number {
        align-self: center;
    }

    .step-content h5 {
        justify-content: center;
    }

    .tips-box {
        margin-top: 1.5rem;
        padding: 1rem;
    }

    .tips-list li {
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .animated-bg .container {
        padding-top: 100px;
    }

    .content-box {
        padding: 1.5rem;
        margin: 0.5rem;
    }

    .hero-section h1 {
        font-size: 1.5rem;
    }

    .service-item {
        padding: 1rem;
    }

    .form-section {
        padding: 1.5rem;
    }

    .form-section h2 {
        font-size: 1.5rem;
    }
}

/* Стили для Cropper */
.photo-preview {
    text-align: center;
}

.photo-preview img {
    border: 2px solid #dee2e6;
    border-radius: 8px;
}

.cropper-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
}

.cropper-controls .btn {
    min-width: 120px;
    min-height: 44px;
    /* Минимальная высота для touch */
    touch-action: manipulation;
    /* Улучшает отзывчивость touch */
    -webkit-tap-highlight-color: transparent;
    /* Убирает подсветку при touch */
}

/* Дополнительные стили для мобильных устройств */
@media (max-width: 768px) {
    .cropper-controls {
        flex-direction: column;
        align-items: center;
    }

    .cropper-controls .btn {
        width: 100%;
        max-width: 200px;
        min-height: 48px;
        font-size: 16px;
        /* Предотвращает zoom на iOS */
    }

    .photo-preview {
        margin: 10px 0;
    }

    .photo-preview img {
        max-width: 100%;
        height: auto;
    }
}

/* ===== СТИЛИ ТАБЛИЦ С ЧЕТКИМИ ГРАНИЦАМИ ===== */

/* Контейнеры таблиц */
.table-responsive {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

/* Полная ширина только на больших экранах */
@media (min-width: 1200px) {
    .table-responsive {
        width: 100%;
        max-width: none;
        overflow-x: auto;
    }

    #experienceTable,
    #certificateTable {
        width: 100%;
        min-width: 100%;
    }
}

/* Основные стили для всех таблиц в анкете */
#experienceTable,
#certificateTable {
    border-collapse: separate !important;
    border-spacing: 0;
    width: 100%;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    table-layout: auto;
}

/* Заголовки таблиц */
#experienceTable thead th,
#certificateTable thead th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    padding: 12px 8px;
    border: none;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    vertical-align: middle;
    font-size: 0.9rem;
    width: auto;
}

/* Гибкое распределение ширины колонок для таблицы опыта работы */
#experienceTable th:nth-child(1) {
    width: 40px;
    min-width: 40px;
}

/* Drag handle */
#experienceTable th:nth-child(2) {
    width: auto;
    min-width: 120px;
}

/* Rank */
#experienceTable th:nth-child(3) {
    width: auto;
    min-width: 120px;
}

/* Vessel Type */
#experienceTable th:nth-child(4) {
    width: auto;
    min-width: 150px;
}

/* Vessel Name */
#experienceTable th:nth-child(5) {
    width: auto;
    min-width: 100px;
}

/* Sign On */
#experienceTable th:nth-child(6) {
    width: auto;
    min-width: 100px;
}

/* Sign Off */
#experienceTable th:nth-child(7) {
    width: auto;
    min-width: 120px;
}

/* Company */
#experienceTable th:nth-child(8) {
    width: 60px;
    min-width: 60px;
}

/* Action */

#experienceTable thead th:last-child,
#certificateTable thead th:last-child {
    border-right: none;
}

/* Ячейки таблиц */
#experienceTable tbody td,
#certificateTable tbody td {
    padding: 8px;
    border: 1px solid #dee2e6;
    border-top: none;
    border-left: none;
    vertical-align: middle;
    background: white;
    width: auto;
}

/* Гибкое распределение ширины ячеек для таблицы опыта работы */
#experienceTable td:nth-child(1) {
    width: 40px;
    min-width: 40px;
}

/* Drag handle */
#experienceTable td:nth-child(2) {
    width: auto;
    min-width: 120px;
}

/* Rank */
#experienceTable td:nth-child(3) {
    width: auto;
    min-width: 120px;
}

/* Vessel Type */
#experienceTable td:nth-child(4) {
    width: auto;
    min-width: 150px;
}

/* Vessel Name */
#experienceTable td:nth-child(5) {
    width: auto;
    min-width: 100px;
}

/* Sign On */
#experienceTable td:nth-child(6) {
    width: auto;
    min-width: 100px;
}

/* Sign Off */
#experienceTable td:nth-child(7) {
    width: auto;
    min-width: 120px;
}

/* Company */
#experienceTable td:nth-child(8) {
    width: 60px;
    min-width: 60px;
}

/* Action */

#experienceTable tbody td:first-child,
#certificateTable tbody td:first-child {
    border-left: none;
}

#experienceTable tbody tr:first-child td,
#certificateTable tbody tr:first-child td {
    border-top: 1px solid #dee2e6;
}

/* Строки таблиц */
#experienceTable tbody tr,
#certificateTable tbody tr {
    border-bottom: 1px solid #dee2e6;
    transition: background-color 0.2s ease;
}

#experienceTable tbody tr:hover,
#certificateTable tbody tr:hover {
    background-color: #f8f9fa;
}

#experienceTable tbody tr:last-child,
#certificateTable tbody tr:last-child {
    border-bottom: none;
}

/* Поля ввода в таблицах */
#experienceTable .form-control,
#certificateTable .form-control {
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 6px 8px;
    font-size: 0.9rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    max-width: 100%;
}

#experienceTable .form-control:focus,
#certificateTable .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    outline: none;
}

/* Кнопки в таблицах */
#experienceTable .btn,
#certificateTable .btn {
    margin: 0;
    padding: 4px 8px;
    font-size: 0.8rem;
    border-radius: 4px;
    min-width: auto;
    width: 100%;
    box-sizing: border-box;
}

/* Drag handle в таблицах */
#experienceTable .drag-handle,
#certificateTable .drag-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    cursor: move;
    color: #6c757d;
    transition: color 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

#experienceTable .drag-handle:hover,
#certificateTable .drag-handle:hover {
    color: #495057;
}

/* Кнопки добавления внизу таблиц */
.mt-3.text-center .btn {
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding: 8px 16px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.mt-3.text-center .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Адаптивность для таблиц - откачено, оставляем как было */

/* Подсказка для поля телефона на мобильных устройствах */
@media (max-width: 768px) {
    #phone::placeholder {
        font-size: 0.85rem;
        color: #6c757d;
    }

    #phone {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='%236c757d' d='M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z'/%3e%3cpath fill='%236c757d' d='m5.255 5.786a.237.237 0 0 0 .241.247h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286zm1.557 5.763c0 .533.425.927 1.01.927.609 0 1.028-.394 1.028-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94z'/%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: right 12px center;
        background-size: 16px;
        padding-right: 40px;
    }

    /* Подсказка под полем телефона */
    #phone+.invalid-feedback::before {
        content: "📱 Укажите номер с кодом страны (например: +380501234567)";
        display: block;
        font-size: 0.75rem;
        color: #6c757d;
        margin-top: 5px;
        padding: 8px;
        background-color: #f8f9fa;
        border-radius: 4px;
        border-left: 3px solid #17a2b8;
    }

    /* Аналогично для контактного телефона */
    #contact_phone::placeholder {
        font-size: 0.85rem;
        color: #6c757d;
    }

    #contact_phone {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='%236c757d' d='M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z'/%3e%3cpath fill='%236c757d' d='m5.255 5.786a.237.237 0 0 0 .241.247h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286zm1.557 5.763c0 .533.425.927 1.01.927.609 0 1.028-.394 1.028-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94z'/%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: right 12px center;
        background-size: 16px;
        padding-right: 40px;
    }

    #contact_phone+.invalid-feedback::before {
        content: "📱 Укажите номер с кодом страны (например: +380501234567)";
        display: block;
        font-size: 0.75rem;
        color: #6c757d;
        margin-top: 5px;
        padding: 8px;
        background-color: #f8f9fa;
        border-radius: 4px;
        border-left: 3px solid #17a2b8;
    }

    /* Стили для полей телефона с модалкой */
    #phone[readonly],
    #contact_phone[readonly] {
        cursor: pointer;
        background-color: #f8f9fa;
        border-style: dashed;
    }

    #phone[readonly]:hover,
    #contact_phone[readonly]:hover {
        background-color: #e9ecef;
        border-color: #80bdff;
    }

    /* Современные стили для выбора кода страны */
    .input-group .btn {
        border-right: 0;
        min-width: 70px;
        font-weight: 500;
    }

    .input-group .btn:hover {
        background-color: #e9ecef;
        border-color: #ced4da;
    }

    .input-group .form-control {
        border-left: 0;
    }

    .input-group .form-control:focus {
        border-left: 0;
        box-shadow: none;
    }

    .input-group:focus-within .btn {
        border-color: #80bdff;
        background-color: #e9ecef;
    }

    /* Современный ввод телефона */
    .iti {
        width: 100%;
    }

    .iti__flag-container {
        border-radius: 8px 0 0 8px;
    }

    .iti__selected-flag {
        padding: 0 8px;
        border-radius: 8px 0 0 8px;
        background-color: #f8f9fa;
        border: 1px solid #ced4da;
        border-right: 0;
    }

    .iti__selected-flag:hover {
        background-color: #e9ecef;
    }

    .iti input {
        border-radius: 0 8px 8px 0;
        border-left: 0;
    }

    .iti input:focus {
        border-left: 0;
        box-shadow: none;
    }

    .iti--allow-dropdown .iti__flag-container:hover .iti__selected-flag {
        background-color: #e9ecef;
    }

    .iti__country-list {
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        border: 1px solid #dee2e6;
    }

    .iti__country {
        padding: 8px 12px;
    }

    .iti__country:hover {
        background-color: #f8f9fa;
    }

    /* Дополнительные стили для выпадающего списка стран */
    .iti__country-list {
        z-index: 9999 !important;
        max-height: 200px;
        overflow-y: auto;
    }

    .iti__flag-container {
        z-index: 1;
    }

    .iti__selected-flag {
        z-index: 2;
    }

    .iti__country-list--dropup {
        bottom: 100%;
        margin-bottom: -1px;
    }

    /* Современный select с поиском */
    .choices {
        position: relative;
        margin-bottom: 15px;
    }

    .choices__inner {
        background-color: #ffffff;
        border: 1px solid #ced4da;
        border-radius: 8px;
        font-size: 1rem;
        min-height: 38px;
        padding: 4px 8px;
        transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    }

    .choices__inner:hover {
        border-color: #80bdff;
    }

    .choices.is-focused .choices__inner {
        border-color: #80bdff;
        box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    }

    .choices__list--dropdown {
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        border: 1px solid #dee2e6;
        z-index: 1000;
    }

    .choices__item--choice {
        padding: 8px 12px;
        border-radius: 4px;
        margin: 2px;
        transition: background-color 0.2s ease-in-out;
    }

    .choices__item--choice:hover {
        background-color: #f8f9fa;
    }

    .choices__item--choice.is-highlighted {
        background-color: #007bff;
        color: white;
    }

    .choices__input {
        background-color: transparent;
        border: none;
        font-size: 1rem;
        padding: 4px 8px;
    }

    .choices__input:focus {
        outline: none;
    }
}