/* ═══════════════════════════════════════════════════════
   CampBot — Login Page Styles
   Joorbin-inspired dark split layout with warm accents
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-primary: #000000;
    --bg-panel: rgba(12, 12, 20, 0.95);
    --bg-input: rgba(30, 30, 50, 0.6);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(255, 160, 40, 0.5);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --text-muted: rgba(255, 255, 255, 0.35);
    --accent-warm: #ffa028;
    --accent-orange: #ff6e1a;
    --accent-amber: rgba(255, 160, 40, 0.15);
    --glow-warm: rgba(255, 160, 40, 0.12);
    --glow-red: rgba(255, 80, 60, 0.08);
    --error: #ff4444;
    --success: #22c55e;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* ── Split Layout ──────────────────────────────────── */
.login-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Left Panel — Branding + Image + Lantern */
.login-left {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--bg-primary);
}

.login-left canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.login-image-wrapper {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

.login-image-wrapper img {
    display: block;
    height: auto;
    border-radius: 16px;
}

/* ── Ambient glows on left panel ─────────────────── */
.ambient-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    z-index: 0;
    animation: glowPulse 8s ease-in-out infinite alternate;
}

.glow-1 {
    width: 300px;
    height: 300px;
    background: rgba(255, 120, 20, 0.15);
    top: 10%;
    left: 5%;
}

.glow-2 {
    width: 250px;
    height: 250px;
    background: rgba(255, 60, 30, 0.1);
    bottom: 15%;
    right: 20%;
    animation-delay: -3s;
}

.glow-3 {
    width: 200px;
    height: 200px;
    background: rgba(255, 180, 60, 0.08);
    bottom: 30%;
    left: 30%;
    animation-delay: -5s;
}

@keyframes glowPulse {
    0% { transform: scale(1); opacity: 0.3; }
    100% { transform: scale(1.2); opacity: 0.6; }
}

/* Right Panel — Login Form */
.login-right {
    width: 420px;
    min-width: 360px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 40px;
    background: var(--bg-panel);
    border-left: 1px solid var(--border-subtle);
    backdrop-filter: blur(20px);
    overflow-y: auto;
}

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

.login-logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    display: block;
    object-fit: contain;
}

.login-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 6px;
}

.login-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ── Form Styles ──────────────────────────────────── */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    transition: all 0.3s ease;
    outline: none;
}

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

.form-group input:focus {
    border-color: var(--border-focus);
    background: rgba(30, 30, 50, 0.8);
    box-shadow: 0 0 0 3px var(--accent-amber);
}

.form-group input:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

/* ── Button ──────────────────────────────────────── */
.btn-login {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, var(--accent-warm), var(--accent-orange));
    color: #000;
    margin-top: 8px;
    position: relative;
    overflow: hidden;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(255, 160, 40, 0.35);
}

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

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

.btn-login .spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0,0,0,0.2);
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin: 0 auto;
}

.btn-login.loading .btn-text { display: none; }
.btn-login.loading .spinner { display: block; }

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

/* ── Links ─────────────────────────────────────────── */
.form-footer {
    text-align: center;
    margin-top: 24px;
}

.form-footer a {
    color: var(--accent-warm);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.form-footer a:hover {
    color: var(--accent-orange);
    text-decoration: underline;
}

/* ── Error / Success Messages ──────────────────────── */
.message {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
    display: none;
    animation: fadeIn 0.3s ease;
}

.message.error {
    display: block;
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    color: var(--error);
}

.message.success {
    display: block;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: var(--success);
}

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

/* ── Forgot Password View ────────────────────────── */
.view { display: none; }
.view.active { display: block; }

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 768px) {
    body {
        overflow-y: auto;
        height: auto;
    }

    .login-container {
        flex-direction: column;
        min-height: 100vh;
        height: auto;
    }

    .login-left {
        height: auto;
        min-height: unset;
        flex: 0 0 auto;
    }

    /* Hero image: full width, maintain ratio */
    .login-image-wrapper {
        width: 100%;
        padding: 0;
    }

    .login-image-wrapper img {
        width: 100%;
        max-width: 100%;
        border-radius: 0;
    }

    /* Hide the round logo on mobile */
    .login-logo {
        display: none;
    }

    /* Compact the form panel */
    .login-right {
        width: 100%;
        min-width: unset;
        flex: 1;
        padding: 24px 24px 32px;
        border-left: none;
        border-top: none;
        justify-content: flex-start;
    }

    .login-header {
        margin-bottom: 20px;
    }

    .login-header h1 {
        font-size: 24px;
        margin-bottom: 4px;
    }

    .login-header p {
        font-size: 13px;
    }

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

    .form-group input {
        padding: 12px 14px;
        font-size: 14px;
    }

    .btn-login {
        padding: 12px;
        font-size: 15px;
        margin-top: 4px;
    }

    .form-footer {
        margin-top: 16px;
    }

    /* Hide ambient glow on mobile to reduce visual noise */
    .ambient-glow {
        display: none;
    }

    /* Hide lantern canvas on mobile */
    .login-left canvas {
        display: none;
    }
}

@media (max-width: 480px) {
    .login-right {
        padding: 20px 16px 28px;
    }

    .login-header h1 {
        font-size: 22px;
    }

    .form-group input {
        padding: 11px 12px;
    }
}

