/**
 * Replyfect Auth — sign-in / index (desktop-first split layout)
 * Load: design-tokens → typography → interactions → rf-feedback → auth.css
 */

.rf-auth {
    min-height: 100vh;
    overflow: hidden;
}

.rf-auth-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--rf-bg-base);
}

.rf-auth-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    gap: 1rem;
    min-height: 3.5rem;
    padding: 0.875rem 1.5rem;
    border-bottom: 1px solid var(--rf-border);
    background: var(--rf-bg-elevated);
}

.rf-auth-brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.rf-auth-brand img {
    display: block;
    height: 1.75rem;
    width: auto;
    max-width: 9.5rem;
    object-fit: contain;
}

.rf-auth-layout {
    display: flex;
    flex: 1;
    min-height: 0;
}

.rf-auth-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 2.5rem 2rem 3rem;
    overflow-y: auto;
}

.rf-auth-panel-inner {
    width: 100%;
    max-width: 22rem;
}

.rf-auth-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-bottom: 1rem;
    padding: 0.25rem 0.5rem;
    font-size: var(--rf-text-xs);
    font-weight: var(--rf-weight-medium);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--rf-text-secondary);
    background: var(--rf-bg-muted);
    border: 1px solid var(--rf-border);
    border-radius: 9999px;
}

.rf-auth-eyebrow-dot {
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 50%;
    background: var(--rf-accent);
    box-shadow: 0 0 0 2px var(--rf-accent-muted);
}

.rf-auth-title {
    margin: 0;
    font-size: var(--rf-text-modal-lg);
    font-weight: var(--rf-weight-semibold);
    letter-spacing: var(--rf-tracking-tight);
    line-height: 1.2;
    color: var(--rf-text-primary);
}

.rf-auth-lead {
    margin: 0.5rem 0 0;
    font-size: var(--rf-text-md);
    line-height: var(--rf-leading-relaxed);
    color: var(--rf-text-muted);
}

.rf-auth-form {
    margin-top: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.125rem;
}

.rf-auth-field label {
    display: block;
    margin-bottom: 0.375rem;
}

.rf-auth .soft-input {
    width: 100%;
    min-height: 2.5rem;
    padding: 0.5rem 0.75rem;
    font-size: var(--rf-text-base);
    line-height: var(--rf-leading-tight);
    border-radius: var(--rf-radius-sm);
    border: 1px solid var(--rf-border-strong);
    box-shadow: none;
}

.rf-auth-password-wrap {
    position: relative;
}

.rf-auth-password-wrap .soft-input {
    padding-inline-end: 2.75rem;
}

.rf-auth-password-toggle {
    position: absolute;
    top: 50%;
    inset-inline-end: 0.5rem;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: none;
    border-radius: var(--rf-radius-sm);
    background: transparent;
    color: var(--rf-text-muted);
    cursor: pointer;
    transition: color var(--rf-duration-base) var(--rf-ease-out), background var(--rf-duration-base) var(--rf-ease-out);
}

.rf-auth-password-toggle:hover {
    color: var(--rf-text-primary);
    background: var(--rf-bg-muted);
}

.rf-auth-password-toggle:focus-visible {
    outline: none;
    box-shadow: var(--rf-focus-ring);
}

.rf-auth-password-toggle svg {
    width: 1.125rem;
    height: 1.125rem;
}

.rf-auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.125rem;
}

.rf-auth-remember {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.rf-auth-remember input {
    width: 0.9375rem;
    height: 0.9375rem;
    margin: 0;
    accent-color: var(--rf-accent);
    cursor: pointer;
}

.rf-auth-remember span {
    font-size: var(--rf-text-sm);
    font-weight: var(--rf-weight-medium);
    color: var(--rf-text-secondary);
}

.rf-auth-link {
    padding: 0;
    border: none;
    background: none;
    font-size: var(--rf-text-sm);
    font-weight: var(--rf-weight-semibold);
    color: var(--rf-accent);
    cursor: pointer;
    transition: color var(--rf-duration-base) var(--rf-ease-out);
}

.rf-auth-link:hover {
    color: var(--rf-accent-hover);
}

.rf-auth-link:focus-visible {
    outline: none;
    box-shadow: var(--rf-focus-ring);
    border-radius: var(--rf-radius-sm);
}

.rf-auth .rf-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 2.5rem;
    margin-top: 0.25rem;
    padding: 0 1rem;
    font-size: var(--rf-text-base);
    font-weight: var(--rf-weight-semibold);
    color: #fff;
    background: var(--rf-accent);
    border: none;
    border-radius: var(--rf-radius-sm);
    cursor: pointer;
    transition: opacity var(--rf-duration-base) var(--rf-ease-out);
}

.rf-auth .rf-btn-primary:disabled {
    opacity: 0.72;
    cursor: not-allowed;
}

.rf-auth .rf-btn-primary--success {
    background: var(--rf-success-text);
}

.rf-auth-footer {
    margin-top: 2.5rem;
    font-size: var(--rf-text-xs);
    font-weight: var(--rf-weight-medium);
    color: var(--rf-text-muted);
}

/* ——— Hero (desktop) ——— */
.rf-auth-hero {
    display: none;
    width: 50%;
    max-width: 50%;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    padding: 3rem;
    isolation: isolate;
    background-color: #09090b;
    background-image: linear-gradient(155deg, #18181b 0%, #09090b 42%, #0c0c14 100%);
    border-inline-start: 1px solid rgba(255, 255, 255, 0.08);
}

@media (min-width: 1024px) {
    .rf-auth-hero {
        display: flex;
    }
}

.rf-auth-hero-backdrop {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.rf-auth-hero-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.rf-auth-hero-orb--accent {
    top: -6rem;
    inset-inline-end: -4rem;
    width: 22rem;
    height: 22rem;
    background: radial-gradient(circle at center, rgba(89, 104, 255, 0.42) 0%, transparent 68%);
    filter: blur(48px);
    opacity: 0.85;
}

.rf-auth-hero-orb--mint {
    bottom: -5rem;
    inset-inline-start: -3rem;
    width: 18rem;
    height: 18rem;
    background: radial-gradient(circle at center, rgba(151, 201, 184, 0.22) 0%, transparent 70%);
    filter: blur(56px);
    opacity: 0.9;
}

.rf-auth-hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 3.25rem 3.25rem;
    mask-image: radial-gradient(ellipse 95% 85% at 35% 15%, #000 20%, transparent 72%);
    -webkit-mask-image: radial-gradient(ellipse 95% 85% at 35% 15%, #000 20%, transparent 72%);
}

.rf-auth-carousel {
    position: relative;
    z-index: 1;
    flex: 1;
    min-height: 14rem;
    margin-bottom: 0.5rem;
}

.rf-auth-slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s var(--rf-ease-out);
}

.rf-auth-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
}

.rf-auth-slide-content {
    transform: translateY(1rem);
    opacity: 0;
    transition: transform 0.7s var(--rf-ease-out), opacity 0.7s var(--rf-ease-out);
}

.rf-auth-slide.is-active .rf-auth-slide-content {
    transform: translateY(0);
    opacity: 1;
}

.rf-auth-hero-badge {
    display: inline-block;
    margin-bottom: 1rem;
    padding: 0.25rem 0.625rem;
    font-size: var(--rf-text-xs);
    font-weight: var(--rf-weight-semibold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: var(--rf-radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.85);
}

.rf-auth-hero-badge--accent {
    color: #a5b4fc;
    border-color: rgba(89, 104, 255, 0.35);
    background: rgba(89, 104, 255, 0.12);
}

.rf-auth-hero-badge--mint {
    color: #97c9b8;
    border-color: rgba(151, 201, 184, 0.35);
    background: rgba(151, 201, 184, 0.1);
}

.rf-auth-hero-headline {
    margin: 0 0 0.875rem;
    max-width: 26rem;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #fafafa;
}

.rf-auth-hero-headline span {
    color: var(--rf-accent);
}

.rf-auth-hero-copy {
    margin: 0;
    max-width: 24rem;
    font-size: var(--rf-text-modal);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.58);
}

.rf-auth-hero-stars {
    display: flex;
    gap: 0.125rem;
    margin-bottom: 0.75rem;
    color: #fbbf24;
}

.rf-auth-hero-stars svg {
    width: 1rem;
    height: 1rem;
}

.rf-auth-stat-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.875rem;
    margin-top: 2rem;
}

.rf-auth-stat {
    padding: 1rem 1.125rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--rf-radius-md);
    backdrop-filter: blur(8px);
    transition: background 0.15s ease;
}

.rf-auth-stat:hover {
    background: rgba(255, 255, 255, 0.07);
}

.rf-auth-stat-value {
    margin: 0;
    font-size: var(--rf-text-lg);
    font-weight: var(--rf-weight-bold);
    letter-spacing: var(--rf-tracking-tight);
    color: #fafafa;
}

.rf-auth-stat-value--accent {
    color: var(--rf-accent);
}

.rf-auth-stat-value--mint {
    color: #97c9b8;
}

.rf-auth-stat-value--sky {
    color: #9cbfeb;
}

.rf-auth-stat-label {
    margin: 0.25rem 0 0;
    font-size: var(--rf-text-xs);
    font-weight: var(--rf-weight-semibold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
}

.rf-auth-indicators {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 0.375rem;
    margin-top: 1.5rem;
}

.rf-auth-indicator {
    height: 0.1875rem;
    width: 0.5rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.28);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: width 0.35s var(--rf-ease-out), background 0.35s var(--rf-ease-out);
}

.rf-auth-indicator.is-active {
    width: 1.75rem;
    background: #fafafa;
}

.rf-auth-indicator:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
}

@media (prefers-reduced-motion: reduce) {
    .rf-auth-slide,
    .rf-auth-slide-content,
    .rf-auth-indicator {
        transition: none;
    }
}

/* ——— Account recovery (auth.html) ——— */
.rf-auth-busy {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem 0;
}

.rf-auth-busy-ring {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    border: 2px solid var(--rf-border-strong);
    border-top-color: var(--rf-accent);
    animation: rf-auth-busy-spin 0.85s linear infinite;
}

.rf-auth-busy-title {
    margin: 1.25rem 0 0;
    font-size: var(--rf-text-base);
    font-weight: var(--rf-weight-semibold);
    color: var(--rf-text-primary);
}

.rf-auth-busy-hint {
    margin: 0.375rem 0 0;
    font-size: var(--rf-text-sm);
    color: var(--rf-text-muted);
}

@keyframes rf-auth-busy-spin {
    to { transform: rotate(360deg); }
}

.rf-auth-success {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.rf-auth-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    margin-bottom: 1.25rem;
    border-radius: var(--rf-radius-md);
    background: var(--rf-success-bg);
    color: var(--rf-success-text);
    border: 1px solid color-mix(in srgb, var(--rf-success-text) 22%, transparent);
}

.rf-auth-success-icon svg {
    width: 1.375rem;
    height: 1.375rem;
}

.rf-auth-success .rf-auth-title {
    font-size: var(--rf-text-xl);
}

.rf-auth-success .rf-auth-lead {
    margin-bottom: 1.75rem;
}

.rf-auth-success-cta {
    text-decoration: none;
}

.rf-auth-hero--static .rf-auth-hero-static {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 14rem;
}

@media (prefers-reduced-motion: reduce) {
    .rf-auth-busy-ring {
        animation: none;
        border-top-color: var(--rf-accent);
    }
}
