:root {
    --bg-color: #0d1117;
    --card-bg: rgba(22, 28, 45, 0.7);
    --accent-color: #7c4dff; /* Deep Purple */
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --success: #2ea043;
    --danger: #f85149;
    --warning: #d29922;
    --glass-border: rgba(255, 255, 255, 0.1);
    --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --neon-glow: 0 0 20px rgba(124, 77, 255, 0.3);
}

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

body {
    background: radial-gradient(circle at top right, #161b22, #0d1117);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.01em;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.05);
}

.nav-link.active {
    color: var(--accent-color);
    background: rgba(124, 77, 255, 0.1);
    border: 1px solid rgba(124, 77, 255, 0.2);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    font-size: 2rem;
}

h1 {
    font-weight: 700;
    letter-spacing: -1px;
}

h1 span {
    color: var(--accent-color);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--card-bg);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

nav {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.nav-controls {
    display: flex;
    align-items: center;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid var(--glass-border);
}

.user-badge {
    background: rgba(124, 77, 255, 0.15);
    color: var(--accent-color);
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border: 1px solid rgba(124, 77, 255, 0.3);
}

.logout-icon-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.logout-icon-btn:hover {
    color: var(--danger);
    background: rgba(248, 81, 73, 0.1);
}

.heartbeats {
    display: flex;
    gap: 1rem;
}

.hb-item {
    font-size: 0.7rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.6rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    border: 1px solid transparent;
    transition: all 0.3s;
}

.hb-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
}

.hb-item strong {
    color: var(--text-primary);
    font-weight: 600;
}

.hb-time {
    color: var(--accent-color);
    font-family: monospace;
    opacity: 0.8;
}

.hb-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-secondary);
    transition: background 0.3s;
}

.hb-item.healthy .hb-dot { background: var(--success); box-shadow: 0 0 5px var(--success); }
.hb-item.stale .hb-dot { background: var(--warning); }
.hb-item.dead .hb-dot { background: var(--danger); }

/* Vertical heartbeat layout for cards */
.heartbeats-column {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin: 0.75rem 0;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 8px;
}

.heartbeats-column::-webkit-scrollbar {
    width: 4px;
}

.heartbeats-column::-webkit-scrollbar-thumb {
    background: rgba(124, 77, 255, 0.2);
    border-radius: 10px;
}

.heartbeats-column .hb-item {
    justify-content: space-between;
    width: 100%;
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.05);
}

.heartbeats-column .hb-time {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

.pulse {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.legend-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 10px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 1.25rem;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px);
    box-shadow: var(--card-shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: 0.5s;
}

.stat-card:hover::before {
    left: 100%;
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px -15px rgba(0, 0, 0, 0.7);
    border-color: rgba(99, 102, 241, 0.5);
}

.stat-card h3 {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.delta {
    font-size: 0.9rem;
    font-weight: 600;
}

.delta.up, .up { color: var(--success); }
.delta.down, .down { color: var(--danger); }

.card {
    background: var(--card-bg);
    border-radius: 1rem;
    border: 1px solid var(--glass-border);
    margin-bottom: 2rem;
    overflow: hidden;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.card-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
}

.chart-container {
    padding: 1.5rem;
    height: 400px;
}

.table-container {
    max-height: 400px;
    overflow-y: auto;
}

thead th.sortable {
    cursor: pointer;
    position: relative;
    user-select: none;
    transition: background 0.2s, color 0.2s;
}

thead th.sortable:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

thead th.sortable::after {
    content: '↕';
    position: absolute;
    right: 8px;
    opacity: 0.2;
    font-size: 0.8em;
}

thead th.sortable.asc::after {
    content: '↑';
    opacity: 1;
    color: var(--accent-color);
}

thead th.sortable.desc::after {
    content: '↓';
    opacity: 1;
    color: var(--accent-color);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 1rem 1.5rem;
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--glass-border);
}

td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.9rem;
}

tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-buy { background: rgba(16, 185, 129, 0.2); color: var(--success); }
.badge-sell { background: rgba(239, 68, 68, 0.2); color: var(--danger); }

.hidden { display: none !important; }

.insights-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 2rem;
}

.insight-item {
    text-align: center;
}

.insight-item .label {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.insight-item .value {
    font-size: 1.75rem;
    font-weight: 700;
}

.insight-item .distance {
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

.highlight-up .value { color: var(--success); }
.highlight-down .value { color: var(--danger); }

.progress-container {
    padding: 0 2rem 2rem;
}

.progress-bar.ghost {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    transition: width 0.5s ease;
}

.progress-fill.tp { background: linear-gradient(90deg, var(--accent-color), var(--success)); }

.progress-labels {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
}

.scanner-section {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0) 100%);
    border: 1px solid rgba(255, 230, 0, 0.1);
}

.scanner-section .card-body {
    max-height: 480px;
    overflow-y: auto;
    padding-right: 5px;
}

/* Custom scrollbar for scanner */
.scanner-section .card-body::-webkit-scrollbar {
    width: 4px;
}
.scanner-section .card-body::-webkit-scrollbar-thumb {
    background: rgba(255, 230, 0, 0.2);
    border-radius: 10px;
}

.scanner-section .card-header h2::after {
    content: ' 🔥';
}

.insight-item .sub-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 4px;
    opacity: 0.8;
}

.badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-blue {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.chart-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.range-selector {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px;
    border-radius: 6px;
}

.range-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    transition: 0.2s;
}

.range-btn:hover {
    color: var(--text-primary);
}

.range-btn.active {
    background: var(--accent-color);
    color: white;
}

.btn-secondary.small {
    padding: 4px 10px;
    font-size: 0.75rem;
}
.badge-buy { background: rgba(0, 255, 136, 0.1); color: var(--success); border: 1px solid rgba(0, 255, 136, 0.2); }
.badge-sell { background: rgba(255, 68, 68, 0.1); color: var(--danger); border: 1px solid rgba(255, 68, 68, 0.2); }
.badge-neutral { background: rgba(148, 163, 184, 0.1); color: #94a3b8; border: 1px solid rgba(148, 163, 184, 0.2); }

/* Market Regime Speedometer */
.regime-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    position: relative;
}

.regime-gauge-bg {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 5px;
}

.regime-gauge-fill {
    height: 100%;
    width: 50%;
    background: var(--accent-color);
    transition: all 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 10px rgba(124, 77, 255, 0.3);
}

#regime-badge {
    display: inline-block;
    margin-top: 4px;
    font-size: 0.65rem;
}

/* Activity Logs */
.logs-container {
    max-height: 300px;
    overflow-y: auto;
    padding: 1rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.log-entry {
    line-height: 1.4;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    padding-bottom: 2px;
}

.log-ts { color: var(--text-secondary); margin-right: 8px; }
.log-level { font-weight: 700; margin-right: 8px; width: 80px; display: inline-block; }
.log-msg { color: var(--text-primary); }

.log-ERROR .log-level { color: var(--danger); }
.log-WARNING .log-level { color: var(--warning); }
.log-SUCCESS .log-level { color: var(--success); }
.log-TRADE_BUY .log-level { color: #10b981; }
.log-TRADE_SELL .log-level { color: #f43f5e; }
.log-STARTUP .log-level { color: var(--accent-color); }

.logs-section .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.search-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    padding: 6px 12px;
    color: var(--text-primary);
    font-size: 0.8rem;
    outline: none;
    transition: all 0.3s;
    min-width: 150px;
}

.search-input:focus {
    border-color: var(--accent-color);
    background: rgba(124, 77, 255, 0.05);
    box-shadow: 0 0 10px rgba(124, 77, 255, 0.2);
}

/* Danger Zone & Emergency Buttons */
.danger-zone {
    border: 1px dashed rgba(248, 81, 73, 0.3);
    background: rgba(248, 81, 73, 0.05);
    padding: 1.25rem;
    border-radius: 12px;
    margin: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.danger-text h4 {
    color: var(--danger);
    font-size: 1rem;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.danger-text p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.btn-danger {
    background: var(--danger);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    font-size: 0.85rem;
    box-shadow: 0 4px 14px 0 rgba(248, 81, 73, 0.3);
}

.btn-danger:hover {
    background: #ff6b66;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(248, 81, 73, 0.4);
}

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

.btn-emergency-sell {
    background: rgba(248, 81, 73, 0.1);
    color: var(--danger);
    border: 1px solid rgba(248, 81, 73, 0.2);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Modal System */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.3s ease;
}

.modal-content {
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    animation: modalSlide 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal-header {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
}

.modal-title-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.close-modal {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: 2rem;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2rem;
    overflow-y: auto;
}

.modal-chart-container {
    height: 400px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 1rem;
}

.audit-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.audit-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.audit-item .label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.audit-item .value {
    font-weight: 700;
    font-size: 1.1rem;
}

.status-pass { border-left-color: var(--success); color: var(--success); }
.status-fail { border-left-color: var(--danger); color: var(--danger); }

.audit-thresholds {
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
}

.audit-thresholds h4 {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.7;
}

#audit-thresholds-list div {
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
}

/* Row interaction */
tbody tr {
    cursor: pointer;
}

.hover-price-fade {
    font-family: monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-left: 2rem;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform: translateX(-10px);
}

.hover-price-fade.active {
    opacity: 1;
    transform: translateX(0);
}

/* --- GAUNTLET TELEMETRY SECTION --- */
.gauntlet-card {
    min-height: 250px;
    display: flex;
    flex-direction: column;
}

.funnel-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 5px;
}

.funnel-step {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.step-label {
    width: 100px;
    white-space: nowrap;
}

.step-bar {
    flex-grow: 1;
    height: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.step-bar .fill {
    height: 100%;
    background: var(--accent-color);
    width: 0%;
    transition: width 1s ease-in-out;
    box-shadow: 0 0 10px rgba(124, 77, 255, 0.3);
}

.funnel-step[data-step="sieve"] .fill { background: #3b82f6; } /* Blue */
.funnel-step[data-step="analytical"] .fill { background: #a855f7; } /* Purple */
.funnel-step[data-step="behavioral"] .fill { background: #ec4899; } /* Pink */
.funnel-step[data-step="execution"] .fill { background: #eab308; } /* Gold */

.step-count {
    width: 40px;
    text-align: right;
    font-weight: 700;
    color: var(--text-primary);
}

.gauntlet-drops {
    margin-top: -1rem; /* Tighten layout */
}

.small-table table th, .small-table table td {
    padding: 0.6rem 1.25rem;
    font-size: 0.8rem;
}

/* Failure Reason Badge Colors */
.badge-low-mom { background: rgba(249, 115, 22, 0.2); color: #fb923c; border: 1px solid rgba(249, 115, 22, 0.3); }
.badge-low-vol { background: rgba(234, 179, 8, 0.2); color: #facc15; border: 1px solid rgba(234, 179, 8, 0.3); }
.badge-weak { background: rgba(148, 163, 184, 0.2); color: #94a3b8; border: 1px solid rgba(148, 163, 184, 0.3); }
.badge-exhaustion { background: rgba(236, 72, 153, 0.2); color: #f472b6; border: 1px solid rgba(236, 72, 153, 0.3); }
.badge-spoof { background: rgba(20, 184, 166, 0.2); color: #2dd4bf; border: 1px solid rgba(20, 184, 166, 0.3); }
.badge-liquidity { background: rgba(220, 38, 38, 0.2); color: #f87171; border: 1px solid rgba(220, 38, 38, 0.3); }
.badge-funds { background: rgba(37, 99, 235, 0.2); color: #60a5fa; border: 1px solid rgba(37, 99, 235, 0.3); }
.badge-full { background: rgba(79, 70, 229, 0.2); color: #818cf8; border: 1px solid rgba(79, 70, 229, 0.3); }

.active-shadow-row {
    background: rgba(59, 130, 246, 0.03) !important;
}
.active-shadow-row:hover {
    background: rgba(59, 130, 246, 0.08) !important;
}

/* --- LOGIN OVERLAY --- */
.login-overlay {
    position: fixed;
    inset: 0;
    background: rgba(6, 8, 14, 0.92);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.login-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.login-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 380px;
    backdrop-filter: blur(24px);
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.6), var(--neon-glow);
    animation: modalSlide 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-card .login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-card .login-logo .logo-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
}

.login-card .login-logo h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.login-card .login-logo h2 span {
    color: var(--accent-color);
}

.login-card .login-logo p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.login-field {
    margin-bottom: 1.25rem;
}

.login-field label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    font-weight: 500;
}

.login-field input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: 'Outfit', sans-serif;
    outline: none;
    transition: all 0.3s ease;
}

.login-field input:focus {
    border-color: var(--accent-color);
    background: rgba(124, 77, 255, 0.04);
    box-shadow: 0 0 15px rgba(124, 77, 255, 0.15);
}

.login-field input::placeholder {
    color: rgba(255, 255, 255, 0.15);
}

.login-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-color), #6366f1);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0.85rem;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(124, 77, 255, 0.35);
}

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

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

.login-error {
    color: var(--danger);
    font-size: 0.8rem;
    text-align: center;
    margin-top: 1rem;
    min-height: 1.2rem;
    font-weight: 500;
    transition: opacity 0.3s;
}

@keyframes loginShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

.login-card.shake {
    animation: loginShake 0.5s ease;
}

/* --- CSV Export Button --- */
.btn-export {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    font-family: 'Outfit', sans-serif;
}

.btn-export:hover {
    background: rgba(124, 77, 255, 0.12);
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-1px);
}

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

/* --- Scroll Sentinel for Lazy Loading --- */
.scroll-sentinel {
    height: 10px;
    width: 100%;
}

