:root {
    --background-color: #eff2f4;
    --text-color: #343a40;
    --accent-color: #F08365;
    --error-color: #9c0000;
    --light-color: #f69a81;
}

body {
    font-family: 'Segoe UI', 'Inter', system-ui, -apple-system, 'Roboto', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--text-color);
    line-height: 1.5;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    padding: 1.25rem 2rem;
    position: relative;
    flex-shrink: 0;
}

.logo {
    width: 200px;
    height: 78px;
}

.main {
    flex: 1 0 auto;
    width: 100%;
    border-radius: 28px 28px 0 0;
    margin-top: 0;
}

.text__main {
    font-size: 40px;
    font-weight: 200;
}

.form {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
}

.form__title {
    font-size: 24px;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
}

.section__label {
    font-size: 18px;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem;
}

.fields {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.form__input {
    width: 100%;
    flex: 1 1 0;
    padding: 0.75rem 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    outline: none;
}

.form__input:focus {
    border-color: var(--accent-color);
}

.form__input.disabled {
    background-color: #f5f5f5;
    border-color: #ccc;
    cursor: not-allowed;
    pointer-events: none;
    opacity: .6;
}

/* ========== СТИЛИ ПЛАВАЮЩЕГО ПЛЕЙСХОЛДЕРА ========== */
.floating-group {
    flex: 1 1 0;
    position: relative;
    min-width: 0;
}

.form__input-floating {
    width: 100%;
    padding: 1rem 1rem 0.25rem 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    outline: none;
    height: 56px;
    transition: border-color 0.2s ease;
}

.form__input-floating:focus {
    border-color: var(--accent-color);
}

#VIN {
    text-transform: uppercase;
}

.floating-label {
    position: absolute;
    left: 1rem;
    top: 28px;
    transform: translateY(-50%);
    background-color: transparent;
    padding: 0 0.25rem;
    color: #888;
    font-size: 16px;
    pointer-events: none;
    transition: 0.2s ease all;
}

/* Активное состояние (фокус) */
.floating-group.active .floating-label {
    top: 0;
    transform: translateY(-50%);
    font-size: 11px;
    color: var(--accent-color);
    background-color: #fff;
}

/* Заполненное состояние */
.floating-group.filled .floating-label {
    top: 0;
    transform: translateY(-50%);
    font-size: 11px;
    color: #888;
    background-color: #fff;
}

.floating-group.active .form__input-floating {
    border-color: var(--accent-color);
}
/* ================================================= */

.form__button {
    flex: 1 1 0;
    padding: 1rem 1.5rem;
    background-color: var(--accent-color);
    color: #000;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-transform: uppercase;
    font-weight: 500;
}

.form__button:hover {
    background-color: var(--light-color);
}

.form__button.disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.form__button.send {
    width: 32%;
}

.form__disclaimer {
    padding: 10px 0;
    font-size: 14px;
    color: #666;
}

.form__disclaimer a {
    color: var(--accent-color);
    text-decoration: underline;
}

.form__subtitle {
    font-size: 18px;
    margin-bottom: 0.5rem;
    color: #444;
}

/* Шаги формы */
.form__step {
    display: none;
}

.form__step.is-active {
    display: block;
}

.fields--actions {
    margin-bottom: 0;
}

.fields--actions .form__button {
    text-decoration: none;
    display: inline-block;
    text-align: center;
    box-sizing: border-box;
}

.fields--email-actions {
    flex-wrap: wrap;
    margin-top: 0;
    margin-bottom: 1rem;
}

.fields--email-actions .form__button {
    flex: 0 1 auto;
    width: auto;
    min-width: 200px;
}

.form__button--secondary {
    background-color: transparent;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    text-transform: none;
}

.form__button--secondary:hover {
    background-color: rgba(0, 59, 112, 0.08);
}

.form__button--secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Ошибки полей */
.floating-group.has-error .form__input-floating,
.floating-group.has-error .form__input {
    border-color: var(--error-color);
}

.floating-group.has-error .floating-label {
    color: var(--error-color);
}

.form__input-message {
    display: none;
    margin-top: 0.35rem;
    font-size: 13px;
    color: var(--error-color);
    line-height: 1.3;
}

.floating-group.has-error .form__input-message {
    display: block;
}

.floating-group.is-disabled {
    opacity: 0.65;
    pointer-events: none;
}

.form__input-floating.is-readonly,
.form__input.is-readonly {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.floating-group.filled .form__input-floating.is-readonly + .floating-label,
.floating-group .form__input-floating.is-readonly:not(:placeholder-shown) + .floating-label {
    top: 0;
    transform: translateY(-50%);
    font-size: 11px;
    background-color: #fff;
}

/* Загрузка */
.activation-form {
    position: relative;
}

.form__loader {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.75);
    z-index: 10;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.activation-form.is-loading .form__loader {
    display: flex;
}

.form__loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e0e0e0;
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: form-spin 0.8s linear infinite;
}

@keyframes form-spin {
    to { transform: rotate(360deg); }
}

.form__result-mes {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.form__result-mes p {
    margin: 0 0 0.75rem;
}

/* Модалка ошибки */
.form-modal[hidden] {
    display: none !important;
}

.form-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.form-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.form-modal__box {
    position: relative;
    background: #fff;
    border-radius: 8px;
    padding: 2rem;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.form-modal__title {
    margin: 0 0 1rem;
    color: var(--error-color);
    font-size: 22px;
    font-weight: 600;
}

.form-modal__text {
    margin: 0 0 1.5rem;
    line-height: 1.5;
}

.card__active {
    font-size: 24px;
    color: var(--accent-color);
    font-weight: 600;
    margin: 2rem 0 1rem;
    text-transform: uppercase;
}

.disabled-block {
    opacity: 0.5;
    pointer-events: none;
}

.footer {
    flex-shrink: 0;
    color: var(--text-color);
    padding: 1.5rem 2rem;
    border-top: 1px solid #ccc;
    width: 100%;
    margin-top: 0;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}
.footer-links a {
    text-decoration: none;
}
.footer-links a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

@media screen and (max-width: 768px) {
    .container {
        padding: 16px;
    }

    .text__main {
        font-size: 28px;
        line-height: 1.2;
    }

    .form {
        padding: 1.25rem 1rem;
    }

    .fields {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .floating-group {
        flex: none;
        width: 100%;
    }

    .form__input,
    .form__input-floating {
        width: 100%;
        box-sizing: border-box;
    }

    .form__button {
        width: 100%;
        flex: none;
    }

    .form__button.send {
        width: 100%;
    }

    .fields--actions .form__button {
        width: 100%;
    }

    .fields--email-actions {
        flex-direction: column;
    }

    .fields--email-actions .form__button {
        width: 100%;
        min-width: 0;
    }

    .header {
        padding: 1rem 0;
    }

    .logo {
        width: 200px;
        height: auto;
    }
}