/* ============================================
   SIVU AI - Authentication Pages Styles
   ============================================ */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.auth-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
}

.orb-auth-1 {
    width: 700px;
    height: 700px;
    background: var(--accent-primary);
    top: -300px;
    left: -200px;
    filter: blur(150px);
    opacity: 0.5;
}

.orb-auth-2 {
    width: 600px;
    height: 600px;
    background: var(--accent-secondary);
    bottom: -200px;
    right: -200px;
    filter: blur(150px);
    opacity: 0.4;
}

/* Auth Container */
.auth-container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1100px;
    width: 95%;
    min-height: 700px;
    background: rgba(22, 22, 31, 0.8);
    backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    overflow: hidden;
    box-shadow:
        0 50px 100px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

@media (max-width: 900px) {
    .auth-container {
        grid-template-columns: 1fr;
        max-width: 480px;
    }
}

/* Left Panel - Branding */
.auth-branding {
    position: relative;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15) 0%, rgba(6, 182, 212, 0.1) 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

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

.auth-branding .logo {
    margin-bottom: 3rem;
}

.auth-branding .logo-icon-img {
    --logo-size: 32px;
}

.branding-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.branding-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.branding-content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

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

.brand-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.feature-dot {
    width: 8px;
    height: 8px;
    background: var(--gradient-primary);
    border-radius: 50%;
}

.branding-visual {
    position: absolute;
    bottom: -100px;
    right: -100px;
    pointer-events: none;
}

.visual-circle {
    position: absolute;
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 50%;
}

.c1 {
    width: 300px;
    height: 300px;
    bottom: 0;
    right: 0;
    animation: pulseCircle 8s ease-in-out infinite;
}

.c2 {
    width: 400px;
    height: 400px;
    bottom: -50px;
    right: -50px;
    animation: pulseCircle 10s ease-in-out infinite 1s;
}

.c3 {
    width: 500px;
    height: 500px;
    bottom: -100px;
    right: -100px;
    animation: pulseCircle 12s ease-in-out infinite 2s;
}

@keyframes pulseCircle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.05); }
}

/* Right Panel - Form */
.auth-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

@media (max-width: 480px) {
    .auth-form-panel {
        padding: 2rem 1.5rem;
    }
}

.auth-form-container {
    width: 100%;
    max-width: 380px;
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 2rem;
}

.auth-tab {
    flex: 1;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: var(--text-secondary);
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.auth-tab:hover {
    color: var(--text-primary);
}

.auth-tab.active {
    background: var(--gradient-primary);
    color: var(--text-primary);
}

/* Auth Form */
.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

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

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

.form-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.form-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Social Auth Buttons */
.social-auth {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.social-btn.google:hover {
    border-color: rgba(66, 133, 244, 0.5);
}

.social-btn.apple:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.divider span {
    color: var(--text-muted);
    font-size: 0.85rem;
    white-space: nowrap;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 1rem;
    transition: var(--transition-smooth);
}

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

.form-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(168, 85, 247, 0.05);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}

/* Password Input */
.password-input {
    position: relative;
}

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

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

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

/* Password Strength */
.password-strength {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.strength-bar::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: var(--accent-tertiary);
    border-radius: 2px;
    transition: width 0.3s, background 0.3s;
}

.strength-bar.weak::after {
    width: 33%;
    background: var(--accent-tertiary);
}

.strength-bar.medium::after {
    width: 66%;
    background: var(--accent-gold);
}

.strength-bar.strong::after {
    width: 100%;
    background: #10b981;
}

.strength-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    min-width: 50px;
}

/* Form Options */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.checkbox-label input {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    transition: var(--transition-smooth);
    position: relative;
}

.checkbox-label input:checked + .checkbox-custom {
    background: var(--gradient-primary);
    border-color: var(--accent-primary);
}

.checkbox-custom::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.2s;
}

.checkbox-label input:checked + .checkbox-custom::after {
    transform: rotate(45deg) scale(1);
}

.forgot-link {
    font-size: 0.9rem;
    color: var(--accent-primary);
    transition: color 0.3s;
}

.forgot-link:hover {
    color: var(--accent-secondary);
}

/* Terms Checkbox */
.terms-checkbox {
    margin-bottom: 1.5rem;
    align-items: flex-start;
}

.terms-checkbox span:last-child {
    line-height: 1.5;
}

.terms-checkbox a {
    color: var(--accent-primary);
}

.terms-checkbox a:hover {
    text-decoration: underline;
}

/* Submit Button */
.btn-full {
    width: 100%;
    justify-content: center;
}

/* Auth Footer */
.auth-footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.6;
}

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

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

/* Loading State */
.btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn.loading span {
    visibility: hidden;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Success Animation */
.success-checkmark {
    width: 60px;
    height: 60px;
    margin: 2rem auto;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #34d399);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.success-checkmark svg {
    color: white;
    animation: drawCheck 0.4s ease 0.3s forwards;
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
}

@keyframes drawCheck {
    to { stroke-dashoffset: 0; }
}

/* Mobile Logo for Auth Page */
.auth-form-container .mobile-logo {
    display: none;
}

@media (max-width: 900px) {
    .auth-form-panel {
        padding-top: 2rem;
    }

    .auth-form-container .mobile-logo {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        margin-bottom: 2rem;
    }

    .auth-form-container .mobile-logo img {
        width: 36px;
        height: 36px;
        border-radius: 8px;
    }

    .auth-form-container .mobile-logo span {
        font-size: 1.5rem;
        font-weight: 700;
    }
}
