/* ================================================
   Win by AirOps - Clean White Login Experience
   Minimal, inspirational, and inviting
   ================================================ */

/* AirOps Brand Colors */
:root {
    --auth-forest: #1a3a32;
    --auth-forest-light: #2d5248;
    --auth-forest-dark: #0d2e27;
    --auth-lime: #c6e54d;
    --auth-lime-bright: #d4f050;
    --auth-lime-soft: rgba(198, 229, 77, 0.15);
    --auth-lime-glow: rgba(198, 229, 77, 0.5);
    --auth-teal: #5a9a8a;
    --auth-teal-soft: rgba(90, 154, 138, 0.15);
    --auth-bg: #fafbfc;
    --auth-card-bg: #ffffff;
    --auth-text: #1a1a1a;
    --auth-text-muted: #6b7280;
    --auth-border: rgba(0, 0, 0, 0.08);
}

/* Auth Loading State */
.auth-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--auth-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.auth-loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.auth-loading-logo {
    width: 100px;
    height: 100px;
    animation: authPulse 1.5s ease-in-out infinite;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.1));
}

@keyframes authPulse {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.05) rotate(2deg); }
}

.auth-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--auth-border);
    border-top-color: var(--auth-forest);
    border-radius: 50%;
    animation: authSpin 0.7s linear infinite;
}

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

/* ============================================
   Login Overlay - Clean White
   ============================================ */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--auth-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    overflow: hidden;
}

/* Subtle background pattern */
.login-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(198, 229, 77, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(90, 154, 138, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

/* ============================================
   Login Container - Split Layout
   ============================================ */
.login-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: center;
    gap: 0;
    width: 100%;
    height: 100vh;
    max-width: none;
    animation: fadeIn 0.6s ease-out;
}

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

/* Left side: Login form */
.login-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 0 0 50%;
    padding: 48px;
    background: var(--auth-card-bg);
}

/* Right side: Scrolling questions - Clean white */
.login-right {
    flex: 0 0 50%;
    display: flex;
    flex-direction: column;
    background: #f8f9fa;
    position: relative;
    overflow: hidden;
}

/* Subtle animated gradient background */
.login-right::before {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    top: -25%;
    left: -25%;
    background: 
        radial-gradient(ellipse at 20% 30%, rgba(198, 229, 77, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(90, 154, 138, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(26, 58, 50, 0.03) 0%, transparent 70%);
    animation: rotateBackground 30s linear infinite;
    pointer-events: none;
}

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

/* ============================================
   Brand Section
   ============================================ */
.login-brand {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo {
    width: 100px;
    height: 100px;
    margin-bottom: 20px;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.1));
}

/* Win title with hover expansion to Winifred */
.login-title-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 12px;
}

.login-title {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--auth-forest);
    margin: 0;
    letter-spacing: -0.04em;
    position: relative;
    cursor: default;
}

/* The "ifred" part that appears on hover */
.login-title .title-expand {
    display: inline-block;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-width 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    vertical-align: baseline;
}

.login-title:hover .title-expand {
    max-width: 200px;
    opacity: 1;
}

.login-subtitle {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    color: var(--auth-teal);
    margin: 0;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

/* ============================================
   Login Card
   ============================================ */
.login-card {
    background: var(--auth-card-bg);
    border: 1px solid var(--auth-border);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.login-card-header {
    text-align: center;
    margin-bottom: 28px;
}

.login-card-header h2 {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--auth-text);
    margin: 0 0 8px 0;
}

.login-card-header p {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--auth-text-muted);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

/* ============================================
   Form Elements
   ============================================ */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.login-input-group {
    position: relative;
}

.login-input-group label {
    display: block;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--auth-text);
    margin-bottom: 8px;
}

.login-input-group input {
    width: 100%;
    padding: 16px 18px;
    font-size: 1rem;
    font-family: 'DM Sans', sans-serif;
    color: var(--auth-text);
    background: var(--auth-bg);
    border: 2px solid var(--auth-border);
    border-radius: 12px;
    outline: none;
    transition: all 0.25s ease;
    box-sizing: border-box;
}

.login-input-group input::placeholder {
    color: var(--auth-text-muted);
}

.login-input-group input:focus {
    border-color: var(--auth-forest);
    background: white;
    box-shadow: 0 0 0 4px rgba(26, 58, 50, 0.08);
}

.input-glow {
    display: none;
}

/* ============================================
   Login Button
   ============================================ */
.login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 24px;
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--auth-forest-dark);
    background: var(--auth-lime);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    box-shadow: 0 4px 16px rgba(198, 229, 77, 0.3);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(198, 229, 77, 0.4);
    background: var(--auth-lime-bright);
}

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

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.login-btn .btn-icon {
    transition: transform 0.25s ease;
    font-size: 1.1rem;
}

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

/* ============================================
   Messages
   ============================================ */
.login-message {
    text-align: center;
    padding: 12px;
    border-radius: 10px;
    font-size: 0.875rem;
    margin-top: 10px;
    min-height: 20px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
}

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

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

/* ============================================
   Footer
   ============================================ */
.login-footer {
    margin-top: 16px;
    text-align: center;
}

.login-footer p {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--auth-text-muted);
    font-size: 0.8rem;
    line-height: 1.5;
    margin: 0;
}

/* ============================================
   Scrolling Questions - Right Side
   ============================================ */
/* Full-height showcase */
.questions-showcase {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1;
}

/* Scrolling container - full height */
.questions-scroll-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    z-index: 1;
    padding: 0 24px;
}

/* Fade overlays - white background */
.questions-scroll-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to bottom, #f8f9fa 0%, #f8f9fa 30%, transparent 100%);
    z-index: 2;
    pointer-events: none;
}

.questions-scroll-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, #f8f9fa 0%, #f8f9fa 30%, transparent 100%);
    z-index: 2;
    pointer-events: none;
}

/* The scrolling track */
.questions-track {
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: scrollUp 80s linear infinite;
    padding: 60px 0;
}

@keyframes scrollUp {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-50%);
    }
}

/* Pause on hover */
.questions-scroll-container:hover .questions-track {
    animation-play-state: paused;
}

.questions-scroll-container:hover .scroll-question {
    opacity: 0.6;
}

.questions-scroll-container:hover .scroll-question:hover {
    opacity: 1;
}

/* Individual question card with logo - white bg */
.scroll-question {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    font-family: 'DM Sans', sans-serif;
    padding: 16px 18px;
    background: white;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-question:hover {
    background: white;
    border-color: rgba(26, 58, 50, 0.15);
    transform: translateX(4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.question-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: contain;
    background: #f8f9fa;
    padding: 6px;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.question-content {
    flex: 1;
    min-width: 0;
}

.question-company {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--auth-forest);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
    opacity: 0.6;
}

.question-text {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--auth-text);
    line-height: 1.4;
}

.scroll-question:hover .question-text {
    color: var(--auth-forest);
}

.scroll-question:hover .question-company {
    opacity: 1;
    color: var(--auth-teal);
}

/* ============================================
   OTP / PIN Entry
   ============================================ */
.otp-sent-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: 12px;
    margin-bottom: 8px;
}

.otp-sent-info .otp-icon {
    font-size: 1.3rem;
}

.otp-sent-info p {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0;
    font-size: 0.875rem;
    color: var(--auth-text);
}

.otp-sent-info strong {
    color: var(--auth-forest);
}

.otp-input-container {
    position: relative;
    margin-bottom: 20px;
}

.otp-input {
    width: 100%;
    padding: 18px 24px;
    font-size: 1.6rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: var(--auth-text);
    background: var(--auth-bg);
    border: 2px solid var(--auth-border);
    border-radius: 12px;
    outline: none;
    transition: all 0.25s ease;
    box-sizing: border-box;
    text-align: center;
    letter-spacing: 0.4em;
}

.otp-input::placeholder {
    color: var(--auth-text-muted);
    letter-spacing: 0.4em;
}

.otp-input:focus {
    border-color: var(--auth-forest);
    background: white;
    box-shadow: 0 0 0 4px rgba(26, 58, 50, 0.08);
}

/* ============================================
   Secondary Button
   ============================================ */
.login-btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 18px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--auth-text-muted);
    background: transparent;
    border: 1px solid var(--auth-border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.login-btn-secondary:hover {
    color: var(--auth-text);
    border-color: rgba(0, 0, 0, 0.15);
    background: var(--auth-bg);
}

/* ============================================
   Utilities
   ============================================ */
.spinner-sm {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(26, 58, 50, 0.2);
    border-top-color: var(--auth-forest-dark);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-right: 10px;
}

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

/* ============================================
   Header Elements (when logged in)
   ============================================ */
.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    background: var(--auth-lime-soft);
    border-radius: 12px;
    border: 1px solid rgba(198, 229, 77, 0.3);
}

.user-email {
    font-size: 0.9rem;
    color: var(--auth-forest);
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
}

.btn-logout {
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--auth-forest-light);
    background: transparent;
    border: 1px solid rgba(26, 58, 50, 0.15);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'DM Sans', sans-serif;
}

.btn-logout:hover {
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.3);
    background: rgba(220, 38, 38, 0.08);
}

/* Strategist link */
.strategist-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--auth-forest);
    background: var(--auth-lime-soft);
    border: 1px solid rgba(198, 229, 77, 0.3);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.strategist-link:hover {
    background: rgba(198, 229, 77, 0.25);
    border-color: rgba(198, 229, 77, 0.5);
}

.strategist-icon {
    font-size: 1.1rem;
}

/* Hide old elements */
.login-questions,
.customer-showcase,
.trusted-logos {
    display: none !important;
}

/* When there's no right side (admin page), center the left */
.login-left:only-child {
    flex: 1;
    max-width: 100%;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1000px) {
    .login-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }
    
    .login-left {
        flex: none;
        padding: 40px 24px;
        min-height: 100vh;
    }
    
    .login-right {
        display: none;
    }
}

@media (max-width: 480px) {
    .login-left {
        padding: 32px 20px;
    }
    
    .login-card {
        padding: 28px 24px;
        border-radius: 16px;
    }
    
    .login-title {
        font-size: 2.75rem;
    }
    
    .login-logo {
        width: 80px;
        height: 80px;
    }
    
    .login-card-header h2 {
        font-size: 1.35rem;
    }
    
    .login-input-group input {
        padding: 14px 16px;
    }
    
    .login-btn {
        padding: 14px 20px;
    }
    
    .otp-input {
        font-size: 1.3rem;
        padding: 16px;
        letter-spacing: 0.3em;
    }
}
