/* ============================================
   Authentication Pages - Professional Design
   ============================================ */

:root {
    --auth-primary: #2563eb;
    --auth-primary-dark: #1e40af;
    --auth-primary-light: #3b82f6;
    --auth-gradient-start: #667eea;
    --auth-gradient-end: #764ba2;
    --auth-success: #10b981;
    --auth-white: #ffffff;
    --auth-gray-50: #f9fafb;
    --auth-gray-100: #f3f4f6;
    --auth-gray-200: #e5e7eb;
    --auth-gray-600: #4b5563;
    --auth-gray-900: #111827;
}

/* ============================================
   Background & Layout
   ============================================ */

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--auth-gradient-start) 0%, var(--auth-gradient-end) 100%);
}

.auth-container::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    top: -250px;
    right: -250px;
    animation: float 20s ease-in-out infinite;
}

.auth-container::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    bottom: -200px;
    left: -200px;
    animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(30px, -30px) rotate(120deg);
    }
    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
}

/* ============================================
   Auth Card
   ============================================ */

.auth-card {
    background: var(--auth-white);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
    padding: 3rem;
    max-width: 450px;
    width: 100%;
    position: relative;
    z-index: 10;
    backdrop-filter: blur(10px);
    animation: slideUp 0.6s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-card.register {
    max-width: 700px;
}

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

/* ============================================
   Logo & Header
   ============================================ */

.auth-logo {
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
}

.auth-logo-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-primary-light) 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
    animation: pulse 2s ease-in-out infinite;
    position: relative;
}

.auth-logo-icon::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-primary-light) 100%);
    opacity: 0.5;
    animation: ripple 2s ease-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.auth-logo-icon i {
    font-size: 2.5rem;
    color: var(--auth-white);
    position: relative;
    z-index: 1;
}

.auth-logo h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--auth-gray-900);
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-logo p {
    color: var(--auth-gray-600);
    font-size: 0.95rem;
    margin: 0;
}

/* ============================================
   Form Elements
   ============================================ */

.auth-form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.auth-form-label {
    display: block;
    font-weight: 600;
    color: var(--auth-gray-900);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.auth-form-control {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border: 2px solid var(--auth-gray-200);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--auth-gray-50);
    color: var(--auth-gray-900);
}

.auth-form-control:focus {
    outline: none;
    border-color: var(--auth-primary);
    background: var(--auth-white);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
}

.auth-form-control::placeholder {
    color: var(--auth-gray-600);
    opacity: 0.6;
}

.auth-form-control:not(:placeholder-shown) {
    background: var(--auth-white);
}

/* Input with Icon */
.auth-input-group {
    position: relative;
}

.auth-input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--auth-gray-600);
    font-size: 1.1rem;
    pointer-events: none;
    transition: color 0.3s ease;
}

.auth-input-group .auth-form-control {
    padding-left: 3rem;
}

.auth-input-group:focus-within .auth-input-icon {
    color: var(--auth-primary);
}

/* Password Toggle */
.auth-password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--auth-gray-600);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

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

/* ============================================
   Buttons
   ============================================ */

.auth-btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.auth-btn-primary {
    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-primary-light) 100%);
    color: var(--auth-white);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.auth-btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.auth-btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.auth-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

.auth-btn-primary:active {
    transform: translateY(0);
}

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

/* ============================================
   Checkbox & Remember Me
   ============================================ */

.auth-checkbox-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.auth-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

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

.auth-checkbox label {
    margin: 0;
    cursor: pointer;
    color: var(--auth-gray-600);
    font-size: 0.9rem;
}

.auth-link {
    color: var(--auth-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.auth-link:hover {
    color: var(--auth-primary-dark);
    text-decoration: underline;
}

/* ============================================
   Divider
   ============================================ */

.auth-divider {
    display: flex;
    align-items: center;
    margin: 2rem 0;
    color: var(--auth-gray-600);
    font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--auth-gray-200);
}

.auth-divider span {
    padding: 0 1rem;
}

/* ============================================
   Footer Links
   ============================================ */

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--auth-gray-200);
}

.auth-footer p {
    color: var(--auth-gray-600);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* ============================================
   Alerts
   ============================================ */

.auth-alert {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideDown 0.3s ease-out;
}

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

.auth-alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border-left: 4px solid var(--auth-success);
}

.auth-alert-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.auth-alert-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

.auth-alert-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border-left: 4px solid var(--auth-primary);
}

/* ============================================
   Progress Steps (for registration)
   ============================================ */

.auth-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
}

.auth-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--auth-gray-200);
    z-index: 0;
}

.auth-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.auth-step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--auth-gray-200);
    color: var(--auth-gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.auth-step.active .auth-step-circle {
    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-primary-light) 100%);
    color: var(--auth-white);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.auth-step-label {
    font-size: 0.75rem;
    color: var(--auth-gray-600);
    font-weight: 500;
}

.auth-step.active .auth-step-label {
    color: var(--auth-primary);
    font-weight: 600;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    .auth-container {
        padding: 1rem;
    }
    
    .auth-card {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }
    
    .auth-logo-icon {
        width: 60px;
        height: 60px;
    }
    
    .auth-logo-icon i {
        font-size: 2rem;
    }
    
    .auth-logo h1 {
        font-size: 1.5rem;
    }
}

/* ============================================
   Loading State
   ============================================ */

.auth-btn-loading {
    pointer-events: none;
    opacity: 0.7;
}

.auth-btn-loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--auth-white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 0.5rem;
}

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

/* ============================================
   Floating Labels (Optional Enhancement)
   ============================================ */

.auth-floating-label {
    position: relative;
}

.auth-floating-label .auth-form-control {
    padding-top: 1.5rem;
    padding-bottom: 0.5rem;
}

.auth-floating-label .auth-form-label {
    position: absolute;
    left: 1.25rem;
    top: 1rem;
    transition: all 0.3s ease;
    pointer-events: none;
    background: var(--auth-white);
    padding: 0 0.25rem;
    z-index: 1;
}

.auth-floating-label .auth-form-control:focus ~ .auth-form-label,
.auth-floating-label .auth-form-control:not(:placeholder-shown) ~ .auth-form-label {
    top: -0.5rem;
    font-size: 0.75rem;
    color: var(--auth-primary);
}

