/*
 * FluenzoAI - Premium Authentication Stylesheet
 * Professional Split-Screen Login Design
 */

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

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f8fafc;
    min-height: 100vh;
    overflow-x: hidden;
}

.hidden {
    display: none !important;
}

/* ==================== AUTH WRAPPER (Split Screen) ==================== */
.auth-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ==================== LEFT SIDE - BRANDING ==================== */
.auth-branding {
    flex: 0 0 45%;
    background: linear-gradient(135deg, #0e7490 0%, #0891b2 50%, #06b6d4 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    overflow: hidden;
}

.branding-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
}

.branding-logo {
    width: 180px;
    height: 180px;
    margin: 0 auto 32px;
    background: #fff;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.2),
        0 0 0 8px rgba(255, 255, 255, 0.15);
    overflow: hidden;
}

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

.branding-tagline {
    position: relative;
    margin-bottom: 50px;
    width: 100%;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
}

.tagline-text {
    font-family: 'Caveat', cursive;
    font-size: 32px;
    font-weight: 600;
    color: transparent;
    letter-spacing: 0.5px;
    white-space: nowrap;
    display: inline-block;
    position: relative;
    background: linear-gradient(
        90deg,
        #fff 0%,
        #fff 35%,
        #fef9c3 45%,
        #fef08a 50%,
        #fef9c3 55%,
        #fff 65%,
        #fff 100%
    );
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 10px rgba(255, 255, 255, 0.4));
    animation: shimmer 3s linear infinite;
    clip-path: inset(0 100% 0 0);
    animation:
        typewriter 8s steps(42) infinite,
        shimmer 3s linear infinite;
}

@keyframes typewriter {
    0%, 5% {
        clip-path: inset(0 100% 0 0);
    }
    45%, 75% {
        clip-path: inset(0 0 0 0);
    }
    95%, 100% {
        clip-path: inset(0 100% 0 0);
    }
}

@keyframes shimmer {
    0% { background-position: 300% 0; }
    100% { background-position: -300% 0; }
}

/* Glitter Particles */
.glitter-particles {
    position: absolute;
    inset: -30px;
    pointer-events: none;
    overflow: visible;
}

.glitter {
    position: absolute;
    width: 5px;
    height: 5px;
    background: #fff;
    border-radius: 50%;
    opacity: 0;
    animation: glitterSparkle 3s ease-in-out infinite;
    box-shadow:
        0 0 4px 1px rgba(255, 255, 255, 0.9),
        0 0 8px 3px rgba(254, 240, 138, 0.7),
        0 0 12px 5px rgba(254, 249, 195, 0.4);
}

.glitter:nth-child(1) { left: 2%; top: 30%; animation-delay: 0s; }
.glitter:nth-child(2) { left: 15%; top: 75%; animation-delay: 0.4s; }
.glitter:nth-child(3) { left: 30%; top: 15%; animation-delay: 0.8s; }
.glitter:nth-child(4) { left: 45%; top: 85%; animation-delay: 1.2s; }
.glitter:nth-child(5) { left: 60%; top: 20%; animation-delay: 1.6s; }
.glitter:nth-child(6) { left: 75%; top: 80%; animation-delay: 2s; }
.glitter:nth-child(7) { left: 88%; top: 25%; animation-delay: 2.4s; }
.glitter:nth-child(8) { left: 98%; top: 65%; animation-delay: 2.8s; }

@keyframes glitterSparkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }
    20% {
        opacity: 1;
        transform: scale(1.2) rotate(90deg);
    }
    50% {
        opacity: 0.8;
        transform: scale(0.8) rotate(180deg);
    }
    80% {
        opacity: 1;
        transform: scale(1) rotate(270deg);
    }
}

.branding-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 280px;
    margin: 0 auto;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateX(8px);
}

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

.feature-icon svg {
    width: 22px;
    height: 22px;
    stroke: #fff;
}

.feature-item span {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

/* Decorative Circles */
.branding-decoration {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.deco-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.deco-1 {
    width: 400px;
    height: 400px;
    top: -100px;
    right: -100px;
    animation: float 20s ease-in-out infinite;
}

.deco-2 {
    width: 300px;
    height: 300px;
    bottom: -80px;
    left: -80px;
    animation: float 25s ease-in-out infinite reverse;
}

.deco-3 {
    width: 200px;
    height: 200px;
    top: 50%;
    left: 10%;
    animation: float 15s ease-in-out infinite;
}

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

/* ==================== RIGHT SIDE - AUTH CONTAINER ==================== */
.auth-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: #fff;
    position: relative;
}

.auth-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(8, 145, 178, 0.03) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}

/* ==================== AUTH CARD ==================== */
.auth-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    z-index: 1;
}

/* Mobile Logo (Hidden on Desktop) */
.auth-logo-mobile {
    display: none;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
}

.auth-logo-mobile img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 8px 24px rgba(8, 145, 178, 0.2);
}

/* ==================== AUTH TABS ==================== */
.auth-tabs {
    display: flex;
    position: relative;
    background: #f1f5f9;
    border-radius: 14px;
    padding: 6px;
    margin-bottom: 32px;
}

.auth-tab {
    flex: 1;
    padding: 14px 24px;
    border: none;
    background: transparent;
    color: #64748b;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.auth-tab:hover:not(.active) {
    color: #334155;
}

.auth-tab.active {
    color: #fff;
}

.tab-indicator {
    position: absolute;
    top: 6px;
    left: 6px;
    width: calc(50% - 6px);
    height: calc(100% - 12px);
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    border-radius: 10px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.3);
    z-index: 1;
}

.auth-tab[data-tab="register"].active ~ .tab-indicator {
    transform: translateX(100%);
}

/* ==================== PANEL HEADER ==================== */
.panel-header {
    margin-bottom: 28px;
}

.panel-header.centered {
    text-align: center;
}

.panel-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.panel-header p {
    font-size: 15px;
    color: #64748b;
    line-height: 1.5;
}

.panel-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(8, 145, 178, 0.15);
}

.panel-icon svg {
    width: 32px;
    height: 32px;
    stroke: #0891b2;
    stroke-width: 1.5;
}

.panel-icon.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(52, 211, 153, 0.1) 100%);
    border-color: rgba(16, 185, 129, 0.15);
}

.panel-icon.success svg {
    stroke: #10b981;
}

/* ==================== FORM PANELS ==================== */
.auth-panel {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.auth-panel.active {
    display: block;
}

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

/* ==================== FORM ELEMENTS ==================== */
.auth-form .form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}

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

.input-icon {
    position: absolute;
    left: 16px;
    width: 20px;
    height: 20px;
    stroke: #94a3b8;
    pointer-events: none;
    transition: stroke 0.3s ease;
}

.form-input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: #0f172a;
    transition: all 0.3s ease;
}

.form-input::placeholder {
    color: #94a3b8;
}

.form-input:hover {
    border-color: #cbd5e1;
}

.form-input:focus {
    outline: none;
    border-color: #0891b2;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.1);
}

.form-input:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
    stroke: #0891b2;
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle svg {
    width: 20px;
    height: 20px;
    stroke: #94a3b8;
    transition: stroke 0.3s ease;
}

.password-toggle:hover svg {
    stroke: #64748b;
}

/* ==================== FORM OPTIONS (Remember Me + Forgot) ==================== */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

/* Custom Checkbox */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.checkbox-wrapper input {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-wrapper input:checked + .checkmark {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    border-color: transparent;
}

.checkbox-wrapper input:checked + .checkmark::after {
    content: '';
    width: 6px;
    height: 10px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translateY(-1px);
}

.checkbox-label {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

.forgot-link {
    font-size: 14px;
    font-weight: 600;
    color: #0891b2;
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: #0e7490;
    text-decoration: underline;
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 28px;
    border: none;
    border-radius: 12px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(8, 145, 178, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(8, 145, 178, 0.4);
}

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

.btn-primary svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

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

.btn-full {
    width: 100%;
}

/* ==================== BACK BUTTON ==================== */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: #64748b;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 10px 16px;
    margin: -10px -16px 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: #f1f5f9;
    color: #0891b2;
}

.back-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.back-btn:hover svg {
    transform: translateX(-4px);
}

/* ==================== OTP INPUT ==================== */
.otp-input-group {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 28px;
}

.otp-input-single {
    width: 54px;
    height: 64px;
    text-align: center;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #0891b2;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    transition: all 0.3s ease;
}

.otp-input-single:hover {
    border-color: #cbd5e1;
}

.otp-input-single:focus {
    outline: none;
    border-color: #0891b2;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.1);
}

/* ==================== RESEND SECTION ==================== */
.resend-section {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: #64748b;
}

.resend-section a {
    color: #0891b2;
    font-weight: 600;
    text-decoration: none;
    margin-left: 4px;
}

.resend-section a:hover {
    text-decoration: underline;
}

/* ==================== ALERTS ==================== */
.alert {
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 24px;
    display: none;
    animation: fadeIn 0.3s ease;
}

.alert.show {
    display: block;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #059669;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

/* ==================== AUTH FOOTER ==================== */
.auth-footer {
    margin-top: 40px;
    text-align: center;
}

.auth-footer p {
    font-size: 13px;
    color: #94a3b8;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .auth-branding {
        flex: 0 0 40%;
        padding: 40px;
    }

    .branding-title {
        font-size: 36px;
    }

    .branding-tagline {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .auth-wrapper {
        flex-direction: column;
    }

    .auth-branding {
        display: none;
    }

    .auth-container {
        padding: 24px;
        min-height: 100vh;
    }

    .auth-logo-mobile {
        display: flex;
    }

    .auth-card {
        max-width: 100%;
    }

    .panel-header h2 {
        font-size: 24px;
    }

    .otp-input-group {
        gap: 8px;
    }

    .otp-input-single {
        width: 46px;
        height: 56px;
        font-size: 20px;
    }
}

@media (max-width: 400px) {
    .auth-container {
        padding: 20px;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .otp-input-single {
        width: 40px;
        height: 50px;
        font-size: 18px;
        border-radius: 10px;
    }

    .auth-tabs {
        padding: 4px;
    }

    .auth-tab {
        padding: 12px 16px;
        font-size: 14px;
    }
}

/* ==================== ANIMATION CLASSES ==================== */
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

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

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

.btn.loading span {
    visibility: hidden;
}

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

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