:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #10b981;
    --error: #ef4444;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --radius-md: 8px;
    --radius-lg: 12px;
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; 
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
}

.container {
    max-width: 650px;
    margin: 0 auto;
    width: 100%;
}

.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
}

.header {
    padding: 32px;
    background: rgba(99, 102, 241, 0.03);
    border-bottom: 1px solid var(--gray-200);
    text-align: center;
}

.header-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 16px;
}

.header-logos {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 16px;
}

.header-logos img {
    height: 48px;
    transition: transform 0.3s;
}

.header-logos img:hover {
    transform: translateY(-2px);
}

.content {
    padding: 32px;
}

.form-group {
    margin-bottom: 24px;
    position: relative;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: var(--gray-700);
}

.required::after {
    content: '*';
    color: var(--error);
    margin-left: 4px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: inherit;
    color: var(--gray-900);
    background: var(--white);
    transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

input::placeholder {
    color: var(--gray-400);
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
    margin: 16px 0;
}

.checkbox-group input[type="checkbox"] {
    margin-top: 4px;
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
}

.checkbox-group label {
    margin: 0;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.6;
}

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

.checkbox-group a:hover {
    text-decoration: underline;
}

.form-checkbox {
    margin-top: 0px !important;
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    margin: 0;
    padding: 0;
    -webkit-appearance: none;
    appearance: none;
    border: 2px solid var(--gray-300);
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    background: #ffffff;
    transition: all 0.2s;
}

input[type="checkbox"]:checked {
    border-color: var(--primary);
    background: var(--primary);
}

input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    top: 40%;
    left: 50%;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: translate(-50%, -50%) rotate(45deg);
}

.checkbox-group input[type="checkbox"],
.checkbox-group input[type="checkbox"] + label,
.checkbox-group input[type="checkbox"] + label + .tooltip-icon {
    margin: 0;
    padding: 0;
    line-height: 1;
}

.notice {
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 16px;
    margin: 24px 0;
    font-size: 13px;
    color: var(--gray-700);
    line-height: 1.5;
}

.notice.processing-time {
    background: rgba(229, 231, 235, 0.5);
    font-size: 14px;
}

.recaptcha-container {
    margin: 28px 0;
    padding: 16px;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
}

button[type="submit"] {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

button[type="submit"]:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

button[type="submit"]:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

footer {
    text-align: center;
    margin-top: 32px;
    color: var(--gray-500);
    font-size: 13px;
    padding: 20px;
}

.field-error {
    color: #dc3545;
    font-size: 14px;
    margin-top: 6px;
    min-height: 20px;
    display: none;
}

.field-error.show {
    display: block;
}

input.invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

input.valid {
    border-color: #198754 !important;
    box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.1) !important;
}

.form-errors {
    background: #fff3f3;
    border: 1px solid #f5c6cb;
    border-radius: var(--radius-md);
    color: #721c24;
    padding: 16px;
    margin: 20px 0;
    font-size: 14px;
    line-height: 1.5;
    display: none;
}

.form-errors.show {
    display: block;
}

.form-errors ul {
    margin: 0;
    padding-left: 20px;
}

.form-errors li {
    margin-bottom: 4px;
}

.field-error.show {
    animation: fadeIn 0.2s ease;
}

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

.required::after {
    content: '*';
    color: var(--error);
    margin-left: 4px;
}

.checkbox-group {
    position: relative;
    display: flex;
    align-items: center;
}

.tooltip-icon {
    margin-left: auto;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #000000;
    color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
    transition: transform 0.2s;
    position: relative;
}

.tooltip-icon:hover {
    transform: scale(1.1);
}

.tooltip-text {
    display: none; 
    position: absolute;
    left: 40%; 
    top: 50%;
    transform: translateY(-50%); 
    margin-right: 8px;
    background: #000000;
    color: #ffffff;
    padding: 10px;
    border-radius: 4px;
    width: 280px;
    font-size: 13px;
    line-height: 1.4;
    text-align: left;
    font-weight: 400;
    white-space: normal;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    max-width: 90vw;
}

/* Адаптивность */
@media (max-width: 768px) {
    .header {
        padding: 24px;
    }
    
    .header-title {
        font-size: 24px;
    }
    
    .header-logos img {
        height: 40px;
    }
    
    .content {
        padding: 24px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    button[type="submit"] {
        padding: 13px 20px;
        font-size: 15px;
    }

    input[type="checkbox"] {
        width: 20px;
        height: 20px;
        min-width: 20px;
        min-height: 20px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 16px;
    }
    
    .header {
        padding: 20px 16px;
    }
    
    .header-title {
        font-size: 22px;
    }
    
    .header-logos {
        gap: 16px;
        flex-wrap: wrap;
    }
    
    .header-logos img {
        height: 36px;
    }
    
    .content {
        padding: 20px 16px;
    }
    
    .form-group {
        margin-bottom: 18px;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    select {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .checkbox-group {
        padding: 12px;
        margin: 14px 0;
    }
    
    .notice {
        padding: 12px;
        font-size: 12px;
    }
    
    button[type="submit"] {
        padding: 12px;
        font-size: 15px;
    }
    
    footer {
        margin-top: 24px;
        padding: 16px;
        font-size: 12px;
    }
}

@media (max-width: 655px) {
    .tooltip-text {
        left: 45%; 
        top: -50%;
    }
}

@media (max-width: 555px) {
    .tooltip-text {
        left: 35%; 
        top: -50%;
    }
}

@media (max-width: 480px) {
    .tooltip-text {
        left: 25%; 
        top: -75%;
    }
}

@media (max-width: 420px) {
    .tooltip-text {
        left: 15%; 
        top: -75%;
    }
}