/* =========================================
   LUMINA PROPERTIES - AUTHENTICATION STYLES
   Split-Screen Editorial Design
   ========================================= */

.auth-layout {
    display: flex;
    min-height: 100vh;
    background: var(--bg-primary);
}

/* Left Panel: Image & Branding */
.auth-image-panel {
    flex: 1;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 60px;
    background-size: cover;
    background-position: center;
}

.auth-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(17, 17, 17, 0.9) 0%, rgba(17, 17, 17, 0.2) 50%, transparent 100%);
}

.auth-image-content {
    position: relative;
    z-index: 2;
    max-width: 500px;
    color: var(--text-light);
}

.auth-image-content .logo-mark {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-image-content .logo-mark span {
    font-family: var(--font-body);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 3px;
    color: rgba(255,255,255,0.7);
    margin-top: 2px;
}

.auth-image-content h2 {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 16px;
    color: var(--text-light);
}

.auth-image-content p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.8);
}

/* Right Panel: Form */
.auth-form-panel {
    width: 550px;
    padding: 60px 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--bg-primary);
    overflow-y: auto;
}

.auth-form-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.auth-header {
    margin-bottom: 40px;
}

.auth-header h1 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Tabs */
.auth-tabs {
    display: flex;
    gap: 32px;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--border-light);
}

.auth-tab {
    padding-bottom: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    transition: color var(--transition-fast);
}

.auth-tab.active {
    color: var(--text-primary);
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
}

/* Forms */
.auth-form {
    display: none;
    animation: fadeIn 0.4s ease;
}

.auth-form.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-form .form-input {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    padding: 16px;
    font-size: 1rem;
    border-radius: var(--radius-sm);
}

.auth-form .form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.password-toggle:hover {
    color: var(--text-primary);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 0.9rem;
}

.form-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    cursor: pointer;
}

.form-options a {
    color: var(--accent-hover);
    font-weight: 600;
}

.form-options a:hover {
    color: var(--accent);
}

.auth-submit-btn {
    width: 100%;
    padding: 16px;
    background: var(--bg-dark);
    color: var(--text-light);
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.auth-submit-btn:hover {
    background: #000000;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.auth-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.auth-footer-text {
    text-align: center;
    margin-top: 32px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-footer-text a {
    color: var(--accent-hover);
    font-weight: 600;
    cursor: pointer;
}

/* 2FA / OTP Screen */
.otp-screen {
    display: none;
    text-align: center;
    animation: fadeIn 0.4s ease;
}

.otp-screen.active {
    display: block;
}

.otp-icon-wrapper {
    width: 64px;
    height: 64px;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 24px;
}

.otp-screen h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.otp-screen > p {
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 0.95rem;
}

.otp-inputs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}

.otp-input {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.otp-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
    outline: none;
}

.otp-resend {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 20px;
}

.otp-resend a {
    color: var(--accent-hover);
    font-weight: 600;
    cursor: pointer;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 32px;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.back-link:hover {
    color: var(--text-primary);
}

/* Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}

.spinner.active {
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Device Linking (Admin) */
.device-link-container {
    text-align: center;
    margin-bottom: 32px;
}

.qr-placeholder {
    width: 160px;
    height: 160px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--text-muted);
}

.secret-key {
    font-family: monospace;
    font-size: 1.1rem;
    letter-spacing: 2px;
    color: var(--accent);
    font-weight: 600;
    background: var(--bg-secondary);
    padding: 12px;
    border-radius: var(--radius-sm);
    display: inline-block;
}

/* =========================================
   RESPONSIVE DESIGN - PREMIUM MOBILE
   ========================================= */
@media (max-width: 900px) {
    .auth-layout {
        flex-direction: column;
        min-height: 100vh;
    }

    /* Show image as top banner on mobile */
    .auth-image-panel {
        display: block;
        height: 40vh;
        min-height: 250px;
        padding: 30px 24px;
        align-items: flex-end;
        background-size: cover;
        background-position: center;
    }

    .auth-image-overlay {
        background: linear-gradient(to top, rgba(17, 17, 17, 0.95) 0%, rgba(17, 17, 17, 0.4) 100%);
    }

    .auth-image-content {
        max-width: 100%;
    }

    .auth-image-content h2 {
        font-size: 1.8rem;
        margin-bottom: 8px;
    }

    .auth-image-content p {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .auth-form-panel {
        width: 100%;
        padding: 40px 24px;
        flex: 1;
    }

    .auth-form-container {
        max-width: 100%;
    }

    .auth-header h1 {
        font-size: 1.8rem;
    }

    .auth-header p {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .auth-image-panel {
        height: 35vh;
        min-height: 200px;
        padding: 24px 20px;
    }

    .auth-image-content h2 {
        font-size: 1.5rem;
    }

    .auth-form-panel {
        padding: 32px 20px;
    }

    .auth-header h1 {
        font-size: 1.6rem;
    }

    .auth-submit-btn {
        padding: 16px;
        font-size: 1rem;
    }

    .otp-inputs {
        gap: 8px;
    }

    .otp-input {
        width: 40px;
        height: 48px;
        font-size: 1.2rem;
    }
}