#auth .container {
    padding-top: 50px;
    padding-bottom: 50px;
}
/* Figma auth card (laptop 1440): centered white 848px card = form column 466
   (padding 50) + 382px photo column, r24; the photo fills the right column
   full height via object-fit. */
#auth .auth-card {
    display: flex;
    max-width: 848px;
    margin: 0 auto;
    border-radius: 24px;
}
#auth .auth-main {
    flex: 1;
    min-width: 0;
    padding: 50px;
    background: var(--color-bg-alt);
    border-radius: 24px 0 0 24px;
}
#auth .auth-photo {
    flex: 0 0 382px;
    border-radius: 0 24px 24px 0;
    overflow: hidden;
}
#auth .auth-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
#auth .auth-head h1,
#auth .auth-head .title {
    margin-top: 16px;
    color: var(--color-text);
    font-size: 42px;
    font-weight: 800;
    line-height: 50px;
}
#auth .auth-fields {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
/* 2-up row (Ім'я | Прізвище on register). */
#auth .form-row {
    display: flex;
    gap: 15px;
}
#auth .form-row > * {
    flex: 1;
    min-width: 0;
}
/* Tighter group: the two password fields / password + «remember» row. */
#auth .field-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
#auth .auth-main .form-control {
    width: 100%;
    height: 40px;
}
#auth .auth-main .form-control::placeholder {
    color: var(--color-text-link);
}
/* «Запам'ятати мене» | «Забули пароль?» row under the login password. */
#auth .auth-more {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
#auth .auth-more label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-text-link);
    font-size: 14px;
    line-height: 20px;
    cursor: pointer;
}
#auth .auth-check {
    appearance: none;
    -webkit-appearance: none;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin: 0;
    border: 1px solid var(--color-border);
    border-radius: 3px;
    background: var(--color-bg-alt);
    cursor: pointer;
}
/* Checked state: accent border + heroicons-mini check baked in as a data URI
   (icon fonts don't reach inside an <input>). */
#auth .auth-check:checked {
    border-color: var(--color-border-secondary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23708FFF'%3E%3Cpath fill-rule='evenodd' d='M12.416 3.376a.75.75 0 0 1 .208 1.04l-5 7.5a.75.75 0 0 1-1.154.114l-3-3a.75.75 0 0 1 1.06-1.06l2.353 2.353 4.493-6.74a.75.75 0 0 1 1.04-.207Z' clip-rule='evenodd'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px 12px;
}
#auth .forgot-link {
    color: var(--color-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
}
#auth .auth-main .btn {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 10px 20px;
    background: var(--color-btn);
    color: var(--color-text-secondary);
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    border-radius: 8px;
}
/* «Надіслано» — solid grey, not the half-transparent :disabled default. */
#auth .auth-main .btn.is-sent {
    background: var(--color-border);
    color: var(--color-text-alt);
    opacity: 1;
    cursor: default;
}
/* «Немаєте акаунту? Зареєструватися» / «Вже є акаунт? Авторизуватися». */
#auth .auth-alt {
    margin-top: 30px;
    display: flex;
    gap: 5px;
    font-size: 14px;
    line-height: 20px;
}
#auth .auth-alt span {
    color: var(--color-text-link);
}
#auth .auth-alt a {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
}
/* «або» divider; the --dot modifier swaps the word for a 4px dot. */
#auth .auth-divider {
    margin-top: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--color-text-link);
    font-size: 14px;
    line-height: 20px;
}
#auth .auth-divider .line {
    flex: 1;
    height: 1px;
    background: var(--color-text-link);
}
#auth .auth-divider .dot {
    flex-shrink: 0;
    width: 4px;
    height: 4px;
    border-radius: 10px;
    background: var(--color-text-link);
}
#auth .btn-google {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 100%;
    height: 40px;
    padding: 10px 20px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-bg-alt);
    color: var(--color-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    cursor: pointer;
}
#auth .btn-google img {
    display: block;
    width: 15px;
    height: 15px;
}
/* Notes: grey on recovery «sent», dark on register «confirm». */
#auth .auth-note {
    margin-top: 30px;
    color: var(--color-text-link);
    font-size: 14px;
    line-height: 20px;
}
#auth .auth-note--dark {
    color: var(--color-text);
}
/* Register confirm: the code input hangs 15px under the note (mock). */
#auth .auth-note + .form-control,
#auth .auth-note + .form-container {
    margin-top: 15px;
}
#auth .auth-note + .form-container > .form-control {
    margin-top: 0;
}

@media (max-width: calc(991px + 30px)) {

    /* Keep the two-column card; the photo column gives ground first so the
       848px card shrinks gracefully inside the narrower container. */
    #auth .auth-photo {
        flex: 0 0 300px;
    }
}

@media (max-width: 768px) {

    #auth .container {
        padding-top: 35px;
        padding-bottom: 50px;
    }
    /* Mobile mock (390): one continuous column, 155px photo strip on top.
       DOM keeps the form first; column-reverse lifts the photo above it. */
    #auth .auth-card {
        flex-direction: column-reverse;
    }
    #auth .auth-main {
        flex: none;
        padding: 30px;
        border-radius: 0 0 24px 24px;
    }
    #auth .auth-photo {
        flex: none;
        height: 155px;
        border-radius: 24px 24px 0 0;
    }
    #auth .auth-head h1,
    #auth .auth-head .title {
        font-size: 24px;
        line-height: 30px;
    }
    #auth .auth-main .form-control {
        height: 38px;
    }
    /* Mobile mock stacks Ім'я/Прізвище full-width instead of the 2-up row. */
    #auth .form-row {
        flex-direction: column;
        gap: 15px;
    }
    #auth .auth-main .btn {
        margin-top: 20px;
        height: 32px;
        padding: 6px 15px;
    }
    #auth .btn-google {
        height: 32px;
        padding: 6px 15px;
    }
    #auth .auth-alt,
    #auth .auth-divider,
    #auth .btn-google,
    #auth .auth-note {
        margin-top: 15px;
    }
    /* Mobile mock drops the «або» rules — only the centred grey word stays;
       the dot divider keeps its lines (it has no word to carry it). */
    #auth .auth-divider:not(.auth-divider--dot) .line {
        display: none;
    }
}

/* Validation error above the submit button; the sibling rule pulls the
   button's 30px (20px mobile) top margin down to a tight 10px gap. */
#auth .form-error {
    margin-top: 15px;
    color: #dc2626;
    font-size: 13px;
    line-height: 18px;
}
#auth .form-error + .btn {
    margin-top: 10px;
}

/* Header/footer logout is a <button class="login"> inside a POST form: make it
   render exactly like the <a> (buttons don't inherit font and ship a UA
   border/background the .login class doesn't reset). auth.css is imported
   globally via sections.css, so this covers every page. */
header .panel .auth form,
footer .row .panel .auth form {
    display: flex;
}
header .panel .auth button.login,
footer .row .panel .auth button.login {
    font-family: inherit;
    border: 0;
    cursor: pointer;
}
