/* ====================================================================
   VELBOOKS — AUTH PAGES
   Split layout: left brand panel + right form panel.
   Fully responsive. Uses design system CSS vars from style.css.
==================================================================== */

.auth-page {
    display: flex;
    min-height: 100vh;
    background: var(--bg-app);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ===== LEFT PANEL — Brand/Marketing ===== */
.auth-left {
    flex: 1;
    background: var(--nav-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.auth-left::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -20%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.auth-left::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.auth-left-content {
    max-width: 480px;
    position: relative;
    z-index: 1;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.auth-brand-name {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
}

.auth-headline {
    font-size: 2.25rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    letter-spacing: -0.03em;
    margin: 0 0 1rem 0;
}

.auth-subline {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.6;
    margin: 0 0 2.5rem 0;
}

.auth-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.9rem;
    font-weight: 500;
}

.auth-feature svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--accent);
}

/* ===== RIGHT PANEL — Form ===== */
.auth-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: var(--bg-panel);
}

.auth-form-wrapper {
    width: 100%;
    max-width: 400px;
}

.auth-mobile-brand {
    display: none;
    justify-content: center;
    margin-bottom: 2rem;
}

.auth-mobile-brand .auth-brand-name {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.auth-form-header {
    margin-bottom: 2rem;
}

.auth-form-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-1);
    letter-spacing: -0.02em;
    margin: 0 0 0.5rem 0;
}

.auth-form-sub {
    font-size: 0.9rem;
    color: var(--text-3);
    margin: 0;
}

/* ===== FORM ELEMENTS ===== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-2);
    margin-bottom: 0.4rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: var(--bg-input);
    color: var(--text-1);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    box-shadow: var(--shadow-inset);
}

.form-group input::placeholder {
    color: var(--text-4);
}

.form-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

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

.input-password-wrap input {
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: var(--text-4);
    transition: color 0.15s;
}

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

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

/* ===== AUTH BUTTON ===== */
.btn-auth {
    width: 100%;
    padding: 0.8rem 1.5rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.btn-auth:hover {
    background: var(--accent-hover);
}

.btn-auth:active {
    transform: scale(0.98);
}

.btn-auth:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ===== SPINNER ===== */
.spinner {
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== MESSAGES ===== */
.auth-error {
    background: var(--red-dim);
    color: var(--red-text);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.auth-success {
    background: var(--green-dim);
    color: var(--green-text);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(16, 185, 129, 0.15);
}

/* ===== AUTH SWITCH ===== */
.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-3);
}

.auth-switch-btn {
    background: none;
    border: none;
    color: var(--accent-text);
    font-weight: 600;
    font-family: inherit;
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0;
    margin-left: 0.25rem;
    transition: opacity 0.15s;
}

.auth-switch-btn:hover {
    opacity: 0.8;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .auth-page {
        flex-direction: column;
    }

    .auth-left {
        display: none;
    }

    .auth-right {
        padding: 2rem 1.5rem;
        min-height: 100vh;
    }

    .auth-mobile-brand {
        display: flex;
    }
}

@media (max-width: 480px) {
    .auth-right {
        padding: 1.5rem 1.25rem;
    }

    .auth-form-title {
        font-size: 1.25rem;
    }
}
