/* ============================================
   TSB 5.0 - Bento Analytics Dashboard
   Premium Dark Theme · 2026
   ============================================ */

@import url('tokens.css');

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

body {
    font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-void);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ============================================
   App Page Primitives
   ============================================ */
.app-page-layout {
    position: relative;
    z-index: 1;
}

.app-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

.app-page-title-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 680px;
}

.app-page-title {
    margin: 0;
    font-size: clamp(2rem, 2.45vw, 2.5rem);
    font-weight: 620;
    line-height: 0.96;
    letter-spacing: -0.055em;
    color: var(--text-primary);
}

.app-page-subtitle {
    margin: 0;
    max-width: 640px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.68;
    color: rgba(214, 223, 232, 0.62);
}

html.light .app-page-subtitle {
    color: rgba(17, 24, 39, 0.58);
}

.app-toolbar,
.app-toolbar-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.app-toolbar {
    justify-content: flex-end;
    align-self: flex-end;
    gap: 12px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.035),
        0 10px 30px rgba(0, 0, 0, 0.12);
}

.app-section-shell {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: var(--bg-primary);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.032),
        inset 0 -1px 0 rgba(255, 255, 255, 0.02),
        0 18px 44px rgba(0, 0, 0, 0.16);
}

.app-section-shell::before {
    content: '';
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.015) 34%, transparent 72%);
    pointer-events: none;
    z-index: 0;
}

.app-section-shell > * {
    position: relative;
    z-index: 1;
}

.app-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.app-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-section-title h2,
.app-section-title-text {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.app-status-bar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 11px 13px;
    margin-bottom: 14px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,0.055);
    background: rgba(255,255,255,0.012);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.018);
    color: var(--text-secondary);
}

#workspace-status-bar{
    margin-bottom: 0;
}

#workspace-status-bar.dashboard-status-bar {
    margin-bottom: 14px;
}

.app-status-copy {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
    font-size: 13px;
}

.app-status-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    width: 100%;
    min-width: 0;
}

.app-status-kicker {
    display: inline-flex;
    align-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.app-status-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 11px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.035);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.app-status-chip--sources {
    border-color: rgba(77, 171, 154, 0.18);
    background: rgba(77, 171, 154, 0.08);
    color: #8fd8ca;
}

.app-status-chip--scope,
.app-status-chip--time,
.app-status-chip--neutral {
    color: var(--text-muted);
}

.app-status-chip--success {
    border-color: rgba(91, 196, 176, 0.22);
    background: rgba(91, 196, 176, 0.08);
    color: #5BC4B0;
}

.app-status-chip--warning {
    border-color: rgba(245, 158, 11, 0.22);
    background: rgba(245, 158, 11, 0.08);
    color: #f59e0b;
}

.app-status-chip--progress {
    border-color: rgba(77, 171, 154, 0.2);
    background: rgba(77, 171, 154, 0.09);
    color: #c6f4eb;
}

.app-preview-banner {
    display: block;
    position: sticky;
    top: 0;
    z-index: 90;
    margin-bottom: 0;
    padding: 0;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    background:
        linear-gradient(90deg, rgba(245, 158, 11, 0.08), rgba(255,255,255,0.02) 32%, rgba(255,255,255,0.02));
    border-color: rgba(245, 158, 11, 0.14);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.app-preview-banner-shell {
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.app-preview-main {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: wrap;
}

.app-preview-copy {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.45;
}

.app-preview-strong {
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
}

.app-preview-side {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    margin-left: auto;
}

.dashboard-free-preview {
    margin-top: 0;
    margin-bottom: 0;
    padding: 0;
    background:
        linear-gradient(90deg, rgba(77, 171, 154, 0.12), rgba(255,255,255,0.02) 30%, rgba(255,255,255,0.02));
    border-color: rgba(77, 171, 154, 0.18);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.dashboard-free-preview .app-preview-banner-shell {
    padding-top: 14px;
    padding-bottom: 14px;
}

.dashboard-free-preview .tier-gate-badge {
    margin-bottom: 0;
}

.app-account-upgrade-banner {
    margin-top: 0;
    margin-bottom: 0;
    padding: 0;
    background:
        linear-gradient(90deg, rgba(77, 171, 154, 0.12), rgba(255,255,255,0.02) 30%, rgba(255,255,255,0.02));
    border-color: rgba(77, 171, 154, 0.18);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.app-account-upgrade-banner .app-status-kicker {
    color: rgba(198, 244, 235, 0.74);
}

.app-account-upgrade-banner .app-preview-strong {
    font-size: 13px;
}

@media (min-width: 768px) {
    .app-preview-banner-shell {
        padding-left: 24px;
        padding-right: 24px;
    }
}

@media (min-width: 1024px) {
    .app-preview-banner-shell {
        padding-left: 32px;
        padding-right: 32px;
    }
}

@media (max-width: 900px) {
    .app-preview-banner-shell {
        align-items: flex-start;
        flex-direction: column;
        padding: 12px 14px;
    }

    .app-preview-main {
        align-items: flex-start;
    }

    .app-preview-side {
        width: 100%;
    }
}

@media (max-width: 767px) {
    body.has-sidebar .app-preview-banner .app-preview-banner-shell {
        padding-left: 64px;
    }
}

.app-status-dismiss {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-sm);
    background: var(--glass-bg);
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.app-status-dismiss:hover {
    color: #f0f0f2;
    border-color: var(--glass-border-hover);
    background: var(--glass-bg-hover);
}

.app-filters-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    background: var(--bg-elevated);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.015);
}

.app-filters-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.app-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.025));
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-decoration: none;
    white-space: nowrap;
    transition: all var(--duration-fast) var(--ease-out);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.app-action-btn-icon-only {
    width: 44px;
    min-width: 44px;
    padding: 0;
    gap: 0;
    justify-content: center;
}

.app-action-btn:hover {
    background:
        linear-gradient(180deg, rgba(77,171,154,0.06), rgba(77,171,154,0.025)),
        linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.028));
    border-color: rgba(77,171,154,0.18);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.app-action-btn-primary {
    background: linear-gradient(180deg, rgba(77,171,154,0.15), rgba(77,171,154,0.08));
    border-color: rgba(77,171,154,0.2);
    color: #9fe4d8;
}

.app-action-btn-primary:hover {
    color: #d2fff8;
    border-color: rgba(77,171,154,0.28);
}

.app-action-btn-voice {
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.025));
    border-color: var(--glass-border);
    color: var(--text-secondary);
}

.app-action-btn-voice:hover {
    background:
        linear-gradient(180deg, rgba(77,171,154,0.06), rgba(77,171,154,0.025)),
        linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.028));
    border-color: rgba(77,171,154,0.18);
    color: var(--text-primary);
}

.app-action-btn-danger {
    color: rgba(239, 68, 68, 0.84);
    border-color: rgba(239, 68, 68, 0.1);
    background: rgba(239, 68, 68, 0.02);
    box-shadow: none;
}

.app-action-btn-danger:hover {
    color: #ff8d8d;
    border-color: rgba(239, 68, 68, 0.2);
    background: rgba(239, 68, 68, 0.08);
    transform: none;
}

.app-view-toggle {
    display: flex;
    padding: 3px;
    border-radius: 12px;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.015);
}

.app-view-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 36px;
    padding: 7px 11px;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
}

.app-view-toggle-btn:hover {
    color: var(--text-secondary);
    background: rgba(255,255,255,0.025);
}

.app-view-toggle-btn.active,
.app-view-toggle-btn[aria-pressed="true"] {
    background: rgba(77, 171, 154, 0.12);
    color: var(--accent);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.app-segmented-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 8px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.06);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.026), rgba(255,255,255,0.012));
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.022),
        0 16px 36px rgba(0,0,0,0.12);
}

.app-segmented-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 14px;
    color: var(--text-tertiary);
    background: transparent;
    cursor: pointer;
    border: 1px solid transparent;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.app-segmented-btn:hover {
    color: var(--text-secondary);
    background: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.05);
}

.app-segmented-btn.active,
.app-segmented-btn[aria-pressed="true"] {
    color: var(--text-primary);
    background: rgba(77, 171, 154, 0.1);
    border-color: rgba(77, 171, 154, 0.18);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.02),
        0 10px 24px rgba(5, 12, 10, 0.18);
}

.app-stat-card.stat-card,
.app-stat-card {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 88px;
    padding: 15px 16px;
    border-radius: 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
    transition: all var(--duration-normal) var(--ease-out);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.app-stat-card.stat-card::after,
.app-stat-card::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
    transition: width var(--duration-slow) var(--ease-out);
}

.app-stat-card.stat-card:hover,
.app-stat-card:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
    transform: translateY(-2px);
}

.app-stat-card.stat-card:hover::after,
.app-stat-card:hover::after {
    width: 100%;
}

.app-stat-card.stat-card.app-stat-card-primary,
.app-stat-card.app-stat-card-primary {
    background: linear-gradient(135deg, rgba(77,171,154,0.05), rgba(91,196,176,0.02));
    border-color: rgba(77,171,154,0.15);
}

.app-stat-card .stat-value {
    font-size: 1.65rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.03em;
}

.app-stat-card .stat-label {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.05em;
}

@media (max-width: 640px) {
    .app-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .app-toolbar,
    .app-toolbar-group {
        width: 100%;
    }

    .app-toolbar {
        justify-content: flex-start;
        align-self: stretch;
        border-radius: 16px;
    }

    .app-toolbar-embed {
        margin-left: 0;
    }

    .app-segmented-bar {
        width: 100%;
        border-radius: 16px;
    }

    .app-segmented-btn {
        flex: 1;
    }
}

.font-mono,
[id^="val-"],
.heatmap-cell-pnl,
.stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-feature-settings: 'tnum' 1;
}

/* ============================================
   Ambient Background Glow
   Base fallback — app-brand.css overrides for tsb-brand-scene
   ============================================ */
.ambient-glow {
    position: fixed;
    top: -220px;
    left: 50%;
    transform: translateX(-50%);
    width: 720px;
    height: 400px;
    background: radial-gradient(ellipse at center,
        rgba(77, 171, 154, 0.055) 0%,
        rgba(77, 171, 154, 0.018) 38%,
        transparent 68%);
    pointer-events: none;
    z-index: 0;
    opacity: 0.34;
    filter: blur(74px);
}
/* Offset glow center to account for sidebar */
body.has-sidebar .ambient-glow {
    left: calc(50% + 32px);
}
body.has-sidebar.sidebar-expanded .ambient-glow {
    left: calc(50% + 124px);
}

/* ============================================
   Dashboard Wrapper
   ============================================ */
#dashboard-wrapper {
    background: var(--bg-primary);
    overflow: hidden;
    position: relative;
}

/* ============================================
   Dashboard Header
   ============================================ */
#dashboard-wrapper .dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(20, 20, 20, 0.92);
    position: relative;
    z-index: 1;
}
#dashboard-wrapper .dashboard-header::before {
    content: '';
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.015) 34%, transparent 72%);
    pointer-events: none;
    z-index: 0;
}
.embed-mode #dashboard-wrapper .dashboard-header {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    width: auto;
    max-width: calc(100% - 20px);
    padding: 8px 10px;
    background: rgba(12, 13, 16, 0.78);
    backdrop-filter: blur(18px) saturate(130%);
    -webkit-backdrop-filter: blur(18px) saturate(130%);
    position: absolute;
    z-index: 4;
    top: 10px;
    right: 10px;
    left: auto;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 12px 36px rgba(0, 0, 0, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    gap: 12px;
}

.embed-mode #dashboard-wrapper .dashboard-header .dashboard-header-main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.embed-mode #dashboard-wrapper .dashboard-header .dashboard-header-label {
    display: none;
}

.embed-mode #dashboard-wrapper .dashboard-header .dashboard-header-tools {
    display: flex;
    align-items: center;
    gap: 6px;
}

.embed-mode #dashboard-wrapper .dashboard-header .sync-status {
    min-height: 30px;
    padding: 0 12px;
    border-color: rgba(91, 196, 176, 0.22);
    background: rgba(91, 196, 176, 0.08);
    color: #6ee7d3;
    font-size: 12px;
    font-weight: 700;
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Embed header buttons */
.embed-mode #dashboard-wrapper .dashboard-header .float-btn {
    min-width: 34px;
    width: 34px;
    height: 34px;
    padding: 0;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.72);
    box-shadow: none;
}

.embed-mode #dashboard-wrapper .dashboard-header .float-btn--label {
    min-width: 34px;
    width: 34px;
    padding-inline: 0;
}

.embed-mode #dashboard-wrapper .dashboard-header .float-btn--label span {
    display: none;
}

.light .embed-mode #dashboard-wrapper .dashboard-header .float-btn{
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(15, 23, 42, 0.1);
    color: rgba(15, 23, 42, 0.64);
}

.embed-mode #dashboard-wrapper .dashboard-header .float-btn:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.14);
    color: #fff;
    transform: none;
}
.light .embed-mode #dashboard-wrapper .dashboard-header .float-btn:hover {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.16);
    color: #111;
}

.embed-mode #dashboard-wrapper .dashboard-header .animate-pulse {
    width: 7px;
    height: 7px;
    box-shadow: 0 0 10px var(--green-glow);
}

#dashboard-wrapper .dashboard-header .animate-pulse {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--green-glow);
    animation: pulse 2s ease-in-out infinite;
}

#dashboard-wrapper .dashboard-header .sync-status {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
    transition: all var(--duration-fast) var(--ease-out);
}

#dashboard-wrapper .dashboard-header .sync-status.is-progress {
    color: var(--text-secondary);
    border-color: rgba(77, 171, 154, 0.18);
    background: rgba(77, 171, 154, 0.08);
}

#dashboard-wrapper .dashboard-header .sync-status.is-warning {
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.22);
    background: rgba(245, 158, 11, 0.08);
}

#dashboard-wrapper .dashboard-header .sync-status.is-success {
    color: #5BC4B0;
    border-color: rgba(91, 196, 176, 0.22);
    background: rgba(91, 196, 176, 0.08);
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}

/* ============================================
   Dashboard Content
   ============================================ */
.embed-mode .dashboard-content {
    background: var(--bg-primary);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: var(--space-6);
    zoom: 0.9;
}

.dashboard-content{
    gap: var(--space-5);
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    background: var(--bg-primary);
}

/* dashboard-topbar-* removed — now uses app-page-header + btn-primary/btn-secondary from app-shell.css */

@media (min-width: 1024px) {
    .dashboard-content {
        gap: var(--space-5);
        padding: var(--space-6);
    }
}

/* ============================================
   Stat Cards - Compact & Dense
   ============================================ */
#dashboard-wrapper .stat-card {
    background: rgba(255,255,255,0.022);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-5);
    position: relative;
    overflow: hidden;
    transition: all var(--duration-normal) var(--ease-out);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

#dashboard-wrapper .stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
    transition: width var(--duration-slow) var(--ease-out);
}

#dashboard-wrapper .stat-card:hover {
    background: rgba(255,255,255,0.028);
    border-color: rgba(255,255,255,0.08);
    transform: translateY(-1px);
}

#dashboard-wrapper .stat-card:hover::after {
    width: 100%;
}

#dashboard-wrapper .stat-card.stat-primary {
    background:
        linear-gradient(180deg, rgba(77, 171, 154, 0.038), rgba(77, 171, 154, 0.014) 18%, rgba(255,255,255,0) 36%),
        rgba(255,255,255,0.022);
    border-color: rgba(77, 171, 154, 0.14);
}

.stat-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 1.65rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
    letter-spacing: -0.03em;
}

@media (min-width: 1280px) {
    .stat-value {
        font-size: 1.65rem;
    }
}

/* Stat card entrance animation - defined once in Entrance Animations section */

/* ============================================
   Colored Values (PnL, Totals, Stats)
   ============================================ */
#dashboard-wrapper .stat-value.positive,
#dashboard-wrapper .stat-value.text-green-400,
#dashboard-wrapper #val-pnl.text-green-400,
#dashboard-wrapper #val-pnl.positive {
    color: var(--green-light) !important;
}

#dashboard-wrapper .stat-value.negative,
#dashboard-wrapper .stat-value.text-red-400,
#dashboard-wrapper #val-pnl.text-red-400,
#dashboard-wrapper #val-pnl.negative {
    color: var(--red-light) !important;
}

#dashboard-wrapper #month-total.text-green-400,
#dashboard-wrapper #month-total.positive {
    color: var(--green-light) !important;
}

#dashboard-wrapper #month-total.text-red-400,
#dashboard-wrapper #month-total.negative {
    color: var(--red-light) !important;
}

/* ============================================
   Bento Grid Layouts
   ============================================ */

/* Hero Row: Equity + Heatmap */
.bento-row-hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
}

@media (min-width: 1024px) {
    .bento-row-hero {
        grid-template-columns: 1.8fr 1fr;
    }
}

/* 4-column bento */
.bento-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
}

@media (min-width: 768px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .bento-grid .bento-wide {
        grid-column: span 2;
    }
}

@media (min-width: 1280px) {
    .bento-grid {
        /* All 4 blocks equal width */
        grid-template-columns: repeat(4, 1fr);
    }
    .bento-grid .bento-square {
        grid-column: span 1;
    }
    .bento-grid .bento-wide {
        grid-column: span 2;
    }
    /* Equal height for all bento-square items */
    .bento-grid .chart-container.bento-square {
        min-height: 200px;
        max-height: 250px;
    }
}

/* 3-column grid */
.bento-grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-5);
}

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

@media (min-width: 1024px) {
    .bento-grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    .bento-grid-3 .bento-2x {
        grid-column: span 2;
    }
}

/* 2-column grid */
.bento-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-5);
}

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

/* Mixed row */
.bento-row-mixed {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-5);
}

@media (min-width: 768px) {
    .bento-row-mixed {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1280px) {
    .bento-row-mixed {
        grid-template-columns: 1fr 2fr 1fr;
    }
    .bento-row-mixed .bento-2x {
        grid-column: span 1;
    }
}

/* ============================================
   Chart Container
   ============================================ */
#dashboard-wrapper .chart-container {
    background: rgba(255,255,255,0.022);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-md);
    padding: var(--space-5);
    position: relative;
    isolation: isolate;
    overflow: visible;
    transition: all var(--duration-normal) var(--ease-out);
    animation: fadeUp 0.6s var(--ease-out) 0.2s backwards;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

#dashboard-wrapper .chart-container:hover {
    background: rgba(255,255,255,0.028);
    border-color: rgba(255,255,255,0.08);
    transform: translateY(-1px);
}

#dashboard-wrapper .chart-container.chart-popover-open {
    z-index: 80;
}

/* Hero chart special styling */
#dashboard-wrapper .chart-container.chart-hero {
    background: linear-gradient(180deg,
    rgba(77, 171, 154, 0.032) 0%,
    rgba(77, 171, 154, 0.012) 18%,
    rgba(255,255,255,0.022) 36%
    );
    border-color: rgba(77, 171, 154, 0.12);
}

#dashboard-wrapper .chart-container.chart-hero:hover {
    border-color: rgba(77, 171, 154, 0.16);
}

/* Chart header */
#dashboard-wrapper .chart-header {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 18px;
    position: relative;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    text-transform: uppercase;
}

#dashboard-wrapper .chart-header .chart-header-left > span:first-child,
#dashboard-wrapper .chart-header > span:first-child {
    color: var(--text-tertiary);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

#dashboard-wrapper .chart-header .header-icon {
    width: 16px;
    height: 16px;
    opacity: 0.36;
}

#dashboard-wrapper .chart-header .header-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(255,255,255,0.022);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

#dashboard-wrapper .chart-header .header-icon-btn:hover {
    border-color: rgba(255,255,255,0.075);
    color: var(--text-primary);
    background: rgba(255,255,255,0.035);
    transform: translateY(-1px);
}

/* Header Toggle (Top/Worst switcher) */
#dashboard-wrapper .chart-header .header-toggle {
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    padding: 2px;
    border: 1px solid rgba(255,255,255,0.045);
}

#dashboard-wrapper .chart-header .toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    height: 26px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    -webkit-tap-highlight-color: transparent;
}

#dashboard-wrapper .chart-header .toggle-btn:hover {
    color: var(--text-secondary);
    background: rgba(255,255,255,0.03);
}

#dashboard-wrapper .chart-header .toggle-btn.active {
    color: var(--text-primary);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

#dashboard-wrapper .chart-header .toggle-btn.active[data-mode="worst"] {
    color: var(--text-primary);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
}

/* Header Badge (for status indicators like NORMAL, WARNING) */
#dashboard-wrapper .chart-header .header-badge {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 100px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

#dashboard-wrapper .chart-header .header-badge.ok {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid var(--green-border);
}

#dashboard-wrapper .chart-header .header-badge.warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

#dashboard-wrapper .chart-header .header-badge.danger {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid var(--red-border);
}

/* ---- Chart Info Popover ---- */
.chart-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-header-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.chart-info-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    flex-shrink: 0;
}

.chart-info-btn svg {
    width: 12px;
    height: 12px;
}

.chart-info-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-subtle);
}

.chart-info-wrap {
    position: relative;
    display: flex;
    align-items: center;
    isolation: isolate;
}

.chart-info-popover {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 9999;
    width: 280px;
    padding: 14px 16px;
    background: rgba(18, 18, 20, 0.99) !important;
    border: 1px solid var(--glass-border-hover);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
    animation: infoFadeIn 0.15s ease;
}

.chart-info-wrap.is-popover-right .chart-info-popover {
    left: auto;
    right: 0;
}

.chart-info-popover.visible {
    display: block;
}

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

.chart-info-popover p {
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-secondary);
    margin: 0;
    text-transform: none;
    font-weight: 500;
}

.chart-info-popover .info-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.chart-info-popover .info-period {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--glass-bg);
    padding: 2px 8px;
    border-radius: 4px;
    margin-top: 8px;
}

/* Light mode */
html.light .chart-info-popover {
    background: rgba(255, 255, 255, 0.995) !important;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}


/* ============================================
   Dashboard Empty State
   ============================================ */
.welcome-screen {
    text-align: center;
    padding: 34px 24px 54px;
    max-width: 980px;
    margin: 0 auto;
}

.welcome-screen-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    padding: 5px 11px;
    border-radius: 999px;
    border: 1px solid rgba(77, 171, 154, 0.14);
    background: rgba(77, 171, 154, 0.045);
    color: rgba(141, 226, 212, 0.92);
    font-family: 'DM Mono', 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.welcome-screen h2 {
    font-size: clamp(1.92rem, 2.2vw, 2.55rem);
    font-weight: 620;
    line-height: 0.98;
    letter-spacing: -0.05em;
    color: var(--text-primary);
    margin-bottom: 14px;
}

.welcome-screen > p {
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.66;
    margin-bottom: 22px;
    max-width: 660px;
    margin-left: auto;
    margin-right: auto;
}

.welcome-progress {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    max-width: 760px;
    margin: 0 auto 22px;
}

.welcome-progress-step {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
}

.welcome-progress-step.is-current {
    background: rgba(77, 171, 154, 0.1);
    border-color: rgba(77, 171, 154, 0.24);
    color: var(--text-primary);
}

.welcome-progress-step-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 700;
}

.welcome-progress-step.is-current .welcome-progress-step-label,
.welcome-progress-step.is-done .welcome-progress-step-label {
    background: rgba(77, 171, 154, 0.18);
    color: #9fe6d8;
}

.dashboard-setup-progress {
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 18px;
    margin-bottom: 16px;
}

.dashboard-setup-progress-copy {
    min-width: 0;
    flex: 1 1 auto;
}

.dashboard-setup-progress-kicker {
    display: inline-flex;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(159, 230, 216, 0.9);
}

.dashboard-setup-progress-title {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--text-primary);
}

.welcome-progress--compact {
    justify-content: flex-start;
    max-width: none;
    margin: 0;
}

.dashboard-setup-progress-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid rgba(77, 171, 154, 0.22);
    background: rgba(77, 171, 154, 0.08);
    color: #b6efe4;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.dashboard-setup-progress-cta:hover {
    transform: translateY(-1px);
    background: rgba(77, 171, 154, 0.12);
    border-color: rgba(77, 171, 154, 0.3);
}

.welcome-screen--bridge {
    position: relative;
    isolation: isolate;
    max-width: 1120px;
    padding: 36px 24px 58px;
}

.welcome-screen--bridge::before {
    display: none;
}

.welcome-screen--bridge::after {
    display: none;
}

.welcome-launchpad {
    display: grid;
    grid-template-columns: minmax(0, 1.28fr) minmax(320px, 0.98fr);
    gap: 18px;
    max-width: 1080px;
    margin: 0 auto;
    align-items: stretch;
}

.welcome-launchpad-side {
    display: grid;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.welcome-card--hero {
    position: relative;
    overflow: hidden;
    padding: 30px 28px 24px;
    min-height: 100%;
}

.welcome-card-hero-top {
    width: 100%;
}

.welcome-launchpad--premium .welcome-card--hero {
    border-color: rgba(255,255,255,0.08);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0.01)),
        linear-gradient(135deg, rgba(20, 24, 26, 0.96) 0%, rgba(13, 15, 18, 0.98) 62%, rgba(14, 14, 18, 0.98) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.03),
        0 12px 28px rgba(0, 0, 0, 0.14);
}

.welcome-launchpad--premium .welcome-card--hero::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 170px;
    background: linear-gradient(180deg, rgba(77, 171, 154, 0.08), rgba(77, 171, 154, 0.02) 48%, transparent 100%);
    opacity: 0.75;
    pointer-events: none;
}

.welcome-launchpad--premium .welcome-card--hero::after {
    display: none;
}

.welcome-launchpad--premium .welcome-card--hero > * {
    position: relative;
    z-index: 1;
}

.welcome-card-hero-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    width: 100%;
    min-width: 0;
}

.welcome-card-eyebrow-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
}

.welcome-card-eyebrow-stack--hero {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.welcome-card-eyebrow,
.welcome-card-tag,
.welcome-support-note-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 14px;
    border-radius: 999px;
    font-family: 'DM Mono', 'JetBrains Mono', monospace;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.14em;
    line-height: 1;
    text-transform: uppercase;
}

.welcome-card-eyebrow {
    background: rgba(77, 171, 154, 0.12);
    border: 1px solid rgba(77, 171, 154, 0.16);
    color: var(--accent);
}

.welcome-card-tag,
.welcome-support-note-label {
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    color: var(--text-muted);
}

.welcome-card-eyebrow-note {
    display: inline-flex;
    align-items: center;
    color: rgba(212, 220, 227, 0.58);
    font-family: 'DM Mono', 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    line-height: 1;
    text-transform: uppercase;
}

.welcome-card.welcome-card--hero h3 {
    max-width: 11ch;
    font-size: clamp(2.35rem, 2.85vw, 3.05rem);
    line-height: 0.9;
    letter-spacing: -0.06em;
    width: 100%;
}

.welcome-card-hero-copy > p {
    max-width: 600px;
    font-size: 16px;
    line-height: 1.62;
    color: rgba(214, 221, 228, 0.68);
}

.welcome-card-choices--hero {
    gap: 12px;
    margin-top: 6px;
}

.welcome-card.welcome-card--hero .welcome-card-footer {
    margin-top: 18px;
    padding-top: 0;
}

.welcome-sync-preview {
    position: relative;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin-top: auto;
    padding-top: 16px;
}

.welcome-sync-preview::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.08), rgba(255,255,255,0));
}

.welcome-sync-preview-node {
    min-height: 0;
    padding: 2px 18px 0 0;
    text-align: left;
}

.welcome-sync-preview-node--accent {
    background: transparent;
}

.welcome-sync-preview-node:not(:last-child) {
    margin-right: 18px;
    border-right: 1px solid rgba(255,255,255,0.06);
}

.welcome-sync-preview-label {
    display: block;
    margin-bottom: 7px;
    color: rgba(193, 202, 211, 0.44);
    font-family: 'DM Mono', 'JetBrains Mono', monospace;
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.welcome-sync-preview-node strong {
    display: block;
    color: rgba(228, 234, 240, 0.82);
    font-size: 12.5px;
    font-weight: 620;
    line-height: 1.42;
    letter-spacing: -0.02em;
}

.welcome-card--compact {
    justify-content: flex-start;
    min-height: 0;
}

.welcome-launchpad--premium .welcome-card--compact {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0.012)),
        rgba(12, 13, 16, 0.94);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.02),
        0 12px 28px rgba(0, 0, 0, 0.12);
}

.welcome-card.welcome-card--compact h3 {
    font-size: 20px;
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.welcome-card.welcome-card--compact p {
    max-width: 280px;
    font-size: 15px;
    line-height: 1.58;
}

.welcome-card--import-accent {
    border-color: rgba(97, 169, 255, 0.12);
}

.welcome-card--import-accent:hover {
    border-color: rgba(97, 169, 255, 0.22);
    background:
        linear-gradient(180deg, rgba(97, 169, 255, 0.06), rgba(255,255,255,0.018)),
        rgba(12, 13, 16, 0.96);
}

.welcome-card--import-accent .welcome-card-icon {
    background: rgba(97, 169, 255, 0.11);
    color: #90c7ff;
}

.welcome-card--import-accent .welcome-card-icon i {
    color: #90c7ff;
}

.welcome-card--import-accent .welcome-card-tag {
    background: rgba(97, 169, 255, 0.1);
    border-color: rgba(97, 169, 255, 0.16);
    color: #9ecfff;
}

.welcome-card--import-accent .welcome-card-cta {
    background: rgba(97, 169, 255, 0.11);
    border-color: rgba(97, 169, 255, 0.18);
    color: #9ecfff;
}

.welcome-card--manual-accent {
    border-color: rgba(161, 122, 255, 0.12);
}

.welcome-card--manual-accent:hover {
    border-color: rgba(161, 122, 255, 0.22);
    background:
        linear-gradient(180deg, rgba(161, 122, 255, 0.06), rgba(255,255,255,0.018)),
        rgba(12, 13, 16, 0.96);
}

.welcome-card--manual-accent .welcome-card-icon {
    background: rgba(161, 122, 255, 0.11);
    color: #cab0ff;
}

.welcome-card--manual-accent .welcome-card-icon i {
    color: #cab0ff;
}

.welcome-card--manual-accent .welcome-card-tag {
    background: rgba(161, 122, 255, 0.1);
    border-color: rgba(161, 122, 255, 0.16);
    color: #cfb8ff;
}

.welcome-card--manual-accent .welcome-card-cta {
    background: rgba(161, 122, 255, 0.11);
    border-color: rgba(161, 122, 255, 0.18);
    color: #cfb8ff;
}

.welcome-support-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.95fr);
    gap: 14px;
    max-width: 1080px;
    margin: 14px auto 0;
    align-items: stretch;
}

.welcome-support-row--single {
    grid-template-columns: minmax(0, 1fr);
    max-width: 640px;
}

.welcome-support-card {
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.02);
    min-height: 100%;
}

.welcome-support-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 18px 18px;
    text-decoration: none;
    transition: all var(--duration-normal) var(--ease-out);
    text-align: left;
}

.welcome-support-card:hover {
    transform: translateY(-1px);
    border-color: rgba(77, 171, 154, 0.18);
    background: rgba(77, 171, 154, 0.04);
}

.welcome-support-card--voice {
    border-color: rgba(245, 158, 11, 0.14);
    background:
        linear-gradient(180deg, rgba(245, 158, 11, 0.04), rgba(255,255,255,0.015)),
        rgba(12, 13, 16, 0.94);
}

.welcome-support-card--voice:hover {
    border-color: rgba(245, 158, 11, 0.22);
    background:
        linear-gradient(180deg, rgba(245, 158, 11, 0.065), rgba(255,255,255,0.02)),
        rgba(12, 13, 16, 0.96);
}

.welcome-support-card--voice .welcome-support-card-icon {
    background: rgba(245, 158, 11, 0.12);
    color: #ffd48f;
}

.welcome-support-card--notion {
    border-color: rgba(255,255,255,0.08);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.028), rgba(255,255,255,0.012)),
        rgba(12, 13, 16, 0.94);
}

.welcome-support-card--notion:hover {
    border-color: rgba(255,255,255,0.12);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.016)),
        rgba(12, 13, 16, 0.96);
}

.welcome-support-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(77, 171, 154, 0.12);
    color: var(--accent);
}

.welcome-support-card-icon i {
    width: 22px;
    height: 22px;
}

.welcome-support-card-icon--notion {
    background: #ffffff;
    color: #111111;
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

.welcome-support-card-icon--notion img {
    width: 24px;
    height: 24px;
    display: block;
}

.welcome-support-card-copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.welcome-support-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
}

.welcome-support-card-head h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 620;
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.welcome-support-card-copy p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.58;
    text-align: left;
}

.welcome-support-card--voice .welcome-support-note-label--action {
    border-color: rgba(245, 158, 11, 0.16);
    background: rgba(245, 158, 11, 0.08);
    color: #ffd48f;
}

.welcome-support-card--voice .welcome-support-card-copy p {
    max-width: 34ch;
    text-wrap: pretty;
}

.welcome-flow {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin: 0 auto 18px;
    max-width: 860px;
}

.welcome-flow-step {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 4px 18px 4px 0;
    border: none;
    background: transparent;
    border-radius: 0;
    text-align: left;
    position: relative;
}

.welcome-flow-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 2px;
    right: 0;
    bottom: 2px;
    width: 1px;
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.08), rgba(255,255,255,0.02));
}

.welcome-flow-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 700;
}

.welcome-flow-step.is-active .welcome-flow-step-number {
    border-color: rgba(77, 171, 154, 0.18);
    background: rgba(77, 171, 154, 0.12);
    color: var(--accent);
    box-shadow: 0 0 0 1px rgba(77, 171, 154, 0.04);
}

.welcome-flow-step-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.welcome-flow-step-copy strong {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 620;
    line-height: 1.2;
}

.welcome-flow-step-copy span {
    color: var(--text-tertiary);
    font-size: 14px;
    line-height: 1.45;
}

.welcome-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    max-width: 920px;
    margin: 0 auto;
}

.welcome-cards--primary {
    align-items: stretch;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: 1140px;
}

.welcome-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 20px 18px;
    border-radius: 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    text-decoration: none;
    transition: all var(--duration-normal) var(--ease-out);
    cursor: pointer;
    text-align: left;
    min-height: 100%;
}

button.welcome-card {
    width: 100%;
    appearance: none;
    border: 1px solid var(--glass-border);
    font: inherit;
}

.welcome-card:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.welcome-card--interactive {
    cursor: pointer;
}

.welcome-card.primary {
    border-color: rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.022);
}

.welcome-card--complete {
    border-color: rgba(77, 171, 154, 0.18);
    background: linear-gradient(180deg, rgba(77, 171, 154, 0.045), rgba(255,255,255,0.022));
}

.welcome-card--complete:hover {
    border-color: rgba(77, 171, 154, 0.28);
    background: linear-gradient(180deg, rgba(77, 171, 154, 0.07), rgba(255,255,255,0.036));
}

.welcome-card--locked {
    border-style: solid;
}

.welcome-card--locked .welcome-card-icon {
    background: rgba(77, 171, 154, 0.07);
}

.welcome-card--locked .welcome-card-icon i {
    color: rgba(159, 228, 216, 0.82);
}

.welcome-card.primary:not(.welcome-card--featured) .welcome-card-icon {
    background: rgba(77, 171, 154, 0.08);
    color: rgba(159, 228, 216, 0.92);
}

.welcome-card--featured {
    background: linear-gradient(180deg, rgba(77, 171, 154, 0.07), rgba(77, 171, 154, 0.025));
    border-color: rgba(77, 171, 154, 0.24);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.02),
        0 12px 28px rgba(7, 20, 17, 0.12);
}

.welcome-card.primary:hover {
    border-color: rgba(77, 171, 154, 0.18);
    background: rgba(255,255,255,0.04);
}

.welcome-card--featured:hover {
    border-color: rgba(77, 171, 154, 0.34);
    background: linear-gradient(180deg, rgba(77, 171, 154, 0.1), rgba(77, 171, 154, 0.035));
}

.welcome-card .welcome-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
}

.welcome-card.primary .welcome-card-icon {
    background: rgba(77, 171, 154, 0.12);
    color: var(--accent);
}

.welcome-card .welcome-card-icon i {
    width: 24px;
    height: 24px;
    color: var(--text-secondary);
}

.welcome-card.primary .welcome-card-icon i {
    color: var(--accent);
}

.welcome-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.welcome-card h3 {
    font-size: 18px;
    font-weight: 620;
    line-height: 1.15;
    color: var(--text-primary);
    margin: 0;
}

.welcome-card p {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-tertiary);
    margin: 0;
    line-height: 1.6;
}

.welcome-card-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.welcome-choice-chip {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.02)),
        rgba(14, 16, 20, 0.72);
    color: rgba(222, 228, 235, 0.76);
    border-radius: 999px;
    min-height: 44px;
    padding: 0 18px 1px;
    font-size: 13px;
    font-weight: 620;
    letter-spacing: -0.01em;
    line-height: 1.1;
    text-decoration: none;
    transition: all var(--duration-normal) var(--ease-out);
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.welcome-choice-chip:hover {
    border-color: rgba(77, 171, 154, 0.2);
    background:
        linear-gradient(180deg, rgba(77, 171, 154, 0.08), rgba(77, 171, 154, 0.04)),
        rgba(14, 16, 20, 0.8);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.welcome-choice-chip--locked {
    border-color: rgba(255, 255, 255, 0.06);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.022), rgba(255,255,255,0.012)),
        rgba(14, 16, 20, 0.72);
    color: rgba(214, 221, 228, 0.54);
    cursor: pointer;
}

.welcome-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    margin-top: auto;
    padding-top: 6px;
}

.welcome-card-meta {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
}

.welcome-card-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 42px;
    padding: 0 18px 1px;
    border-radius: 999px;
    border: 1px solid rgba(77, 171, 154, 0.16);
    background: rgba(77, 171, 154, 0.12);
    color: var(--accent);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1.1;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
}

.welcome-card--clickable {
    cursor: pointer;
}

.welcome-card--clickable:focus-visible {
    outline: 2px solid rgba(77, 171, 154, 0.42);
    outline-offset: 3px;
}

.welcome-card.secondary {
    opacity: 0.86;
}

.welcome-card.secondary:hover {
    opacity: 1;
}

.welcome-card-tag--locked {
    background: rgba(255,255,255,0.045);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-secondary);
}

.welcome-secondary {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.85fr);
    gap: 14px;
    align-items: stretch;
    max-width: 920px;
    margin: 14px auto 0;
    padding: 16px 18px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.015);
}

.welcome-secondary-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
    padding: 4px 0;
    text-align: left;
}

.welcome-secondary-label {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.welcome-secondary-copy h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 620;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.welcome-secondary-copy p {
    margin: 0;
    color: var(--text-tertiary);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.58;
    max-width: 420px;
}

.welcome-card--notion {
    justify-content: center;
    min-height: 0;
    padding: 18px 18px;
}

@media (max-width: 1180px) {
    .welcome-launchpad {
        grid-template-columns: 1fr;
        max-width: 920px;
    }

    .welcome-launchpad-side {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: none;
    }

    .welcome-sync-preview {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.welcome-limits {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    max-width: 560px;
    margin: 32px auto 0;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    line-height: 1.6;
}

.welcome-limits-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--accent);
}

.welcome-limits-link {
    color: var(--accent);
    text-decoration: underline;
}

@media (max-width: 960px) {
    .welcome-flow,
    .welcome-cards,
    .welcome-secondary {
        grid-template-columns: 1fr;
    }

    .welcome-launchpad-side,
    .welcome-support-row {
        grid-template-columns: 1fr;
    }

    .welcome-sync-preview {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .welcome-sync-preview-node {
        padding: 0;
    }

    .welcome-sync-preview-node:not(:last-child) {
        margin-right: 0;
        padding-bottom: 10px;
        border-right: 0;
        border-bottom: 1px solid rgba(255,255,255,0.06);
    }

    .welcome-cards--primary {
        max-width: 920px;
    }

    .welcome-secondary-copy {
        padding: 8px 0 0;
    }

    .welcome-flow {
        gap: 10px;
    }

    .welcome-flow-step {
        padding: 0 0 10px;
    }

    .welcome-flow-step:not(:last-child)::after {
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        width: auto;
        height: 1px;
        background: linear-gradient(90deg, rgba(255,255,255,0.02), rgba(255,255,255,0.08), rgba(255,255,255,0.02));
    }

    .welcome-support-card {
        grid-template-columns: auto minmax(0, 1fr);
    }

}

@media (max-width: 640px) {
    .welcome-screen {
        padding: 28px 8px 42px;
    }

    .welcome-screen h2 {
        font-size: 2rem;
    }

    .welcome-screen > p {
        font-size: 15px;
        margin-bottom: 22px;
    }

    .welcome-progress {
        margin-bottom: 18px;
    }

    .dashboard-setup-progress {
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-setup-progress-cta {
        width: 100%;
    }

    .welcome-screen--bridge {
        padding: 28px 8px 42px;
    }

    .welcome-flow-step,
    .welcome-card,
    .welcome-secondary {
        border-radius: 18px;
    }

    .welcome-launchpad {
        gap: 14px;
    }

    .welcome-card {
        padding: 20px 18px;
    }

    .welcome-card--hero {
        padding: 22px 18px 20px;
    }

    .welcome-card.welcome-card--hero h3 {
        max-width: 9ch;
        font-size: 2.2rem;
    }

    .welcome-card-hero-copy > p,
    .welcome-card p,
    .welcome-support-card-copy p {
        font-size: 14px;
    }

    .welcome-card-choices--hero {
        gap: 10px;
        margin-top: 2px;
    }

    .welcome-sync-preview-node {
        min-height: 0;
    }

    .welcome-card-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .welcome-secondary-copy h3 {
        font-size: 20px;
    }

    .welcome-support-card {
        padding: 16px;
    }

}

/* ============================================
   Review Insights
   ============================================ */
.review-launchpad-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.review-insights-trigger-wrap {
    position: relative;
    display: inline-flex;
}

.app-toolbar .review-insights-trigger-wrap {
    margin-left: 4px;
    padding-left: 4px;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.app-toolbar .review-insights-trigger-wrap,
.app-toolbar .review-insights-trigger {
    display: none !important;
}

.review-insights-trigger {
    position: relative;
    border-color: rgba(77, 171, 154, 0.16);
    background:
        linear-gradient(180deg, rgba(77, 171, 154, 0.08), rgba(77, 171, 154, 0.035)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
    color: #9fe4d8;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        0 6px 18px rgba(77, 171, 154, 0.08);
}

.review-insights-trigger:hover {
    border-color: rgba(77, 171, 154, 0.24);
    background:
        linear-gradient(180deg, rgba(77, 171, 154, 0.12), rgba(77, 171, 154, 0.05)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.024));
    color: #d2fff8;
}

.review-insights-trigger-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(77, 171, 154, 0.95), rgba(91, 196, 176, 0.85));
    color: #071210;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0;
    box-shadow: 0 8px 20px rgba(77, 171, 154, 0.18);
    border: 1px solid rgba(7, 18, 16, 0.25);
}

.review-insights-popover[hidden] {
    display: none;
}

.review-insights-popover {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(460px, calc(100vw - 32px));
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 20px 20px 24px;
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.016), rgba(255, 255, 255, 0.008)),
        rgba(15, 16, 17, 0.988);
    border: 1px solid rgba(255, 255, 255, 0.045);
    box-shadow:
        0 18px 36px rgba(0, 0, 0, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px) saturate(120%);
    -webkit-backdrop-filter: blur(16px) saturate(120%);
    z-index: 40;
    box-sizing: border-box;
    scrollbar-gutter: stable both-edges;
    overscroll-behavior: contain;
    transform-origin: left center;
    will-change: transform, opacity;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-12px) scale(0.992);
    transition:
        opacity 180ms var(--ease-out),
        transform 220ms var(--ease-out),
        visibility 0s linear 220ms;
}

/* Keep the global popover working even if sidebar.css is cached separately. */
.review-insights-popover.review-insights-popover-global {
    position: fixed;
    top: 0;
    left: 247px;
    right: auto;
    bottom: 0;
    width: min(356px, calc(100vw - 16px));
    max-height: none;
    overflow-y: auto;
    z-index: 260;
    border-radius: 0;
    border-top: 0;
    border-bottom: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.04);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow:
        14px 0 28px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.review-insights-popover.review-insights-popover-global.review-insights-popover--docked {
    top: 0;
    bottom: 0;
}

.review-insights-popover.visible {
    display: flex;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0) scale(1);
    transition:
        opacity 180ms var(--ease-out),
        transform 220ms var(--ease-out),
        visibility 0s linear 0s;
}

.review-insights-popover-head {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    margin-bottom: 0;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.review-insights-popover-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.review-insights-popover-copy {
    min-width: 0;
}

.review-insights-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    min-width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.018);
    color: var(--text-secondary);
    cursor: pointer;
    outline: none;
    transition: all var(--duration-fast) var(--ease-out);
}

.review-insights-close:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.032);
}

.review-insights-close:focus-visible {
    color: var(--text-primary);
    border-color: rgba(77, 171, 154, 0.32);
    box-shadow: 0 0 0 3px rgba(77, 171, 154, 0.14);
}

.review-insights-popover-kicker {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
    margin-bottom: 8px;
}

.review-insights-popover-title {
    font-size: 24px;
    font-weight: 620;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.review-insights-popover-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: 8px;
    width: 100%;
}

.review-insights-popover-actions .app-action-btn {
    min-height: 38px;
    padding: 0 12px;
    font-size: 13px;
    border-radius: 12px;
    white-space: nowrap;
    justify-content: center;
}

.review-insights-popover-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    margin-bottom: 0;
}

.review-mini-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.review-mini-section--accent {
    background: transparent;
    border: 0;
}

.review-insights-popover .review-insights-section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    color: var(--text-muted);
}

.review-insights-popover .review-insights-section-title {
    margin-top: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.32;
    color: var(--text-primary);
}

.review-insights-popover .review-insights-checklist,
.review-insights-popover .review-insights-summary-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: visible;
    border-radius: 0;
    border: 0;
    background: transparent;
}

.review-insights-popover .review-insights-checklist {
    gap: 10px;
}

.review-insights-popover .review-insights-check-item,
.review-insights-popover .review-insights-summary-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
    min-height: 0;
    padding: 14px 0;
    border-radius: 0;
    background: transparent;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.045);
    justify-content: flex-start;
}

.review-insights-popover .review-insights-check-item {
    padding: 15px 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.018);
}

.review-insights-popover .review-insights-check-item--loading {
    align-items: center;
    gap: 14px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0.012)),
        rgba(255, 255, 255, 0.018);
    border-color: rgba(255, 255, 255, 0.06);
}

.review-insights-popover .review-insights-check-spinner {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    flex: 0 0 18px;
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-top-color: rgba(77, 171, 154, 0.92);
    border-right-color: rgba(77, 171, 154, 0.42);
    animation: reviewInsightsSpinner 0.85s linear infinite;
}

.review-insights-popover .review-insights-summary-item {
    gap: 2px;
    flex-direction: column;
}

.review-insights-popover .review-insights-summary-item:first-child {
    border-top: 0;
}

.review-insights-popover .review-insights-check-mark {
    width: 22px;
    height: 22px;
    margin-top: 0;
    border-radius: 999px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.028);
    color: transparent;
    font-size: 11px;
    font-weight: 800;
}

.review-insights-popover .review-insights-check-item.is-done .review-insights-check-mark {
    color: #0f1715;
    background: linear-gradient(135deg, rgba(77, 171, 154, 0.95), rgba(91, 196, 176, 0.88));
    border-color: rgba(77, 171, 154, 0.4);
}

.review-insights-popover .review-insights-check-item.is-pending .review-insights-check-mark {
    color: rgba(255, 255, 255, 0.22);
}

.review-insights-popover .review-insights-check-copy {
    flex: 1 1 auto;
    min-width: 0;
}

.review-insights-popover .review-insights-check-item--link {
    width: 100%;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    grid-template-areas:
        "mark title action"
        ". meta meta";
    column-gap: 12px;
    row-gap: 8px;
    align-items: start;
    color: inherit;
    text-decoration: none;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.review-insights-popover .review-insights-check-item--link .review-insights-check-mark {
    grid-area: mark;
}

.review-insights-popover .review-insights-check-item--link .review-insights-check-copy {
    display: contents;
}

.review-insights-popover .review-insights-check-item--link .review-insights-check-title {
    grid-area: title;
    min-width: 0;
}

.review-insights-popover .review-insights-check-item--link .review-insights-check-meta {
    grid-area: meta;
    min-width: 0;
}

.review-insights-popover .review-insights-check-item--link:hover {
    background: rgba(255, 255, 255, 0.032);
    border-color: rgba(77, 171, 154, 0.12);
    transform: translateY(-1px);
}

.review-insights-popover .review-insights-check-item--link:hover .review-insights-check-title,
.review-insights-popover .review-insights-check-item--link:hover .review-insights-check-link-label {
    color: #b8f3e8;
}

.review-insights-popover .review-insights-check-link-label {
    grid-area: action;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 24px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.03em;
}

.review-insights-popover .review-insights-check-item[data-rule-tone="high"] {
    border-color: rgba(224, 106, 91, 0.12);
    background: linear-gradient(180deg, rgba(224, 106, 91, 0.05), rgba(255, 255, 255, 0.012));
}

.review-insights-popover .review-insights-check-item[data-rule-tone="warning"] {
    border-color: rgba(205, 136, 54, 0.12);
    background: linear-gradient(180deg, rgba(205, 136, 54, 0.045), rgba(255, 255, 255, 0.012));
}

.review-insights-popover .review-insights-check-item[data-rule-tone="edge"] {
    border-color: rgba(77, 171, 154, 0.12);
    background: linear-gradient(180deg, rgba(77, 171, 154, 0.05), rgba(255, 255, 255, 0.012));
}

.review-insights-popover .review-insights-check-title,
.review-insights-popover .review-insights-summary-label,
.review-insights-popover .review-insights-summary-title,
.review-insights-popover .review-insights-next-step-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.38;
    color: var(--text-primary);
}

.review-insights-popover .review-insights-check-meta,
.review-insights-popover .review-insights-summary-copy,
.review-insights-popover .review-insights-next-step-copy {
    margin-top: 3px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.review-insights-popover .review-insights-summary-label {
    color: var(--accent);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.review-insights-popover .review-insights-summary-title {
    margin-top: 3px;
}

.review-insights-popover .review-insights-summary-actions {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.review-insights-popover .review-insights-summary-action {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
    color: var(--accent);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
}

.review-insights-popover .review-insights-summary-action:hover {
    color: #a9eee1;
    text-decoration: underline;
    text-underline-offset: 0.16em;
}

.review-insights-popover .review-insights-summary-action--secondary {
    background: transparent;
    color: var(--text-secondary);
}

.review-insights-popover .review-insights-summary-action--secondary:hover {
    color: var(--text-primary);
    text-decoration: underline;
    text-underline-offset: 0.16em;
}

.review-insights-popover .review-insights-check-item[data-rule-tone="high"] .review-insights-check-mark,
.review-insights-popover .review-insights-check-item[data-rule-tone="negative"] .review-insights-check-mark {
    color: #ffb2ab;
    border-color: rgba(224, 106, 91, 0.32);
    background: rgba(224, 106, 91, 0.12);
}

.review-insights-popover .review-insights-check-item[data-rule-tone="warning"] .review-insights-check-mark {
    color: #f6c188;
    border-color: rgba(205, 136, 54, 0.28);
    background: rgba(205, 136, 54, 0.12);
}

.review-insights-popover .review-insights-check-item[data-rule-tone="edge"] .review-insights-check-mark {
    color: #091412;
    border-color: rgba(77, 171, 154, 0.32);
    background: linear-gradient(135deg, rgba(77, 171, 154, 0.95), rgba(91, 196, 176, 0.85));
}

.review-insights-popover .review-insights-check-item[data-rule-tone="muted"] .review-insights-check-mark {
    color: rgba(255, 255, 255, 0.35);
}

.review-insights-popover .review-insights-check-item--loading .review-insights-check-title {
    color: rgba(255, 255, 255, 0.92);
}

.review-insights-popover .review-insights-check-item--loading .review-insights-check-meta {
    color: rgba(255, 255, 255, 0.58);
}

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

.review-insights-popover .review-insights-summary-item[data-alert-type="risk"] .review-insights-summary-label {
    color: #ff9a91;
}

.review-insights-popover .review-insights-summary-item[data-alert-type="edge"] .review-insights-summary-label {
    color: #8bdcc9;
}

.review-insights-popover .review-insights-summary-item[data-alert-type="review"] .review-insights-summary-label {
    color: #b9d4ff;
}

.review-insights-popover .review-insights-summary-item[data-alert-type="setup_hygiene"] .review-insights-summary-label {
    color: #f2c37e;
}

.review-insights-popover .review-insights-next-step {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px 0 0;
    border-radius: 0;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: transparent;
    margin-top: 0;
}

.review-insights-popover .review-insights-next-step-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    color: var(--text-muted);
}

.review-insights-popover .review-insights-next-step-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.review-insights-popover .review-insights-next-step-copy-wrap {
    flex: 1 1 auto;
    min-width: 0;
}

.review-insights-popover .review-insights-next-step-links {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.review-insights-popover .review-insights-next-step-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 13px;
    border-radius: 10px;
    border: 1px solid rgba(77, 171, 154, 0.14);
    background: rgba(77, 171, 154, 0.06);
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}

.review-insights-popover .review-insights-next-step-link:hover {
    color: #9fe4d8;
    border-color: rgba(77, 171, 154, 0.22);
    background: rgba(77, 171, 154, 0.1);
}

.review-insights-popover .review-insights-next-step-link--secondary {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
}

.review-insights-popover .review-insights-next-step-link--secondary:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
}

body.review-insights-open .sidebar-mobile-btn {
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 767px) {
    body.review-insights-open {
        overflow: hidden;
    }
}

.review-insights-popover::-webkit-scrollbar {
    width: 10px;
}

.review-insights-popover::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    border: 2px solid rgba(13, 13, 14, 0.96);
}

.review-insights-popover::-webkit-scrollbar-track {
    background: transparent;
}

@media (max-width: 980px) {
    .review-insights-popover {
        gap: 12px;
        padding: 18px 18px 20px;
        border-radius: 16px;
    }

    .review-insights-popover.review-insights-popover-global {
        width: min(340px, calc(100vw - 24px));
        border-radius: 16px;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .review-insights-popover-head {
        gap: 12px;
    }

    .review-insights-popover-actions {
        grid-template-columns: 1fr;
    }

    .review-insights-popover.review-insights-popover-global.review-insights-popover--mobile,
    .review-insights-popover.review-insights-popover-global {
        bottom: 14px;
        top: 14px;
    }
}

@media (max-width: 720px) {
    .review-insights-popover {
        width: 100vw;
        min-height: 100dvh;
        max-height: 100dvh;
        gap: 12px;
        padding: calc(18px + env(safe-area-inset-top)) 18px calc(24px + env(safe-area-inset-bottom));
        border-radius: 0;
        opacity: 0;
        transform: translateY(18px);
        box-shadow: none;
    }

    .review-insights-popover.review-insights-popover-global,
    .review-insights-popover.review-insights-popover-global.review-insights-popover--mobile {
        left: 0 !important;
        right: 0 !important;
        top: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        max-width: none;
        border-radius: 0;
        border: 0;
        box-shadow: none;
    }

    .review-insights-popover.review-insights-popover--mobile.visible {
        transform: translateY(0);
    }

    .review-insights-popover-topbar {
        gap: 10px;
    }

    .review-insights-close {
        width: 40px;
        min-width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .review-insights-popover .review-insights-next-step-links,
    .review-insights-popover-actions {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .review-insights-popover,
    .review-insights-popover.visible,
    .review-insights-close {
        transition: none;
    }

    .review-insights-popover,
    .review-insights-popover.visible,
    .review-insights-popover.review-insights-popover--mobile.visible {
        transform: none;
    }
}

.review-launchpad,
.review-launchpad-hidden {
    display: none !important;
}

/* ============================================
   Legacy Review Launchpad
   ============================================ */
.review-launchpad {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 2px;
    padding: 14px 16px;
}

.review-launchpad-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.review-launchpad-copy {
    max-width: 560px;
}

.review-launchpad-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    color: var(--accent);
    margin-bottom: 8px;
}

.review-launchpad-copy h2 {
    margin: 0 0 4px;
    font-size: clamp(1.08rem, 1.18vw, 1.28rem);
    font-weight: 620;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.review-launchpad-copy p {
    margin: 0;
    max-width: 520px;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.review-launchpad-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.review-launchpad-actions .app-action-btn {
    min-height: 40px;
    padding: 0 12px;
    font-size: 12.5px;
    border-radius: 13px;
}

.review-launchpad-controls {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 2px;
}

.review-launchpad-control {
    min-height: 38px;
    color: var(--text-muted);
}

.review-launchpad-control:hover {
    color: var(--text-secondary);
}

.review-launchpad-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.review-launchpad.is-collapsed {
    gap: 10px;
}

.review-launchpad.is-collapsed .review-launchpad-head {
    align-items: center;
}

.review-launchpad.is-collapsed .review-launchpad-copy p,
.review-launchpad.is-collapsed .review-launchpad-grid,
.review-launchpad.is-collapsed .review-next-step-panel {
    display: none;
}

.review-launchpad.is-collapsed .review-launchpad-copy h2 {
    margin-bottom: 0;
    font-size: clamp(1.02rem, 1.2vw, 1.18rem);
    letter-spacing: -0.03em;
}

.review-launchpad-hidden[hidden] {
    display: none;
}

.review-launchpad-hidden {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.review-launchpad-hidden-copy {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    min-width: 0;
}

.review-launchpad-hidden-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.review-launchpad-hidden-meta {
    font-size: 13px;
    color: var(--text-muted);
}

.review-launchpad-show-btn {
    flex-shrink: 0;
}

.review-launchpad-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 12px;
}

.review-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 100%;
    padding: 12px 14px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.014));
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.review-card--insights {
    background: linear-gradient(180deg, rgba(77, 171, 154, 0.028), rgba(255, 255, 255, 0.016));
    border-color: rgba(77, 171, 154, 0.1);
}

.review-card-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.review-card-title {
    margin-top: -2px;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

.review-checklist,
.review-insights-list {
    display: grid;
    gap: 8px;
}

.review-checklist {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.review-insights-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.review-check-item,
.review-insight {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-height: 100%;
    padding: 10px 11px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.016);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.review-check-mark {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.028);
    color: transparent;
    font-size: 11px;
    font-weight: 800;
}

.review-check-item.is-done .review-check-mark {
    color: #0f1715;
    background: linear-gradient(135deg, rgba(77, 171, 154, 0.95), rgba(91, 196, 176, 0.88));
    border-color: rgba(77, 171, 154, 0.4);
    box-shadow: 0 8px 20px rgba(77, 171, 154, 0.14);
}

.review-check-item.is-pending .review-check-mark {
    color: rgba(255, 255, 255, 0.22);
}

.review-check-copy {
    min-width: 0;
}

.review-check-title,
.review-insight-label,
.review-next-step-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.32;
    color: var(--text-primary);
}

.review-check-meta,
.review-insight-copy,
.review-next-step-copy {
    margin-top: 3px;
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--text-secondary);
}

.review-insight {
    gap: 0;
    flex-direction: column;
    justify-content: space-between;
}

.review-insight-label {
    color: var(--accent);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.review-next-step-title {
    font-size: 15px;
    line-height: 1.25;
}

.review-next-step-copy {
    max-width: 62ch;
}

.review-next-step-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.012);
}

.review-next-step-panel-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.review-next-step-panel-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.review-next-step-panel-copy {
    min-width: 0;
}

.review-next-step-links {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.review-next-step-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid rgba(77, 171, 154, 0.14);
    background: rgba(77, 171, 154, 0.06);
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}

.review-next-step-link:hover {
    color: #9fe4d8;
    border-color: rgba(77, 171, 154, 0.22);
    background: rgba(77, 171, 154, 0.1);
}

.review-next-step-link--secondary {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
}

.review-next-step-link--secondary:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
}

@media (max-width: 1024px) {
    .review-launchpad-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .review-launchpad-grid {
        grid-template-columns: 1fr;
    }

    .review-checklist,
    .review-insights-list {
        grid-template-columns: 1fr;
    }

    .review-next-step-panel-body {
        flex-direction: column;
        align-items: flex-start;
    }

    .review-next-step-links {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .review-launchpad {
        gap: 12px;
        padding: 14px;
    }

    .review-card {
        padding: 13px 14px;
        border-radius: 16px;
    }

    .review-launchpad-actions {
        width: 100%;
    }

    .review-launchpad-actions .app-action-btn {
        flex: 1;
        justify-content: center;
    }

    .review-launchpad-actions .app-action-btn-icon-only {
        flex: 0 0 auto;
    }

    .review-launchpad-controls {
        margin-left: auto;
    }

    .review-next-step-links {
        flex-wrap: wrap;
    }

    .review-launchpad-hidden {
        flex-direction: column;
        align-items: flex-start;
    }

    .review-launchpad-copy {
        max-width: 100%;
    }
}

/* ============================================
   Demo Dashboard Chrome
   ============================================ */
.demo-banner {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(90deg, rgba(77, 171, 154, 0.14), rgba(77, 171, 154, 0.08));
    border-bottom: 1px solid rgba(77, 171, 154, 0.3);
    backdrop-filter: blur(10px);
}

.demo-banner-content {
    max-width: 1800px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.demo-banner-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(77, 171, 154, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4DAB9A;
}

.demo-banner-text {
    color: #f0f0f2;
    font-size: 14px;
}

.demo-banner-text strong {
    color: #4DAB9A;
}

.demo-highlight {
    color: #4DAB9A;
    font-weight: 600;
}

.demo-banner-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #4DAB9A, #5BC4B0);
    color: #0a0a0a;
    font-weight: 600;
    font-size: 13px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
}

.demo-banner-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(77, 171, 154, 0.4);
}

.demo-float-cta {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(10, 10, 10, 0.95);
    border: 1px solid rgba(77, 171, 154, 0.3);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.demo-float-cta.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.demo-float-text {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #f0f0f2;
    font-size: 13px;
    font-weight: 500;
}

.demo-float-text i {
    color: #4DAB9A;
}

.demo-float-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 16px;
    background: linear-gradient(135deg, #4DAB9A, #5BC4B0);
    color: #0a0a0a;
    font-weight: 700;
    font-size: 12px;
    border-radius: 8px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.demo-float-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(77, 171, 154, 0.4);
}

.demo-hint {
    position: absolute;
    bottom: 8px;
    right: 8px;
    padding: 4px 10px;
    background: rgba(77, 171, 154, 0.1);
    border: 1px solid rgba(77, 171, 154, 0.2);
    border-radius: 6px;
    font-size: 10px;
    color: #4DAB9A;
    font-weight: 500;
    opacity: 0.8;
    pointer-events: none;
}

.chart-badge {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 3px 8px;
    background: var(--accent-subtle);
    color: var(--accent);
    border-radius: var(--radius-sm);
}

/* Chart Type Toggle */
.chart-type-toggle {
    margin-left: auto;
    position: relative;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chart-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0 10px;
    height: 28px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
    position: relative;
    z-index: 101;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation; 
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.chart-toggle-btn:hover {
    color: var(--text-secondary);
}

.chart-toggle-btn.active {
    color: var(--text-primary);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.chart-toggle-btn svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

/* Divider between period and chart type */
.chart-toggle-divider {
    width: 1px;
    height: 20px;
    background: var(--glass-border);
    margin: 0 4px;
    flex-shrink: 0;
}

.chart-mode-bar {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.chart-mode-toggle-btn {
    min-width: 82px;
    gap: 6px;
    padding: 0 10px;
    border-radius: 8px;
}

.chart-mode-toggle-btn.active {
    background: var(--accent-subtle);
    border-color: rgba(77, 171, 154, 0.22);
    color: var(--accent);
}

/* Labels toggle buttons (styled like chart-info-btn) */
#equity-labels-toggle,
#heatmap-labels-toggle {
    transition: all 0.2s ease;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    border-color: rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.018);
    color: var(--text-secondary);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.025),
        0 1px 2px rgba(0,0,0,0.14);
}

#equity-labels-toggle svg,
#heatmap-labels-toggle svg {
    width: 15px;
    height: 15px;
}

#equity-labels-toggle.labels-on,
#heatmap-labels-toggle.labels-on {
    border-color: rgba(77, 171, 154, 0.28);
    color: var(--accent-light);
    background: linear-gradient(180deg, rgba(77, 171, 154, 0.14), rgba(77, 171, 154, 0.06));
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.04),
        0 1px 2px rgba(0,0,0,0.16);
}

#equity-labels-toggle:not(.labels-on),
#heatmap-labels-toggle:not(.labels-on) {
    opacity: 1;
}

#equity-labels-toggle:hover,
#heatmap-labels-toggle:hover {
    transform: translateY(-1px);
    border-color: rgba(77, 171, 154, 0.18);
    color: var(--text-primary);
    background: rgba(255,255,255,0.03);
}

#equity-labels-toggle.labels-on:hover,
#heatmap-labels-toggle.labels-on:hover {
    border-color: rgba(77, 171, 154, 0.34);
    color: var(--accent-light);
    background: linear-gradient(180deg, rgba(77, 171, 154, 0.18), rgba(77, 171, 154, 0.08));
}

#equity-labels-toggle:focus-visible,
#heatmap-labels-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-subtle);
}

html.light #equity-labels-toggle,
html.light #heatmap-labels-toggle {
    border-color: rgba(0,0,0,0.08);
    background: rgba(255,255,255,0.92);
    color: rgba(39, 39, 42, 0.72);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.65),
        0 1px 2px rgba(0,0,0,0.05);
}

html.light #equity-labels-toggle.labels-on,
html.light #heatmap-labels-toggle.labels-on {
    border-color: rgba(77, 171, 154, 0.3);
    color: var(--accent);
    background: linear-gradient(180deg, rgba(77, 171, 154, 0.14), rgba(77, 171, 154, 0.07));
}

html.light #equity-labels-toggle:hover,
html.light #heatmap-labels-toggle:hover {
    background: rgba(255,255,255,0.98);
    border-color: rgba(77, 171, 154, 0.18);
}

/* ============================================
   Section Dividers
   ============================================ */
.section-divider {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-2) 0;
    margin: var(--space-2) 0;
}

.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
}

.section-divider span {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-tertiary);
    white-space: nowrap;
}

/* Copy Widget Button */
.copy-widget-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
    white-space: nowrap;
}

.copy-widget-btn:hover {
    background: var(--glass-bg-hover);
    color: var(--accent);
    border-color: rgba(77, 171, 154, 0.3);
}

.copy-widget-btn:active {
    transform: scale(0.97);
}

/* Widget Section wrapper */
.widget-section {
    /* Wrapper for widget sections - no visual styling needed */
}

.consistency-map-card {
    overflow: hidden;
    padding: 18px 20px 16px !important;
}

.consistency-map-header {
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 8px !important;
}

.consistency-map-header .chart-header-left {
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.consistency-map-title-block {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.consistency-map-title-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.consistency-map-subtitle {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.35;
}

.consistency-map-toggle {
    margin-top: 2px;
}

.consistency-map-summary {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 6px;
    margin-left: auto;
    flex: 0 0 auto;
}

.consistency-map-stat {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 78px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(255,255,255,0.016);
    border: 1px solid rgba(255,255,255,0.045);
}

.consistency-map-stat-value {
    font-family: 'DM Mono', monospace;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.consistency-map-stat-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.consistency-map-content {
    min-height: 0 !important;
    margin-top: 0;
}

.consistency-map-shell {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.consistency-map-scroll {
    display: flex;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 0 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--glass-border) transparent;
    -webkit-overflow-scrolling: touch;
}

.consistency-map-scroll::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.consistency-map-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.consistency-map-scroll::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 999px;
}

.consistency-map-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--glass-border-hover);
}

.consistency-map-board {
    --consistency-weeks: 53;
    display: grid;
    grid-template-columns: 42px max-content;
    grid-template-rows: auto auto;
    column-gap: 12px;
    row-gap: 6px;
    min-width: calc((var(--consistency-weeks) * 18px) + 42px);
}

@media (min-width: 1024px) {
    .consistency-map-board {
        width: 100%;
        min-width: 0;
        grid-template-columns: 52px minmax(0, 1fr);
        column-gap: 16px;
    }
}

.consistency-map-months {
    display: grid;
    grid-template-columns: repeat(var(--consistency-weeks), 14px);
    grid-auto-rows: minmax(14px, auto);
    gap: 4px;
    align-items: end;
    min-height: 14px;
}

@media (min-width: 1024px) {
    .consistency-map-months {
        grid-template-columns: repeat(var(--consistency-weeks), minmax(0, 1fr));
        gap: 6px;
        min-height: 18px;
    }
}

.consistency-map-month-label {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    line-height: 1;
}

.consistency-map-month-name {
    color: inherit;
}

.consistency-map-month-summary {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.consistency-map-month-summary.mode-trades {
    color: var(--accent-secondary);
}

.consistency-map-month-summary.mode-pnl.positive {
    color: var(--profit-light);
}

.consistency-map-month-summary.mode-pnl.negative {
    color: var(--loss-light);
}

.consistency-map-month-summary.mode-pnl.neutral {
    color: var(--text-muted);
}

@media (max-width: 767px) {
    .consistency-map-month-label {
        gap: 4px;
    }

    .consistency-map-month-summary {
        font-size: 10px;
    }
}

.consistency-map-weekdays {
    display: grid;
    grid-template-rows: repeat(7, 14px);
    gap: 4px;
    padding-top: 1px;
}

@media (min-width: 1024px) {
    .consistency-map-weekdays {
        grid-template-rows: repeat(7, minmax(18px, 1fr));
        gap: 6px;
    }
}

.consistency-map-weekday {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.consistency-map-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 14px;
    grid-template-rows: repeat(7, 14px);
    gap: 4px;
}

@media (min-width: 1024px) {
    .consistency-map-grid {
        width: 100%;
        grid-auto-columns: minmax(0, 1fr);
        grid-template-rows: repeat(7, minmax(18px, 1fr));
        gap: 6px;
    }
}

.consistency-map-cell {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    background: rgba(255,255,255,0.024);
    border: 1px solid rgba(255,255,255,0.04);
    transition: transform var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out), background var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}

@media (min-width: 1024px) {
    .consistency-map-cell {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
        border-radius: 5px;
    }
}

.consistency-map-cell.positive.level-1 {
    background: rgba(34, 197, 94, 0.14);
    border-color: rgba(34, 197, 94, 0.12);
}

.consistency-map-cell.positive.level-2 {
    background: rgba(34, 197, 94, 0.24);
    border-color: rgba(34, 197, 94, 0.18);
}

.consistency-map-cell.positive.level-3 {
    background: rgba(34, 197, 94, 0.38);
    border-color: rgba(34, 197, 94, 0.24);
}

.consistency-map-cell.positive.level-4 {
    background: rgba(34, 197, 94, 0.56);
    border-color: rgba(74, 222, 128, 0.34);
}

.consistency-map-cell.negative.level-1 {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.12);
}

.consistency-map-cell.negative.level-2 {
    background: rgba(239, 68, 68, 0.22);
    border-color: rgba(239, 68, 68, 0.18);
}

.consistency-map-cell.negative.level-3 {
    background: rgba(239, 68, 68, 0.34);
    border-color: rgba(239, 68, 68, 0.22);
}

.consistency-map-cell.negative.level-4 {
    background: rgba(239, 68, 68, 0.52);
    border-color: rgba(248, 113, 113, 0.3);
}

.consistency-map-cell.neutral.level-1,
.consistency-map-cell.neutral.level-2,
.consistency-map-cell.neutral.level-3,
.consistency-map-cell.neutral.level-4 {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.08);
}

.consistency-map-cell.is-today {
    box-shadow: 0 0 0 1px rgba(255,255,255,0.18), 0 0 0 4px rgba(255,255,255,0.035), inset 0 0 0 1px rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.18);
}

.consistency-map-cell.is-current-week:not(.is-future):not(.is-today) {
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}

.consistency-map-cell.is-future {
    opacity: 0.35;
}

.consistency-map-cell:hover {
    transform: scale(1.12);
    border-color: rgba(255,255,255,0.18);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.06);
}

.consistency-map-cell.is-month-hovered:not(.is-month-active) {
    border-color: rgba(91, 196, 176, 0.16);
    box-shadow: inset 0 0 0 1px rgba(91, 196, 176, 0.08);
}

.consistency-map-cell.is-month-active {
    transform: scale(1.18);
    z-index: 2;
    border-color: rgba(255,255,255,0.22);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 0 0 4px rgba(91, 196, 176, 0.08);
}

.consistency-map-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.consistency-map-legend {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.consistency-map-legend-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.consistency-map-legend-scale {
    display: flex;
    align-items: center;
    gap: 4px;
}

.consistency-map-legend-chip {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    background: rgba(255,255,255,0.024);
    border: 1px solid rgba(255,255,255,0.04);
}

.consistency-map-legend-chip.positive.level-1 { background: rgba(34, 197, 94, 0.14); border-color: rgba(34, 197, 94, 0.12); }
.consistency-map-legend-chip.positive.level-2 { background: rgba(34, 197, 94, 0.24); border-color: rgba(34, 197, 94, 0.18); }
.consistency-map-legend-chip.positive.level-3 { background: rgba(34, 197, 94, 0.38); border-color: rgba(34, 197, 94, 0.24); }
.consistency-map-legend-chip.positive.level-4 { background: rgba(34, 197, 94, 0.56); border-color: rgba(74, 222, 128, 0.34); }
.consistency-map-legend-chip.negative.level-1 { background: rgba(239, 68, 68, 0.12); border-color: rgba(239, 68, 68, 0.12); }
.consistency-map-legend-chip.negative.level-2 { background: rgba(239, 68, 68, 0.22); border-color: rgba(239, 68, 68, 0.18); }
.consistency-map-legend-chip.negative.level-3 { background: rgba(239, 68, 68, 0.34); border-color: rgba(239, 68, 68, 0.22); }
.consistency-map-legend-chip.negative.level-4 { background: rgba(239, 68, 68, 0.52); border-color: rgba(248, 113, 113, 0.3); }

.consistency-map-note {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

.consistency-map-tooltip {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10001;
    display: none;
    min-width: 168px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(16, 16, 18, 0.98);
    border: 1px solid var(--glass-border-hover);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    pointer-events: none;
}

.consistency-map-tooltip.visible {
    display: block;
}

.consistency-map-tooltip-date {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 8px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.consistency-map-tooltip-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.consistency-map-tooltip-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-secondary);
    background: rgba(255,255,255,0.04);
}

.consistency-map-tooltip-badge.positive {
    color: #4ade80;
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.18);
}

.consistency-map-tooltip-badge.negative {
    color: #f87171;
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.18);
}

.consistency-map-tooltip-badge.neutral,
.consistency-map-tooltip-badge.today,
.consistency-map-tooltip-badge.current-week {
    color: var(--text-secondary);
    background: rgba(255,255,255,0.045);
    border-color: rgba(255,255,255,0.08);
}

.consistency-map-tooltip-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
}

.consistency-map-tooltip-row + .consistency-map-tooltip-row {
    margin-top: 6px;
}

.consistency-map-tooltip-label {
    color: var(--text-muted);
}

.consistency-map-tooltip-value {
    color: var(--text-primary);
    font-family: 'DM Mono', monospace;
    font-weight: 600;
}

.consistency-map-tooltip-value.positive {
    color: var(--green);
}

.consistency-map-tooltip-value.negative {
    color: var(--red);
}

.account-widget-grid {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: var(--space-5);
}

@media (min-width: 1024px) {
    .account-widget-grid {
        grid-template-columns: minmax(320px, 1fr) minmax(0, 2fr);
    }
}

@media (min-width: 1280px) {
    .account-widget-grid {
        grid-template-columns: minmax(340px, 1fr) minmax(0, 2fr);
    }
}

/* ============================================
   Chart Placeholder (Coming Soon)
   ============================================ */
.chart-container:has(.chart-empty) {
    display: flex;
    flex-direction: column;
}

.chart-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 150px;
    height: auto !important;
    color: var(--text-muted);
    font-size: 14px;
}
#chart-streaks:has(.chart-empty) {
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    color: var(--text-muted);
    background: repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 10px,
            rgba(255, 255, 255, 0.01) 10px,
            rgba(255, 255, 255, 0.01) 20px
    );
    border-radius: var(--radius-md);
}

.chart-placeholder i,
.chart-placeholder svg {
    opacity: 0.3;
}

.chart-placeholder span {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.5;
}

/* ============================================
   Interactive Buttons
   ============================================ */
#dashboard-wrapper .float-btn {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14), inset 0 1px 0 rgba(255,255,255,0.03);
}

#dashboard-wrapper .float-btn:hover {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.14);
    color: var(--text-primary);
    transform: translateY(-1px);
}

#dashboard-wrapper .float-btn i,
#dashboard-wrapper .float-btn svg {
    width: 16px;
    height: 16px;
}

#dashboard-wrapper .float-btn span {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

#dashboard-wrapper .float-btn--label {
    min-width: auto;
    padding-inline: 14px;
}

#dashboard-wrapper .share-btn {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    height: 36px;
    padding: 0 var(--space-4);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-tertiary);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

#dashboard-wrapper .share-btn:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
    color: var(--text-primary);
    transform: translateY(-2px);
}

#dashboard-wrapper .share-btn.twitter:hover {
    border-color: rgba(29, 161, 242, 0.4);
    color: #1DA1F2;
}

/* ============================================
   Month Selector
   ============================================ */
#dashboard-wrapper #month-selector {
    appearance: none;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: var(--space-2) calc(var(--space-6) + 8px) var(--space-2) var(--space-3);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239898a0' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition:
        border-color var(--duration-fast) var(--ease-out),
        background-color var(--duration-fast) var(--ease-out),
        box-shadow var(--duration-fast) var(--ease-out),
        color var(--duration-fast) var(--ease-out);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

#dashboard-wrapper #month-selector:hover {
    border-color: var(--glass-border-hover);
    background-color: var(--glass-bg-hover);
}

#dashboard-wrapper #month-selector:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-subtle);
}

#dashboard-wrapper .float-btn:focus-visible,
#dashboard-wrapper .share-btn:focus-visible,
#dashboard-wrapper .chart-header .header-icon-btn:focus-visible,
#dashboard-wrapper .chart-header .toggle-btn:focus-visible,
.chart-toggle-btn:focus-visible,
#dashboard-wrapper #month-selector:focus-visible,
.copy-widget-btn:focus-visible {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-subtle);
}

#dashboard-wrapper #month-selector option {
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* ============================================
   Heatmap Calendar
   ============================================ */
#dashboard-wrapper #heatmap-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

#dashboard-wrapper .heatmap-cell {
    aspect-ratio: 1;
    min-height: 40px;
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    padding: 5px 6px;
    font-size: 12px;
    color: var(--text-muted);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--duration-normal) var(--ease-out);
}

#dashboard-wrapper .heatmap-cell:hover {
    transform: scale(1.05);
    z-index: 10;
}

#dashboard-wrapper .heatmap-cell-day {
    font-size: 12px;
    font-weight: 600;
    font-family: 'Instrument Sans', sans-serif;
    color: var(--text-tertiary);
}

#dashboard-wrapper .heatmap-cell-pnl {
    font-size: 13px;
    font-weight: 600;
}

#dashboard-wrapper .heatmap-cell-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    opacity: 0.25;
    transition: all var(--duration-normal) var(--ease-out);
}

#dashboard-wrapper .heatmap-cell:hover .heatmap-cell-bar {
    opacity: 0.4;
}

/* Profit cells */
#dashboard-wrapper .cell-profit {
    background: var(--green-bg);
}

#dashboard-wrapper .cell-profit:hover {
    background: rgba(34, 197, 94, 0.15);
    border-color: var(--green-border);
}

#dashboard-wrapper .cell-profit .heatmap-cell-pnl {
    color: var(--green);
}

#dashboard-wrapper .cell-profit .heatmap-cell-bar {
    background: linear-gradient(to top, var(--green), transparent);
}

/* Loss cells */
#dashboard-wrapper .cell-loss {
    background: var(--red-bg);
}

#dashboard-wrapper .cell-loss:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: var(--red-border);
}

#dashboard-wrapper .cell-loss .heatmap-cell-pnl {
    color: var(--red);
}

#dashboard-wrapper .cell-loss .heatmap-cell-bar {
    background: linear-gradient(to top, var(--red), transparent);
}

/* ============================================
   ApexCharts Customization
   ============================================ */
#dashboard-wrapper .apexcharts-canvas {
    background: transparent !important;
}

#dashboard-wrapper .apexcharts-canvas:focus,
#dashboard-wrapper .apexcharts-canvas:focus-visible,
#dashboard-wrapper .apexcharts-canvas [tabindex]:focus,
#dashboard-wrapper .apexcharts-canvas [tabindex]:focus-visible,
#dashboard-wrapper .apexcharts-svg:focus,
#dashboard-wrapper .apexcharts-svg:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

#chart-equity .apexcharts-bar-area,
#chart-equity .apexcharts-bar-area:focus,
#chart-equity .apexcharts-bar-area:focus-visible,
#chart-equity .apexcharts-bar-area.apexcharts-active {
    outline: none !important;
    stroke: transparent !important;
    stroke-width: 0 !important;
    filter: none !important;
}

#dashboard-wrapper .apexcharts-gridlines-horizontal line,
#dashboard-wrapper .apexcharts-gridlines-vertical line {
    stroke: rgba(255, 255, 255, 0.06) !important;
    stroke-dasharray: 0 !important;
}


#chart-equity .apexcharts-grid-border {
    stroke: none !important;
}

#equity-container #chart-equity {
    margin: -7px -14px 3px -12px;
}

#chart-equity .apexcharts-point-annotation-label,
#chart-equity .apexcharts-yaxis-annotation-label {
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.32));
}

#chart-equity .apexcharts-point-annotation-label rect,
#chart-equity .apexcharts-yaxis-annotation-label rect {
    stroke-opacity: 0.9;
}

#dashboard-wrapper .apexcharts-xaxis-label,
#dashboard-wrapper .apexcharts-yaxis-label {
    fill: var(--text-muted) !important;
    font-family: 'Instrument Sans', sans-serif !important;
    font-size: 12px !important;
    font-weight: 500 !important;
}

#dashboard-wrapper .apexcharts-legend-text {
    color: var(--text-secondary) !important;
    font-family: 'Instrument Sans', sans-serif !important;
    font-size: 13px !important;
}

/* Tooltip */
#dashboard-wrapper .apexcharts-tooltip {
    background: rgba(15, 15, 18, 0.95) !important;
    backdrop-filter: blur(16px) !important;
    border: 1px solid var(--glass-border-hover) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5) !important;
}

#dashboard-wrapper .apexcharts-tooltip-title {
    background: rgba(255, 255, 255, 0.03) !important;
    border-bottom: 1px solid var(--glass-border) !important;
    color: var(--text-secondary) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    padding: 10px 14px !important;
}

#dashboard-wrapper .apexcharts-tooltip-series-group {
    padding: 10px 14px !important;
}

#dashboard-wrapper .apexcharts-tooltip-text-y-value {
    font-family: 'JetBrains Mono', monospace !important;
    font-weight: 500 !important;
    color: var(--text-primary) !important;
}

/* Tooltip marker - dynamic colors via JS, fallback styling */
#dashboard-wrapper .apexcharts-tooltip-marker {
    width: 10px !important;
    height: 10px !important;
    border-radius: 3px !important;
    margin-right: 8px !important;
}

#dashboard-wrapper .apexcharts-xcrosshairs,
#dashboard-wrapper .apexcharts-ycrosshairs {
    stroke: var(--accent) !important;
    stroke-width: 1px !important;
    stroke-dasharray: 3 3 !important;
    opacity: 0.3 !important;
}

/* Data Labels */
#dashboard-wrapper .apexcharts-data-labels,
#dashboard-wrapper .apexcharts-datalabel {
    font-family: 'JetBrains Mono', monospace !important;
}

/* ============================================
   Loading States
   ============================================ */
#dashboard-wrapper #chart-equity,
#dashboard-wrapper #chart-hourly,
#dashboard-wrapper #behavioral-metrics,
#dashboard-wrapper #rDistChart {
    opacity: 0;
    transform: none;
    transition: opacity var(--duration-slow) var(--ease-out);
}

#dashboard-wrapper #chart-equity.loaded,
#dashboard-wrapper #chart-hourly.loaded,
#dashboard-wrapper #behavioral-metrics.loaded,
#dashboard-wrapper #rDistChart.loaded {
    opacity: 1;
    transform: none;
}

/* Equity Chart Custom Tooltip */
.equity-tooltip {
    background: rgba(15, 15, 18, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 12px 14px;
    min-width: 160px;
}

.equity-tooltip-date {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.equity-tooltip-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.equity-tooltip-dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    flex-shrink: 0;
}

.equity-tooltip-dot.green {
    background: #00ff6a;
}

.equity-tooltip-dot.gray {
    background: rgba(255, 255, 255, 0.3);
}

.equity-tooltip-label {
    font-size: 13px;
    color: var(--text-secondary);
    flex: 1;
}

.equity-tooltip-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}


.equity-tooltip-diff {
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    font-weight: 700;
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
}

.equity-tooltip-diff.positive {
    color: #00ff6a;
}

.equity-tooltip-diff.negative {
    color: #ff3b4a;
}

#dashboard-wrapper.refreshing {
    border-color: var(--accent);
}

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

#dashboard-wrapper .animate-spin {
    animation: spin 1s linear infinite;
}

/* ============================================
   Pills / Filter Buttons
   ============================================ */
.chart-pills {
    display: flex;
    gap: 6px;
}

.pill {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
    font-family: inherit;
}

.pill:hover {
    background: var(--glass-bg-hover);
    color: var(--text-secondary);
}

.pill.active {
    background: var(--accent-subtle);
    border-color: rgba(77, 171, 154, 0.3);
    color: var(--accent);
}

/* ============================================
   P/L by Hour - Heatmap Grid (Days x Hours)
   ============================================ */
.hourly-heatmap {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
    gap: 4px;
}

.hourly-heatmap-header {
    display: flex;
    gap: 3px;
}

.hourly-heatmap-corner {
    width: 32px;
    flex-shrink: 0;
}

.hourly-heatmap-hour {
    flex: 1;
    min-width: 0;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.hourly-heatmap-row {
    display: flex;
    gap:4px;
    flex: 1;
    min-height: 0;
}

.hourly-heatmap-day {
    width: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.hourly-heatmap-cell {
    flex: 1;
    min-width: 0;
    border-radius: 4px;
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    transition: all 0.2s ease;
    cursor: pointer;
    --intensity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hourly-heatmap-cell:hover {
    transform: scale(1.1);
    z-index: 10;
    border-radius: 6px;
}

.hourly-cell-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 3px rgba(0,0,0,0.9);
}

/* Vibrant green for profit */
.hourly-heatmap-cell.cell-profit {
    background: #00d45a;
    opacity: calc(0.4 + var(--intensity) * 0.6);
    border-color: rgba(0, 212, 90, 0.3);
    box-shadow: inset 0 0 8px rgba(0, 255, 106, 0.2);
}

/* Vibrant red for loss */
.hourly-heatmap-cell.cell-loss {
    background: #e63946;
    opacity: calc(0.4 + var(--intensity) * 0.6);
    border-color: rgba(230, 57, 70, 0.3);
    box-shadow: inset 0 0 8px rgba(255, 59, 74, 0.2);
}

/* Light mode - Trading Heatmap */
html.light .hourly-heatmap-cell {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.05);
}

html.light .hourly-heatmap-cell.cell-profit {
    background: rgb(22, 163, 74);
    opacity: calc(0.6 + var(--intensity) * 0.4);
    border-color: rgba(22, 163, 74, 0.5);
    box-shadow: inset 0 0 6px rgba(22, 163, 74, 0.15);
}

html.light .hourly-heatmap-cell.cell-loss {
    background: rgb(220, 38, 38);
    opacity: calc(0.6 + var(--intensity) * 0.4);
    border-color: rgba(220, 38, 38, 0.5);
    box-shadow: inset 0 0 6px rgba(220, 38, 38, 0.15);
}

html.light .hourly-cell-value {
    color: rgba(0, 0, 0, 0.8);
    text-shadow: none;
}

/* Custom tooltip for heatmap cells */
.heatmap-cell-tooltip {
    position: fixed;
    padding: 8px 12px;
    background: rgba(12, 12, 14, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    pointer-events: none;
    z-index: 9999;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.15s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.heatmap-cell-tooltip.visible {
    opacity: 1;
}

html.light .heatmap-cell-tooltip {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

html.light .hourly-heatmap-hour,
html.light .hourly-heatmap-day {
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .hourly-heatmap {
        padding: 4px 8px;
        gap: 2px;
    }

    .hourly-heatmap-corner,
    .hourly-heatmap-day {
        width: 24px;
        font-size: 9px;
    }

    .hourly-heatmap-hour {
        font-size: 9px;
    }

    .hourly-heatmap-header,
    .hourly-heatmap-row {
        gap: 2px;
    }

    .hourly-cell-value {
        font-size: 9px;
    }
}


/* ============================================
   Top Setups - Premium Bars
   ============================================ */
.top-setups-container,
.symbol-list-container,
#chart-sessions {
    height: 170px;
    overflow-y: auto;
    margin-top: -5px;
    scrollbar-width: thin;
    scrollbar-color: var(--glass-border) transparent;
}

.top-setups-container,
#chart-sessions {
    scrollbar-gutter: stable;
}

#chart-symbols {
    height: 174px;
}

.top-setups-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 4px 0 0;
}

.ts-loading {
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
    padding: 20px;
}


/* ============================================
   Top Setups - Minimal Accent Line Style
   ============================================ */
.setup-row,
.symbol-row,
.session-item {
    border-radius: var(--radius-md);
    padding: 10px 12px 10px 16px;
    transition: all 0.2s ease;
    position: relative;
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
}

.setup-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 0 2px 2px 0;
    transition: all 0.2s ease;
}

.setup-row.positive::before {
    background: var(--accent);
}

.setup-row.positive:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
}

.setup-row.positive:hover::before {
    background: var(--accent-secondary);
}

.setup-row.negative::before {
    background: var(--red-muted);
}

.setup-row.negative:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
}

.setup-row.negative:hover::before {
    background: var(--red);
}

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

.setup-name-group {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.setup-rank {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    flex-shrink: 0;
    width: 18px;
}

.setup-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.setup-pnl {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.setup-pnl.positive { color: var(--green); }
.setup-pnl.negative { color: var(--red); }

.setup-progress-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.setup-progress-track {
    flex: 1;
    height: 3px;
    background: var(--glass-border);
    border-radius: 2px;
    overflow: hidden;
}

.setup-progress-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s var(--ease-out);
}

.setup-progress-fill.positive { background: var(--green); }
.setup-progress-fill.negative { background: var(--red); }

.setup-empty {
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
    padding: 40px 20px;
}

/* ============================================
   Strategy Report Card — Grades
   ============================================ */
#strategy-grades-content{
    width: 100%;
    height: 100%;
}

.strategy-grades-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 4px 4px 4px 0;
    max-height: 278px;
    overflow-y: auto;
    width: 100%;
    height: auto;
}

.sg-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.sg-summary-chip {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255,255,255,0.016);
    border: 1px solid rgba(255,255,255,0.045);
    min-width: 0;
}

.sg-summary-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.sg-summary-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.sg-footnote,
.sd-footnote {
    margin: -2px 0 10px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

.strategy-grade-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.014);
    border: 1px solid rgba(255,255,255,0.04);
    transition: all 0.2s ease;
}

.strategy-grade-row:hover {
    background: rgba(255,255,255,0.022);
    border-color: rgba(255,255,255,0.06);
}

.strategy-grade-row.is-ready {
    border-color: rgba(34,197,94,0.12);
}

.strategy-grade-row.is-weak {
    border-color: rgba(245,158,11,0.12);
}

.strategy-grade-row.is-no-setup {
    border-color: rgba(245,158,11,0.12);
    background: rgba(245,158,11,0.03);
}

.sg-grade {
    flex-shrink: 0;
    width: 40px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.sg-info {
    flex: 1;
    min-width: 0;
}

.sg-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.sg-name-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.sg-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sg-status {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sg-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
    font-family: 'JetBrains Mono', monospace;
}

.sg-pnl {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.sg-verdict {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

/* Partial grade badge — pulsing ? indicator */
.sg-grade-partial {
    position: relative;
    font-size: 13px;
}

/* Progress bar for trades needed */
.sg-progress {
    flex: 1;
    height: 5px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
}

.sg-progress-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
    opacity: 0.9;
}

.sg-progress-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

html.light .sg-summary-chip {
    background: rgba(255,255,255,0.76);
    border-color: rgba(0,0,0,0.06);
}

html.light .strategy-grade-row {
    background: rgba(0,0,0,0.018);
    border-color: rgba(0,0,0,0.05);
}

html.light .strategy-grade-row:hover {
    background: rgba(0,0,0,0.03);
    border-color: rgba(0,0,0,0.07);
}

html.light .strategy-grade-row.is-no-setup {
    background: rgba(245,158,11,0.05);
    border-color: rgba(245,158,11,0.14);
}

/* ============================================
   Setup Distribution — Donut Chart
   ============================================ */
#setup-distribution-content{
    width: 100%;
    height: 100%;
}

.setup-distribution-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 4px 0;
    width: 100%;
    height: 100%;
}

.sd-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.sd-summary-chip {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255,255,255,0.016);
    border: 1px solid rgba(255,255,255,0.045);
    min-width: 0;
}

.sd-summary-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.sd-summary-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sd-list {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 269px;
    overflow-y: auto;
    padding-right: 4px;
}

.sd-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255,255,255,0.014);
    border: 1px solid rgba(255,255,255,0.04);
    transition: all 0.2s ease;
}

.sd-row:hover {
    background: rgba(255,255,255,0.022);
    border-color: rgba(255,255,255,0.06);
}

.sd-row.no-setup {
    border-color: rgba(245, 158, 11, 0.12);
    background: rgba(245, 158, 11, 0.035);
}

.sd-row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.sd-row-title {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.sd-rank {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    flex-shrink: 0;
    width: 18px;
}

.sd-legend-name {
    flex: 1;
    min-width: 0;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sd-row-metrics {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-shrink: 0;
    min-width: 0;
}

.sd-legend-pct {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 36px;
    text-align: right;
}

.sd-legend-trades {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-muted);
    min-width: 62px;
    text-align: right;
}

.sd-row-pnl {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 700;
    min-width: 64px;
    text-align: right;
}

.sd-row-bar {
    height: 6px;
    border-radius: 999px;
    background: rgba(255,255,255,0.05);
    overflow: hidden;
}

.sd-row-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.45s var(--ease-out);
}

.sd-row-fill.positive {
    background: linear-gradient(90deg, rgba(77,171,154,0.88), rgba(91,196,176,0.9));
}

.sd-row-fill.negative {
    background: linear-gradient(90deg, rgba(239,68,68,0.72), rgba(248,113,113,0.82));
}

html.light .sd-summary-chip {
    background: rgba(255,255,255,0.76);
    border-color: rgba(0,0,0,0.06);
}

html.light .sd-row {
    background: rgba(0,0,0,0.018);
    border-color: rgba(0,0,0,0.05);
}

html.light .sd-row:hover {
    background: rgba(0,0,0,0.03);
    border-color: rgba(0,0,0,0.07);
}

html.light .sd-row.no-setup {
    background: rgba(245, 158, 11, 0.05);
    border-color: rgba(245, 158, 11, 0.14);
}

html.light .sd-row-bar {
    background: rgba(15,23,42,0.07);
}

/* ============================================
   Edge Score — Overall Grade (compact layout)
   ============================================ */
.edge-score-wrap {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 6px 0 2px;
    width: 100%;
    max-width: none;
}

.es-top {
    display: flex;
    align-items: center;
    gap: 24px;
}

.es-ring-wrap {
    position: relative;
    width: 132px;
    height: 132px;
    flex-shrink: 0;
}

.es-ring {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.18));
}

.es-ring-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.es-grade {
    font-family: 'JetBrains Mono', monospace;
    font-size: 34px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
}

.es-score {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-top: 6px;
}

.es-score-max {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.es-top-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.es-verdict {
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
    line-height: 1.05;
}

.es-stat-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.es-stat-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 17px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.es-stat-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.es-details {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 18px;
    border-top: 1px solid var(--glass-border);
}

.es-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 14px;
    padding: 2px 0;
}

.es-detail-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.es-detail-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
    text-align: right;
}

.es-tip {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    padding: 15px 16px;
    background: linear-gradient(180deg, rgba(77, 171, 154, 0.08), rgba(77, 171, 154, 0.045));
    border-radius: 12px;
    border: 1px solid rgba(77, 171, 154, 0.14);
    box-shadow: inset 3px 0 0 rgba(77, 171, 154, 0.95);
    line-height: 1.45;
}

/* Setup Row - Updated Layout with Bar */
.setup-row {
    display: flex;
    align-items: center;
    gap: 2px;
}

.setup-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.setup-topline {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.setup-bar-track {
    height: 4px;
    background: var(--glass-border);
    border-radius: 2px;
    overflow: hidden;
}

.setup-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s var(--ease-out);
}

.setup-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
}

.setup-trades {
    font-size: 12px;
    color: var(--text-muted);
}

/* ============================================
   R-Distribution - Glass Card Bars
   ============================================ */
.rdist-bars-container {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex: 1;
    gap: 8px;
    padding: 12px 8px;
    height: 100%;
}

.rdist-bar-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.rdist-bar-wrapper {
    width: 100%;
    height: 100px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.rdist-bar {
    width: 100%;
    max-width: 32px;
    min-height: 4px;
    border-radius: var(--radius-sm);
    transition: all 0.3s var(--ease-out);
    border: 1px solid transparent;
}

.rdist-bar:hover {
    transform: scaleY(1.05);
}

.rdist-bar.positive {
    background: var(--green-bg);
    border-color: var(--green-border);
}

.rdist-bar.negative {
    background: var(--red-bg);
    border-color: var(--red-border);
}

.rdist-bar.empty {
    background: var(--glass-bg);
    border-color: var(--glass-border);
}

.rdist-bar-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
}

.rdist-stats {
    display: flex;
    justify-content: space-between;
    padding: 10px 8px 0;
    border-top: 1px solid var(--glass-border);
}

.rdist-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rdist-stat:last-child {
    text-align: right;
}

.rdist-stat-label {
    font-size: 11px;
    color: var(--text-muted);
}

.rdist-stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 600;
}

.rdist-stat-value.positive {
    color: var(--green);
}

.rdist-stat-value.negative {
    color: var(--red);
}

/* ============================================
   P/L by Symbol - Glass Card Style
   ============================================ */
.symbol-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 4px 0 0;
}

#chart-symbols .symbol-list-container{
    margin-top: 0;
    padding-right: 4px;
}

.symbol-row:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
}

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

.symbol-name-group {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.symbol-badge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--green);
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.18);
    padding: 2px 7px;
    border-radius: 999px;
    text-transform: uppercase;
}

.symbol-badge.symbol-badge-worst {
    color: var(--red);
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.18);
}

.symbol-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.symbol-pnl {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.symbol-pnl.positive { color: var(--green); }
.symbol-pnl.negative { color: var(--red); }

.symbol-progress-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.symbol-progress-track {
    flex: 1;
    height: 4px;
    background: var(--glass-border);
    border-radius: 2px;
    overflow: hidden;
}

.symbol-progress-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s var(--ease-out);
}

.symbol-progress-fill.positive { background: var(--green); }
.symbol-progress-fill.negative { background: var(--red); }

.symbol-trades {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

.symbol-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    padding: 40px 20px;
}

/* ============================================
   P/L by Weekday - Segmented Bars Style
   ============================================ */
.weekday-bars-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
    gap: 7px;
}

.weekday-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.weekday-row.is-best .weekday-bar-track {
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.12);
}

.weekday-row.is-worst .weekday-bar-track {
    box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.12);
}

.weekday-row.is-best .weekday-label,
.weekday-row.is-best .weekday-value {
    color: var(--text-primary);
}

.weekday-row.is-worst .weekday-label {
    color: var(--text-primary);
}

.weekday-label-group {
    width: 70px;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.weekday-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.weekday-badge {
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--green);
    background: rgba(34, 197, 94, 0.14);
    padding: 2px 5px;
    border-radius: 999px;
    text-transform: uppercase;
}

.weekday-badge.weekday-badge-worst {
    color: var(--red);
    background: rgba(239, 68, 68, 0.14);
}

.weekday-bar-track {
    flex: 1;
    height: 6px;
    background: var(--glass-border);
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.weekday-bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.5s ease;
}

.weekday-bar-fill.positive {
    background: linear-gradient(90deg, var(--green) 0%, rgba(34, 197, 94, 0.7) 100%);
}

.weekday-bar-fill.negative {
    background: linear-gradient(90deg, var(--red) 0%, rgba(239, 68, 68, 0.7) 100%);
}

.weekday-bar-fill.zero {
    background: var(--glass-border);
    width: 0 !important;
}

.weekday-value {
    font-size: 11px;
    font-weight: 700;
    min-width: 54px;
    text-align: right;
    flex-shrink: 0;
    font-family: 'JetBrains Mono', monospace;
}

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

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

.weekday-value.zero {
    color: var(--text-muted);
}


/* ============================================
   Session Performance - Rows (JSX Style)
   ============================================ */
.session-cards {
    display: flex;
    flex-direction: column;
    gap: 6px;
    height: 100%;
    justify-content: flex-start;
}

.session-label-group {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.session-label-group-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.session-label-item {
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
}

.session-label-meta {
    color: var(--text-muted);
    font-size: 11px;
}

.session-item:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
}

.session-label-item:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
}

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

.session-row-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.session-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}

.session-dot.positive {
    background: var(--green);
}

.session-dot.negative {
    background: var(--red);
}

.session-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.session-badge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--green);
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.18);
    padding: 2px 7px;
    border-radius: 999px;
    text-transform: uppercase;
}

.session-pnl {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 600;
}

.session-pnl.positive {
    color: var(--green);
}

.session-pnl.negative {
    color: var(--red);
}

.session-pnl.neutral {
    color: var(--text-muted);
}

.session-row-trades {
    font-size: 12px;
    color: var(--text-muted);
}

.session-row-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-left: 18px;
    margin-top: 5px;
}

.session-row-avg {
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
}

.session-row-avg.positive {
    color: var(--green);
}

.session-row-avg.negative {
    color: var(--red);
}

.session-row-avg.neutral {
    color: var(--text-muted);
}

#chart-sessions .session-cards {
    min-height: max-content;
    padding: 0 4px 0 0;
}

/* ============================================
   Win/Loss Streaks
   ============================================ */
/* Win/Loss Streaks - Timeline Style */
.streak-timeline {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 8px 4px;
}

.streak-timeline-track {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    position: relative;
    padding: 16px 0;
}

.streak-timeline-track::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 8px;
    right: 8px;
    height: 2px;
    background: var(--glass-border);
    transform: translateY(-50%);
    z-index: 0;
}

.streak-node {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.streak-node-block {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.2s ease;
    position: relative;
}

.streak-node-block.win {
    background: linear-gradient(135deg, var(--green-bg) 0%, rgba(34, 197, 94, 0.2) 100%);
    border: 1.5px solid var(--green-border);
    color: var(--green-light);
    box-shadow: 0 0 12px var(--green-glow);
}

.streak-node-block.loss {
    background: linear-gradient(135deg, var(--red-bg) 0%, rgba(239, 68, 68, 0.2) 100%);
    border: 1.5px solid var(--red-border);
    color: var(--red-light);
    box-shadow: 0 0 12px var(--red-glow);
}

.streak-node-block:hover {
    transform: scale(1.1);
}

.streak-node-block.current {
    width: 48px;
    height: 48px;
    font-size: 18px;
}

.streak-node-block.current::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: calc(var(--radius-md) + 2px);
    border: 2px dashed currentColor;
    opacity: 0.4;
    animation: streak-pulse 2s ease-in-out infinite;
}

@keyframes streak-pulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.02); }
}

.streak-connector {
    width: 8px;
    height: 2px;
    background: var(--glass-border);
    flex-shrink: 0;
}

.streak-connector.win { background: var(--green-border); }
.streak-connector.loss { background: var(--red-border); }

.streak-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--glass-border);
}

.streak-summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 4px;
    background: var(--glass-bg);
    border-radius: var(--radius-md);
}

.streak-summary-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    font-weight: 700;
}

.streak-summary-value.win { color: var(--green-light); }
.streak-summary-value.loss { color: var(--red-light); }
.streak-summary-value.neutral { color: var(--text-secondary); }

.streak-summary-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Streak Blocks (used by JS) */
.streak-blocks {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 16px 12px;
    height: 100%;
    justify-content: center;
}

.streak-blocks-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    flex: 1;
    overflow: visible;
    align-content: center;
    padding: 4px 0;
}

.streak-block {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.streak-block.win {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(34, 197, 94, 0.05) 100%);
    border: 1px solid var(--green-border);
    color: var(--green-light);
}

.streak-block.loss {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.05) 100%);
    border: 1px solid var(--red-border);
    color: var(--red-light);
}

.streak-block:hover {
    transform: scale(1.08);
}

.streak-stats {
    display: flex;
    justify-content: space-between;
    padding: 10px 20px 0;
    border-top: 1px solid var(--glass-border);
    margin: 12px -12px -12px -12px;
}

.streak-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.streak-stat:last-child {
    text-align: right;
}

.streak-stat-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.streak-stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px;
    font-weight: 700;
}

.streak-stat-value.win {
    color: var(--green-light);
}

.streak-stat-value.loss {
    color: var(--red-light);
}

/* ============================================
   Risk/Reward Distribution
   ============================================ */
.rr-distribution {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 12px;
}

.rr-bars-container {
    flex: 1;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    gap: 8px;
    padding: 24px 0 0;
}

.rr-bar-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    max-width: 60px;
}

.rr-bar-track {
    width: 100%;
    height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    position: relative;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 4px;
}

.rr-bar {
    width: 100%;
    border-radius: var(--radius-sm);
    min-height: 4px;
    transition: height 0.5s var(--ease-out);
    position: relative;
}

.rr-bar-value {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.rr-bar-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    text-align: center;
}

/* Glass gradient bars from red to green */
.rr-bar.rr-bad {
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.9) 0%, rgba(239, 68, 68, 0.5) 100%);
}
.rr-bar.rr-poor {
    background: linear-gradient(180deg, rgba(249, 115, 22, 0.9) 0%, rgba(249, 115, 22, 0.5) 100%);
}
.rr-bar.rr-fair {
    background: linear-gradient(180deg, rgba(234, 179, 8, 0.9) 0%, rgba(234, 179, 8, 0.5) 100%);
}
.rr-bar.rr-good {
    background: linear-gradient(180deg, rgba(132, 204, 22, 0.9) 0%, rgba(132, 204, 22, 0.5) 100%);
}
.rr-bar.rr-great {
    background: linear-gradient(180deg, rgba(77, 171, 154, 0.9) 0%, rgba(77, 171, 154, 0.5) 100%);
}
.rr-bar.rr-excellent {
    background: linear-gradient(180deg, rgba(52, 211, 153, 0.9) 0%, rgba(52, 211, 153, 0.5) 100%);
}

.rr-summary {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 13px 16px;
    border-top: 1px solid var(--glass-border);
}

.rr-summary-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.rr-summary-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.rr-summary-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

/* ============================================
   Overtrading - Progress Bars
   ============================================ */
.overtrading-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 0;
    height: 100%;
    justify-content: center;
    position: relative;
}

.overtrading-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.overtrading-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.overtrading-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.overtrading-track {
    height: 10px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    overflow: visible;
    position: relative;
}

.overtrading-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 4px;
}

.overtrading-fill.ok {
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.8), rgba(34, 197, 94, 0.5));
}

.overtrading-fill.warning {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.8), rgba(245, 158, 11, 0.5));
}

.overtrading-fill.danger {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.8), rgba(239, 68, 68, 0.5));
}

.overtrading-limit {
    position: absolute;
    top: -4px;
    bottom: -4px;
    width: 2px;
    background: var(--text-secondary);
    border-radius: 1px;
    z-index: 1;
}

.overtrading-status-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 100px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.overtrading-status-badge.ok {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid var(--green-border);
}

.overtrading-status-badge.warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.overtrading-status-badge.danger {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid var(--red-border);
}

.overtrading-message {
    text-align: center;
    font-size: 16px;
    color: var(--text-muted);
    padding: 10px 16px;
    margin-top: 12px;
    background: var(--glass-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
}

/* ============================================
   Commission Tracker
   ============================================ */
.commission-tracker-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 0;
    gap: 16px;
}

.comm-main {
    text-align: center;
    width: 100%;
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.08) 0%, rgba(251, 191, 36, 0.02) 100%);
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}

.comm-main::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 2px;
    background: linear-gradient(90deg, rgba(251, 191, 36, 0.8), rgba(251, 191, 36, 0.2));
    border-radius: 2px;
}

.comm-main-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.comm-main-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 36px;
    font-weight: 700;
    color: #fbbf24;
    text-shadow: 0 0 20px rgba(251, 191, 36, 0.3);
}

.comm-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: 100%;
}

.comm-stat-card {
    text-align: center;
    padding: 14px 8px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
}

.comm-stat-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 6px;
}

.comm-stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.comm-stat-value.accent {
    color: var(--brand);
}

/* ============================================
   Drawdown - SVG Area Chart (JSX Style)
   ============================================ */
.drawdown-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 8px 0;
}

.drawdown-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.drawdown-legend {
    display: flex;
    gap: 16px;
}

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

.drawdown-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.drawdown-legend-dot.current {
    background: var(--red-light);
}

.drawdown-legend-dot.max {
    background: var(--red);
}

.drawdown-legend-text {
    font-size: 13px;
    color: var(--text-tertiary);
}

.drawdown-chart {
    flex: 1;
    position: relative;
    min-height: 120px;
}

.drawdown-chart svg {
    width: 100%;
    height: 100%;
}

.drawdown-stats {
    display: flex;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--glass-border);
    margin-top: 16px;
}

.drawdown-stat {
    flex: 1;
}

.drawdown-stat:first-child {
    text-align: left;
}

.drawdown-stat:nth-child(2) {
    text-align: center;
}

.drawdown-stat:last-child {
    text-align: right;
}

.drawdown-stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.drawdown-stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    font-weight: 500;
}

.drawdown-stat-value.positive {
    color: var(--green);
}

.drawdown-stat-value.negative {
    color: var(--red);
}

.drawdown-stat-value.neutral {
    color: var(--text-secondary);
}

/* ============================================
   Toast
   ============================================ */
#toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    background: rgba(15, 15, 18, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid var(--green-border);
    color: var(--text-primary);
    padding: 14px 24px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: all var(--duration-slow) var(--ease-out);
}

#toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ============================================
   Scrollbar
   ============================================ */
#dashboard-wrapper ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

#dashboard-wrapper ::-webkit-scrollbar-track {
    background: transparent;
}

#dashboard-wrapper ::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 3px;
}

#dashboard-wrapper ::-webkit-scrollbar-thumb:hover {
    background: var(--glass-border-hover);
}

/* ============================================
   Dark Theme (explicit for toggle support)
   ============================================ */
html.dark {
    --bg-void: #0a0a0a;
    --bg-primary: #111111;
    --bg-secondary: #161616;
    --bg-elevated: #161616;
    --bg-surface: #1c1c1c;

    --glass-bg: #1a1a1a;
    --glass-bg-hover: #202020;
    --glass-border: #222222;
    --glass-border-hover: #2a2a2a;
    --glass-shine: #1a1a1a;


    --text-primary: #f0f0f2;
    --text-secondary: #9898a0;
    --text-tertiary: #6b6b75;
    --text-muted: #5c5c66;

    --green: #22c55e;
    --green-light: #4ade80;
    --green-bg: rgba(34, 197, 94, 0.1);
    --green-border: rgba(34, 197, 94, 0.25);
    --green-glow: rgba(34, 197, 94, 0.5);

    --red: #ef4444;
    --red-light: #f87171;
    --red-muted: rgba(239, 68, 68, 0.6);
    --red-bg: rgba(239, 68, 68, 0.1);
    --red-border: rgba(239, 68, 68, 0.25);
    --red-glow: rgba(239, 68, 68, 0.5);

    --warn: #f59e0b;
    --warn-light: #fbbf24;
    --info: #60a5fa;
    --info-light: #93c5fd;

    --accent-subtle: rgba(77, 171, 154, 0.08);
}

/* ============================================
   Light Theme — Component Overrides
   (variables are in tokens.css)
   ============================================ */
html.light #dashboard-wrapper {
    border: 1px solid var(--glass-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 20px 40px -20px rgba(0, 0, 0, 0.1);
}

html.light #dashboard-wrapper::before {
    background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(77, 171, 154, 0.04), transparent);
}

html.light #dashboard-wrapper .dashboard-header {
    background: rgba(255, 255, 255, 0.8);
}

html.light #dashboard-wrapper .apexcharts-tooltip {
    background: rgba(255, 255, 255, 0.98) !important;
}

html.light #dashboard-wrapper .apexcharts-gridlines-horizontal line,
html.light #dashboard-wrapper .apexcharts-gridlines-vertical line {
    stroke: rgba(0, 0, 0, 0.06) !important;
}

/* Toast always stays dark */

/* Light mode - Stat Cards */
html.light #dashboard-wrapper .stat-card {
    background: var(--glass-bg);
    border-color: var(--glass-border);
}

html.light #dashboard-wrapper .stat-card:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
}

html.light #dashboard-wrapper .stat-card.stat-primary {
    background: linear-gradient(135deg, rgba(77, 171, 154, 0.08), rgba(91, 196, 176, 0.03));
    border-color: rgba(77, 171, 154, 0.2);
}

/* Light mode - Chart Containers */
html.light #dashboard-wrapper .chart-container {
    background: var(--glass-bg);
    border-color: var(--glass-border);
}

html.light #dashboard-wrapper .chart-container:hover {
    border-color: var(--glass-border-hover);
}

html.light #dashboard-wrapper .chart-container.chart-hero {
    background: linear-gradient(180deg, rgba(77, 171, 154, 0.05) 0%, var(--glass-bg) 100%);
    border-color: rgba(77, 171, 154, 0.15);
}

/* Light mode - Heatmap Calendar */
html.light #dashboard-wrapper .heatmap-cell {
    background: rgba(0, 0, 0, 0.02);
    border-color: transparent;
}

html.light #dashboard-wrapper .cell-profit {
    background: rgba(34, 197, 94, 0.12);
}

html.light #dashboard-wrapper .cell-profit:hover {
    background: rgba(34, 197, 94, 0.18);
    border-color: rgba(34, 197, 94, 0.3);
}

html.light #dashboard-wrapper .cell-loss {
    background: rgba(239, 68, 68, 0.12);
}

html.light #dashboard-wrapper .cell-loss:hover {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.3);
}

/* Light mode - Month Selector */
html.light #dashboard-wrapper #month-selector {
    background-color: var(--bg-elevated);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2352525b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

html.light #dashboard-wrapper #month-selector:hover {
    border-color: var(--glass-border-hover);
    background-color: var(--bg-secondary);
}

html.light #dashboard-wrapper #month-selector:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(77, 171, 154, 0.1);
}

html.light #dashboard-wrapper #month-selector option {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

/* Light mode - Float Buttons */
html.light #dashboard-wrapper .float-btn {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(15, 23, 42, 0.10);
    color: var(--text-secondary);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06), inset 0 1px 0 rgba(255,255,255,0.75);
}

html.light #dashboard-wrapper .float-btn:hover {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.16);
    color: var(--text-primary);
}

/* Light mode - Section Dividers */
html.light .section-divider::before,
html.light .section-divider::after {
    background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
}

html.light .section-divider span {
    color: var(--text-tertiary);
}

/* Light mode - Copy Widget Button */
html.light .copy-widget-btn {
    background: var(--bg-elevated);
    border-color: var(--glass-border);
    color: var(--text-secondary);
}

html.light .copy-widget-btn:hover {
    background: var(--glass-bg-hover);
    color: var(--accent);
    border-color: rgba(77, 171, 154, 0.3);
}

html.light .consistency-map-stat {
    background: rgba(255,255,255,0.76);
    border-color: rgba(0,0,0,0.06);
}

html.light .consistency-map-cell {
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(15, 23, 42, 0.05);
}

html.light .consistency-map-cell.neutral.level-1,
html.light .consistency-map-cell.neutral.level-2,
html.light .consistency-map-cell.neutral.level-3,
html.light .consistency-map-cell.neutral.level-4 {
    background: rgba(15, 23, 42, 0.08);
    border-color: rgba(15, 23, 42, 0.08);
}

html.light .consistency-map-legend-chip {
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(15, 23, 42, 0.05);
}

html.light .consistency-map-tooltip {
    background: rgba(255, 255, 255, 0.985);
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.12);
}

html.light .consistency-map-scroll {
    scrollbar-color: rgba(15, 23, 42, 0.16) transparent;
}

html.light .consistency-map-scroll::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.16);
}

html.light .consistency-map-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(15, 23, 42, 0.24);
}

html.light .consistency-map-tooltip-badge.neutral,
html.light .consistency-map-tooltip-badge.today,
html.light .consistency-map-tooltip-badge.current-week {
    background: rgba(15, 23, 42, 0.045);
    border-color: rgba(15, 23, 42, 0.08);
}

/* Light mode - Chart Type Toggle */
html.light .chart-toggle-btn {
    color: var(--text-tertiary);
    background: transparent;
}

html.light .chart-toggle-btn:hover {
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.03);
}

html.light .chart-toggle-btn.active {
    color: var(--text-primary);
    background: var(--bg-elevated);
    border: 1px solid var(--glass-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

html.light .chart-mode-bar {
    background: var(--bg-elevated);
    border-color: var(--glass-border);
}

html.light .chart-mode-toggle-btn.active {
    background: rgba(77, 171, 154, 0.1);
    border-color: rgba(77, 171, 154, 0.3);
    color: var(--accent);
    box-shadow: none;
}

/* Light mode - Header Toggle */
html.light #dashboard-wrapper .chart-header .header-toggle {
    background: transparent;
    border: none;
}

html.light #dashboard-wrapper .chart-header .toggle-btn {
    color: var(--text-tertiary);
    background: transparent;
}

html.light #dashboard-wrapper .chart-header .toggle-btn:hover {
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.03);
}

html.light #dashboard-wrapper .chart-header .toggle-btn.active {
    color: var(--text-primary);
    background: var(--bg-elevated);
    border: 1px solid var(--glass-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

html.light #dashboard-wrapper .chart-header .toggle-btn.active[data-mode="worst"] {
    color: var(--text-primary);
    background: var(--bg-elevated);
    border: 1px solid var(--glass-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Light mode - Welcome Bridge */

/* Light mode - Shared Rows */
html.light .setup-row,
html.light .symbol-row,
html.light .session-item,
html.light .session-label-item {
    background: var(--bg-elevated);
    border-color: var(--glass-border);
}

html.light .setup-row.positive::before {
    background: var(--accent);
}

html.light .setup-row.negative::before {
    background: var(--red);
}

html.light .setup-row:hover,
html.light .symbol-row:hover,
html.light .session-item:hover,
html.light .session-label-item:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
}

/* Light mode - Winrate Bar */
html.light .winrate-bar {
    background: rgba(0, 0, 0, 0.06);
}

/* Light mode - Quality Bar */
html.light .quality-bar {
    background: rgba(0, 0, 0, 0.06);
}

/* Light mode - Mindset Bars */
html.light .mindset-bars-track {
    background: rgba(0, 0, 0, 0.04);
}

/* Light mode - Commission Tracker */
html.light .comm-stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

html.light .comm-main {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.08) 0%, rgba(217, 119, 6, 0.02) 100%);
    border-color: rgba(217, 119, 6, 0.2);
}

html.light .comm-main-value {
    color: #d97706;
    text-shadow: none;
}

html.light .comm-stat-label {
    color: var(--text-tertiary);
}

html.light .comm-stat-value {
    color: var(--text-primary);
}

html.light .comm-stat-value.accent {
    color: var(--accent);
}

/* Light mode - R-Distribution Bars */
html.light .rdist-bar.positive {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.25);
}

html.light .rdist-bar.negative {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.25);
}

html.light .rdist-bar.empty {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
}

/* Light mode - Weekday Bars */
html.light .weekday-bar-track {
    background: rgba(0, 0, 0, 0.04);
}

/* Action bar always stays dark (outside dashboard-wrapper) */

/* Modals always stay dark (outside dashboard-wrapper) */

/* Light mode - Scrollbars */
html.light #dashboard-wrapper::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

html.light #dashboard-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-secondary) 100%);
}

/* Light mode - Pills */
html.light .pill {
    background: var(--bg-elevated);
    border-color: var(--glass-border);
    color: var(--text-secondary);
}

html.light .pill:hover {
    background: var(--glass-bg-hover);
    color: var(--text-primary);
}

html.light .pill.active {
    background: rgba(77, 171, 154, 0.1);
    border-color: rgba(77, 171, 154, 0.3);
    color: var(--accent);
}

/* Light mode - Override Tailwind text colors */
html.light .text-white {
    color: var(--text-primary) !important;
}

html.light .text-gray-300 {
    color: var(--text-secondary) !important;
}

html.light .text-zinc-400,
html.light .text-zinc-500 {
    color: var(--text-tertiary) !important;
}

html.light .text-zinc-600 {
    color: var(--text-muted) !important;
}

/* Light mode - Override Tailwind background/border colors */
html.light .bg-white\/5 {
    background: var(--glass-bg) !important;
}

html.light .bg-white\/10 {
    background: var(--glass-bg-hover) !important;
}

html.light .border-white\/5,
html.light .border-white\/10 {
    border-color: var(--glass-border) !important;
}

html.light .hover\:bg-white\/10:hover {
    background: var(--glass-bg-hover) !important;
}

/* Light mode - Main text color */
html.light main {
    color: var(--text-primary);
}

/* Light mode - Database not connected banner */
html.light .bg-gradient-to-br.from-\[\#4DAB9A\]\/10 {
    background: linear-gradient(to bottom right, rgba(77, 171, 154, 0.08), rgba(91, 196, 176, 0.03)) !important;
    border-color: rgba(77, 171, 154, 0.15) !important;
}

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

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .demo-banner-content {
        padding: 10px 14px;
        gap: 10px;
        justify-content: flex-start;
    }

    .demo-banner-icon {
        display: none;
    }

    .demo-banner-text {
        flex: 1 1 100%;
        font-size: 13px;
        line-height: 1.45;
    }

    .demo-banner-cta {
        min-height: 38px;
        padding: 0 14px;
        font-size: 12px;
        margin-left: 0;
    }

    .demo-float-cta {
        display: none;
    }

    .dashboard-upgrade-overlay {
        left: 16px;
        right: 16px;
        bottom: 16px;
        transform: none;
        padding: 14px 16px;
        gap: 12px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .dashboard-upgrade-copy {
        width: 100%;
        text-align: center;
    }

    #dashboard-wrapper {
        border-radius: var(--radius-lg);
    }

    .dashboard-content {
        padding: var(--space-4);
        gap: var(--space-4);
    }

    #dashboard-wrapper .stat-card {
        padding: var(--space-3) var(--space-4);
        min-height: 100px;
    }

    .stat-label {
        font-size: 11px;
    }

    .stat-value {
        font-size: 1.25rem;
    }

    #dashboard-wrapper .chart-container {
        padding: var(--space-4);
        border-radius: var(--radius-lg);
    }
    body.embed-mode #dashboard-wrapper .chart-container,
    #dashboard-wrapper.widget-mode .chart-container {
        max-height: none;
    }

    #dashboard-wrapper .heatmap-cell {
        min-height: 32px;
        padding: 3px 4px;
    }

    #dashboard-wrapper .heatmap-cell-pnl {
        font-size: 9px;
    }

    .section-divider {
        margin: var(--space-1) 0;
    }

    /* Compact chart controls on mobile */
    .chart-type-toggle {
        gap: 2px;
    }

    .chart-toggle-btn {
        padding: 0 6px;
        height: 24px;
        font-size: 11px;
        gap: 3px;
    }

    .chart-toggle-btn span {
        display: none;
    }

    .chart-toggle-divider {
        margin: 0 2px;
        height: 16px;
    }

    .chart-mode-bar {
        gap: 1px;
        padding: 1px;
    }

    .chart-mode-toggle-btn {
        min-width: 30px;
        padding: 0 6px;
    }

    /* Compact info/labels buttons */
    .chart-info-btn {
        width: 24px;
        height: 24px;
    }

    .chart-header-heatmap {
        align-items: flex-start;
        gap: 10px;
    }

    .chart-header-left-heatmap {
        flex-wrap: wrap;
        row-gap: 6px;
    }

    .consistency-map-header {
        flex-direction: column;
        align-items: stretch;
    }

    .consistency-map-header .chart-header-left {
        width: 100%;
    }

    .consistency-map-toggle {
        margin-top: 0;
    }

    .consistency-map-summary {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-left: 0;
    }

    .consistency-map-stat {
        min-width: 0;
        width: 100%;
    }

    .consistency-map-board {
        min-width: calc((var(--consistency-weeks) * 18px) + 42px);
    }

    .consistency-map-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============================================
   Embed Mode - Full Responsive + Stylish Scroll
   ============================================ */
body.embed-mode {
    margin: 0 !important;
    padding: 0 !important;
    height: 100vh !important;
    overflow: hidden !important;
    border: none!important;
}
body.embed-mode .ambient-glow{
    display: none!important;
}

body.embed-mode main {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    height: 100vh !important;
    overflow: hidden !important;
}

body.embed-mode #dashboard-wrapper {
    margin: 0;
    height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: none;
}
body.embed-mode .widget-mode .dashboard-content {
    background: none;
    border: none;
}

/* ============================================
   Stylish Scrollbar for Embed
   ============================================ */
body.embed-mode #dashboard-wrapper::-webkit-scrollbar {
    width: 10px;
}

body.embed-mode #dashboard-wrapper::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-left: 1px solid var(--glass-border);
}

body.embed-mode #dashboard-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-secondary) 100%);
    border-radius: 5px;
    border: 2px solid var(--bg-secondary);
    transition: all 0.3s ease;
}

body.embed-mode #dashboard-wrapper::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--accent-secondary) 0%, var(--accent) 100%);
    box-shadow: 0 0 10px var(--accent-glow);
}

body.embed-mode #dashboard-wrapper::-webkit-scrollbar-thumb:active {
    background: var(--accent);
}

/* Firefox scrollbar */
body.embed-mode #dashboard-wrapper {
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--bg-secondary);
}

/* Smooth scroll behavior */
body.embed-mode #dashboard-wrapper {
    scroll-behavior: smooth;
}

/* ============================================
   Embed Compact Spacing
   ============================================ */
@media (min-width: 1024px) {
    body.embed-mode main {
        padding: 0 !important;
        height: 100vh !important;
    }

    body.embed-mode #dashboard-wrapper {
        height: 100vh;
        max-height: 100vh;
        border: none;
    }

    body.embed-mode .dashboard-content {
        padding: var(--space-4) var(--space-4);
        gap: var(--space-4);
    }
}

/* Embed: tighter spacing on small screens */
@media (max-width: 480px) {
    body.embed-mode .dashboard-content {
        padding: var(--space-3);
        gap: var(--space-3);
    }

    body.embed-mode .stat-label {
        font-size: 10px;
    }

    body.embed-mode .stat-value {
        font-size: 1.1rem;
    }

    body.embed-mode #dashboard-wrapper .chart-container {
        padding: var(--space-5);
    }

    body.embed-mode .section-divider span {
        font-size: 12px;
    }

    body.embed-mode #dashboard-wrapper::-webkit-scrollbar {
        width: 6px;
    }
}

/* Hide header actions in embed */
body.embed-mode .dashboard-header .header-actions {
    display: none;
}

/* Floating header in embed - appears on hover */
body.embed-mode .dashboard-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    padding: var(--space-3) var(--space-6);
    background: rgba(0, 0, 0, 1);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    border-radius: 0;
    opacity: 0;
    transform: translateY(-100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

body.embed-mode #dashboard-wrapper:hover .dashboard-header,
body.embed-mode .dashboard-header:hover,
body.embed-mode .dashboard-header.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Light theme embed header */
html.light body.embed-mode .dashboard-header {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

html.light .embed-mode #dashboard-wrapper .dashboard-header {
    background: rgba(255, 255, 255, 0.84);
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow:
        0 12px 30px rgba(15, 23, 42, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

html.light .embed-mode #dashboard-wrapper .dashboard-header .sync-status {
    color: #0f766e;
    border-color: rgba(13, 148, 136, 0.18);
    background: rgba(13, 148, 136, 0.08);
}

html.light body.embed-mode .dashboard-header .float-btn {
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(15, 23, 42, 0.10);
    color: var(--text-secondary);
}

html.light body.embed-mode .dashboard-header .float-btn:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(15, 23, 42, 0.16);
    color: var(--text-primary);
}

/* Light theme embed wrapper */
html.light body.embed-mode #dashboard-wrapper {
    background: var(--bg-primary);
    border-color: var(--glass-border);
}
html.light body.embed-mode #dashboard-wrapper:has(.widget-section) {
    background: transparent;
    border-color: transparent;
}

/* ============================================
   Widget Mode - Standalone Section Embed
   ============================================ */
#dashboard-wrapper.widget-mode {
    margin: 12px;
    overflow: hidden;
    /* Scale up for better readability in embeds */
    font-size: 1.15em;
}

body.embed-mode #dashboard-wrapper.widget-mode {
    border: none;
}

#dashboard-wrapper.widget-mode .dashboard-content {
    padding: 0;
    gap: var(--space-5);
}

#dashboard-wrapper.widget-mode .widget-section {
    margin: 0;
}

#dashboard-wrapper.widget-mode .bento-grid-3 {
    gap: var(--space-5);
}

#dashboard-wrapper.widget-mode .chart-container {
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: var(--space-6);
}

#dashboard-wrapper.widget-mode .consistency-map-board {
    min-width: calc((var(--consistency-weeks) * 18px) + 42px);
}

#dashboard-wrapper.widget-mode .consistency-map-card {
    padding: 16px 18px 14px !important;
}

#dashboard-wrapper.widget-mode .consistency-map-subtitle {
    display: none;
}

#dashboard-wrapper.widget-mode .consistency-map-header {
    gap: 10px;
    margin-bottom: 6px !important;
}

#dashboard-wrapper.widget-mode .consistency-map-header .chart-header-left {
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
}

#dashboard-wrapper.widget-mode .consistency-map-toggle {
    margin-top: 0;
}

#dashboard-wrapper.widget-mode .consistency-map-summary {
    gap: 8px;
    width: auto;
    margin-left: auto;
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

#dashboard-wrapper.widget-mode .consistency-map-stat {
    min-width: 0;
    width: 100%;
    padding: 8px 10px;
}

#dashboard-wrapper.widget-mode .consistency-map-note {
    white-space: normal;
}

@media (max-width: 900px) {
    #dashboard-wrapper.widget-mode .consistency-map-header {
        flex-direction: column;
        align-items: stretch;
    }

    #dashboard-wrapper.widget-mode .consistency-map-header .chart-header-left {
        width: 100%;
    }

    #dashboard-wrapper.widget-mode .consistency-map-summary {
        width: 100%;
        margin-left: 0;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

#dashboard-wrapper.widget-mode .stat-value,
#dashboard-wrapper.widget-mode .font-mono {
    font-size: 1.15em;
}

/* Larger elements in widget mode */
#dashboard-wrapper.widget-mode .hourly-heatmap-cell {
    min-height: 32px;
}

#dashboard-wrapper.widget-mode .hourly-heatmap-day,
#dashboard-wrapper.widget-mode .hourly-heatmap-hour {
    font-size: 13px;
}

#dashboard-wrapper.widget-mode .overtrading-track {
    height: 12px;
}

#dashboard-wrapper.widget-mode .overtrading-label,
#dashboard-wrapper.widget-mode .overtrading-value {
    font-size: 16px;
}

#dashboard-wrapper.widget-mode .overtrading-message {
    font-size: 16px;
    padding: 16px 20px;
}

/* Light mode widget */
html.light #dashboard-wrapper.widget-mode {
    background: transparent;
    border-color: var(--glass-border);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}
#dashboard-wrapper,
#dashboard-wrapper .widget-mode {
    background: transparent!important;
}

html.light #dashboard-wrapper.widget-mode .chart-container {
    background: var(--glass-bg);
    border-color: var(--glass-border);
}

/* Widget responsive */
@media (max-width: 768px) {
    #dashboard-wrapper.widget-mode {
        margin: 6px;
        border-radius: 16px;
        font-size: 1.05em;
    }

    #dashboard-wrapper.widget-mode .dashboard-content {
        padding: 0;
        gap: var(--space-3);
    }

    #dashboard-wrapper.widget-mode .bento-grid-3 {
        grid-template-columns: 1fr;
    }
}
#dashboard-wrapper.widget-mode .rr-bars-container{
    padding: 0;
}

/* ============================================
   Hide on Screenshot
   ============================================ */
#dashboard-wrapper .hide-on-screenshot {
    transition: opacity var(--duration-fast) var(--ease-out);
}

body.capturing-mode #dashboard-wrapper .hide-on-screenshot {
    opacity: 0 !important;
    visibility: hidden !important;
}

/* ============================================
   Unified Tier Gate — PRO / EXPERT
   One system for all feature gating
   ============================================ */

/* Base gate container */
.tier-gate {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
}

/* Blur content behind gate */
.tier-gate > *:not(.tier-gate-overlay) {
    filter: blur(4px);
    pointer-events: none;
    user-select: none;
    opacity: 0.5;
}

/* PRO blur only - no individual overlays (one global overlay instead) */
.tier-gate.pro-blur-only > .tier-gate-overlay {
    display: none;
}

/* Overlay */
.tier-gate-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    background: rgba(10, 10, 11, 0.6);
    backdrop-filter: blur(2px);
    border-radius: inherit;
}

/* Tier badge — PRO (mint) */
.tier-gate-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(77, 171, 154, 0.15), rgba(77, 171, 154, 0.06));
    border: 1px solid rgba(77, 171, 154, 0.3);
    color: #4DAB9A;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

/* Tier badge — EXPERT (purple/indigo) */
.tier-gate-badge.expert {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(99, 102, 241, 0.06));
    border-color: rgba(99, 102, 241, 0.3);
    color: #818cf8;
}

.tier-gate-badge svg {
    width: 14px;
    height: 14px;
}

.tier-gate-title {
    color: #f0f0f2;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
}

.tier-gate-desc {
    color: #71717a;
    font-size: 13px;
    margin-bottom: 16px;
    text-align: center;
    max-width: 280px;
    line-height: 1.5;
}

/* CTA button — PRO */
.tier-gate-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(77, 171, 154, 0.15), rgba(77, 171, 154, 0.08));
    border: 1px solid rgba(77, 171, 154, 0.3);
    color: #4DAB9A;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

/* CTA button — EXPERT */
.tier-gate-btn.expert {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(99, 102, 241, 0.08));
    border-color: rgba(99, 102, 241, 0.3);
    color: #818cf8;
}

.tier-gate-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Small inline badge for section headers */
.tier-badge-inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(77, 171, 154, 0.15);
    color: #4DAB9A;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-left: 8px;
    vertical-align: middle;
}

.tier-badge-inline.expert {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
}

/* Legacy aliases — keep old classes working */
#dashboard-wrapper .pro-locked > *:not(.locked-overlay) {
    opacity: 0.4;
    filter: blur(6px);
}
#dashboard-wrapper .locked-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 11, 0.6);
    backdrop-filter: blur(2px);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
}

/* ============================================
   Entrance Animations
   ============================================ */

/* Shared entrance keyframe */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cellEnter {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Stat cards stagger */
#dashboard-wrapper .stat-card {
    animation: fadeUp 0.6s var(--ease-out) backwards;
}
#dashboard-wrapper .stat-card:nth-child(1) { animation-delay: 0.05s; }
#dashboard-wrapper .stat-card:nth-child(2) { animation-delay: 0.1s; }
#dashboard-wrapper .stat-card:nth-child(3) { animation-delay: 0.15s; }
#dashboard-wrapper .stat-card:nth-child(4) { animation-delay: 0.2s; }
#dashboard-wrapper .stat-card:nth-child(5) { animation-delay: 0.25s; }
#dashboard-wrapper .stat-card:nth-child(6) { animation-delay: 0.3s; }

/* Chart containers */
#dashboard-wrapper .chart-container {
    animation: fadeUp 0.7s var(--ease-out) 0.25s backwards;
}

/* Heatmap cells */
#dashboard-wrapper .heatmap-cell {
    animation: cellEnter 0.4s var(--ease-out) backwards;
}


/* ============================================
   Win Rate Bar Indicator
   ============================================ */
.winrate-bar {
    width: 90px;
    height: 4px;
    border-radius: 2px;
    display: flex;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--glass-border);
}

.winrate-bar-win {
    height: 100%;
    background: var(--green);
    transition: width 0.6s var(--ease-out);
}

.winrate-bar-loss {
    height: 100%;
    background: var(--red-muted, rgba(239, 68, 68, 0.6));
    transition: width 0.6s var(--ease-out);
}

/* ============================================
   Behavioral Metrics - Ranked List Style
   ============================================ */
.behavioral-metrics-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0;
    height: 100%;
    min-height: 220px;
}

.behavior-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 12px;
    border-radius: 10px;
    background: rgba(255,255,255,0.016);
    border: 1px solid rgba(255,255,255,0.04);
    transition: all 0.2s ease;
}

.behavior-item:hover {
    background: rgba(255,255,255,0.024);
    border-color: rgba(255,255,255,0.06);
}

.behavior-rank {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    width: 16px;
    text-align: center;
}

.behavior-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.04);
}

.behavior-icon svg {
    width: 12px;
    height: 12px;
}

.behavior-icon.icon-pf { background: rgba(34, 197, 94, 0.10); color: rgba(74, 222, 128, 0.9); }
.behavior-icon.icon-risk { background: rgba(239, 68, 68, 0.10); color: rgba(248, 113, 113, 0.92); }
.behavior-icon.icon-disc { background: rgba(96, 165, 250, 0.10); color: rgba(147, 197, 253, 0.9); }
.behavior-icon.icon-cons { background: rgba(168, 85, 247, 0.10); color: rgba(196, 181, 253, 0.9); }
.behavior-icon.icon-strat { background: rgba(245, 158, 11, 0.10); color: rgba(251, 191, 36, 0.92); }

.behavior-name {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

.behavior-trend {
    display: flex;
    align-items: center;
    gap: 3px;
}

.behavior-trend svg {
    width: 10px;
    height: 10px;
}

.behavior-trend.up { color: #22c55e; }
.behavior-trend.down { color: #ef4444; }
.behavior-trend.neutral { color: var(--text-muted); }

.behavior-change {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 600;
}

.behavior-score {
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 34px;
    text-align: right;
}

/* Behavioral items staggered animation */
.behavior-item {
    opacity: 0;
    animation: behaviorFadeIn 0.3s ease forwards;
}

.behavior-item:nth-child(1) { animation-delay: 0.05s; }
.behavior-item:nth-child(2) { animation-delay: 0.1s; }
.behavior-item:nth-child(3) { animation-delay: 0.15s; }
.behavior-item:nth-child(4) { animation-delay: 0.2s; }
.behavior-item:nth-child(5) { animation-delay: 0.25s; }

@keyframes behaviorFadeIn {
    from {
        opacity: 0;
        transform: translateX(-8px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Light theme adjustments */
html.light .behavior-item {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0,0,0,0.05);
}

html.light .behavior-item:hover {
    background: rgba(0, 0, 0, 0.035);
    border-color: rgba(0,0,0,0.07);
}

/* ============================================
   Recent Trades - Compact List
   ============================================ */
.recent-trades-container {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 0;
    max-height: 220px;
    overflow-y: auto;
}

.recent-trade-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background 0.15s ease;
}

.recent-trade-row:hover {
    background: var(--glass-bg-hover);
}

.trade-date {
    font-size: 12px;
    color: var(--text-muted);
    min-width: 70px;
    font-family: 'JetBrains Mono', monospace;
}

.trade-pair {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 80px;
}

.trade-side {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 3px;
    min-width: 42px;
    text-align: center;
}

.trade-side.long {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.trade-side.short {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.trade-rr {
    font-size: 12px;
    color: var(--text-muted);
    min-width: 40px;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
}

.trade-pnl {
    font-size: 14px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    min-width: 80px;
    text-align: right;
    margin-left: auto;
}

.trade-pnl.positive {
    color: #22c55e;
}

.trade-pnl.negative {
    color: #ef4444;
}

.recent-trades-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    font-size: 14px;
}

/* Light theme */
html.light .trade-side.long {
    background: rgba(34, 197, 94, 0.12);
}

html.light .trade-side.short {
    background: rgba(239, 68, 68, 0.12);
}

/* ============================================
   Trade Quality - Breakdown Bar Style
   ============================================ */
.trade-quality-container {
    display: flex;
    flex-direction: column;
    height: 86%;
    min-height: 220px;
    padding: 0;
    justify-content: space-between;
}

.quality-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.quality-score-stack {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-shrink: 0;
}

.quality-summary {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 320px;
    padding-top: 4px;
}

.quality-score {
    font-family: 'JetBrains Mono', monospace;
    font-size: 40px;
    font-weight: 800;
    color: var(--text-primary);
    text-shadow: none;
    transition: color 0.3s ease;
}

.quality-score.score-high {
    color: var(--green, #22c55e);
}

.quality-score.score-mid {
    color: #f59e0b;
}

.quality-score.score-low {
    color: var(--red, #ef4444);
}

.quality-score-label {
    font-size: 15px;
    color: var(--text-muted);
}

.quality-verdict {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.quality-verdict.is-high {
    color: var(--green);
}

.quality-verdict.is-mid {
    color: #f59e0b;
}

.quality-verdict.is-low {
    color: var(--red);
}

.quality-insight {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.quality-bar {
    display: flex;
    gap: 4px;
    height: 12px;
    border-radius: 999px;
    overflow: hidden;
    margin: 10px 0 6px;
    padding: 0;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.045);
}

.quality-seg {
    height: 100%;
    border-radius: 999px;
    transition: flex 0.5s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.quality-seg-rr {
    background: linear-gradient(90deg, rgba(77,171,154,0.92), rgba(91,196,176,0.92));
}

.quality-seg-wr {
    background: linear-gradient(90deg, rgba(96,165,250,0.88), rgba(147,197,253,0.88));
}

.quality-seg-1r {
    background: linear-gradient(90deg, rgba(34,197,94,0.88), rgba(74,222,128,0.88));
}

.quality-legend {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

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

.quality-dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    flex-shrink: 0;
}

.quality-dot.dot-rr { background: #5BC4B0; }
.quality-dot.dot-wr { background: #93c5fd; }
.quality-dot.dot-1r { background: #4ade80; }

.quality-legend-label {
    font-size: 13px;
    color: var(--text-secondary);
    flex: 1;
}

.quality-legend-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 42px;
    text-align: right;
}

/* Mini progress bars next to legend values */
.quality-legend-bar {
    width: 60px;
    height: 4px;
    border-radius: 2px;
    background: var(--glass-border, rgba(255,255,255,0.06));
    overflow: hidden;
    flex-shrink: 0;
}

.quality-legend-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s ease-out;
}

.quality-legend-bar-fill.fill-rr { background: #5BC4B0; }
.quality-legend-bar-fill.fill-wr { background: #93c5fd; }
.quality-legend-bar-fill.fill-1r { background: #4ade80; }

@media (max-width: 900px) {
    .quality-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .quality-summary {
        max-width: none;
        padding-top: 0;
    }
}

/* ============================================
   Trading Pulse — Real Trade Bars
   ============================================ */
.pulse-container {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
    padding: 0;
    gap: 8px;
    margin-top: -4px;
}

.pulse-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-shrink: 0;
}

.pulse-state-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pulse-state {
    font-size: 17px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pulse-reason {
    font-size: 14px;
    color: var(--text-muted, #5c5c66);
    font-weight: 500;
    letter-spacing: 0.01em;
}

.pulse-pnl {
    font-family: 'JetBrains Mono', monospace;
    font-size: 24px;
    font-weight: 800;
}

.pulse-pnl.positive { color: var(--green, #22c55e); }
.pulse-pnl.negative { color: var(--red, #ef4444); }

/* Bars track */
.pulse-bars-track {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 132px;
    min-height: 132px;
    padding: 0 2px 2px;
    flex: 0 0 132px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* Individual trade bar */
.pulse-bar {
    flex: 1;
    min-width: 4px;
    max-width: 28px;
    border-radius: 4px 4px 1px 1px;
    animation: pulseBarGrow 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    position: relative;
}

@keyframes pulseBarGrow {
    from { height: 0 !important; opacity: 0; }
    to { opacity: 1; }
}

.pulse-bar.pulse-win {
    background: linear-gradient(to top, rgba(34, 197, 94, 0.42), rgba(34, 197, 94, 0.78));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.pulse-bar.pulse-loss {
    background: linear-gradient(to top, rgba(239, 68, 68, 0.36), rgba(239, 68, 68, 0.70));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

/* Glow tip on top of winning bars */
.pulse-bar.pulse-win::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255,255,255,0.22);
    border-radius: 3px 3px 0 0;
    box-shadow: none;
}

.pulse-bar.pulse-loss::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255,255,255,0.18);
    border-radius: 3px 3px 0 0;
    box-shadow: none;
}

/* Stats row */
.pulse-stats {
    display: flex;
    justify-content: space-between;
    padding: 4px 0 0;
    flex-shrink: 0;
}

.pulse-stat {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary, #8b8b96);
    font-family: 'JetBrains Mono', monospace;
}

/* Extremes row */
.pulse-extremes {
    display: flex;
    justify-content: space-between;
    padding: 2px 0 0;
    flex-shrink: 0;
}

.pulse-extreme {
    font-size: 12px;
    color: var(--text-muted, #5c5c66);
    display: flex;
    gap: 4px;
    align-items: center;
}

.pulse-extreme-label {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.04em;
    opacity: 0.7;
}

.pulse-extreme-sym {
    opacity: 0.6;
    font-size: 11px;
}

/* State color variations */
#mindset-card.zen .pulse-state { color: var(--green, #22c55e); }
#mindset-card.flow .pulse-state { color: var(--accent, #6dd4c8); }
#mindset-card.alert .pulse-state { color: #f59e0b; }
#mindset-card.tilt .pulse-state { color: var(--red, #ef4444); }

/* Ambient glow behind bars based on state */
#mindset-card.zen .pulse-bars-track {
    background: none;
}

#mindset-card.flow .pulse-bars-track {
    background: none;
}

#mindset-card.alert .pulse-bars-track {
    background: none;
}

#mindset-card.tilt .pulse-bars-track {
    background: none;
}

/* ============================================
   P/L Card Background States
   ============================================ */
#dashboard-wrapper .stat-card.stat-positive {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.08) 0%, rgba(34, 197, 94, 0.02) 100%);
    border-color: rgba(34, 197, 94, 0.2);
}

#dashboard-wrapper .stat-card.stat-positive::after {
    background: linear-gradient(90deg, var(--green), var(--green-light));
    width: 100%;
}

#dashboard-wrapper .stat-card.stat-negative {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(239, 68, 68, 0.02) 100%);
    border-color: rgba(239, 68, 68, 0.2);
}

#dashboard-wrapper .stat-card.stat-negative::after {
    background: linear-gradient(90deg, var(--red), var(--red-light));
    width: 100%;
}

#dashboard-wrapper .stat-card.stat-positive:hover {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.12) 0%, rgba(34, 197, 94, 0.04) 100%);
    border-color: rgba(34, 197, 94, 0.3);
}

#dashboard-wrapper .stat-card.stat-negative:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, rgba(239, 68, 68, 0.04) 100%);
    border-color: rgba(239, 68, 68, 0.3);
}



/* ============================================
   Mindset Card Background States
   ============================================ */
#dashboard-wrapper #mindset-card {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

#dashboard-wrapper #mindset-card.zen::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #22c55e, #4ade80);
    width: 100%;
    border-radius: 0 0 12px 12px;
    opacity: 0.3;
}

#dashboard-wrapper #mindset-card.flow::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #60a5fa, #93c5fd);
    width: 100%;
    border-radius: 0 0 12px 12px;
    opacity: 0.3;
}
#dashboard-wrapper #mindset-card.alert::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    width: 100%;
    border-radius: 0 0 12px 12px;
    opacity: 0.3;
}

#dashboard-wrapper #mindset-card.tilt::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #ef4444, #f87171);
    width: 100%;
    border-radius: 0 0 12px 12px;
    opacity: 0.3;
}

/* Hover effects */
#dashboard-wrapper #mindset-card.zen:hover {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.12) 0%, rgba(34, 197, 94, 0.04) 100%);
    border-color: rgba(34, 197, 94, 0.3);
}

#dashboard-wrapper #mindset-card.flow:hover {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.1) 0%, rgba(96, 165, 250, 0.02) 100%);
    border-color: rgba(96, 165, 250, 0.3); 
}

#dashboard-wrapper #mindset-card.alert:hover {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(245, 158, 11, 0.04) 100%);
    border-color: rgba(245, 158, 11, 0.3);
}

#dashboard-wrapper #mindset-card.tilt:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, rgba(239, 68, 68, 0.04) 100%);
    border-color: rgba(239, 68, 68, 0.3);
}

/* ============================================
   Privacy Mode - Hide Values
   ============================================ */

/* Hide Y-axis labels on charts (dollar amounts) */
#dashboard-wrapper.privacy-mode .apexcharts-yaxis-label {
    visibility: hidden;
}

/* Hide data labels and tooltips */
#dashboard-wrapper.privacy-mode .apexcharts-data-labels,
#dashboard-wrapper.privacy-mode .apexcharts-tooltip,
#dashboard-wrapper.privacy-mode .apexcharts-datalabel {
    visibility: hidden;
}

/* Hide custom Apex point annotations on equity chart */
#dashboard-wrapper.privacy-mode #chart-equity .apexcharts-yaxis-annotations,
#dashboard-wrapper.privacy-mode #chart-equity .apexcharts-yaxis-annotation-label,
#dashboard-wrapper.privacy-mode #chart-equity .apexcharts-yaxis-annotation-label text,
#dashboard-wrapper.privacy-mode #chart-equity .apexcharts-yaxis-annotation-label rect,
#dashboard-wrapper.privacy-mode #chart-equity .apexcharts-point-annotations,
#dashboard-wrapper.privacy-mode #chart-equity .apexcharts-point-annotation-label,
#dashboard-wrapper.privacy-mode #chart-equity .apexcharts-point-annotation-label text,
#dashboard-wrapper.privacy-mode #chart-equity .apexcharts-point-annotation-label rect {
    display: none !important;
}

/* Masked values get special styling */
#dashboard-wrapper.privacy-mode .privacy-value {
    font-family: monospace;
    letter-spacing: 1px;
}

/* ============================================
   Share Modal & Card
   ============================================ */

.share-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.share-modal-backdrop.hidden {
    display: none;
}

.share-modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 24px;
    max-width: 486px;
    width: 100%;
    position: relative;
    animation: slideUp 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

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

.share-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.share-modal-close:hover {
    background: var(--glass-bg-hover);
    color: var(--text-primary);
}

.share-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    padding-right: 44px;
}

.share-modal-title-icon {
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
}

.share-modal-loading,
.profile-state-panel {
    text-align: center;
    padding: 12px 4px 4px;
}

.share-modal-loading-copy,
.profile-help-copy,
.profile-muted-copy,
.profile-footer-copy {
    color: var(--text-secondary);
}

.share-modal-loading-copy {
    margin-top: 12px;
}

.profile-state-icon,
.profile-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: #000;
    background: linear-gradient(135deg, #f97316, #f59e0b);
}

.profile-state-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
}

.profile-state-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.profile-help-copy {
    font-size: 14px;
    margin-bottom: 20px;
}

.profile-display-name-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 12px;
}

.profile-enable-btn {
    width: 100%;
    justify-content: center;
    padding: 14px;
}

#profile-enabled {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#profile-enabled.hidden {
    display: none;
}

.profile-summary {
    text-align: center;
    margin-bottom: 6px;
}

.profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 12px;
}

.profile-display-name {
    font-size: 16px;
    font-weight: 600;
}

.profile-muted-copy {
    font-size: 14px;
}

.profile-link-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px;
}

.profile-link-card + .profile-link-card {
    margin-top: 0;
}

.profile-link-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 8px;
}

.profile-link-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.profile-link-input {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 13px;
    font-family: monospace;
}

.profile-link-copy-btn {
    padding: 10px 16px;
    min-width: 56px;
}

.share-modal-actions.actions-centered {
    justify-content: center;
}

.share-btn.profile-view-btn {
    background: var(--bg-tertiary);
}

.profile-footer-copy {
    text-align: center;
    font-size: 12px;
    margin-top: 0;
}

.profile-state-icon i {
    color: #000;
}

/* Style selector */
.share-style-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.share-style-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.share-style-btn:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
}

.share-style-btn.active {
    background: rgba(77, 171, 154, 0.1);
    border-color: rgba(77, 171, 154, 0.3);
    color: var(--accent);
}

/* Modal actions */
.share-modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 2px;
}

.share-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.share-btn-copy {
    background: var(--accent);
    color: #000;
}

.share-btn-copy:hover {
    background: var(--accent-secondary);
}

.share-btn-download {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.share-btn-download:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
}

.share-btn-twitter {
    background: #fff;
    color: #000;
}

.share-btn-twitter:hover {
    background: #e5e5e5;
}

.share-modal-hint {
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 16px;
}

/* ============================================
   Dashboard Overlay CTA
   ============================================ */
.dashboard-upgrade-overlay {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 32px;
    background: rgba(15, 15, 17, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(77, 171, 154, 0.3);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.dashboard-upgrade-copy {
    color: #f0f0f2;
    font-size: 14px;
}

.dashboard-upgrade-copy strong {
    color: #4DAB9A;
    font-weight: 600;
}

.dashboard-upgrade-btn {
    padding: 10px 20px;
    font-size: 13px;
    white-space: nowrap;
}

.dashboard-upgrade-dismiss {
    background: none;
    border: none;
    color: #71717a;
    cursor: pointer;
    padding: 4px;
}

.dashboard-upgrade-dismiss:hover {
    color: var(--text-primary);
}

/* ============================================
   Revenge Trading Detector
   ============================================ */

#revenge-detector {
    overflow: visible;
}

#tilt-meter-container,
#revenge-detector,
#time-between-container {
    display: flex;
    flex-direction: column;
    min-height: 340px;
    height: 100%;
}

#tilt-meter-container .chart-header,
#revenge-detector .chart-header,
#time-between-container .chart-header {
    flex-shrink: 0;
}

.revenge-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 220px;
    padding: 0;
    gap: 10px;
}

.revenge-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 220px;
    color: var(--text-muted);
    font-size: 14px;
}

.revenge-stat-big {
    text-align: center;
    padding: 16px 24px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(239, 68, 68, 0.02) 100%);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}

.revenge-stat-big.clean {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.08) 0%, rgba(34, 197, 94, 0.02) 100%);
    border-color: rgba(34, 197, 94, 0.2);
}

.revenge-stat-big::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 2px;
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.8), rgba(239, 68, 68, 0.2));
    border-radius: 2px;
}

.revenge-stat-big.clean::after {
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.8), rgba(34, 197, 94, 0.2));
}

.revenge-stat-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.revenge-stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 28px;
    font-weight: 700;
    color: var(--red);
}

.revenge-stat-big.clean .revenge-stat-value {
    color: var(--green);
}

.revenge-stat-pct {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.revenge-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.revenge-col {
    text-align: center;
    padding: 10px 8px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
}

.revenge-col-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 6px;
}

.revenge-col-stat {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.revenge-col-sub {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-tertiary);
}

.revenge-impact {
    text-align: center;
    padding: 8px 0 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--red);
}

.revenge-impact.positive {
    color: var(--green);
}

/* ============================================
   TILT METER
   ============================================ */
#tilt-meter-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    height: 100%;
    min-height: 220px;
    margin-top:4px;
}
#tilt-meter-content.chart-empty{
    justify-content: center!important;
}

.time-between-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 220px;
    padding: 0;
    gap: 10px;
}

.time-between-panel {
    padding: 10px 12px 8px;
    background: linear-gradient(135deg, rgba(77, 171, 154, 0.08) 0%, rgba(77, 171, 154, 0.025) 100%);
    border: 1px solid rgba(77, 171, 154, 0.18);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: visible;
}

.time-between-panel::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 2px;
    background: linear-gradient(90deg, rgba(77, 171, 154, 0.82), rgba(77, 171, 154, 0.18));
    border-radius: 2px;
}

.time-between-canvas {
    position: relative;
    z-index: 2;
    height: 176px;
    margin: 0 -8px -4px -8px;
}

.time-between-canvas .apexcharts-tooltip {
    z-index: 30 !important;
}

.time-between-summary .revenge-col-stat {
    color: var(--text-primary);
}

.time-between-note {
    text-align: center;
    padding: 8px 0 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--accent-light);
}

.tilt-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 220px;
    color: var(--text-muted);
    font-size: 14px;
}

.tilt-status {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
}

.tilt-gauge {
    display: flex;
    gap: 6px;
    width: 100%;
}

.tilt-gauge-segment {
    flex: 1;
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    transition: background 0.4s ease;
}

.tilt-gauge-segment.active-calm { background: var(--green); }
.tilt-gauge-segment.active-cautious { background: var(--accent); }
.tilt-gauge-segment.active-warning { background: #f59e0b; }
.tilt-gauge-segment.active-tilt { background: var(--red); }

.tilt-level {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 14px 16px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
    background: var(--bg-surface);
}

.tilt-level::after {
    content: '';
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 0;
    height: 2px;
    border-radius: 2px;
}

.tilt-level.level-calm {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), rgba(34, 197, 94, 0.025));
    border-color: rgba(34, 197, 94, 0.18);
}

.tilt-level.level-calm::after {
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.82), rgba(34, 197, 94, 0.18));
}

.tilt-level.level-cautious {
    background: linear-gradient(135deg, rgba(77, 171, 154, 0.08), rgba(77, 171, 154, 0.025));
    border-color: rgba(77, 171, 154, 0.18);
}

.tilt-level.level-cautious::after {
    background: linear-gradient(90deg, rgba(77, 171, 154, 0.82), rgba(77, 171, 154, 0.18));
}

.tilt-level.level-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.085), rgba(245, 158, 11, 0.025));
    border-color: rgba(245, 158, 11, 0.18);
}

.tilt-level.level-warning::after {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.82), rgba(245, 158, 11, 0.18));
}

.tilt-level.level-tilt {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.11), rgba(239, 68, 68, 0.03));
    border-color: rgba(239, 68, 68, 0.2);
}

.tilt-level.level-tilt::after {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.82), rgba(239, 68, 68, 0.18));
}

.tilt-level-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.tilt-level-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

.tilt-level-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.tilt-level-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.035);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    white-space: nowrap;
}

.tilt-level-note {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.55;
    color: var(--text-secondary);
}

.tilt-level.level-calm .tilt-level-text,
.tilt-level.level-calm .tilt-level-badge {
    color: var(--green);
}

.tilt-level.level-cautious .tilt-level-text,
.tilt-level.level-cautious .tilt-level-badge {
    color: var(--accent-light);
}

.tilt-level.level-warning .tilt-level-text,
.tilt-level.level-warning .tilt-level-badge {
    color: #f59e0b;
}

.tilt-level.level-tilt .tilt-level-text,
.tilt-level.level-tilt .tilt-level-badge {
    color: var(--red);
}

.tilt-level.level-calm .tilt-level-badge {
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.16);
}

.tilt-level.level-cautious .tilt-level-badge {
    background: rgba(77, 171, 154, 0.08);
    border-color: rgba(77, 171, 154, 0.16);
}

.tilt-level.level-warning .tilt-level-badge {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.16);
}

.tilt-level.level-tilt .tilt-level-badge {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.16);
}

.tilt-factors {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.tilt-footer {
    margin-top: 4px;
    padding-top: 8px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
    color: var(--text-secondary);
}

.tilt-footer.positive {
    color: var(--green);
}

.tilt-footer.warning {
    color: #f59e0b;
}

.tilt-footer.bad {
    color: var(--red);
}

.tilt-factor {
    text-align: center;
    padding: 10px 8px;
    border-radius: var(--radius-lg);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
}

.tilt-factor-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.1;
}

.tilt-factor-value.bad { color: var(--red); }
.tilt-factor-value.positive { color: var(--green); }

.tilt-factor-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}

.tilt-factor-sub {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 4px;
}

html.light .tilt-gauge-segment {
    background: rgba(0, 0, 0, 0.06);
}

html.light .tilt-factor,
html.light .tilt-level {
    background: var(--bg-elevated);
}

html.light .tilt-level-badge {
    background: rgba(0, 0, 0, 0.025);
    border-color: rgba(0, 0, 0, 0.08);
}

.time-between-canvas .apexcharts-bar-area{
    stroke: none !important;
}
.time-between-canvas .apexcharts-series path {
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.16));
}
.time-between-canvas .apexcharts-data-label {
    letter-spacing: 0.01em;
}
.time-between-canvas .apexcharts-selection-rect,
.time-between-canvas .apexcharts-zoom-rect{
    display: none !important;
}

/* ============================================
   Legacy Gate Aliases — map to unified .tier-gate
   ============================================ */
.pro-gate { position: relative; overflow: hidden; border-radius: var(--radius-md); }
.pro-gate > *:not(.pro-gate-overlay) { filter: blur(4px); pointer-events: none; user-select: none; opacity: 0.5; }
.pro-gate-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 10; background: rgba(10,10,11,0.6); backdrop-filter: blur(2px); border-radius: inherit; }
.pro-gate-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 20px; background: linear-gradient(135deg, rgba(77,171,154,0.15), rgba(77,171,154,0.06)); border: 1px solid rgba(77,171,154,0.3); color: #4DAB9A; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 12px; }
.pro-gate-badge svg { width: 14px; height: 14px; }
.pro-gate-title { color: #f0f0f2; font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.pro-gate-desc { color: #71717a; font-size: 13px; margin-bottom: 16px; text-align: center; max-width: 280px; }
.pro-gate-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 24px; border-radius: 12px; background: linear-gradient(135deg, rgba(77,171,154,0.15), rgba(77,171,154,0.08)); border: 1px solid rgba(77,171,154,0.3); color: #4DAB9A; font-size: 13px; font-weight: 600; text-decoration: none; transition: all 0.2s; cursor: pointer; }
.pro-gate-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.pro-badge-inline { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; background: rgba(77,171,154,0.15); color: #4DAB9A; font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin-left: 8px; vertical-align: middle; }
.expert-gate { position: relative; overflow: hidden; }
.expert-gate > *:not(.pro-gate-overlay) { filter: blur(6px); pointer-events: none; user-select: none; opacity: 0.4; }
.expert-badge-inline { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; background: rgba(99,102,241,0.15); color: #818cf8; font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin-left: 8px; vertical-align: middle; }

/* ============================================
   🪞 The Mirror - Missed Profit Analysis
   ============================================ */
.mirror-card-content {
    padding: 8px 0;
}

.mirror-main-stat {
    text-align: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 16px;
}

.mirror-label {
    display: block;
    font-size: 12px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}

.mirror-value {
    font-size: 32px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

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

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

.mirror-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.mirror-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.mirror-detail-row span:first-child {
    color: var(--text-tertiary);
}

.mirror-detail-row span:last-child {
    color: var(--text-primary);
    font-weight: 500;
    font-family: 'JetBrains Mono', monospace;
}

.mirror-insight {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-radius: 10px;
    font-size: 12px;
    color: #f59e0b;
    line-height: 1.5;
}

.mirror-insight i {
    flex-shrink: 0;
    margin-top: 1px;
}

/* Total Impact Card */
.mirror-total-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.mirror-comparison {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: 100%;
    padding: 16px 0;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 16px;
}

.mirror-reality,
.mirror-potential {
    flex: 1;
    text-align: center;
}

.mirror-comp-label {
    display: block;
    font-size: 11px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}

.mirror-comp-value {
    font-size: 20px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-secondary);
}

.mirror-comp-value.positive {
    color: var(--green);
}

.mirror-arrow {
    color: var(--text-tertiary);
    opacity: 0.5;
}

.mirror-gap {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 24px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(245, 158, 11, 0.08));
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: 12px;
    margin-bottom: 16px;
}

.mirror-gap-label {
    font-size: 11px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 6px;
}

.mirror-gap-value {
    font-size: 28px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    color: var(--red);
}

.mirror-gap-percent {
    font-size: 13px;
    color: var(--red);
    opacity: 0.8;
    margin-top: 2px;
}

.mirror-quote {
    font-size: 12px;
    font-style: italic;
    color: var(--text-tertiary);
    line-height: 1.5;
    max-width: 280px;
    text-align: center;
}

/* Light mode */
html.light .mirror-insight {
    background: rgba(245, 158, 11, 0.1);
}

html.light .mirror-gap {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.06), rgba(245, 158, 11, 0.06));
}

/* ============================================
   Account Widgets (Dashboard)
   ============================================ */
.accounts-widgets-section .section-divider {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-2) 0;
    margin: var(--space-2) 0;
}

.accounts-widgets-section .section-divider::before,
.accounts-widgets-section .section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
}

/* Account Overview Widget */
.account-overview-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 6px;
}

.account-health-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 100%;
}

.account-stack-widget {
    display: flex;
    flex-direction: column;
}

.account-stack-layout {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 100%;
}

.account-stack-hero,
.account-stack-list {
    min-width: 0;
}

.account-stack-section-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 10px;
}

.account-stack-section-label--hero {
    margin-bottom: 6px;
}

.account-stack-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.07), transparent);
}

.account-overview-content--stack {
    max-height: 296px;
}

.account-hero {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 2px 0 0;
}

.account-hero-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.account-hero-main {
    min-width: 0;
    flex: 1;
}

.account-hero-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 7px;
}

.account-hero-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.15;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-hero-meta {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.account-hero-value-wrap {
    flex-shrink: 0;
    text-align: right;
}

.account-hero-value-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 5px;
}

.account-hero-value {
    font-size: 24px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-primary);
    line-height: 1;
}

.account-hero-value.positive {
    color: var(--green);
}

.account-hero-value.negative {
    color: var(--red);
}

.account-hero-value-sub {
    margin-top: 7px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.account-hero-value-sub.positive {
    color: var(--green);
}

.account-hero-value-sub.negative {
    color: var(--red);
}

.account-hero-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.account-hero-progress-copy {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
}

.account-hero-progress-copy.positive {
    color: var(--green);
}

.account-hero-progress-target {
    font-size: 12px;
    color: var(--text-tertiary);
}

.account-hero-progress-bar {
    height: 8px;
    background: rgba(255,255,255,0.06);
    border-radius: 999px;
    overflow: hidden;
}

.account-hero-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: 999px;
    transition: width 0.35s ease;
}

.account-hero-progress-fill.exceeded {
    background: linear-gradient(90deg, #fbbf24, #22c55e);
}

.account-hero-chips {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.account-hero-chip {
    padding: 9px 10px;
    border-radius: 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
}

.account-hero-chip-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 5px;
}

.account-hero-chip-value {
    font-size: 13px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-primary);
}

.account-hero-chip-value.positive {
    color: var(--green);
}

.account-hero-chip-value.negative {
    color: var(--red);
}

.account-hero-note {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 12px;
    border-radius: 12px;
    background: rgba(77, 171, 154, 0.06);
    border: 1px solid rgba(77, 171, 154, 0.12);
    color: var(--text-secondary);
    font-size: 12px;
}

.account-hero-note svg {
    flex-shrink: 0;
    color: var(--accent);
    opacity: 0.8;
}

.account-hero-note a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.account-hero-note a:hover {
    text-decoration: underline;
}

.account-focus-widget .account-health-content {
    min-height: 100%;
}

.account-focus-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.account-focus-row {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    overflow: hidden;
}

.account-focus-rail {
    width: 4px;
    align-self: stretch;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    flex-shrink: 0;
}

.account-focus-row.positive .account-focus-rail {
    background: linear-gradient(180deg, rgba(34, 197, 94, 0.95), rgba(74, 222, 128, 0.75));
}

.account-focus-row.accent .account-focus-rail {
    background: linear-gradient(180deg, rgba(77, 171, 154, 0.95), rgba(91, 196, 176, 0.75));
}

.account-focus-row.warning .account-focus-rail {
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.95), rgba(251, 191, 36, 0.75));
}

.account-focus-row.negative .account-focus-rail {
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.95), rgba(248, 113, 113, 0.75));
}

.account-focus-body {
    min-width: 0;
    flex: 1;
}

.account-focus-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 6px;
}

.account-focus-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-focus-meta {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.45;
}

.account-focus-pill {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 86px;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.025);
    font-size: 12px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-primary);
}

.account-focus-pill.positive {
    color: var(--green);
    border-color: rgba(34, 197, 94, 0.18);
    background: rgba(34, 197, 94, 0.06);
}

.account-focus-pill.accent {
    color: var(--accent);
    border-color: rgba(77, 171, 154, 0.18);
    background: rgba(77, 171, 154, 0.06);
}

.account-focus-pill.warning {
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.18);
    background: rgba(245, 158, 11, 0.06);
}

.account-focus-pill.negative {
    color: var(--red);
    border-color: rgba(239, 68, 68, 0.18);
    background: rgba(239, 68, 68, 0.06);
}

.account-health-callout {
    width: 100%;
    box-sizing: border-box;
    margin-top: 10px;
    padding: 14px 15px;
    border-radius: 12px;
    background: rgba(77, 171, 154, 0.07);
    border: 1px solid rgba(77, 171, 154, 0.15);
    color: var(--text-secondary);
}

.account-health-callout-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 6px;
}

.account-health-callout-text {
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-primary);
    font-weight: 600;
}

@media (max-width: 1100px) {
    .account-hero-top,
    .account-hero-progress-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .account-hero-value-wrap {
        text-align: left;
    }

    .account-hero-chips {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.account-overview-content::-webkit-scrollbar {
    width: 4px;
}

.account-overview-content::-webkit-scrollbar-track {
    background: transparent;
}

.account-overview-content::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
}

.account-mini-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.account-mini-card:hover {
    background: rgba(255,255,255,0.04);
    border-color: rgba(77, 171, 154, 0.3);
}

.account-mini-card.active {
    background: rgba(77, 171, 154, 0.08);
    border-color: rgba(77, 171, 154, 0.4);
}

.account-mini-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(77, 171, 154, 0.15), rgba(77, 171, 154, 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.account-mini-icon i {
    width: 18px;
    height: 18px;
    color: var(--accent);
}

.account-mini-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.account-mini-top,
.account-mini-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.account-mini-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-mini-meta {
    font-size: 12px;
    color: var(--text-tertiary);
}

.account-mini-pnl {
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    text-align: right;
}

.account-mini-pnl.positive { color: var(--green); }
.account-mini-pnl.negative { color: var(--red); }

.account-mini-badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.025);
}

.account-mini-badge.accent {
    color: var(--accent);
    border-color: rgba(77, 171, 154, 0.16);
    background: rgba(77, 171, 154, 0.08);
}

.account-mini-badge.positive {
    color: var(--green);
    border-color: rgba(34, 197, 94, 0.16);
    background: rgba(34, 197, 94, 0.08);
}

.account-mini-badge.muted {
    color: var(--text-tertiary);
}

/* Drawdown Monitor Widget */
.drawdown-monitor-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 8px 0;
}

.dd-gauge-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.dd-gauge-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.dd-gauge {
    position: relative;
    width: 100%;
    height: 24px;
    background: rgba(255,255,255,0.04);
    border-radius: 12px;
    overflow: hidden;
}

.dd-gauge-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    border-radius: 12px;
    transition: width 0.4s ease, background 0.3s;
}

.dd-gauge-fill.safe {
    background: linear-gradient(90deg, var(--green), var(--green-light));
}

.dd-gauge-fill.warning {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.dd-gauge-fill.danger {
    background: linear-gradient(90deg, var(--red), var(--red-light));
}

.dd-gauge-text {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-primary);
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.dd-stats-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.dd-stat-box {
    flex: 1;
    padding: 10px 12px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    text-align: center;
}

.dd-stat-label {
    font-size: 10px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 4px;
}

.dd-stat-value {
    font-size: 14px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-primary);
}

.dd-stat-value.negative { color: var(--red); }
.dd-stat-value.warning { color: #f59e0b; }

/* Account Comparison Widget */
.account-comparison-content {
    padding: 8px 0;
}

.comparison-bar-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comparison-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.comparison-bar-name {
    width: 80px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}

.comparison-bar-track {
    flex: 1;
    height: 20px;
    background: rgba(255,255,255,0.04);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.comparison-bar-fill {
    position: absolute;
    top: 0;
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
    min-width: 2px;
}

.comparison-bar-fill.positive {
    left: 50%;
    background: linear-gradient(90deg, var(--green), var(--green-light));
}

.comparison-bar-fill.negative {
    right: 50%;
    background: linear-gradient(270deg, var(--red), var(--red-light));
}

.comparison-bar-center {
    position: absolute;
    left: 50%;
    top: 0;
    width: 1px;
    height: 100%;
    background: rgba(255,255,255,0.15);
}

.comparison-bar-value {
    width: 70px;
    font-size: 12px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    text-align: right;
    flex-shrink: 0;
}

.comparison-bar-value.positive { color: var(--green); }
.comparison-bar-value.negative { color: var(--red); }

/* No accounts state */
.no-accounts-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
}

.no-accounts-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(77, 171, 154, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.no-accounts-icon i {
    width: 24px;
    height: 24px;
    color: var(--accent);
}

.no-accounts-text {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.no-accounts-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(77, 171, 154, 0.1);
    border: 1px solid rgba(77, 171, 154, 0.2);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    transition: all 0.15s;
}

.no-accounts-btn:hover {
    background: rgba(77, 171, 154, 0.15);
    border-color: rgba(77, 171, 154, 0.3);
}

/* Light mode adjustments */
html.light .account-mini-card {
    background: rgba(0,0,0,0.02);
    border-color: rgba(0,0,0,0.06);
}

html.light .account-mini-card:hover {
    background: rgba(0,0,0,0.04);
}

html.light .account-mini-card.active {
    background: rgba(77, 171, 154, 0.08);
}

html.light .account-focus-row {
    background: rgba(0,0,0,0.02);
    border-color: rgba(0,0,0,0.06);
}

html.light .account-hero-chip {
    background: rgba(0,0,0,0.018);
    border-color: rgba(0,0,0,0.06);
}

html.light .account-hero-progress-bar {
    background: rgba(0,0,0,0.06);
}

html.light .account-hero-note {
    background: rgba(77, 171, 154, 0.08);
    border-color: rgba(77, 171, 154, 0.18);
}

html.light .account-health-callout {
    background: rgba(77, 171, 154, 0.08);
    border-color: rgba(77, 171, 154, 0.18);
}

html.light .dd-gauge {
    background: rgba(0,0,0,0.04);
}

html.light .dd-stat-box {
    background: rgba(0,0,0,0.02);
    border-color: rgba(0,0,0,0.06);
}

html.light .comparison-bar-track {
    background: rgba(0,0,0,0.04);
}

/* Balance Tracker Widget */
.balance-tracker {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 4px 0;
}

.balance-main {
    text-align: center;
    padding: 12px 0;
}

.balance-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.balance-value {
    font-size: 32px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-primary);
    line-height: 1;
}

.balance-change {
    font-size: 13px;
    font-weight: 600;
    margin-top: 6px;
}

.balance-change.positive { color: var(--green); }
.balance-change.negative { color: var(--red); }

.balance-progress-section {
    padding: 0 4px;
}

.balance-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.balance-progress-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--accent);
}

.balance-progress-target {
    font-size: 15px;
    color: var(--text-tertiary);
}

.balance-progress-bar {
    height: 8px;
    background: rgba(255,255,255,0.06);
    border-radius: 4px;
    overflow: hidden;
}

.balance-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: 4px;
    transition: width 0.4s ease;
}

.balance-progress-fill.exceeded {
    background: linear-gradient(90deg, #fbbf24, #22c55e);
}

.balance-stats-row {
    display: flex;
    gap: 8px;
}

.balance-stat {
    flex: 1;
    padding: 20px 8px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    text-align: center;
}

.balance-stat-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 4px;
}

.balance-stat-value {
    font-size: 15px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-primary);
}

.balance-stat-value.accent { color: var(--accent); }
.balance-stat-value.positive { color: var(--green); }

/* Balance Tracker without goals */ 
.balance-tracker-no-goal .balance-value {
    font-size: 28px;
}

.balance-goal-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(77, 171, 154, 0.08);
    border: 1px solid rgba(77, 171, 154, 0.15);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.balance-goal-hint svg {
    flex-shrink: 0;
    color: var(--accent);
    opacity: 0.7;
}

.balance-goal-hint a {
    color: var(--accent);
    text-decoration: none; 
    font-weight: 500;
}

.balance-goal-hint a:hover {
    text-decoration: underline;
}

/* Light mode */
html.light .balance-stat {
    background: rgba(0,0,0,0.02);
    border-color: rgba(0,0,0,0.06);
}

html.light .balance-progress-bar {
    background: rgba(0,0,0,0.06);
}

#dayChartMini{
    margin: -10px -18px;
}
#time-between-container{
    margin-top: 0;
}
#time-between-container #chart-time-between.chart-empty{
    flex: 1 1 auto;
    height: auto;
    min-height: 220px;
    margin: 0;
}

/* ============================================
   AI Coach Drawer
   ============================================ */

body.coach-drawer-open {
    overflow: hidden;
}

.coach-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(5, 7, 9, 0.52);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 180ms var(--ease-out),
        visibility 0s linear 180ms;
    z-index: 940;
}

.coach-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(560px, calc(100vw - 40px));
    max-width: 100vw;
    transform: translateX(100%);
    transition: transform 240ms var(--ease-out);
    pointer-events: none;
    z-index: 941;
}

.coach-drawer-shell {
    height: 100%;
    display: flex;
    flex-direction: column;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0.008)),
        rgba(11, 12, 14, 0.992);
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow:
        -18px 0 40px rgba(0, 0, 0, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.coach-drawer.is-open {
    transform: translateX(0);
    pointer-events: auto;
}

.coach-drawer-backdrop.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition:
        opacity 180ms var(--ease-out),
        visibility 0s linear 0s;
}

.coach-drawer-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 18px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.coach-drawer-copy {
    min-width: 0;
}

.coach-drawer-title {
    font-size: 24px;
    font-weight: 620;
    line-height: 1.04;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.coach-drawer-label {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary);
    max-width: 42ch;
}

.coach-drawer-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.coach-drawer-frame-wrap {
    flex: 1 1 auto;
    min-height: 0;
    position: relative;
    background: rgba(255, 255, 255, 0.012);
}

.coach-drawer-frame {
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
}

.coach-drawer-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    padding: 14px;
    background:
        linear-gradient(180deg, rgba(11, 12, 14, 0.96), rgba(11, 12, 14, 0.9)),
        rgba(255, 255, 255, 0.01);
    opacity: 1;
    transition: opacity 180ms var(--ease-out), visibility 0s linear 0s;
    z-index: 1;
}

.coach-drawer-loading.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 180ms var(--ease-out), visibility 0s linear 180ms;
}

.coach-drawer-loading-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)),
        rgba(12, 13, 15, 0.92);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.coach-drawer-loading-kicker {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(77, 171, 154, 0.8);
}

.coach-drawer-loading-title {
    font-size: 24px;
    line-height: 1.04;
    letter-spacing: -0.03em;
    font-weight: 620;
    color: var(--text-primary);
}

.coach-drawer-loading-copy {
    max-width: 34ch;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(214, 223, 232, 0.62);
}

.coach-drawer-loading-lines {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
}

.coach-drawer-loading-line {
    display: block;
    width: 78%;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.06) 100%);
    background-size: 200% 100%;
    animation: coachDrawerLoadingPulse 1.35s ease-in-out infinite;
}

.coach-drawer-loading-line.is-wide {
    width: 92%;
}

.coach-drawer-loading-line.is-short {
    width: 58%;
}

@keyframes coachDrawerLoadingPulse {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

@media (max-width: 767px) {
    .coach-drawer {
        width: 100vw;
    }

    .coach-drawer-shell {
        border-left: 0;
        box-shadow:
            0 -12px 32px rgba(0, 0, 0, 0.32),
            inset 0 1px 0 rgba(255, 255, 255, 0.02);
    }

    .coach-drawer-head {
        padding: 16px 14px 14px;
        gap: 12px;
    }

    .coach-drawer-title {
        font-size: 22px;
    }

    .coach-drawer-label {
        font-size: 13px;
    }

    .coach-drawer-loading {
        padding: 12px;
    }

    .coach-drawer-loading-card {
        padding: 14px;
        border-radius: 16px;
    }

    .coach-drawer-loading-title {
        font-size: 22px;
    }

    .coach-drawer-actions .app-action-btn span {
        display: none;
    }
}

/* Journal visibility recovery state */
.table-empty-state {
    padding: 40px 20px;
    text-align: left;
}

.table-empty-state .journal-empty-state {
    margin: 0 auto;
    max-width: 760px;
}

.cards-grid .journal-empty-state,
#cards-grid .journal-empty-state {
    max-width: 760px;
    margin: 24px auto 0;
}

.journal-empty-state {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 22px 24px;
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(77, 171, 154, 0.08), rgba(77, 171, 154, 0.03)),
        rgba(12, 18, 17, 0.88);
    border: 1px solid rgba(77, 171, 154, 0.16);
    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.02);
    text-align: left;
}

.journal-empty-state__eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(135, 225, 209, 0.86);
}

.journal-empty-state__title {
    font-size: 22px;
    line-height: 1.2;
    font-weight: 700;
    color: #f5fbfa;
}

.journal-empty-state__body {
    font-size: 14px;
    line-height: 1.65;
    color: rgba(214, 223, 232, 0.82);
    max-width: 62ch;
}

.journal-empty-state__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.journal-empty-state__badge {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(230, 238, 242, 0.84);
    background: rgba(255, 255, 255, 0.04);
}

.journal-empty-state__badge--scope {
    color: #a8f0e0;
    border-color: rgba(77, 171, 154, 0.24);
    background: rgba(77, 171, 154, 0.12);
}

.journal-empty-state__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}

.journal-empty-state__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    appearance: none;
    border: 0;
    border-radius: 12px;
    padding: 11px 16px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.16s ease, opacity 0.16s ease, background 0.16s ease;
}

.journal-empty-state__btn:hover {
    transform: translateY(-1px);
}

.journal-empty-state__btn--primary {
    background: linear-gradient(135deg, #62d1c2, #4dab9a);
    color: #051513;
    box-shadow: 0 10px 24px rgba(77, 171, 154, 0.22);
}

.journal-empty-state__btn--secondary {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(238, 245, 247, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 767px) {
    .table-empty-state {
        padding: 28px 14px;
    }

    .journal-empty-state {
        padding: 18px 16px;
        border-radius: 16px;
    }

    .journal-empty-state__title {
        font-size: 18px;
    }

    .journal-empty-state__body {
        font-size: 13px;
    }

    .journal-empty-state__actions {
        flex-direction: column;
    }

    .journal-empty-state__btn {
        width: 100%;
        justify-content: center;
    }
}
