/* ==========================================================================
   Auth Styles - Login & Forgot Password
   Mobile First Approach
   ========================================================================== */

:root {
    --primary-color: #0d6efd;
    --primary-dark: #0b5ed7;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --border-radius: 0.5rem;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.auth-page {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ==========================================================================
   Auth Wrapper
   ========================================================================== */

.auth-wrapper {
    display: flex;
    min-height: 100vh;
}

.auth-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
}

.auth-card {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    width: 100%;
    max-width: 400px;
    animation: slideUp 0.5s ease-out;
}

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

/* ==========================================================================
   Auth Header
   ========================================================================== */

.auth-logo {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}

.auth-logo i {
    font-size: 2rem;
    color: #fff;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

.auth-subtitle {
    font-size: 0.875rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

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

.form-floating > label {
    padding-left: 2.5rem;
}

.form-floating > .form-control {
    padding-left: 2.5rem;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    padding-left: 1rem;
}

.form-floating > .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.password-field {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    z-index: 10;
    padding: 0.25rem;
}

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

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

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

.btn-login,
.btn-recover {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-login:hover,
.btn-recover:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.btn-login:active,
.btn-recover:active {
    transform: translateY(0);
}

/* ==========================================================================
   Auth Background
   ========================================================================== */

.auth-background {
    display: none;
}

.floating-shapes span {
    display: block;
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 15s infinite;
}

.floating-shapes span:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.floating-shapes span:nth-child(2) {
    width: 120px;
    height: 120px;
    top: 60%;
    left: 70%;
    animation-delay: -5s;
}

.floating-shapes span:nth-child(3) {
    width: 60px;
    height: 60px;
    top: 40%;
    left: 30%;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

/* Recovery Steps */
.recovery-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.step {
    text-align: center;
}

.step-number {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin: 0 auto 0.5rem;
}

.step-text {
    font-size: 0.75rem;
    opacity: 0.9;
}

.step-arrow {
    opacity: 0.5;
}

/* ==========================================================================
   Auth Footer
   ========================================================================== */

.auth-footer {
    border-top: 1px solid #e9ecef;
    padding-top: 1rem;
}

/* ==========================================================================
   Tablet Styles (768px+)
   ========================================================================== */

@media (min-width: 768px) {
    .auth-container {
        padding: 2rem;
    }
    
    .auth-card {
        padding: 2rem;
    }
    
    .auth-logo {
        width: 80px;
        height: 80px;
    }
    
    .auth-logo i {
        font-size: 2.25rem;
    }
    
    .auth-title {
        font-size: 1.75rem;
    }
}

/* ==========================================================================
   Desktop Styles (992px+)
   ========================================================================== */

@media (min-width: 992px) {
    .auth-background {
        display: flex;
        flex: 1;
        background: linear-gradient(135deg, #0d6efd 0%, #0099ff 50%, #00c6ff 100%);
        align-items: center;
        justify-content: center;
        position: relative;
        overflow: hidden;
    }
    
    .auth-background::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    }
    
    .auth-background-content {
        position: relative;
        z-index: 1;
        padding: 3rem;
        max-width: 500px;
    }
    
    .auth-card {
        max-width: 450px;
        padding: 2.5rem;
    }
}

/* ==========================================================================
   Large Desktop (1200px+)
   ========================================================================== */

@media (min-width: 1200px) {
    .auth-background-content {
        padding: 4rem;
    }
}

/* ==========================================================================
   Animations
   ========================================================================== */

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}
