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

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #ffffff 0%, #ffffff 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.login-wrapper {
    width: 100%;
    max-width: 1100px;
    background-image: var(--banner-url);
    background-size: cover;
    background-position: center;
    border-radius: 40px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.25);
    display: flex;
    min-height: 650px;
    position: relative;
    transition: background-image 0.6s ease, box-shadow 0.6s ease;
}

.login-wrapper.success-mode {
    background-image: none;
    background: transparent;
    box-shadow: none;
}

.login-form-section {
    background: transparent;
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    z-index: 2;
    width: 45.45%;
    flex-shrink: 0;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 40px;
}

.login-form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #f8f9fa;
    border-radius: 40px;
    z-index: -1;
}

.login-wrapper.success-mode .login-form-section {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.login-wrapper.success-mode .login-form-section::before {
    display: none;
}

.logo-container {
    margin-bottom: 30px;
}

.logo-container img {
    max-width: 140px;
    height: auto;
}

.form-header h1 {
    font-size: 2.2rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.form-header p {
    color: #6b6b6b;
    font-size: 0.9rem;
    margin-bottom: 32px;
    font-weight: 400;
}

.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    border: none;
}

.alert-danger {
    background: #fee;
    color: #c53030;
}

.alert-success {
    background: #e6fffa;
    color: #047857;
}

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

.form-group label {
    display: none;
}

.form-control {
    width: 100%;
    padding: 16px 18px;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    background: #f5f5f5;
    color: #333;
    transition: all 0.3s ease;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.form-control::placeholder {
    color: #999;
}

.form-control:focus {
    outline: none;
    background: #ebebeb;
    box-shadow: 0 0 0 3px rgba(156, 115, 107, 0.1);
}

.password-wrapper {
    position: relative;
}

.password-toggle-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #999;
    font-size: 1rem;
    transition: color 0.2s;
}

.password-toggle-icon:hover {
    color: #9c736b;
}

.recovery-link {
    text-align: right;
    margin-top: 8px;
    margin-bottom: 24px;
}

.recovery-link a {
    color: #9c736b;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s;
}

.recovery-link a:hover {
    color: #7d5c56;
}

.btn-login {
    width: 100%;
    padding: 16px;
    background: #9c736b;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(156, 115, 107, 0.3);
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.btn-login:hover {
    background: #8a6660;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(156, 115, 107, 0.4);
}

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

.divider {
    text-align: center;
    margin: 28px 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: #e0e0e0;
}

.divider span {
    background: white;
    padding: 0 15px;
    color: #999;
    font-size: 0.85rem;
    position: relative;
    z-index: 1;
}

.powered-by-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
}

.powered-by-logo-img {
    max-height: 200px;
    max-width: 200px;
    object-fit: contain;
}

.social-login {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.social-btn {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    border: none;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.3rem;
}

.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

.social-btn.google {
    color: #ea4335;
}

.social-btn.apple {
    color: #000;
}

.social-btn.facebook {
    color: #1877f2;
}

.login-image-section {
    background: linear-gradient(180deg, #8b6d8f 0%, #d4a88c 50%, #e8c9a8 100%);
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 54.55%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1;
    border-radius: 0 40px 40px 0;
}

.login-wrapper.success-mode .login-image-section {
    opacity: 0;
    width: 0;
    pointer-events: none;
}

.illustration-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.illustration-text {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1.8rem;
    font-weight: 300;
    text-align: center;
    z-index: 10;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.carousel-indicators {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s;
}

.carousel-dot.active {
    background: white;
    width: 30px;
    border-radius: 5px;
}

.illustration-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: var(--banner-url);
    background-size: cover;
    background-position: center;
    opacity: 1;
}

/* ========================================
   SUCCESS ANIMATION - COMPLETE REDESIGN
   ======================================== */

.login-form-section {
    position: relative;
}

.form-content {
    position: relative;
    z-index: 1;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                filter 0.6s ease;
    transform-origin: center center;
}

.form-content.morphing {
    opacity: 0;
    transform: scale(0.3) translateY(20px);
    filter: blur(4px);
    pointer-events: none;
    z-index: 1;
}

.form-content.hidden {
    opacity: 0;
    transform: scale(0.96) translateY(-10px);
    pointer-events: none;
}

.success-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px 30px;
    background: transparent;
    overflow-y: auto;
    overflow-x: hidden;
}

.success-animation.show {
    display: flex;
}

.success-content {
    text-align: center;
    width: 100%;
    max-width: 900px;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
}

.success-stage {
    display: none;
    animation: stageFadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.success-stage.active {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

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

/* Success Icon Container */
.success-icon-container {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    animation: iconEnter 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes iconEnter {
    from {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    to {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.success-checkmark-circle {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    border-radius: 50%;
    position: relative;
    z-index: 2;
    box-shadow: 0 10px 40px rgba(16, 185, 129, 0.3);
    animation: pulse 1s ease-in-out 1;
}

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

.success-checkmark-circle i {
    font-size: 3.5rem;
    color: white;
    animation: checkRotate 0.6s ease 0.3s backwards;
}

@keyframes checkRotate {
    from {
        transform: rotate(-90deg) scale(0);
        opacity: 0;
    }
    to {
        transform: rotate(0deg) scale(1);
        opacity: 1;
    }
}

.success-ripple {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 3px solid #10b981;
    border-radius: 50%;
    animation: ripple 1.5s ease-out 1;
    opacity: 0;
}

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

/* Profile Section */
.success-profile-section {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(156, 115, 107, 0.05) 0%, rgba(197, 152, 137, 0.08) 100%);
    border-radius: 20px;
    border: 1px solid rgba(156, 115, 107, 0.1);
    animation: slideInLeft 0.8s ease 0.2s backwards;
}

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

.success-avatar {
    position: relative;
    flex-shrink: 0;
}

.success-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.success-avatar-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #f8f9fa;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
    animation: badgeBounce 1s ease infinite;
}

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

.success-avatar-badge i {
    font-size: 1rem;
    color: white;
}

.success-welcome-text {
    text-align: left;
    flex: 1;
}

.success-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.success-username {
    background: linear-gradient(135deg, #9c736b 0%, #c59889 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.success-subtitle {
    font-size: 0.9rem;
    color: #6b6b6b;
    margin: 0;
}

/* Stats Grid */
.success-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    animation: slideInUp 0.8s ease 0.4s backwards;
}

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

.success-stat-card {
    background: white;
    border-radius: 16px;
    padding: 20px 16px;
    border: 2px solid #f0f0f0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.success-stat-card:hover {
    transform: translateY(-4px);
    border-color: #9c736b;
    box-shadow: 0 12px 32px rgba(156, 115, 107, 0.15);
}

.success-stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    transition: all 0.3s ease;
}

.success-stat-card:nth-child(1) .success-stat-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.success-stat-card:nth-child(2) .success-stat-icon {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.success-stat-card:nth-child(3) .success-stat-icon {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.success-stat-card:hover .success-stat-icon {
    transform: scale(1.1) rotate(5deg);
}

.success-stat-content {
    text-align: center;
}

.success-stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1;
    margin-bottom: 4px;
}

.success-stat-label {
    font-size: 0.75rem;
    color: #888;
    font-weight: 500;
}

/* Features Section */
.success-features-section {
    animation: slideInUp 0.8s ease 0.6s backwards;
}

.success-features-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 20px 0;
    text-align: center;
}

.success-features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.success-feature-card {
    background: white;
    border-radius: 16px;
    padding: 24px 20px;
    border: 2px solid #f0f0f0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

.success-feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(156, 115, 107, 0.03) 0%, rgba(197, 152, 137, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.success-feature-card:hover::before {
    opacity: 1;
}

.success-feature-card:hover {
    transform: translateY(-6px);
    border-color: #9c736b;
    box-shadow: 0 16px 40px rgba(156, 115, 107, 0.15);
}

.success-feature-icon-box {
    width: 70px;
    height: 70px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.success-feature-card:nth-child(1) .success-feature-icon-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.success-feature-card:nth-child(2) .success-feature-icon-box {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 10px 30px rgba(245, 87, 108, 0.3);
}

.success-feature-card:nth-child(3) .success-feature-icon-box {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 10px 30px rgba(79, 172, 254, 0.3);
}

.success-feature-card:nth-child(4) .success-feature-icon-box {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    box-shadow: 0 10px 30px rgba(250, 112, 154, 0.3);
}

.success-feature-card:hover .success-feature-icon-box {
    transform: scale(1.1);
}

.success-feature-card:nth-child(1):hover .success-feature-icon-box {
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.5);
}

.success-feature-card:nth-child(2):hover .success-feature-icon-box {
    box-shadow: 0 20px 50px rgba(245, 87, 108, 0.5);
}

.success-feature-card:nth-child(3):hover .success-feature-icon-box {
    box-shadow: 0 20px 50px rgba(79, 172, 254, 0.5);
}

.success-feature-card:nth-child(4):hover .success-feature-icon-box {
    box-shadow: 0 20px 50px rgba(250, 112, 154, 0.5);
}

.success-feature-icon-box i {
    font-size: 2rem;
    color: white;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.2));
    animation: iconFloat 3s ease-in-out infinite;
    transition: all 0.4s ease;
}

.success-feature-card:nth-child(1) .success-feature-icon-box i {
    animation: iconFloat 3s ease-in-out infinite, iconPulse 2s ease-in-out infinite;
    animation-delay: 0s, 0s;
}

.success-feature-card:nth-child(2) .success-feature-icon-box i {
    animation: iconFloat 3.5s ease-in-out infinite, iconPulse 2.5s ease-in-out infinite;
    animation-delay: 0.5s, 0.3s;
}

.success-feature-card:nth-child(3) .success-feature-icon-box i {
    animation: iconFloat 3.2s ease-in-out infinite, iconPulse 2.2s ease-in-out infinite;
    animation-delay: 1s, 0.6s;
}

.success-feature-card:nth-child(4) .success-feature-icon-box i {
    animation: iconFloat 3.8s ease-in-out infinite, iconPulse 2.8s ease-in-out infinite;
    animation-delay: 1.5s, 0.9s;
}

.success-feature-card:hover .success-feature-icon-box i {
    animation: iconBounce 0.6s ease-in-out;
    transform: scale(1.15);
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3)) brightness(1.1);
}

@keyframes iconBounce {
    0% {
        transform: scale(1) translateY(0);
    }
    40% {
        transform: scale(1.2) translateY(-8px);
    }
    60% {
        transform: scale(1.12) translateY(-4px);
    }
    80% {
        transform: scale(1.18) translateY(-6px);
    }
    100% {
        transform: scale(1.15) translateY(-5px);
    }
}

.success-feature-info {
    position: relative;
    z-index: 1;
}

.success-feature-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.success-feature-info p {
    font-size: 0.8rem;
    color: #888;
    margin: 0;
    line-height: 1.5;
}

/* Loading Section */
.success-loading-section {
    margin-top: 8px;
    animation: slideInUp 0.8s ease 0.8s backwards;
}

.success-progress-wrapper {
    position: relative;
    margin-bottom: 12px;
}

.success-progress-bar {
    width: 100%;
    height: 8px;
    background: #e8e8e8;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.success-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #9c736b 0%, #c59889 50%, #9c736b 100%);
    background-size: 200% 100%;
    border-radius: 10px;
    width: 0%;
    animation: progressFill 2.5s ease-out forwards, progressShimmer 1.5s linear infinite;
    box-shadow: 0 2px 8px rgba(156, 115, 107, 0.3);
}

@keyframes progressFill {
    to { width: 100%; }
}

@keyframes progressShimmer {
    to { background-position: 200% 0; }
}

.success-progress-text {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    font-size: 0.7rem;
    font-weight: 700;
    color: #9c736b;
}

.success-loading-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #6b6b6b;
    margin: 0;
}

.spinning-icon {
    animation: spin 1s linear infinite;
}

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

.loading-dots {
    display: inline-flex;
    gap: 2px;
}

.loading-dots span {
    animation: dotBounce 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes dotBounce {
    0%, 80%, 100% {
        opacity: 0;
    }
    40% {
        opacity: 1;
    }
}

/* Hide carousel indicators on desktop */
@media (min-width: 577px) {
    .success-features-carousel-indicators {
        display: none;
    }
}

.success-checkmark {
    width: 120px;
    height: 120px;
    margin: 0 auto 40px;
    position: relative;
}

.success-icon-wrapper {
    width: 120px;
    height: 120px;
    border-radius: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: successFadeIn 0.8s ease;
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
}

@keyframes successFadeIn {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-icon-wrapper::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 33px;
    padding: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.5;
}

.success-icon-wrapper i {
    font-size: 3.5rem;
    color: white;
    animation: iconFadeIn 0.5s ease 0.3s forwards;
    opacity: 0;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

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

.success-message {
    margin-top: 20px;
}

.success-message h2 {
    font-size: 1.8rem;
    color: #1a1a1a;
    margin-bottom: 8px;
    font-weight: 600;
}

.success-message p {
    font-size: 0.95rem;
    color: #6b6b6b;
    line-height: 1.6;
    margin-bottom: 35px;
}

/* User Welcome Section */
.user-welcome {
    text-align: center;
    padding: 40px 0;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.user-profile-pic {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 24px;
    border: 4px solid white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    animation: profileZoomIn 0.6s ease;
}

@keyframes profileZoomIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.user-profile-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-greeting {
    margin-bottom: 40px;
}

.user-greeting h2 {
    font-size: 2.2rem;
    color: #1a1a1a;
    margin-bottom: 8px;
    font-weight: 600;
}

.user-greeting p {
    font-size: 1rem;
    color: #6b6b6b;
}

.user-greeting .user-name {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 40px;
    width: 100%;
    padding: 0 20px;
    scroll-behavior: smooth;
}

.feature-card {
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    border-radius: 16px;
    padding: 24px 16px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid transparent;
    cursor: pointer;
    animation: cardSlideUp 0.6s ease forwards;
    opacity: 0;
    position: relative;
    overflow: visible;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

.feature-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 22px;
    padding: 2px;
    background: linear-gradient(135deg, transparent, transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.feature-card:nth-child(1)::before {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.feature-card:nth-child(2)::before {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.feature-card:nth-child(3)::before {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.feature-card:nth-child(4)::before {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.feature-card:nth-child(1) {
    animation-delay: 0.2s;
}

.feature-card:nth-child(2) {
    animation-delay: 0.35s;
}

.feature-card:nth-child(3) {
    animation-delay: 0.5s;
}

.feature-card:nth-child(4) {
    animation-delay: 0.65s;
}

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

.feature-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.15);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 65px;
    height: 65px;
    margin: 0 auto 16px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    position: relative;
    transition: all 0.4s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.05);
    filter: brightness(1.1) drop-shadow(0 0 20px rgba(255, 255, 255, 0.5));
}

.feature-card:nth-child(1) .feature-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.35);
}

.feature-card:nth-child(2) .feature-icon {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 15px 40px rgba(245, 87, 108, 0.35);
}

.feature-card:nth-child(3) .feature-icon {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 15px 40px rgba(79, 172, 254, 0.35);
}

.feature-card:nth-child(4) .feature-icon {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    box-shadow: 0 15px 40px rgba(250, 112, 154, 0.35);
}

.feature-icon i {
    color: white;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.15));
    animation: iconFloat 3s ease-in-out infinite;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Individual icon animations with different delays for variety */
.feature-card:nth-child(1) .feature-icon i {
    animation: iconFloat 3s ease-in-out infinite, iconPulse 2s ease-in-out infinite;
    animation-delay: 0s, 0s;
}

.feature-card:nth-child(2) .feature-icon i {
    animation: iconFloat 3.5s ease-in-out infinite, iconPulse 2.5s ease-in-out infinite;
    animation-delay: 0.5s, 0.3s;
}

.feature-card:nth-child(3) .feature-icon i {
    animation: iconFloat 3.2s ease-in-out infinite, iconPulse 2.2s ease-in-out infinite;
    animation-delay: 1s, 0.6s;
}

.feature-card:nth-child(4) .feature-icon i {
    animation: iconFloat 3.8s ease-in-out infinite, iconPulse 2.8s ease-in-out infinite;
    animation-delay: 1.5s, 0.9s;
}

/* Hover animations for icons */
.feature-card:hover .feature-icon i {
    animation: iconSpin 0.6s ease-in-out, iconFloat 3s ease-in-out infinite;
    transform: scale(1.15);
}

/* Float animation - gentle up and down movement */
@keyframes iconFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* Pulse animation - subtle scale breathing effect */
@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.08);
    }
}

/* Spin animation on hover - elegant rotation */
@keyframes iconSpin {
    0% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.15);
    }
    100% {
        transform: rotate(360deg) scale(1.15);
    }
}

.feature-card:hover .feature-icon {
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.45);
}

.feature-card:nth-child(2):hover .feature-icon {
    box-shadow: 0 20px 50px rgba(245, 87, 108, 0.45);
}

.feature-card:nth-child(3):hover .feature-icon {
    box-shadow: 0 20px 50px rgba(79, 172, 254, 0.45);
}

.feature-card:nth-child(4):hover .feature-icon {
    box-shadow: 0 20px 50px rgba(250, 112, 154, 0.45);
}

.feature-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.feature-desc {
    font-size: 0.75rem;
    color: #888;
    line-height: 1.5;
}

.success-footer {
    margin-top: auto;
    padding-top: 20px;
    padding-bottom: 10px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    flex-shrink: 0;
}

.success-footer p {
    font-size: 0.85rem;
    color: #999;
    margin: 0;
}

.loading-dots {
    display: inline-flex;
    gap: 5px;
    margin-left: 5px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background: #9c736b;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

.progress-bar-container {
    width: 100%;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    margin-top: 20px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #9c736b 0%, #b08f87 100%);
    width: 0;
    animation: progressBar 2.5s ease-out forwards;
    border-radius: 2px;
}

@keyframes progressBar {
    to {
        width: 100%;
    }
}

/* Button states and animations */
.btn-login {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-login .btn-text {
    position: relative;
    z-index: 2;
    transition: opacity 0.3s ease;
}

.btn-login .btn-slide {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    transition: left 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.btn-login.verifying .btn-text {
    opacity: 0;
}

.btn-login.verifying .btn-slide {
    left: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.btn-login.success .btn-slide {
    left: 0;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.btn-login.success .btn-text {
    opacity: 0;
}

.btn-login.error .btn-slide {
    left: 0;
    background: linear-gradient(135deg, #e57373 0%, #d32f2f 100%);
}

.btn-login.error .btn-text {
    opacity: 0;
}

.btn-slide-content {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-weight: 600;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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

.checkmark-small {
    width: 20px;
    height: 20px;
    position: relative;
}

.checkmark-small::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
    left: 6px;
    top: 2px;
    animation: checkmarkDraw 0.3s ease forwards;
}

@keyframes checkmarkDraw {
    0% {
        height: 0;
    }
    100% {
        height: 12px;
    }
}

/* ========================================
   RESPONSIVE DESIGN - SUCCESS ANIMATION
   ======================================== */

@media (max-width: 992px) {
    .login-wrapper {
        max-width: 480px;
    }

    .login-form-section {
        width: 100%;
        padding: 40px 30px;
    }

    .login-image-section {
        display: none;
    }

    .form-header h1 {
        font-size: 1.8rem;
    }

    .success-animation {
        padding: 30px 20px;
    }

    .success-animation::before {
        top: 12px;
        left: 12px;
        right: 12px;
        bottom: 12px;
    }

    .success-title {
        font-size: 1.4rem;
    }

    .success-stats-grid {
        gap: 12px;
    }

    .success-stat-card {
        padding: 16px 12px;
    }

    .success-stat-value {
        font-size: 1.5rem;
    }

    .success-features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .success-feature-card {
        padding: 20px 16px;
    }

    .success-feature-icon-box {
        width: 65px;
        height: 65px;
    }

    .success-feature-icon-box i {
        font-size: 1.9rem;
    }
}

@media (max-width: 576px) {
    body {
        padding: 15px;
    }

    .login-form-section {
        padding: 30px 25px;
    }

    .form-header h1 {
        font-size: 1.6rem;
    }

    .social-btn {
        width: 50px;
        height: 50px;
    }

    .success-animation {
        padding: 20px 15px;
    }

    .success-animation::before {
        top: 10px;
        left: 10px;
        right: 10px;
        bottom: 10px;
    }

    .success-icon-container {
        width: 80px;
        height: 80px;
        margin-bottom: 16px;
    }

    .success-checkmark-circle {
        width: 80px;
        height: 80px;
    }

    .success-checkmark-circle i {
        font-size: 2.8rem;
    }

    .success-profile-section {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        gap: 16px;
    }

    .success-avatar img {
        width: 70px;
        height: 70px;
    }

    .success-avatar-badge {
        width: 28px;
        height: 28px;
    }

    .success-avatar-badge i {
        font-size: 0.85rem;
    }

    .success-welcome-text {
        text-align: center;
    }

    .success-title {
        font-size: 1.3rem;
    }

    .success-subtitle {
        font-size: 0.85rem;
    }

    .success-stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .success-stat-card {
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
        padding: 14px;
    }

    .success-stat-icon {
        width: 44px;
        height: 44px;
        font-size: 1.4rem;
    }

    .success-stat-content {
        text-align: left;
    }

    .success-stat-value {
        font-size: 1.4rem;
    }

    .success-stat-label {
        font-size: 0.7rem;
    }

    .success-features-title {
        font-size: 1rem;
        margin-bottom: 16px;
    }

    .success-features-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 12px;
        padding: 0 5px 10px 5px;
        grid-template-columns: none;
    }

    .success-features-grid::-webkit-scrollbar {
        display: none;
    }

    .success-feature-card {
        min-width: 280px;
        max-width: 280px;
        scroll-snap-align: center;
        padding: 24px 20px;
        gap: 14px;
        flex-shrink: 0;
    }

    .success-feature-icon-box {
        width: 70px;
        height: 70px;
    }

    .success-feature-icon-box i {
        font-size: 2rem;
    }

    .success-feature-info h4 {
        font-size: 0.95rem;
    }

    .success-feature-info p {
        font-size: 0.8rem;
    }

    .success-features-carousel-indicators {
        display: flex;
        justify-content: center;
        gap: 8px;
        margin-top: 16px;
    }

    .success-carousel-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #d0d0d0;
        transition: all 0.3s ease;
        cursor: pointer;
    }

    .success-carousel-dot.active {
        background: linear-gradient(135deg, #9c736b 0%, #c59889 100%);
        width: 24px;
        border-radius: 4px;
    }

    .success-progress-bar {
        height: 6px;
    }

    .success-progress-text {
        font-size: 0.65rem;
    }

    .success-loading-message {
        font-size: 0.8rem;
    }

    .powered-by-logo {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-top: 20px;
    }

    .powered-by-logo-img {
        max-height: 150px;
        max-width: 150px;
        object-fit: contain;
    }
}

/* Form Container Transitions */
.form-container {
    display: none;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-container.active {
    display: block;
    opacity: 1;
    transform: translateX(0);
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-container.exiting {
    opacity: 0;
    transform: translateX(20px);
}

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

/* Alert Styles */
.alert {
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.3s ease;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert::before {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 18px;
}

.alert-success::before {
    content: '\f058'; /* check-circle */
}

.alert-danger::before {
    content: '\f06a'; /* exclamation-circle */
}

.alert-info::before {
    content: '\f05a'; /* info-circle */
}

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

/* Form Group Styling */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
}

/* Input Field Base */
.input-with-icon {
    position: relative;
    width: 100%;
}

.input-with-icon input {
    width: 100%;
    padding: 12px 44px 12px 44px;
    font-size: 16px;
    border: none;
    border-bottom: 2px solid #E5E7EB;
    background: transparent;
    color: #111827;
    transition: border-color 200ms ease;
}

.input-with-icon input:focus {
    outline: none;
    border-bottom-color: #4F46E5;
}

.input-with-icon input::placeholder {
    color: #9CA3AF;
}

/* Email field readonly state */
.input-with-icon input:read-only {
    color: #6B7280;
    cursor: not-allowed;
    border-bottom-color: #E5E7EB;
    padding-right: 44px; /* Space for edit icon */
}

/* Edit Email Button */
.edit-email-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    display: none;
    align-items: center;
    justify-content: center;
    color: #9CA3AF;
    font-size: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 200ms ease;
}

.edit-email-btn:hover {
    color: #4F46E5;
}

.edit-email-btn.show {
    display: flex;
}

/* Left Icon */
.input-icon-left {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9CA3AF;
    font-size: 18px;
}

/* Right Icon/Button */
.input-icon-right {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9CA3AF;
    font-size: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 200ms ease;
}

.input-icon-right:hover {
    color: #4F46E5;
}

/* Password field specific */
.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 44px;
    border-bottom-color: #D1D5DB;
}

.password-wrapper input:focus {
    border-bottom-color: #4F46E5;
}

.password-toggle-icon {
    position: absolute !important;
    right: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9CA3AF;
    font-size: 18px;
    cursor: pointer;
    transition: color 200ms ease;
}

.password-toggle-icon:hover {
    color: #4F46E5;
}

/* Form Header General */
.form-header {
    margin-bottom: 20px;
}

.form-header h1 {
    margin-bottom: 6px;
}

.form-header p {
    margin-bottom: 20px;
}

/* Welcome Back Header Styling - Per Spec */
.form-header.welcome-back {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    height: 56px;
}

/* Avatar Container */
.welcome-avatar-container {
    position: relative;
    flex-shrink: 0;
}

.welcome-avatar {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
    font-weight: 600;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

/* Fallback gradient for letter avatar */
.welcome-avatar.has-letter {
    background: linear-gradient(135deg, #4F46E5 0%, #9333EA 100%);
}

.welcome-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
}

.welcome-avatar-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 24px;
    height: 24px;
    background: #22C55E;
    border-radius: 50%;
    border: 4px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.welcome-avatar-badge i {
    font-size: 12px;
    color: white;
}

/* Text Content */
.welcome-text-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.welcome-text-content .welcome-greeting {
    font-size: 14px;
    color: #6B7280;
    font-weight: 400;
    margin: 0 0 4px 0;
    line-height: 1;
}

.welcome-text-content h1 {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin: 0;
    line-height: 1;
}

/* Hide only the old subtitle/description, not the greeting */
.welcome-text-content p:not(.welcome-greeting) {
    display: none !important;
}

/* Security Badge */
.security-badge {
    margin-top: 0;
    margin-bottom: 24px;
    padding: 12px;
    background: linear-gradient(135deg, #EEF2FF 0%, #FAF5FF 100%);
    border: 1px solid #E0E7FF;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.security-badge-icon {
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4F46E5;
    font-size: 18px;
    flex-shrink: 0;
}

.security-badge-content {
    flex: 1;
}

.security-badge-title {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin: 0 0 4px 0;
}

.security-badge-subtitle {
    font-size: 14px;
    color: #6B7280;
    margin: 0;
    font-weight: 400;
}

/* Smooth fade in animation */
@keyframes welcomeFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-header.welcome-back {
    animation: welcomeFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Remember Me & Forgot Password Row */
.remember-forgot-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 16px 0;
}

.remember-me-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.remember-me-wrapper input[type="checkbox"] {
    width: 20px;
    height: 20px;
    border: 2px solid #D1D5DB;
    border-radius: 4px;
    cursor: pointer;
    accent-color: #4F46E5;
}

.remember-me-wrapper input[type="checkbox"]:focus {
    outline: 2px solid #4F46E5;
    outline-offset: 0;
}

.remember-me-wrapper label {
    font-size: 14px;
    color: #374151;
    margin: 0;
    cursor: pointer;
    transition: color 200ms ease;
}

.remember-me-wrapper label:hover {
    color: #111827;
}

.recovery-link {
    margin: 0;
    text-align: right;
}

.recovery-link a {
    font-size: 14px;
    color: #4F46E5;
    text-decoration: none;
    transition: color 200ms ease;
    font-weight: 500;
}

.recovery-link a:hover {
    color: #4338CA;
}

/* Switch Account Link */
.switch-account-link {
    text-align: center;
    margin-top: 16px;
}

.switch-account-link a {
    font-size: 14px;
    color: #6B7280;
    text-decoration: none;
    transition: color 200ms ease;
    font-weight: 400;
}

.switch-account-link a:hover {
    color: #4F46E5;
}

/* Submit Button */
.btn-login {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, #4F46E5 0%, #9333EA 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 10px 15px rgba(199, 210, 254, 0.4);
    transition: all 150ms ease;
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
}

.btn-login:hover:not(:disabled) {
    background: linear-gradient(135deg, #4338CA 0%, #7E22CE 100%);
    box-shadow: 0 20px 25px rgba(199, 210, 254, 0.5);
}

.btn-login:disabled {
    opacity: 0.8;
    cursor: not-allowed;
}

.btn-login .btn-text {
    position: relative;
    z-index: 1;
    color: white !important;
    font-weight: 500;
    display: inline-block;
    opacity: 1 !important;
    visibility: visible !important;
}

.btn-login .btn-icon {
    font-size: 20px;
    transition: transform 200ms ease;
    color: white !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.btn-login:hover:not(:disabled) .btn-icon {
    transform: translateX(4px);
}

/* Button Loading State */
.btn-login.loading {
    opacity: 0.9;
    cursor: wait;
}

.btn-login.loading .btn-text {
    color: white !important;
}

/* Button Success State */
.btn-login.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 10px 15px rgba(16, 185, 129, 0.4);
}

.btn-login.success .btn-text,
.btn-login.success .btn-icon {
    color: white !important;
}

/* Button Error State */
.btn-login.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 10px 15px rgba(239, 68, 68, 0.4);
}

.btn-login.error .btn-text,
.btn-login.error .btn-icon {
    color: white !important;
}

/* Spinner */
.btn-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Success Screen - Modern Dashboard Welcome */
.success-animation {
    display: none;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    padding: 0;
    overflow-y: auto;
    background: transparent;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
}

.success-animation.active {
    display: flex;
}

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

.success-container {
    max-width: 700px;
    width: 100%;
    text-align: center;
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border-radius: 32px;
    padding: 40px;
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.2), 
                0 0 0 1px rgba(0, 0, 0, 0.05),
                inset 0 1px 0 0 rgba(255, 255, 255, 0.9),
                0 0 0 3px rgba(99, 102, 241, 0.1),
                0 0 40px rgba(99, 102, 241, 0.15),
                0 15px 35px -10px rgba(99, 102, 241, 0.25),
                0 25px 50px -15px rgba(139, 92, 246, 0.2),
                0 35px 65px -20px rgba(217, 70, 239, 0.15);
    opacity: 0;
    transform: scale(0.3) translateY(20px);
    filter: blur(4px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                filter 0.6s ease,
                box-shadow 0.6s ease;
    position: relative;
    overflow: visible;
    border: 2px solid rgba(99, 102, 241, 0.45);
    background-clip: padding-box;
}

/* Corner accent decorations */
.success-container::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 32px;
    background: 
        linear-gradient(to right, rgba(99, 102, 241, 0.95) 0%, transparent 20%) top left,
        linear-gradient(to bottom, rgba(99, 102, 241, 0.95) 0%, transparent 20%) top left,
        linear-gradient(to left, rgba(139, 92, 246, 0.95) 0%, transparent 20%) top right,
        linear-gradient(to bottom, rgba(139, 92, 246, 0.95) 0%, transparent 20%) top right,
        linear-gradient(to right, rgba(217, 70, 239, 1) 0%, transparent 20%) bottom left,
        linear-gradient(to top, rgba(217, 70, 239, 1) 0%, transparent 20%) bottom left,
        linear-gradient(to left, rgba(251, 146, 60, 1) 0%, transparent 20%) bottom right,
        linear-gradient(to top, rgba(251, 146, 60, 1) 0%, transparent 20%) bottom right;
    background-size: 
        50px 4px, 4px 50px,
        50px 4px, 4px 50px,
        50px 4px, 4px 50px,
        50px 4px, 4px 50px;
    background-repeat: no-repeat;
    background-position: 
        0 0, 0 0,
        100% 0, 100% 0,
        0 100%, 0 100%,
        100% 100%, 100% 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 1;
}

.success-container::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 32px;
    pointer-events: none;
    z-index: -1;
    opacity: 0;
}

.success-animation.active .success-container {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.15), 
                0 0 0 1px rgba(0, 0, 0, 0.05),
                inset 0 1px 0 0 rgba(255, 255, 255, 0.9),
                0 0 0 2px rgba(99, 102, 241, 0.05),
                0 0 20px rgba(99, 102, 241, 0.08),
                0 0 40px rgba(139, 92, 246, 0.05),
                0 15px 35px -8px rgba(99, 102, 241, 0.15),
                0 25px 50px -10px rgba(139, 92, 246, 0.12),
                0 35px 65px -12px rgba(217, 70, 239, 0.1),
                0 45px 80px -15px rgba(251, 146, 60, 0.08),
                0 55px 95px -18px rgba(251, 146, 60, 0.05),
                0 65px 110px -22px rgba(217, 70, 239, 0.03);
}

.success-animation.active .success-container::before {
    opacity: 1;
}

.success-animation.active .success-container::after {
    opacity: 0;
}

/* Avatar with Progress Ring */
.avatar-container {
    display: inline-block;
    position: relative;
    margin-bottom: 24px;
    animation: avatarScale 0.6s ease-out 0.2s both;
    filter: drop-shadow(0 10px 25px rgba(99, 102, 241, 0.15));
}

@keyframes avatarScale {
    from {
        opacity: 0;
        transform: scale(0.7);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.avatar-circle {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: transparent;
    border: 3px solid #22c55e;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    position: relative;
}

/* Fallback gradient for letter avatar */
.avatar-circle.has-letter {
    background: linear-gradient(135deg, #6366f1, #9333ea);
}

.avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.success-badge {
    position: absolute;
    bottom: 8px;
    right: -4px;
    width: 30px;
    height: 30px;
    background: #22c55e;
    border-radius: 50%;
    border: 4px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 16px rgba(34, 197, 94, 0.4), 
                0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 10;
    transform: scale(0) rotate(-180deg);
    opacity: 0;
}

.success-animation.active .success-badge {
    animation: badgeScale 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.8s both;
}

@keyframes badgeScale {
    from {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    to {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.success-badge i {
    font-size: 20px;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Title and Subtitle */
.success-title {
    font-size: 1.85rem;
    font-weight: 800;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    animation: titleFadeIn 0.5s ease-out 0.5s both;
    letter-spacing: -0.02em;
}

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

.success-subtitle {
    color: #6b7280;
    font-size: 0.95rem;
    margin-bottom: 20px;
    animation: subtitleFadeIn 0.5s ease-out 0.6s both;
}

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

/* Session Pills */
.session-pills {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    animation: pillsContainer 0.5s ease-out 0.7s both;
}

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

.session-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    border-radius: 9999px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    font-size: 13px;
    font-weight: 500;
}

.session-pill:first-child {
    border: 1.5px solid rgba(147, 51, 234, 0.2);
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    animation: pillLeft 0.4s ease-out 0.8s both;
}

.session-pill:last-child {
    border: 1.5px solid rgba(34, 197, 94, 0.2);
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    animation: pillRight 0.4s ease-out 0.9s both;
}

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

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

.session-pill:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.session-pill:first-child:hover {
    box-shadow: 0 6px 20px rgba(147, 51, 234, 0.25);
}

.session-pill:last-child:hover {
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.25);
}

.session-pill i {
    font-size: 16px;
}

/* Stats Card */
.stats-card {
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    animation: statsCardFadeIn 0.6s ease-out 0.5s both;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(99, 102, 241, 0.05), 
        transparent);
    transition: left 0.5s ease;
}

.stats-card:hover::before {
    left: 100%;
}

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

.stats-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.2);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-item {
    animation: statFadeIn 0.5s ease-out both;
}

.stat-item:nth-child(1) {
    animation-delay: 0.1s;
}

.stat-item:nth-child(2) {
    animation-delay: 0.2s;
}

.stat-item:nth-child(3) {
    animation-delay: 0.3s;
}

.stat-item:nth-child(4) {
    animation-delay: 0.4s;
}

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

.stat-icon-box {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    transition: all 0.2s ease;
}

.stat-item:nth-child(1) .stat-icon-box {
    background: linear-gradient(135deg, #f3e8ff, #faf5ff);
    animation: iconBoxRotate 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.3s both;
}

.stat-item:nth-child(2) .stat-icon-box {
    background: linear-gradient(135deg, #e0e7ff, #eef2ff);
    animation: iconBoxRotate 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.4s both;
}

.stat-item:nth-child(3) .stat-icon-box {
    background: linear-gradient(135deg, #ede9fe, #f5f3ff);
    animation: iconBoxRotate 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.5s both;
}

.stat-item:nth-child(4) .stat-icon-box {
    background: linear-gradient(135deg, #dbeafe, #eff6ff);
    animation: iconBoxRotate 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.6s both;
}

@keyframes iconBoxRotate {
    from {
        transform: scale(0) rotate(-180deg);
    }
    to {
        transform: scale(1) rotate(0deg);
    }
}

/* Disable rotation animations for actual stats content */
#statsContent .stat-icon-box {
    animation: none !important;
}

#statsContent .stat-icon-box:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

#statsContent .stat-icon-box:active {
    transform: scale(0.95);
}

.stat-icon-box:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.stat-icon-box:active {
    transform: scale(0.95) rotate(5deg);
}

.stat-icon-box i {
    font-size: 26px;
}

.stat-item:nth-child(1) .stat-icon-box i {
    color: #9333ea;
}

.stat-item:nth-child(2) .stat-icon-box i {
    color: #6366f1;
}

.stat-item:nth-child(3) .stat-icon-box i {
    color: #7c3aed;
}

.stat-item:nth-child(4) .stat-icon-box i {
    color: #2563eb;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 2px;
    animation: statValueFadeIn 0.3s ease-out both;
}

.stat-item:nth-child(1) .stat-value {
    animation-delay: 0.5s;
}

.stat-item:nth-child(2) .stat-value {
    animation-delay: 0.6s;
}

.stat-item:nth-child(3) .stat-value {
    animation-delay: 0.7s;
}

.stat-item:nth-child(4) .stat-value {
    animation-delay: 0.8s;
}

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

.stat-label {
    font-size: 0.8rem;
    color: #6b7280;
    animation: statLabelFadeIn 0.3s ease-out both;
}

.stat-item:nth-child(1) .stat-label {
    animation-delay: 0.6s;
}

.stat-item:nth-child(2) .stat-label {
    animation-delay: 0.7s;
}

.stat-item:nth-child(3) .stat-label {
    animation-delay: 0.8s;
}

.stat-item:nth-child(4) .stat-label {
    animation-delay: 0.9s;
}

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

/* Skeleton Loading for Stats */
.stat-item.skeleton {
    pointer-events: none;
}

.skeleton-box {
    background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
    border-radius: 12px;
}

.skeleton-text {
    height: 14px;
    background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
    margin: 0 auto;
}

.skeleton-value {
    height: 20px;
    width: 50px;
    margin-bottom: 4px;
}

.skeleton-label {
    height: 12px;
    width: 80px;
}

.stat-icon-box.skeleton-box i {
    display: none;
}

@keyframes skeletonShimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.stats-loading {
    animation: none !important;
}

.stats-loading .stat-item {
    animation: none !important;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    animation: buttonsFadeIn 0.5s ease-out 0.8s both;
}

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

.btn-success-primary {
    width: 100%;
    max-width: 400px;
    height: 60px;
    padding: 0 36px;
    background: linear-gradient(135deg, #4F46E5 0%, #9333EA 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 15px 30px rgba(99, 102, 241, 0.35),
                0 5px 15px rgba(147, 51, 234, 0.25);
    transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-success-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: left 0.5s ease;
}

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

.btn-success-primary:hover {
    background: linear-gradient(135deg, #4338CA 0%, #7E22CE 100%);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.45),
                0 10px 20px rgba(147, 51, 234, 0.35);
    transform: translateY(-2px);
}

.btn-success-primary:active {
    transform: translateY(0) scale(0.98);
}

.btn-success-primary i {
    font-size: 20px;
    transition: transform 200ms ease;
    animation: arrowPulse 1.5s ease-in-out 0.5s infinite;
}

.btn-success-primary:hover i {
    transform: translateX(4px);
}

@keyframes arrowPulse {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(4px);
    }
}

.btn-success-secondary {
    padding: 16px 32px;
    background: white;
    color: #374151;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-success-secondary:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    background: #f9fafb;
}

.btn-success-secondary:active {
    transform: scale(0.98);
}

/* Countdown Text */
.countdown-text {
    font-size: 13px;
    color: #6b7280;
    margin-top: 0;
    animation: countdownFadeIn 0.5s ease-out 1s both;
}

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

#successCountdown {
    font-weight: 600;
    color: #4f46e5;
}

/* Responsive adjustments for success container */
@media (max-width: 768px) {
    .success-container {
        padding: 24px;
        border-radius: 28px;
    }

    .success-container::after {
        inset: -3px;
        border-radius: 31px;
        padding: 3px;
    }

    .success-container::before {
        height: 5px;
        border-radius: 28px 28px 0 0;
    }

    .success-animation.active .success-container {
        box-shadow: 0 30px 80px -20px rgba(99, 102, 241, 0.25), 
                    0 0 0 1px rgba(0, 0, 0, 0.05),
                    inset 0 1px 0 0 rgba(255, 255, 255, 0.9),
                    0 0 0 3px rgba(99, 102, 241, 0.12),
                    0 0 40px rgba(99, 102, 241, 0.2),
                    0 0 70px rgba(139, 92, 246, 0.12);
    }

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

    .success-subtitle {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .success-animation {
        padding: 16px;
    }

    .success-container {
        padding: 20px;
        border-radius: 24px;
    }

    .success-container::after {
        inset: -2px;
        border-radius: 26px;
        padding: 2px;
    }

    .success-container::before {
        height: 4px;
        border-radius: 24px 24px 0 0;
    }

    .success-animation.active .success-container {
        box-shadow: 0 20px 60px -15px rgba(99, 102, 241, 0.2), 
                    0 0 0 1px rgba(0, 0, 0, 0.05),
                    inset 0 1px 0 0 rgba(255, 255, 255, 0.9),
                    0 0 0 2px rgba(99, 102, 241, 0.1),
                    0 0 30px rgba(99, 102, 241, 0.15),
                    0 0 50px rgba(139, 92, 246, 0.1);
    }

    .success-container {
        background-size: 180px 180px, 180px 180px, 180px 180px, 180px 180px, 100% 100%;
    }

    .avatar-svg {
        width: 120px;
        height: 120px;
    }

    .avatar-circle {
        width: 95px;
        height: 95px;
        font-size: 2rem;
    }

    .success-title {
        font-size: 1.35rem;
    }

    .success-subtitle {
        font-size: 0.85rem;
    }

    .stats-card {
        padding: 16px;
    }

    .stats-grid {
        gap: 12px;
    }

    .stat-icon-box {
        width: 44px;
        height: 44px;
    }

    .stat-icon-box i {
        font-size: 22px;
    }

    .stat-value {
        font-size: 1rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .form-container {
        transform: translateY(-20px);
    }

    .form-container.exiting {
        transform: translateY(20px);
    }

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

    .welcome-text-content h1 {
        font-size: 28px;
    }

    .security-badge {
        padding: 14px;
        margin-bottom: 32px;
    }
}

@media (max-width: 480px) {
    .welcome-text-content h1 {
        font-size: 24px;
    }

    .welcome-text-content .welcome-greeting {
        font-size: 13px;
    }

    .security-badge {
        padding: 12px;
        gap: 10px;
    }

    .security-badge-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .security-badge-title,
    .security-badge-subtitle {
        font-size: 13px;
    }

    .remember-forgot-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .recovery-link {
        text-align: left;
        width: 100%;
    }
}
/* ============================================
   DARK MODE STYLES
   ============================================ */

/* Dark Mode Toggle Button */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.theme-toggle i {
    font-size: 20px;
    color: #667eea;
    transition: all 0.3s ease;
}

.theme-toggle .ph-moon {
    display: none;
}

body.dark-mode .theme-toggle {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .theme-toggle i {
    color: #fbbf24;
}

body.dark-mode .theme-toggle .ph-sun {
    display: none;
}

body.dark-mode .theme-toggle .ph-moon {
    display: block;
}

/* Dark Mode Base Styles */
body.dark-mode {
    background: #0f172a;
}

body.dark-mode .login-wrapper {
    background: #0f172a;
}

body.dark-mode .login-form-section {
    background: #1e293b;
}

body.dark-mode .login-form-section::before {
    background: #1e293b !important;
}

body.dark-mode .form-content {
    background: transparent;
}

body.dark-mode .form-container {
    background: transparent;
}

body.dark-mode #loginFormContainer,
body.dark-mode #forgotPasswordContainer {
    background: transparent;
}

body.dark-mode form {
    background: transparent;
}

/* Dark Mode Text Styles */
body.dark-mode .form-header h1,
body.dark-mode #loginTitle {
    color: rgba(255, 255, 255, 0.95);
}

body.dark-mode .form-header p,
body.dark-mode #loginSubtitle,
body.dark-mode #loginDescription {
    color: rgba(255, 255, 255, 0.7);
}

body.dark-mode .form-group label {
    color: rgba(255, 255, 255, 0.85);
}

/* Dark Mode Form Inputs */
body.dark-mode .form-group input {
    background: #1e293b;
    border-color: #334155;
    color: rgba(255, 255, 255, 0.9);
}

body.dark-mode .form-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

body.dark-mode .form-group input:focus {
    background: #0f172a;
    border-color: #667eea;
}

body.dark-mode .input-icon-left,
body.dark-mode .input-icon-right {
    color: rgba(255, 255, 255, 0.6);
}

body.dark-mode .edit-email-btn {
    background: #0f172a;
    border-color: #334155;
    color: rgba(255, 255, 255, 0.7);
}

body.dark-mode .edit-email-btn:hover {
    background: #1e293b;
    color: rgba(255, 255, 255, 0.9);
}

/* Dark Mode Links and Navigation */
body.dark-mode .remember-me-wrapper label {
    color: rgba(255, 255, 255, 0.8);
}

body.dark-mode .recovery-link a {
    color: #818cf8;
}

body.dark-mode .recovery-link a:hover {
    color: #a5b4fc;
}

body.dark-mode .divider span {
    background: #1e293b;
    color: rgba(255, 255, 255, 0.6);
}

body.dark-mode .divider::before,
body.dark-mode .divider::after {
    background: #334155;
}

/* Dark Mode Alerts */
body.dark-mode .alert {
    background: #1e293b;
    border-color: #334155;
    color: rgba(255, 255, 255, 0.9);
}

body.dark-mode .alert-success {
    background: #064e3b;
    border-color: #065f46;
    color: #6ee7b7;
}

body.dark-mode .alert-danger {
    background: #7f1d1d;
    border-color: #991b1b;
    color: #fca5a5;
}

/* Dark Mode Success Screen */
body.dark-mode .success-container {
    background: #1e293b;
}

body.dark-mode .success-title,
body.dark-mode #successWelcomeTitle {
    color: #ffffff;
}

body.dark-mode .success-subtitle {
    color: rgba(255, 255, 255, 0.6);
}

body.dark-mode #lastLoginPill {
    color: rgba(255, 255, 255, 0.85);
}

body.dark-mode .btn-login .btn-text {
    color: white;
}

body.dark-mode #btnUserName {
    color: white;
}

body.dark-mode .logo-container {
    background: transparent;
}

body.dark-mode .form-header,
body.dark-mode #loginFormHeader {
    background: transparent;
}

body.dark-mode .powered-by-logo {
    filter: brightness(0.9);
}

body.dark-mode .btn-login {
    color: white;
}

body.dark-mode .btn-success-primary {
    color: white;
}

body.dark-mode .btn-success-primary:hover {
    color: white;
}

/* Dark Mode Session Pills and Stats */
body.dark-mode .session-pill {
    background: #0f172a;
    border-color: #334155;
    color: rgba(255, 255, 255, 0.85);
}

body.dark-mode .stats-card {
    background: #0f172a;
    border-color: #334155;
}

body.dark-mode .stat-item {
    background: #1e293b;
}

body.dark-mode .stat-icon-box {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

body.dark-mode .stat-value {
    color: rgba(255, 255, 255, 0.95);
}

body.dark-mode .stat-label {
    color: rgba(255, 255, 255, 0.6);
}

body.dark-mode .countdown-text {
    color: rgba(255, 255, 255, 0.6);
}

body.dark-mode .countdown-text span {
    color: rgba(255, 255, 255, 0.9);
}

/* Dark Mode Skeleton Loading */
body.dark-mode .skeleton-box {
    background: #0f172a;
}

body.dark-mode .skeleton-text {
    background: #0f172a;
}

/* Dark Mode Right Side - No Grey Overlay */
body.dark-mode .login-image-section {
    background: #0f172a;
}

body.dark-mode .illustration-bg {
    opacity: 1;
}

body.dark-mode .illustration-text {
    color: rgba(255, 255, 255, 0.9);
}

body.dark-mode .carousel-dot {
    background: rgba(255, 255, 255, 0.3);
}

body.dark-mode .carousel-dot.active {
    background: rgba(255, 255, 255, 0.8);
}

/* Dark Mode Avatar */
body.dark-mode .avatar-circle {
    background: #0f172a;
    border-color: #334155;
}

body.dark-mode #userAvatarLetter {
    color: rgba(255, 255, 255, 0.9);
}

/* Smooth Transitions for Theme Change */
body,
.login-wrapper,
.login-form-section,
.form-content,
.form-container,
.form-group input,
.success-container,
.stats-card,
.stat-item,
form {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Logo Switching for Light/Dark Mode */
.light-mode-logo {
    display: block;
}

.dark-mode-logo {
    display: none;
}

body.dark-mode .light-mode-logo {
    display: none;
}

body.dark-mode .dark-mode-logo {
    display: block;
}

/* Powered by logo - handle both scenarios */
.powered-by-logo .powered-by-logo-img {
    display: block;
}

.powered-by-logo .dark-mode-logo {
    display: none;
}

body.dark-mode .powered-by-logo .powered-by-logo-img:not(.dark-mode-logo) {
    display: none;
}

body.dark-mode .powered-by-logo .dark-mode-logo {
    display: block;
}

/* Remove success container border/frame in dark mode */
body.dark-mode .success-container {
    border: none !important;
    box-shadow: none !important;
}

body.dark-mode .success-container::before,
body.dark-mode .success-container::after {
    display: none !important;
}

body.dark-mode .success-animation.active .success-container {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3) !important;
}

/* [CONSOLIDATED BELOW] Fix success animation background in dark mode */
/* [CONSOLIDATED BELOW] Ensure welcome text is visible in dark mode */

/* Fix stat items spacing in dark mode */
body.dark-mode .stat-item {
    padding: 1.5rem 1rem;
    min-height: 120px;
}

body.dark-mode .stat-icon-box {
    margin-bottom: 0.75rem;
}

body.dark-mode .stat-value {
    margin-bottom: 0.25rem;
    font-size: 1.5rem;
}

body.dark-mode .stat-label {
    font-size: 0.813rem;
    line-height: 1.4;
}

/* Ensure stat icons are visible */
body.dark-mode .stat-icon-box i {
    color: rgba(255, 255, 255, 0.8);
}

/* [CONSOLIDATED BELOW] All text visibility and container fixes consolidated at end of file */

/* Keep login form section background */
body.dark-mode .login-form-section {
    background: #1e293b !important;
}

/* Session pill improvements */
body.dark-mode .session-pill {
    background: #0f172a !important;
}

/* Ultimate text visibility fix for dark mode - Override gradient text */
body.dark-mode .success-title,
body.dark-mode #successWelcomeTitle,
body.dark-mode h1.success-title {
    color: #ffffff !important;
    font-weight: 700 !important;
    text-shadow: none !important;
    opacity: 1 !important;
    /* Critical: disable gradient text effect */
    -webkit-text-fill-color: #ffffff !important;
    background: none !important;
    background-clip: unset !important;
    -webkit-background-clip: unset !important;
}

body.dark-mode .success-subtitle,
body.dark-mode p.success-subtitle {
    color: #e5e7eb !important;
    font-weight: 500 !important;
    opacity: 1 !important;
    -webkit-text-fill-color: #e5e7eb !important;
    background: none !important;
    background-clip: unset !important;
    -webkit-background-clip: unset !important;
}

/* Smooth success container reveal in dark mode - Match login section */
body.dark-mode .success-animation {
    background: #0f172a !important;
}

body.dark-mode .success-animation.active .success-container {
    animation: smoothRevealDark 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}

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

/* Ensure container is visible during animation - Match parent */
body.dark-mode .success-container {
    background: #1e293b !important;
    opacity: 1;
}

/* Fix session pills text */
body.dark-mode .session-pill span,
body.dark-mode #lastLoginPill {
    color: #f3f4f6 !important;
}
