@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=DM+Mono:wght@400;500&display=swap');

:root {
    --auth-bg: #f1f4f9;
    --auth-surface: #ffffff;
    --auth-surface-soft: #f8fafc;
    --auth-ink: #111827;
    --auth-muted: #667085;
    --auth-faint: #98a2b3;
    --auth-line: #dfe5ef;
    --auth-primary: #4f46e5;
    --auth-primary-dark: #3730a3;
    --auth-primary-soft: #eef2ff;
    --auth-green: #16b981;
    --auth-yellow: #f59e0b;
    --auth-red: #ef4444;
    --auth-shadow: 0 18px 55px rgba(15, 23, 42, 0.10);
    --auth-radius: 20px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--auth-bg);
}

body {
    margin: 0;
    min-height: 100%;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--auth-ink);
    background: var(--auth-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

button,
input,
select {
    font: inherit;
}

button {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
}

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

@keyframes authScaleIn {
    from {
        opacity: 0;
        transform: scale(0.97);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.la-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 18px;
    background:
        radial-gradient(circle at 15% 15%, rgba(79, 70, 229, 0.10), transparent 34%),
        radial-gradient(circle at 92% 18%, rgba(22, 185, 129, 0.10), transparent 30%),
        linear-gradient(180deg, #f8fafc 0%, #eef3fb 100%);
}

.la-bg-shapes,
.la-emoji {
    display: none;
}

.la-container {
    width: min(100%, 480px);
    animation: authFadeUp 0.35s ease both;
}

.la-logo-section {
    text-align: left;
    margin-bottom: 20px;
}

.la-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    min-height: 76px;
    padding: 10px;
    margin-bottom: 18px;
    border-radius: 18px;
    background: var(--auth-surface);
    border: 1px solid var(--auth-line);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.la-logo img {
    display: block;
    max-width: 100%;
    max-height: 54px;
    width: auto;
    height: auto;
}

.la-heading {
    margin: 0 0 8px;
    font-size: clamp(32px, 5vw, 46px);
    line-height: 1.04;
    letter-spacing: 0;
    font-weight: 800;
    color: var(--auth-ink);
}

.la-subheading {
    margin: 0;
    font-size: 18px;
    line-height: 1.55;
    color: var(--auth-muted);
}

.la-card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--auth-line);
    border-radius: var(--auth-radius);
    box-shadow: var(--auth-shadow);
    padding: 26px;
    animation: authScaleIn 0.32s ease both;
}

.la-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.la-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.la-field {
    min-width: 0;
}

.la-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 9px;
    font-size: 16px;
    font-weight: 800;
    color: var(--auth-ink);
}

.la-label svg {
    width: 19px;
    height: 19px;
    color: var(--auth-primary);
    flex: 0 0 auto;
}

.la-input,
.la-select {
    width: 100%;
    min-height: 56px;
    padding: 15px 16px;
    border: 1px solid var(--auth-line);
    border-radius: 14px;
    background: var(--auth-surface-soft);
    color: var(--auth-ink);
    font-size: 17px;
    font-weight: 600;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.la-input::placeholder {
    color: var(--auth-faint);
    font-weight: 500;
}

.la-input:focus,
.la-select:focus {
    border-color: var(--auth-primary);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.13);
}

.la-input--error,
.la-input:invalid:not(:placeholder-shown) {
    border-color: rgba(239, 68, 68, 0.75);
}

.la-password-wrap {
    position: relative;
}

.la-password-wrap .la-input {
    padding-right: 56px;
}

.la-password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 12px;
    color: var(--auth-muted);
    background: transparent;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
    transform: translateY(-50%);
}

.la-password-toggle:hover,
.la-password-toggle:focus-visible {
    color: var(--auth-primary);
    background: var(--auth-primary-soft);
}

.la-options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 15px;
}

.la-checkbox-label,
.la-terms-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--auth-muted);
    cursor: pointer;
    line-height: 1.45;
}

.la-checkbox-label input,
.la-terms-label input {
    width: 20px;
    height: 20px;
    margin: 1px 0 0;
    accent-color: var(--auth-primary);
    flex: 0 0 auto;
}

.la-forgot-link,
.la-footer a,
.la-terms-label a {
    color: var(--auth-primary);
    font-weight: 800;
    text-decoration: none;
}

.la-forgot-link:hover,
.la-footer a:hover,
.la-terms-label a:hover {
    text-decoration: underline;
}

.la-submit,
.la-passkey-btn,
.la-social-btn {
    min-height: 56px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-size: 17px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.la-submit {
    width: 100%;
    color: #ffffff;
    background: var(--auth-primary);
    box-shadow: 0 14px 30px rgba(79, 70, 229, 0.22);
}

.la-submit:hover,
.la-submit:focus-visible {
    background: var(--auth-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 18px 38px rgba(79, 70, 229, 0.28);
}

.la-submit:active,
.la-passkey-btn:active,
.la-social-btn:active {
    transform: scale(0.98);
}

.la-submit:disabled {
    opacity: 0.68;
    cursor: not-allowed;
    transform: none;
}

.la-passkey-btn,
.la-social-btn {
    width: 100%;
    color: var(--auth-ink);
    background: #ffffff;
    border-color: var(--auth-line);
}

.la-passkey-btn:hover,
.la-social-btn:hover,
.la-social-btn:focus-visible,
.la-passkey-btn:focus-visible {
    border-color: rgba(79, 70, 229, 0.45);
    background: var(--auth-primary-soft);
}

.la-divider {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2px 0;
    color: var(--auth-muted);
    font-size: 14px;
    font-weight: 800;
}

.la-divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--auth-line);
}

.la-divider span {
    position: relative;
    padding: 0 14px;
    background: #ffffff;
}

.la-social-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.la-error,
.la-success {
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 15px;
    line-height: 1.45;
    font-weight: 700;
    margin-bottom: 16px;
}

.la-error {
    color: #991b1b;
    background: #fff1f2;
    border: 1px solid #fecdd3;
}

.la-success {
    color: #047857;
    background: #ecfdf3;
    border: 1px solid #a7f3d0;
}

.la-footer {
    margin-top: 22px;
    text-align: center;
    color: var(--auth-muted);
    font-size: 16px;
    line-height: 1.5;
}

.la-quote {
    display: none;
}

.otp-inputs {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.otp-digit {
    width: 100%;
    min-height: 58px;
    text-align: center;
    font-size: 22px;
    font-weight: 800;
    border-radius: 14px;
    border: 1px solid var(--auth-line);
    background: var(--auth-surface-soft);
    color: var(--auth-ink);
    outline: none;
}

.otp-digit:focus {
    border-color: var(--auth-primary);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.13);
}

.strength-bar-container {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 999px;
    margin-top: 10px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0;
    border-radius: inherit;
    transition: width 0.2s ease, background 0.2s ease;
}

.strength-text {
    margin-top: 7px;
    font-size: 14px;
    color: var(--auth-muted);
}

@media (min-width: 920px) {
    .la-page {
        padding: 48px;
    }

    .la-container {
        width: min(100%, 520px);
    }
}

@media (max-width: 640px) {
    .la-page {
        place-items: start center;
        padding: 22px 14px;
    }

    .la-logo-section {
        text-align: center;
    }

    .la-logo {
        width: 70px;
        min-height: 70px;
        margin-bottom: 16px;
    }

    .la-subheading {
        font-size: 17px;
    }

    .la-card {
        padding: 20px;
        border-radius: 18px;
    }

    .la-row,
    .la-social-row {
        grid-template-columns: 1fr;
    }

    .la-options-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .otp-inputs {
        gap: 7px;
    }

    .otp-digit {
        min-height: 52px;
        font-size: 20px;
    }
}
