/*
 * My Vision Media AI Labs
 * Authentication Pages Stylesheet
 */

html.auth-html,
body.auth-page {
    min-height: 100vh;
    height: auto !important;
    overflow-y: auto !important;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--dark);
    position: relative;
}

.auth-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 1;
    margin: 2rem auto;
}

.auth-card {
    width: 100%;
    padding: 3rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    text-decoration: none;
}

.auth-logo img {
    height: 60px;
    width: auto;
}

.auth-brand {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-header h1 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    color: var(--gray-100);
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--gray-400);
    margin: 0;
}

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

.input-icon {
    position: relative;
}

.input-icon i:first-child {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    pointer-events: none;
}

.input-icon .form-input {
    padding-left: 2.75rem;
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.25rem;
    transition: color var(--transition-fast);
}

.password-toggle:hover {
    color: var(--gray-200);
}

.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;
    color: var(--gray-300);
    font-size: 0.875rem;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.forgot-link {
    font-size: 0.875rem;
    color: var(--primary-light);
}

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

.btn-full {
    width: 100%;
}

.auth-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.auth-footer p {
    color: var(--gray-400);
    margin: 0;
}

.auth-footer a {
    color: var(--primary-light);
    font-weight: 500;
}

/* Alerts */
.alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
}

.alert-warning {
    background: rgba(234, 179, 8, 0.1);
    border: 1px solid rgba(234, 179, 8, 0.3);
    color: #fde047;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

/* Background Shapes */
.auth-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.auth-shapes .shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
}

.shape-1 {
    width: 600px;
    height: 600px;
    background: var(--primary);
    top: -200px;
    right: -200px;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: var(--secondary);
    bottom: -100px;
    left: -100px;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: var(--accent);
    bottom: 20%;
    right: 10%;
}

/* Captcha Styling Override */
.auth-form .captcha-container {
    background: rgba(15, 23, 42, 0.5);
}

.auth-form .captcha-question {
    font-size: 1.5rem;
    padding: 0.75rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-sm);
}

/* Responsive */
@media (max-width: 768px) {
    html.auth-html,
    body.auth-page {
        height: auto !important;
        min-height: 100vh;
        overflow-y: scroll !important;
        -webkit-overflow-scrolling: touch;
    }
    
    .auth-page {
        padding: 1rem;
        align-items: flex-start;
        min-height: 100vh;
        height: auto;
    }
    
    .auth-container {
        margin: 1rem auto;
        padding-bottom: 2rem;
        max-width: 100%;
    }
    
    .auth-card {
        padding: 1.5rem 1.25rem;
        margin: 0 auto;
        border-radius: var(--radius-md);
    }
    
    .auth-header h1 {
        font-size: 1.5rem;
    }
    
    .auth-header p {
        font-size: 0.9rem;
    }
    
    .auth-logo img {
        height: 45px;
    }
    
    .form-options {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-label {
        font-size: 0.875rem;
    }
    
    .form-input {
        padding: 0.875rem 1rem;
        font-size: 16px; /* Prevents iOS zoom */
    }
    
    .input-icon .form-input {
        padding-left: 2.75rem;
    }
    
    .btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }
    
    .btn-lg {
        padding: 1rem 1.5rem;
    }
    
    .alert {
        padding: 0.875rem;
        font-size: 0.8rem;
    }
    
    .auth-footer {
        padding-top: 1.25rem;
    }
    
    .auth-footer p,
    .auth-footer a {
        font-size: 0.875rem;
    }
    
    .auth-background {
        display: none;
    }
}

/* Extra small devices */
@media (max-width: 375px) {
    .auth-page {
        padding: 0.75rem;
    }
    
    .auth-card {
        padding: 1.25rem 1rem;
    }
    
    .auth-header {
        margin-bottom: 1.5rem;
    }
    
    .auth-header h1 {
        font-size: 1.35rem;
    }
    
    .auth-logo {
        margin-bottom: 1.5rem;
    }
    
    .auth-logo img {
        height: 40px;
    }
    
    .btn-lg {
        padding: 0.875rem 1.25rem;
    }
}

/* Dashboard specific auth styles */
.auth-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

.auth-split-left {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-split-right {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-hero);
    position: relative;
    overflow: hidden;
}

.auth-split-right::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('/assets/images/auth-pattern.svg') repeat;
    opacity: 0.1;
}

@media (max-width: 1024px) {
    .auth-split {
        grid-template-columns: 1fr;
    }
    
    .auth-split-right {
        display: none;
    }
}
