/**
 * ========================================
 * MODERN AUTH PAGES STYLES
 * Login, Signup, Reset Password
 * ========================================
 */

/* Remove scroll on auth pages */
body:has(.auth-modern-wrapper) {
    overflow: hidden !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
}

html:has(.auth-modern-wrapper) {
    overflow: hidden !important;
    height: 100vh !important;
}

/* ==================== 
   BASE WRAPPER 
   ==================== */
.auth-modern-wrapper {
    height: 100vh;
    max-height: 100vh;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

/* ==================== 
   DARK MODE TOGGLE BUTTON 
   ==================== */
/* Top Controls Container (Language & Dark Mode) */
.auth-top-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    gap: 12px;
    animation: fadeInDown 0.6s ease 0.3s backwards;
}

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

/* Shared Control Button Styles */
.auth-control-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.auth-control-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #007A8C, #F15931);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auth-control-btn:hover::before {
    opacity: 0.1;
}

.auth-control-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 
        0 12px 32px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(0, 0, 0, 0.08);
}

.auth-control-btn:active {
    transform: translateY(0) scale(0.95);
}

.auth-control-btn i {
    font-size: 22px;
    transition: all 0.3s ease;
    color: #1f2937;
}

/* Language Switcher Button */
.auth-lang-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    position: relative;
}

.auth-lang-btn .fa-language {
    font-size: 22px;
    color: #007A8C;
}

.auth-lang-btn .lang-text {
    position: absolute;
    bottom: 6px;
    right: 6px;
    font-size: 10px;
    font-weight: 700;
    color: #007A8C;
    line-height: 1;
    transition: all 0.3s ease;
}

.auth-lang-btn:hover .lang-text {
    transform: scale(1.15);
    color: #00A0C0;
}

body.dark-mode .auth-lang-btn .fa-language {
    color: #00A0C0;
}

body.dark-mode .auth-lang-btn .lang-text {
    color: #00A0C0;
}

/* Dark Mode Toggle Specific Styles */
.auth-control-btn .dark-icon {
    color: #1f2937;
    opacity: 1;
    transform: rotate(0deg) scale(1);
    position: absolute;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.auth-control-btn .light-icon {
    color: #f59e0b;
    opacity: 0;
    transform: rotate(180deg) scale(0);
    position: absolute;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Dark mode active state */
body.dark-mode .auth-control-btn {
    background: rgba(45, 55, 72, 0.95);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

body.dark-mode .auth-control-btn i {
    color: #e5e7eb;
}

body.dark-mode .auth-control-btn .dark-icon {
    opacity: 0;
    transform: rotate(-180deg) scale(0);
}

body.dark-mode .auth-control-btn .light-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}


/* Responsive */
@media (max-width: 767px) {
    .auth-top-controls {
        top: 15px;
        right: 15px;
        gap: 8px;
    }
    
    .auth-control-btn {
        width: 45px;
        height: 45px;
    }
    
    .auth-control-btn i {
        font-size: 20px;
    }
    
    .auth-language-dropdown {
        min-width: 140px;
    }
    
    .auth-language-item {
        padding: 10px 14px;
    }
}

/* Pulse effect for first visit */
@keyframes darkModePulse {
    0%, 100% {
        box-shadow: 
            0 8px 24px rgba(0, 0, 0, 0.1),
            0 0 0 1px rgba(0, 0, 0, 0.05);
    }
    50% {
        box-shadow: 
            0 8px 24px rgba(0, 0, 0, 0.1),
            0 0 0 1px rgba(0, 0, 0, 0.05),
            0 0 0 8px rgba(0, 122, 140, 0.2);
    }
}

.auth-dark-mode-btn.pulse {
    animation: darkModePulse 2s ease-in-out 3;
}

/* ==================== 
   ANIMATED BACKGROUND 
   ==================== */
.auth-bg-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

/* Floating Particles */
.auth-particle {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(241, 89, 49, 0.15) 0%, transparent 70%);
    animation: floatParticle 20s infinite ease-in-out;
}

.auth-particle:nth-child(1) {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 25s;
}

.auth-particle:nth-child(2) {
    top: 60%;
    right: 15%;
    animation-delay: 5s;
    animation-duration: 30s;
    background: radial-gradient(circle, rgba(0, 122, 140, 0.15) 0%, transparent 70%);
}

.auth-particle:nth-child(3) {
    bottom: 20%;
    left: 50%;
    animation-delay: 10s;
    animation-duration: 35s;
    background: radial-gradient(circle, rgba(180, 85, 255, 0.12) 0%, transparent 70%);
}

/* Gradient Blob */
.auth-gradient-blob {
    position: absolute;
    width: 500px;
    height: 500px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, rgba(241, 89, 49, 0.1), rgba(0, 122, 140, 0.1), rgba(180, 85, 255, 0.1));
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    filter: blur(60px);
    animation: morphBlob 15s infinite ease-in-out;
}

@keyframes floatParticle {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }
    25% {
        transform: translate(50px, -50px) scale(1.1);
        opacity: 0.5;
    }
    50% {
        transform: translate(-30px, -80px) scale(0.9);
        opacity: 0.4;
    }
    75% {
        transform: translate(-70px, -30px) scale(1.05);
        opacity: 0.35;
    }
}

@keyframes morphBlob {
    0%, 100% {
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    }
    25% {
        border-radius: 70% 30% 50% 50% / 30% 30% 70% 70%;
    }
    50% {
        border-radius: 50% 50% 30% 70% / 50% 70% 30% 30%;
    }
    75% {
        border-radius: 30% 70% 70% 30% / 70% 30% 30% 70%;
    }
}

/* ==================== 
   AUTH CARD 
   ==================== */
.auth-modern-card {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: 24px;
    padding: 2rem 2.5rem;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.8);
    animation: slideInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    
    /* Custom scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 122, 140, 0.3) transparent;
}

.auth-modern-card::-webkit-scrollbar {
    width: 6px;
}

.auth-modern-card::-webkit-scrollbar-track {
    background: transparent;
}

.auth-modern-card::-webkit-scrollbar-thumb {
    background: rgba(0, 122, 140, 0.3);
    border-radius: 3px;
}

.auth-modern-card::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 122, 140, 0.5);
}

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

/* ==================== 
   CARD HEADER 
   ==================== */
.auth-card-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-logo-modern {
    margin-bottom: 2rem;
    animation: logoAppear 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s backwards;
}

.auth-logo-modern img {
    height: 60px;
    width: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.auth-logo-modern img:hover {
    transform: scale(1.05) rotate(3deg);
}

@keyframes logoAppear {
    from {
        opacity: 0;
        transform: scale(0.8) rotate(-5deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}

.auth-modern-title {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #007A8C 0%, #F15931 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.75rem;
    animation: titleAppear 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s backwards;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.auth-modern-title i {
    font-size: 28px;
    background: linear-gradient(135deg, #007A8C 0%, #F15931 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: iconRotate 3s ease-in-out infinite;
}

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

@keyframes iconRotate {
    0%, 100% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(10deg) scale(1.1); }
}

.auth-modern-subtitle {
    color: #6b7280;
    font-size: 15px;
    margin-bottom: 0;
    animation: subtitleAppear 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s backwards;
}

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

/* ==================== 
   FORM STYLES 
   ==================== */
.auth-modern-form {
    animation: formAppear 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.5s backwards;
}

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

/* Modern Field */
.modern-field {
    margin-bottom: 1.5rem;
}

/* Auth signup fields */
.field-login,
.field-name,
.field-password,
.field-confirm_password {
    margin-bottom: 1.5rem !important;
}

.modern-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.modern-label i {
    color: #007A8C;
    font-size: 16px;
}

/* Input Wrapper */
.modern-input-wrapper {
    position: relative;
    display: block;
    width: 100%;
}

.modern-input {
    width: 100%;
    padding: 14px 48px 14px 18px;
    font-size: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
    color: #1f2937;
    transition: all 0.3s ease;
}

.modern-input:focus {
    outline: none;
    border-color: #007A8C;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 122, 140, 0.1);
    transform: translateY(-2px);
}

.modern-input::placeholder {
    color: #9ca3af;
}

.modern-input-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 18px;
    transition: all 0.3s ease;
    pointer-events: none;
}

.modern-input:focus + .modern-input-icon {
    color: #007A8C;
    transform: translateY(-50%) scale(1.1);
}

.field-help-text {
    display: block;
    margin-top: 0.5rem;
    font-size: 13px;
    color: #6b7280;
    font-style: italic;
}

/* Modern Input Group (for database selector) */
.modern-input-group {
    display: flex;
    gap: 8px;
}

.modern-input-group .modern-input {
    flex: 1;
}

.btn-modern-secondary {
    padding: 14px 20px;
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-modern-secondary:hover {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(75, 85, 99, 0.3);
}

/* ==================== 
   PRIMARY BUTTON 
   ==================== */
.btn-modern-primary {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #007A8C 0%, #00a8c0 50%, #007A8C 100%);
    background-size: 200% auto;
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 2rem;
    transition: all 0.4s ease;
    box-shadow: 0 8px 24px rgba(0, 122, 140, 0.3);
    position: relative;
    overflow: hidden;
}

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

.btn-modern-primary:hover {
    background-position: right center;
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 122, 140, 0.4);
}

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

.btn-modern-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 122, 140, 0.3);
}

.btn-modern-primary .btn-text {
    flex: 1;
    text-align: center;
}

.btn-modern-primary .btn-icon {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.btn-modern-primary:hover .btn-icon {
    transform: translateX(5px);
}

/* ==================== 
   ALERTS 
   ==================== */
.alert-modern-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
    border: 2px solid #fca5a5;
    border-radius: 12px;
    padding: 14px 16px;
    color: #991b1b;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: alertSlideIn 0.4s ease;
}

.alert-modern-danger i {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-modern-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
    border: 2px solid #6ee7b7;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 1.5rem;
    text-align: center;
    animation: alertSlideIn 0.4s ease;
}

.alert-modern-success .success-icon {
    font-size: 56px;
    color: #10b981;
    margin-bottom: 1rem;
    animation: successIconPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.alert-modern-success .success-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: #047857;
    margin-bottom: 0.5rem;
}

.alert-modern-success .success-content p {
    font-size: 14px;
    color: #059669;
    margin-bottom: 0;
}

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

@keyframes successIconPop {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}

/* ==================== 
   FOOTER 
   ==================== */
.auth-modern-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    text-align: center;
    animation: footerAppear 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.6s backwards;
}

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

.auth-footer-links {
    margin-bottom: 1rem;
}

.auth-footer-signup {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 14px;
}

.auth-footer-signup span {
    color: #6b7280;
}

.auth-link {
    color: #4b5563;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.auth-link:hover {
    color: #1f2937;
    gap: 8px;
}

.auth-link-primary {
    color: #007A8C;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.auth-link-primary:hover {
    color: #F15931;
    gap: 8px;
    transform: translateX(2px);
}

/* ==================== 
   RIGHT SIDE ILLUSTRATION 
   ==================== */
.auth-modern-illustration {
    position: relative;
    height: 100%;
    max-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow: hidden;
}

.illustration-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 500px;
    animation: illustrationAppear 1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s backwards;
}

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

.illustration-icon {
    width: 200px;
    height: 200px;
    margin: 0 auto 2rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 255, 0.95) 100%);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    box-shadow: 
        0 20px 40px rgba(0, 122, 140, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.8);
    animation: iconFloat 4s ease-in-out infinite;
    transform-style: preserve-3d;
    position: relative;
    overflow: hidden;
}

.illustration-icon::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #007A8C, #F15931, #B455FF);
    border-radius: 30px;
    z-index: -1;
    opacity: 0.3;
    animation: borderRotate 3s linear infinite;
}

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

.illustration-icon a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
}

.illustration-icon a:hover {
    transform: scale(1.05);
}

.illustration-icon img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    transition: all 0.3s ease;
}

.illustration-icon:hover img {
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.15));
}

/* Keep support for icon fonts if needed */
.illustration-icon i {
    font-size: 56px;
    color: #007A8C;
}

@keyframes iconFloat {
    0%, 100% {
        transform: translateY(0) rotateY(0deg);
    }
    50% {
        transform: translateY(-20px) rotateY(5deg);
    }
}

.illustration-title {
    font-size: 36px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.illustration-text {
    font-size: 18px;
    color: #6b7280;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

/* Features List */
.illustration-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    color: #374151;
    transition: all 0.3s ease;
    animation: featureSlideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.feature-item:nth-child(1) { animation-delay: 0.7s; }
.feature-item:nth-child(2) { animation-delay: 0.8s; }
.feature-item:nth-child(3) { animation-delay: 0.9s; }

@keyframes featureSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.feature-item i {
    font-size: 24px;
    color: #10b981;
    flex-shrink: 0;
}

/* Decorative Shapes */
.illustration-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    opacity: 0.1;
    animation: shapeFloat 20s ease-in-out infinite;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #007A8C, #00a8c0);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, #F15931, #ff7e5f);
    bottom: 15%;
    right: 10%;
    animation-delay: 5s;
}

.shape-3 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #B455FF, #d084ff);
    top: 50%;
    right: 20%;
    animation-delay: 10s;
}

@keyframes shapeFloat {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
    25% {
        transform: translate(20px, -20px) rotate(90deg);
        border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
    }
    50% {
        transform: translate(-10px, 30px) rotate(180deg);
        border-radius: 50% 50% 50% 50% / 50% 50% 50% 50%;
    }
    75% {
        transform: translate(-30px, -10px) rotate(270deg);
        border-radius: 30% 70% 30% 70% / 30% 70% 30% 70%;
    }
}

/* ==================== 
   RESPONSIVE 
   ==================== */
@media (max-width: 991px) {
    .auth-modern-card {
        padding: 2rem 1.5rem;
    }
    
    .auth-modern-title {
        font-size: 26px;
    }
    
    .illustration-icon {
        width: 100px;
        height: 100px;
        font-size: 48px;
    }
    
    .illustration-title {
        font-size: 28px;
    }
}

@media (max-width: 767px) {
    .auth-modern-card {
        padding: 1.5rem 1.2rem;
        border-radius: 20px;
        max-height: 85vh;
    }
    
    .auth-modern-wrapper .row > [class*="col-"] {
        padding: 0.5rem;
    }
    
    .auth-modern-title {
        font-size: 24px;
        margin-bottom: 0.5rem;
    }
    
    .auth-modern-subtitle {
        font-size: 14px;
        margin-bottom: 1rem;
    }
    
    .modern-input {
        padding: 12px 44px 12px 16px;
        font-size: 14px;
    }
    
    .btn-modern-primary {
        padding: 14px 20px;
        font-size: 15px;
    }
    
    .auth-card-header {
        margin-bottom: 1.5rem;
    }
    
    .modern-field {
        margin-bottom: 1rem;
    }
}

/* ==================== 
   DARK MODE 
   ==================== */
body.dark-mode .auth-modern-wrapper {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
}

body.dark-mode .auth-modern-card {
    background: rgba(26, 32, 44, 0.95);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    scrollbar-color: rgba(0, 168, 192, 0.4) transparent;
}

body.dark-mode .auth-modern-card::-webkit-scrollbar-thumb {
    background: rgba(0, 168, 192, 0.4);
}

body.dark-mode .auth-modern-card::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 168, 192, 0.6);
}

body.dark-mode .modern-label {
    color: #e5e7eb;
}

body.dark-mode .modern-input {
    background: #2d3748;
    border-color: #4a5568;
    color: #e5e7eb;
}

body.dark-mode .modern-input:focus {
    background: #374151;
    border-color: #00a8c0;
}

body.dark-mode .auth-modern-subtitle,
body.dark-mode .auth-footer-signup span {
    color: #9ca3af;
}

body.dark-mode .illustration-title {
    color: #e5e7eb;
}

body.dark-mode .illustration-text {
    color: #9ca3af;
}

body.dark-mode .feature-item {
    background: rgba(45, 55, 72, 0.7);
    color: #e5e7eb;
}

body.dark-mode .feature-item:hover {
    background: rgba(45, 55, 72, 0.9);
}

body.dark-mode .auth-modern-footer {
    border-top-color: #4a5568;
}

body.dark-mode .field-help-text {
    color: #9ca3af;
}

body.dark-mode .illustration-icon {
    background: linear-gradient(135deg, rgba(45, 55, 72, 0.95) 0%, rgba(31, 41, 55, 0.95) 100%);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

body.dark-mode .illustration-icon::before {
    opacity: 0.5;
}

body.dark-mode .illustration-icon img {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3)) brightness(1.1);
}

body.dark-mode .illustration-icon:hover img {
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.4)) brightness(1.15);
}
/* Auth form spacing */
.auth-modern-wrapper .container-fluid {
    height: 100%;
    max-height: 100vh;
    overflow: hidden;
    padding: 0;
}

.auth-modern-wrapper .row.align-items-center {
    height: 100vh;
    max-height: 100vh;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

.auth-modern-wrapper .row > [class*="col-"] {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

/* Hide original Odoo labels */
.field-login > label.col-form-label,
.field-name > label.col-form-label,
.field-password > label.col-form-label,
.field-confirm_password > label.col-form-label {
    display: none !important;
}

/* Ensure auth_signup forms work properly */
.oe_signup_form .form-group {
    position: relative;
}

.oe_signup_form .modern-input-wrapper {
    display: block;
    position: relative;
    width: 100%;
}

.oe_signup_form .modern-input {
    display: block;
    width: 100%;
}

.oe_reset_password_form .modern-input-wrapper {
    display: block;
    position: relative;
    width: 100%;
}

/* Animation for input focus */
.modern-input-icon i {
    transition: all 0.3s ease;
    display: inline-block;
}

.modern-input-wrapper:has(input:focus) .modern-input-icon,
.modern-input:focus ~ .modern-input-icon {
    color: #007A8C;
    transform: translateY(-50%) scale(1.1);
}

.modern-input-wrapper:has(input:focus) .modern-input-icon i,
.modern-input:focus ~ .modern-input-icon i {
    animation: iconPulse 0.6s ease;
}

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

/* Ensure proper display in signup forms */
.field-login .modern-input-wrapper,
.field-name .modern-input-wrapper,
.field-password .modern-input-wrapper,
.field-confirm_password .modern-input-wrapper {
    margin-top: 0;
}