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

.app-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 240px;
    background: var(--gradient-sidebar);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    z-index: 50;
    padding: var(--space-5) var(--space-4);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    margin-bottom: var(--space-8);
    text-decoration: none;
}

.sidebar-logo-mark {
    width: 34px;
    height: 34px;
    background: var(--gradient-accent);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 16px rgba(94, 174, 216, 0.25);
    flex-shrink: 0;
}

.sidebar-logo-text {
    font-size: var(--text-base);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    flex: 1;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: 10px var(--space-3);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: 500;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: var(--font-sans);
    position: relative;
}
.sidebar-link:hover {
    background: rgba(94, 174, 216, 0.06);
    color: var(--text-secondary);
}
.sidebar-link.active {
    background: var(--accent-muted);
    color: var(--accent);
    font-weight: 600;
}
.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: -16px;
    top: 6px;
    bottom: 6px;
    width: 3px;
    background: var(--accent);
    border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
    box-shadow: 0 0 12px rgba(94, 174, 216, 0.4);
}
.sidebar-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.7;
}
.sidebar-link:hover svg,
.sidebar-link.active svg {
    opacity: 1;
}

.sidebar-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: var(--space-4) var(--space-3);
}

.app-main {
    flex: 1;
    margin-left: 240px;
    min-height: 100vh;
    position: relative;
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(6, 10, 16, 0.8);
    backdrop-filter: blur(24px) saturate(1.2);
    -webkit-backdrop-filter: blur(24px) saturate(1.2);
    border-bottom: 1px solid var(--border-subtle);
    padding: var(--space-3) var(--space-6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.topbar-greeting {
    font-size: var(--text-sm);
    color: var(--text-muted);
}
.topbar-greeting strong {
    color: var(--text-primary);
    font-weight: 600;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: var(--space-2);
}

.wallet-switcher {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}
.wallet-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}
.wallet-input {
    width: 320px;
    padding: 8px 14px;
    background: var(--bg-inner);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    outline: none;
    transition: all var(--transition-fast);
}
.wallet-input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(94, 174, 216, 0.08);
}
.wallet-input::placeholder { color: var(--text-muted); }

.app-content {
    padding: var(--space-6);
    max-width: 1400px;
    margin: 0 auto;
}

.tab-content {
    display: none;
    animation: fadeInUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.tab-content.active { display: block; }

.page-header {
    margin-bottom: var(--space-6);
}
.page-title {
    font-size: var(--text-2xl);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-1);
}
.page-subtitle {
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.stats-cards-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
    margin-bottom: var(--space-5);
    padding: 0 var(--space-6);
}

.stats-cards-secondary {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.stat-card {
    background: linear-gradient(180deg, rgba(20, 30, 50, 0.8) 0%, rgba(10, 18, 30, 0.9) 100%);
    border: 1px solid rgba(120, 180, 255, 0.06);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}
.stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--gradient-card);
    pointer-events: none;
}
.stat-card:hover {
    border-color: rgba(94, 174, 216, 0.15);
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 20px rgba(94, 174, 216, 0.06);
}

.stat-card-primary {
    background: linear-gradient(135deg, rgba(94, 174, 216, 0.08) 0%, var(--bg-card) 100%);
    border-color: var(--border-glow);
    grid-column: span 1;
}
.stat-card-primary .stat-card-value {
    font-size: var(--text-3xl);
    font-family: var(--font-mono);
}
.stat-card-primary::after {
    content: '';
    position: absolute;
    top: -30%;
    right: -20%;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(94, 174, 216, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.stat-card-sm {
    padding: var(--space-4);
}
.stat-card-sm .stat-card-value {
    font-size: var(--text-lg);
}

.stat-card-label {
    font-size: var(--text-2xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    margin-bottom: var(--space-2);
}
.stat-card-value {
    font-size: var(--text-xl);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.stat-card-sub {
    font-size: var(--text-2xs);
    color: var(--text-muted);
    margin-top: var(--space-2);
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.equity-panel {
    background: linear-gradient(180deg, rgba(20, 30, 50, 0.8) 0%, rgba(10, 18, 30, 0.9) 100%);
    border: 1px solid rgba(120, 180, 255, 0.06);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    margin: 0 var(--space-6) var(--space-6);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}
.equity-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--gradient-card);
    pointer-events: none;
}
.equity-panel:hover {
    border-color: rgba(94, 174, 216, 0.12);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 20px rgba(94, 174, 216, 0.05);
}

.equity-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-4);
    position: relative;
}
.equity-panel-title {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.equity-panel-total {
    font-size: var(--text-lg);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    font-family: var(--font-mono);
}

.equity-chart-wrap {
    height: 200px;
    position: relative;
}
.equity-chart-wrap canvas {
    width: 100% !important;
    height: 100% !important;
}

.equity-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-4);
}
.equity-title {
    font-size: var(--text-base);
    font-weight: 700;
}
.equity-stats {
    display: flex;
    gap: var(--space-4);
    align-items: center;
}
.equity-stat-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
}
.equity-stat-val {
    font-size: var(--text-sm);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.chart-wrap {
    height: 220px;
    position: relative;
}
.chart-wrap canvas {
    width: 100% !important;
    height: 100% !important;
}

.calendar-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-5);
    padding: 0 var(--space-6);
    gap: var(--space-3);
}
.calendar-toolbar-left {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}
.calendar-toolbar-month {
    font-size: var(--text-lg);
    font-weight: 700;
    letter-spacing: -0.01em;
    min-width: 160px;
    text-align: center;
}
.calendar-toolbar-right {
    display: flex;
    gap: var(--space-2);
}

.cal-nav-arrow {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.cal-nav-arrow:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--border-default);
}

.cal-action-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: var(--text-xs);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-sans);
    white-space: nowrap;
}
.cal-action-btn:hover {
    background: var(--accent-subtle);
    color: var(--accent);
    border-color: var(--border-glow);
    transform: translateY(-1px);
}
.cal-action-btn-accent {
    background: var(--accent-subtle);
    color: var(--accent);
    border-color: rgba(94, 174, 216, 0.2);
}
.cal-action-btn svg { width: 14px; height: 14px; }

.streak-bar {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-3) var(--space-5);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin: 0 var(--space-6) var(--space-4);
    font-size: var(--text-xs);
    color: var(--text-secondary);
}
.streak-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 600;
}
.streak-win { color: var(--profit); }
.streak-loss { color: var(--loss); }

.calendar-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: var(--space-5);
    padding: 0 var(--space-6);
}
.calendar-main-panel {
    background: linear-gradient(180deg, rgba(20, 30, 50, 0.8) 0%, rgba(10, 18, 30, 0.9) 100%);
    border: 1px solid rgba(120, 180, 255, 0.06);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}
.calendar-main-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--gradient-card);
    pointer-events: none;
}

.cal-day-labels {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 4px;
}
.cal-day-label {
    text-align: center;
    font-size: var(--text-2xs);
    color: var(--text-muted);
    font-weight: 600;
    padding: var(--space-2) 0;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    position: relative;
}

.cal-tile {
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    border: 1px solid transparent;
    min-height: 64px;
    padding: 4px 2px;
}
.cal-tile:hover {
    transform: translateY(-3px) scale(1.04);
    z-index: 2;
}

.cal-tile-empty {
    cursor: default;
    background: transparent;
}
.cal-tile-empty:hover { transform: none; }

.cal-tile-day {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}
.cal-tile-pnl {
    font-size: 0.75rem;
    font-weight: 700;
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}
.cal-tile-trades {
    font-size: 0.625rem;
    color: var(--text-muted);
    font-weight: 500;
}
.cal-tile-dots {
    display: flex;
    gap: 2px;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 60px;
}
.cal-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    display: inline-block;
}
.cal-dot-win {
    background: var(--profit);
}
.cal-dot-loss {
    background: var(--loss);
}

.cal-tile-win {
    background: rgba(52, 211, 153, 0.08);
    border-color: rgba(52, 211, 153, 0.15);
}
.cal-tile-win .cal-tile-pnl { color: var(--profit); }
.cal-tile-win:hover {
    background: rgba(52, 211, 153, 0.15);
    box-shadow: 0 0 20px rgba(52, 211, 153, 0.12), var(--shadow-sm);
    border-color: rgba(52, 211, 153, 0.3);
}

.cal-tile-loss {
    background: rgba(248, 113, 113, 0.08);
    border-color: rgba(248, 113, 113, 0.15);
}
.cal-tile-loss .cal-tile-pnl { color: var(--loss); }
.cal-tile-loss:hover {
    background: rgba(248, 113, 113, 0.15);
    box-shadow: 0 0 20px rgba(248, 113, 113, 0.12), var(--shadow-sm);
    border-color: rgba(248, 113, 113, 0.3);
}

.cal-tile-flat {
    background: var(--bg-inner);
    border-color: var(--border-subtle);
}

.cal-tile-no-trade {
    background: rgba(255, 255, 255, 0.015);
}
.cal-tile-no-trade .cal-tile-day { color: var(--text-muted); opacity: 0.4; }

.cal-tile-today {
    border-color: var(--accent) !important;
    box-shadow: 0 0 12px rgba(94, 174, 216, 0.2);
}
.cal-tile-selected {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 2px rgba(94, 174, 216, 0.3);
    transform: scale(1.05);
}

.calendar-side-panels {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.side-panel-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    position: relative;
    overflow: hidden;
}
.side-panel-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--gradient-card);
    pointer-events: none;
}
.side-panel-title {
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: var(--space-3);
    position: relative;
}
.side-panel-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-2) 0;
    font-size: var(--text-sm);
    position: relative;
}
.side-panel-row-label {
    color: var(--text-secondary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}
.side-panel-row-right {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}
.side-panel-row-value {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
}
.side-panel-row-sub {
    font-size: var(--text-2xs);
    color: var(--text-muted);
}
.side-panel-badge {
    font-size: var(--text-2xs);
    color: var(--text-muted);
    background: var(--bg-inner);
    padding: 1px 6px;
    border-radius: var(--radius-pill);
    font-weight: 500;
}

.side-panel-tip {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-4);
    background: linear-gradient(135deg, rgba(94, 174, 216, 0.06) 0%, var(--bg-card) 100%);
    border-color: rgba(94, 174, 216, 0.1);
}
.side-panel-tip-icon {
    flex-shrink: 0;
    color: var(--accent);
    margin-top: 2px;
}
.side-panel-tip-text {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    line-height: 1.6;
    position: relative;
}

.day-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
    backdrop-filter: blur(4px);
}
.day-drawer-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.day-drawer {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: min(440px, 90vw);
    background: linear-gradient(180deg, rgba(12, 18, 30, 0.98) 0%, rgba(8, 12, 22, 0.99) 100%);
    border-left: 1px solid rgba(120, 180, 255, 0.08);
    z-index: 101;
    transform: translateX(100%);
    transition: transform 400ms cubic-bezier(0.32, 0.72, 0, 1);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    box-shadow: -12px 0 48px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
}
.day-drawer.open { transform: translateX(0); }

.drawer-header {
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: var(--bg-surface);
    z-index: 1;
}
.drawer-title {
    font-size: var(--text-lg);
    font-weight: 700;
    letter-spacing: -0.01em;
}
.drawer-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-inner);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.drawer-close:hover { background: var(--bg-card-hover); color: var(--text-primary); }

.drawer-body {
    padding: var(--space-6);
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.drawer-pnl {
    text-align: center;
    padding: var(--space-6) 0;
}
.drawer-pnl-value {
    font-size: var(--text-4xl);
    font-weight: 800;
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    animation: countUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.drawer-pnl-label {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-top: var(--space-1);
}

.drawer-section-title {
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: var(--space-3);
}

.drawer-trade-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}
.drawer-trade {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-4);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}
.drawer-trade:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: translateX(2px);
}
.drawer-trade-coin {
    font-weight: 700;
    font-size: var(--text-sm);
}
.drawer-trade-dir {
    font-size: var(--text-xs);
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    font-weight: 600;
}
.drawer-trade-dir.long { background: var(--profit-bg); color: var(--profit); }
.drawer-trade-dir.short { background: var(--loss-bg); color: var(--loss); }
.drawer-trade-pnl {
    font-weight: 700;
    font-size: var(--text-sm);
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}

.drawer-note {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-4);
}
.drawer-note textarea {
    width: 100%;
    min-height: 80px;
    background: var(--bg-inner);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    padding: var(--space-3);
    resize: vertical;
    outline: none;
}
.drawer-note textarea:focus {
    border-color: var(--border-focus);
}

.drawer-actions {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-5) var(--space-6);
    border-top: 1px solid var(--border-subtle);
    position: sticky;
    bottom: 0;
    background: var(--bg-surface);
}

.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 15, 27, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-subtle);
    z-index: 50;
    padding: var(--space-2) 0;
    padding-bottom: max(var(--space-2), env(safe-area-inset-bottom));
}

.bottom-nav-inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: var(--space-1) var(--space-3);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.625rem;
    font-weight: 600;
    transition: color var(--transition-fast);
    cursor: pointer;
    background: none;
    border: none;
    font-family: var(--font-sans);
    min-width: 56px;
    position: relative;
}
.bottom-nav-item svg { width: 22px; height: 22px; }
.bottom-nav-item.active {
    color: var(--accent);
}
.bottom-nav-item.active::after {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
    box-shadow: 0 0 8px rgba(94, 174, 216, 0.4);
}
.bottom-nav-item:hover { color: var(--text-secondary); }

.coming-soon-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 4px 12px;
    background: var(--neutral-bg);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: var(--radius-pill);
    color: var(--neutral);
    font-size: var(--text-xs);
    font-weight: 700;
}

.analytics-preview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
    margin-top: var(--space-6);
    width: 100%;
    max-width: 500px;
}
.analytics-preview-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-5) var(--space-4);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.analytics-preview-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--gradient-card);
    pointer-events: none;
}
.analytics-preview-label {
    font-size: var(--text-2xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    margin-bottom: var(--space-2);
    position: relative;
}
.analytics-preview-value {
    font-size: var(--text-2xl);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    position: relative;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-4);
    padding: var(--space-6);
}

.analytics-metric-card {
    background: linear-gradient(180deg, rgba(20, 30, 50, 0.8) 0%, rgba(10, 18, 30, 0.9) 100%);
    border: 1px solid rgba(120, 180, 255, 0.06);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    transition: all var(--transition-base);
}
.analytics-metric-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--gradient-card);
    pointer-events: none;
}
.analytics-metric-card:hover {
    border-color: rgba(94, 174, 216, 0.12);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 16px rgba(94, 174, 216, 0.04);
}
.analytics-metric-label {
    font-size: var(--text-2xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    margin-bottom: var(--space-2);
    position: relative;
}
.analytics-metric-value {
    font-size: var(--text-2xl);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    position: relative;
    letter-spacing: -0.02em;
}
.analytics-metric-sub {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: var(--space-1);
    position: relative;
}

.analytics-chart-card {
    background: linear-gradient(180deg, rgba(20, 30, 50, 0.8) 0%, rgba(10, 18, 30, 0.9) 100%);
    border: 1px solid rgba(120, 180, 255, 0.06);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    grid-column: span 2;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}
.analytics-chart-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--gradient-card);
    pointer-events: none;
}
.analytics-chart-title {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: var(--space-4);
    position: relative;
}

.analytics-bar-row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) 0;
    position: relative;
}
.analytics-bar-label {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-primary);
    min-width: 50px;
    font-family: var(--font-mono);
}
.analytics-bar-track {
    flex: 1;
    height: 8px;
    background: var(--bg-inner);
    border-radius: var(--radius-pill);
    overflow: hidden;
    position: relative;
}
.analytics-bar-fill {
    height: 100%;
    border-radius: var(--radius-pill);
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.analytics-bar-fill.profit { background: var(--gradient-profit); }
.analytics-bar-fill.loss { background: var(--gradient-loss); }
.analytics-bar-value {
    font-size: var(--text-xs);
    font-weight: 700;
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    min-width: 60px;
    text-align: right;
}

.win-rate-ring {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto var(--space-4);
}
.win-rate-ring svg {
    width: 120px;
    height: 120px;
    transform: rotate(-90deg);
}
.win-rate-ring-bg {
    fill: none;
    stroke: var(--bg-inner);
    stroke-width: 8;
}
.win-rate-ring-fill {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.win-rate-ring-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.win-rate-ring-value {
    font-size: var(--text-2xl);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.win-rate-ring-label {
    font-size: var(--text-2xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.journal-page-content {
    padding: var(--space-6);
}
.journal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-6);
}
.journal-header-title {
    font-size: var(--text-2xl);
    font-weight: 800;
    letter-spacing: -0.02em;
}
.journal-add-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 10px 20px;
    background: var(--gradient-accent);
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-inverse);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 0 16px rgba(94, 174, 216, 0.15);
}
.journal-add-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 24px rgba(94, 174, 216, 0.25);
}

.journal-entries-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}
.journal-entry-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}
.journal-entry-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--gradient-card);
    pointer-events: none;
}
.journal-entry-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-1px);
}
.journal-entry-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-2);
    position: relative;
}
.journal-entry-coin {
    font-weight: 700;
    font-size: var(--text-sm);
}
.journal-entry-date {
    font-size: var(--text-xs);
    color: var(--text-muted);
}
.journal-entry-text {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.6;
    position: relative;
}

.journal-entry-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}
.journal-entry-left {
    flex: 1;
    min-width: 0;
}
.journal-entry-pnl {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: var(--font-mono);
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 6px;
}
.journal-entry-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.journal-entry-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}
.journal-result-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.journal-badge-win {
    background: rgba(52, 211, 153, 0.15);
    color: var(--profit);
    border: 1px solid rgba(52, 211, 153, 0.2);
}
.journal-badge-loss {
    background: rgba(248, 113, 113, 0.15);
    color: var(--loss);
    border: 1px solid rgba(248, 113, 113, 0.2);
}

.journal-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-12) var(--space-6);
    text-align: center;
    gap: var(--space-5);
}
.journal-empty-illustration {
    width: 120px;
    height: 120px;
    position: relative;
}
.journal-empty-book {
    width: 80px;
    height: 100px;
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-card-hover) 100%);
    border: 1px solid var(--border-default);
    border-radius: 4px 12px 12px 4px;
    position: absolute;
    top: 10px;
    left: 20px;
    box-shadow: var(--shadow-md);
}
.journal-empty-book::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--accent);
    border-radius: 4px 0 0 4px;
}
.journal-empty-book-lines {
    position: absolute;
    top: 20px;
    left: 16px;
    right: 12px;
}
.journal-empty-book-line {
    height: 2px;
    background: var(--border-default);
    border-radius: 1px;
    margin-bottom: 8px;
}
.journal-empty-book-line:nth-child(2) { width: 80%; }
.journal-empty-book-line:nth-child(3) { width: 60%; }

.settings-section {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    margin-bottom: var(--space-4);
    position: relative;
    overflow: hidden;
}
.settings-section::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--gradient-card);
    pointer-events: none;
}
.settings-section-title {
    font-size: var(--text-sm);
    font-weight: 700;
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--border-subtle);
    position: relative;
}
.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) 0;
    position: relative;
}
.settings-label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    position: relative;
}
.settings-value {
    font-size: var(--text-sm);
    font-family: var(--font-mono);
    color: var(--text-primary);
    position: relative;
}
.settings-footer-info {
    text-align: center;
    padding: var(--space-6);
}
.settings-brand {
    font-size: var(--text-lg);
    margin-bottom: var(--space-2);
    position: relative;
}
.settings-disclaimer {
    font-size: var(--text-xs);
    color: var(--text-muted);
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.6;
    position: relative;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(6, 10, 16, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 999;
    gap: var(--space-6);
    backdrop-filter: blur(12px);
}
.loading-skeleton-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    width: 320px;
    max-width: 90vw;
}
.loading-skeleton-row {
    display: flex;
    gap: var(--space-3);
}
.loading-skel {
    height: 60px;
    flex: 1;
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-inner) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}
.loading-skel-wide {
    height: 120px;
    width: 100%;
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-inner) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite 0.2s;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}
.loading-logo {
    width: 48px;
    height: 48px;
    background: var(--gradient-accent);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 32px rgba(94, 174, 216, 0.2);
    animation: pulse-glow 2s ease-in-out infinite;
}
.loading-text {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    animation: fadeIn 0.6s 0.3s both;
}

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

.stat-count-up {
    animation: countUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.error-banner {
    background: var(--loss-bg);
    border: 1px solid var(--loss-border);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    color: var(--loss);
    font-size: var(--text-sm);
    margin-bottom: var(--space-5);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

/* =====================================================
   COMMAND CENTER HERO PANEL
   ===================================================== */
.hero-command {
    position: relative;
    padding: 32px;
    margin: 0 24px 28px;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255,255,255,0.06);
    overflow: hidden;
    animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.hero-command::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}
.hero-command-profit {
    background: linear-gradient(135deg, rgba(10, 30, 20, 0.9) 0%, rgba(10, 18, 30, 0.95) 60%, rgba(20, 40, 30, 0.8) 100%);
    border-color: rgba(52, 211, 153, 0.15);
    box-shadow: 0 4px 40px rgba(52, 211, 153, 0.06), inset 0 1px 0 rgba(52, 211, 153, 0.08);
}
.hero-command-profit::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(52, 211, 153, 0.08) 0%, transparent 60%);
    pointer-events: none;
}
.hero-command-loss {
    background: linear-gradient(135deg, rgba(30, 10, 15, 0.9) 0%, rgba(10, 18, 30, 0.95) 60%, rgba(40, 15, 20, 0.8) 100%);
    border-color: rgba(248, 113, 113, 0.15);
    box-shadow: 0 4px 40px rgba(248, 113, 113, 0.06), inset 0 1px 0 rgba(248, 113, 113, 0.08);
}
.hero-command-loss::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(248, 113, 113, 0.08) 0%, transparent 60%);
    pointer-events: none;
}
.hero-command-neutral {
    background: linear-gradient(135deg, rgba(15, 20, 35, 0.9) 0%, rgba(10, 18, 30, 0.95) 60%, rgba(20, 30, 50, 0.8) 100%);
    border-color: rgba(94, 174, 216, 0.15);
    box-shadow: 0 4px 40px rgba(94, 174, 216, 0.06), inset 0 1px 0 rgba(94, 174, 216, 0.08);
}
.hero-command-neutral::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(94, 174, 216, 0.08) 0%, transparent 60%);
    pointer-events: none;
}
.hero-command-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.hero-command-pnl {
    text-align: center;
    margin-bottom: 20px;
}
.hero-command-pnl-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 4px;
}
.hero-command-pnl-value {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    font-family: var(--font-mono);
    letter-spacing: -0.03em;
    line-height: 1;
    text-align: center;
    animation: countUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.hero-mom-change {
    margin-top: 12px;
}
.hero-mom-arrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
}
.hero-command-coaching {
    text-align: center;
    max-width: 600px;
}
.hero-command-headline {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: 8px;
    text-align: center;
}
.hero-command-subtext {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 auto 12px;
    max-width: 500px;
    text-align: center;
}
.hero-command-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-muted);
    border: 1px solid rgba(94, 174, 216, 0.2);
    margin: 0 auto;
}
.hero-command-action svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* =====================================================
   METRICS (Unified)
   ===================================================== */
.metrics-command {
    padding: 0 24px;
    margin-bottom: 28px;
}
.metrics-primary-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}
.metric-primary {
    background: linear-gradient(180deg, rgba(20, 30, 50, 0.8) 0%, rgba(10, 18, 30, 0.9) 100%);
    border: 1px solid rgba(120, 180, 255, 0.06);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.metric-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--gradient-card);
    pointer-events: none;
}
.metric-primary:hover {
    border-color: rgba(94, 174, 216, 0.15);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), 0 0 24px rgba(94, 174, 216, 0.06);
}
.metric-primary-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 12px;
}
.metric-primary-value {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 8px;
    font-variant-numeric: tabular-nums;
    animation: countUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.metric-primary-sub {
    font-size: 12px;
    color: var(--text-muted);
}
.metric-primary-bar {
    margin: 12px 0 8px;
    width: 100%;
}
.metric-bar-track {
    position: relative;
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: visible;
}
.metric-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.metric-bar-center {
    overflow: visible;
}
.metric-bar-center-fill {
    position: absolute;
    height: 100%;
    border-radius: 3px;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.bar-profit {
    background: linear-gradient(90deg, rgba(52, 211, 153, 0.4), rgba(52, 211, 153, 0.8));
}
.bar-loss {
    background: linear-gradient(90deg, rgba(248, 113, 113, 0.8), rgba(248, 113, 113, 0.4));
}
.metric-bar-benchmark {
    position: absolute;
    top: -3px;
    width: 2px;
    height: 12px;
    background: rgba(255,255,255,0.3);
    border-radius: 1px;
    transform: translateX(-1px);
    z-index: 2;
}
.metric-bar-zero {
    background: rgba(255,255,255,0.2);
}
.metric-bar-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    font-size: 9px;
    color: var(--text-muted);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}
.metrics-secondary-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}
.metric-secondary {
    background: linear-gradient(180deg, rgba(20, 30, 50, 0.6) 0%, rgba(10, 18, 30, 0.7) 100%);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: var(--radius-md);
    padding: 16px;
    transition: all var(--transition-fast);
}
.metric-secondary:hover {
    border-color: rgba(94, 174, 216, 0.12);
    transform: translateY(-2px);
}
.metric-secondary-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 6px;
}
.metric-secondary-value {
    font-size: 1.125rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}
.metric-secondary-sub {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* =====================================================
   EDGE INSIGHTS CAROUSEL
   ===================================================== */
.insights-carousel {
    padding: 0 24px;
    margin-top: 24px;
    margin-bottom: 24px;
}
.insights-carousel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.insights-carousel-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}
.insights-carousel-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}
.insights-carousel-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}
.insights-carousel-counter {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    min-width: 40px;
    text-align: center;
}
.insights-carousel-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: rgba(255,255,255,0.03);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.insights-carousel-btn:hover {
    background: rgba(255,255,255,0.06);
    border-color: var(--border-hover);
    color: var(--text-primary);
}
.insights-carousel-track {
    position: relative;
    min-height: 100px;
}
.insights-carousel-card {
    padding: 24px 28px;
    border-radius: var(--radius-lg);
    border: 1px solid;
    position: relative;
    overflow: hidden;
}
.insights-carousel-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    border-radius: 4px 0 0 4px;
}
.insight-carousel-strength {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.08) 0%, rgba(10, 18, 30, 0.95) 100%);
    border-color: rgba(52, 211, 153, 0.18);
}
.insight-carousel-strength::before { background: var(--profit); }
.insight-carousel-risk {
    background: linear-gradient(135deg, rgba(248, 113, 113, 0.08) 0%, rgba(10, 18, 30, 0.95) 100%);
    border-color: rgba(248, 113, 113, 0.18);
}
.insight-carousel-risk::before { background: var(--loss); }
.insight-carousel-improvement {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.08) 0%, rgba(10, 18, 30, 0.95) 100%);
    border-color: rgba(251, 191, 36, 0.18);
}
.insight-carousel-improvement::before { background: var(--neutral); }
.insight-carousel-neutral {
    background: linear-gradient(135deg, rgba(94, 174, 216, 0.08) 0%, rgba(10, 18, 30, 0.95) 100%);
    border-color: rgba(94, 174, 216, 0.15);
}
.insight-carousel-neutral::before { background: var(--accent); }
.insights-carousel-badge-row {
    margin-bottom: 12px;
}
.insight-carousel-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.insight-cbadge-strength { background: var(--profit-bg); color: var(--profit); }
.insight-cbadge-risk { background: var(--loss-bg); color: var(--loss); }
.insight-cbadge-improvement { background: var(--neutral-bg); color: var(--neutral); }
.insight-cbadge-neutral { background: var(--accent-muted); color: var(--accent); }
.insights-carousel-title-text {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}
.insights-carousel-supporting {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
}
.insights-carousel-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    padding: 8px 14px;
    border-radius: var(--radius-md);
    background: var(--accent-muted);
    border: 1px solid rgba(94, 174, 216, 0.15);
    transition: all var(--transition-fast);
}
.insights-carousel-action:hover {
    background: rgba(94, 174, 216, 0.15);
    border-color: rgba(94, 174, 216, 0.25);
}
.insights-carousel-action svg {
    flex-shrink: 0;
}
.insights-carousel-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
}
.insights-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.12);
    cursor: pointer;
    transition: all var(--transition-fast);
    padding: 0;
}
.insights-dot:hover {
    background: rgba(255,255,255,0.25);
}
.insights-dot-active {
    background: var(--accent);
    width: 20px;
    border-radius: 4px;
}

/* =====================================================
   PNL CURVE UPGRADE
   ===================================================== */
.equity-panel {
    margin: 0 24px 24px;
    background: linear-gradient(180deg, rgba(20, 30, 50, 0.8) 0%, rgba(10, 18, 30, 0.9) 100%);
    border: 1px solid rgba(120, 180, 255, 0.06);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(12px);
}
.equity-panel:hover {
    border-color: rgba(94, 174, 216, 0.12);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 0 20px rgba(94, 174, 216, 0.04);
}
.equity-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 0;
}
.equity-panel-title {
    font-size: 15px;
    font-weight: 700;
}
.equity-panel-total {
    font-size: 18px;
    font-weight: 700;
    font-family: var(--font-mono);
}
.equity-chart-wrap {
    padding: 12px 16px 16px;
    height: 220px;
}
.equity-chart-wrap canvas {
    width: 100% !important;
    height: 100% !important;
}

/* =====================================================
   CALENDAR BADGES
   ===================================================== */
.cal-badge {
    position: absolute;
    top: 3px;
    right: 3px;
    font-size: 8px;
    padding: 1px 4px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    z-index: 2;
    line-height: 1.4;
}
.cal-badge-best {
    background: rgba(52, 211, 153, 0.2);
    color: var(--profit);
    border: 1px solid rgba(52, 211, 153, 0.3);
}
.cal-badge-worst {
    background: rgba(248, 113, 113, 0.2);
    color: var(--loss);
    border: 1px solid rgba(248, 113, 113, 0.3);
}
.cal-badge-streak {
    background: rgba(251, 191, 36, 0.2);
    color: var(--neutral);
    border: 1px solid rgba(251, 191, 36, 0.3);
}
.cal-tooltip {
    position: absolute;
    z-index: 100;
    background: rgba(10, 15, 27, 0.95);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 10px 14px;
    pointer-events: none;
    min-width: 160px;
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    transform: translateX(-50%);
}
.cal-tooltip-title {
    font-size: 12px;
    font-weight: 700;
    color: #F0F2F5;
    margin-bottom: 6px;
    text-align: center;
}
.cal-tooltip-row {
    font-size: 11px;
    color: #94A3B8;
    padding: 2px 0;
}
.cal-tooltip-label {
    color: #5E6D85;
    font-weight: 600;
}
.cal-tile {
    position: relative;
}
.cal-tile-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-surface);
    border: 1px solid var(--border-hover);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 60;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.cal-tile:hover .cal-tile-tooltip {
    opacity: 1;
}
.cal-tile-tooltip-pnl {
    font-weight: 700;
    font-family: var(--font-mono);
    margin-bottom: 2px;
}
.cal-tile-tooltip-trades {
    color: var(--text-muted);
}

/* =====================================================
   VISUAL DEPTH OVERHAUL
   ===================================================== */
.stat-card,
.analytics-metric-card,
.side-panel-card,
.analytics-chart-card {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255,255,255,0.04);
}
.stat-card:hover,
.analytics-metric-card:hover,
.analytics-chart-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), 0 0 24px rgba(94, 174, 216, 0.05), inset 0 1px 0 rgba(255,255,255,0.06);
}

.text-profit {
    text-shadow: 0 0 20px rgba(52, 211, 153, 0.15);
}
.text-loss {
    text-shadow: 0 0 20px rgba(248, 113, 113, 0.15);
}
.primary-metric-value.text-profit {
    text-shadow: 0 0 40px rgba(52, 211, 153, 0.2);
}
.primary-metric-value.text-loss {
    text-shadow: 0 0 40px rgba(248, 113, 113, 0.2);
}
.hero-command-pnl-value.text-profit {
    text-shadow: 0 0 60px rgba(52, 211, 153, 0.25);
}
.hero-command-pnl-value.text-loss {
    text-shadow: 0 0 60px rgba(248, 113, 113, 0.25);
}

.tab-content.active {
    padding-bottom: 40px;
}
.tab-page-header {
    padding: 0 24px;
    margin-bottom: 28px;
}
.tab-page-title {
    font-size: var(--text-3xl);
}

/* =====================================================
   RESPONSIVE OVERRIDES
   ===================================================== */
@media (max-width: 768px) {
    .hero-command {
        margin: 0 16px 20px;
        padding: 24px;
    }
    .hero-command-content {
        flex-direction: column;
        gap: 20px;
    }
    .hero-command-pnl {
        text-align: center;
    }
    .hero-command-pnl-value {
        font-size: 2rem;
    }
    .metrics-command {
        padding: 0 16px;
    }
    .metrics-primary-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .metric-primary-value {
        font-size: 2rem;
    }
    .metrics-secondary-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .insights-carousel {
        padding: 0 16px;
    }
    .equity-panel {
        margin: 0 16px 20px;
    }
    .tab-page-header {
        padding: 0 16px;
    }
}

@media (max-width: 1024px) {
    .stats-cards-row { grid-template-columns: repeat(2, 1fr); }
    .calendar-layout { grid-template-columns: 1fr; }
    .analytics-chart-card { grid-column: span 1; }
}

@media (max-width: 768px) {
    .app-sidebar { display: none; }
    .app-main { margin-left: 0; padding-bottom: 80px; }
    .mobile-bottom-nav { display: block; }
    .stats-cards-row { grid-template-columns: 1fr 1fr; padding: 0 var(--space-4); gap: var(--space-3); }
    .stat-card-primary { grid-column: span 2; }
    .stat-card-primary .stat-card-value { font-size: var(--text-2xl); }
    .equity-panel { margin: 0 var(--space-4) var(--space-4); }
    .calendar-toolbar { padding: 0 var(--space-4); flex-wrap: wrap; }
    .streak-bar { margin: 0 var(--space-4) var(--space-3); }
    .calendar-layout { padding: 0 var(--space-4); }
    .app-topbar { padding: var(--space-3) var(--space-4); overflow-x: hidden; }
    .topbar-form { flex-wrap: wrap; }
    .topbar-wallet-group { width: 100%; min-width: 0; flex: none; }
    .topbar-wallet-input { font-size: 12px; }
    .topbar-saved-wallet { flex-wrap: wrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
    .topbar-select { padding: 6px 8px; font-size: var(--text-xs); }
    .topbar-load-btn { width: 100%; justify-content: center; }
    .cal-tile { min-height: 44px; overflow: hidden; padding: 2px 1px; }
    .cal-tile-pnl { font-size: 0.5rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
    .cal-tile-trades { font-size: 0.5rem; white-space: nowrap; }
    .cal-tile-day { font-size: 9px; }
    .cal-tile-dots { display: none; }
    .cal-badge { font-size: 6px; padding: 0 2px; }
    .analytics-grid { padding: var(--space-4); }
    .analytics-grid { grid-template-columns: 1fr 1fr; }
    .journal-page-content { padding: var(--space-4); }
    .day-drawer {
        width: 100%;
        top: auto;
        bottom: 0;
        height: 85vh;
        border-left: none;
        border-top: 1px solid var(--border-subtle);
        border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
        transform: translateY(100%);
    }
    .day-drawer.open { transform: translateY(0); }
}

@media (max-width: 480px) {
    .stats-cards-row { grid-template-columns: 1fr; }
    .stat-card-primary { grid-column: span 1; }
    .analytics-grid { grid-template-columns: 1fr; }
    .cal-tile { min-height: 36px; }
    .cal-tile-pnl { font-size: 0.45rem; }
    .cal-tile-trades { display: none; }
}

.unrealized-toggle-wrap {
    margin-top: 12px;
}
.unrealized-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}
.unrealized-toggle-text {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}
.unrealized-toggle-switch {
    position: relative;
    width: 36px;
    height: 20px;
}
.unrealized-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.unrealized-toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px;
    transition: all 0.3s ease;
}
.unrealized-toggle-slider::before {
    content: '';
    position: absolute;
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: all 0.3s ease;
}
.unrealized-toggle-switch input:checked + .unrealized-toggle-slider {
    background: rgba(94,174,216,0.2);
    border-color: rgba(94,174,216,0.4);
    box-shadow: 0 0 12px rgba(94,174,216,0.25);
}
.unrealized-toggle-switch input:checked + .unrealized-toggle-slider::before {
    transform: translateX(16px);
    background: var(--accent);
}
.unrealized-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 6px 12px;
    background: rgba(94,174,216,0.08);
    border: 1px solid rgba(94,174,216,0.15);
    border-radius: 6px;
    font-size: 11px;
    color: var(--accent);
    letter-spacing: 0.01em;
}
.unrealized-breakdown {
    margin-top: 10px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
}
.unrealized-breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 0;
}
.unrealized-breakdown-total {
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: 4px;
    padding-top: 6px;
}
.unrealized-breakdown-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}
.unrealized-breakdown-value {
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font-mono);
}
.unrealized-glow {
    transition: box-shadow 0.5s ease;
    box-shadow: 0 0 30px rgba(94,174,216,0.1) !important;
}
@keyframes unrealizedPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}
