/* =========================================
   Auth Pages Styles - Login & Register
   Application: Lapak Aplikasi
   ========================================= */

/* Auth Container */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    position: relative;
    overflow: hidden;
    padding: 2rem 1rem;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* Auth Card */
.auth-card {
    background: white;
    border-radius: 24px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    max-width: 1000px;
    width: 100%;
    overflow: hidden;
    display: flex;
    position: relative;
    z-index: 1;
}

/* Left Side - Info */
.auth-left {
    flex: 1;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    padding: 3rem;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.auth-left::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.auth-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.auth-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.auth-left h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.auth-left p {
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.auth-features {
    margin-top: 2rem;
    text-align: left;
    position: relative;
    z-index: 1;
}

.auth-feature {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.auth-feature i {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    font-size: 0.9rem;
}

/* Right Side - Form */
.auth-right {
    flex: 1;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-header {
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: #718096;
    font-size: 0.95rem;
}

/* Form Elements */
.form-group-auth {
    margin-bottom: 1.5rem;
}

.form-group-auth label {
    display: block;
    font-weight: 500;
    color: #2d3748;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-group-auth label .required {
    color: #e53e3e;
}

.form-control-auth {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #f7fafc;
}

.form-control-auth:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-control-auth.error {
    border-color: #e53e3e;
}

.form-row-auth {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Password Toggle */
.password-group {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #718096;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #3b82f6;
}

/* reCAPTCHA */
.recaptcha-container {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

/* Checkbox */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.checkbox-group input[type="checkbox"] {
    margin-top: 0.25rem;
    margin-right: 0.5rem;
    cursor: pointer;
}

.checkbox-group label {
    font-size: 0.875rem;
    color: #4a5568;
    cursor: pointer;
    user-select: none;
}

.checkbox-group a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.checkbox-group a:hover {
    text-decoration: underline;
}

/* Submit Button */
.btn-auth-submit {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-auth-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
}

.btn-auth-submit:hover::before {
    left: 100%;
}

.btn-auth-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-auth-submit .spinner {
    display: none;
    margin-right: 0.5rem;
}

.btn-auth-submit.loading .spinner {
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Auth Footer */
.auth-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: #718096;
}

.auth-footer a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Alert Messages */
.alert-auth {
    padding: 0.875rem 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-auth i {
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

.alert-auth-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-auth-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-auth-info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: #cbd5e0;
    font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.auth-divider span {
    padding: 0 1rem;
}

/* Social Login Buttons */
.social-login {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.btn-social {
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-social:hover {
    border-color: #cbd5e0;
    background: #f7fafc;
    transform: translateY(-2px);
}

.btn-social i {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.btn-social.google {
    color: #dc2626;
}

.btn-social.facebook {
    color: #1877f2;
}

/* Responsive */
@media (max-width: 768px) {
    .auth-card {
        flex-direction: column;
        margin: 1rem;
    }
    
    .auth-left {
        padding: 2rem;
        min-height: auto;
    }
    
    .auth-left h2 {
        font-size: 1.5rem;
    }
    
    .auth-left p {
        font-size: 0.95rem;
    }
    
    .auth-features {
        display: none;
    }
    
    .auth-right {
        padding: 2rem;
    }
    
    .form-row-auth {
        grid-template-columns: 1fr;
    }
    
    .social-login {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .auth-page {
        padding: 1rem;
    }
    
    .auth-header h1 {
        font-size: 1.5rem;
    }
}

/* Loading Overlay */
.auth-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.auth-loading.active {
    opacity: 1;
    pointer-events: all;
}

.auth-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

