/* VANTAGE QUANTUM - Premium Trading Dashboard v3.0 */
/* Glassmorphic, Neon, and Ultra-Premium Design */

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

:root {
    /* Premium Color Palette */
    --bg-deep: #0a0a0f;
    --bg-primary: #0d0d15;
    --bg-secondary: #12121c;
    --bg-elevated: rgba(20, 20, 32, 0.8);
    --bg-glass: rgba(25, 25, 45, 0.4);

    /* Neon Accent Colors */
    --neon-green: #00ff9d;
    --neon-blue: #00d4ff;
    --neon-purple: #bd00ff;
    --neon-red: #ff3b5c;
    --neon-orange: #ff9500;
    --neon-pink: #ff006e;

    /* Gradient Presets */
    --gradient-primary: linear-gradient(135deg, #00ff9d 0%, #00d4ff 50%, #bd00ff 100%);
    --gradient-bullish: linear-gradient(135deg, #00ff9d, #00d4ff);
    --gradient-bearish: linear-gradient(135deg, #ff3b5c, #bd00ff);
    --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.02) 100%);

    /* Text */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --text-muted: rgba(255, 255, 255, 0.35);

    /* Border & Shadows */
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(0, 255, 157, 0.3);
    --shadow-glow: 0 0 40px rgba(0, 255, 157, 0.15);

    /* Typography */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;

    /* Spacing */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* === GLOBAL STYLES === */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: var(--font-main);
    background: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.5;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(0, 255, 157, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(189, 0, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(0, 212, 255, 0.05) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--neon-green), var(--neon-blue));
}

.app-container {
    display: flex;
    height: 100vh;
    position: relative;
    z-index: 1;
}

.sidebar {
    width: 320px;
    min-width: 320px;
    height: 100vh;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed {
    width: 0;
    min-width: 0;
    padding: 0;
    border-right: none;
    opacity: 0;
}

.brand {
    padding: 28px 24px;
    border-bottom: 1px solid var(--border-color);
}

.logo-glitch {
    font-family: var(--font-mono);
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.version {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.doctrine-quote {
    padding: 16px;
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-bottom: 1px solid var(--border-color);
}

.log-feed {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    line-height: 1.8;
    background: rgba(0, 0, 0, 0.2);
}

.log-entry {
    padding: 8px 12px;
    margin-bottom: 4px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
    border-left: 2px solid var(--border-color);
    opacity: 0.8;
}

.log-entry:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.04);
}

.log-entry.success {
    border-left-color: var(--neon-green);
    background: rgba(0, 255, 157, 0.05);
}


.log-entry.error {
    border-left-color: var(--neon-red);
    background: rgba(255, 59, 92, 0.05);
}

.log-entry.warning {
    border-left-color: var(--neon-orange);
    background: rgba(255, 149, 0, 0.05);
}

.log-time {
    color: var(--text-muted);
    margin-right: 8px;
}

.log-type {
    color: var(--neon-blue);
    font-weight: 600;
    margin-right: 8px;
}

/* === MAIN DASHBOARD === */
.dashboard {
    flex: 1;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 24px 28px;
    gap: 20px;
}

/* === SPLIT LAYOUT === */
.dashboard-split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.dashboard-split-layout.uneven {
    grid-template-columns: 0.7fr 1.3fr;
}

@media (max-width: 900px) {
    .dashboard-split-layout {
        grid-template-columns: 1fr;
    }
}

/* === TABS NAVIGATION === */
.tabs-nav {
    display: flex;
    gap: 8px;
    padding: 6px;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.tab-btn {
    padding: 12px 24px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.tab-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.tab-btn.active {
    color: var(--bg-deep);
    background: var(--gradient-primary);
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(0, 255, 157, 0.3);
}

/* === TAB CONTENT === */
.tab-content {
    display: none;
    flex: 1;
    overflow-y: auto;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === HUD STATUS BAR === */
.hud {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

.hud::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--gradient-primary);
    animation: hudPulse 2s infinite;
}

@keyframes hudPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

#hud-status {
    color: var(--neon-green);
    font-weight: 700;
    text-shadow: 0 0 10px rgba(0, 255, 157, 0.5);
}

.separator {
    color: var(--text-muted);
}

#hud-detail {
    color: var(--text-secondary);
}

/* === FINANCIAL PANEL === */
.financial-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.metrics-primary,
.metrics-secondary {
    display: grid;
    gap: 16px;
}

.metrics-primary {
    grid-template-columns: repeat(4, 1fr);
}

.metrics-secondary {
    grid-template-columns: repeat(3, 1fr);
}

/* PREMIUM CARD DESIGN */
.card {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-glass);
    pointer-events: none;
}

.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.card:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 255, 157, 0.2);
    box-shadow: var(--shadow-glow);
}

.card.highlight {
    background: linear-gradient(135deg, rgba(0, 255, 157, 0.1) 0%, rgba(0, 212, 255, 0.05) 100%);
    border-color: rgba(0, 255, 157, 0.3);
}

.card.highlight::after {
    background: var(--gradient-primary);
    opacity: 0.5;
}

.card .label {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--text-muted);
    text-transform: uppercase;
    display: block;
    margin-bottom: 12px;
}

.card .value {
    font-family: var(--font-mono);
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--gradient-bullish);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.card .sub-value {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* === GRID VISUALIZATION === */
.vis-container {
    flex: 1;
    min-height: 300px;
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 24px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.vis-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 100%, rgba(0, 255, 157, 0.1) 0%, transparent 50%),
        linear-gradient(180deg, rgba(0, 212, 255, 0.02) 0%, transparent 50%);
    pointer-events: none;
}

.triangle-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.triangle-svg {
    width: 100%;
    max-width: 500px;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(0, 255, 157, 0.3));
}

.controls-bar {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
    position: relative;
    z-index: 1;
}

/* === BUTTONS === */
.btn-control {
    padding: 12px 28px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-glass);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-control::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-control:hover::before {
    opacity: 0.1;
}

.btn-control:hover {
    border-color: var(--neon-green);
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.2);
}

.btn-control.danger {
    border-color: var(--neon-red);
    color: var(--neon-red);
}

.btn-control.danger:hover {
    background: rgba(255, 59, 92, 0.1);
    box-shadow: 0 0 20px rgba(255, 59, 92, 0.3);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 0.85rem;
}

.btn-warning {
    border-color: var(--neon-orange);
    color: var(--neon-orange);
}

.btn-warning:hover {
    background: rgba(255, 149, 0, 0.1);
    box-shadow: 0 0 20px rgba(255, 149, 0, 0.3);
}

/* === INTEL SECTION === */
.intel-section,
.perf-section,
.settings-section,
.orders-section {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 28px;
    margin-bottom: 20px;
}

.intel-section h2,
.perf-section h2,
.settings-section h2,
.orders-section h2 {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
}

.intel-section h2::before,
.perf-section h2::before,
.settings-section h2::before,
.orders-section h2::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* === REGIME DISPLAY === */
.regime-display {
    display: flex;
    align-items: center;
    gap: 20px;
}

.regime-badge {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 800;
    padding: 14px 28px;
    background: var(--gradient-bullish);
    border-radius: var(--radius-md);
    color: var(--bg-deep);
    letter-spacing: 2px;
    box-shadow: 0 4px 20px rgba(0, 255, 157, 0.3);
    animation: regimePulse 3s infinite;
}

@keyframes regimePulse {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(0, 255, 157, 0.3);
    }

    50% {
        box-shadow: 0 4px 30px rgba(0, 255, 157, 0.5);
    }
}

.regime-details {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* === GRIDS === */
.mtf-grid,
.indicators-grid,
.settings-grid,
.metrics-grid-perf {
    display: grid;
    gap: 16px;
}

.mtf-grid {
    grid-template-columns: repeat(4, 1fr);
}

.indicators-grid {
    grid-template-columns: repeat(4, 1fr);
}

.settings-grid {
    grid-template-columns: repeat(4, 1fr);
}

.metrics-grid-perf {
    grid-template-columns: repeat(6, 1fr);
}

/* === INDICATOR CARDS === */
.mtf-card,
.indicator-card,
.perf-card,
.setting-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.mtf-card:hover,
.indicator-card:hover,
.perf-card:hover,
.setting-card:hover {
    border-color: rgba(0, 255, 157, 0.2);
    background: rgba(0, 255, 157, 0.02);
}

.mtf-card.highlight,
.indicator-card.highlight {
    background: rgba(0, 255, 157, 0.05);
    border-color: rgba(0, 255, 157, 0.3);
}

.tf-label,
.ind-label,
.perf-label,
.setting-label {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    display: block;
    margin-bottom: 12px;
}

.tf-value,
.ind-value,
.perf-value,
.setting-value {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
}

.ind-threshold,
.ind-subvalue,
.setting-reason {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.bb-display {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.8;
    text-align: left;
}

/* === TABLES === */
.trades-table-container,
.orders-table-container {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.trades-table,
.orders-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.trades-table th,
.orders-table th {
    background: rgba(255, 255, 255, 0.02);
    padding: 14px 16px;
    font-weight: 600;
    text-align: left;
    letter-spacing: 1px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.7rem;
    border-bottom: 1px solid var(--border-color);
}

.trades-table td,
.orders-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.trades-table tr:hover td,
.orders-table tr:hover td {
    background: rgba(0, 255, 157, 0.02);
}

/* === INTEL DATA GRID === */
.intel-grid {
    grid-column: span 1;
}

.intel-data {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.intel-data span {
    color: var(--neon-green);
    font-weight: 600;
}

/* === GRID HEALTH === */
.grid-health {
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    padding: 20px;
}

.health-info {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.8;
}

.control-buttons {
    display: flex;
    gap: 16px;
}

/* === CONTEXT DISPLAY === */
.context-display {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: var(--radius-md);
    line-height: 1.8;
}

/* === RESPONSIVE === */
@media (max-width: 1400px) {
    .metrics-primary {
        grid-template-columns: repeat(2, 1fr);
    }

    .metrics-secondary {
        grid-template-columns: repeat(3, 1fr);
    }

    .mtf-grid,
    .indicators-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .metrics-grid-perf {
        grid-template-columns: repeat(3, 1fr);
    }

    .settings-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1000px) {
    .sidebar {
        width: 280px;
        min-width: 280px;
    }

    .dashboard {
        padding: 16px 20px;
    }
}

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

    .sidebar {
        width: 100%;
        height: auto;
        max-height: none;
        overflow-y: auto;
    }

    .metrics-primary,
    .metrics-secondary {
        grid-template-columns: 1fr;
    }
}

/* === LOADING ANIMATION === */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.loading {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.02) 0%,
            rgba(255, 255, 255, 0.08) 50%,
            rgba(255, 255, 255, 0.02) 100%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* === STATUS COLORS === */
.status-bull {
    color: var(--neon-green);
}

.status-bear {
    color: var(--neon-red);
}

.status-neutral {
    color: var(--neon-orange);
}

/* === GLOW EFFECTS === */
.glow-green {
    text-shadow: 0 0 10px rgba(0, 255, 157, 0.5);
}

.glow-red {
    text-shadow: 0 0 10px rgba(255, 59, 92, 0.5);
}

.glow-blue {
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

/* === ANIMATED PRICE VISUALIZATION === */
.price-hero {
    text-align: center;
    padding: 30px 0;
    position: relative;
}

.price-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 4px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.price-main {
    font-family: var(--font-mono);
    font-size: 3.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: priceGlow 3s ease-in-out infinite;
}

@keyframes priceGlow {

    0%,
    100% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.2);
    }
}

.price-change {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 8px 16px;
    background: rgba(0, 255, 157, 0.1);
    border-radius: 20px;
    color: var(--neon-green);
    font-family: var(--font-mono);
    font-weight: 600;
}

.change-arrow {
    animation: arrowBounce 1s ease-in-out infinite;
}

@keyframes arrowBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

.orders-visual {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.order-stack {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.order-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.3s ease;
}

.order-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.order-row .price {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    width: 100px;
    text-align: right;
}

.order-row.sell .price {
    color: var(--neon-red);
}

.order-row.buy .price {
    color: var(--neon-green);
}

.order-row .bar {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.order-row.sell .bar {
    background: linear-gradient(90deg, transparent, rgba(255, 59, 92, 0.4));
}

.order-row.buy .bar {
    background: linear-gradient(90deg, rgba(0, 255, 157, 0.4), transparent);
}

.order-row .bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: barShimmer 2s infinite;
}

@keyframes barShimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.current-price-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 16px 0;
    margin: 12px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.current-price-line::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 2px;
    background: var(--gradient-primary);
    opacity: 0.3;
}

#live-price {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    background: var(--bg-secondary);
    padding: 8px 20px;
    border-radius: var(--radius-md);
    border: 2px solid var(--neon-green);
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.3);
    z-index: 1;
    animation: livePricePulse 2s infinite;
}

@keyframes livePricePulse {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(0, 255, 157, 0.3);
    }

    50% {
        box-shadow: 0 0 30px rgba(0, 255, 157, 0.5);
    }
}

.pulse-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--neon-green);
    animation: pulseDot 1.5s ease-in-out infinite;
    box-shadow: 0 0 15px var(--neon-green);
}

@keyframes pulseDot {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }
}

.signal-indicator {
    text-align: center;
    padding: 20px;
    margin-top: 16px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.signal-label {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 3px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.signal-score {
    font-family: var(--font-mono);
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: signalPulse 2s infinite;
}

@keyframes signalPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

.signal-text {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--neon-green);
    letter-spacing: 2px;
    margin-top: 8px;
    text-shadow: 0 0 10px rgba(0, 255, 157, 0.5);
}

/* ==========================================
   ARCA FINANCIERA GAROSSA - CUSTOM STYLES
   ========================================== */

/* Doctrine Quote in Sidebar */
.doctrine-quote {
    padding: 16px;
    margin: 16px 8px;
    font-size: 0.75rem;
    font-style: italic;
    color: var(--text-secondary);
    border-left: 2px solid var(--neon-purple);
    background: rgba(189, 0, 255, 0.1);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* HUD Title */
.hud-title {
    font-weight: 700;
    color: var(--neon-green);
    letter-spacing: 2px;
}

/* ========== COMMAND CENTER TAB ========== */
.networth-hero {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, rgba(0, 255, 157, 0.1), rgba(0, 212, 255, 0.1));
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-glow);
    margin-bottom: 24px;
    box-shadow: var(--shadow-glow);
}

.networth-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 4px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.networth-value {
    font-family: var(--font-mono);
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.networth-breakdown {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 12px;
}

.command-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.command-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
}

.command-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.command-card.emergency {
    border-left: 3px solid var(--neon-green);
}

.command-card.fintech {
    border-left: 3px solid var(--neon-blue);
}

.command-card.debt {
    border-left: 3px solid var(--neon-red);
}

.command-card.bot {
    border-left: 3px solid var(--neon-purple);
}

.card-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.card-label {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.card-value {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.card-value.positive {
    color: var(--neon-green);
}

.card-value.negative {
    color: var(--neon-red);
}

.card-sub,
.card-target {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin: 8px 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-bullish);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.next-actions {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.next-actions h3 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.action-item {
    display: flex;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
}

.action-item.urgent {
    border-color: var(--neon-red);
    background: rgba(255, 59, 92, 0.1);
}

.action-date {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--neon-blue);
    min-width: 70px;
}

.fintech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.fintech-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    backdrop-filter: blur(20px);
}

.fintech-card.didi {
    border-top: 3px solid #ff6b00;
}

.fintech-card.nubank {
    border-top: 3px solid #8a05be;
}

.fintech-card.mercadopago {
    border-top: 3px solid #00a8e2;
}

.fintech-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.fintech-logo {
    font-size: 1.5rem;
}

.fintech-name {
    font-weight: 600;
    flex: 1;
}

.fintech-rate {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--neon-green);
    background: rgba(0, 255, 157, 0.1);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
}

.fintech-body label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.fintech-input,
.etf-input,
.portfolio-input {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 600;
}

.fintech-input:focus,
.etf-input:focus {
    outline: none;
    border-color: var(--neon-green);
    box-shadow: 0 0 10px rgba(0, 255, 157, 0.2);
}

.fintech-limit {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 8px 0;
}

.fintech-yield {
    font-size: 0.9rem;
    margin-top: 12px;
}

.yield-value {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--neon-green);
}

.fintech-status {
    margin-top: 12px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.fintech-status.high-yield {
    background: rgba(0, 255, 157, 0.1);
    color: var(--neon-green);
}

.fintech-status.partial {
    background: rgba(255, 149, 0, 0.1);
    color: var(--neon-orange);
}

.fintech-summary,
.debt-summary {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-row.highlight {
    background: rgba(0, 255, 157, 0.05);
    margin: 0 -20px;
    padding: 10px 20px;
}

.summary-value {
    font-family: var(--font-mono);
    font-weight: 700;
}

.summary-value.positive {
    color: var(--neon-green);
}

.summary-value.negative {
    color: var(--neon-red);
}

.btn-save {
    width: 100%;
    padding: 14px 24px;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-md);
    color: #000;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 255, 157, 0.3);
}

/* ========== DEBT TRACKER TAB ========== */
.debt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.debt-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    backdrop-filter: blur(20px);
}

.debt-card.rappi {
    border-left: 4px solid var(--neon-red);
}

.debt-card.msi {
    border-left: 4px solid var(--neon-orange);
}

.debt-card.msi.last {
    border-left: 4px solid var(--neon-green);
}

.debt-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.debt-type {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--neon-orange);
    background: rgba(255, 149, 0, 0.1);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

.debt-name {
    font-weight: 600;
    color: var(--text-secondary);
}

.debt-amount {
    font-family: var(--font-mono);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--neon-red);
    margin: 12px 0;
}

.debt-amount input {
    background: transparent;
    border: none;
    color: inherit;
    font: inherit;
    width: 100%;
}

.debt-due {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.due-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.due-date {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.debt-countdown {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--neon-orange);
    margin: 12px 0;
}

.debt-status {
    margin-top: 12px;
}

.debt-status label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    cursor: pointer;
}

.debt-rule {
    margin-top: 12px;
    padding: 8px 12px;
    background: rgba(255, 59, 92, 0.1);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--neon-red);
}

.debt-freedom {
    margin-top: 12px;
    padding: 12px;
    background: rgba(0, 255, 157, 0.1);
    border-radius: var(--radius-sm);
    font-weight: 600;
    color: var(--neon-green);
    text-align: center;
}

/* ========== PORTFOLIO TAB ========== */
.portfolio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--bg-glass);
}

.portfolio-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    backdrop-filter: blur(20px);
}

.portfolio-card.vt {
    border-top: 3px solid #4285f4;
}

.portfolio-card.qqq {
    border-top: 3px solid #00ff9d;
}

.portfolio-card.gold {
    border-top: 3px solid #ffd700;
}

.portfolio-card.vwo {
    border-top: 3px solid #ff6b6b;
}

.portfolio-card.crypto {
    border-top: 3px solid #f7931a;
}

.portfolio-header-card {
    margin-bottom: 12px;
}

.etf-name {
    font-family: var(--font-mono);
    font-size: 1.3rem;
    font-weight: 800;
    display: block;
}

.etf-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.allocation {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 800;
    color: var(--neon-blue);
    margin: 8px 0;
}

.monthly-amount {
    font-size: 0.85rem;
    color: var(--neon-green);
    margin-bottom: 12px;
}

.current-value label {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.etf-role {
    margin-top: 12px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
}

/* ========== DOCTRINE TAB ========== */
.doctrine-section {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
}

.doctrine-section h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.checklist {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.check-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.check-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--neon-green);
}

.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

.rule-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.rule-icon {
    font-size: 1.5rem;
}

.rule-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.philosophy-quote {
    font-style: italic;
    font-size: 1rem;
    color: var(--text-primary);
    padding: 20px;
    background: linear-gradient(135deg, rgba(0, 255, 157, 0.05), rgba(189, 0, 255, 0.05));
    border-radius: var(--radius-md);
    border-left: 3px solid var(--neon-purple);
    margin-bottom: 20px;
}

.tesis-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tesis-item {
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.phases-timeline {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.phase {
    flex: 1;
    min-width: 200px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    text-align: center;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.phase.active {
    opacity: 1;
    border-color: var(--neon-green);
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.2);
}



.phase-period {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--neon-blue);
    margin-bottom: 8px;
}

.phase-goal {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.phase-config {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ========== MOBILE RESPONSIVE ========== */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .app-container {
        grid-template-columns: 1fr;
    }

    .tabs-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        display: flex;
        flex-wrap: nowrap;
        gap: 0;
        padding: 0;
        background: rgba(15, 15, 25, 0.98);
        border-top: 1px solid var(--border-color);
        backdrop-filter: blur(20px);
        justify-content: space-around;
    }

    .tab-btn {
        flex: 1;
        padding: 12px 4px;
        font-size: 0.6rem;
        text-align: center;
        border-radius: 0;
        white-space: nowrap;
    }

    .dashboard {
        padding: 10px 12px 80px 12px;
        overflow-y: auto;
        height: 100vh;
    }

    .hud {
        flex-direction: column;
        gap: 4px;
        padding: 10px;
        font-size: 0.75rem;
    }

    .hud .separator {
        display: none;
    }

    .networth-hero {
        padding: 16px;
        margin-bottom: 16px;
    }

    .networth-value {
        font-size: 2rem;
    }

    .networth-breakdown {
        flex-direction: column;
        gap: 8px;
    }

    .command-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .fintech-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .fintech-rate {
        font-size: 1.8rem;
    }

    .debt-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .portfolio-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .allocation {
        font-size: 1.5rem;
    }

    .doctrine-section {
        padding: 14px;
    }

    .rules-grid {
        grid-template-columns: 1fr;
    }

    .phases-timeline {
        flex-direction: column;
        gap: 10px;
    }

    .phase {
        min-width: unset;
    }

    .btn-save {
        position: fixed;
        bottom: 70px;
        left: 12px;
        right: 12px;
        z-index: 999;
    }

    .metrics-grid {
        flex-direction: column;
    }
}

@media (max-width: 400px) {
    .tab-btn {
        padding: 10px 2px;
        font-size: 0.5rem;
    }

    .networth-value {
        font-size: 1.6rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== DEBT TAB ========== */
.debt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.debt-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    backdrop-filter: blur(20px);
}

.debt-card.rappi {
    border-left: 4px solid var(--neon-red);
}

.debt-card.nubank {
    border-left: 4px solid var(--neon-purple);
}

.debt-card.kueski {
    border-left: 4px solid var(--neon-orange);
}

.debt-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.debt-type {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 2px;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

.debt-card.rappi .debt-type {
    color: var(--neon-red);
    background: rgba(255, 59, 92, 0.1);
}

.debt-card.nubank .debt-type {
    color: var(--neon-purple);
    background: rgba(189, 0, 255, 0.1);
}

.debt-card.kueski .debt-type {
    color: var(--neon-orange);
    background: rgba(255, 149, 0, 0.1);
}

.debt-name {
    font-weight: 600;
    color: var(--text-secondary);
}

.debt-amount {
    font-family: var(--font-mono);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--neon-red);
    margin-bottom: 12px;
}

.debt-amount input {
    background: transparent;
    border: none;
    color: inherit;
    font: inherit;
    width: 100%;
    outline: none;
}

.debt-due {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.due-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.due-date {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.debt-countdown {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 8px 12px;
    background: rgba(255, 149, 0, 0.1);
    border-radius: var(--radius-sm);
    margin: 12px 0;
}

.debt-status {
    margin-top: 12px;
}

.debt-status label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    cursor: pointer;
}

.debt-rule {
    margin-top: 12px;
    padding: 8px 12px;
    background: rgba(255, 59, 92, 0.1);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--neon-orange);
}

.debt-summary {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.debt-summary .summary-value.negative {
    color: var(--neon-red);
    font-weight: 700;
}

/* ============================================
   GRID BOT - PROFESSIONAL TRADING TERMINAL
   ============================================ */

#bot {
    flex-direction: column;
    gap: 20px;
    height: 100%;
}

.terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(0, 255, 157, 0.1) 0%, rgba(0, 212, 255, 0.05) 100%);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-lg);
}

.terminal-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}

.status-dot.live {
    background: var(--neon-green);
    box-shadow: 0 0 10px var(--neon-green);
}

.status-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--neon-green);
    letter-spacing: 2px;
}

.terminal-pair {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pair-symbol {
    font-size: 1.5rem;
    color: #f7931a;
}

.pair-name {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
}

.terminal-regime {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(0, 255, 157, 0.15);
    border-radius: 20px;
}

.regime-text {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--neon-green);
}

/* Trading Display - 3 Column Layout */
.trading-display {
    display: grid;
    grid-template-columns: 1fr 1.2fr 0.8fr;
    gap: 20px;
    flex: 1;
}

/* Orderbook Panel */
.orderbook-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.price-ticker {
    text-align: center;
    padding: 20px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.ticker-price {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ticker-mxn {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.orderbook {
    flex: 1;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.ob-header {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.ob-header.bottom {
    margin-top: 8px;
    margin-bottom: 0;
}

.ob-stack {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ob-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.ob-price {
    min-width: 70px;
}

.ob-depth {
    height: 6px;
    border-radius: 3px;
    opacity: 0.7;
}

.ob-depth.sell {
    background: linear-gradient(90deg, var(--neon-red), transparent);
}

.ob-depth.buy {
    background: linear-gradient(90deg, var(--neon-green), transparent);
}

.ob-current {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px;
    margin: 10px 0;
    background: rgba(0, 255, 157, 0.1);
    border: 1px solid var(--neon-green);
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
    font-weight: 700;
}

.ob-pulse {
    width: 8px;
    height: 8px;
    background: var(--neon-green);
    border-radius: 50%;
    animation: pulse 1s ease-in-out infinite;
}

/* Metrics Panel */
.metrics-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.metric-group {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 15px;
}

.metric-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.metric-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.metric-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.metric-value {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--neon-blue);
}

.metric-hero {
    text-align: center;
    padding: 25px;
    background: linear-gradient(135deg, rgba(0, 255, 157, 0.15) 0%, rgba(0, 212, 255, 0.1) 100%);
    border: 2px solid var(--neon-green);
    border-radius: var(--radius-lg);
    box-shadow: 0 0 30px rgba(0, 255, 157, 0.2);
}

.hero-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 2px;
}

.hero-value {
    font-family: var(--font-mono);
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 8px 0;
}

.hero-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.profit-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.profit-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profit-label {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.profit-value {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
}

.profit-value.positive {
    color: var(--neon-green);
}

.profit-pct {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--neon-green);
}

.loops-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.loop-total {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.loop-number {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 800;
    color: var(--neon-blue);
}

.loop-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.loop-breakdown {
    display: flex;
    gap: 15px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

/* Signals Panel */
.signals-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* === CRYSTAL BALL (PROJECTIONS) === */
.projection-panel {
    background: rgba(10, 15, 30, 0.4);
    border: 1px solid rgba(0, 255, 157, 0.2);
    border-radius: var(--radius-md);
    padding: 15px;
    margin: 20px 0;
    backdrop-filter: blur(5px);
}

.proj-header {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.proj-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.proj-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.proj-item.highlight {
    background: rgba(0, 255, 157, 0.08);
    border-color: rgba(0, 255, 157, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 255, 157, 0.1);
}

.proj-label {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.proj-value {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.proj-item.highlight .proj-value {
    color: var(--neon-green);
}

.proj-footer {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.proj-target {
    color: var(--neon-purple);
    font-weight: 600;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.7;
    }
}

.signal-gauge {
    text-align: center;
    padding: 25px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.gauge-title {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.gauge-value {
    font-family: var(--font-mono);
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gauge-label {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--neon-blue);
    margin-top: 8px;
}

.indicators-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.indicator {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    text-align: center;
}

.ind-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.ind-value {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 700;
}

.ind-value.bullish {
    color: var(--neon-green);
}

.ind-value.bearish {
    color: var(--neon-red);
}

.emergency-controls {
    margin-top: auto;
}

.btn-emergency {
    width: 100%;
    padding: 12px;
    background: rgba(255, 59, 92, 0.1);
    border: 1px solid rgba(255, 59, 92, 0.3);
    border-radius: var(--radius-md);
    color: var(--neon-red);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.btn-emergency:hover {
    opacity: 1;
    background: rgba(255, 59, 92, 0.2);
    border-color: var(--neon-red);
    box-shadow: 0 0 20px rgba(255, 59, 92, 0.3);
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.9);
    }
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .trading-display {
        grid-template-columns: 1fr 1fr;
    }

    .signals-panel {
        grid-column: span 2;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .signal-gauge {
        flex: 1;
    }

    .indicators-grid {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .trading-display {
        grid-template-columns: 1fr;
    }

    .signals-panel {
        flex-direction: column;
    }
}

/* === TABS NAVIGATION & CONTENT (Restored via Patch) === */
.tabs-nav {
    display: flex;
    gap: 8px;
    padding: 6px;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.tab-btn {
    padding: 12px 24px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: none;
    background: transparent;
}

.tab-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.tab-btn span {
    position: relative;
    z-index: 1;
}

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

.tab-btn.active {
    color: var(--bg-deep);
    background: var(--gradient-primary);
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(0, 255, 157, 0.3);
}

.tab-content {
    display: none;
    flex: 1;
    overflow-y: auto;
    animation: fadeIn 0.4s ease;
    flex-direction: column;
}

.tab-content.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === GUIDE TAB STYLES === */
.guide-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 20px 0;
}

.guide-section {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all 0.3s ease;
}

.guide-section:hover {
    border-color: rgba(0, 255, 157, 0.3);
    box-shadow: 0 0 30px rgba(0, 255, 157, 0.1);
}

.guide-section.full-width {
    grid-column: span 2;
}

.guide-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.guide-card {
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    padding: 16px;
}

.guide-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 12px;
    line-height: 1.6;
}

.guide-card p strong {
    color: var(--text-primary);
}

.guide-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.guide-card ul li {
    padding: 8px 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.guide-card ul li:last-child {
    border-bottom: none;
}

.guide-card ul li strong {
    color: var(--neon-green);
}

.guide-tip {
    background: rgba(0, 255, 157, 0.1);
    border-left: 3px solid var(--neon-green);
    padding: 10px 14px;
    margin-top: 12px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.82rem !important;
    color: var(--neon-green) !important;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.tip-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.tip-card:hover {
    border-color: var(--neon-blue);
    transform: translateY(-4px);
}

.tip-icon {
    display: block;
    font-size: 2rem;
    margin-bottom: 12px;
}

.tip-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

@media (max-width: 1200px) {
    .guide-container {
        grid-template-columns: 1fr;
    }

    .guide-section.full-width {
        grid-column: span 1;
    }

    .tips-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .tips-grid {
        grid-template-columns: 1fr;
    }
}

/* === GOALS SECTION === */
.goals-section {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-top: 20px;
}

.goals-section h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--neon-green);
}

.goals-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.goal-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-md);
    padding: 16px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.goal-card.completed {
    border-color: var(--neon-green);
    background: rgba(0, 255, 157, 0.1);
}

.goal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.goal-icon {
    font-size: 1.5rem;
}

.goal-name {
    flex: 1;
    font-weight: 600;
    font-size: 0.85rem;
}

.goal-deadline {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
}

.goal-progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.goal-progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.goal-values {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* === FLOW SECTION === */
.flow-section {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-top: 20px;
}

.flow-section h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--neon-blue);
}

.flow-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.flow-item {
    background: rgba(0, 0, 0, 0.2);
    padding: 12px;
    border-radius: var(--radius-sm);
    text-align: center;
}

.flow-item label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.flow-item input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    text-align: center;
}

.flow-item input:focus {
    outline: none;
    border-color: var(--neon-blue);
}

.flow-item.result {
    background: rgba(0, 255, 157, 0.1);
    border: 1px solid rgba(0, 255, 157, 0.3);
}

.flow-value {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
}

.flow-value.positive {
    color: var(--neon-green);
}

.flow-value.negative {
    color: var(--neon-red);
}

.flow-summary {
    margin-top: 16px;
    padding: 12px;
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.05);
}

.flow-summary.positive {
    background: rgba(0, 255, 157, 0.1);
    color: var(--neon-green);
}

.flow-summary.warning {
    background: rgba(255, 149, 0, 0.1);
    color: var(--neon-orange);
}

.flow-summary.negative {
    background: rgba(255, 59, 92, 0.1);
    color: var(--neon-red);
}

/* === CUSTOM CHECKLIST === */
.custom-checklist-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.custom-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.custom-header span {
    font-weight: 600;
    color: var(--text-secondary);
}

.btn-add {
    background: var(--gradient-primary);
    border: none;
    color: var(--bg-deep);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-add:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.4);
}

.custom-item {
    position: relative;
}

.custom-item .delete-item {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 59, 92, 0.2);
    border: none;
    color: var(--neon-red);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
    font-size: 1rem;
    line-height: 1;
}

.custom-item:hover .delete-item {
    opacity: 1;
}

.custom-item .delete-item:hover {
    background: var(--neon-red);
    color: white;
}

@media (max-width: 1200px) {
    .goals-grid {
        grid-template-columns: 1fr;
    }

    .flow-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .flow-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* === AUTOMATION DASHBOARD === */
.automation-dashboard {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 24px 0;
}

.auto-card {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    transition: all 0.3s ease;
}

.auto-card:hover {
    border-color: var(--neon-green);
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.1);
}

.auto-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.auto-icon {
    font-size: 1.2rem;
}

.auto-title {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-muted);
}

/* Phase Card */
.phase-indicator {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.phase-status {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.phase-recommendation {
    font-size: 0.75rem;
    color: var(--neon-green);
    font-weight: 500;
}

/* Independence Card */
.independence-years {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--neon-blue);
    margin-bottom: 12px;
}

.independence-progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.independence-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.passive-income {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.passive-income span {
    color: var(--neon-green);
    font-weight: 700;
}

/* Macro Card */
.macro-indicators {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.macro-item {
    display: flex;
    flex-direction: column;
}

.macro-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.macro-value {
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--font-mono);
}

.macro-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.macro-badge.neutral {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.macro-badge.riskon {
    background: rgba(0, 255, 157, 0.2);
    color: var(--neon-green);
}

.macro-badge.caos {
    background: rgba(255, 149, 0, 0.2);
    color: var(--neon-orange);
}

.macro-badge.dolarfuerte {
    background: rgba(0, 179, 255, 0.2);
    color: var(--neon-blue);
}

.macro-badge.orofuerte {
    background: rgba(255, 215, 0, 0.2);
    color: gold;
}

.macro-advice {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Alerts Card */
.alerts-container {
    max-height: 120px;
    overflow-y: auto;
}

.alert-item {
    padding: 8px 12px;
    margin-bottom: 6px;
    border-radius: 6px;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
}

.alert-item.urgent {
    background: rgba(255, 59, 92, 0.2);
    color: var(--neon-red);
    border-left: 3px solid var(--neon-red);
}

.alert-item.rebalance {
    background: rgba(255, 149, 0, 0.15);
    color: var(--neon-orange);
    border-left: 3px solid var(--neon-orange);
}

.alert-item.success {
    background: rgba(0, 255, 157, 0.15);
    color: var(--neon-green);
    border-left: 3px solid var(--neon-green);
}

@media (max-width: 1400px) {
    .automation-dashboard {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .automation-dashboard {
        grid-template-columns: 1fr;
    }
}

/* === PORTFOLIO CONTRIBUTION === */
.portfolio-contribution {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 20px 0;
    padding: 16px;
    background: rgba(0, 255, 157, 0.1);
    border: 1px solid rgba(0, 255, 157, 0.3);
    border-radius: var(--radius-md);
}

.portfolio-contribution label {
    font-weight: 600;
    color: var(--neon-green);
}

.contribution-input {
    width: 150px;
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 1rem;
    text-align: right;
}

.contribution-input:focus {
    outline: none;
    border-color: var(--neon-green);
}

.contribution-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ===== SMART FLOW MANAGER ===== */
.flow-manager {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Health Bar */
.flow-health-bar {
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    display: flex;
    overflow: hidden;
    margin-bottom: 5px;
}

.bar-segment {
    height: 100%;
    transition: width 0.5s ease;
}

.bar-segment.fixed {
    background: #ff3b5c;
}

.bar-segment.variable {
    background: #ff9500;
}

.bar-segment.debt {
    background: #bd00ff;
}

.bar-segment.savings {
    background: #00ff9d;
}

.flow-legend {
    display: flex;
    gap: 10px;
    font-size: 0.7em;
    color: var(--text-muted);
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.dot.fixed {
    background: #ff3b5c;
}

.dot.variable {
    background: #ff9500;
}

.dot.debt {
    background: #bd00ff;
}

.dot.savings {
    background: #00ff9d;
}

/* Section Groups */
.flow-section-group {
    background: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.group-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.group-title {
    flex-grow: 1;
    font-size: 0.9em;
    color: #fff;
    margin-left: 8px;
}

.group-total {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
    color: var(--text-muted);
}

/* List Items */
.flow-list {
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.flow-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
}

.item-name {
    color: #ccc;
}

.item-amount {
    font-family: 'JetBrains Mono', monospace;
    color: #fff;
}

.btn-delete-flow {
    background: none;
    border: none;
    color: #ff3b5c;
    cursor: pointer;
    font-size: 1.1em;
    padding: 0 4px;
    margin-left: 8px;
    opacity: 0.7;
}

.btn-delete-flow:hover {
    opacity: 1;
}

/* Add Row */
.add-flow-row {
    display: flex;
    gap: 5px;
}

.add-input-name {
    flex-grow: 2;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
}

.add-input-amount {
    width: 70px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    text-align: right;
}

.btn-add-flow {
    background: var(--neon-blue);
    color: #000;
    border: none;
    border-radius: 4px;
    width: 24px;
    cursor: pointer;
    font-weight: bold;
}

.modern-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 8px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1em;
    text-align: center;
}

.flow-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.summary-box {
    background: rgba(0, 0, 0, 0.4);
    padding: 10px;
    border-radius: 8px;
    text-align: center;
}

.summary-box.highlight {
    border: 1px solid rgba(0, 255, 157, 0.3);
}

.summary-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1em;
    margin-top: 4px;
}

.summary-val.positive {
    color: #00ff9d;
    text-shadow: 0 0 10px rgba(0, 255, 157, 0.3);
}

.summary-val.negative {
    color: #ff3b5c;
}

/* ===== FLOW HISTORY SECTION ===== */
.flow-history-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.close-month-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.btn-close-month {
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-blue));
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(189, 0, 255, 0.3);
}

.btn-close-month:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
}

.close-month-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}

.flow-history-chart {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(20, 20, 40, 0.3));
    border-radius: 16px;
    padding: 20px;
    min-height: 200px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Empty State */
.no-history-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    text-align: center;
}

.no-history-icon {
    font-size: 3rem;
    margin-bottom: 10px;
    opacity: 0.5;
}

.no-history {
    color: var(--text-muted);
    font-size: 1rem;
    margin: 0;
}

.no-history-hint {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.75rem;
    margin-top: 8px;
}

/* Stats Header */
.history-header {
    margin-bottom: 16px;
}

.history-stats {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.stat-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 12px 20px;
    border-radius: 10px;
    text-align: center;
    min-width: 100px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-label {
    display: block;
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.stat-value {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-value.excellent {
    color: var(--neon-green);
    text-shadow: 0 0 10px rgba(0, 255, 157, 0.3);
}

.stat-value.good {
    color: var(--neon-blue);
}

.stat-value.warning {
    color: var(--neon-orange);
}

.trend-up .stat-value {
    color: var(--neon-green);
}

.trend-down .stat-value {
    color: var(--neon-red);
}

.trend-neutral .stat-value {
    color: var(--text-muted);
}

/* Chart Area */
.history-chart-area {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: flex-end;
    height: 120px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 12px;
}

.history-month {
    flex: 1;
    max-width: 80px;
    min-width: 50px;
    height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.history-month:hover {
    transform: translateY(-4px);
}

.history-month.latest {
    border-radius: 8px;
    background: rgba(0, 255, 157, 0.05);
    padding: 4px;
    margin: -4px;
}

.month-bars {
    display: flex;
    gap: 4px;
    align-items: flex-end;
    height: 80px;
    width: 100%;
}

.bar-container {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.bar {
    border-radius: 4px 4px 0 0;
    min-height: 4px;
    position: relative;
    transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.bar-value {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.6rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.history-month:hover .bar-value {
    opacity: 1;
}

.income-bar {
    background: linear-gradient(180deg, var(--neon-green) 0%, #00a86b 100%);
    box-shadow: 0 0 10px rgba(0, 255, 157, 0.2);
}

.savings-bar {
    background: linear-gradient(180deg, var(--neon-blue) 0%, #0077b6 100%);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.2);
}

.savings-bar.negative {
    background: linear-gradient(180deg, var(--neon-red) 0%, #c1121f 100%);
    box-shadow: 0 0 10px rgba(255, 59, 92, 0.2);
}

.month-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
    white-space: nowrap;
}

.history-month.latest .month-label {
    color: var(--neon-green);
    font-weight: 600;
}

/* Legend */
.history-legend {
    display: flex;
    justify-content: center;
    gap: 24px;
    font-size: 0.75rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.legend-color.income {
    background: linear-gradient(135deg, var(--neon-green), #00a86b);
}

.legend-color.savings {
    background: linear-gradient(135deg, var(--neon-blue), #0077b6);
}