/**
 * Enhanced Authentication Pages Styling
 * Professional UI with animations, glass morphism, and beautiful backgrounds
 * Original Design Restored - DO NOT MODIFY WITHOUT BACKUP
 */

/* ===== GLOBAL RESET AND BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== BEAUTIFUL ANIMATED BACKGROUNDS ===== */

/* Primary Background with Gradient Animation */
.auth-background {
    min-height: 100vh;
    position: relative;
    background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c, #4facfe, #00f2fe);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    overflow: hidden;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Login Theme - Orange to Purple Gradient (Like Image 1) */
.auth-background.style-ocean {
    background: linear-gradient(135deg, #FF8A65, #FF7043, #FF5722, #E91E63, #9C27B0, #673AB7);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

/* Register Theme - Cyan to Blue Gradient (Like Image 2) */
.auth-background.style-sunset {
    background: linear-gradient(135deg, #00E5FF, #00BCD4, #0097A7, #0277BD, #1976D2, #303F9F);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

/* Admin Theme - Purple Gradient (Like Image 3) */
.auth-background.style-night {
    background: linear-gradient(135deg, #1A237E, #303F9F, #3F51B5, #512DA8, #673AB7, #7B1FA2);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

/* Customer Dashboard Theme - Purple Gradient (Like Image 4) */
.auth-background.style-dashboard {
    background: linear-gradient(135deg, #512DA8, #673AB7, #7B1FA2, #8E24AA, #9C27B0, #AB47BC);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

/* Floating Shapes Animation */
.auth-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.3) 0%, transparent 50%);
    animation: floating 20s ease-in-out infinite;
}

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

/* ===== GLASS MORPHISM CARD DESIGN ===== */
.auth-container {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.auth-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 4px 16px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    padding: 40px;
    max-width: 450px;
    width: 100%;
    min-width: 320px;
    transition: all 0.3s ease;
    animation: cardSlideIn 0.8s ease-out;
    position: relative;
    overflow: hidden;
}

.auth-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.15),
        0 6px 20px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 768px) {
    .auth-container {
        padding: 15px;
        align-items: flex-start;
        padding-top: 60px;
    }
    
    .auth-card {
        padding: 30px 25px;
        max-width: 100%;
        min-width: unset;
        border-radius: 20px;
        margin: 10px;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 10px;
        padding-top: 40px;
    }
    
    .auth-card {
        padding: 25px 20px;
        border-radius: 16px;
        margin: 5px;
    }
}

@media (orientation: landscape) and (max-height: 600px) {
    .auth-container {
        align-items: flex-start;
        padding-top: 20px;
        padding-bottom: 20px;
    }
    
    .auth-card {
        margin: 10px 0;
    }
}

@keyframes cardSlideIn {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===== TYPOGRAPHY AND HEADERS ===== */
.auth-header {
    text-align: center;
    margin-bottom: 30px;
    animation: fadeInDown 1s ease-out 0.2s both;
}

.auth-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.auth-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
    letter-spacing: 0.5px;
}

.auth-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: logoFloat 3s ease-in-out infinite;
}

.auth-logo i {
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes fadeInDown {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== MODERN FORM STYLING ===== */
.auth-form {
    animation: fadeInUp 1s ease-out 0.4s both;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.input-group-modern {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.1rem;
    z-index: 2;
    transition: all 0.3s ease;
}

.form-control-modern {
    width: 100%;
    padding: 16px 16px 16px 48px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 400;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    outline: none;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-control-modern::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 300;
}

.form-control-modern:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.form-control-modern:focus + .input-icon {
    color: rgba(255, 255, 255, 0.9);
    transform: scale(1.1);
}

/* Textarea styling */
textarea.form-control-modern {
    resize: vertical;
    min-height: 80px;
    padding-top: 16px;
    line-height: 1.5;
}

/* ===== MODERN BUTTON DESIGN ===== */
.btn-modern {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    margin-top: 8px;
}

.btn-modern:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.2));
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn-modern:active {
    transform: translateY(-1px);
}

.btn-modern i {
    margin-right: 8px;
}

/* Button ripple effect */
.btn-modern::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-modern:active::before {
    width: 300px;
    height: 300px;
}

/* ===== ALERT MESSAGES ===== */
.alert-modern {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid;
    display: flex;
    align-items: center;
    animation: alertSlideIn 0.5s ease-out;
}

@keyframes alertSlideIn {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert-modern i {
    margin-right: 12px;
    font-size: 1.2rem;
}

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

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

.alert-modern.warning {
    background: rgba(251, 191, 36, 0.1);
    color: #fde047;
    border-color: rgba(251, 191, 36, 0.3);
}

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

/* ===== DIVIDERS AND SEPARATORS ===== */
.divider {
    margin: 30px 0;
    text-align: center;
    position: relative;
    animation: fadeIn 1s ease-out 0.6s both;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.divider span {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* ===== LINKS AND NAVIGATION ===== */
.auth-links {
    text-align: center;
    margin-top: 20px;
    animation: fadeIn 1s ease-out 0.8s both;
}

.auth-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-block;
    backdrop-filter: blur(5px);
    border: 1px solid transparent;
}

.auth-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.auth-link i {
    margin-right: 6px;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 576px) {
    .auth-card {
        padding: 30px 25px;
        margin: 15px;
        border-radius: 20px;
    }
    
    .auth-title {
        font-size: 2rem;
    }
    
    .auth-subtitle {
        font-size: 1rem;
    }
    
    .auth-logo {
        width: 70px;
        height: 70px;
    }
    
    .auth-logo i {
        font-size: 2rem;
    }
    
    .form-control-modern {
        padding: 14px 14px 14px 44px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .btn-modern {
        padding: 14px 20px;
        font-size: 1rem;
    }
}

@media (max-width: 400px) {
    .auth-container {
        padding: 10px;
    }
    
    .auth-card {
        padding: 25px 20px;
    }
    
    .auth-title {
        font-size: 1.8rem;
    }
}

/* ===== ANIMATION DELAYS FOR STAGGERED EFFECT ===== */
.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }
.form-group:nth-child(5) { animation-delay: 0.5s; }

/* ===== LOADING STATES ===== */
.btn-modern.loading {
    position: relative;
    color: transparent;
}

.btn-modern.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

/* ===== ACCESSIBILITY AND FOCUS STATES ===== */
.form-control-modern:focus,
.btn-modern:focus,
.auth-link:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* ===== FORM VALIDATION STATES ===== */
.form-control-modern.is-valid {
    border-color: rgba(34, 197, 94, 0.5);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.form-control-modern.is-invalid {
    border-color: rgba(239, 68, 68, 0.5);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* ===== PRINT STYLES ===== */
@media print {
    .auth-background,
    .auth-background::before {
        background: white !important;
        animation: none !important;
    }
    
    .auth-card {
        background: white !important;
        backdrop-filter: none !important;
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
    
    .auth-title,
    .auth-subtitle,
    .form-label,
    .auth-link {
        color: #333 !important;
    }
}