/* ==========================================================================
   LastEdge — Finance Bento Grid Styles (Geist Dark Institutional Theme)
   Adapted from finance-bento.tsx (21st.dev / institutional grade fintech)
   ========================================================================== */

.fpb {
    font-family: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #fff;
    width: 100%;
    margin-bottom: 24px;
    --acc: #E8FF1F;
    --acc-green: #10B981;
    --acc-red: #EF4444;
    --t1: #ffffff;
    --t2: rgba(255, 255, 255, 0.65);
    --t3: rgba(255, 255, 255, 0.40);
    --hair: rgba(255, 255, 255, 0.12);
    --ease: cubic-bezier(0.32, 0.72, 0, 1);
    --fiat: #FFFFFF;
    --stocks: #A9B2FF;
    --crypto: #FFB37A;
    --gold: #FFD700;
}

.fpb * {
    box-sizing: border-box;
}

.fpb .fpb-c {
    position: relative;
    padding: 22px 24px 26px;
    background: #090A0F;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    color: #fff;
    box-shadow: 0 20px 50px -15px rgba(0, 0, 0, 0.65);
}

/* Header & Switcher Controls */
.fpb .top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    height: 48px;
    margin-bottom: 20px;
}

.fpb .top-left {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.fpb .top h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.fpb .top h1 span#asof {
    font-weight: 500;
    color: var(--t3);
    font-size: 13.5px;
    letter-spacing: -0.01em;
}

.fpb .top .pulse-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--acc);
    box-shadow: 0 0 12px var(--acc);
    display: inline-block;
    animation: bentoPulse 2s infinite;
}

@keyframes bentoPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.35); opacity: 0.6; }
}

.fpb .ctrls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fpb .seg {
    display: flex;
    padding: 3px;
    gap: 2px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.fpb .seg button {
    border: 0;
    height: 28px;
    min-width: 44px;
    padding: 0 12px;
    border-radius: 11px;
    background: transparent;
    color: var(--t2);
    font: 600 12px "Geist", -apple-system, sans-serif;
    cursor: pointer;
    transition: background 0.22s, color 0.22s, transform 0.15s;
}

.fpb .seg button:hover {
    color: #fff;
}

.fpb .seg button[aria-pressed="true"] {
    background: #ffffff;
    color: #090a0f;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.fpb .seg button:focus-visible {
    outline: 2px solid var(--acc);
    outline-offset: 2px;
}

/* 12-Column Responsive Bento Grid */
.fpb .grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 16px;
}

.fpb .h1 {
    height: 380px;
}

.fpb .h2 {
    height: 172px;
}

.fpb .h3 {
    height: 336px;
}

.fpb #nw {
    grid-column: span 8;
}

.fpb #alloc {
    grid-column: span 4;
}

.fpb .kpi {
    grid-column: span 3;
}

.fpb #flow {
    grid-column: span 5;
}

.fpb #crypto {
    grid-column: span 4;
}

.fpb #stocks {
    grid-column: span 3;
}

/* Responsive Grid Breakpoints */
@media (max-width: 1200px) {
    .fpb #nw {
        grid-column: span 12;
    }
    .fpb #alloc {
        grid-column: span 12;
        height: 350px;
    }
    .fpb .kpi {
        grid-column: span 6;
    }
    .fpb #flow {
        grid-column: span 12;
    }
    .fpb #crypto {
        grid-column: span 7;
    }
    .fpb #stocks {
        grid-column: span 5;
    }
}

@media (max-width: 768px) {
    .fpb .fpb-c {
        padding: 16px 14px;
        border-radius: 20px;
    }
    .fpb .top {
        flex-direction: column;
        align-items: flex-start;
        height: auto;
        gap: 12px;
    }
    .fpb .ctrls {
        width: 100%;
        justify-content: space-between;
    }
    .fpb #nw {
        height: 420px;
    }
    .fpb .kpi {
        grid-column: span 12;
    }
    .fpb #crypto,
    .fpb #stocks {
        grid-column: span 12;
    }
    .fpb .grid {
        gap: 12px;
    }
}

/* Card Styling, Glow, and Rim */
.fpb .card {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(14px) scale(0.985);
    transition: opacity 0.7s ease, transform 0.9s var(--ease), box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.fpb .card:hover {
    box-shadow: 0 12px 36px -8px rgba(0, 0, 0, 0.6);
}

.fpb.in .card,
.fpb .in .card {
    opacity: 1;
    transform: none;
}

.fpb .card .rim {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    pointer-events: none;
    z-index: 9;
}

.fpb .g {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.fpb .core {
    position: absolute;
    left: 8%;
    right: 8%;
    top: 14%;
    bottom: -8%;
    border-radius: 120px;
    filter: blur(65px);
    pointer-events: none;
}

.fpb .glass {
    background: rgba(18, 20, 29, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.fpb .glass .rim {
    display: none;
}

.fpb .solid {
    background: var(--acc);
    color: #090a0f;
}

.fpb .solid * {
    color: #090a0f !important;
}

.fpb .solid .rim {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.fpb .in-c {
    position: absolute;
    inset: 0;
    padding: 22px 24px;
    z-index: 2;
    display: flex;
    flex-direction: column;
}

/* Typography & Utility Elements */
.fpb .ttl {
    font-size: 17.5px;
    font-weight: 600;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
}

.fpb .cap {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--t2);
}

.fpb .solid .cap {
    color: rgba(0, 0, 0, 0.65) !important;
}

.fpb .big {
    font-size: 38px;
    font-weight: 300;
    letter-spacing: -0.04em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    font-family: "Geist Mono", monospace;
}

.fpb .delta {
    font: 600 12.5px "Geist Mono", monospace;
    color: var(--acc);
    letter-spacing: -0.02em;
}

.fpb .solid .delta {
    color: #090a0f !important;
}

.fpb .muted {
    font-size: 12px;
    color: var(--t3);
    font-weight: 500;
    letter-spacing: -0.01em;
}

.fpb .chip {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 9px;
    border-radius: 11px;
    background: rgba(0, 0, 0, 0.82);
    color: #fff !important;
    font: 600 11px "Geist Mono", monospace;
    letter-spacing: -0.02em;
}

.fpb .legend {
    display: flex;
    gap: 16px;
    font-size: 12px;
    font-weight: 500;
    color: var(--t2);
}

.fpb .legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.fpb .legend i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.fpb .row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fpb .mono {
    font-family: "Geist Mono", monospace;
    font-variant-numeric: tabular-nums;
}

.fpb .nwn {
    min-height: 48px;
    display: flex;
    align-items: center;
}

.fpb .dots {
    display: block;
    overflow: visible;
}

.fpb .dots circle {
    transition: opacity 0.26s, transform 0.26s;
    transform-box: fill-box;
    transform-origin: center;
}

/* Tooltip */
.fpb .tip {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    background: rgba(14, 16, 22, 0.94);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    padding: 10px 14px;
    font-size: 12px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.85);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.15s, transform 0.15s;
    white-space: nowrap;
    min-width: 160px;
}

.fpb .tip.on {
    opacity: 1;
    transform: none;
}

.fpb .tip .t {
    color: var(--t2);
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 11.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 4px;
}

.fpb .tip .r {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    line-height: 20px;
}

.fpb .tip .r span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--t2);
}

.fpb .tip i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.fpb .tip b {
    font: 600 12px "Geist Mono", monospace;
}

/* Custom Signal Items in #pay */
.fpb .signal-item-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 36px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.fpb .signal-item-mini:first-child {
    border-top: none;
}

.fpb .sig-dir-badge {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: grid;
    place-items: center;
    font: 700 10px "Geist Mono", monospace;
}

.fpb .sig-dir-buy {
    background: rgba(16, 185, 129, 0.2);
    color: #10B981;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.fpb .sig-dir-sell {
    background: rgba(239, 68, 68, 0.2);
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

/* Strategy Radar (#crypto revamping) */
.fpb .radar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fpb .radar-pill-group {
    display: flex;
    gap: 4px;
}

.fpb .radar-pill {
    padding: 2px 8px;
    border-radius: 8px;
    font: 600 11px "Geist Mono", monospace;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--t2);
    cursor: pointer;
    transition: all 0.2s ease;
}

.fpb .radar-pill:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.fpb .radar-pill.active {
    background: #ffffff;
    color: #090a0f;
    border-color: #ffffff;
}

.fpb .radar-gauge-bar {
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
    margin-top: 8px;
}

.fpb .radar-gauge-fill {
    height: 100%;
    background: linear-gradient(90deg, #10B981 0%, var(--acc) 100%);
    border-radius: 3px;
    transition: width 0.8s var(--ease);
}

.fpb .radar-cond-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}

.fpb .radar-cond-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 32px;
    padding: 0 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 11.5px;
}

.fpb .radar-badge {
    padding: 2px 7px;
    border-radius: 6px;
    font: 700 9.5px "Geist Mono", monospace;
    letter-spacing: 0.04em;
}

.fpb .radar-badge-passed {
    background: rgba(16, 185, 129, 0.2);
    color: #10B981;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.fpb .radar-badge-waiting {
    background: rgba(234, 179, 8, 0.18);
    color: #EAB308;
    border: 1px solid rgba(234, 179, 8, 0.35);
}

/* Strategy Lab Quant Intelligence (#stocks revamping) */
.fpb .quant-matrix-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.fpb .quant-bar-wrap {
    margin-top: 10px;
}

.fpb .quant-stacked-bar {
    display: flex;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    gap: 2px;
}

.fpb .quant-bar-seg {
    height: 100%;
    transition: width 0.8s var(--ease);
}

.fpb .quant-bar-promoted {
    background: #10B981;
}

.fpb .quant-bar-candidate {
    background: #6366F1;
}

.fpb .quant-bar-rejected {
    background: rgba(239, 68, 68, 0.6);
}

.fpb .quant-stats-list {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fpb .quant-stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
    padding: 4px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.fpb .quant-stat-row:first-child {
    border-top: none;
}

.fpb .quant-action-btn {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 30px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font: 600 11.5px "Geist", sans-serif;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.fpb .quant-action-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: var(--acc);
    color: var(--acc);
}

/* ==========================================================================
   Portfolio Equity vs Balance Benchmark (#nw from web3-bento.tsx ChartTile)
   ========================================================================== */
.fpb .nw-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fpb .nw-metrics-strip {
    display: flex;
    align-items: flex-end;
    gap: 28px;
    margin-top: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.fpb .nw-metric-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fpb .nw-metric-lbl {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    color: var(--t2);
    font-weight: 500;
}

.fpb .nw-swatch-line {
    width: 14px;
    height: 3px;
    border-radius: 2px;
    background: #10B981;
    display: inline-block;
}

.fpb .nw-swatch-dash {
    width: 14px;
    height: 0;
    border-top: 2px dashed rgba(255, 255, 255, 0.4);
    display: inline-block;
}

.fpb .nw-bal-val {
    font-size: 26px;
    font-weight: 600;
    color: var(--t2);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.fpb .nw-metric-badge-box {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-end;
}

.fpb .nw-alpha-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 9999px;
    font-family: "Geist Mono", monospace;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: -0.01em;
    background: rgba(16, 185, 129, 0.16);
    color: #10B981;
    border: 1px solid rgba(16, 185, 129, 0.32);
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.12);
    transition: all 0.3s ease;
}

.fpb .nw-chart-container {
    flex: 1;
    position: relative;
    width: 100%;
    min-height: 190px;
    margin-top: 6px;
}

.fpb .nw-labels-row {
    display: flex;
    justify-content: space-between;
    font-family: "Geist Mono", monospace;
    font-size: 11px;
    color: var(--t3);
    margin-top: 6px;
    padding: 0 4px;
}

/* Enhanced Activity / Signals Feed Styling from web3-bento.tsx */
.fpb .signal-item-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 12px;
    transition: background 0.2s ease;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.fpb .signal-item-card:first-child {
    border-top: none;
}

.fpb .signal-item-card:hover {
    background: rgba(255, 255, 255, 0.04);
}

@media (prefers-reduced-motion: reduce) {
    .fpb .card {
        transition: none;
    }
}

/* ==========================================================================
   LastEdge — Finance Bento Positions Grid Styles (Estilo 21st.dev)
   Operaciones Abiertas, Señales Pendientes 1-Click & Trade Journal
   ========================================================================== */

.pos-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 16px;
}

.pos-card-open {
    grid-column: span 7;
    min-height: 460px;
    display: flex;
    flex-direction: column;
}

.pos-card-pending {
    grid-column: span 5;
    min-height: 460px;
    display: flex;
    flex-direction: column;
}

.pos-card-journal {
    grid-column: span 12;
    margin-top: 6px;
    display: flex;
    flex-direction: column;
}

@media (max-width: 1100px) {
    .pos-card-open,
    .pos-card-pending {
        grid-column: span 12;
    }
}

.pos-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(0, 0, 0, 0.25);
}

.pos-card-body {
    padding: 18px 20px;
    flex: 1;
    overflow-y: auto;
    max-height: 540px;
}

/* Item Card (Operaciones Abiertas) */
.pos-items-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pos-item-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 16px 18px;
    transition: all 0.22s var(--ease);
}

.pos-item-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.pos-item-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pos-symbol-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 11.5px;
    border: 1px solid;
    font-family: "Geist Mono", monospace;
}

.pos-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.pos-type-tag {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    font-family: "Geist Mono", monospace;
}

.tag-buy {
    background: rgba(16, 185, 129, 0.15);
    color: #10B981;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.tag-sell {
    background: rgba(239, 68, 68, 0.15);
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.pos-pnl-val {
    font-family: "Geist Mono", monospace;
    font-size: 20px;
    font-weight: 400;
    letter-spacing: -0.03em;
}

/* Price Details Grid */
.pos-price-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 12px 0 10px;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.price-cell .cell-label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--t3);
    margin-bottom: 2px;
    font-weight: 600;
}

.price-cell .cell-val {
    display: block;
    font-family: "Geist Mono", monospace;
    font-size: 12.5px;
    color: var(--t2);
    font-weight: 500;
}

/* Visual Trailing Stop Bar */
.trailing-container {
    margin: 10px 0 12px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.trailing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 7px;
    font-size: 11.5px;
    font-family: "Geist Mono", monospace;
}

.trailing-title {
    color: var(--t2);
    display: flex;
    align-items: center;
}

.trailing-pct {
    color: var(--t3);
    font-size: 11px;
}

.trailing-track {
    position: relative;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

.trailing-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--acc) 0%, #10B981 100%);
    border-radius: 4px;
    transition: width 0.4s ease;
}

.fill-be-secured {
    background: linear-gradient(90deg, #10B981 0%, #34D399 100%);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.trailing-be-marker {
    position: absolute;
    left: 40%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(255, 255, 255, 0.35);
}

.pos-item-actions {
    display: flex;
    justify-content: flex-end;
}

.btn-close-pos {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #EF4444;
    border-radius: 10px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-close-pos:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: #EF4444;
}

/* Pending Signals Feed */
.pending-signals-feed {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pending-sig-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 165, 0, 0.20);
    border-radius: 18px;
    padding: 16px 18px;
    transition: all 0.22s var(--ease);
}

.pending-sig-card:hover {
    background: rgba(255, 165, 0, 0.04);
    border-color: rgba(255, 165, 0, 0.4);
    box-shadow: 0 8px 24px rgba(255, 165, 0, 0.12);
}

.pending-sig-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pending-sig-strategy {
    font-size: 11.5px;
    color: var(--t2);
    margin: 8px 0;
    font-family: "Geist Mono", monospace;
}

.pending-prices-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    font-family: "Geist Mono", monospace;
    font-size: 11.5px;
    margin-bottom: 10px;
}

.pending-prices-row .lbl {
    color: var(--t3);
    font-size: 10px;
    text-transform: uppercase;
}

.pending-prices-row .val {
    font-weight: 600;
    color: #FFFFFF;
}

.btn-approve-1click {
    width: 100%;
    height: 38px;
    background: linear-gradient(135deg, #FFB800 0%, #FF8C00 100%);
    color: #090A0F;
    font-weight: 700;
    font-size: 12.5px;
    border: none;
    border-radius: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(255, 165, 0, 0.3);
    transition: all 0.2s ease;
}

.btn-approve-1click:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 165, 0, 0.45);
    filter: brightness(1.05);
}

.btn-approve-1click:active {
    transform: scale(0.98);
}

.conf-pill {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    letter-spacing: 0.04em;
    font-family: "Geist Mono", monospace;
}

.conf-high, .conf-veryhigh {
    background: rgba(16, 185, 129, 0.18);
    color: #10B981;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.conf-medium, .conf-mediumhigh {
    background: rgba(255, 165, 0, 0.18);
    color: #FFA500;
    border: 1px solid rgba(255, 165, 0, 0.4);
}

.conf-low {
    background: rgba(255, 255, 255, 0.1);
    color: var(--t2);
}

/* Bento Trade Journal Styling */
.journal-kpi-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.journal-kpi-chip {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 6px 14px;
    display: flex;
    flex-direction: column;
    min-width: 90px;
}

.journal-kpi-chip .kpi-label {
    font-size: 9.5px;
    text-transform: uppercase;
    color: var(--t3);
    letter-spacing: 0.06em;
    font-weight: 700;
}

.journal-kpi-chip .kpi-val {
    font-family: "Geist Mono", monospace;
    font-size: 15px;
    font-weight: 600;
    color: #FFFFFF;
}

.journal-table-wrap {
    overflow-x: auto;
    padding: 0 20px;
    flex: 1;
}

.bento-trading-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
    text-align: left;
}

.bento-trading-table thead th {
    padding: 12px 14px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--t3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-weight: 600;
}

.bento-trading-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.15s ease;
}

.bento-trading-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.bento-trading-table tbody td {
    padding: 12px 14px;
    color: var(--t2);
}

.reason-pill {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 10.5px;
    font-weight: 700;
    font-family: "Geist Mono", monospace;
}

.reason-tp {
    background: rgba(16, 185, 129, 0.15);
    color: #10B981;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.reason-sl {
    background: rgba(239, 68, 68, 0.15);
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.reason-trail {
    background: rgba(56, 189, 248, 0.15);
    color: #38BDF8;
    border: 1px solid rgba(56, 189, 248, 0.35);
}

.reason-manual {
    background: rgba(255, 165, 0, 0.15);
    color: #FFA500;
    border: 1px solid rgba(255, 165, 0, 0.35);
}

.journal-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.25);
}

/* Empty States */
.pos-empty-state {
    padding: 44px 20px;
    text-align: center;
    color: var(--t2);
}

.pos-empty-icon {
    font-size: 32px;
    color: #10B981;
    margin-bottom: 12px;
}

.pos-empty-title {
    font-size: 15px;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 4px;
}

.pos-empty-desc {
    font-size: 12px;
    color: var(--t3);
    max-width: 380px;
    margin: 0 auto;
    line-height: 1.45;
}

/* ── Pending Signals Timing & Action Enhancements ───────────────────────── */

.pending-time-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0 8px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
    margin-bottom: 8px;
}

.pending-time-row .time-left {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: "Geist Mono", monospace;
    font-size: 11px;
    color: var(--t2);
}

.pending-time-row .time-left .exact-time {
    color: #FFFFFF;
    font-weight: 600;
}

.pending-time-row .time-left .rel-time {
    color: var(--t3);
    font-size: 10px;
}

.countdown-chip {
    font-family: "Geist Mono", monospace;
    font-size: 10.5px;
    font-weight: 600;
    padding: 2.5px 8px;
    border-radius: 6px;
    background: rgba(245, 158, 11, 0.1);
    color: #FBBF24;
    border: 1px solid rgba(245, 158, 11, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.countdown-urgent {
    background: rgba(239, 68, 68, 0.16) !important;
    color: #F87171 !important;
    border-color: rgba(239, 68, 68, 0.45) !important;
    animation: pulseUrgent 1.6s infinite ease-in-out;
}

@keyframes pulseUrgent {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    50% {
        box-shadow: 0 0 10px 2px rgba(239, 68, 68, 0.25);
    }
}

.pending-actions-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
}

.btn-reject-signal {
    font-family: Geist, system-ui, -apple-system, sans-serif;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: -0.01em;
    height: 38px;
    padding: 0 16px;
    border-radius: 12px;
    background: rgba(18, 18, 22, 0.75);
    color: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 4px 12px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(16px);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    outline: none;
    -webkit-appearance: none;
    transition: all 0.25s cubic-bezier(0.32, 0.72, 0, 1);
}

.btn-reject-signal i {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    transition: color 0.2s ease, transform 0.2s ease;
}

.btn-reject-signal:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.38);
    color: #F87171;
    box-shadow: inset 0 1px 0 rgba(239, 68, 68, 0.25), 0 0 18px -2px rgba(239, 68, 68, 0.28);
    transform: translateY(-1px);
}

.btn-reject-signal:hover i {
    color: #EF4444;
    transform: scale(1.15);
}

.btn-reject-signal:active {
    transform: scale(0.97);
}

/* ── Slippage Guard Bento Modal Dialog ──────────────────────────────────── */

#bento-drift-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
}

.bento-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease-out;
}

.bento-modal-card {
    background: linear-gradient(135deg, rgba(20, 22, 30, 0.96) 0%, rgba(12, 14, 20, 0.98) 100%);
    border: 1px solid rgba(245, 158, 11, 0.35);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(245, 158, 11, 0.15);
    border-radius: 20px;
    max-width: 460px;
    width: 100%;
    padding: 24px;
    position: relative;
    overflow: hidden;
    animation: slideUpModal 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpModal {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.bento-modal-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.modal-icon-warning {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #F59E0B;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.bento-modal-title {
    font-size: 16px;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0 0 2px 0;
}

.bento-modal-subtitle {
    font-size: 11.5px;
    color: var(--t3);
    margin: 0;
    font-family: "Geist Mono", monospace;
}

.bento-modal-body {
    margin-bottom: 22px;
}

.drift-comparison-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 10px;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 12px;
}

.drift-comp-cell {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.drift-comp-lbl {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--t3);
    font-weight: 600;
    letter-spacing: 0.05em;
}

.drift-comp-val {
    font-family: "Geist Mono", monospace;
    font-size: 14px;
    font-weight: 600;
    color: #FFFFFF;
}

.drift-comp-arrow {
    color: rgba(255, 255, 255, 0.3);
    font-size: 14px;
}

.highlight-drift .drift-comp-val {
    color: #F59E0B;
}

.drift-summary-pill {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 11.5px;
    color: #FBBF24;
    display: flex;
    align-items: center;
    gap: 8px;
}

.drift-summary-pill strong {
    font-family: "Geist Mono", monospace;
    color: #FFFFFF;
}

.bento-modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.btn-modal-cancel {
    height: 40px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    font-size: 12.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-modal-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
}

.btn-modal-force {
    height: 40px;
    border-radius: 11px;
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    border: none;
    color: #090A0F;
    font-weight: 700;
    font-size: 12.5px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-modal-force:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
    filter: brightness(1.08);
}


/* ============================================================================
   21st.dev input-otp-10 Web3 Security Lock Screen Component
   ============================================================================ */

.auth-lock-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(6, 9, 14, 0.88);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 20px;
    opacity: 1;
    transform: scale(1);
    visibility: visible;
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.7s ease;
}

.auth-lock-overlay.unlocked {
    opacity: 0;
    transform: scale(1.05);
    pointer-events: none;
    visibility: hidden;
}

.auth-lock-overlay.wip-hidden {
    display: none !important;
}

.auth-card {
    position: relative;
    width: 100%;
    max-width: 410px;
    border-radius: 24px;
    border: 1px solid #1e2638;
    background: linear-gradient(180deg, #111622 0%, rgba(12, 16, 23, 0.95) 100%);
    box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.8),
                0 0 0 1px rgba(255, 255, 255, 0.05),
                inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
    padding: 34px 28px;
    overflow: hidden;
    user-select: none;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.auth-card.is-shaking {
    animation: authCardShake 0.45s ease-in-out;
}

.auth-ambient-glow {
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    pointer-events: none;
}

.auth-ambient-tr {
    top: -45px;
    right: -45px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.22) 0%, transparent 70%);
    filter: blur(32px);
}

.auth-ambient-bl {
    bottom: -45px;
    left: -45px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.16) 0%, transparent 70%);
    filter: blur(32px);
}

.auth-card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    position: relative;
    z-index: 2;
}

/* Concentric Animated Visualizer */
.auth-visualizer-container {
    position: relative;
    width: 160px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.auth-ring-outer {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1.5px dashed rgba(99, 102, 241, 0.35);
    pointer-events: none;
    animation: authSpin 60s linear infinite;
    transition: border-color 0.5s ease;
}

.auth-ring-mid {
    position: absolute;
    inset: 9px;
    border-radius: 50%;
    border: 1.5px solid rgba(99, 102, 241, 0.18);
    pointer-events: none;
    animation: authSpin 30s linear infinite reverse;
    transition: border-color 0.5s ease;
}

.auth-ring-inner {
    position: absolute;
    inset: 18px;
    border-radius: 50%;
    border: 1px dashed rgba(99, 102, 241, 0.08);
    pointer-events: none;
}

.auth-ring-glow {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: linear-gradient(0deg, rgba(99, 102, 241, 0) 0%, rgba(99, 102, 241, 0.08) 50%, rgba(99, 102, 241, 0) 100%);
    pointer-events: none;
    animation: authGlowPulse 3s ease-in-out infinite;
    transition: background 0.5s ease;
}

.auth-visualizer-container.is-success .auth-ring-outer {
    border-color: rgba(16, 185, 129, 0.55);
}

.auth-visualizer-container.is-success .auth-ring-mid {
    border-color: rgba(16, 185, 129, 0.35);
}

.auth-visualizer-container.is-success .auth-ring-glow {
    background: linear-gradient(0deg, rgba(16, 185, 129, 0) 0%, rgba(16, 185, 129, 0.18) 50%, rgba(16, 185, 129, 0) 100%);
}

.auth-sphere-wrapper {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.85) 0%, rgba(10, 15, 26, 0.98) 100%);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-visualizer-container.is-success .auth-sphere-wrapper {
    transform: scale(1.05);
}

#otp-particle-canvas {
    width: 120px;
    height: 120px;
    display: block;
}

.auth-shield-badge {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(8, 11, 16, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-radius: 50%;
    z-index: 5;
}

.auth-shield-badge i {
    font-size: 38px;
    color: #10b981;
    filter: drop-shadow(0 0 16px rgba(16, 185, 129, 0.8));
    animation: authShieldPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Header text */
.auth-header-text {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-title {
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #f1f5f9;
    font-family: 'Geist', 'Inter', sans-serif;
    margin: 0;
    transition: color 0.3s ease;
}

.auth-subtitle {
    font-size: 11.5px;
    color: #94a3b8;
    max-width: 290px;
    margin: 0 auto;
    line-height: 1.5;
    font-family: 'Geist', 'Inter', sans-serif;
    transition: color 0.3s ease;
}

.auth-card.is-error .auth-title {
    color: #ef4444;
}

.auth-card.is-error .auth-subtitle {
    color: #fca5a5;
}

.auth-card.is-success .auth-title {
    color: #10b981;
}

.auth-card.is-success .auth-subtitle {
    color: #6ee7b7;
}

/* Slots */
.auth-slots-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    position: relative;
    padding: 4px;
}

.auth-otp-slot {
    position: relative;
    display: flex;
    width: 48px;
    height: 58px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
    font-family: 'Geist Mono', 'JetBrains Mono', monospace;
    font-size: 24px;
    font-weight: 700;
    color: #f8fafc;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

.auth-otp-slot:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.04);
}

.auth-otp-slot.active {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.08);
    color: #ffffff;
    box-shadow: 0 0 20px -2px rgba(99, 102, 241, 0.35);
}

.auth-otp-slot.is-filled {
    border-color: rgba(99, 102, 241, 0.45);
    background: rgba(99, 102, 241, 0.04);
}

.auth-otp-slot.is-error {
    border-color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.08) !important;
    color: #ef4444 !important;
    box-shadow: 0 0 20px -2px rgba(239, 68, 68, 0.4) !important;
}

.auth-otp-slot.is-success {
    border-color: #10b981 !important;
    background: rgba(16, 185, 129, 0.1) !important;
    color: #10b981 !important;
    box-shadow: 0 0 20px -2px rgba(16, 185, 129, 0.4) !important;
}

.auth-slot-caret {
    position: absolute;
    width: 2px;
    height: 24px;
    background: #6366f1;
    border-radius: 1px;
    animation: authCaretBlink 1s ease-in-out infinite;
    pointer-events: none;
}

.auth-slot-char {
    font-family: 'Geist Mono', 'JetBrains Mono', monospace;
    font-size: 24px;
    font-weight: 700;
    color: inherit;
    animation: authCharPop 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.auth-pulse-ring {
    position: absolute;
    inset: 0;
    border-radius: 14px;
    border: 1.5px solid #6366f1;
    pointer-events: none;
    opacity: 0;
}

.auth-pulse-ring.pulsing {
    animation: authSlotPulse 0.4s ease-out forwards;
}

.auth-hidden-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
    left: -9999px;
    top: -9999px;
}

/* Status indicator */
.auth-status-container {
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-status-text {
    font-size: 10.5px;
    font-family: 'Geist Mono', 'JetBrains Mono', monospace;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    transition: color 0.3s ease;
}

.auth-card.is-error .auth-status-text {
    color: #ef4444;
}

.auth-card.is-success .auth-status-text {
    color: #10b981;
}

/* Keyframes */
@keyframes authSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes authGlowPulse {
    0%, 100% { opacity: 0.35; }
    50% { opacity: 0.85; }
}

@keyframes authCaretBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes authCharPop {
    0% { opacity: 0; transform: scale(0.6) translateY(5px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes authSlotPulse {
    0% { opacity: 0.8; transform: scale(0.95); filter: blur(0px); }
    100% { opacity: 0; transform: scale(1.45); filter: blur(2px); }
}

@keyframes authShieldPop {
    0% { transform: scale(0.3) rotate(-20deg); opacity: 0; }
    70% { transform: scale(1.15) rotate(5deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes authCardShake {
    0%, 100% { transform: translateX(0); }
    15%, 45%, 75% { transform: translateX(-8px); }
    30%, 60%, 90% { transform: translateX(8px); }
}


