/* Базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --success-color: #10b981;
    --success-hover: #059669;
    --secondary-color: #64748b;
    --text-color: #1e293b;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --bg-light: #f8fafc;
    --bg-section: #ffffff;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--bg-light);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* Заголовок */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

.header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.header h1 i {
    margin-right: 10px;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.95;
    font-weight: 300;
}

/* Прогресс-бар */
.progress-container {
    position: sticky;
    top: 0;
    background: white;
    padding: 15px 40px;
    box-shadow: var(--shadow);
    z-index: 100;
}

.progress-bar {
    height: 8px;
    background: var(--primary-color);
    border-radius: 10px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 8px;
    font-weight: 500;
}

/* Секции формы */
.form-section {
    background: var(--bg-section);
    margin: 20px 40px;
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-color);
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.25rem;
    margin-right: 15px;
    flex-shrink: 0;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.section-description {
    color: var(--text-light);
    margin-bottom: 25px;
    font-size: 0.95rem;
}

/* Группы полей */
.form-group {
    margin-bottom: 25px;
}

.form-group:last-child {
    margin-bottom: 0;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.95rem;
}

.required {
    color: #ef4444;
}

/* Поля ввода */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="date"],
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="date"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* Радио и чекбоксы */
.radio-group,
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-label,
.checkbox-label {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.radio-label:hover,
.checkbox-label:hover {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.02);
}

.radio-label input[type="radio"],
.checkbox-label input[type="checkbox"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.radio-label input[type="radio"]:checked + span,
.checkbox-label input[type="checkbox"]:checked + span {
    font-weight: 600;
    color: var(--primary-color);
}

/* Секция подписи */
.signature-section {
    background: var(--bg-light);
    border-left-color: var(--success-color);
}

.signature-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Кнопки */
.form-actions {
    display: flex;
    gap: 15px;
    padding: 30px 40px;
    background: var(--bg-section);
    margin: 20px 40px;
    border-radius: 12px;
    flex-wrap: wrap;
}

.btn {
    flex: 1;
    min-width: 150px;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: var(--success-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #475569;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.3);
}

/* Футер */
.footer {
    text-align: center;
    padding: 30px;
    color: var(--text-light);
    font-size: 0.875rem;
    background: white;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 16px;
    max-width: 500px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-icon {
    font-size: 4rem;
    color: var(--success-color);
    margin-bottom: 20px;
}

.modal-content h2 {
    font-size: 1.75rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.modal-content p {
    color: var(--text-light);
    margin-bottom: 25px;
    font-size: 1.05rem;
}

/* Адаптивность */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        border-radius: 12px;
    }

    .header {
        padding: 30px 20px;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .progress-container {
        padding: 12px 20px;
    }

    .form-section {
        margin: 15px 20px;
        padding: 20px;
    }

    .section-header h2 {
        font-size: 1.25rem;
    }

    .section-number {
        width: 35px;
        height: 35px;
        font-size: 1.1rem;
    }

    .signature-container {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
        padding: 20px;
        margin: 15px 20px;
    }

    .btn {
        width: 100%;
    }

    .modal-content {
        margin: 20px;
        padding: 30px 20px;
    }
}

/* Анимации */
.form-section {
    animation: fadeInUp 0.5s ease;
}

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

/* Скрытые элементы */
.hidden {
    display: none;
}

/* Печать */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .container {
        box-shadow: none;
    }

    .progress-container,
    .form-actions,
    .btn {
        display: none;
    }

    .form-section {
        page-break-inside: avoid;
    }
}