/**
 * Authentication Pages Styles
 * Premium design for hotel management system auth pages
 */

/* =============================================
   CSS Variables
   ============================================= */
:root {
    --auth-primary: #667eea;
    --auth-secondary: #764ba2;
    --auth-accent: #f093fb;
    --auth-success: #10b981;
    --auth-warning: #f59e0b;
    --auth-error: #ef4444;
    --auth-dark: #1a1a2e;
    --auth-card-bg: rgba(255, 255, 255, 0.95);
    --auth-text: #2d3748;
    --auth-text-muted: #718096;
    --auth-border: rgba(255, 255, 255, 0.2);
    --auth-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* =============================================
   Animated Background
   ============================================= */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
    overflow: hidden;
    background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #4facfe);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

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

/* Floating Orbs Background */
.auth-wrapper::before,
.auth-wrapper::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.6;
    animation: float 20s ease-in-out infinite;
}

.auth-wrapper::before {
    width: 600px;
    height: 600px;
    background: rgba(102, 126, 234, 0.4);
    top: -200px;
    left: -200px;
}

.auth-wrapper::after {
    width: 500px;
    height: 500px;
    background: rgba(240, 147, 251, 0.4);
    bottom: -150px;
    right: -150px;
    animation-delay: -7s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(50px, 50px) rotate(5deg); }
    50% { transform: translate(0, 100px) rotate(0deg); }
    75% { transform: translate(-50px, 50px) rotate(-5deg); }
}

/* Particles Container */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: rise 10s infinite ease-in;
}

.particle:nth-child(1) { left: 10%; animation-duration: 8s; width: 8px; height: 8px; }
.particle:nth-child(2) { left: 20%; animation-duration: 12s; animation-delay: 1s; width: 12px; height: 12px; }
.particle:nth-child(3) { left: 30%; animation-duration: 9s; animation-delay: 2s; }
.particle:nth-child(4) { left: 40%; animation-duration: 11s; animation-delay: 0s; width: 6px; height: 6px; }
.particle:nth-child(5) { left: 50%; animation-duration: 10s; animation-delay: 3s; width: 14px; height: 14px; }
.particle:nth-child(6) { left: 60%; animation-duration: 13s; animation-delay: 1.5s; }
.particle:nth-child(7) { left: 70%; animation-duration: 8s; animation-delay: 2.5s; width: 8px; height: 8px; }
.particle:nth-child(8) { left: 80%; animation-duration: 11s; animation-delay: 0.5s; width: 10px; height: 10px; }
.particle:nth-child(9) { left: 90%; animation-duration: 9s; animation-delay: 4s; width: 6px; height: 6px; }
.particle:nth-child(10) { left: 5%; animation-duration: 14s; animation-delay: 2s; width: 12px; height: 12px; }

@keyframes rise {
    0% {
        bottom: -50px;
        opacity: 0;
        transform: translateX(0) scale(0);
    }
    10% {
        opacity: 0.5;
        transform: translateX(10px) scale(1);
    }
    50% {
        opacity: 0.3;
        transform: translateX(-20px) scale(0.8);
    }
    100% {
        bottom: 110%;
        opacity: 0;
        transform: translateX(20px) scale(0.2);
    }
}

/* =============================================
   Auth Container & Card
   ============================================= */
.auth-container {
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 10;
}

.auth-card {
    background: var(--auth-card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: var(--auth-shadow);
    border: 1px solid var(--auth-border);
    overflow: hidden;
    animation: slideUp 0.6s ease-out;
}

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

/* Card Header */
.auth-card-header {
    background: linear-gradient(135deg, var(--auth-primary), var(--auth-secondary));
    padding: 2rem 2.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.auth-card-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,255,255,0.4); }
    50% { transform: scale(1.05); box-shadow: 0 0 20px 10px rgba(255,255,255,0); }
}

.auth-logo svg,
.auth-logo img {
    width: 50px;
    height: 50px;
    color: white;
    fill: white;
}

.auth-title {
    color: white;
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.auth-subtitle {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

/* Card Body */
.auth-card-body {
    padding: 2.5rem;
}

/* =============================================
   Form Styles
   ============================================= */
.auth-form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.auth-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--auth-text);
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.auth-input-wrapper {
    position: relative;
}

.auth-input-icon {
    position: absolute;
    margin-left: -3rem;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--auth-text-muted);
    transition: all 0.3s ease;
    pointer-events: none;
    font-size: 1rem;
    z-index: 2;
}

.auth-input {
    width: 100%;
    padding: 0.875rem 3rem 0.875rem 3.25rem;
    font-size: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    color: var(--auth-text);
    transition: all 0.3s ease;
    outline: none;
}

.auth-input:focus {
    border-color: var(--auth-primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

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

.auth-input::placeholder {
    color: #a0aec0;
}

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

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

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

.auth-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    accent-color: var(--auth-primary);
}

.auth-checkbox:checked {
    background: var(--auth-primary);
    border-color: var(--auth-primary);
}

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

/* =============================================
   Buttons
   ============================================= */
.auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.auth-btn-primary {
    background: linear-gradient(135deg, var(--auth-primary), var(--auth-secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

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

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

.auth-btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.auth-btn-primary:hover::before {
    left: 100%;
}

.auth-btn-secondary {
    background: #f1f5f9;
    color: var(--auth-text);
    border: 2px solid #e2e8f0;
}

.auth-btn-secondary:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.auth-btn-outline {
    background: transparent;
    color: var(--auth-primary);
    border: 2px solid var(--auth-primary);
}

.auth-btn-outline:hover {
    background: var(--auth-primary);
    color: white;
}

.auth-btn-full {
    width: 100%;
}

.auth-btn-lg {
    padding: 1.125rem 2.5rem;
    font-size: 1.1rem;
}

/* =============================================
   Links
   ============================================= */
.auth-link {
    color: var(--auth-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.auth-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--auth-primary);
    transition: width 0.3s ease;
}

.auth-link:hover::after {
    width: 100%;
}

.auth-link:hover {
    color: var(--auth-secondary);
}

/* =============================================
   Divider
   ============================================= */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.auth-divider-text {
    padding: 0 1rem;
    color: var(--auth-text-muted);
    font-size: 0.875rem;
}

/* =============================================
   Social Login Buttons
   ============================================= */
.auth-social-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.auth-social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    color: var(--auth-text);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.auth-social-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

.auth-social-btn svg {
    width: 20px;
    height: 20px;
}

/* =============================================
   Messages
   ============================================= */
.auth-message {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    animation: fadeIn 0.3s ease;
}

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

.auth-message-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.auth-message-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.auth-message-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.auth-message-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.auth-message-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

/* =============================================
   Footer
   ============================================= */
.auth-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
    margin-top: 1.5rem;
}

.auth-footer-text {
    color: var(--auth-text-muted);
    font-size: 0.9rem;
}

/* =============================================
   Hotel Features Card
   ============================================= */
.auth-features {
    display: none;
}

@media (min-width: 1024px) {
    .auth-container {
        max-width: 1000px;
        display: flex;
        gap: 0;
    }

    .auth-card {
        flex: 1;
        border-radius: 24px 0 0 24px;
    }

    .auth-features {
        display: flex;
        flex-direction: column;
        justify-content: center;
        flex: 1;
        background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.35));
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 3rem;
        border-radius: 0 24px 24px 0;
        border: 1px solid var(--auth-border);
        border-left: none;
    }

    .auth-features-title {
        color: white;
        font-size: 1.5rem;
        font-weight: 700;
        margin-bottom: 2rem;
        text-shadow: 0 2px 10px rgba(0,0,0,0.2);
    }

    .auth-feature-item {
        display: flex;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 1.5rem;
        padding: 1rem;
        background: rgba(0, 0, 0, 0.2);
        border-radius: 12px;
        transition: transform 0.3s ease, background 0.3s ease;
    }

    .auth-feature-item:hover {
        transform: translateX(10px);
        background: rgba(255,255,255,0.15);
    }

    .auth-feature-icon {
        width: 48px;
        height: 48px;
        background: rgba(255,255,255,0.2);
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .auth-feature-icon svg {
        width: 24px;
        height: 24px;
        color: white;
    }

    .auth-feature-content h4 {
        color: white;
        font-size: 1rem;
        font-weight: 600;
        margin: 0 0 0.25rem;
    }

    .auth-feature-content p {
        color: rgba(255,255,255,0.8);
        font-size: 0.875rem;
        margin: 0;
        line-height: 1.5;
    }
}

/* =============================================
   Dark Mode Support
   ============================================= */
[data-theme="dark"] .auth-card {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .auth-input {
    background: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
}

[data-theme="dark"] .auth-input:focus {
    background: #0f172a;
    border-color: var(--auth-primary);
}

[data-theme="dark"] .auth-label {
    color: #e2e8f0;
}

[data-theme="dark"] .auth-checkbox-label {
    color: #94a3b8;
}

[data-theme="dark"] .auth-divider::before,
[data-theme="dark"] .auth-divider::after {
    background: #334155;
}

[data-theme="dark"] .auth-footer {
    border-color: #334155;
}

[data-theme="dark"] .auth-social-btn {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

[data-theme="dark"] .auth-social-btn:hover {
    background: #334155;
}

/* =============================================
   Responsive Adjustments
   ============================================= */
@media (max-width: 640px) {
    .auth-wrapper {
        padding: 1rem;
    }

    .auth-card-header {
        padding: 1.5rem;
    }

    .auth-card-body {
        padding: 1.5rem;
    }

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

    .auth-logo svg,
    .auth-logo img {
        width: 36px;
        height: 36px;
    }

    .auth-title {
        font-size: 1.5rem;
    }

    .auth-social-buttons {
        flex-direction: column;
    }
}

/* =============================================
   Loading State
   ============================================= */
.auth-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.auth-btn.loading .btn-text {
    visibility: hidden;
}

.auth-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* =============================================
   Input Error States
   ============================================= */
.auth-input.error {
    border-color: var(--auth-error);
    background: #fef2f2;
}

.auth-input.error:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.auth-error-text {
    color: var(--auth-error);
    font-size: 0.8rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* =============================================
   Password Strength Indicator
   ============================================= */
.password-strength {
    margin-top: 0.5rem;
}

.password-strength-bar {
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
}

.password-strength-fill {
    height: 100%;
    transition: width 0.3s ease, background 0.3s ease;
}

.password-strength-fill.weak { width: 25%; background: #ef4444; }
.password-strength-fill.fair { width: 50%; background: #f59e0b; }
.password-strength-fill.good { width: 75%; background: #10b981; }
.password-strength-fill.strong { width: 100%; background: #059669; }

.password-strength-text {
    font-size: 0.75rem;
    margin-top: 0.25rem;
    color: var(--auth-text-muted);
}

