/* Premium Authentication Styles - Clean, Centered, and Fast */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* Box-sizing reset — essential when Bootstrap is NOT loaded */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --auth-primary: #6366F1;
    --auth-primary-dark: #4F46E5;
    --auth-primary-glow: rgba(99, 102, 241, 0.4);
    --auth-bg-dark: #0B0F19;
    --auth-bg-gradient: linear-gradient(135deg, #0B0F19 0%, #111827 50%, #1E1B4B 100%);
    --auth-card-bg: rgba(17, 24, 39, 0.85);
    --auth-border: rgba(255, 255, 255, 0.08);
    --auth-text: #F8FAFC;
    --auth-text-muted: #94A3B8;
    --auth-input-bg: rgba(15, 23, 42, 0.7);
}

body, html {
    font-family: 'Outfit', -apple-system, sans-serif !important;
    background-color: var(--auth-bg-dark);
    margin: 0;
    min-height: 100vh;
}

.auth-wrapper {
    min-height: 100vh;
    background: var(--auth-bg-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
    overflow: hidden;
}

/* Static shapes to prevent lag */
.auth-wrapper::before,
.auth-wrapper::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    z-index: 0;
}

.auth-wrapper::before {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 60%);
    top: -100px;
    left: -100px;
}

.auth-wrapper::after {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 60%);
    bottom: -100px;
    right: -100px;
}

.auth-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 520px; /* wider for breathing room */
}

.auth-card {
    background: var(--auth-card-bg);
    border: 1px solid var(--auth-border);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.auth-image-side {
    display: none; /* Hide the big side panel */
}

.auth-form-side {
    width: 100%;
    padding: 3rem 3.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(15, 23, 42, 0.4);
}
.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.auth-logo img {
    max-height: 60px;
    object-fit: contain;
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--auth-text);
    margin-bottom: 0.5rem;
    text-align: center;
}

.auth-subtitle {
    color: var(--auth-text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    text-align: center;
}

.auth-form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.auth-form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #cbd5e1;
    font-size: 0.875rem;
}

.auth-form-control {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    font-size: 1rem;
    color: white;
    transition: all 0.2s ease;
    background: var(--auth-input-bg);
}

.auth-form-control:focus {
    outline: none;
    border-color: var(--auth-primary);
    background: rgba(15, 23, 42, 0.9);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.auth-form-control::placeholder {
    color: #64748b;
}

.auth-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.auth-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--auth-primary);
    cursor: pointer;
}

.auth-checkbox-label {
    font-size: 0.875rem;
    color: var(--auth-text-muted);
    cursor: pointer;
    user-select: none;
}

.auth-forgot-link {
    color: #a5b4fc;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.auth-forgot-link:hover {
    color: white;
}

.auth-submit-btn {
    width: 100%;
    padding: 0.85rem;
    background: linear-gradient(135deg, var(--auth-primary) 0%, #8B5CF6 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 1rem;
    box-shadow: 0 4px 15px var(--auth-primary-glow);
}

.auth-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--auth-primary-glow);
}

.auth-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background: #475569;
    box-shadow: none;
}

.auth-switch-link {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--auth-text-muted);
    font-size: 0.9rem;
}

.auth-switch-link a {
    color: #a5b4fc;
    text-decoration: none;
    font-weight: 600;
    margin-left: 0.5rem;
}

.auth-switch-link a:hover {
    color: white;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: #64748b;
    font-size: 0.8rem;
}

/* Alerts updated for dark theme */
.alert {
    padding: 0.875rem 1.25rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    border: 1px solid transparent;
    font-size: 0.9rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.alert i {
    margin-right: 0.5rem;
}

/* Password Toggle */
.btn-password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 0 0.5rem;
    font-size: 1rem;
}

.btn-password-toggle:hover {
    color: white;
}

/* Loading */
.auth-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

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

/* Validation */
.auth-form-control.is-invalid {
    border-color: #ef4444;
}

.auth-form-control.is-valid {
    border-color: #10b981;
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #f87171;
}

/* Responsive */
@media (max-width: 576px) {
    .auth-wrapper {
        padding: 1rem;
    }
    
    .auth-form-side {
        padding: 2rem 1.5rem;
    }
}