/* HFL Intel - Split Panel Login v4.0 */
/* Dark theme · Left graphics · Right form · Green node accents */

:root {
    --bg-deep: #050a12;
    --bg-dark: #080e1c;
    --bg-panel: #0c1524;
    --bg-right: #0a1018;
    --bg-card: rgba(10, 18, 32, 0.6);
    --bg-input: rgba(8, 16, 28, 0.85);
    --border: rgba(74, 222, 128, 0.08);
    --border-focus: rgba(74, 222, 128, 0.5);
    --text-white: #eaf2f0;
    --text-primary: #b0c8c0;
    --text-secondary: #5f8878;
    --text-muted: #304840;
    --green: #4ade80;
    --green-dim: #22c55e;
    --green-dark: #166534;
    --green-glow: rgba(74, 222, 128, 0.12);
    --blue-muted: #78b8e6;
    --accent-red: #f87171;
    --radius: 14px;
    --radius-sm: 10px;
    --radius-lg: 20px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html, body {
    height: 100%;
    font-family: var(--font);
    background: var(--bg-deep);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden;
}

/* ═══════════════════════════════════════════════════════
   PAGE LAYOUT — Side-by-side
   ═══════════════════════════════════════════════════════ */

.login-page {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* ═══════════════════════════════════════════════════════
   LEFT PANEL — Dark canvas + graphics + stats
   ═══════════════════════════════════════════════════════ */

.login-panel-left {
    flex: 1 1 55%;
    position: relative;
    background: var(--bg-deep);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Canvas — contained to left panel */
.threat-canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Hex grid subtle overlay */
.cyber-grid-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='52'%3E%3Cpath d='M30 0l30 17.32v34.64L30 69.28 0 51.96V17.32z' fill='none' stroke='%234ade80' stroke-width='0.5'/%3E%3C/svg%3E");
    background-size: 60px 52px;
}

/* Ambient glow — green tones */
.ambient-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    z-index: 1;
    pointer-events: none;
    animation: ambientPulse 10s ease-in-out infinite alternate;
}

.ambient-glow-1 {
    width: 500px; height: 500px;
    top: -100px; left: -80px;
    background: radial-gradient(circle, rgba(74, 222, 128, 0.06), transparent 70%);
}

.ambient-glow-2 {
    width: 400px; height: 400px;
    bottom: -80px; right: -60px;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.05), transparent 70%);
    animation-delay: 5s;
}

.ambient-glow-3 { display: none; }

@keyframes ambientPulse {
    0% { opacity: 0.5; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.1); }
}

/* Scanline — unused */
.scanline-overlay { display: none; }

/* Floating stats — unused in new layout */
.floating-stats { display: none; }
.stat-badge { display: none; }

/* ─── Left panel content ─────────────────────────────── */
.panel-left-content {
    position: relative;
    z-index: 5;
    padding: 48px;
    max-width: 520px;
    animation: fadeInUp 0.9s ease-out;
}

.left-brand {
    margin-bottom: 48px;
}

.left-shield {
    width: 56px; height: 56px;
    background: rgba(74, 222, 128, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.15);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--green);
    margin-bottom: 24px;
    position: relative;
}

.left-shield::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 18px;
    background: radial-gradient(circle, rgba(74, 222, 128, 0.08), transparent 70%);
    z-index: -1;
}

.left-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-white);
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 12px;
}

.left-desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.65;
    font-weight: 400;
    max-width: 380px;
}

/* ─── Stats row (legacy, hidden) ─────────────────────── */
.left-stats {
    display: none;
}

/* ─── Capability cards ───────────────────────────────── */
.left-capabilities {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 32px;
}

.capability-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    background: rgba(74, 222, 128, 0.03);
    border: 1px solid rgba(74, 222, 128, 0.06);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.capability-card:hover {
    background: rgba(74, 222, 128, 0.06);
    border-color: rgba(74, 222, 128, 0.12);
    transform: translateX(4px);
}

.capability-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    background: rgba(74, 222, 128, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.12);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--green);
    margin-top: 1px;
}

.capability-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.capability-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-white);
    letter-spacing: -0.01em;
}

.capability-desc {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.5;
    opacity: 0.85;
}

/* ─── Feature pills ──────────────────────────────────── */
.left-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.feature-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: rgba(74, 222, 128, 0.04);
    border: 1px solid rgba(74, 222, 128, 0.08);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.03em;
}

.pill-dot {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--green);
    opacity: 0.6;
    box-shadow: 0 0 6px rgba(74, 222, 128, 0.4);
}

/* ═══════════════════════════════════════════════════════
   RIGHT PANEL — Dark form panel
   ═══════════════════════════════════════════════════════ */

.login-panel-right {
    flex: 0 0 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 36px;
    position: relative;
    background: var(--bg-right);
    border-left: 1px solid rgba(74, 222, 128, 0.06);
    z-index: 10;
}

/* Subtle left-edge glow */
.login-panel-right::before {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 80px;
    background: linear-gradient(90deg, rgba(74, 222, 128, 0.02), transparent);
    pointer-events: none;
}

/* ─── Login Card ─────────────────────────────────────── */
.login-card {
    width: 100%;
    max-width: 400px;
    animation: cardSlideIn 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ─── Header ─────────────────────────────────────────── */
.login-header {
    margin-bottom: 36px;
    text-align: left;
}

.login-logo-icon {
    width: 48px; height: 48px;
    background: linear-gradient(145deg, var(--green), var(--green-dim));
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #050a12;
    margin-bottom: 20px;
    box-shadow: 0 6px 24px rgba(74, 222, 128, 0.2);
}

/* Keep .login-logo-mobile for backwards compat */
.login-logo-mobile { display: none; }

.login-header h2 {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-white);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.brand-accent {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 6px;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.login-subtitle::after { display: none; }

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

.form-group label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 7px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.form-group label svg {
    color: rgba(74, 222, 128, 0.35);
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid rgba(74, 222, 128, 0.08);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-white);
    font-size: 14px;
    font-family: var(--font);
    transition: all 0.25s ease;
    outline: none;
}

.input-wrapper input:hover {
    border-color: rgba(74, 222, 128, 0.18);
    background: rgba(10, 20, 36, 0.9);
}

.input-wrapper input:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px var(--green-glow);
    background: rgba(12, 24, 40, 0.95);
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.input-focus-ring { display: none; }

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.2s;
    display: flex;
    align-items: center;
}

.password-toggle:hover {
    color: var(--green);
}

.field-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
    padding-left: 2px;
}

/* ─── CAPTCHA ────────────────────────────────────────── */
.captcha-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.captcha-question {
    flex: 1;
    padding: 11px 16px;
    background: rgba(74, 222, 128, 0.04);
    border: 1px solid rgba(74, 222, 128, 0.1);
    border-radius: var(--radius-sm);
    font-size: 18px;
    font-weight: 700;
    color: var(--green);
    text-align: center;
    letter-spacing: 0.06em;
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', monospace;
}

.captcha-loading {
    display: flex;
    align-items: center;
    justify-content: center;
}

.captcha-spinner {
    width: 18px; height: 18px;
    border: 2px solid rgba(74, 222, 128, 0.15);
    border-top-color: var(--green);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.captcha-equals {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-muted);
}

.captcha-input {
    width: 64px;
    padding: 11px 8px;
    border: 1px solid rgba(74, 222, 128, 0.08);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-white);
    font-size: 16px;
    font-weight: 600;
    font-family: var(--font);
    text-align: center;
    transition: all 0.25s ease;
    outline: none;
    -moz-appearance: textfield;
}

.captcha-input::-webkit-inner-spin-button,
.captcha-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.captcha-input:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px var(--green-glow);
}

.captcha-refresh {
    width: 46px; height: 46px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(74, 222, 128, 0.08);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.captcha-refresh:hover {
    border-color: rgba(74, 222, 128, 0.25);
    color: var(--green);
    background: rgba(74, 222, 128, 0.04);
    transform: rotate(180deg);
}

/* ─── Error ──────────────────────────────────────────── */
.login-error {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.15);
    color: #f87171;
    font-size: 13px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.login-error svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--accent-red);
}

/* ─── Button ─────────────────────────────────────────── */
.btn-login {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--green), var(--green-dim));
    color: #050a12;
    font-size: 14px;
    font-weight: 700;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 18px rgba(74, 222, 128, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(74, 222, 128, 0.3);
    filter: brightness(1.06);
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(74, 222, 128, 0.2);
}

.btn-login:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    filter: none !important;
}

.btn-arrow {
    transition: transform 0.2s ease;
}

.btn-login:hover .btn-arrow {
    transform: translateX(3px);
}

.btn-spinner {
    animation: spin 1s linear infinite;
}

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

/* ─── Links ──────────────────────────────────────────── */
.login-links {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
}

.login-link {
    font-size: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 6px;
    transition: all 0.25s;
    border: 1px solid transparent;
}

.login-link:hover {
    color: var(--green);
    background: rgba(74, 222, 128, 0.04);
    border-color: rgba(74, 222, 128, 0.08);
}

.link-divider {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1;
    align-self: center;
}

/* ─── Footer ─────────────────────────────────────────── */
.login-footer {
    margin-top: 32px;
    padding-top: 18px;
    border-top: 1px solid rgba(74, 222, 128, 0.05);
}

.footer-security {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.footer-secured {
    font-size: 10px;
    letter-spacing: 0.04em;
}

.footer-sep {
    opacity: 0.3;
}

.footer-brand-link {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.25s;
}

.footer-brand-link:hover {
    color: var(--green);
}

/* ═══════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════ */

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

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .login-panel-left {
        flex: 1 1 50%;
    }

    .login-panel-right {
        flex: 0 0 440px;
    }

    .panel-left-content {
        padding: 36px;
    }

    .left-title {
        font-size: 24px;
    }

    .capability-card {
        padding: 12px 14px;
    }

    .capability-desc {
        font-size: 10px;
    }
}

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

    .login-panel-left {
        flex: none;
        height: 260px;
        min-height: 260px;
    }

    .panel-left-content {
        padding: 28px;
    }

    .left-brand {
        margin-bottom: 24px;
    }

    .left-title {
        font-size: 20px;
        margin-bottom: 8px;
    }

    .left-desc {
        font-size: 13px;
        display: none;
    }

    .left-capabilities {
        gap: 6px;
        margin-bottom: 16px;
    }

    .capability-card {
        padding: 10px 12px;
        gap: 10px;
    }

    .capability-icon {
        width: 30px;
        height: 30px;
        min-width: 30px;
    }

    .capability-icon svg {
        width: 14px;
        height: 14px;
    }

    .capability-desc {
        display: none;
    }

    .left-features {
        display: none;
    }

    .login-panel-right {
        flex: 1;
        border-left: none;
        border-top: 1px solid rgba(74, 222, 128, 0.06);
        padding: 28px 24px;
    }

    .login-panel-right::before {
        display: none;
    }

    .login-header {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .login-panel-left {
        height: 200px;
        min-height: 200px;
    }

    .panel-left-content {
        padding: 20px;
    }

    .left-shield {
        width: 44px; height: 44px;
        margin-bottom: 14px;
    }

    .left-shield svg {
        width: 24px; height: 24px;
    }

    .left-title {
        font-size: 18px;
    }

    .left-capabilities {
        display: none;
    }

    .login-panel-right {
        padding: 20px 18px;
    }

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

    .login-logo-icon {
        width: 42px; height: 42px;
        margin-bottom: 16px;
    }

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

    .btn-login {
        padding: 13px 20px;
        font-size: 13px;
    }
}
