/* Styles for the login/register screens only (loaded on top of app.css). */

.auth-screen {
    display: flex;
    min-height: 100vh;
    max-width: 100vw;
    overflow-x: hidden;
}

/* ---- Branding panel ---- */

.auth-brand {
    flex: 0 0 40%;
    max-width: 480px;
    position: relative;
    display: flex;
    align-items: center;
    padding: 3rem;
    color: var(--color-text);
    background:
        radial-gradient(
            560px 420px at 12% 8%,
            rgba(207, 159, 67, 0.16),
            transparent 60%
        ),
        linear-gradient(180deg, #121013 0%, #0b0a0c 100%);
    border-right: 1px solid var(--color-border);
    overflow: hidden;
}

.auth-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(
            rgba(240, 238, 232, 0.035) 1px,
            transparent 1px
        ),
        linear-gradient(90deg, rgba(240, 238, 232, 0.035) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: radial-gradient(circle at 15% 20%, #000 0%, transparent 65%);
    pointer-events: none;
}

.auth-bg-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 0;
    pointer-events: none;
    mask-image: radial-gradient(circle at 20% 25%, #000 0%, transparent 75%);
}

.auth-brand-inner {
    position: relative;
    z-index: 1;
    max-width: 360px;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
    color: var(--color-text);
    margin-bottom: 3.5rem;
}

.auth-logo:hover {
    color: var(--color-text);
    opacity: 0.85;
}

.auth-logo-icon {
    display: inline-flex;
    width: 26px;
    height: 26px;
    color: var(--color-primary);
}

.auth-logo-icon svg {
    width: 100%;
    height: 100%;
}

.auth-brand-title {
    font-size: 1.9rem;
    line-height: 1.25;
    margin: 0 0 0.9rem;
    font-weight: 650;
    letter-spacing: -0.015em;
}

.auth-brand-subtitle {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text-muted);
    margin: 0 0 2.5rem;
}

.auth-feature-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.auth-feature-list li {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 0.92rem;
    color: var(--color-text-muted);
}

.auth-feature-icon {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: var(--color-primary-soft);
    color: var(--color-primary);
}

.auth-feature-icon svg {
    width: 13px;
    height: 13px;
}

/* ---- Form panel ---- */

.auth-main {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
}

.auth-form-wrap {
    width: 100%;
    max-width: 400px;
    min-width: 0;
}

.auth-form-wrap .alert {
    margin-bottom: 1.25rem;
}

.auth-screen .auth-card {
    max-width: none;
    padding: 0;
    border: none;
    background: transparent;
}

.auth-card-heading {
    margin: 0 0 0.35rem;
    font-size: 1.6rem;
}

.auth-card-subtitle {
    margin: 0 0 1.75rem;
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.auth-screen .field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.1rem;
}

.auth-screen .field label {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 0.85rem;
    display: inline-flex;
    color: var(--color-text-muted);
    pointer-events: none;
}

.input-icon svg {
    width: 18px;
    height: 18px;
}

.auth-screen input[type="text"],
.auth-screen input[type="email"],
.auth-screen input[type="password"] {
    width: 100%;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    color: var(--color-text);
    padding: 0.7rem 0.9rem 0.7rem 2.6rem;
    font-size: 0.98rem;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.password-toggle ~ input,
.input-wrap input.has-toggle {
    padding-right: 2.6rem;
}

.auth-screen input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-soft);
}

.password-toggle {
    position: absolute;
    right: 0.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    border-radius: 6px;
}

.password-toggle:hover {
    color: var(--color-text);
}

.password-toggle svg {
    width: 18px;
    height: 18px;
}

.field-hint {
    margin: 0.3rem 0 0;
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

.field-hint.is-valid {
    color: var(--color-success);
}

.field-hint.is-invalid {
    color: var(--color-error);
}

/* ---- Human verification ---- */

.bot-trap {
    position: fixed !important;
    top: -10000px !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.human-check {
    display: grid;
    gap: 0.75rem;
    min-width: 0;
    margin: 0.25rem 0 0.85rem;
    padding: 0.9rem;
    border: 1px solid var(--color-border);
    border-radius: 0.7rem;
    background:
        linear-gradient(135deg, var(--color-primary-soft), transparent 58%),
        var(--color-surface);
}

.human-check-heading {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.human-check-heading > div {
    display: grid;
    gap: 0.1rem;
}

.human-check-heading strong {
    font-size: 0.8rem;
}

.human-check-heading small {
    color: var(--color-text-muted);
    font-size: 0.7rem;
}

.human-check-icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid color-mix(in srgb, var(--color-primary) 30%, var(--color-border));
    border-radius: 0.5rem;
    background: var(--color-primary-soft);
    color: var(--color-primary);
}

.human-check-icon .ui-icon {
    width: 1rem;
    height: 1rem;
}

.human-check altcha-widget {
    --altcha-border-color: var(--color-border);
    --altcha-border-radius: 0.5rem;
    --altcha-color-base: var(--color-surface-raised);
    --altcha-color-base-content: var(--color-text);
    --altcha-color-neutral: var(--color-border-strong);
    --altcha-color-neutral-content: var(--color-text-muted);
    --altcha-color-primary: var(--color-primary);
    --altcha-color-primary-content: var(--color-on-primary);
    --altcha-color-success: var(--color-success);
    --altcha-max-width: 100%;

    display: block;
    width: 100%;
    min-height: 48px;
}

.human-check-status,
.human-check-error {
    margin: -0.2rem 0 0;
    color: var(--color-text-faint);
    font-size: 0.68rem;
}

.human-check-status.is-valid {
    color: var(--color-success);
}

.human-check-status.is-error,
.human-check-error {
    color: var(--color-error);
}

.auth-screen .btn-primary {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.75rem 1.2rem;
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        filter 0.15s ease;
}

.auth-screen .btn-primary:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.auth-screen .btn-primary:disabled,
.auth-screen .btn-primary:disabled:hover {
    filter: none;
    transform: none;
}

.auth-screen .auth-alt {
    margin-top: 1.5rem;
}

.auth-form-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.3rem 0.6rem;
    margin-top: -0.4rem;
    margin-bottom: 1.1rem;
    font-size: 0.85rem;
}

.auth-form-footer a {
    color: var(--color-text-muted);
}

.auth-form-footer a:hover {
    color: var(--color-primary);
}

@media (max-width: 860px) {
    .auth-brand {
        display: none;
    }

    .auth-main {
        padding: 3rem 1.25rem;
    }
}
