/* Sign-in, sign-up, verification and password pages (auth_layout.php).
   Built on the neumorphic tokens in neu.css — load that file first. */

.auth-body {
    padding-bottom: 48px;
}

/* ---------- top bar ---------- */

.auth-topbar {
    display: flex;
    align-items: center;
    max-width: 460px;
    margin: 0 auto;
    padding: 18px 20px 0;
}

.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--neu-ink);
    text-decoration: none;
}

.auth-back-text {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.auth-back:hover .auth-back-text {
    color: var(--neu-brand-strong);
}

/* ---------- layout ---------- */

.auth-main {
    max-width: 460px;
    margin: 0 auto;
    padding: 0 20px;
}

.auth-logo-link {
    display: block;
    width: fit-content;
    margin: 22px auto 24px;
}

.auth-logo {
    display: block;
    width: 122px;
    height: auto;
}

/* The logo art is dark ink on transparent; flip its lightness for dark mode
   and spin the hue back so the lamp stays orange. */
.dark-theme .auth-logo {
    filter: invert(1) hue-rotate(180deg);
}

.auth-card {
    background: var(--neu-surface);
    border-radius: var(--neu-r-lg);
    box-shadow: var(--neu-out);
    padding: 30px 24px 28px;
}

.auth-title {
    margin: 0 0 8px;
    font-size: 27px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.015em;
}

.auth-subtitle {
    margin: 0 0 26px;
    color: var(--neu-ink-soft);
    font-size: 14px;
}

.auth-subtitle strong {
    color: var(--neu-ink);
    font-weight: 600;
    word-break: break-all;
}

/* ---------- form ---------- */

.auth-form {
    display: flex;
    flex-direction: column;
}

.auth-label {
    display: block;
    margin: 0 0 8px 4px;
    color: var(--neu-ink-soft);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.auth-input {
    width: 100%;
    height: 54px;
    margin: 0 0 18px;
    padding: 0 18px;
    border: 0;
    border-radius: var(--neu-r);
    background: var(--neu-surface);
    box-shadow: var(--neu-in);
    color: var(--neu-ink);
    font: inherit;
    font-size: 16px;
    outline: none;
    transition: box-shadow 0.18s ease;
}

.auth-input::placeholder {
    color: var(--neu-ink-faint);
}

.auth-input:focus {
    box-shadow: var(--neu-in), var(--neu-ring);
}

.auth-row {
    display: flex;
    gap: 14px;
}

.auth-row > div {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.auth-password {
    position: relative;
}

.auth-password .auth-input {
    padding-right: 78px;
}

.auth-toggle {
    position: absolute;
    top: 0;
    right: 8px;
    height: 54px;
    padding: 0 12px;
    border: 0;
    background: none;
    color: var(--neu-brand-strong);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
}

.auth-hint {
    margin: -12px 0 18px 4px;
    color: var(--neu-ink-soft);
    font-size: 12px;
}

.auth-forgot {
    align-self: flex-end;
    margin: -6px 4px 20px 0;
    padding: 4px 0;
    color: var(--neu-brand-strong);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.auth-forgot:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 56px;
    padding: 0 24px;
    border: 0;
    border-radius: var(--neu-r-pill);
    background: linear-gradient(145deg, #ff9147, var(--neu-brand-strong));
    box-shadow: var(--neu-glow), var(--neu-out-sm);
    color: #fff;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    cursor: pointer;
    transition: filter 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.auth-button:hover {
    filter: brightness(1.04);
}

.auth-button:active {
    box-shadow: inset 4px 4px 9px rgba(140, 60, 6, 0.45), inset -3px -3px 8px rgba(255, 190, 145, 0.4);
    transform: translateY(1px);
}

.auth-button.is-busy {
    filter: saturate(0.7);
    cursor: progress;
}

/* ---------- verification code ---------- */

.auth-otp-cells {
    display: flex;
    gap: 10px;
    margin: 0 0 22px;
}

.auth-otp-cell {
    flex: 1;
    width: 100%;
    min-width: 0;
    height: 62px;
    padding: 0;
    border: 0;
    border-radius: var(--neu-r);
    background: var(--neu-surface);
    box-shadow: var(--neu-in-sm);
    color: var(--neu-ink);
    font: inherit;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    outline: none;
    transition: box-shadow 0.18s ease, color 0.18s ease;
    -moz-appearance: textfield;
}

.auth-otp-cell::-webkit-inner-spin-button,
.auth-otp-cell::-webkit-outer-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.auth-otp-cell:focus {
    box-shadow: var(--neu-in-sm), var(--neu-ring);
}

.auth-otp-cell.is-filled {
    color: var(--neu-brand-strong);
    box-shadow: var(--neu-out-sm);
}

/* single-field fallback when the segmented cells are not used */
.auth-otp {
    height: 62px;
    padding-left: 22px;
    font-size: 26px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 12px;
    text-align: center;
}

.auth-resend {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 18px 0 0;
    color: var(--neu-ink-soft);
    font-size: 14px;
}

.auth-text-button {
    padding: 10px 2px;
    border: 0;
    background: none;
    color: var(--neu-brand-strong);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.auth-text-button:disabled {
    color: var(--neu-ink-faint);
    cursor: default;
}

/* ---------- messages and footers ---------- */

.auth-alert {
    margin: 0 0 20px;
    padding: 13px 16px;
    border-radius: var(--neu-r);
    box-shadow: var(--neu-in-sm);
    font-size: 14px;
}

.auth-alert-error {
    background: var(--neu-danger-soft);
    color: var(--neu-danger);
}

.auth-alert-success {
    background: var(--neu-ok-soft);
    color: var(--neu-ok);
}

.auth-alert-info {
    background: var(--neu-baby-soft);
    color: var(--neu-brand-ink);
}

.auth-link {
    color: var(--neu-brand-strong);
    font-weight: 600;
    text-decoration: none;
}

.auth-link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-small {
    margin: 16px 4px 0;
    color: var(--neu-ink-soft);
    font-size: 12.5px;
}

.auth-footer {
    margin: 22px 0 0;
    color: var(--neu-ink-soft);
    font-size: 14px;
    text-align: center;
}

.auth-footer p {
    margin: 6px 0;
}

.auth-guest {
    display: block;
    width: fit-content;
    margin: 16px auto 0;
    padding: 10px 18px;
    border-radius: var(--neu-r-pill);
    color: var(--neu-ink-soft);
    font-size: 13.5px;
    text-decoration: none;
}

.auth-guest:hover {
    box-shadow: var(--neu-out-sm);
    color: var(--neu-ink);
}

@media (min-width: 520px) {
    .auth-card {
        padding: 36px 34px 32px;
    }

    .auth-logo-link {
        margin-top: 26px;
    }
}

/* ==========================================================================
   Fit on one screen
   --------------------------------------------------------------------------
   At 375x667 the login page was 826px tall, so "Create an account" sat below
   the fold and went unnoticed. Everything below trims the page to fit, and the
   top bar carries the other door (Sign up / Log in) where it is always seen.
   ========================================================================== */

.auth-topbar {
    justify-content: space-between;
    padding: 10px 20px 0;
}

.auth-topbar-action {
    padding: 9px 18px;
    border-radius: var(--neu-r-pill);
    background: var(--neu-raised);
    box-shadow: var(--neu-out-sm);
    color: var(--neu-brand-strong);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.auth-topbar-action:active {
    box-shadow: var(--neu-in-sm);
}

.auth-body {
    padding-bottom: 24px;
}

.auth-logo-link {
    margin: 12px auto 14px;
}

.auth-logo {
    width: 92px;
}

.auth-card {
    padding: 20px 18px 18px;
}

.auth-title {
    margin-bottom: 6px;
    font-size: 22px;
}

.auth-subtitle {
    margin-bottom: 16px;
}

.auth-label {
    margin-bottom: 6px;
}

.auth-input {
    height: 50px;
    margin-bottom: 13px;
}

.auth-password .auth-input {
    padding-right: 74px;
}

.auth-toggle {
    height: 50px;
}

.auth-forgot {
    margin: -4px 4px 14px 0;
}

.auth-button {
    min-height: 52px;
}

.auth-small {
    margin-top: 10px;
    font-size: 12px;
}

.auth-footer {
    margin-top: 14px;
}

.auth-guest {
    min-height: 36px;
    margin-top: 6px;
    line-height: 36px;
}

.auth-otp-cells {
    margin-bottom: 18px;
}

.auth-otp-cell {
    height: 56px;
    font-size: 22px;
}

@media (min-width: 520px) {
    .auth-card {
        padding: 28px 30px 26px;
    }

    .auth-logo-link {
        margin-top: 18px;
    }
}
