/* ===== ОСНОВНЫЕ ПЕРЕМЕННЫЕ ===== */
:root {
    --primary-color: #D91656;
    --primary-light: #FF4D87;
    --primary-dark: #B3003D;
    --secondary-color: #333333;
    --border-color: #e0e0e0;
    --text-light: #666666;
    --card-color: #F6F8FA;
    --sidebar-width: 280px;
    --gray-color: #cccccc;
    --success-color: #27ae60;
    --error-color: #dc3545;
}

/* ===== СБРОС И БАЗОВЫЕ СТИЛИ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    line-height: 1.5;
    color: var(--secondary-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ===== ХЛЕБНЫЕ КРОШКИ ===== */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    padding: 10px 0;
    margin-bottom: 20px;
    list-style: none;
    background: transparent;
}

.breadcrumb li {
    display: inline-block;
    font-size: 14px;
}

.breadcrumb li:after {
    content: "/";
    margin: 0 8px;
    color: #999;
}

.breadcrumb li:last-child:after {
    content: "";
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb .active {
    color: #999;
}

/* ===== ОСНОВНАЯ СЕТКА ===== */
.page-layout {
    display: flex;
    gap: 30px;
    margin: 20px 0;
}

.sidebar-column {
    flex: 0 0 var(--sidebar-width);
    width: var(--sidebar-width);
}

.content-column {
    flex: 1;
    min-width: 0;
}

/* ===== САЙДБАР ===== */
#side-block {
    background: transparent;
    padding: 0;
    margin-bottom: 30px;
}

#side-block p {
    margin: 0 0 8px;
    padding: 0;
    background: var(--card-color);
    border-radius: 12px;
}

#side-block a {
    display: block;
    padding: 14px 20px;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border-radius: 12px;
    transition: all 0.3s ease;
}

#side-block a:hover {
    background: rgba(217, 22, 86, 0.15);
    padding-left: 25px;
}

#side-block a.active {
    background: rgba(217, 22, 86, 0.15);
    font-weight: 700;
}

/* ===== ОСНОВНОЙ БЛОК ===== */
#main-block {
    background: white;
    border-radius: 12px;
    padding: 40px;
    min-height: 400px;
}

.page-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 30px;
    color: var(--secondary-color);
}

/* ===== ДИЗАЙН ФОРМЫ 50/50 ===== */
.form-split {
    display: flex;
    gap: 0;
    margin-top: 20px;
    background: var(--card-color);
    border-radius: 16px;
    overflow: hidden;
}

.form-split-content {
    flex: 1;
    padding: 0;
    background: white;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.form-split-image {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: var(--card-color);
    min-height: 500px;
    aspect-ratio: 1/1;
}

.form-split-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ===== ИНДИКАТОР ШАГОВ ===== */
.steps-container {
    padding: 25px 40px 15px;
    background: white;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.step-indicator {
    display: flex;
    justify-content: space-between;
    position: relative;
    width: 100%;
    min-height: 50px;
}

/* СЕРАЯ ПОДЛОЖКА */
.step-line-bg {
    position: absolute;
    top: 15px;
    left: 60px;
    right: 60px;
    height: 2px;
    background: var(--gray-color, #cccccc);
    z-index: 1;
    pointer-events: none;
}

/* ЦВЕТНАЯ ЛИНИЯ */
.step-line-fill {
    position: absolute;
    top: 15px;
    left: 60px;
    height: 2px;
    background: var(--primary-color, #D91656);
    width: 0%;
    transition: width 0.3s ease;
    z-index: 2;
    pointer-events: none;
}

.step-item {
    position: relative;
    z-index: 3;
    background: transparent; /* ПРОЗРАЧНЫЙ фон */
    padding: 0;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.step-number {
    width: 32px;
    height: 32px;
    background: white;
    border: 2px solid;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
}

/* Текущий шаг - заливка primary */
.step-item.active .step-number {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Заполненный шаг (но не текущий) - primary обводка, галочка */
.step-item.filled .step-number {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: white;
}

/* Незаполненный шаг - серый */
.step-item.inactive .step-number {
    border-color: var(--gray-color);
    color: var(--gray-color);
    background: white;
}

.step-label {
    font-size: 13px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.step-item.active .step-label {
    color: var(--primary-color);
}

.step-item.filled .step-label {
    color: #999;
}

.step-item.inactive .step-label {
    color: var(--gray-color);
}

/* ===== КОНТЕЙНЕР ШАГОВ ===== */
.step-container {
    padding: 25px 40px 30px;
    min-height: 450px;
    overflow: visible;
}

.step {
    display: none;
    animation: fadeIn 0.3s ease;
}

.step.active-step {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== СТИЛИ ФОРМЫ ===== */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 14px;
    margin-bottom: 5px;
}

.form-group label .required-star {
    color: var(--primary-color);
    margin-left: 2px;
    font-size: 16px;
}

.form-group .form-control {
    width: 100%;
    height: 44px;
    padding: 0 16px;
    font-size: 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: white;
    color: var(--secondary-color);
    transition: all 0.3s ease;
    line-height: normal;
}

.form-group textarea.form-control {
    height: auto;
    min-height: 100px;
    padding: 12px 16px;
}

.form-group .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 40px;
}

.form-group.has-error .form-control {
    border-color: var(--error-color);
    background: rgba(220, 53, 69, 0.02);
}

/* ===== ГРУППА ДАТЫ РОЖДЕНИЯ ===== */
.birthday-group {
    display: flex;
    gap: 10px;
}

.birthday-group select {
    flex: 1;
    height: 44px;
    padding: 0 12px;
    font-size: 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: white;
    color: var(--secondary-color);
    cursor: pointer;
}

/* ===== ВЕС И РОСТ ===== */
.weight-height-group {
    display: flex;
    gap: 10px;
    margin-bottom: 5px;
}

.weight-height-group input {
    flex: 1;
    height: 44px;
}

.weight-height-hint {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 5px;
}

/* ===== БЛОК ПРЕДСТАВИТЕЛЯ ===== */
.representative-block {
    margin: 15px 0 10px;
    padding: 15px;
    background: var(--card-color);
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
}

.representative-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* ===== КАПЧА ===== */
.captcha-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.captcha-group img {
    border-radius: 8px;
    border: 2px solid var(--border-color);
    width: 120px;
    height: 40px;
}

.captcha-group input {
    flex: 1;
    min-width: 200px;
    height: 44px;
}

/* ===== КНОПКИ ===== */
.btn-primary, .btn-next {
    background: var(--primary-color);
    border: 2px solid var(--primary-color);
    color: white;
    height: 48px;
    padding: 0 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 15px;
    line-height: 44px;
}

.btn-primary:hover, .btn-next:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-prev {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-light);
    height: 48px;
    padding: 0 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-bottom: 10px;
    line-height: 44px;
}

.btn-prev:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.button-row {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.button-row .btn-prev,
.button-row .btn-next {
    width: 50%;
    margin: 0;
}

/* ===== ПОЛЬЗОВАТЕЛЬСКОЕ СОГЛАШЕНИЕ ===== */
.user-agreement {
    margin-top: 15px;
    font-size: 13px;
    color: var(--text-light);
    text-align: center;
}

.user-agreement a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.user-agreement a:hover {
    text-decoration: underline;
}

/* ===== ПРИМЕЧАНИЕ О ПОЛЯХ ===== */
.required-fields-note {
    margin: 10px 0 15px;
    padding: 8px 0;
    border-top: 1px dashed var(--border-color);
    font-size: 13px;
    color: var(--text-light);
}

.required-fields-note .star {
    color: var(--primary-color);
    font-size: 16px;
    font-weight: bold;
}

/* ===== АЛЕРТЫ ===== */
.alert {
    padding: 16px 20px;
    margin: 20px 0;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.5;
}

.alert-warning {
    background: rgba(241, 196, 15, 0.1);
    border: 1px solid rgba(241, 196, 15, 0.3);
    color: #d35400;
}

.alert-success {
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid rgba(46, 204, 113, 0.3);
    color: var(--success-color);
}

/* ===== СПИСОК ДОКУМЕНТОВ ===== */
.documents-list {
    background: var(--card-color);
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0 30px;
}

.documents-list p {
    margin: 10px 0;
    font-size: 16px;
    color: var(--secondary-color);
}

.documents-list ul {
    margin: 15px 0;
    padding-left: 20px;
}

.documents-list li {
    margin: 8px 0;
    font-size: 15px;
    color: var(--text-light);
}

/* ===== DROPZONE ===== */
.upload-section {
    margin: 30px 0;
    padding: 30px;
    background: white;
    border-radius: 16px;
}

.upload-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--secondary-color);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.dropzone {
    border: 2px dashed var(--border-color) !important;
    border-radius: 12px !important;
    padding: 40px 30px !important;
    background: var(--card-color) !important;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 20px 0 !important;
    min-height: 200px !important;
}

.dropzone:hover {
    border-color: var(--primary-color) !important;
    background: rgba(217, 22, 86, 0.05) !important;
}

.dropzone .dz-message {
    font-size: 18px !important;
    color: var(--text-light) !important;
    text-align: center;
    margin: 2em 0 !important;
}

/* ===== ЗАВЕРШЕНИЕ ЗАГРУЗКИ ===== */
.complete-upload {
    margin-top: 20px;
    text-align: center;
}

.complete-upload .btn-primary {
    max-width: 400px;
    margin: 0 auto;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 1200px) {
    .sidebar-column {
        flex: 0 0 250px;
        min-width: 250px;
    }
}

@media (max-width: 992px) {
    .page-layout {
        flex-direction: column;
        gap: 20px;
    }
    
    .sidebar-column {
        flex: 0 0 100%;
        width: 100%;
    }
    
    #main-block {
        padding: 30px;
    }
    
    .form-split {
        flex-direction: column;
    }
    
    .form-split-image {
        height: 300px;
        order: -1;
    }
    
    .steps-container {
        padding: 15px 30px;
    }
    
    .step-container {
        padding: 15px 30px;
        min-height: 400px;
    }
}

@media (max-width: 768px) {
    #main-block {
        padding: 20px;
    }
    
    .page-title {
        font-size: 28px;
    }
    
    .form-split-image {
        height: 250px;
    }
    
    .steps-container {
        padding: 10px 25px;
    }
    
    .step-container {
        padding: 10px 25px;
        min-height: 400px;
    }
    
    .step-label {
        font-size: 11px;
    }
    
    .step-line-bg,
    .step-line-fill {
        left: 40px;
        right: 40px;
    }
    
    .button-row {
        flex-direction: column;
    }
    
    .button-row .btn-prev,
    .button-row .btn-next {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .page-title {
        font-size: 24px;
    }
    
    .form-split-image {
        height: 200px;
    }
    
    .steps-container {
        padding: 8px 20px;
    }
    
    .step-container {
        padding: 8px 20px;
        min-height: 420px;
    }
    
    .step-line-bg,
    .step-line-fill {
        left: 30px;
        right: 30px;
    }
    
    .birthday-group {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .weight-height-group {
        flex-wrap: wrap;
        gap: 8px;
    }
}