/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   UltronArbitrage — Unified Design System v4.1 (Fintech Moderna)
   ──────────────────────────────────────────────────────────────────────────
   Single-file replacement for: ultron-light.css, ultron-components.css,
   branding.css, branding-light.css.
   Aesthetic: Nubank / Robinhood / Revolut — minimal, generous spacing,
   ultra-subtle shadows, sober base + Verde Classico (#006039) accent.
   WCAG AA compliant text colors.
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */


/* ============================================================================
   SECTION 1 — FONT IMPORT
   ============================================================================ */

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


/* ============================================================================
   SECTION 2 — DESIGN TOKENS (Light Theme — Fintech Moderna)
   ============================================================================ */

:root {
    /* ── Brand (Verde Classico — ONLY on CTAs and accents) ──────────────── */
    --color-brand:            #006039;
    --color-brand-hover:      #004d2e;
    --color-brand-light:      #f0f9f4;
    --color-brand-muted:      rgba(0, 96, 57, 0.06);
    --color-brand-rgb:        0, 96, 57;

    /* ── Accent (simplified — no gold, no omega) ────────────────────────── */
    --color-gold:             #92730e;
    --color-gold-light:       rgba(201, 176, 55, 0.08);
    --color-omega:            #006039;

    /* ── Semantic: Success ──────────────────────────────────────────────── */
    --color-success:          #16a34a;
    --color-success-light:    #f0fdf4;
    --color-success-bg:       rgba(22, 163, 74, 0.05);
    --color-success-border:   rgba(22, 163, 74, 0.15);

    /* ── Semantic: Danger ───────────────────────────────────────────────── */
    --color-danger:           #ef4444;
    --color-danger-light:     #fef2f2;
    --color-danger-bg:        rgba(239, 68, 68, 0.05);
    --color-danger-border:    rgba(239, 68, 68, 0.15);

    /* ── Semantic: Warning ──────────────────────────────────────────────── */
    --color-warning:          #d97706;
    --color-warning-light:    #fffbeb;
    --color-warning-bg:       rgba(217, 119, 6, 0.05);
    --color-warning-border:   rgba(217, 119, 6, 0.15);

    /* ── Semantic: Info ─────────────────────────────────────────────────── */
    --color-info:             #3b82f6;
    --color-info-light:       #eff6ff;
    --color-info-bg:          rgba(59, 130, 246, 0.05);
    --color-info-border:      rgba(59, 130, 246, 0.15);

    /* ── Surfaces (white-first: cards/tables brancas, body levemente cinza) */
    --bg-body:                #f4f5f7;
    --bg-surface:             #ffffff;
    --bg-surface-2:           #f9fafb;
    --bg-hover:               #f5f6f8;
    --bg-muted:               #f4f5f7;
    --bg-elevated:            #ffffff;
    --bg-input:               #ffffff;
    --bg-skeleton:            #eef0f3;

    /* ── Borders (visíveis e definidas, elegância com estrutura) ────────── */
    --border:                 #e2e5ea;
    --border-strong:          #d1d5db;
    --border-light:           #eef0f3;
    --border-focus:           #006039;

    /* ── Text (WCAG AA compliant — dim only para decorativo/large text) ── */
    --text-primary:           #1a1d26;
    --text-secondary:         #4b5563;
    --text-dim:               #6b7280;
    --text-inverse:           #ffffff;

    /* ── Font Stacks ────────────────────────────────────────────────────── */
    --font-ui:                'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono:              'JetBrains Mono', 'SF Mono', 'Consolas', 'Fira Code', monospace;

    /* ── Type Scale (compacto para dados, generoso para títulos) ────────── */
    --font-xs:                10px;
    --font-sm:                11px;
    --font-base:              13px;
    --font-md:                14px;
    --font-lg:                16px;
    --font-xl:                20px;
    --font-2xl:               24px;
    --font-3xl:               32px;

    /* ── Weights ────────────────────────────────────────────────────────── */
    --weight-normal:          400;
    --weight-medium:          500;
    --weight-semibold:        600;
    --weight-bold:            700;

    /* ── Leading ────────────────────────────────────────────────────────── */
    --leading-tight:          1.25;
    --leading-normal:         1.5;
    --leading-relaxed:        1.7;

    /* ── Spacing (Bigger — more white space) ────────────────────────────── */
    --space-0:                0;
    --space-1:                4px;
    --space-2:                8px;
    --space-3:                12px;
    --space-4:                16px;
    --space-5:                20px;
    --space-6:                24px;
    --space-7:                28px;
    --space-8:                32px;
    --space-10:               40px;
    --space-12:               48px;
    --space-16:               64px;

    /* ── Radii (modernos sem exagero) ───────────────────────────────────── */
    --radius-xs:              4px;
    --radius-sm:              6px;
    --radius-md:              8px;
    --radius-lg:              12px;
    --radius-xl:              16px;
    --radius-full:            9999px;

    /* ── Shadows (elegantes com profundidade real) ─────────────────────── */
    --shadow-xs:              0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm:              0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md:              0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg:              0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-xl:              0 20px 25px -5px rgba(0, 0, 0, 0.10), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --shadow-focus:           0 0 0 3px rgba(0, 96, 57, 0.18);

    /* ── Animation ──────────────────────────────────────────────────────── */
    --ease-out:               cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out:            cubic-bezier(0.4, 0, 0.2, 1);
    --ease-spring:            cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-instant:       50ms;
    --duration-fast:          120ms;
    --duration-normal:        200ms;
    --duration-slow:          350ms;
    --duration-slower:        500ms;

    /* ── Layout ─────────────────────────────────────────────────────────── */
    --sidebar-w:              240px;
    --sidebar-collapsed-w:    72px;
    --content-max-w:          1480px;
    --content-narrow-w:       680px;

    /* ── Z-Index Scale ──────────────────────────────────────────────────── */
    --z-sticky:               1;
    --z-float:                10;
    --z-sidebar:              100;
    --z-overlay-bg:           200;
    --z-overlay:              300;
    --z-palette:              400;
    --z-toast:                9999;

    /* ── Legacy Aliases (backward compatibility during migration) ───────── */
    --accent:                 var(--color-brand);
    --accent-muted:           var(--color-brand-muted);
    --accent-dim:             var(--color-brand-light);
    --card-bg:                var(--bg-surface);
    --card-border:            var(--border);
    --card-radius:            var(--radius-md);
    --card-shadow:            var(--shadow-sm);
    --card-shadow-hover:      var(--shadow-md);
    --text:                   var(--text-primary);
    --primary:                var(--color-brand);
    --primary-hover:          var(--color-brand-hover);
    --primary-muted:          var(--color-brand-muted);
    --primary-dim:            rgba(0, 96, 57, 0.04);
    --primary-fg:             #ffffff;
    --secondary:              var(--color-omega);
    --secondary-hover:        #004d2e;
    --secondary-muted:        rgba(0, 96, 57, 0.06);
    --secondary-fg:           #ffffff;
    --color-primary:          var(--color-brand);
    --color-primary-hover:    var(--color-brand-hover);
    --color-primary-light:    var(--color-brand-light);
    --color-primary-muted:    var(--color-brand-muted);
    --topbar-h:               0;
    --topbar-bg:              rgba(255, 255, 255, 0.95);
    --topbar-border:          1px solid var(--border);
    --drawer-w:               var(--sidebar-w);
    --btn-radius:             var(--radius-sm);
    --btn-primary-bg:         var(--color-brand);
    --btn-primary-fg:         var(--text-inverse);
    --input-bg:               var(--bg-input);
    --input-border:           var(--border);
    --input-focus:            var(--color-brand);
    --input-radius:           var(--radius-sm);
    --nav-active-bg:          rgba(0, 96, 57, 0.06);
    --nav-active-fg:          #006039;
    --nav-active-br:          rgba(0, 96, 57, 0.15);
    --bg-surface-drawer:      #ffffff;
    --user-bg:                rgba(0, 96, 57, 0.05);
    --user-accent:            #006039;
    --user-border:            rgba(0, 96, 57, 0.15);
    --accent-gold:            #c9b037;
    --accent-gold-hover:      #b89e2f;
    --accent-gold-muted:      rgba(201, 176, 55, 0.08);
    --success-muted:          rgba(22, 163, 74, 0.06);
    --danger-muted:           rgba(239, 68, 68, 0.05);
    --warning-muted:          rgba(217, 119, 6, 0.06);
    --info-muted:             rgba(59, 130, 246, 0.05);
    --glass-bg:               rgba(255, 255, 255, 0.90);
    --glass-blur:             16px;
    --overlay-bg:             rgba(17, 24, 39, 0.4);
    --steel:                  #8c8c8c;
    --steel-light:            #b8b8b8;
    --color-gold-light-legacy:#faf5e4;

    /* ── Tier Badges ────────────────────────────────────────────────────── */
    --tier-excepcional:       #92730e;
    --tier-excepcional-bg:    rgba(201, 176, 55, 0.10);
    --tier-forte:             var(--color-brand);
    --tier-forte-bg:          var(--color-brand-muted);
    --tier-moderada:          var(--color-omega);
    --tier-moderada-bg:       rgba(0, 96, 57, 0.05);
    --tier-fraca:             var(--text-dim);
    --tier-fraca-bg:          rgba(107, 114, 128, 0.08);
}


/* ============================================================================
   SECTION 3 — DARK THEME (Fintech Moderna Dark)
   ============================================================================ */

[data-theme="dark"] {
    --bg-body:                #0f1117;
    --bg-surface:             #1a1d27;
    --bg-surface-2:           #1f222e;
    --bg-hover:               #242733;
    --bg-muted:               #1a1d27;
    --bg-elevated:            #242733;
    --bg-input:               #1a1d27;
    --bg-skeleton:            #242733;

    --border:                 #2a2d3a;
    --border-strong:          #363a4a;
    --border-light:           #22252f;
    --border-focus:           #006039;

    --text-primary:           #f4f5f7;
    --text-secondary:         #9ca3af;
    --text-dim:               #6b7280;
    --text-inverse:           #111827;

    --color-brand:            #22c55e;
    --color-brand-hover:      #16a34a;
    --color-brand-light:      rgba(0, 96, 57, 0.12);
    --color-brand-muted:      rgba(0, 96, 57, 0.10);
    --color-brand-rgb:        34, 197, 94;

    --color-success:          #22c55e;
    --color-success-light:    rgba(34, 197, 94, 0.10);
    --color-success-bg:       rgba(34, 197, 94, 0.08);
    --color-success-border:   rgba(34, 197, 94, 0.20);
    --color-danger:           #ef4444;
    --color-danger-light:     rgba(239, 68, 68, 0.10);
    --color-danger-bg:        rgba(239, 68, 68, 0.06);
    --color-danger-border:    rgba(239, 68, 68, 0.20);
    --color-warning:          #f59e0b;
    --color-warning-light:    rgba(245, 158, 11, 0.10);
    --color-warning-bg:       rgba(245, 158, 11, 0.08);
    --color-warning-border:   rgba(245, 158, 11, 0.20);
    --color-info:             #60a5fa;
    --color-info-light:       rgba(96, 165, 250, 0.10);
    --color-info-bg:          rgba(96, 165, 250, 0.06);
    --color-info-border:      rgba(96, 165, 250, 0.20);

    --shadow-xs:              0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-sm:              0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md:              0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg:              0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-xl:              0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-focus:           0 0 0 3px rgba(34, 197, 94, 0.20);

    --accent:                 #3b82f6;
    --accent-muted:           rgba(59, 130, 246, 0.12);
    --accent-dim:             #1a2d50;
    --primary:                #22c55e;
    --primary-hover:          #16a34a;
    --primary-muted:          rgba(34, 197, 94, 0.10);
    --primary-dim:            rgba(34, 197, 94, 0.05);
    --primary-fg:             #0f1117;
    --secondary:              #60a5fa;
    --secondary-hover:        #93bbfd;
    --secondary-muted:        rgba(96, 165, 250, 0.10);
    --secondary-fg:           #0f1117;
    --card-bg:                #1a1d27;
    --card-border:            #2a2d3a;
    --card-shadow:            0 1px 3px rgba(0, 0, 0, 0.25);
    --card-shadow-hover:      0 4px 12px rgba(0, 0, 0, 0.3);
    --btn-primary-bg:         #22c55e;
    --btn-primary-fg:         #0f1117;
    --input-bg:               #1a1d27;
    --input-border:           #2a2d3a;
    --input-focus:            #22c55e;
    --nav-active-bg:          rgba(34, 197, 94, 0.12);
    --nav-active-fg:          #22c55e;
    --nav-active-br:          rgba(34, 197, 94, 0.25);
    --bg-surface-drawer:      #1a1d27;
    --user-bg:                #1f222e;
    --user-accent:            #60a5fa;
    --user-border:            #363a4a;
    --topbar-bg:              rgba(26, 29, 39, 0.92);
    --topbar-border:          1px solid #2a2d3a;
    --glass-bg:               rgba(26, 29, 39, 0.92);
    --overlay-bg:             rgba(0, 0, 0, 0.55);
    --success-muted:          rgba(34, 197, 94, 0.08);
    --danger-muted:           rgba(239, 68, 68, 0.06);
    --warning-muted:          rgba(245, 158, 11, 0.08);
    --info-muted:             rgba(96, 165, 250, 0.06);
    --accent-gold:            #d4c04a;
    --accent-gold-hover:      #e0cc55;
    --accent-gold-muted:      rgba(212, 192, 74, 0.10);
    --steel:                  #8c8c8c;
    --steel-light:            #6b6b6b;

    --tier-excepcional:       #d4c04a;
    --tier-excepcional-bg:    rgba(212, 192, 74, 0.10);
    --tier-forte:             #22c55e;
    --tier-forte-bg:          rgba(34, 197, 94, 0.08);
    --tier-moderada:          #60a5fa;
    --tier-moderada-bg:       rgba(96, 165, 250, 0.08);
    --tier-fraca:             #64748b;
    --tier-fraca-bg:          rgba(100, 116, 139, 0.10);
}

/* Auto dark theme detection (when no explicit [data-theme]) */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]):not([data-theme="dark"]) {
        --bg-body:            #0f1117;
        --bg-surface:         #1a1d27;
        --bg-surface-2:       #242733;
        --bg-hover:           #1f222e;
        --bg-muted:           #1a1d27;
        --bg-elevated:        #242733;
        --bg-input:           #1a1d27;
        --bg-skeleton:        #242733;
        --border:             #2a2d3a;
        --border-strong:      #363a4a;
        --border-light:       #1f222e;
        --border-focus:       #22c55e;
        --text-primary:       #f4f5f7;
        --text-secondary:     #9ca3af;
        --text-dim:           #6b7280;
        --text-inverse:       #111827;
        --color-brand:        #22c55e;
        --color-brand-hover:  #16a34a;
        --color-brand-light:  rgba(0, 96, 57, 0.12);
        --color-brand-muted:  rgba(0, 96, 57, 0.10);
        --color-success:      #22c55e;
        --color-danger:       #ef4444;
        --color-warning:      #f59e0b;
        --color-info:         #60a5fa;
    }
}

/* Backward compat: .theme-light scoped overrides */
.theme-light {
    --bg-body:                #f7f8fa;
    --bg-surface:             #ffffff;
    --bg-surface-2:           #f3f4f6;
    --bg-hover:               #f9fafb;
    --bg-input:               #ffffff;
    --bg-elevated:            #ffffff;
    --border:                 #eef0f3;
    --border-strong:          #e2e5ea;
    --accent:                 #006039;
    --card-bg:                #ffffff;
    --card-border:            #eef0f3;
    --card-shadow:            0 1px 3px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.02);
    --card-shadow-hover:      0 4px 12px rgba(0, 0, 0, 0.04);
    --color-success:          #16a34a;
    --color-danger:           #ef4444;
    --color-warning:          #d97706;
    --color-info:             #3b82f6;
    --text-primary:           #111827;
    --text-secondary:         #6b7280;
    --text-dim:               #9ca3af;
}

/* Backward compat: .theme-dark scoped overrides */
.theme-dark {
    --bg-body:          #0f1117;
    --bg-surface:       #1a1d27;
    --bg-surface-2:     #242733;
    --bg-hover:         #1f222e;
    --bg-input:         #1a1d27;
    --bg-elevated:      #242733;
    --border:           #2a2d3a;
    --border-strong:    #363a4a;
    --border-focus:     #22c55e;
    --primary:          #22c55e;
    --primary-hover:    #16a34a;
    --primary-muted:    rgba(34, 197, 94, 0.10);
    --primary-dim:      rgba(34, 197, 94, 0.05);
    --primary-fg:       #0f1117;
    --secondary:        #60a5fa;
    --accent:           #3b82f6;
    --accent-muted:     rgba(59, 130, 246, 0.12);
    --accent-dim:       #1a2d50;
    --color-success:    #22c55e;
    --color-danger:     #ef4444;
    --color-warning:    #f59e0b;
    --color-info:       #60a5fa;
    --text-primary:     #f4f5f7;
    --text-secondary:   #9ca3af;
    --text-dim:         #6b7280;
    --text-inverse:     #111827;
    --card-bg:          #1a1d27;
    --card-border:      #2a2d3a;
    --card-shadow:      0 1px 3px rgba(0, 0, 0, 0.25);
    --card-shadow-hover:0 4px 12px rgba(0, 0, 0, 0.3);
    --btn-primary-bg:   #22c55e;
    --btn-primary-fg:   #0f1117;
    --input-bg:         #1a1d27;
    --input-border:     #2a2d3a;
    --input-focus:      #22c55e;
    --nav-active-bg:    rgba(34, 197, 94, 0.12);
    --nav-active-fg:    #22c55e;
    --nav-active-br:    rgba(34, 197, 94, 0.25);
    --bg-surface-drawer:#1a1d27;
    --user-bg:          #1f222e;
    --user-accent:      #60a5fa;
    --user-border:      #363a4a;
    --topbar-bg:        rgba(26, 29, 39, 0.92);
    --topbar-border:    1px solid #2a2d3a;
    --shadow-sm:        0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md:        0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg:        0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-xl:        0 16px 48px rgba(0, 0, 0, 0.5);
    --glass-bg:         rgba(26, 29, 39, 0.92);
    --overlay-bg:       rgba(0, 0, 0, 0.55);
    --success-muted:    rgba(34, 197, 94, 0.08);
    --danger-muted:     rgba(239, 68, 68, 0.06);
    --warning-muted:    rgba(245, 158, 11, 0.08);
    --info-muted:       rgba(96, 165, 250, 0.06);
    --accent-gold:      #D4C04A;
    --accent-gold-hover:#E0CC55;
    --accent-gold-muted:rgba(212, 192, 74, 0.10);
    --tier-excepcional:     #D4C04A;
    --tier-excepcional-bg:  rgba(212, 192, 74, 0.10);
    --tier-forte:           #22c55e;
    --tier-forte-bg:        rgba(34, 197, 94, 0.08);
    --tier-moderada:        #60a5fa;
    --tier-moderada-bg:     rgba(96, 165, 250, 0.08);
    --tier-fraca:           #64748b;
    --tier-fraca-bg:        rgba(100, 116, 139, 0.10);
    --steel:            #8C8C8C;
    --steel-light:      #6B6B6B;
}


/* ============================================================================
   SECTION 4 — CSS RESET & BASE
   ============================================================================ */

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-ui);
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: var(--leading-normal);
    font-size: var(--font-base);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--color-brand);
    text-decoration: none;
}
a:hover {
    color: var(--color-brand-hover);
}

::selection {
    background: rgba(0, 96, 57, 0.12);
    color: var(--text-primary);
}

:focus-visible {
    outline: 2px solid var(--color-brand);
    outline-offset: 2px;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-brand);
    color: white;
    padding: 8px 16px;
    z-index: 10000;
}
.skip-link:focus { top: 0; }

/* Scrollbar — thin and subtle */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }


/* ============================================================================
   SECTION 5 — TYPOGRAPHY UTILITIES
   ============================================================================ */

.text-xs        { font-size: var(--font-xs); }
.text-sm        { font-size: var(--font-sm); }
.text-base      { font-size: var(--font-base); }
.text-md        { font-size: var(--font-md); }
.text-lg        { font-size: var(--font-lg); }
.text-xl        { font-size: var(--font-xl); }
.text-2xl       { font-size: var(--font-2xl); }
.text-3xl       { font-size: var(--font-3xl); }
.font-mono      { font-family: var(--font-mono); }
.font-ui        { font-family: var(--font-ui); }
.text-primary   { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-dim       { color: var(--text-dim); }
.text-success   { color: var(--color-success); }
.text-danger    { color: var(--color-danger); }
.text-warning   { color: var(--color-warning); }
.text-info      { color: var(--color-info); }
.font-medium    { font-weight: var(--weight-medium); }
.font-semibold  { font-weight: var(--weight-semibold); }
.font-bold      { font-weight: var(--weight-bold); }
.tabular-nums   { font-variant-numeric: tabular-nums; }

/* Semantic color shorthand (used by JS renders) */
.g  { color: var(--color-success); }
.gb { color: var(--color-success); font-weight: var(--weight-bold); }
.r  { color: var(--color-danger); }
.rb { color: var(--color-danger); font-weight: var(--weight-bold); }
.a  { color: var(--color-warning); }
.c  { color: var(--color-info); }
.m  { color: var(--text-dim); }


/* ============================================================================
   SECTION 6 — LAYOUT
   ============================================================================ */

.app {
    display: flex;
    min-height: 100vh;
}

.page-content {
    flex: 1;
    margin-left: var(--sidebar-w, 240px);
    min-height: 100vh;
    transition: margin-left var(--duration-slow) var(--ease-out);
}

.sidebar.collapsed + .page-content {
    margin-left: var(--sidebar-collapsed-w, 72px);
}

.main {
    max-width: var(--content-max-w, 1480px);
    margin: 0 auto;
    padding: 0 var(--space-6) var(--space-6);
}

.main--wide {
    max-width: 100%;
}

.main--narrow {
    max-width: var(--content-narrow-w, 680px);
}

/* Page header pattern */
.page-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
}
.page-header h1 {
    font-size: var(--font-xl);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

/* Grid patterns */
.grid-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
}

.grid-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-5);
}

.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-5);
}

.grid-monitor {
    display: grid;
    grid-template-columns: 300px 1fr;
    height: calc(100vh - var(--topbar-h, 0));
    overflow: hidden;
}

/* Flex utilities */
.flex             { display: flex; }
.flex-col         { display: flex; flex-direction: column; }
.items-center     { align-items: center; }
.justify-between  { justify-content: space-between; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.mt-2  { margin-top: var(--space-2); }
.mt-3  { margin-top: var(--space-3); }
.mt-4  { margin-top: var(--space-4); }
.mb-2  { margin-bottom: var(--space-2); }
.mb-3  { margin-bottom: var(--space-3); }
.mb-4  { margin-bottom: var(--space-4); }
.hidden { display: none; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-right  { text-align: right; }
.text-center { text-align: center; }
.text-mono   { font-family: var(--font-mono); }


/* ============================================================================
   SECTION 7 — BUTTONS (Fintech Moderna)
   ============================================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: var(--font-sm);
    font-weight: 600;
    font-family: var(--font-ui);
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
}
.btn:hover {
    background: var(--bg-hover);
    border-color: var(--border-strong);
}
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }

/* Size variants */
.btn-sm { padding: 6px 12px; font-size: var(--font-xs); }
.btn-lg { padding: 12px 28px; font-size: var(--font-base); }

/* Icon-only */
.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Loading state */
.btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}
.btn.loading::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Primary */
.btn-primary {
    background: var(--color-brand);
    color: var(--text-inverse);
    border-color: var(--color-brand);
}
.btn-primary:hover {
    background: var(--color-brand-hover);
    border-color: var(--color-brand-hover);
    box-shadow: 0 4px 12px rgba(0, 96, 57, 0.15);
}

/* Secondary */
.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-strong);
}
.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--border-strong);
}

/* Danger */
.btn-danger {
    background: var(--color-danger-light);
    border-color: var(--color-danger-border);
    color: var(--color-danger);
}
.btn-danger:hover {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.25);
}

/* Ghost */
.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: transparent;
}
.btn-ghost:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Success */
.btn-success {
    background: var(--color-success-bg);
    border-color: var(--color-success-border);
    color: var(--color-success);
}
.btn-success:hover {
    background: rgba(22, 163, 74, 0.08);
    border-color: rgba(22, 163, 74, 0.25);
}

/* Legacy action buttons */
.btn-operar {
    padding: 6px 14px;
    border-radius: var(--radius-xs);
    border: 1px solid var(--color-success-border);
    background: var(--color-success-bg);
    color: var(--color-success);
    font-size: var(--font-xs);
    cursor: pointer;
    font-family: var(--font-mono);
    font-weight: var(--weight-bold);
    letter-spacing: 0.3px;
    transition: all var(--duration-normal) var(--ease-out);
}
.btn-operar:hover {
    background: rgba(22, 163, 74, 0.08);
    border-color: rgba(22, 163, 74, 0.25);
}
.btn-operar:active { transform: scale(0.98); }
.btn-operar.short {
    border-color: var(--color-danger-border);
    color: var(--color-danger);
    background: var(--color-danger-bg);
}
.btn-operar.short:hover {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.25);
}

.btn-chart {
    padding: 6px 14px;
    border-radius: var(--radius-xs);
    border: 1px solid var(--color-info-border);
    background: var(--color-info-bg);
    color: var(--color-info);
    font-size: var(--font-xs);
    cursor: pointer;
    font-family: var(--font-mono);
    font-weight: var(--weight-semibold);
    letter-spacing: 0.3px;
    transition: all var(--duration-normal) var(--ease-out);
}
.btn-chart:hover {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.25);
}
.btn-chart:active { transform: scale(0.98); }

.btn-tese {
    background: transparent;
    border: 1px solid var(--border-strong);
    color: var(--text-secondary);
    font-size: var(--font-xs);
    font-family: var(--font-mono);
    padding: 5px 14px;
    border-radius: var(--radius-xs);
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
}
.btn-tese:hover {
    background: var(--color-brand-light);
    border-color: rgba(0, 96, 57, 0.20);
    color: var(--color-brand);
}
.btn-tese:active { transform: scale(0.98); }

/* Tese actions: leverage selector + button */
.tese-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}
.alav-select {
    font-family: var(--font-mono);
    font-size: var(--font-xs);
    padding: 4px 6px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    background: var(--bg-surface);
    color: var(--text-secondary);
    cursor: pointer;
    transition: border-color var(--duration-fast);
}
.alav-select:hover { border-color: var(--border-strong); }
.alav-select:focus { border-color: var(--color-brand); outline: none; }

.btn-fechar {
    padding: 6px 14px;
    border-radius: var(--radius-xs);
    border: 1px solid var(--color-danger-border);
    background: var(--color-danger-bg);
    color: var(--color-danger);
    font-size: var(--font-xs);
    cursor: pointer;
    font-family: var(--font-mono);
    font-weight: var(--weight-bold);
    letter-spacing: 0.3px;
    transition: all var(--duration-normal) var(--ease-out);
}
.btn-fechar:hover {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.25);
}
.btn-fechar:active { transform: scale(0.98); }

.btn-edit {
    padding: 6px 14px;
    border-radius: var(--radius-xs);
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-size: var(--font-xs);
    cursor: pointer;
    font-family: var(--font-mono);
    font-weight: var(--weight-semibold);
    letter-spacing: 0.3px;
    transition: all var(--duration-normal) var(--ease-out);
}
.btn-edit:hover {
    color: var(--color-info);
    border-color: var(--color-info-border);
    background: var(--color-info-light);
}
.btn-edit:active { transform: scale(0.98); }

.btn-add-trade {
    display: inline-block;
    padding: 4px 14px;
    border-radius: var(--radius-xs);
    border: 1px solid var(--color-info-border);
    background: var(--color-info-bg);
    color: var(--color-info);
    font-size: var(--font-xs);
    font-weight: var(--weight-semibold);
    font-family: var(--font-mono);
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
}
.btn-add-trade:hover {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.25);
}

.btn-copy {
    padding: 4px 10px;
    border-radius: var(--radius-xs);
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-dim);
    font-size: var(--font-xs);
    cursor: pointer;
    font-family: var(--font-mono);
    font-weight: var(--weight-semibold);
    transition: all var(--duration-normal) var(--ease-out);
}
.btn-copy:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-strong);
}
.btn-copy.copied {
    background: var(--color-success-bg);
    color: var(--color-success);
    border-color: var(--color-success-border);
}


/* ============================================================================
   SECTION 8 — CARDS (Fintech Moderna)
   ============================================================================ */

.card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--duration-normal) var(--ease-out),
                border-color var(--duration-normal) var(--ease-out);
}
.card:hover {
    box-shadow: var(--shadow-md);
}

.card--section {
    padding: 0;
}
.card--section .card-header {
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--border);
}

.card--metric {
    text-align: center;
    padding: var(--space-5);
}

.card--featured {
    border-left: 3px solid var(--color-brand);
    background: var(--color-brand-muted);
}

.card--danger {
    border-left: 3px solid var(--color-danger);
    background: var(--color-danger-light);
}

.card--interactive {
    cursor: pointer;
}
.card--interactive:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-sm);
}

/* Size variants */
.card-sm { padding: var(--space-4) var(--space-4); border-radius: var(--radius-sm); }
.card-lg { padding: var(--space-8); border-radius: var(--radius-lg); }

/* Legacy aliases */
.section-card,
.summary-card,
.stat-card,
.metric-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
}

.metric-label {
    font-size: var(--font-xs);
    font-weight: var(--weight-semibold);
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.metric-value {
    font-family: var(--font-mono);
    font-size: 22px;
    font-weight: var(--weight-bold);
    color: var(--text-primary);
    line-height: var(--leading-tight);
}
.metric-sub {
    font-family: var(--font-mono);
    font-size: var(--font-xs);
    color: var(--text-dim);
    margin-top: 4px;
}

.section-title {
    font-family: var(--font-ui);
    font-size: var(--font-sm);
    font-weight: var(--weight-bold);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: var(--space-5);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--border);
}

.divider {
    height: 1px;
    background: var(--border);
    margin: var(--space-5) 0;
}


/* ============================================================================
   SECTION 9 — TABLES (Fintech Moderna)
   ============================================================================ */

/* New design-system table classes */
.table-container {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-mono);
    font-size: var(--font-sm);
}

.table thead th {
    padding: 10px 14px;
    font-size: var(--font-xs);
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-strong);
    background: var(--bg-surface-2);
    position: sticky;
    top: 0;
    z-index: 1;
    white-space: nowrap;
    text-align: right;
}
.table thead th:first-child,
.table thead th:nth-child(2) {
    text-align: left;
}

.table thead th[data-sort] {
    cursor: pointer;
    user-select: none;
}
.table thead th[data-sort]:hover {
    color: var(--text-secondary);
}
.table thead th[data-sort]::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 4px;
    vertical-align: middle;
}
.table thead th[data-sort="asc"]::after {
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
    border-bottom: 4px solid currentColor;
}
.table thead th[data-sort="desc"]::after {
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
    border-top: 4px solid currentColor;
}

.table tbody tr {
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-surface);
    transition: background var(--duration-fast);
}
.table tbody tr:nth-child(even) {
    background: var(--bg-surface-2);
}
.table tbody tr:hover {
    background: var(--bg-hover);
}
.table tbody tr:last-child { border-bottom: none; }

.table tbody td {
    padding: 10px 14px;
    text-align: right;
    white-space: nowrap;
    color: var(--text-primary);
    font-size: var(--font-sm);
    font-variant-numeric: tabular-nums;
}

/* Legacy bare table styles (used directly as <table> in existing pages) */
table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-mono);
    font-size: var(--font-sm);
}
thead th {
    padding: 10px 14px;
    text-align: right;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: var(--font-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-strong);
    white-space: nowrap;
    background: var(--bg-surface-2);
    position: sticky;
    top: 0;
    z-index: 1;
}
thead th:first-child,
thead th:nth-child(2) { text-align: left; }

tbody tr {
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-surface);
    transition: background var(--duration-fast);
    border-left: 3px solid transparent;
}
tbody tr:nth-child(even) { background: var(--bg-surface-2); }
tbody tr:hover           { background: var(--bg-hover); }
tbody tr:last-child      { border-bottom: none; }

/* Row strength accents */
tbody tr.str-sf { border-left-color: #047857; }
tbody tr.str-s  { border-left-color: #16a34a; }
tbody tr.str-rf { border-left-color: #9b1c1c; }
tbody tr.str-r  { border-left-color: #ef4444; }

td {
    padding: 10px 14px;
    text-align: right;
    white-space: nowrap;
    vertical-align: middle;
    color: var(--text-primary);
}
td:first-child  { text-align: center; color: var(--text-dim); width: 28px; font-size: var(--font-xs); }
td:nth-child(2) { text-align: left; font-weight: var(--weight-bold); font-size: var(--font-sm); letter-spacing: 0.2px; }

/* Table sections */
.tbl-section {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: var(--space-4);
}
.tbl-section.long  { border-top: 3px solid var(--color-success); }
.tbl-section.short { border-top: 3px solid var(--color-danger); }

.tbl-header {
    padding: 12px var(--space-5);
    font-size: var(--font-sm);
    font-weight: var(--weight-bold);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    border-bottom: 1px solid var(--border);
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    background: transparent;
}
.tbl-header.long  { color: var(--color-success); }
.tbl-header.short { color: var(--color-danger); }
.tbl-header .cnt {
    font-size: var(--font-xs);
    font-weight: var(--weight-normal);
    color: var(--text-dim);
    letter-spacing: 0;
    text-transform: none;
}

/* Stats table (monitor page) */
.stats-table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: var(--font-sm); }
.stats-table th {
    padding: var(--space-3) var(--space-4);
    text-align: left;
    font-size: var(--font-xs);
    font-weight: var(--weight-semibold);
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-bottom: 2px solid var(--border);
    background: transparent;
}
.stats-table td {
    padding: 10px var(--space-4);
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    text-align: left;
}
.stats-table tr:last-child td { border-bottom: none; }
.stats-table tr:hover td { background: var(--bg-hover); }


/* ============================================================================
   SECTION 10 — BADGES & PILLS (Fintech Moderna)
   ============================================================================ */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: var(--radius-xs);
    font-size: var(--font-xs);
    font-weight: 600;
    font-family: var(--font-mono);
    letter-spacing: 0.3px;
    white-space: nowrap;
    background: var(--bg-surface-2);
    color: var(--text-secondary);
    line-height: 1.4;
}
.badge-success { background: var(--color-success-bg); color: var(--color-success); border: 1px solid var(--color-success-border); }
.badge-danger  { background: var(--color-danger-bg); color: var(--color-danger); border: 1px solid var(--color-danger-border); }
.badge-warning { background: var(--color-warning-bg); color: var(--color-warning); border: 1px solid var(--color-warning-border); }
.badge-info    { background: var(--color-info-bg); color: var(--color-info); border: 1px solid var(--color-info-border); }
.badge-neutral { background: var(--bg-muted); color: var(--text-dim); border: 1px solid var(--border); }
.badge-premium,
.badge-gold    { background: rgba(201, 176, 55, 0.08); color: #92730e; border: 1px solid rgba(201, 176, 55, 0.18); }

/* Pills (full border-radius variant, same as badge but with thicker padding) */
.pill {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: var(--font-xs);
    font-weight: var(--weight-semibold);
    font-family: var(--font-mono);
    letter-spacing: 0.3px;
}

/* Status dot */
.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    display: inline-block;
}

/* Direction badges */
.badge-long {
    background: var(--color-success-bg);
    color: var(--color-success);
    font-size: var(--font-xs);
    font-weight: var(--weight-bold);
    padding: 3px 10px;
    border-radius: var(--radius-xs);
    letter-spacing: 0.5px;
}
.badge-short {
    background: var(--color-danger-bg);
    color: var(--color-danger);
    font-size: var(--font-xs);
    font-weight: var(--weight-bold);
    padding: 3px 10px;
    border-radius: var(--radius-xs);
    letter-spacing: 0.5px;
}

/* Tier badges */
.tier-excepcional {
    background: var(--tier-excepcional-bg);
    color: var(--tier-excepcional);
    border: 1px solid var(--tier-excepcional);
}
.tier-forte {
    background: var(--tier-forte-bg);
    color: var(--tier-forte);
    border: 1px solid var(--tier-forte);
}
.tier-moderada {
    background: var(--tier-moderada-bg);
    color: var(--tier-moderada);
    border: 1px solid var(--tier-moderada);
}
.tier-fraca {
    background: var(--tier-fraca-bg);
    color: var(--tier-fraca);
    border: 1px solid var(--tier-fraca);
}

/* Score cells */
.score-cell {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius-xs);
    font-weight: var(--weight-bold);
    font-size: var(--font-sm);
    min-width: 44px;
    text-align: center;
    letter-spacing: 0.2px;
}
.sc-sf { background: rgba(22, 163, 74, 0.10); color: #047857; }
.sc-s  { background: rgba(22, 163, 74, 0.06); color: #16a34a; }
.sc-n  { background: rgba(156, 163, 175, 0.10); color: var(--text-dim); }
.sc-r  { background: rgba(239, 68, 68, 0.06); color: #ef4444; }
.sc-rf { background: rgba(239, 68, 68, 0.10); color: #b91c1c; }

/* Tendency badges */
.tend {
    display: inline-block;
    padding: 3px 8px;
    border-radius: var(--radius-xs);
    font-size: var(--font-xs);
    font-weight: var(--weight-bold);
    letter-spacing: 0.4px;
}
.tend-af { background: rgba(22, 163, 74, 0.08); color: #047857; }
.tend-a  { background: rgba(22, 163, 74, 0.05); color: #16a34a; }
.tend-l  { background: rgba(156, 163, 175, 0.08); color: var(--text-dim); }
.tend-b  { background: rgba(239, 68, 68, 0.05); color: #ef4444; }
.tend-bf { background: rgba(239, 68, 68, 0.10); color: #b91c1c; }

/* EMA badges */
.ema-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: var(--radius-xs);
    font-size: var(--font-xs);
    font-weight: var(--weight-bold);
    letter-spacing: 0.3px;
}
.ema-bull    { background: rgba(22, 163, 74, 0.08); color: #047857; }
.ema-bear    { background: rgba(239, 68, 68, 0.08); color: #ef4444; }
.ema-neutral { background: rgba(156, 163, 175, 0.08); color: var(--text-dim); }

/* IV badges */
.iv-badge {
    font-size: var(--font-xs);
    font-weight: var(--weight-semibold);
    padding: 2px 8px;
    border-radius: var(--radius-xs);
    font-family: var(--font-mono);
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.iv-badge.iv-dim    { background: rgba(156, 163, 175, 0.08); color: var(--text-dim); }
.iv-badge.iv-cyan   { background: rgba(59, 130, 246, 0.06); color: #3b82f6; }
.iv-badge.iv-orange { background: rgba(217, 119, 6, 0.08); color: #d97706; }
.iv-badge.iv-red    { background: rgba(239, 68, 68, 0.08); color: #ef4444; }

/* GEX badges */
.gex-badge {
    font-size: var(--font-xs);
    font-weight: var(--weight-semibold);
    padding: 2px 8px;
    border-radius: var(--radius-xs);
    font-family: var(--font-mono);
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.gex-badge.gex-green { background: rgba(22, 163, 74, 0.08); color: #16a34a; }
.gex-badge.gex-dim   { background: rgba(156, 163, 175, 0.08); color: var(--text-dim); }
.gex-badge.gex-red   { background: rgba(239, 68, 68, 0.08); color: #ef4444; }

/* Opportunity badges */
.opp-badge {
    font-size: var(--font-xs);
    font-weight: var(--weight-semibold);
    padding: 3px 8px;
    border-radius: var(--radius-xs);
    font-family: var(--font-mono);
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.opp-badge.opp-exc    { background: rgba(201, 176, 55, 0.10); color: #92730e; font-weight: var(--weight-bold); }
.opp-badge.opp-forte  { background: rgba(22, 163, 74, 0.08); color: #047857; }
.opp-badge.opp-mod    { background: rgba(59, 130, 246, 0.06); color: #3b82f6; }
.opp-badge.opp-fraca  { background: rgba(156, 163, 175, 0.08); color: var(--text-dim); }
.opp-badge.opp-neutro { background: rgba(156, 163, 175, 0.06); color: var(--text-dim); }

/* PHS badge */
.phs-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: var(--font-xs);
    font-weight: var(--weight-bold);
    font-family: var(--font-mono);
    cursor: help;
    box-shadow: 0 0 0 1.5px currentColor;
}
.phs-badge.phs-green  { background: rgba(22, 163, 74, 0.10); color: #047857; }
.phs-badge.phs-cyan   { background: rgba(59, 130, 246, 0.08); color: #3b82f6; }
.phs-badge.phs-yellow { background: rgba(217, 119, 6, 0.08); color: #d97706; }
.phs-badge.phs-orange { background: rgba(234, 88, 12, 0.08); color: #ea580c; }
.phs-badge.phs-red    { background: rgba(239, 68, 68, 0.10); color: #ef4444; animation: pulse-dot 1s infinite; }

/* Confidence badge */
.conf-badge {
    font-size: var(--font-xs);
    font-weight: var(--weight-bold);
    padding: 2px 8px;
    border-radius: var(--radius-xs);
    font-family: var(--font-mono);
}
.conf-badge.g { background: rgba(22, 163, 74, 0.10); color: #047857; }
.conf-badge.a { background: rgba(217, 119, 6, 0.10); color: #d97706; }
.conf-badge.r { background: rgba(239, 68, 68, 0.10); color: #ef4444; }

/* Regime tag */
.regime-tag {
    font-size: var(--font-xs);
    font-weight: var(--weight-semibold);
    letter-spacing: 0.4px;
    padding: 3px 8px;
    border-radius: var(--radius-xs);
    display: inline-flex;
    align-items: center;
    gap: 3px;
    cursor: help;
    white-space: nowrap;
    flex-shrink: 0;
}
.regime-tag.g  { background: rgba(22, 163, 74, 0.08); color: #047857; }
.regime-tag.c  { background: rgba(59, 130, 246, 0.06); color: #3b82f6; }
.regime-tag.r  { background: rgba(239, 68, 68, 0.08); color: #ef4444; }
.regime-tag.rb { background: rgba(239, 68, 68, 0.12); color: #b91c1c; }
.regime-tag.m  { background: rgba(156, 163, 175, 0.08); color: var(--text-dim); }
.regime-ico    { font-size: 8px; line-height: 1; }

/* UC tier badges (from ultron-components) */
.uc-tier {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 12px;
    border-radius: var(--radius-full);
    font-size: var(--font-xs);
    font-weight: 700;
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
}
.uc-tier.excepcional { background: var(--tier-excepcional-bg); color: var(--tier-excepcional); border: 1px solid var(--tier-excepcional); }
.uc-tier.forte       { background: var(--tier-forte-bg); color: var(--tier-forte); border: 1px solid var(--tier-forte); }
.uc-tier.moderada    { background: var(--tier-moderada-bg); color: var(--tier-moderada); border: 1px solid var(--tier-moderada); }
.uc-tier.fraca       { background: var(--tier-fraca-bg); color: var(--tier-fraca); border: 1px solid var(--tier-fraca); }


/* ============================================================================
   SECTION 11 — FORMS (Fintech Moderna)
   ============================================================================ */

.input {
    width: 100%;
    padding: 8px 12px;
    font-size: var(--font-base);
    font-family: var(--font-ui);
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
    outline: none;
}
.input:hover { border-color: var(--border-strong); }
.input:focus {
    border-color: var(--color-brand);
    box-shadow: var(--shadow-focus);
}
.input::placeholder { color: var(--text-dim); }
.input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--bg-surface-2);
}
.input--mono {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}

.form-group { margin-bottom: var(--space-5); }
.form-label {
    display: block;
    font-size: var(--font-sm);
    font-weight: var(--weight-semibold);
    color: var(--text-secondary);
    margin-bottom: var(--space-1);
    letter-spacing: 0.3px;
}
.form-hint {
    font-size: var(--font-xs);
    color: var(--text-dim);
    margin-top: var(--space-1);
}

.select {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: var(--font-base);
    font-family: var(--font-ui);
    padding: 10px 14px;
    outline: none;
    transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}
.select:hover { border-color: var(--border-strong); }
.select:focus {
    border-color: var(--color-brand);
    box-shadow: var(--shadow-focus);
}

/* Toggle switch */
.toggle {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-track {
    position: absolute;
    inset: 0;
    background: var(--border-strong);
    border-radius: 11px;
    cursor: pointer;
    transition: background var(--duration-normal);
}
.toggle-track::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    transition: transform var(--duration-normal);
}
.toggle input:checked + .toggle-track { background: var(--color-brand); }
.toggle input:checked + .toggle-track::after { transform: translateX(18px); }

/* UC switch (from ultron-components) */
.uc-switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.uc-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.uc-switch-track {
    position: absolute; inset: 0; background: var(--border-strong); border-radius: 11px;
    cursor: pointer; transition: background 0.2s ease;
}
.uc-switch-track::after {
    content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
    border-radius: 50%; background: #ffffff; box-shadow: var(--shadow-sm); transition: transform 0.2s ease;
}
.uc-switch input:checked + .uc-switch-track { background: var(--color-brand); }
.uc-switch input:checked + .uc-switch-track::after { transform: translateX(18px); }
.uc-switch input:focus-visible + .uc-switch-track { outline: 2px solid var(--border-focus); outline-offset: 2px; }

/* Bare input/select/textarea (legacy) */
input, select, textarea {
    font-family: var(--font-ui);
    font-size: var(--font-sm);
    color: var(--text-primary);
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--input-radius);
    transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--color-brand);
    box-shadow: var(--shadow-focus);
}
input::placeholder, textarea::placeholder { color: var(--text-dim); }


/* ============================================================================
   SECTION 12 — MODALS (Fintech Moderna)
   ============================================================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.5);
    backdrop-filter: blur(4px);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--duration-slow);
}
.modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 480px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 0;
    transform: translateY(8px) scale(0.98);
    transition: transform var(--duration-slow) var(--ease-out);
}
.modal-overlay.open .modal {
    transform: translateY(0) scale(1);
}

.modal-header {
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--border);
}
.modal-title {
    font-size: var(--font-lg);
    font-weight: var(--weight-bold);
    color: var(--text-primary);
}
.modal-body {
    padding: var(--space-5) var(--space-6);
}
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-6);
    border-top: 1px solid var(--border);
}

/* Trade modal (tm-*) */
.tm-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(17, 24, 39, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn var(--duration-normal) var(--ease-out);
}
@keyframes modalFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.tm-modal {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: var(--space-7);
    width: 420px;
    max-width: 95vw;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn var(--duration-normal) var(--ease-out);
}
@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.tm-title {
    font-size: var(--font-md);
    font-weight: var(--weight-bold);
    margin-bottom: var(--space-5);
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}
.tm-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.tm-label {
    font-size: var(--font-xs);
    color: var(--text-secondary);
    min-width: 80px;
    font-family: var(--font-ui);
    letter-spacing: 0.3px;
}
.tm-input {
    flex: 1;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: var(--font-sm);
    transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.tm-input:focus {
    outline: none;
    border-color: var(--color-brand);
    box-shadow: var(--shadow-focus);
}
.tm-toggle {
    display: flex;
    gap: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border);
}
.tm-toggle button {
    flex: 1;
    padding: 8px 16px;
    border: none;
    font-size: var(--font-xs);
    font-weight: var(--weight-semibold);
    font-family: var(--font-mono);
    cursor: pointer;
    background: var(--bg-surface);
    color: var(--text-dim);
    transition: all var(--duration-fast) var(--ease-out);
    letter-spacing: 0.3px;
}
.tm-toggle button.active { background: var(--color-brand); color: #ffffff; }
.tm-toggle button:hover:not(.active) { background: var(--bg-hover); color: var(--text-primary); }
.tm-actions {
    display: flex;
    gap: var(--space-2);
    margin-top: var(--space-5);
    padding-top: var(--space-3);
    border-top: 1px solid var(--border);
}
.tm-actions .btn { flex: 1; padding: 10px; text-align: center; font-size: var(--font-sm); }

/* Edit modal (em-*) */
.em-overlay {
    position: fixed;
    inset: 0;
    z-index: 9997;
    background: rgba(17, 24, 39, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn var(--duration-normal) var(--ease-out);
}
.em-modal {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: var(--space-7);
    width: 440px;
    max-width: 95vw;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn var(--duration-normal) var(--ease-out);
}
.em-title {
    font-size: var(--font-md);
    font-weight: var(--weight-bold);
    margin-bottom: var(--space-5);
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
    color: var(--text-primary);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--border);
}
.em-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.em-label { font-size: var(--font-xs); color: var(--text-secondary); min-width: 95px; font-family: var(--font-ui); letter-spacing: 0.3px; }
.em-input {
    flex: 1;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: var(--font-sm);
    transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.em-input:focus { outline: none; border-color: var(--color-brand); box-shadow: var(--shadow-focus); }
.em-actions {
    display: flex;
    gap: var(--space-2);
    margin-top: var(--space-5);
    padding-top: var(--space-3);
    border-top: 1px solid var(--border);
}
.em-actions .btn { flex: 1; padding: 10px; text-align: center; font-size: var(--font-sm); }

/* TradingView chart modal */
.tv-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(17, 24, 39, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn var(--duration-normal) var(--ease-out);
}
.tv-modal {
    width: 80vw;
    max-width: none;
    height: 80vh;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-xl);
}
.tv-close {
    position: absolute;
    top: 8px; right: 12px; z-index: 10;
    background: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 28px; height: 28px;
    font-size: 14px;
    cursor: pointer;
    line-height: 28px;
    text-align: center;
    transition: background var(--duration-fast);
}
.tv-close:hover { background: rgba(239, 68, 68, 0.75); }
.tv-modal iframe { width: 100%; height: 100%; border: none; }


/* ============================================================================
   SECTION 13 — LOADING STATES (Fintech Moderna)
   ============================================================================ */

.skeleton {
    background: var(--bg-skeleton);
    border-radius: var(--radius-sm);
    position: relative;
    overflow: hidden;
}
.skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s ease-in-out infinite;
}
.skeleton--text    { height: 14px; width: 60%; margin-bottom: 8px; }
.skeleton--text-sm { height: 12px; width: 40%; }
.skeleton--metric  { height: 36px; width: 80px; }
.skeleton--row     { height: 44px; width: 100%; margin-bottom: 4px; }
.skeleton--card    { height: 120px; width: 100%; }

.spinner {
    width: 36px;
    height: 36px;
    border: 2px solid var(--border);
    border-top-color: var(--color-brand);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    gap: var(--space-5);
}
.loading-text {
    color: var(--text-dim);
    font-family: var(--font-ui);
    font-size: var(--font-sm);
    letter-spacing: 0.3px;
}
.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.empty {
    text-align: center;
    padding: 32px 16px;
    color: var(--text-dim);
    font-size: var(--font-sm);
    font-family: var(--font-ui);
}


/* ============================================================================
   SECTION 14 — ANIMATIONS & KEYFRAMES
   ============================================================================ */

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

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.4; }
}

@keyframes flash-up {
    0%   { background-color: rgba(22, 163, 74, 0.12); }
    100% { background-color: transparent; }
}

@keyframes flash-down {
    0%   { background-color: rgba(239, 68, 68, 0.12); }
    100% { background-color: transparent; }
}

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

@keyframes slideInLeft {
    from { transform: translateX(-100%); }
    to   { transform: translateX(0); }
}

@keyframes popIn {
    0%   { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.55; }
}

@keyframes liquidar-pulse {
    0%, 100% { border-color: var(--color-danger-border); opacity: 1; }
    50%       { border-color: rgba(239, 68, 68, 0.06); opacity: 0.85; }
}

/* UC component animations */
@keyframes uc-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes uc-fade-out {
    from { opacity: 1; }
    to   { opacity: 0; }
}
@keyframes uc-slide-up {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes uc-scale-in {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes uc-toast-in {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes uc-toast-out {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(20px); }
}
@keyframes uc-shimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
@keyframes uc-danger-pulse {
    0%, 100% { border-left-color: var(--color-danger); }
    50% { border-left-color: rgba(239, 68, 68, 0.3); }
}
@keyframes uc-live-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--success-muted); }
    50%      { opacity: 0.6; box-shadow: 0 0 0 6px transparent; }
}
@keyframes uc-progress-indeterminate {
    0%   { margin-left: -30%; }
    100% { margin-left: 100%; }
}

/* Price flash utility classes */
.price-up   { animation: flash-up 0.6s ease-out; }
.price-down { animation: flash-down 0.6s ease-out; }

/* UC animation utility classes */
.uc-fade-in  { animation: uc-fade-in 0.2s ease forwards; }
.uc-fade-out { animation: uc-fade-out 0.2s ease forwards; }
.uc-slide-up { animation: uc-slide-up 0.25s ease forwards; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}


/* ============================================================================
   SECTION 15 — TOAST NOTIFICATIONS
   ============================================================================ */

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
    max-width: 380px;
}

.toast {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: var(--font-base);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-lg);
    animation: slideInRight var(--duration-normal) var(--ease-out);
    cursor: pointer;
}
.toast--success {
    background: var(--color-success-light);
    border: 1px solid var(--color-success-border);
    color: var(--color-success);
}
.toast--error {
    background: var(--color-danger-light);
    border: 1px solid var(--color-danger-border);
    color: var(--color-danger);
}
.toast--warning {
    background: var(--color-warning-light);
    border: 1px solid var(--color-warning-border);
    color: var(--color-warning);
}
.toast--info {
    background: var(--color-info-light);
    border: 1px solid var(--color-info-border);
    color: var(--color-info);
}

/* UC toast system (from ultron-components) */
.uc-toast-container {
    position: fixed;
    top: calc(var(--topbar-h, 0px) + 12px);
    right: 16px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 400px;
}
.uc-toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    font-size: var(--font-sm);
    color: var(--text-primary);
    animation: uc-toast-in 0.3s ease forwards;
    min-width: 280px;
}
.uc-toast.removing { animation: uc-toast-out 0.2s ease forwards; }
.uc-toast.success { border-left: 3px solid var(--color-success); }
.uc-toast.error   { border-left: 3px solid var(--color-danger); }
.uc-toast.warning { border-left: 3px solid var(--color-warning); }
.uc-toast.info    { border-left: 3px solid var(--color-info); }
.uc-toast-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.uc-toast-content { flex: 1; min-width: 0; }
.uc-toast-title { font-weight: 700; margin-bottom: 2px; }
.uc-toast-msg { color: var(--text-secondary); line-height: 1.4; }
.uc-toast-close {
    background: none; border: none; color: var(--text-dim);
    cursor: pointer; font-size: 16px; padding: 0 2px; line-height: 1; flex-shrink: 0;
}


/* ============================================================================
   SECTION 16 — STATUS BAR
   ============================================================================ */

.status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-2);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-5);
    margin-bottom: var(--space-4);
}
.status-left { display: flex; align-items: center; gap: var(--space-3); }
.status-right { display: flex; align-items: center; gap: 12px; }
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: var(--font-xs);
    font-weight: var(--weight-semibold);
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.status-badge.scanning {
    background: var(--color-warning-light);
    color: var(--color-warning);
    animation: pulse 2s ease-in-out infinite;
}
.status-badge.ready { background: var(--color-success-light); color: var(--color-success); }
.status-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.countdown { font-family: var(--font-mono); font-size: var(--font-xs); color: var(--text-dim); letter-spacing: 0.3px; }
.update-time { font-family: var(--font-mono); font-size: var(--font-xs); color: var(--text-dim); }
.strat-perf { font-family: var(--font-mono); font-size: var(--font-xs); color: var(--text-dim); margin-right: var(--space-2); }


/* ============================================================================
   SECTION 17 — PROGRESS BAR
   ============================================================================ */

.progress-wrap {
    height: 3px;
    background: var(--bg-surface-2);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-4);
    display: none;
    overflow: hidden;
}
.progress-wrap.active { display: block; }
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-brand), var(--color-info));
    border-radius: var(--radius-full);
    transition: width 0.4s var(--ease-out);
    width: 0%;
    position: relative;
}
.progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    animation: shimmer 2s infinite;
}

/* UC progress bar (from ultron-components) */
.uc-progress { width: 100%; height: 6px; background: var(--bg-surface-2); border-radius: 3px; overflow: hidden; }
.uc-progress-fill { height: 100%; border-radius: 3px; background: var(--color-brand); transition: width 0.4s ease; }
.uc-progress-fill.success { background: var(--color-success); }
.uc-progress-fill.danger  { background: var(--color-danger); }
.uc-progress-fill.warning { background: var(--color-warning); }
.uc-progress.indeterminate .uc-progress-fill { width: 30%; animation: uc-progress-indeterminate 1.5s ease-in-out infinite; }


/* ============================================================================
   SECTION 18 — LIQUIDAR BANNER
   ============================================================================ */

.liq-banner {
    display: none;
    background: var(--color-danger-light);
    border: 1px solid var(--color-danger-border);
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-5);
    margin-bottom: var(--space-4);
    font-family: var(--font-mono);
    font-size: var(--font-xs);
    color: var(--color-danger);
    font-weight: var(--weight-semibold);
    letter-spacing: 0.3px;
    animation: liquidar-pulse 2s ease-in-out infinite;
}
.liq-banner.show {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
}


/* ============================================================================
   SECTION 19 — MARKET PULSE (hero metrics strip)
   ============================================================================ */

.pulse {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    flex-wrap: wrap;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-5) var(--space-6);
    margin-bottom: var(--space-4);
    font-family: var(--font-mono);
    font-size: var(--font-sm);
}
.pulse-bar { flex: 1; min-width: 220px; }
.dist-bar { display: flex; height: 28px; border-radius: var(--radius-xs); overflow: hidden; gap: 2px; }
.dist-bar .seg {
    display: flex; align-items: center; justify-content: center;
    font-size: var(--font-xs); font-weight: var(--weight-bold); font-family: var(--font-mono);
    color: #ffffff; min-width: 2px; transition: width 0.3s var(--ease-out); border-radius: 3px;
}
.seg-lf { background: #047857; }
.seg-l  { background: #16a34a; }
.seg-n  { background: #9ca3af; }
.seg-s  { background: #ef4444; }
.seg-sf { background: #b91c1c; }

.pulse-stats { display: flex; gap: var(--space-5); flex-wrap: wrap; }
.pulse-stat  { text-align: center; min-width: 48px; }
.pulse-stat .ps-label { font-size: var(--font-xs); text-transform: uppercase; color: var(--text-dim); letter-spacing: 0.5px; margin-bottom: 2px; }
.pulse-stat .ps-val { font-size: 20px; font-weight: var(--weight-bold); line-height: var(--leading-tight); }
.pulse-pnl {
    margin-left: auto; display: flex; gap: var(--space-4); align-items: center;
    font-family: var(--font-mono); font-size: var(--font-sm);
    padding-left: var(--space-5); border-left: 1px solid var(--border);
}
.pulse-pnl .pp-item { text-align: center; min-width: 60px; }
.pulse-pnl .pp-label { font-size: var(--font-xs); text-transform: uppercase; color: var(--text-dim); letter-spacing: 0.5px; margin-bottom: 2px; }
.pulse-pnl .pp-val { font-size: var(--font-md); font-weight: var(--weight-bold); line-height: var(--leading-tight); }


/* ============================================================================
   SECTION 20 — CATEGORY TABS
   ============================================================================ */

.cat-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: var(--space-3);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
    flex: 1;
    padding: 8px 16px;
    text-align: center;
    font-size: var(--font-xs);
    font-weight: var(--weight-semibold);
    font-family: var(--font-mono);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-dim);
    border: none;
    background: transparent;
    transition: all var(--duration-fast) var(--ease-out);
    white-space: nowrap;
    letter-spacing: 0.5px;
}
.cat-tab:hover { color: var(--text-secondary); background: var(--bg-hover); }
.cat-tab.active { background: var(--bg-surface); color: var(--text-primary); box-shadow: var(--shadow-xs); font-weight: var(--weight-bold); }
.cat-tab[data-cat="ALL"].active       { color: var(--color-brand); background: var(--color-brand-light); }
.cat-tab[data-cat="PAYMENT"].active   { color: #0284c7; background: #e0f2fe; }
.cat-tab[data-cat="SMART"].active     { color: var(--color-success); background: var(--color-success-light); }
.cat-tab[data-cat="UTILITY"].active   { color: var(--color-warning); background: var(--color-warning-light); }
.cat-tab[data-cat="MEME"].active      { color: #7c3aed; background: #f5f3ff; }
.cat-tab[data-cat="STABLECOIN"].active{ color: #0d9488; background: #f0fdfa; }


/* ============================================================================
   SECTION 21 — CONTENT TABS
   ============================================================================ */

.content-tabs {
    display: flex;
    gap: 0;
    margin-bottom: var(--space-5);
    border-bottom: 1px solid var(--border);
}
.ct-tab {
    padding: 12px 24px;
    font-size: var(--font-sm);
    font-weight: var(--weight-bold);
    font-family: var(--font-mono);
    cursor: pointer;
    color: var(--text-dim);
    border: none;
    background: transparent;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color var(--duration-fast), border-color var(--duration-fast);
    letter-spacing: 0.5px;
}
.ct-tab:hover { color: var(--text-secondary); }
.ct-tab.active { color: var(--color-brand); border-bottom-color: var(--color-brand); }
.ct-pane        { display: none; }
.ct-pane.active { display: block; }


/* ============================================================================
   SECTION 22 — CATEGORY ACCORDION & CARDS
   ============================================================================ */

.cat-accordion { margin-bottom: var(--space-4); }
.cat-acc-toggle {
    display: flex; align-items: center; gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
    cursor: pointer; font-size: var(--font-xs); font-weight: var(--weight-semibold);
    color: var(--text-secondary); font-family: var(--font-mono); width: 100%; text-align: left;
    transition: background var(--duration-fast);
}
.cat-acc-toggle:hover { background: var(--bg-hover); }
.cat-acc-toggle .chevron { transition: transform 0.2s var(--ease-out); font-size: 8px; }
.cat-acc-toggle.open .chevron { transform: rotate(90deg); }
.cat-acc-body { display: none; margin-top: 8px; }
.cat-acc-body.open {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-3);
}

.cat-card {
    background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-md);
    padding: var(--space-5); border-top: 3px solid var(--border);
    transition: border-color var(--duration-fast), box-shadow var(--duration-normal);
}
.cat-card:hover { border-color: var(--border-strong); }
.cat-card.payment { border-top-color: #0284c7; }
.cat-card.smart   { border-top-color: var(--color-success); }
.cat-card.utility { border-top-color: var(--color-warning); }
.cat-card.meme    { border-top-color: #7c3aed; }
.cat-card .cat-name { font-size: var(--font-sm); font-weight: var(--weight-bold); margin-bottom: 6px; letter-spacing: 0.3px; color: var(--text-primary); }
.cat-card.payment .cat-name { color: #0284c7; }
.cat-card.smart .cat-name   { color: var(--color-success); }
.cat-card.utility .cat-name { color: var(--color-warning); }
.cat-card.meme .cat-name    { color: #7c3aed; }
.cat-card .cat-desc { font-size: var(--font-xs); color: var(--text-dim); margin-bottom: var(--space-3); line-height: 1.5; }
.cat-card .cat-stats { display: flex; gap: var(--space-3); font-size: var(--font-xs); font-family: var(--font-mono); }
.cat-card .stat-label { font-size: var(--font-xs); color: var(--text-dim); letter-spacing: 0.4px; text-transform: uppercase; }


/* ============================================================================
   SECTION 23 — MOMENTUM BAR
   ============================================================================ */

.mom-bar { display: inline-flex; align-items: center; gap: 4px; }
.mom-fill { height: 5px; border-radius: 3px; min-width: 4px; }


/* ============================================================================
   SECTION 24 — OPEN POSITIONS SECTION
   ============================================================================ */

.op-section {
    background: var(--bg-surface);
    border: 1px solid var(--color-info-border);
    border-radius: var(--radius-md);
    padding: var(--space-5) var(--space-6);
    margin-bottom: var(--space-5);
    position: relative;
}
.op-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-info), var(--color-brand));
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}
.op-title {
    font-size: var(--font-sm); font-weight: var(--weight-bold); color: var(--color-info);
    margin-bottom: var(--space-4); font-family: var(--font-mono);
    display: flex; align-items: center; gap: var(--space-2);
    padding-bottom: 12px; border-bottom: 1px solid var(--border);
    letter-spacing: 0.6px; text-transform: uppercase;
}
.op-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: var(--space-4); }
.op-card {
    padding: var(--space-5); border-radius: var(--radius-md);
    border-left: 3px solid var(--color-brand); background: var(--bg-surface);
    font-family: var(--font-mono); font-size: var(--font-xs); position: relative;
    transition: all var(--duration-normal) var(--ease-out);
    border: 1px solid var(--border); border-left-width: 3px;
}
.op-card.op-short { border-left-color: var(--color-danger); }
.op-card:hover { border-color: var(--border-strong); }
.op-card.rec-liq { border-left-color: var(--color-danger); background: var(--color-danger-light); border-color: var(--color-danger-border); }
.op-card.rec-red { border-left-color: #ea580c; background: #fff7ed; border-color: rgba(234, 88, 12, 0.15); }
.op-card.rec-ale { border-left-color: var(--color-warning); background: var(--color-warning-light); border-color: var(--color-warning-border); }

.op-collapse-ico {
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--text-dim); transition: transform var(--duration-normal) var(--ease-out), background var(--duration-fast);
    margin-left: var(--space-1); width: 22px; height: 22px; border-radius: var(--radius-xs);
}
.op-collapse-ico:hover { color: var(--text-primary); background: var(--bg-hover); }
.op-collapsed .op-collapse-ico { transform: rotate(-90deg); }
.proj-card .op-collapse-ico { transform: rotate(-90deg) !important; cursor: pointer; }
.proj-card.expanded .op-collapse-ico { transform: rotate(0deg) !important; }
.op-collapsed .op-details       { display: none; }

.op-header-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; margin-bottom: 12px; }
.op-hcol         { display: flex; flex-direction: column; }
.op-hcol-left    { align-items: flex-start; }
.op-hcol-center  { align-items: flex-start; }
.op-hcol-right   { display: flex; flex-direction: row; align-items: center; justify-content: flex-end; gap: var(--space-2); }
.op-sym { font-weight: var(--weight-bold); font-size: var(--font-md); letter-spacing: 0.3px; color: var(--text-primary); }
.op-size-val { font-size: var(--font-sm); font-family: var(--font-mono); font-weight: var(--weight-semibold); letter-spacing: 0.2px; }

/* Recommendation dots */
.op-rec-dot { width: 22px; height: 22px; border-radius: 50%; cursor: help; display: inline-block; }
.dot-ok  { background: var(--color-success); box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12); }
.dot-ale { background: var(--color-warning); box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.12); animation: pulse-dot 1.5s infinite; }
.dot-red { background: #ea580c; box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.12); animation: pulse-dot 1s infinite; }
.dot-liq { background: var(--color-danger); box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12); animation: pulse-dot 0.6s infinite; }

.op-separator { border-top: 1px solid var(--border-light); margin: 8px 0; }
.op-dir { font-size: var(--font-xs); font-weight: var(--weight-bold); padding: 3px 10px; border-radius: var(--radius-xs); letter-spacing: 0.5px; }
.op-dir.long  { background: var(--color-success-bg); color: var(--color-success); }
.op-dir.short { background: var(--color-danger-bg); color: var(--color-danger); }

.op-pnl-row { display: flex; align-items: baseline; gap: var(--space-3); margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border-light); }
.op-pnl-big { font-size: var(--font-xl); font-weight: var(--weight-bold); letter-spacing: -0.3px; }
.op-metrics { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px 16px; font-size: var(--font-xs); margin-bottom: var(--space-3); }
.op-ml { color: var(--text-dim); font-size: var(--font-xs); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 1px; }
.op-mv { font-family: var(--font-mono); color: var(--text-primary); }
.op-actions { display: flex; gap: var(--space-2); margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-light); flex-wrap: wrap; }

/* Intraday alerts */
.op-alerts { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); display: flex; flex-direction: column; gap: 4px; }
.op-alert { font-size: var(--font-xs); font-family: var(--font-mono); padding: 4px 10px; border-radius: var(--radius-xs); border-left: 2px solid var(--border); }
.op-alert b { font-weight: var(--weight-bold); margin-right: 4px; }
.op-alert.op-alert-HIGH   { background: var(--color-danger-bg); border-left-color: #ef4444; color: #ef4444; }
.op-alert.op-alert-MEDIUM { background: var(--color-warning-bg); border-left-color: #d97706; color: #d97706; }
.op-alert.op-alert-LOW    { background: var(--bg-muted); border-left-color: var(--text-dim); color: var(--text-secondary); }

.op-tese-wrap { margin: 6px 0; }


/* ============================================================================
   SECTION 25 — RECOMMENDATION LABELS
   ============================================================================ */

.rec-manter   { color: var(--color-success); font-weight: var(--weight-bold); }
.rec-alerta   { color: var(--color-warning); font-weight: var(--weight-bold); }
.rec-reduzir  { color: #ea580c; font-weight: var(--weight-bold); }
.rec-liquidar { color: var(--color-danger); font-weight: var(--weight-bold); font-size: var(--font-sm); }


/* ============================================================================
   SECTION 26 — PROJECTIONS GRID
   ============================================================================ */

.proj-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); margin-bottom: var(--space-5); }
.proj-title {
    font-size: var(--font-sm); font-weight: var(--weight-bold); padding: var(--space-3) 0;
    text-align: center; font-family: var(--font-mono); letter-spacing: 0.6px;
    text-transform: uppercase; margin-bottom: var(--space-3);
}
.proj-title.long  { color: var(--color-success); }
.proj-title.short { color: var(--color-danger); }

.proj-card {
    background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-md);
    padding: var(--space-5); margin-bottom: var(--space-5); position: relative;
    transition: box-shadow var(--duration-normal) var(--ease-out), border-color var(--duration-normal);
}
.proj-card:hover { border-color: var(--border-strong); }
.proj-card--neutro { opacity: 0.75; border-left: 3px solid var(--text-dim); }
.proj-card--neutro:hover { opacity: 1; }
.pnl-dir.neutro { color: var(--text-dim); background: var(--bg-muted); font-size: var(--font-xs); font-weight: var(--weight-bold); padding: 3px 8px; border-radius: var(--radius-xs); }

.proj-card .ph {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: var(--space-3); padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--border-light); flex-wrap: wrap; gap: var(--space-2);
}
.proj-card .ps { font-size: var(--font-lg); font-weight: var(--weight-bold); font-family: var(--font-mono); letter-spacing: 0.3px; color: var(--text-primary); }

.proj-compact {
    font-size: var(--font-xs); font-family: var(--font-mono); margin-bottom: 8px;
    display: flex; flex-wrap: wrap; gap: 6px 16px; line-height: 1.6; color: var(--text-primary);
}
.proj-compact .pc-label { color: var(--text-dim); font-size: var(--font-xs); text-transform: uppercase; letter-spacing: 0.4px; margin-right: 2px; }

.proj-detail { display: none; }
.proj-card.expanded .proj-detail { display: block; animation: fadeIn var(--duration-normal) var(--ease-out); }

/* Regime + thermometer row */
.regime-thermo-row { display: flex; align-items: center; gap: 8px; margin: 6px 0 8px; }
.thermo-inline { flex: 1; margin: 0; min-width: 0; }
.thermo-wrap   { margin: 8px 0 6px; font-family: var(--font-mono); }
.thermo-bar {
    position: relative; height: 7px; border-radius: var(--radius-full);
    background: linear-gradient(90deg, #16a34a 0%, #86efac 25%, #fbbf24 50%, #f87171 75%, #ef4444 100%);
    overflow: visible;
}
.thermo-ptr {
    position: absolute; top: -3px; width: 3px; height: 13px; background: var(--text-primary);
    border-radius: 2px; transform: translateX(-50%); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    transition: left 0.3s var(--ease-out);
}
.thermo-labels { display: flex; justify-content: space-between; font-size: 7px; letter-spacing: 0.3px; color: var(--text-dim); margin-top: 3px; line-height: 1; }
.thermo-labels-inline { display: flex; justify-content: space-between; font-size: 7px; letter-spacing: 0.2px; color: var(--text-dim); margin-top: 3px; line-height: 1; font-family: var(--font-mono); }
.thermo-conf { height: 3px; border-radius: 2px; margin-top: 3px; background: var(--color-brand); transition: width 0.3s var(--ease-out), opacity 0.3s var(--ease-out); }

/* proj-meta */
.proj-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; font-size: var(--font-sm); margin-bottom: var(--space-3); font-family: var(--font-mono); }
.pm-l { color: var(--text-secondary); font-size: var(--font-xs); }
.pm-v { text-align: right; font-family: var(--font-mono); color: var(--text-primary); }

/* expand-btn removed — proj-cards now use .op-collapse-ico */


/* ============================================================================
   SECTION 27 — DETAIL ZONES (Context / Entry / Risk / Target)
   ============================================================================ */

.ctx-zone { background: var(--color-info-bg); border: 1px solid var(--color-info-border); border-radius: var(--radius-sm); padding: 12px var(--space-4); margin-bottom: var(--space-3); }
.ctx-title { font-size: var(--font-xs); text-transform: uppercase; color: var(--color-info); margin-bottom: 8px; letter-spacing: 0.5px; font-weight: var(--weight-semibold); }
.ctx-grid { display: flex; flex-wrap: wrap; gap: var(--space-3) 20px; font-size: var(--font-xs); font-family: var(--font-mono); }
.ctx-item  { display: flex; flex-direction: column; }
.ctx-label { font-size: var(--font-xs); color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 1px; }
.ctx-val { font-size: var(--font-sm); color: var(--text-primary); }

.entry-zone { background: var(--color-warning-bg); border: 1px solid var(--color-warning-border); border-radius: var(--radius-sm); padding: 12px var(--space-4); margin-bottom: var(--space-3); }
.ez-title { font-size: var(--font-xs); text-transform: uppercase; color: var(--color-warning); margin-bottom: var(--space-2); letter-spacing: 0.5px; font-weight: var(--weight-semibold); }
.ez-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; text-align: center; }
.ez-grid .ez-label { font-size: var(--font-xs); color: var(--text-dim); letter-spacing: 0.3px; text-transform: uppercase; }
.ez-grid .ez-val   { font-family: var(--font-mono); font-size: var(--font-sm); color: var(--text-primary); }
.ez-grid .ez-ideal { font-family: var(--font-mono); font-size: var(--font-md); font-weight: var(--weight-bold); color: var(--color-warning); }

.risk-zone { background: var(--color-danger-bg); border: 1px solid var(--color-danger-border); border-radius: var(--radius-sm); padding: 12px var(--space-4); margin-bottom: var(--space-3); }
.rz-title { font-size: var(--font-xs); text-transform: uppercase; color: var(--color-danger); margin-bottom: 8px; letter-spacing: 0.5px; font-weight: var(--weight-semibold); }

.tgt-zone { background: var(--color-success-bg); border: 1px solid var(--color-success-border); border-radius: var(--radius-sm); padding: 12px var(--space-4); margin-bottom: var(--space-3); }
.tgt-title { font-size: var(--font-xs); text-transform: uppercase; color: var(--color-success); margin-bottom: 8px; letter-spacing: 0.5px; font-weight: var(--weight-semibold); }
.tgt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; font-size: var(--font-sm); font-family: var(--font-mono); }

.risk-factors { margin-top: var(--space-3); padding-top: 8px; border-top: 1px dashed var(--border); }
.rf-title { font-size: var(--font-xs); color: var(--text-dim); letter-spacing: 0.5px; margin-bottom: 4px; text-transform: uppercase; }
.rf-item { font-size: var(--font-xs); color: #ea580c; padding: 2px 0; }

/* Position badge */
.pos-badge { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm); margin-bottom: var(--space-3); font-size: var(--font-xs); font-family: var(--font-mono); }
.pos-badge.open     { background: var(--color-info-bg); border: 1px solid var(--color-info-border); }
.pos-badge.alerta   { background: var(--color-warning-bg); border: 1px solid var(--color-warning-border); }
.pos-badge.reduzir  { background: rgba(234, 88, 12, 0.05); border: 1px solid rgba(234, 88, 12, 0.15); }
.pos-badge.liquidar { background: var(--color-danger-bg); border: 2px solid var(--color-danger-border); animation: liquidar-pulse 2s ease-in-out infinite; }
.pos-pnl    { font-weight: var(--weight-bold); }
.pos-motivos { width: 100%; font-size: var(--font-xs); color: var(--text-dim); margin-top: 2px; line-height: 1.4; }


/* ============================================================================
   SECTION 28 — THESIS & INVALIDE
   ============================================================================ */

.proj-tese { margin: 8px 0; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--bg-surface-2); border: 1px solid var(--border-light); }
.tese-blocos { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.tese-bloco { padding: 8px 12px; border-radius: var(--radius-xs); background: var(--bg-muted); border-left: 3px solid var(--border); }
.tese-bloco--risk { border-left-color: var(--color-danger); }
.tese-bloco--rec { border-left-color: var(--color-brand); background: var(--bg-surface-2); }
.tese-bloco-label { font-size: 9px; font-weight: var(--weight-bold); color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 3px; }
.tese-bloco-text { font-size: var(--font-xs); color: var(--text-primary); line-height: 1.5; }
.tese-bloco--quad { border-left-color: var(--color-info); }

/* Quadrant badges */
.quad-badge { display: inline-block; padding: 2px 8px; border-radius: var(--radius-xs); font-size: 10px; font-weight: 700; font-family: var(--font-mono); letter-spacing: 0.5px; }
.q-a { background: rgba(22,163,74,0.12); color: var(--color-success); }
.q-b { background: rgba(59,130,246,0.12); color: var(--color-info); }
.q-c { background: rgba(245,158,11,0.12); color: var(--color-warning); }
.q-d { background: rgba(239,68,68,0.12); color: var(--color-danger); }

/* Quadrant reference guide */
.quad-ref { margin-top: 8px; }
.quad-ref-toggle { font-size: 9px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; cursor: pointer; padding: 6px 0; list-style: none; }
.quad-ref-toggle::-webkit-details-marker { display: none; }
.quad-ref-toggle::before { content: '▶ '; font-size: 8px; }
details[open] > .quad-ref-toggle::before { content: '▼ '; }
.quad-ref-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.quad-ref-card { padding: 10px; border-radius: var(--radius-xs); background: var(--bg-muted); border: 1px solid var(--border-light); font-size: var(--font-xs); line-height: 1.5; opacity: 0.7; }
.quad-ref-card.quad-active { opacity: 1; border-color: var(--border-strong); box-shadow: 0 0 0 1px var(--border); }
.quad-ref-header { font-weight: 700; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.quad-ref-body { color: var(--text-secondary); }
@media (max-width: 479px) { .quad-ref-grid { grid-template-columns: 1fr; } }
.tese-title { font-size: var(--font-xs); font-weight: var(--weight-bold); color: var(--color-brand); letter-spacing: 0.8px; margin-bottom: 3px; text-transform: uppercase; }
.tese-text { font-size: var(--font-xs); color: var(--text-secondary); line-height: 1.5; }
.proj-holding { font-size: var(--font-xs); color: var(--text-dim); margin: 4px 0; }

.proj-invalido { margin: 8px 0; padding: var(--space-3) var(--space-4); background: var(--color-danger-bg); border-left: 3px solid var(--color-danger); border-radius: var(--radius-xs); }
.invalido-title { font-size: var(--font-xs); font-weight: var(--weight-bold); color: var(--color-danger); letter-spacing: 0.8px; margin-bottom: 3px; text-transform: uppercase; }
.invalido-item { font-size: var(--font-xs); color: #ef4444; padding: 2px 0; }


/* ============================================================================
   SECTION 29 — ALERTS SECTION
   ============================================================================ */

.alerts-section { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-5) var(--space-6); }
.alerts-title {
    font-size: var(--font-sm); font-weight: var(--weight-bold); color: var(--color-warning);
    margin-bottom: 12px; font-family: var(--font-mono); letter-spacing: 0.5px;
    text-transform: uppercase; padding-bottom: var(--space-3); border-bottom: 1px solid var(--border);
}
.alert-item {
    display: flex; align-items: center; gap: 12px; padding: var(--space-3) 0;
    font-size: var(--font-sm); border-bottom: 1px solid var(--border-light);
    position: relative; transition: background var(--duration-fast);
}
.alert-item:hover { background: var(--bg-hover); margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: var(--radius-xs); }
.alert-item[title] { cursor: help; }
.alert-item:last-child { border-bottom: none; }
.alert-icon { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; flex-shrink: 0; font-weight: var(--weight-bold); }
.ai-g { background: var(--color-success-bg); color: var(--color-success); }
.ai-r { background: var(--color-danger-bg); color: var(--color-danger); }
.ai-w { background: var(--color-warning-bg); color: var(--color-warning); }
.ai-m { background: rgba(99, 102, 241, 0.06); color: #4f46e5; }


/* ============================================================================
   SECTION 30 — PAGINATION
   ============================================================================ */

.pager {
    display: flex; align-items: center; justify-content: center; gap: 4px;
    padding: 12px var(--space-4); border-top: 1px solid var(--border);
    background: transparent; border-radius: 0 0 var(--radius-md) var(--radius-md);
}
.pager button {
    padding: 6px 12px; border-radius: var(--radius-xs); border: 1px solid var(--border);
    background: var(--bg-surface); color: var(--text-primary); font-size: var(--font-xs);
    font-weight: var(--weight-semibold); font-family: var(--font-mono); cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
}
.pager button:hover:not(:disabled) { background: var(--bg-hover); border-color: var(--border-strong); }
.pager button:disabled { opacity: 0.28; cursor: not-allowed; }
.pager button.active { background: var(--color-brand); border-color: var(--color-brand); color: #ffffff; box-shadow: 0 2px 6px rgba(0, 96, 57, 0.15); }
.pager .pg-info { font-size: var(--font-xs); color: var(--text-dim); font-family: var(--font-mono); margin-left: var(--space-2); letter-spacing: 0.3px; }


/* ============================================================================
   SECTION 31 — P&L REPORT
   ============================================================================ */

.pnl-section { background: var(--bg-surface); border: 1px solid var(--color-info-border); border-radius: var(--radius-md); padding: var(--space-5); margin-bottom: var(--space-5); }
.pnl-title { font-size: var(--font-sm); font-weight: var(--weight-bold); color: var(--color-info); letter-spacing: 0.5px; margin-bottom: var(--space-4); font-family: var(--font-mono); }
.pnl-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--space-4); }
.pnl-card { background: var(--bg-muted); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-4) var(--space-5); text-align: center; }
.pnl-label { font-size: var(--font-xs); font-weight: var(--weight-semibold); color: var(--text-dim); letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 8px; }
.pnl-value { font-family: var(--font-mono); font-size: 18px; font-weight: var(--weight-bold); color: var(--text-primary); margin-bottom: 4px; }
.pnl-value.g, .pnl-sub.g { color: var(--color-success); }
.pnl-value.r, .pnl-sub.r { color: var(--color-danger); }
.pnl-sub { font-family: var(--font-mono); font-size: var(--font-xs); color: var(--text-dim); }
.pnl-positions { margin-top: var(--space-5); border-top: 1px solid var(--border); padding-top: var(--space-4); }
.pnl-pos-title { font-size: var(--font-xs); font-weight: var(--weight-semibold); color: var(--text-dim); letter-spacing: 0.5px; margin-bottom: var(--space-3); }
.pnl-table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: var(--font-sm); }
.pnl-table thead th { font-size: var(--font-xs); font-weight: var(--weight-semibold); color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; padding: 6px var(--space-3); border-bottom: 2px solid var(--border); text-align: left; white-space: nowrap; background: transparent; }
.pnl-table th.num, .pnl-table td.num { text-align: right !important; font-variant-numeric: tabular-nums; }
.pnl-table tbody td { padding: 8px var(--space-3); border-bottom: 1px solid var(--border-light); white-space: nowrap; color: var(--text-primary); font-weight: 600; }
.pnl-table tbody tr:hover { background: var(--bg-hover); }
.pnl-table tfoot td { padding: 10px var(--space-3); border-top: 2px solid var(--border); font-weight: var(--weight-bold); white-space: nowrap; color: var(--text-primary); font-size: var(--font-sm); }
.pnl-dir { font-size: var(--font-xs); font-weight: var(--weight-bold); padding: 3px 8px; border-radius: var(--radius-xs); }
.pnl-dir.long  { color: var(--color-success); background: var(--color-success-bg); }
.pnl-dir.short { color: var(--color-danger); background: var(--color-danger-bg); }


/* ============================================================================
   SECTION 32 — TOPBAR (legacy — HIDDEN: replaced by sidebar)
   ============================================================================ */

/* Force-hide any topbar elements that may still exist in DOM (cache, etc.) */
#topbar, .topbar, .tb-topbar, .tb-overlay {
    display: none !important;
    height: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}
.topbar-brand { font-family: var(--font-mono); font-weight: var(--weight-bold); font-size: var(--font-md); color: var(--color-brand); letter-spacing: 0.3px; text-decoration: none; white-space: nowrap; }
.topbar-brand:hover { text-decoration: none; }
.topbar-nav { display: flex; align-items: center; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.topbar-nav::-webkit-scrollbar { display: none; }
.topbar-nav a, .topbar-nav button {
    padding: 8px 14px; border-radius: var(--radius-sm); font-size: var(--font-xs);
    font-weight: var(--weight-semibold); font-family: var(--font-mono);
    color: var(--text-secondary); text-decoration: none; border: none; background: transparent;
    cursor: pointer; transition: background var(--duration-fast), color var(--duration-fast);
    letter-spacing: 0.3px; white-space: nowrap;
}
.topbar-nav a:hover, .topbar-nav button:hover { background: var(--bg-hover); color: var(--text-primary); text-decoration: none; }
.topbar-nav a.active, .topbar-nav button.active { background: var(--nav-active-bg); color: var(--nav-active-fg); }
.topbar-right { display: flex; align-items: center; gap: var(--space-3); margin-left: auto; }
.topbar-clock { font-family: var(--font-mono); font-size: var(--font-xs); color: var(--text-dim); letter-spacing: 0.3px; white-space: nowrap; }
.topbar-status { display: inline-flex; align-items: center; gap: 5px; font-size: var(--font-xs); font-family: var(--font-mono); color: var(--text-dim); letter-spacing: 0.3px; }
.topbar-status .status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--color-success); animation: pulse 2.5s infinite; }
.user-badge {
    display: inline-flex; align-items: center; gap: var(--space-1); padding: 5px 12px;
    border-radius: var(--radius-full); background: var(--user-bg); border: 1px solid var(--user-border);
    color: var(--user-accent); font-size: var(--font-xs); font-weight: var(--weight-semibold);
    font-family: var(--font-mono); cursor: pointer; transition: background var(--duration-fast); white-space: nowrap;
}
.user-badge:hover { background: var(--color-brand-light); }
.topbar-btn-logout, .btn-logout {
    padding: 6px 14px; border-radius: var(--radius-sm); border: 1px solid var(--color-danger-border);
    background: transparent; color: var(--color-danger); font-size: var(--font-xs);
    font-weight: var(--weight-semibold); font-family: var(--font-mono); cursor: pointer;
    transition: background var(--duration-fast);
}
.topbar-btn-logout:hover, .btn-logout:hover { background: var(--color-danger-bg); }


/* ============================================================================
   SECTION 33 — NAVIGATION DRAWER
   ============================================================================ */

.nav-drawer {
    position: fixed;
    top: var(--topbar-h);
    left: 0; bottom: 0;
    width: var(--drawer-w);
    background: var(--bg-surface-drawer);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    padding: var(--space-5) var(--space-4);
    z-index: 8000;
    transform: translateX(-100%);
    transition: transform var(--duration-slow) var(--ease-out);
}
.nav-drawer.open { transform: translateX(0); }
.nav-item {
    display: flex; align-items: center; gap: var(--space-2); padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-sm); font-size: var(--font-sm); font-weight: var(--weight-medium);
    color: var(--text-secondary); text-decoration: none; cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out); margin-bottom: 2px;
    border: 1px solid transparent;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); text-decoration: none; }
.nav-item.active { background: var(--nav-active-bg); color: var(--nav-active-fg); border-color: var(--nav-active-br); font-weight: var(--weight-semibold); }


/* ============================================================================
   SECTION 34 — SIDEBAR (v4.1 Fintech Moderna)
   ============================================================================ */

.sidebar {
    width: var(--sidebar-w, 240px);
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    z-index: var(--z-sidebar, 100);
    transition: width var(--duration-slow) var(--ease-out);
}
.sidebar.collapsed { width: var(--sidebar-collapsed-w, 72px); }
.sidebar.collapsed .sidebar-logo,
.sidebar.collapsed .sidebar-item-label,
.sidebar.collapsed .sidebar-section,
.sidebar.collapsed .sidebar-user-info,
.sidebar.collapsed .sidebar-status-text,
.sidebar.collapsed .sidebar-clock { opacity: 0; width: 0; overflow: hidden; pointer-events: none; }
.sidebar.collapsed .sidebar-header { justify-content: center; padding: 0 8px; }
.sidebar.collapsed .sidebar-collapse-btn { margin-left: 0; }
.sidebar.collapsed .sidebar-collapse-btn svg { transform: rotate(180deg); }
.sidebar.collapsed .sidebar-item {
    justify-content: center !important; padding: 10px 0 !important; margin: 1px 6px !important;
    gap: 0 !important; border-left: none !important; overflow: visible !important;
}
.sidebar.collapsed .sidebar-item-icon { margin: 0 !important; }
.sidebar.collapsed .sidebar-footer { align-items: center; padding: 10px 4px; }
.sidebar.collapsed .sidebar-user { justify-content: center; }
.sidebar.collapsed .sidebar-avatar { margin: 0; }
.sidebar.collapsed .sidebar-logout-btn { display: none; }

.sidebar-header {
    height: 60px; display: flex; align-items: center; padding: 0 18px;
    border-bottom: 1px solid var(--border); gap: 12px;
}
.sidebar-logo { font-size: var(--font-md); font-weight: 700; color: var(--color-brand); letter-spacing: 0.2px; white-space: nowrap; overflow: hidden; }
.sidebar-collapse-btn {
    width: 30px; height: 30px; margin-left: auto; background: transparent;
    border: 1px solid var(--border); border-radius: var(--radius-xs); cursor: pointer;
    color: var(--text-dim); display: flex; align-items: center; justify-content: center;
    transition: all var(--duration-fast);
}
.sidebar-collapse-btn:hover { color: var(--color-brand); border-color: var(--color-brand); background: var(--color-brand-muted); }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 10px; }
.sidebar-section { font-size: var(--font-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-dim); padding: 18px 12px 8px; user-select: none; }
.sidebar-item {
    display: flex; align-items: center; gap: 12px; padding: 10px 14px;
    border-radius: var(--radius-sm); font-size: var(--font-base); font-weight: 500;
    color: var(--text-secondary); text-decoration: none; transition: all var(--duration-fast);
    margin-bottom: 2px; border-left: 3px solid transparent;
}
.sidebar-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.sidebar-item.active { background: var(--color-brand-muted); color: var(--color-brand); border-left-color: var(--color-brand); font-weight: 600; }
.sidebar-item-icon { width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sidebar-item-icon svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.sidebar-footer { padding: 10px; border-top: 1px solid var(--border); }


/* ============================================================================
   SECTION 35 — FEED & MONITOR PANELS
   ============================================================================ */

.feed-panel { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.feed-header { display: flex; align-items: center; justify-content: space-between; padding: 12px var(--space-5); border-bottom: 1px solid var(--border); background: transparent; }
.feed-title { font-family: var(--font-mono); font-size: var(--font-xs); font-weight: var(--weight-bold); color: var(--text-secondary); letter-spacing: 0.5px; text-transform: uppercase; }
.feed-body { padding: var(--space-3); max-height: 360px; overflow-y: auto; }
.feed-item { display: flex; align-items: flex-start; gap: var(--space-2); padding: var(--space-2); border-radius: var(--radius-xs); font-size: var(--font-sm); font-family: var(--font-mono); color: var(--text-secondary); transition: background var(--duration-fast); }
.feed-item:hover { background: var(--bg-hover); }
.feed-time { font-size: var(--font-xs); color: var(--text-dim); white-space: nowrap; min-width: 56px; }


/* ============================================================================
   SECTION 36 — OPPORTUNITY CARDS (monitor page)
   ============================================================================ */

.opp-card {
    background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-5); margin-bottom: var(--space-3);
    display: flex; align-items: center; gap: var(--space-3);
    font-family: var(--font-mono); font-size: var(--font-xs);
    transition: border-color var(--duration-normal);
}
.opp-card:hover { border-color: var(--border-strong); }
.opp-card.opp-long  { border-left: 3px solid var(--color-success); }
.opp-card.opp-short { border-left: 3px solid var(--color-danger); }
.opp-sym { font-weight: var(--weight-bold); font-size: var(--font-sm); min-width: 80px; color: var(--text-primary); }
.opp-dir-badge { font-size: var(--font-xs); font-weight: var(--weight-bold); padding: 3px 8px; border-radius: var(--radius-xs); letter-spacing: 0.5px; }
.opp-dir-badge.long  { background: var(--color-success-bg); color: var(--color-success); }
.opp-dir-badge.short { background: var(--color-danger-bg); color: var(--color-danger); }
.opp-meta { flex: 1; display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); align-items: center; }
.opp-meta-item { display: flex; flex-direction: column; }
.opp-meta-label { font-size: var(--font-xs); color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.3px; }
.opp-meta-val   { font-size: var(--font-xs); color: var(--text-primary); }
.opp-time { font-size: var(--font-xs); color: var(--text-dim); white-space: nowrap; }


/* ============================================================================
   SECTION 37 — SCROLLABLE CONTAINERS
   ============================================================================ */

.scroll-panel { overflow-y: auto; overflow-x: hidden; }
.scroll-panel-x { overflow-x: auto; overflow-y: hidden; }


/* ============================================================================
   SECTION 38 — ICON SYSTEM
   ============================================================================ */

.icon { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.icon--sm { width: 14px; height: 14px; }
.icon--lg { width: 24px; height: 24px; }
.icon--xl { width: 48px; height: 48px; stroke-width: 1.5; }


/* ============================================================================
   SECTION 39 — UC COMPONENTS (from ultron-components.css)
   ============================================================================ */

/* UC Card system */
.uc-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-md); transition: border-color 0.2s ease; overflow: hidden; }
.uc-card:hover { border-color: var(--border-strong); }
.uc-card-header { padding: 18px 22px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.uc-card-title { font-size: var(--font-base); font-weight: 700; color: var(--text-primary); letter-spacing: 0.2px; }
.uc-card-body { padding: 18px 22px; }
.uc-card-footer { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }

/* UC Trading Card */
.uc-trading-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px; position: relative; transition: border-color 0.2s ease; }
.uc-trading-card:hover { border-color: var(--border-strong); }
.uc-trading-card-accent { position: absolute; top: 0; left: 0; right: 0; height: 3px; border-radius: var(--radius-md) var(--radius-md) 0 0; }
.uc-trading-card-accent.bullish { background: linear-gradient(90deg, var(--color-success), #22c55e); }
.uc-trading-card-accent.bearish { background: linear-gradient(90deg, var(--color-danger), #f87171); }
.uc-trading-card-accent.neutral { background: linear-gradient(90deg, var(--steel), var(--steel-light)); }
.uc-trading-card .uc-symbol { font-size: var(--font-lg); font-weight: 800; color: var(--text-primary); letter-spacing: 0.2px; }
.uc-trading-card .uc-price { font-size: 22px; font-weight: 700; font-family: var(--font-mono); color: var(--text-primary); font-variant-numeric: tabular-nums; }

/* UC Position Card */
.uc-position-card { background: var(--bg-surface); border: 1px solid var(--border); border-left: 3px solid var(--color-brand); border-radius: var(--radius-sm); padding: 16px 18px; font-family: var(--font-mono); font-size: var(--font-sm); transition: background 0.15s ease, border-color 0.15s ease; }
.uc-position-card:hover { background: var(--bg-hover); }
.uc-position-card.long { border-left-color: var(--color-success); }
.uc-position-card.short { border-left-color: var(--color-danger); }
.uc-position-card.at-risk { border-left-color: var(--color-warning); background: var(--warning-muted); }
.uc-position-card.liquidation { border-left-color: var(--color-danger); background: var(--danger-muted); animation: uc-danger-pulse 2s ease-in-out infinite; }

/* UC Stats Card */
.uc-stats-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px 22px; display: flex; flex-direction: column; gap: 6px; }
.uc-stats-card .uc-stat-label { font-size: var(--font-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-dim); }
.uc-stats-card .uc-stat-value { font-size: 26px; font-weight: 800; font-family: var(--font-mono); color: var(--text-primary); font-variant-numeric: tabular-nums; line-height: 1.2; }
.uc-stats-card .uc-stat-change { font-size: var(--font-sm); font-weight: 600; font-family: var(--font-mono); }
.uc-stats-card .uc-stat-change.positive { color: var(--color-success); }
.uc-stats-card .uc-stat-change.negative { color: var(--color-danger); }

/* UC Expandable */
.uc-expandable { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.uc-expandable-header { padding: 16px 22px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; transition: background 0.15s; user-select: none; }
.uc-expandable-header:hover { background: var(--bg-hover); }
.uc-expandable-chevron { width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; color: var(--text-dim); transition: transform 0.25s ease; font-size: 12px; }
.uc-expandable.open .uc-expandable-chevron { transform: rotate(180deg); }
.uc-expandable-body { max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease; }
.uc-expandable.open .uc-expandable-body { max-height: 2000px; padding: 0 22px 18px; }

/* UC Table */
.uc-table-wrap { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--border); }
.uc-table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: var(--font-sm); font-variant-numeric: tabular-nums; }
.uc-table thead { position: sticky; top: 0; z-index: 2; }
.uc-table th { background: transparent; color: var(--text-dim); font-size: var(--font-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; padding: 12px 16px; text-align: left; border-bottom: 2px solid var(--border); white-space: nowrap; user-select: none; cursor: default; }
.uc-table th.sortable { cursor: pointer; transition: color 0.15s; }
.uc-table th.sortable:hover { color: var(--color-brand); }
.uc-table th.sorted { color: var(--color-brand); }
.uc-table th.sorted::after { content: ' \25B2'; font-size: 8px; }
.uc-table th.sorted.desc::after { content: ' \25BC'; }
.uc-table td { padding: 12px 16px; border-bottom: 1px solid var(--border-light); color: var(--text-primary); vertical-align: middle; }
/* NO alternating row colors */
.uc-table tbody tr:hover { background: var(--bg-hover); }
.uc-table tbody tr:last-child td { border-bottom: none; }

/* UC Price Ticker */
.uc-price-ticker { display: inline-flex; align-items: baseline; gap: 6px; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.uc-price-ticker .uc-price-val { font-size: 20px; font-weight: 700; color: var(--text-primary); transition: color 0.3s ease; }
.uc-price-ticker .uc-price-change { font-size: var(--font-sm); font-weight: 600; padding: 3px 8px; border-radius: var(--radius-xs); transition: background 0.3s ease, color 0.3s ease; }
.uc-price-ticker.up .uc-price-val { color: var(--color-success); }
.uc-price-ticker.up .uc-price-change { background: var(--success-muted); color: var(--color-success); }
.uc-price-ticker.down .uc-price-val { color: var(--color-danger); }
.uc-price-ticker.down .uc-price-change { background: var(--danger-muted); color: var(--color-danger); }
@keyframes uc-price-flash-up { 0% { background: var(--success-muted); } 100% { background: transparent; } }
@keyframes uc-price-flash-down { 0% { background: var(--danger-muted); } 100% { background: transparent; } }
.uc-price-ticker.flash-up .uc-price-val { animation: uc-price-flash-up 0.8s ease-out; }
.uc-price-ticker.flash-down .uc-price-val { animation: uc-price-flash-down 0.8s ease-out; }

/* UC Gauge */
.uc-gauge { position: relative; width: 64px; height: 64px; display: inline-flex; align-items: center; justify-content: center; }
.uc-gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.uc-gauge .uc-gauge-bg { fill: none; stroke: var(--border); stroke-width: 4; }
.uc-gauge .uc-gauge-fill { fill: none; stroke-width: 4; stroke-linecap: round; transition: stroke-dashoffset 0.6s ease; }
.uc-gauge .uc-gauge-label { position: absolute; font-family: var(--font-mono); font-size: var(--font-base); font-weight: 800; color: var(--text-primary); }
.uc-gauge.sm { width: 40px; height: 40px; }
.uc-gauge.sm .uc-gauge-label { font-size: var(--font-xs); }
.uc-gauge.lg { width: 96px; height: 96px; }
.uc-gauge.lg .uc-gauge-label { font-size: 22px; }

/* UC Sparkline */
.uc-sparkline { display: inline-block; width: 80px; height: 24px; vertical-align: middle; }
.uc-sparkline svg { width: 100%; height: 100%; }
.uc-sparkline .uc-spark-line { fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.uc-sparkline .uc-spark-area { opacity: 0.08; }
.uc-sparkline.up .uc-spark-line   { stroke: var(--color-success); }
.uc-sparkline.up .uc-spark-area   { fill: var(--color-success); }
.uc-sparkline.down .uc-spark-line { stroke: var(--color-danger); }
.uc-sparkline.down .uc-spark-area { fill: var(--color-danger); }

/* UC PnL */
.uc-pnl { font-family: var(--font-mono); font-weight: 700; font-variant-numeric: tabular-nums; }
.uc-pnl.positive { color: var(--color-success); }
.uc-pnl.negative { color: var(--color-danger); }
.uc-pnl.zero { color: var(--text-dim); }
.uc-pnl-inline { display: inline-flex; align-items: baseline; gap: 6px; }
.uc-pnl-amount { font-size: 20px; }
.uc-pnl-pct { font-size: var(--font-sm); padding: 3px 8px; border-radius: var(--radius-xs); }
.uc-pnl.positive .uc-pnl-pct { background: var(--success-muted); }
.uc-pnl.negative .uc-pnl-pct { background: var(--danger-muted); }

/* UC Buttons */
.uc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; border-radius: var(--radius-sm); font-size: var(--font-sm); font-weight: 600; font-family: var(--font-ui); cursor: pointer; border: 1px solid transparent; transition: all 0.15s ease; white-space: nowrap; text-decoration: none; outline: none; user-select: none; }
.uc-btn:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; }
.uc-btn:disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.uc-btn:active:not(:disabled) { transform: scale(0.98); }
.uc-btn-primary { background: var(--color-brand); color: var(--text-inverse); border-color: var(--color-brand); }
.uc-btn-primary:hover:not(:disabled) { background: var(--color-brand-hover); border-color: var(--color-brand-hover); box-shadow: 0 4px 12px rgba(0, 96, 57, 0.15); }
.uc-btn-secondary { background: transparent; color: var(--color-brand); border-color: var(--color-brand); }
.uc-btn-secondary:hover:not(:disabled) { background: var(--color-brand-muted); }
.uc-btn-danger { background: var(--color-danger); color: #ffffff; border-color: var(--color-danger); }
.uc-btn-danger:hover:not(:disabled) { filter: brightness(1.1); }
.uc-btn-ghost { background: transparent; color: var(--text-secondary); border-color: transparent; }
.uc-btn-ghost:hover:not(:disabled) { background: var(--bg-hover); color: var(--text-primary); }
.uc-btn-gold { background: var(--accent-gold); color: #1a1a1a; border-color: var(--accent-gold); }
.uc-btn-gold:hover:not(:disabled) { background: var(--accent-gold-hover); }
.uc-btn-sm { padding: 6px 12px; font-size: var(--font-xs); border-radius: var(--radius-xs); }
.uc-btn-lg { padding: 14px 28px; font-size: var(--font-base); border-radius: var(--radius-md); }

/* UC Tabs */
.uc-tabs { display: flex; gap: 2px; background: var(--bg-surface-2); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 4px; overflow-x: auto; scrollbar-width: none; }
.uc-tabs::-webkit-scrollbar { display: none; }
.uc-tab { flex: 1; padding: 10px 18px; text-align: center; font-size: var(--font-sm); font-weight: 600; font-family: var(--font-mono); border-radius: var(--radius-sm); cursor: pointer; color: var(--text-dim); border: none; background: transparent; transition: all 0.15s ease; white-space: nowrap; letter-spacing: 0.4px; }
.uc-tab:hover { color: var(--text-secondary); background: var(--bg-hover); }
.uc-tab.active { background: var(--bg-surface); color: var(--text-primary); box-shadow: var(--shadow-xs); }
.uc-tabs-underline { display: flex; gap: 0; border-bottom: 1px solid var(--border); background: transparent; padding: 0; border: none; border-radius: 0; }
.uc-tabs-underline .uc-tab { border-radius: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; flex: none; padding: 12px 22px; }
.uc-tabs-underline .uc-tab.active { color: var(--color-brand); border-bottom-color: var(--color-brand); background: transparent; box-shadow: none; }

/* UC Dropdown */
.uc-dropdown { position: relative; display: inline-block; }
.uc-dropdown-menu { position: absolute; top: calc(100% + 4px); left: 0; min-width: 180px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); padding: 4px; z-index: 100; opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity 0.15s, transform 0.15s, visibility 0.15s; }
.uc-dropdown.open .uc-dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.uc-dropdown-item { display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-size: var(--font-sm); color: var(--text-primary); border-radius: var(--radius-sm); cursor: pointer; transition: background 0.12s; border: none; background: transparent; width: 100%; text-align: left; font-family: inherit; }
.uc-dropdown-item:hover { background: var(--bg-hover); }
.uc-dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* UC Search */
.uc-search { position: relative; display: flex; align-items: center; }
.uc-search-input { width: 100%; padding: 10px 14px 10px 38px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--input-bg); color: var(--text-primary); font-family: var(--font-ui); font-size: var(--font-base); transition: border-color 0.15s, box-shadow 0.15s; outline: none; }
.uc-search-input::placeholder { color: var(--text-dim); }
.uc-search-input:focus { border-color: var(--input-focus); box-shadow: var(--shadow-focus); }
.uc-search-icon { position: absolute; left: 14px; color: var(--text-dim); font-size: 14px; pointer-events: none; }

/* UC Slider */
.uc-slider { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 2px; background: var(--border-strong); outline: none; }
.uc-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--color-brand); cursor: pointer; border: 2px solid var(--bg-surface); box-shadow: var(--shadow-sm); transition: transform 0.15s; }
.uc-slider::-webkit-slider-thumb:hover { transform: scale(1.15); }
.uc-slider::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--color-brand); cursor: pointer; border: 2px solid var(--bg-surface); box-shadow: var(--shadow-sm); }

/* UC Skeleton */
.uc-skeleton { background: var(--bg-surface-2); border-radius: var(--radius-xs); position: relative; overflow: hidden; }
.uc-skeleton::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 0%, var(--bg-hover) 40%, var(--bg-hover) 60%, transparent 100%); animation: uc-shimmer 2s ease-in-out infinite; }
.uc-skeleton-text { height: 14px; margin-bottom: 8px; width: 100%; }
.uc-skeleton-text.short { width: 60%; }
.uc-skeleton-text.medium { width: 80%; }
.uc-skeleton-heading { height: 22px; width: 40%; margin-bottom: 14px; }
.uc-skeleton-avatar { width: 40px; height: 40px; border-radius: 50%; }
.uc-skeleton-card { height: 120px; border-radius: var(--radius-md); }

/* UC Dialog */
.uc-dialog-overlay { position: fixed; inset: 0; background: var(--overlay-bg); backdrop-filter: blur(8px); z-index: 9998; display: flex; align-items: center; justify-content: center; animation: uc-fade-in 0.15s ease; }
.uc-dialog { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; width: 380px; max-width: 90vw; box-shadow: var(--shadow-xl); animation: uc-scale-in 0.2s ease; }
.uc-dialog-title { font-size: var(--font-md); font-weight: 700; color: var(--text-primary); margin-bottom: 10px; }
.uc-dialog-message { font-size: var(--font-base); color: var(--text-secondary); line-height: 1.5; margin-bottom: 22px; }
.uc-dialog-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* UC Tooltip */
.uc-tooltip { position: relative; display: inline-block; }
.uc-tooltip-text { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: var(--text-primary); color: var(--bg-body); font-size: var(--font-sm); font-weight: 500; padding: 8px 12px; border-radius: var(--radius-sm); white-space: nowrap; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity 0.15s, visibility 0.15s, transform 0.15s; z-index: 200; }
.uc-tooltip-text::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 5px solid transparent; border-top-color: var(--text-primary); }
.uc-tooltip:hover .uc-tooltip-text { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(-2px); }

/* UC Empty State */
.uc-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 56px 28px; text-align: center; color: var(--text-dim); }
.uc-empty-icon { font-size: 48px; margin-bottom: 18px; opacity: 0.35; }
.uc-empty-title { font-size: var(--font-md); font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.uc-empty-desc { font-size: var(--font-base); color: var(--text-dim); max-width: 320px; line-height: 1.5; margin-bottom: 18px; }

/* UC Modal */
.uc-modal-overlay { position: fixed; inset: 0; z-index: 9997; background: var(--overlay-bg); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; animation: uc-fade-in 0.2s ease; }
.uc-modal { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); width: 480px; max-width: 95vw; max-height: 85vh; display: flex; flex-direction: column; box-shadow: var(--shadow-xl); animation: uc-slide-up 0.25s ease; overflow: hidden; }
.uc-modal-header { padding: 24px 28px 0; border: none; display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.uc-modal-title { font-size: var(--font-lg); font-weight: 700; color: var(--text-primary); letter-spacing: 0.1px; }
.uc-modal-close { width: 30px; height: 30px; border-radius: var(--radius-sm); background: transparent; border: none; color: var(--text-dim); font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.12s, color 0.12s; }
.uc-modal-close:hover { background: var(--bg-hover); color: var(--text-primary); }
.uc-modal-body { padding: 16px 28px; overflow-y: auto; flex: 1; }
.uc-modal-footer { padding: 16px 28px 24px; border: none; display: flex; gap: 8px; justify-content: flex-end; flex-shrink: 0; }
.uc-modal.sm { width: 360px; }
.uc-modal.lg { width: 640px; }
.uc-modal.xl { width: 800px; }
.uc-modal.full { width: 95vw; height: 90vh; max-height: 90vh; }

/* UC Thesis Content */
.uc-thesis-content { font-size: var(--font-base); line-height: 1.7; color: var(--text-secondary); }
.uc-thesis-content h3 { font-size: var(--font-md); font-weight: 700; color: var(--text-primary); margin: 18px 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.uc-thesis-content ul { padding-left: 18px; margin-bottom: 14px; }
.uc-thesis-content li { margin-bottom: 4px; }
.uc-thesis-content .uc-thesis-highlight { background: var(--accent-gold-muted); padding: 2px 8px; border-radius: var(--radius-xs); font-weight: 600; color: var(--accent-gold); }

/* UC Live Dot */
.uc-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-success); display: inline-block; animation: uc-live-pulse 2s ease-in-out infinite; }
.uc-live-dot.offline { background: var(--color-danger); animation: none; }
.uc-live-dot.reconnecting { background: var(--color-warning); animation: uc-live-pulse 1s ease-in-out infinite; }

/* UC Count-up */
.uc-countup { font-variant-numeric: tabular-nums; transition: color 0.3s ease; }

/* UC Stagger */
.uc-stagger > * { animation: uc-fade-in 0.3s ease backwards; }
.uc-stagger > *:nth-child(1)  { animation-delay: 0.00s; }
.uc-stagger > *:nth-child(2)  { animation-delay: 0.04s; }
.uc-stagger > *:nth-child(3)  { animation-delay: 0.08s; }
.uc-stagger > *:nth-child(4)  { animation-delay: 0.12s; }
.uc-stagger > *:nth-child(5)  { animation-delay: 0.16s; }
.uc-stagger > *:nth-child(6)  { animation-delay: 0.20s; }
.uc-stagger > *:nth-child(7)  { animation-delay: 0.24s; }
.uc-stagger > *:nth-child(8)  { animation-delay: 0.28s; }
.uc-stagger > *:nth-child(9)  { animation-delay: 0.32s; }
.uc-stagger > *:nth-child(10) { animation-delay: 0.36s; }

/* UC Trade Form */
.uc-trade-form .uc-form-group { margin-bottom: 16px; }
.uc-trade-form .uc-form-label { display: block; font-size: var(--font-sm); font-weight: 600; color: var(--text-dim); margin-bottom: 6px; letter-spacing: 0.3px; text-transform: uppercase; }
.uc-trade-form .uc-form-input { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--input-bg); color: var(--text-primary); font-family: var(--font-mono); font-size: var(--font-base); transition: border-color 0.15s, box-shadow 0.15s; outline: none; }
.uc-trade-form .uc-form-input:focus { border-color: var(--input-focus); box-shadow: var(--shadow-focus); }

/* Theme toggle button */
.theme-toggle { width: 34px; height: 34px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 16px; transition: border-color 0.15s, background 0.15s; flex-shrink: 0; color: var(--text-secondary); }
.theme-toggle:hover { border-color: var(--accent-gold); background: var(--accent-gold-muted); color: var(--accent-gold); }

/* TB topbar from components */
.tb-nav-item { position: relative; }
.tb-nav-item::after { content: ''; position: absolute; bottom: 0; left: 12px; right: 12px; height: 2px; background: var(--color-brand); border-radius: 1px; transform: scaleX(0); transform-origin: center; transition: transform 0.2s ease; }
.tb-nav-item:hover::after, .tb-nav-item.active::after { transform: scaleX(1); }


/* ============================================================================
   SECTION 40 — THEME-SCOPED OVERRIDES (backward compat for .theme-light)
   ============================================================================ */

.theme-light .status-bar { background: var(--bg-surface); border-color: var(--border); }
.theme-light .pulse { background: var(--bg-surface); border-color: var(--border); }
.theme-light .op-section { background: var(--bg-surface); border-color: rgba(0, 96, 57, 0.15); }
.theme-light .op-section::before { background: linear-gradient(90deg, var(--color-brand), var(--color-omega)); }
.theme-light .op-card { background: var(--bg-surface-2); border-left-color: var(--color-brand); }
.theme-light .op-card.op-short { border-left-color: var(--color-danger); }
.theme-light .op-card:hover { background: var(--bg-hover); }
.theme-light .btn-primary { background: var(--color-brand); border-color: var(--color-brand); color: var(--text-inverse); }
.theme-light .btn-primary:hover { background: var(--color-brand-hover); border-color: var(--color-brand-hover); }
.theme-light .cat-tab.active { background: var(--bg-surface); color: var(--text-primary); box-shadow: var(--shadow-xs); }
.theme-light .ct-tab.active { color: var(--color-brand); border-bottom-color: var(--color-brand); }
.theme-light .seg-lf { background: #006039; }
.theme-light .seg-l  { background: #16a34a; }
.theme-light .seg-n  { background: #B8B8B8; }
.theme-light .seg-s  { background: #ef4444; }
.theme-light .seg-sf { background: #8B1A1A; }
.theme-light .spinner { border-color: var(--border); border-top-color: var(--color-brand); }
.theme-light .loading-text { color: var(--text-secondary); }


/* ============================================================================
   SECTION 41 — RESPONSIVE BREAKPOINTS
   ============================================================================ */

/* Large (1024-1439px): Sidebar collapses */
@media (max-width: 1439px) {
    .sidebar { width: var(--sidebar-collapsed-w, 72px); }
    .sidebar-logo, .sidebar-item-label, .sidebar-section,
    .sidebar-user-info, .sidebar-status-text, .sidebar-clock { opacity: 0; width: 0; overflow: hidden; }
    .sidebar-header { justify-content: center; padding: 0 8px; }
    .sidebar-collapse-btn { margin-left: 0; }
    .sidebar-item { justify-content: center; padding: 10px 0; margin: 1px 6px; gap: 0; border-left: none; }
    .sidebar-item-icon { margin: 0; }
    .sidebar-footer { align-items: center; padding: 10px 4px; }
    .sidebar-user { justify-content: center; }
    .sidebar-avatar { margin: 0; }
    .sidebar-logout-btn { display: none; }
    .page-content { margin-left: var(--sidebar-collapsed-w, 72px); }
}

/* Medium (768-1023px): Sidebar becomes overlay */
@media (max-width: 1023px) {
    .sidebar { transform: translateX(-100%); z-index: 200; }
    .sidebar.open { transform: translateX(0); }
    .page-content { margin-left: 0; }
    .grid-panels { grid-template-columns: 1fr; }
    .grid-metrics { grid-template-columns: repeat(2, 1fr); }
    .proj-grid { grid-template-columns: 1fr; }
    .pulse-pnl { border-left: none; padding-left: 0; border-top: 1px solid var(--border); padding-top: var(--space-2); width: 100%; justify-content: center; }
}

/* Small (480-767px): Mobile layout */
@media (max-width: 767px) {
    .main { padding: 0 var(--space-4) var(--space-8); }
    .grid-metrics { grid-template-columns: 1fr 1fr; }
    table { font-size: var(--font-xs); }
    td { padding: 8px 10px; }
    thead th { padding: 8px 10px; font-size: var(--font-xs); }
    .pulse { padding: 12px var(--space-4); gap: var(--space-3); }
    .pulse-stats { gap: var(--space-3); }
    .pulse-stat .ps-val { font-size: var(--font-md); }
    .op-grid { grid-template-columns: 1fr; }
    .op-card { padding: var(--space-4); }
    .pnl-cards { grid-template-columns: repeat(2, 1fr); }
    .pnl-value { font-size: 16px; }
    .pnl-label { font-size: 9px; }
    .pnl-sub { font-size: 9px; }
    .uc-modal { width: 100%; max-width: 100%; border-radius: var(--radius-lg) var(--radius-lg) 0 0; max-height: 90vh; }
    .uc-modal-overlay { align-items: flex-end; }
    .uc-toast-container { left: 12px; right: 12px; max-width: none; }
    .uc-toast { min-width: auto; }
}

/* Extra small (<480px): Compact mobile */
@media (max-width: 479px) {
    .main { padding: 0 var(--space-3) var(--space-6); }
    .grid-metrics { grid-template-columns: 1fr; }
    .btn { min-height: 44px; }
    .sidebar-item { min-height: 44px; }
    .status-bar { flex-wrap: wrap; padding: 8px 12px; }
    .status-left, .status-right { width: 100%; justify-content: space-between; }
    .cat-tabs { flex-wrap: nowrap; overflow-x: auto; }
    .cat-tab  { flex: none; padding: 8px 12px; }
    .content-tabs { overflow-x: auto; }
    .ct-tab   { padding: 10px 16px; white-space: nowrap; }
    .pnl-cards { grid-template-columns: 1fr; }
    .pnl-value { font-size: 15px; }
    .pnl-card { padding: var(--space-3) var(--space-4); }
    /* Hide less-critical columns */
    thead th:nth-child(5), td:nth-child(5),
    thead th:nth-child(6), td:nth-child(6),
    thead th:nth-child(9), td:nth-child(9) { display: none; }
    /* Touch targets */
    .btn-copy, .btn-chart, .btn-operar, .btn-fechar { min-height: 36px; min-width: 44px; padding: 8px 12px; font-size: var(--font-xs); }
    .pager button { padding: 8px 14px; min-height: 36px; }
    .tm-label { min-width: 65px; }
    .em-label { min-width: 80px; }
    .proj-compact { gap: 4px 12px; }
    .proj-card { padding: 12px var(--space-4); }
    .proj-card .ps { font-size: var(--font-md); }
    .op-pnl-big { font-size: 20px; }
    .op-metrics { grid-template-columns: 1fr 1fr; }
    .uc-tabs { border-radius: var(--radius-sm); }
    .uc-tab { padding: 8px 12px; font-size: var(--font-xs); }
    .uc-stats-card .uc-stat-value { font-size: 22px; }
}


/* ============================================================================
   SECTION 42 — PRINT STYLES
   ============================================================================ */

@media print {
    #topbar, .topbar, .sidebar,
    .tb-topbar, .tb-overlay,
    .uc-toast-container, .toast-container,
    .theme-toggle, .nav-drawer {
        display: none !important;
    }
    body {
        background: #fff !important;
        color: #000 !important;
        padding-top: 0 !important;
    }
    .page-content { margin-left: 0 !important; }
    .card, .uc-card, .uc-trading-card, .uc-stats-card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        break-inside: avoid;
    }
}
