/* ===================================
   Whitish Premium Auth Modal (Clean Minimal)
   =================================== */

:root {
    --auth-bg: rgba(255, 255, 255, 0.85);
    --auth-border: rgba(0, 0, 0, 0.06);
    --auth-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    --auth-text-main: #1a1a1a;
    --auth-text-sub: #666666;
    --auth-accent: #4A90E2;
    /* Matches hero-minimal blue */
    --auth-accent-hover: #357abd;
    --auth-input-bg: #f5f5f7;
    --auth-error: #ef4444;
}

/* Modal Overlay */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-modal.active {
    opacity: 1;
    visibility: visible;
}

.auth-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Subtle Animated Background (Optional) */
.auth-modal-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
}

.auth-modal-particles::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(74, 144, 226, 0.1), transparent 70%);
    border-radius: 50%;
    animation: floatBlob 20s infinite alternate;
}

.auth-modal-particles::after {
    content: '';
    position: absolute;
    bottom: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.08), transparent 70%);
    border-radius: 50%;
    animation: floatBlob 25s infinite alternate-reverse;
}

@keyframes floatBlob {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(40px, 40px);
    }
}

/* Modal Container - Clean Card */
.auth-modal-container {
    position: relative;
    width: 100%;
    max-width: 440px;
    margin: 20px;
    background: var(--auth-bg);
    border-radius: 24px;
    border: 1px solid var(--auth-border);
    box-shadow: var(--auth-shadow);
    overflow: hidden;
    transform: translateY(20px) scale(0.98);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10;
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.auth-modal.active .auth-modal-container {
    transform: translateY(0) scale(1);
}

/* Close Button */
.auth-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.04);
    border: none;
    color: var(--auth-text-sub);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s ease;
    z-index: 20;
}

.auth-modal-close:hover {
    background: rgba(0, 0, 0, 0.08);
    color: var(--auth-text-main);
    transform: rotate(90deg);
}

/* Header Section */
.auth-modal-header {
    padding: 40px 40px 10px;
    text-align: center;
}

/* Modern Minimal Logo */
.auth-modal-logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #ffffff, #f0f0f0);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--auth-accent);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.03);
}

.auth-modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--auth-text-main);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.auth-modal-subtitle {
    font-size: 0.95rem;
    color: var(--auth-text-sub);
    margin: 0;
    font-weight: 400;
}

/* Form Container & Animations */
.auth-form-container {
    padding: 32px 40px 40px;
    position: relative;
}

/* Smooth Slide Animations */
.auth-form-container.slide-out-left {
    animation: slideOutLeft 0.3s ease forwards;
}

.auth-form-container.slide-in-right {
    animation: slideInRight 0.4s ease forwards;
}

.auth-form-container.slide-out-right {
    animation: slideOutRight 0.3s ease forwards;
}

.auth-form-container.slide-in-left {
    animation: slideInLeft 0.4s ease forwards;
}

@keyframes slideOutLeft {
    to {
        transform: translateX(-20px);
        opacity: 0;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(20px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    to {
        transform: translateX(20px);
        opacity: 0;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Clean Input Fields */
.auth-input-group {
    margin-bottom: 20px;
    position: relative;
}

.auth-input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--auth-text-main);
    margin-bottom: 8px;
}

.auth-input-wrapper {
    position: relative;
}

.auth-input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    background: var(--auth-input-bg);
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--auth-text-main);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s ease;
    outline: none;
}

.auth-input::placeholder {
    color: #a0a0a0;
}

.auth-input:focus {
    background: #ffffff;
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.1);
}

.auth-input-wrapper i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 16px;
    transition: color 0.2s ease;
    pointer-events: none;
}

.auth-input:focus+i {
    color: var(--auth-accent);
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: var(--auth-text-main);
}

/* Error States */
.auth-error {
    display: none;
    background: rgba(239, 68, 68, 0.08);
    border-left: 3px solid var(--auth-error);
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 8px;
    color: var(--auth-error);
    font-size: 0.9rem;
    font-weight: 500;
    animation: fadeScale 0.3s ease;
}

@keyframes fadeScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Minimalist Button */
.auth-submit-btn {
    width: 100%;
    padding: 16px;
    background: var(--auth-text-main);
    /* Black button for clean contrast */
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.auth-submit-btn:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.auth-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Spinner */
.btn-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e5e5;
}

.auth-divider span {
    font-size: 0.8rem;
    color: #999;
    text-transform: uppercase;
    font-weight: 500;
}

/* Switch Link */
.auth-switch {
    text-align: center;
    margin-top: 20px;
    font-size: 0.95rem;
    color: var(--auth-text-sub);
}

.auth-switch a {
    color: var(--auth-accent);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.auth-switch a:hover {
    color: var(--auth-accent-hover);
    text-decoration: underline;
}

/* ===================================
   Contact Sales Modal - FULL STYLES
   =================================== */
.contact-sales-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.contact-sales-overlay.active {
    opacity: 1;
}

.contact-sales-modal {
    position: relative;
    width: 90%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 28px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 48px 40px;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.12);
    transform: scale(0.9) translateY(20px);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.contact-sales-overlay.active .contact-sales-modal {
    transform: scale(1) translateY(0);
}

.sales-modal-particles {
    display: none;
    /* Hidden for clean look */
}

.sales-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f5f5f5;
    border: none;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.sales-modal-close:hover {
    background: #eee;
    color: #333;
}

.sales-modal-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #FFD700, #FDB931);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    box-shadow: 0 10px 25px rgba(253, 185, 49, 0.25);
}

.contact-sales-modal h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.contact-sales-modal>p {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 24px;
}

.sales-features {
    display: grid;
    gap: 10px;
    margin-bottom: 28px;
    text-align: left;
}

.sales-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #f9fafb;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    color: #333;
    font-size: 0.9rem;
}

.sales-feature i {
    color: #22c55e;
    font-size: 12px;
}

.sales-cta-btn {
    width: 100%;
    padding: 16px 28px;
    background: #1a1a1a;
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.sales-cta-btn:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

/* ===================================
   User Menu & Auth Trigger - FULL STYLES
   =================================== */
.auth-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 100px;
    color: #1a1a1a;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-trigger:hover {
    background: white;
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.user-menu {
    display: none;
    /* Hidden by default, shown via JS */
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border-radius: 100px;
    padding: 4px 4px 4px 4px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4A90E2, #5BA3F5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-info:empty {
    display: none;
}

.premium-badge {
    display: none;
    /* Shown via JS if premium */
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #FFD700, #FDB931);
    border-radius: 100px;
    color: #1a1a1a;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.logout-btn {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    background: #f1f1f1;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 100px;
    color: #1a1a1a;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background: #e5e5e5;
    color: #ef4444;
}

.logout-btn i {
    font-size: 0.75rem;
}

/* ===================================
   Limit Toast - FULL STYLES
   =================================== */
.limit-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    z-index: 10002;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 24px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.limit-toast.active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.limit-toast-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
}

.limit-toast-content h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 2px;
}

.limit-toast-content p {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
}

/* ===================================
   Mobile Responsive
   =================================== */
@media (max-width: 480px) {
    .auth-modal-container {
        margin: 16px;
        border-radius: 20px;
    }

    .auth-modal-header {
        padding: 32px 24px 0;
    }

    .auth-form-container {
        padding: 24px 24px 32px;
    }

    .contact-sales-modal {
        padding: 32px 24px;
    }

    .limit-toast {
        left: 16px;
        right: 16px;
        transform: translateX(0) translateY(100px);
        width: auto;
    }

    .limit-toast.active {
        transform: translateX(0) translateY(0);
    }
}