/* ============================================
   Journal Page Styles
   Extracted from journal.php
   ============================================ */


:root {
            --journal-shell-bg: var(--bg-elevated);
            --journal-shell-bg-soft: var(--glass-bg);
            --journal-shell-border: var(--glass-border);
            --journal-shell-shadow: var(--shadow-md);
            --journal-shell-shadow-soft: var(--shadow-sm);
        }

        body.journal-page {
            font-family: 'Instrument Sans', sans-serif;
            color: var(--text-primary);
            --journal-fs-kicker: 12px;
            --journal-fs-meta: 13px;
            --journal-fs-body: 15px;
            --journal-fs-body-sm: 14px;
            --journal-fs-title: 24px;
            --journal-fs-card-title: 19px;
            --journal-fs-metric: 18px;
            --journal-fs-chip: 11px;
            --journal-fs-support: 14px;
        }

        /* ============================================
           JOURNAL PAGE LAYOUT - Full Width
           ============================================ */
        .journal-layout {
            min-height: calc(100vh - 80px);
        }

        /* ============================================
           JOURNAL HEADER + TOOLBAR
           ============================================ */
.journal-header {
            margin-bottom: 16px;
            padding: 2px 0 0;
            border: none;
            background: transparent;
            box-shadow: none;
        }

        .journal-title-group {
            max-width: 760px;
        }

        .journal-eyebrow {
            display: none;
        }

.journal-title {
            max-width: 9ch;
            font-size: clamp(2rem, 2.45vw, 2.5rem);
            font-weight: 620;
            line-height: 0.96;
            letter-spacing: -0.055em;
        }

        .journal-subtitle {
            max-width: 640px;
            font-size: var(--journal-fs-body);
            font-weight: 500;
            line-height: 1.68;
            color: #8a8d95;
        }

.journal-chip-row {
            display: none;
        }

.trades-header-actions {
            align-self: flex-end;
            margin-top: auto;
            margin-bottom: 2px;
            margin-left: auto;
        }

        .trades-header-actions.app-toolbar {
            gap: 10px;
            padding: 0;
            border: none;
            background: transparent;
            box-shadow: none;
        }

        .trades-header-actions .app-toolbar-group-shell {
            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);
        }

        .trades-header-actions .actions-primary {
            gap: 10px;
        }

        .trades-header-actions .actions-secondary {
            gap: 10px;
        }

        .journal-toolbar-mode {
            gap: 8px;
        }

        .journal-toolbar-mode .journal-clear-btn {
            display: none;
        }

        .journal-toolbar-mode.is-selecting .journal-clear-btn {
            display: inline-flex;
        }

        .journal-toolbar-view {
            gap: 0;
            padding-left: 10px;
            margin-left: 2px;
            border-left: 1px solid rgba(255,255,255,0.08);
        }

        .journal-select-btn {
            min-width: 96px;
            justify-content: center;
        }

        .journal-clear-btn {
            flex: 0 0 auto;
        }

.journal-status-stack {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .journal-status-stack .app-status-bar {
            margin-bottom: 0;
        }

.journal-command-deck {
            margin-bottom: 18px;
            padding: 20px;
            position: relative;
            background: var(--bg-primary);
            border-color: rgba(255,255,255,0.06);
            box-shadow:
                inset 0 1px 0 rgba(255,255,255,0.025),
                0 16px 36px rgba(0, 0, 0, 0.14);
        }

        .journal-command-deck-head {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            margin: 0;
            padding: 0;
            border: none;
            position: absolute;
            top: 20px;
            right: 20px;
            z-index: 3;
        }

        .journal-command-collapsed-label {
            display: none;
            min-width: 0;
            color: var(--text-secondary);
            font-size: 13px;
            font-weight: 600;
            letter-spacing: 0.01em;
        }

        .journal-command-deck-intro {
            display: flex;
            flex-direction: column;
            gap: 8px;
            min-width: 0;
        }

        .journal-command-deck-copy {
            color: var(--text-secondary);
            font-size: var(--journal-fs-body-sm);
            line-height: 1.5;
        }

        .journal-command-toggle {
            flex-shrink: 0;
            min-height: auto;
            padding: 0;
            border: none;
            border-radius: 0;
            background: transparent;
            box-shadow: none;
            color: var(--text-tertiary);
            font-size: 12px;
            font-weight: 700;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            gap: 5px;
        }

        .journal-command-toggle-icon {
            transition: transform var(--duration-fast) var(--ease-out);
        }

        .journal-command-toggle:hover {
            background: transparent;
            border-color: transparent;
            box-shadow: none;
            color: var(--text-secondary);
            transform: none;
        }

        .journal-command-deck.is-collapsed {
            padding-bottom: 16px;
        }

        .journal-command-deck.is-collapsed .journal-command-deck-head {
            position: static;
            justify-content: space-between;
            margin-bottom: 0;
            padding-bottom: 0;
            border-bottom: none;
        }

        .journal-command-deck.is-collapsed .journal-command-collapsed-label {
            display: inline-flex;
            align-items: center;
        }

        .journal-command-deck.is-collapsed .journal-command-toggle-icon {
            transform: rotate(180deg);
        }

        .journal-command-body[hidden] {
            display: none !important;
        }

        .journal-command-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 18px;
            align-items: start;
        }

        .journal-command-panel {
            min-width: 0;
            padding: 0;
            border: none;
            border-radius: 0;
            background: transparent;
            box-shadow: none;
        }

        .journal-command-panel--filters {
            padding-bottom: 16px;
            border-bottom: 1px solid rgba(255,255,255,0.06);
        }

        .journal-command-panel--filters .journal-command-head {
            padding-right: 132px;
        }

        .journal-command-head {
            align-items: flex-start;
            gap: 16px;
            margin-bottom: 12px;
        }

        .journal-command-head--summary {
            align-items: center;
            margin-bottom: 6px;
        }

        .journal-command-intro {
            display: flex;
            flex-direction: column;
            gap: 8px;
            min-width: 0;
        }

        .journal-command-head--summary .journal-command-intro {
            gap: 0;
        }

        .journal-command-title {
            font-size: var(--journal-fs-card-title);
            font-weight: 700;
            letter-spacing: -0.03em;
            line-height: 1.18;
            color: var(--text-primary);
        }

        .journal-command-head--summary .journal-command-title {
            line-height: 1.05;
        }

        .journal-command-copy {
            max-width: 70ch;
            color: var(--text-secondary);
            font-size: var(--journal-fs-body-sm);
            line-height: 1.6;
        }

.journal-overview-shell {
            display: flex;
            flex-direction: column;
            gap: 16px;
            margin: 0;
            padding: 0;
            background: transparent;
        }

        .journal-overview-head {
            display: none;
        }

        .journal-review-rail {
            min-width: 0;
        }

        .journal-review-main {
            display: contents;
        }

        .journal-review-heading {
            display: none;
        }

        .journal-review-eyebrow {
            font-size: var(--journal-fs-kicker);
            font-weight: 700;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: #91dccc;
        }

        .journal-review-actions {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
            flex-shrink: 0;
            align-self: center;
        }

        .journal-review-metrics .journal-review-actions {
            margin-left: auto;
        }

        .journal-review-actions .app-action-btn:disabled {
            opacity: 0.45;
            cursor: not-allowed;
        }

        .journal-review-metrics {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
            min-width: 0;
            padding-top: 0;
        }

        .review-mode-toggle {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            width: fit-content;
            min-height: 36px;
            padding: 8px 12px;
            border-radius: 999px;
            border: 1px solid rgba(255,255,255,0.08);
            background: rgba(255,255,255,0.03);
            color: var(--text-primary);
            font-size: var(--journal-fs-body-sm);
            font-weight: 700;
            letter-spacing: 0.01em;
            transition: all var(--duration-fast) var(--ease-out);
        }

        .review-mode-toggle:hover {
            border-color: rgba(77,171,154,0.22);
            background: rgba(77,171,154,0.09);
        }

        .review-mode-toggle.is-active {
            border-color: rgba(77,171,154,0.28);
            background: rgba(77,171,154,0.15);
            color: #9fe5d8;
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
        }

        .review-chip {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            min-height: 30px;
            padding: 0 10px;
            border-radius: 999px;
            border: 1px solid rgba(255,255,255,0.06);
            background: rgba(255,255,255,0.026);
            color: var(--text-secondary);
            font-size: var(--journal-fs-chip);
            line-height: 1.1;
        }

        .review-chip strong {
            color: var(--text-primary);
            font-size: var(--journal-fs-meta);
            font-weight: 700;
        }

        .review-chip-label {
            color: var(--text-secondary);
        }

        .review-chip-pending {
            border-color: rgba(245,158,11,0.18);
            background: rgba(245,158,11,0.09);
            color: #f0c27c;
        }

        .review-chip-reviewed {
            border-color: rgba(77,171,154,0.22);
            background: rgba(77,171,154,0.1);
            color: #9fe5d8;
        }

        .review-chip-context {
            max-width: min(320px, 100%);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .journal-overview-stats {
            margin: 0;
            padding-top: 16px;
            border-top: 1px solid rgba(255,255,255,0.06);
        }

.accounts-section {
            margin-bottom: 18px;
            padding: 18px;
            background: var(--bg-primary);
            border-color: rgba(255,255,255,0.06);
            box-shadow:
                inset 0 1px 0 rgba(255,255,255,0.02),
                0 14px 30px rgba(0,0,0,0.12);
            display: flex;
            flex-direction: column;
            gap: 14px;
        }

        .accounts-section .app-section-header {
            flex-wrap: wrap;
            row-gap: 12px;
        }

        .accounts-header {
            margin-bottom: 0;
        }

        .accounts-header-title {
            min-width: 0;
        }

        .accounts-header-title h2 {
            white-space: nowrap;
        }

        .accounts-header-title i {
            color: var(--accent);
        }

.accounts-header-actions {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
        }

        .accounts-header-actions .filter-account-select {
            min-width: 162px;
        }

        .accounts-scroll-wrapper {
            position: relative;
            overflow-x: auto;
            overflow-y: hidden;
            margin-top: 4px;
            padding-bottom: 8px;
            scroll-behavior: smooth;
            -webkit-overflow-scrolling: touch;
        }

.accounts-scroll {
            display: flex;
            flex-wrap: nowrap;
            gap: 12px;
            align-items: stretch;
            width: max-content;
            min-width: 100%;
            padding: 8px 2px 6px;
        }

        .accounts-scope-note {
            display: none;
            align-items: center;
            align-self: flex-start;
            gap: 8px;
            flex-wrap: wrap;
            width: fit-content;
            max-width: min(980px, calc(100% - 4px));
            margin-top: 8px;
            padding: 8px 10px;
            border: 1px solid rgba(255,255,255,0.06);
            border-radius: 10px;
            background: rgba(255,255,255,0.018);
        }

        .accounts-scope-note__badge {
            display: inline-flex;
            align-items: center;
            padding: 4px 8px;
            border-radius: 999px;
            border: 1px solid rgba(77,171,154,0.18);
            background: rgba(77,171,154,0.1);
            color: #98e2d5;
            font-size: 10px;
            font-weight: 700;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            white-space: nowrap;
        }

        .accounts-scope-note__copy {
            color: rgba(228,231,239,0.74);
            font-size: 12px;
            line-height: 1.4;
        }

        .accounts-scope-note__copy strong {
            color: #f3f5fa;
            font-weight: 600;
        }

        .accounts-scroll-wrapper::-webkit-scrollbar {
            height: 4px;
        }

        .accounts-scroll-wrapper::-webkit-scrollbar-track {
            background: rgba(255,255,255,0.02);
            border-radius: 2px;
        }

        .accounts-scroll-wrapper::-webkit-scrollbar-thumb {
            background: rgba(255,255,255,0.1);
            border-radius: 2px;
        }

        .accounts-scroll-wrapper::-webkit-scrollbar-thumb:hover {
            background: rgba(255,255,255,0.2);
        }

        /* ============================================
           FILTERS BAR - Horizontal Inline
           ============================================ */
        .journal-status-copy {
            line-height: 1.5;
        }

        .journal-status-copy strong {
            color: #9fe4d8;
        }

.journal-status-dismiss {
            flex-shrink: 0;
        }

        .journal-status-dismiss:hover {
            transform: translateY(-1px);
        }

        .journal-tier-status {
            display: none;
            padding: 12px 14px;
            border: 1px solid rgba(77,171,154,0.12);
            background:
                linear-gradient(180deg, rgba(77,171,154,0.06), rgba(77,171,154,0.025)),
                rgba(255,255,255,0.02);
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.015);
        }

        .journal-tier-status-copy {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            flex-wrap: wrap;
        }

        .journal-tier-status-main {
            min-width: 0;
            flex: 1 1 420px;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .journal-tier-status-top {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
        }

        .journal-tier-badge {
            display: inline-flex;
            align-items: center;
            padding: 4px 9px;
            border-radius: 999px;
            border: 1px solid rgba(77,171,154,0.18);
            background: rgba(77,171,154,0.12);
            color: #97e4d5;
            font-size: var(--journal-fs-chip);
            font-weight: 700;
            letter-spacing: 0.08em;
            text-transform: uppercase;
        }

        .journal-tier-summary {
            font-size: var(--journal-fs-body);
            color: #d7ddd8;
            line-height: 1.45;
        }

        .journal-tier-summary strong {
            color: #f3faf8;
            font-weight: 700;
        }

        .journal-tier-meter {
            display: flex;
            flex-direction: column;
            gap: 7px;
            max-width: 420px;
        }

        .journal-tier-meter-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 12px;
            font-size: var(--journal-fs-meta);
            color: #98a7a4;
        }

        .journal-tier-meter-row strong {
            color: #ebf8f4;
            font-weight: 700;
        }

        .journal-tier-status-copy.is-danger .journal-tier-meter-row strong,
        .journal-tier-status-copy.is-danger .journal-tier-summary strong {
            color: #ffb4b4;
        }

        .journal-tier-meter-bar {
            width: 100%;
            height: 6px;
            border-radius: 999px;
            overflow: hidden;
            background: rgba(255,255,255,0.08);
        }

        .journal-tier-meter-fill {
            display: block;
            height: 100%;
            width: 0;
            border-radius: inherit;
            background: linear-gradient(90deg, #4dab9a, #7fd5c4);
        }

        .journal-tier-meter-fill.is-danger {
            background: linear-gradient(90deg, #e56a6a, #ff9a9a);
        }

        .journal-tier-meta {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }

        .journal-tier-chip {
            display: inline-flex;
            align-items: center;
            padding: 4px 8px;
            border-radius: 999px;
            border: 1px solid rgba(255,255,255,0.07);
            background: rgba(255,255,255,0.03);
            color: #a9b2bc;
            font-size: var(--journal-fs-chip);
            font-weight: 600;
        }

        .journal-tier-chip.is-warning {
            border-color: rgba(245,158,11,0.18);
            background: rgba(245,158,11,0.08);
            color: #f3c47a;
        }

        .journal-tier-chip.is-danger {
            border-color: rgba(229,106,106,0.22);
            background: rgba(229,106,106,0.1);
            color: #ffb4b4;
        }

        .journal-tier-status-actions {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
        }

        .journal-tier-cta {
            white-space: nowrap;
        }

        @media (max-width: 900px) {
            .journal-review-rail {
                justify-content: flex-start;
            }

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

            .journal-tier-status-copy {
                align-items: flex-start;
            }
        }

        @media (max-width: 640px) {
            .journal-review-main {
                width: 100%;
            }

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

            .journal-review-actions .app-action-btn {
                flex: 1 1 calc(50% - 4px);
                justify-content: center;
            }

            .review-chip-context {
                max-width: 100%;
            }
        }

        .filters-bar {
            gap: 10px 8px;
            margin-bottom: 0;
            padding: 0;
            background: transparent;
            border: none;
            box-shadow: none;
        }

        .filters-bar-label {
            display: none;
        }

        .filters-bar-label i {
            width: 13px;
            height: 13px;
            color: #73737d;
        }

        .filters-group {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            flex-wrap: wrap;
        }

        .filters-inline-label {
            font-size: var(--journal-fs-kicker);
            font-weight: 600;
            color: #74747d;
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }

        .filter-input-inline {
            background: rgba(255,255,255,0.018);
            border: 1px solid rgba(255,255,255,0.05);
            border-radius: 11px;
            min-height: 40px;
            padding: 8px 11px;
            font-size: var(--journal-fs-body-sm);
            color: var(--text-primary);
            min-width: 116px;
            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);
        }

        .journal-multiselect {
            position: relative;
            padding: 0;
            min-width: 140px;
            overflow: visible;
        }

        .journal-multiselect-trigger {
            width: 100%;
            min-height: 40px;
            padding: 8px 11px;
            border: none;
            background: transparent;
            color: var(--text-primary);
            font-size: var(--journal-fs-body-sm);
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            cursor: pointer;
            text-align: left;
        }

        .journal-multiselect-trigger::after {
            content: '';
            width: 12px;
            height: 12px;
            flex-shrink: 0;
            opacity: 0.7;
            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: center;
        }

        .journal-multiselect-text {
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .journal-multiselect-count {
            flex-shrink: 0;
            padding: 2px 8px;
            border-radius: 999px;
            background: rgba(77,171,154,0.12);
            color: #91d3c6;
            font-size: 12px;
            font-weight: 700;
        }

        .journal-multiselect-dropdown {
            display: none;
            position: absolute;
            top: calc(100% + 6px);
            left: 0;
            right: 0;
            z-index: 35;
            padding: 8px;
            border: 1px solid rgba(255,255,255,0.07);
            border-radius: 12px;
            background: #171718;
            box-shadow: 0 12px 40px rgba(0,0,0,0.42);
            max-height: 260px;
            overflow-y: auto;
        }

        .journal-multiselect.open .journal-multiselect-dropdown {
            display: block;
        }

        .journal-multiselect-actions {
            display: flex;
            gap: 10px;
            padding: 4px 4px 8px;
            margin-bottom: 4px;
            border-bottom: 1px solid rgba(255,255,255,0.06);
        }

        .journal-multiselect-actions button {
            padding: 0;
            border: none;
            background: transparent;
            color: #82c9bc;
            font-size: 12px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            cursor: pointer;
        }

        .journal-multiselect-actions button:hover {
            color: #a3e4d8;
        }

        .journal-multiselect-option {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 10px;
            border-radius: 8px;
            color: var(--text-secondary);
            font-size: 14px;
            cursor: pointer;
            transition: background var(--duration-fast) var(--ease-out);
        }

        .journal-multiselect-option:hover {
            background: rgba(255,255,255,0.035);
        }

        .journal-multiselect-option input[type="checkbox"] {
            width: 14px;
            height: 14px;
            accent-color: var(--accent);
        }

        select.filter-input-inline {
            appearance: 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;
            padding-right: 38px;
        }

        .filter-input-inline:focus {
            outline: none;
            border-color: var(--accent);
            background: var(--glass-bg-hover);
            box-shadow: 0 0 0 3px var(--accent-subtle);
        }

        .filter-input-inline.active-filter {
            border-color: rgba(77, 171, 154, 0.22);
            background: var(--accent-subtle);
        }

        .filter-input-inline[type="date"] {
            min-width: 124px;
            color-scheme: dark;
        }

        .filter-input-inline[type="date"]::-webkit-calendar-picker-indicator {
            filter: invert(0.78) brightness(0.92);
            opacity: 0.72;
            cursor: pointer;
        }

        .filter-separator {
            width: 1px;
            height: 20px;
            background: rgba(255,255,255,0.04);
        }

        .filters-search {
            display: flex;
            align-items: center;
            gap: 8px;
            flex: 1 1 300px;
            min-width: 220px;
            padding: 0 11px;
            min-height: 40px;
            background: rgba(255,255,255,0.018);
            border: 1px solid rgba(255,255,255,0.05);
            border-radius: 11px;
        }

        .filters-search:focus-within {
            border-color: var(--accent);
            background: var(--glass-bg-hover);
            box-shadow: 0 0 0 3px var(--accent-subtle);
        }

        .filters-search i {
            width: 14px;
            height: 14px;
            color: #686872;
            flex-shrink: 0;
        }

        .filters-search .filter-input-inline {
            min-width: 0;
            width: 100%;
            padding-left: 0;
            padding-right: 0;
            border: none;
            background: transparent;
        }

        .btn-reset-filters {
            display: flex;
            align-items: center;
            gap: 4px;
            min-height: 40px;
            padding: 8px 11px;
            background: rgba(255,255,255,0.012);
            border: 1px solid rgba(255,255,255,0.05);
            border-radius: 11px;
            font-size: var(--journal-fs-body-sm);
            font-weight: 600;
            color: #7a7a84;
            cursor: pointer;
            transition: all var(--duration-fast) var(--ease-out);
            flex-shrink: 0;
        }

        .btn-reset-filters:hover {
            background: rgba(239, 68, 68, 0.06);
            border-color: rgba(239, 68, 68, 0.16);
            color: #e67d7d;
        }

        /* Accounts List - Horizontal */
        .accounts-list {
            display: flex;
            gap: 16px;
        }

        /* Account Card */
        .account-card {
            position: relative;
            display: flex;
            flex-direction: column;
            background: rgba(255,255,255,0.018);
            border: 1px solid rgba(255,255,255,0.055);
            border-radius: 15px;
            padding: 16px;
            cursor: pointer;
            transition:
                background var(--duration-normal) var(--ease-out),
                border-color var(--duration-normal) var(--ease-out),
                box-shadow var(--duration-normal) var(--ease-out),
                transform var(--duration-normal) var(--ease-out);
            min-width: 0;
            flex: 0 0 288px;
            width: 288px;
            max-width: none;
            height: auto;
            min-height: 188px;
            box-shadow:
                inset 0 1px 0 rgba(255,255,255,0.012),
                0 6px 16px rgba(0,0,0,0.1);
        }

        .account-card::before {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: inherit;
            pointer-events: none;
            opacity: 0;
            transition: none;
            display: none;
        }

        .account-card:hover {
            border-color: rgba(255,255,255,0.09);
            transform: translateY(-1px);
        }

        .account-card.active {
            background:
                linear-gradient(180deg, rgba(77,171,154,0.085) 0%, rgba(77,171,154,0.036) 22%, rgba(255,255,255,0.008) 100%),
                rgba(19, 19, 20, 0.985);
            border-color: rgba(77, 171, 154, 0.3);
            box-shadow:
                0 0 0 1px rgba(77, 171, 154, 0.08),
                inset 0 1px 0 rgba(255,255,255,0.02),
                0 10px 24px rgba(0,0,0,0.14);
        }

        .account-card.active:hover {
            border-color: rgba(77, 171, 154, 0.34);
            background:
                linear-gradient(180deg, rgba(77,171,154,0.095) 0%, rgba(77,171,154,0.042) 22%, rgba(255,255,255,0.009) 100%),
                rgba(19, 19, 20, 0.992);
            box-shadow:
                0 0 0 1px rgba(77, 171, 154, 0.1),
                inset 0 1px 0 rgba(255,255,255,0.024),
                0 12px 26px rgba(0,0,0,0.16);
        }

        .account-card.active .account-card-name,
        .account-card.active .account-card-pnl {
            color: #edf7f4;
        }

        .account-card.active .account-card-stats {
            color: #a7acb2;
        }

        .account-card.active .account-settings-link {
            color: #9fe4d8;
        }

        .account-card-header {
            display: flex;
            align-items: flex-start;
            margin-bottom: 10px;
        }

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

        .account-card-topline {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 10px;
        }

        .account-card-name {
            font-size: 17px;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 4px;
            line-height: 1.18;
            min-width: 0;
        }

        .account-card-badges {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 7px;
            margin-bottom: 6px;
            min-height: 20px;
        }

        .account-card-bottomline {
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            gap: 12px;
        }

        .account-card-stats {
            font-size: var(--journal-fs-body-sm);
            color: #767982;
            min-width: 0;
        }

        .account-card-pnl {
            font-size: var(--journal-fs-metric);
            font-weight: 700;
            text-align: right;
            font-family: 'JetBrains Mono', monospace;
            letter-spacing: -0.03em;
            white-space: nowrap;
            flex-shrink: 0;
        }

        .account-card-pnl.positive { color: #4DAB9A; }
        .account-card-pnl.negative { color: #e57373; }

        .account-settings-link {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 0;
            border: none;
            background: transparent;
            color: var(--text-tertiary);
            font-size: 12px;
            font-weight: 700;
            letter-spacing: 0.05em;
            text-transform: uppercase;
            cursor: pointer;
            transition: color 0.15s ease;
            flex-shrink: 0;
        }

        .account-settings-link:hover {
            color: var(--accent);
        }

        /* Goal Section */
        .account-goal-section {
            display: flex;
            flex-direction: column;
            gap: 8px;
            margin-top: auto;
            padding-top: 12px;
            border-top: 1px solid rgba(255,255,255,0.05);
        }

        .account-goal-section--empty {
            gap: 0;
        }

        .account-empty-state {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding: 12px 0 2px;
        }

        .account-empty-copy {
            font-size: var(--journal-fs-body-sm);
            line-height: 1.45;
            color: #767a84;
            max-width: 19ch;
        }

        .account-goal-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 8px;
        }

        .account-goal-label {
            font-size: var(--journal-fs-kicker);
            color: var(--text-tertiary);
        }

        .account-goal-value {
            font-size: var(--journal-fs-body);
            font-weight: 600;
            color: var(--text-primary);
        }

        .account-goal-value.highlight {
            color: var(--text-primary);
        }

        /* Progress Bar */
        .account-progress-container {
            padding: 12px 14px;
            margin-top: 0;
            border-radius: 11px;
            border: 1px solid rgba(255,255,255,0.048);
            background: rgba(255,255,255,0.02);
        }

        .account-progress-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 6px;
        }

        .account-progress-label {
            font-size: var(--journal-fs-kicker);
            color: var(--text-tertiary);
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .account-progress-percent {
            font-size: var(--journal-fs-body-sm);
            font-weight: 700;
            color: var(--text-secondary);
        }

        .account-progress-percent.exceeded {
            color: #fbbf24;
        }

        .account-progress-bar {
            height: 7px;
            background: rgba(255,255,255,0.05);
            border-radius: 999px;
            overflow: hidden;
        }

        .account-progress-fill {
            height: 100%;
            background: linear-gradient(90deg, rgba(214,223,232,0.58), rgba(153,162,174,0.72));
            border-radius: 999px;
            transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .account-progress-fill.exceeded {
            background: linear-gradient(90deg, #fbbf24, #f59e0b);
        }

        /* Balance Grid */
        .account-balance-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 8px;
            margin-top: 0;
        }

        .account-balance-item {
            min-height: 54px;
            background: rgba(255,255,255,0.022);
            border: 1px solid rgba(255,255,255,0.048);
            border-radius: 11px;
            padding: 10px 12px;
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
        }

        .account-balance-item-label {
            font-size: var(--journal-fs-chip);
            color: var(--text-tertiary);
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-bottom: 4px;
        }

        .account-balance-item-value {
            font-size: var(--journal-fs-body);
            font-weight: 600;
            color: var(--text-primary);
            font-family: 'JetBrains Mono', monospace;
            letter-spacing: -0.02em;
        }

        .account-no-goal-btn {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            margin-top: 0;
            padding: 7px 12px;
            background: rgba(255,255,255,0.035);
            border: 1px solid rgba(255,255,255,0.07);
            border-radius: 999px;
            font-size: 12px;
            font-weight: 600;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.15s;
            white-space: nowrap;
        }

        .account-no-goal-btn:hover {
            background: rgba(255,255,255,0.06);
            border-color: rgba(255,255,255,0.12);
            color: var(--text-primary);
        }

        /* Transaction List Styles */
        .txn-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 8px 12px;
            border-bottom: 1px solid rgba(255,255,255,0.04);
        }
        .txn-item:last-child { border-bottom: none; }
        .txn-item-left {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .txn-item-type {
            font-size: 13px;
            font-weight: 500;
            color: var(--text-primary, #f0f0f2);
        }
        .txn-item-date {
            font-size: 13px;
            color: var(--text-muted, #5c5c66);
        }
        .txn-item-right {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .txn-item-amount {
            font-family: 'JetBrains Mono', monospace;
            font-size: 14px;
            font-weight: 600;
        }
        .txn-delete-btn {
            background: none;
            border: none;
            color: #5c5c66;
            cursor: pointer;
            padding: 2px;
            border-radius: 4px;
            opacity: 0;
            transition: opacity 0.2s;
        }
        .txn-item:hover .txn-delete-btn { opacity: 1; }
        .txn-delete-btn:hover { color: #ef4444; }

        /* Goal Modal Styles */
        .goal-modal {
            max-width: 420px;
        }

        .goal-modal .modal-body {
            padding: 24px;
        }

        .goal-modal.modal--account-settings {
            max-width: 664px;
        }

        .goal-modal.modal--account-settings .modal-header {
            padding: 22px 24px 14px;
        }

        .goal-modal.modal--account-settings .modal-body {
            padding: 22px 24px 24px;
        }

        .goal-modal.modal--account-settings .modal-footer {
            padding: 16px 24px 20px;
        }

        .goal-modal.modal--account-settings .modal-title {
            font-size: 1.4rem;
            line-height: 1.04;
        }

        .goal-modal.modal--account-settings .modal-subtitle {
            margin-top: 5px;
            font-size: 14px;
            line-height: 1.5;
            color: #888c95;
        }

        .modal-header-stack {
            display: flex;
            align-items: flex-start;
            gap: 12px;
            min-width: 0;
        }

        .modal-title-reset {
            margin: 0;
        }

        .modal-header-copy {
            min-width: 0;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }

        .modal-icon-accent {
            width: 20px;
            height: 20px;
            color: #4DAB9A;
        }

        .btn-icon-16 {
            width: 16px;
            height: 16px;
        }

        .modal-checkbox-accent {
            width: 16px;
            height: 16px;
            accent-color: #4DAB9A;
        }

        .goal-input-group {
            margin-bottom: 20px;
        }

        .goal-input-label {
            display: block;
            font-size: 14px;
            font-weight: 600;
            color: #f0f0f2;
            margin-bottom: 8px;
        }

        .goal-input-wrapper {
            position: relative;
            --goal-currency-space: 62px;
        }

        .goal-input-prefix {
            position: absolute;
            left: 14px;
            top: 50%;
            transform: translateY(-50%);
            display: inline-flex;
            align-items: center;
            min-width: calc(var(--goal-currency-space) - 24px);
            font-size: 14px;
            font-weight: 500;
            color: #5c5c66;
            letter-spacing: 0.03em;
            text-transform: uppercase;
            pointer-events: none;
        }

        .goal-input {
            width: 100%;
            padding: 15px 16px 15px var(--goal-currency-space, 16px);
            background: rgba(255,255,255,0.045);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 14px;
            font-size: 15.5px;
            font-weight: 500;
            color: #f0f0f2;
            transition: all 0.2s;
        }

        .goal-input:focus {
            outline: none;
            border-color: #4DAB9A;
            background: rgba(255,255,255,0.06);
            box-shadow: 0 0 0 3px rgba(77, 171, 154, 0.1);
        }

        .goal-input::placeholder {
            color: #3a3a42;
        }

        .goal-input--strong {
            font-weight: 600;
        }

        .goal-input-hint {
            margin-top: 6px;
            font-size: 13px;
            color: #5c5c66;
        }

        .account-goal-balance-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 14px;
        }

        .goal-modal.modal--account-settings .goal-input-group {
            margin-bottom: 18px;
        }

        .goal-modal.modal--account-settings .goal-input-label {
            margin-bottom: 9px;
            font-size: 14px;
        }

        .goal-modal.modal--account-settings .goal-input {
            min-height: 52px;
            font-size: 16px;
            border-radius: 14px;
        }

        .goal-modal.modal--account-settings select.goal-input,
        .goal-modal.modal--account-settings #goal-currency-code {
            padding-left: 16px;
            padding-right: 42px;
        }

        .goal-modal.modal--account-settings .currency-picker__trigger.goal-input {
            min-height: 52px;
            padding-left: 16px;
            padding-right: 16px;
        }

        .goal-modal.modal--account-settings .currency-picker__trigger.goal-input .currency-picker__trigger-code {
            font-size: 15px;
        }

        .goal-modal.modal--account-settings .goal-input-prefix {
            left: 15px;
            font-size: 14px;
        }

        /* Preview in modal */
        .goal-preview {
            background: rgba(77, 171, 154, 0.05);
            border: 1px solid rgba(77, 171, 154, 0.15);
            border-radius: 12px;
            padding: 16px;
            margin-top: 20px;
        }

        .goal-preview--spaced {
            margin-top: 20px;
        }

        .goal-modal.modal--account-settings .goal-preview {
            margin-top: 22px;
            padding: 18px;
            border-radius: 14px;
        }

        .goal-preview-title {
            font-size: 13px;
            font-weight: 600;
            color: #5c5c66;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-bottom: 12px;
        }

        .goal-modal.modal--account-settings .goal-preview-title {
            margin-bottom: 14px;
        }

        .goal-preview-row {
            display: flex;
            justify-content: space-between;
            margin-bottom: 8px;
        }

        .goal-modal.modal--account-settings .goal-preview-row {
            margin-bottom: 10px;
        }

        .goal-preview-row:last-child {
            margin-bottom: 0;
        }

        .goal-preview-label {
            font-size: 13px;
            color: #9898a0;
        }

        .goal-preview-value {
            font-size: 13px;
            font-weight: 600;
            color: #f0f0f2;
        }

        .goal-preview-value.positive { color: #4DAB9A; }
        .goal-preview-value.negative { color: #e57373; }

        /* ============================================
           PROP FIRM CHALLENGE STYLES
           ============================================ */

        /* Account Type Badge */
        .account-type-badge {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 3px 8px;
            border-radius: 4px;
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            line-height: 1;
            white-space: nowrap;
        }

        .account-type-badge.personal {
            background: rgba(176, 186, 198, 0.12);
            color: #cad1db;
        }

        .account-type-badge.prop-challenge {
            background: rgba(251, 191, 36, 0.15);
            color: #fbbf24;
        }

        .account-type-badge.prop-funded {
            background: rgba(77, 171, 154, 0.15);
            color: #4DAB9A;
        }

        /* Trading Mode Badges */
        .account-type-badge.mode-demo {
            background: rgba(176, 186, 198, 0.1);
            color: #cad1db;
        }
        .account-type-badge.mode-backtest {
            background: rgba(234, 179, 8, 0.12);
            color: #eab308;
        }

        /* Trading Mode Selector Buttons */
        .trading-mode-btn {
            flex: 1;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            padding: 10px 12px;
            border-radius: 10px;
            border: 1px solid rgba(255,255,255,0.08);
            background: rgba(255,255,255,0.03);
            color: #9898a0;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.15s;
        }
        .trading-mode-btn:hover { background: rgba(255,255,255,0.06); }
        .trading-mode-btn.selected {
            border-color: rgba(77,171,154,0.4);
            background: rgba(77,171,154,0.1);
            color: #4DAB9A;
        }

        .account-mode-row {
            display: flex;
            gap: 8px;
            margin-bottom: 8px;
        }

        .goal-modal.modal--account-settings .account-mode-row {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 10px;
            margin-bottom: 10px;
        }

        .goal-modal.modal--account-settings .trading-mode-btn {
            min-height: 46px;
            padding: 0 14px;
            border-radius: 12px;
            font-size: 14px;
        }

        .account-mode-hint {
            margin-bottom: 16px;
            font-size: 13px;
            color: #6d6d77;
        }

        .goal-modal.modal--account-settings .account-mode-hint {
            margin-bottom: 18px;
            font-size: 13.5px;
            color: #787c85;
        }

        /* Prop Firm Rules Grid */
        .prop-rules-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 8px;
            margin-top: 0;
        }

        .prop-rule-item {
            background: rgba(255,255,255,0.026);
            border: 1px solid rgba(255,255,255,0.055);
            border-radius: 10px;
            padding: 11px 12px;
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
        }

        .prop-rule-item.danger {
            background: rgba(239, 68, 68, 0.07);
            border: 1px solid rgba(239, 68, 68, 0.16);
        }

        .prop-rule-item.warning {
            background: rgba(251, 191, 36, 0.07);
            border: 1px solid rgba(251, 191, 36, 0.16);
        }

        .prop-rule-item.success {
            background: rgba(77, 171, 154, 0.055);
            border: 1px solid rgba(77, 171, 154, 0.14);
        }

        .prop-rule-label {
            font-size: 13px;
            color: #5c5c66;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            margin-bottom: 6px;
        }

        .prop-rule-value {
            font-size: 14px;
            font-weight: 600;
            color: #f0f0f2;
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-family: 'JetBrains Mono', monospace;
            letter-spacing: -0.02em;
        }

        .prop-rule-value .current {
            font-weight: 700;
        }

        .prop-rule-value .limit {
            font-size: 13px;
            color: #6b6b74;
        }

        .prop-rule-value.danger .current { color: #ef4444; }
        .prop-rule-value.warning .current { color: #fbbf24; }
        .prop-rule-value.success .current { color: #4DAB9A; }

        /* Challenge Status */
        .challenge-status {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 9px 12px;
            border-radius: 10px;
            margin-top: 0;
            font-size: 13px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.06em;
        }

        .challenge-status.active {
            background: rgba(77, 171, 154, 0.1);
            color: #4DAB9A;
        }

        .challenge-status.failed {
            background: rgba(239, 68, 68, 0.1);
            color: #ef4444;
        }

        .challenge-status.passed {
            background: rgba(34, 197, 94, 0.1);
            color: #22c55e;
        }

        /* Mini progress bars for rules */
        .prop-rule-progress {
            height: 5px;
            background: rgba(255,255,255,0.08);
            border-radius: 999px;
            margin-top: 8px;
            overflow: hidden;
        }

        .prop-rule-progress-fill {
            height: 100%;
            border-radius: 999px;
            transition: width 0.3s ease;
        }

        .prop-rule-progress-fill.safe {
            background: #4DAB9A;
        }

        .prop-rule-progress-fill.warning {
            background: #fbbf24;
        }

        .prop-rule-progress-fill.danger {
            background: #ef4444;
        }

        /* Modal Prop Firm Section */
        .modal-section-title {
            font-size: 13px;
            font-weight: 600;
            color: #85858f;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            margin-bottom: 14px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .modal-section-title::after {
            content: '';
            flex: 1;
            height: 1px;
            background: rgba(255,255,255,0.06);
        }

        .modal-section-title--tight {
            margin: 0;
        }

        .goal-modal.modal--account-settings .modal-section-title {
            margin-bottom: 10px;
            color: #90949d;
        }

        .goal-modal.modal--account-settings .modal-section-title::after {
            display: none;
        }

        .account-type-selector {
            display: flex;
            gap: 8px;
            margin-bottom: 20px;
        }

        .goal-modal.modal--account-settings .account-type-selector {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 12px;
            margin-bottom: 20px;
        }

        .account-type-option {
            flex: 1;
            padding: 14px;
            background: rgba(255,255,255,0.03);
            border: 2px solid rgba(255,255,255,0.08);
            border-radius: 14px;
            cursor: pointer;
            transition: all 0.2s;
            text-align: center;
        }

        .goal-modal.modal--account-settings .account-type-option {
            display: flex;
            align-items: center;
            gap: 12px;
            min-height: 84px;
            padding: 14px 16px;
            border-width: 1px;
            text-align: left;
        }

        .account-type-option:hover {
            background: rgba(255,255,255,0.04);
            border-color: rgba(255,255,255,0.12);
        }

        .account-type-option.selected {
            background: rgba(77, 171, 154, 0.1);
            border-color: #4DAB9A;
        }

        .account-type-option-icon {
            width: 32px;
            height: 32px;
            margin: 0 auto 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(255,255,255,0.04);
            border-radius: 8px;
            color: #5c5c66;
        }

        .goal-modal.modal--account-settings .account-type-option-icon {
            margin: 0;
            width: 34px;
            height: 34px;
            flex-shrink: 0;
        }

        .account-type-option.selected .account-type-option-icon {
            background: rgba(77, 171, 154, 0.2);
            color: #4DAB9A;
        }

        .account-type-option-copy {
            display: flex;
            flex-direction: column;
            gap: 3px;
            min-width: 0;
        }

        .account-type-option-label {
            font-size: 14px;
            font-weight: 600;
            color: #f0f0f2;
        }

        .account-type-option-desc {
            font-size: 13px;
            color: #5c5c66;
            margin-top: 2px;
        }

        .goal-modal.modal--account-settings .account-type-option-desc {
            margin-top: 0;
            color: #7e828b;
        }

        .prop-rules-section {
            display: none;
            margin-top: 16px;
            padding-top: 16px;
            border-top: 1px solid rgba(255,255,255,0.06);
        }

        .goal-modal.modal--account-settings .prop-rules-section {
            margin-top: 6px;
            padding-top: 18px;
        }

        .prop-rules-section.visible {
            display: block;
        }

        .prop-preset-selector {
            margin-bottom: 16px;
        }

        .prop-preset-select {
            width: 100%;
            padding: 12px 38px 12px 14px;
            background: rgba(255,255,255,0.045);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 12px;
            font-size: 14px;
            color: #f0f0f2;
            cursor: pointer;
            appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 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 14px center;
        }

        .prop-preset-select:focus {
            outline: none;
            border-color: #4DAB9A;
        }

        .goal-modal-intro {
            margin-top: -2px;
            margin-bottom: 18px;
        }

        .goal-modal.modal--account-settings .goal-modal-intro {
            margin-top: 0;
            margin-bottom: 20px;
            font-size: 14px;
            line-height: 1.55;
            color: #80848d;
        }

        #csv-step-upload .form-section,
        #csv-step-mapping .form-section,
        #csv-step-results .form-section {
            background: transparent;
            border-color: rgba(255,255,255,0.05);
            box-shadow: none;
        }

        #csv-step-mapping .form-section-title,
        #csv-step-upload .form-section-title,
        #csv-step-results .form-section-title {
            margin-bottom: 14px;
        }

        .csv-drop-icon {
            display: block;
            margin: 0 auto 8px;
            width: 32px;
            height: 32px;
            color: #4DAB9A;
        }

        .csv-drop-title {
            font-size: 15px;
            font-weight: 600;
            margin-bottom: 4px;
            color: #ececf0;
        }

        .csv-drop-meta {
            font-size: 13px;
            color: #6d6d77;
            line-height: 1.5;
        }

        .csv-drop-file {
            font-size: 14px;
            font-weight: 600;
            color: #4DAB9A;
        }

        .csv-drop-zone {
            padding: 32px 16px;
            transition: border-color 0.2s, background 0.2s;
        }

        .csv-drop-copy {
            text-align: center;
        }

        .journal-import-drop-overlay {
            position: fixed;
            inset: 0;
            z-index: 920;
            display: grid;
            place-items: center;
            padding: 32px;
            background: rgba(8, 10, 12, 0.18);
            backdrop-filter: blur(4px);
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
            transition: opacity 0.18s ease, visibility 0.18s ease;
        }

        .journal-import-drop-overlay.active {
            opacity: 1;
            visibility: visible;
        }

        .journal-import-drop-card {
            width: min(420px, calc(100vw - 48px));
            padding: 0;
            text-align: center;
        }

        .journal-import-drop-plus {
            width: auto;
            height: auto;
            margin: 0 auto 14px;
            display: grid;
            place-items: center;
            color: #9fe3d7;
            font-size: 56px;
            font-weight: 250;
            line-height: 1;
        }

        .journal-import-drop-title {
            font-size: 20px;
            font-weight: 600;
            line-height: 1.25;
            color: #f1f3f5;
        }

        .journal-import-drop-body {
            margin-top: 8px;
            font-size: 12px;
            line-height: 1.5;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            color: #7f878f;
        }

        .csv-upload-note {
            margin-top: 12px;
            font-size: 13px;
            color: #6d6d77;
            line-height: 1.6;
        }

        .csv-mapping-copy {
            margin: 0;
            padding: 12px 14px;
            border-radius: 12px;
            border: 1px solid rgba(255,255,255,0.055);
            background: rgba(255,255,255,0.022);
            font-size: 13px;
            color: #6d6d77;
            line-height: 1.55;
        }

        .csv-mapping-toolbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            margin: 0 0 12px;
            padding: 10px 12px;
            border-radius: 12px;
            border: 1px solid rgba(255,255,255,0.06);
            background: rgba(255,255,255,0.028);
        }

        .csv-mapping-toolbar-copy {
            min-width: 0;
            font-size: 12px;
            line-height: 1.5;
            color: #9aa2a9;
        }

        .csv-mapping-toggle {
            flex-shrink: 0;
            border: 1px solid rgba(77,171,154,0.2);
            background: rgba(77,171,154,0.1);
            color: #b6efe2;
            border-radius: 999px;
            padding: 8px 12px;
            font-size: 12px;
            font-weight: 700;
            letter-spacing: 0.02em;
            transition: all 0.18s ease;
        }

        .csv-mapping-toggle:hover {
            border-color: rgba(77,171,154,0.32);
            background: rgba(77,171,154,0.14);
            color: #d3fbf2;
        }

        .csv-smart-detect {
            display: grid;
            gap: 10px;
            padding: 14px;
            border-radius: 14px;
            border: 1px solid rgba(255,255,255,0.06);
            background:
                linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.015) 100%),
                rgba(15,16,18,0.82);
        }

        .csv-smart-detect--loading {
            border-color: rgba(255,255,255,0.08);
        }

        .csv-smart-detect--low {
            border-color: rgba(251, 191, 36, 0.24);
            background:
                linear-gradient(180deg, rgba(251, 191, 36, 0.08) 0%, rgba(251, 191, 36, 0.04) 100%),
                rgba(15,16,18,0.86);
        }

        .csv-smart-detect--medium {
            border-color: rgba(77,171,154,0.18);
            background:
                linear-gradient(180deg, rgba(77,171,154,0.07) 0%, rgba(77,171,154,0.03) 100%),
                rgba(15,16,18,0.86);
        }

        .csv-smart-detect--high {
            border-color: rgba(77,171,154,0.22);
            background:
                linear-gradient(180deg, rgba(77,171,154,0.08) 0%, rgba(77,171,154,0.04) 100%),
                rgba(15,16,18,0.86);
        }

        .csv-smart-detect-head {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 12px;
        }

        .csv-smart-detect-copy {
            min-width: 0;
        }

        .csv-smart-detect-kicker {
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            color: #8e959d;
            margin-bottom: 4px;
        }

        .csv-smart-detect-title {
            font-size: 15px;
            line-height: 1.35;
            font-weight: 700;
            color: #eef2f3;
        }

        .csv-smart-detect-status {
            flex-shrink: 0;
            padding: 5px 9px;
            border-radius: 999px;
            border: 1px solid rgba(255,255,255,0.08);
            background: rgba(255,255,255,0.04);
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.05em;
            text-transform: uppercase;
            color: #cfd5d9;
        }

        .csv-smart-detect--high .csv-smart-detect-status {
            border-color: rgba(77,171,154,0.24);
            background: rgba(77,171,154,0.12);
            color: #9edccd;
        }

        .csv-smart-detect--medium .csv-smart-detect-status {
            border-color: rgba(77,171,154,0.22);
            background: rgba(77,171,154,0.1);
            color: #9edccd;
        }

        .csv-smart-detect--low .csv-smart-detect-status {
            border-color: rgba(251,191,36,0.24);
            background: rgba(251,191,36,0.12);
            color: #f7cc73;
        }

        .csv-smart-detect-body {
            font-size: 13px;
            line-height: 1.6;
            color: #b9c0c6;
        }

        .csv-smart-detect-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .csv-smart-detect-pill {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 7px 10px;
            border-radius: 999px;
            border: 1px solid rgba(255,255,255,0.08);
            background: rgba(255,255,255,0.035);
            font-size: 12px;
            color: #d6dde0;
        }

        .csv-smart-detect-pill strong {
            color: #f0f4f5;
            font-weight: 700;
        }

        .csv-smart-detect-list {
            display: grid;
            gap: 6px;
        }

        .csv-smart-detect-item {
            font-size: 12px;
            line-height: 1.55;
            color: #8f959d;
            padding-left: 12px;
            position: relative;
        }

        .csv-smart-detect-item::before {
            content: '';
            position: absolute;
            left: 0;
            top: 8px;
            width: 4px;
            height: 4px;
            border-radius: 999px;
            background: rgba(255,255,255,0.22);
        }

        .csv-manual-review {
            border-radius: 14px;
            border: 1px solid rgba(255,255,255,0.08);
            background: transparent;
            box-shadow: none;
            overflow: hidden;
        }

        .csv-manual-review[open] {
            border-color: rgba(255,255,255,0.08);
            background: transparent;
        }

        .csv-manual-review-summary {
            list-style: none;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding: 14px;
            cursor: pointer;
            background: transparent;
        }

        .csv-manual-review-summary::-webkit-details-marker {
            display: none;
        }

        .csv-manual-review-title {
            font-size: 14px;
            font-weight: 700;
            color: #eef2f3;
        }

        .csv-manual-review-subtitle {
            margin-top: 3px;
            font-size: 12px;
            line-height: 1.5;
            color: #8f959d;
        }

        .csv-manual-review-meta {
            flex-shrink: 0;
            padding: 5px 9px;
            border-radius: 999px;
            border: 1px solid rgba(255,255,255,0.08);
            background: rgba(255,255,255,0.04);
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.05em;
            text-transform: uppercase;
            color: #cfd5d9;
        }

        .csv-manual-review-body {
            padding: 14px;
            border-top: 1px solid rgba(255,255,255,0.05);
            display: grid;
            gap: 14px;
        }

        .csv-copy-strong {
            color: #f0f0f2;
        }

        .csv-copy-accent {
            color: #ffb74d;
        }

        .csv-mapping-fields {
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        .csv-mapping-group {
            display: grid;
            gap: 10px;
            padding: 12px;
            border-radius: 14px;
            border: 1px solid rgba(255,255,255,0.055);
            background:
                linear-gradient(180deg, rgba(255,255,255,0.022) 0%, rgba(255,255,255,0.01) 100%),
                rgba(255,255,255,0.01);
        }

        .csv-mapping-group--advanced {
            border-color: rgba(255,255,255,0.045);
            background:
                linear-gradient(180deg, rgba(255,255,255,0.018) 0%, rgba(255,255,255,0.008) 100%),
                rgba(255,255,255,0.008);
        }

        .csv-mapping-group--advanced[open] .csv-mapping-group-summary-meta::after {
            transform: rotate(225deg);
            margin-top: 2px;
        }

        .csv-mapping-group--advanced .csv-mapping-group-body {
            padding: 0 12px 12px;
            border-top: 1px solid rgba(255,255,255,0.04);
        }

        .csv-mapping-group--rebuild {
            padding: 0;
            border-color: rgba(255,255,255,0.05);
            background:
                linear-gradient(180deg, rgba(255,255,255,0.018) 0%, rgba(255,255,255,0.01) 100%),
                rgba(255,255,255,0.008);
            overflow: hidden;
        }

        .csv-mapping-group-summary {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding: 12px;
            cursor: pointer;
            list-style: none;
        }

        .csv-mapping-group-summary::-webkit-details-marker {
            display: none;
        }

        .csv-mapping-group-summary-copy {
            min-width: 0;
            display: grid;
            gap: 3px;
        }

        .csv-mapping-group-summary-meta {
            flex-shrink: 0;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 6px 10px;
            border-radius: 999px;
            border: 1px solid rgba(255,255,255,0.06);
            background: rgba(255,255,255,0.03);
            font-size: 11px;
            font-weight: 600;
            letter-spacing: 0.03em;
            color: #aab2b9;
        }

        .csv-mapping-group-summary-meta::after {
            content: '';
            width: 7px;
            height: 7px;
            border-right: 1.5px solid currentColor;
            border-bottom: 1.5px solid currentColor;
            transform: rotate(45deg);
            margin-top: -2px;
            transition: transform 0.18s ease;
            opacity: 0.8;
        }

        .csv-mapping-group--rebuild[open] .csv-mapping-group-summary-meta::after {
            transform: rotate(225deg);
            margin-top: 2px;
        }

        .csv-mapping-group--rebuild .csv-mapping-group-body {
            padding: 0 12px 12px;
            border-top: 1px solid rgba(255,255,255,0.045);
        }

        .csv-mapping-group-head {
            display: grid;
            gap: 3px;
        }

        .csv-mapping-group-title {
            font-size: 12px;
            font-weight: 700;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: #dfe5e7;
        }

        .csv-mapping-group-subtitle {
            font-size: 12px;
            line-height: 1.5;
            color: #7f8790;
        }

        .csv-mapping-group-body {
            display: grid;
            gap: 8px;
        }

        .csv-mapping-hint {
            margin-top: 0;
            padding: 8px 12px;
            border-radius: 8px;
            font-size: 13px;
            line-height: 1.55;
            transition: all 0.2s;
        }

        .csv-mapping-signals {
            display: grid;
            gap: 12px;
        }

        .csv-date-guidance {
            margin-top: 0;
            padding: 14px;
            border-radius: 14px;
            border: 1px solid rgba(255,255,255,0.06);
            background:
                linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.015) 100%),
                rgba(15,16,18,0.82);
            display: grid;
            gap: 12px;
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
        }

        .csv-date-guidance--compact {
            gap: 8px;
            padding: 12px 14px;
        }

        .csv-date-guidance.is-warning {
            border-color: rgba(251, 191, 36, 0.22);
            background:
                linear-gradient(180deg, rgba(251, 191, 36, 0.08) 0%, rgba(251, 191, 36, 0.04) 100%),
                rgba(15,16,18,0.86);
        }

        .csv-date-guidance.is-positive {
            border-color: rgba(77,171,154,0.22);
            background:
                linear-gradient(180deg, rgba(77,171,154,0.08) 0%, rgba(77,171,154,0.035) 100%),
                rgba(15,16,18,0.86);
        }

        .csv-date-guidance-head {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 10px;
        }

        .csv-date-guidance-kicker {
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            color: #8e959d;
            margin-bottom: 4px;
        }

        .csv-date-guidance-title {
            font-size: 15px;
            font-weight: 700;
            line-height: 1.35;
            color: #eff2f3;
        }

        .csv-date-guidance-status {
            flex-shrink: 0;
            padding: 5px 9px;
            border-radius: 999px;
            border: 1px solid rgba(255,255,255,0.08);
            background: rgba(255,255,255,0.04);
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.05em;
            text-transform: uppercase;
            color: #cfd5d9;
        }

        .csv-date-guidance-status.is-warning {
            border-color: rgba(251, 191, 36, 0.24);
            background: rgba(251, 191, 36, 0.1);
            color: #f5cf7d;
        }

        .csv-date-guidance-status.is-positive {
            border-color: rgba(77,171,154,0.26);
            background: rgba(77,171,154,0.12);
            color: #9edccd;
        }

        .csv-date-guidance-body {
            font-size: 13px;
            line-height: 1.6;
            color: #b9c0c6;
        }

        .csv-date-guidance-toggle {
            justify-self: flex-start;
            border: 1px solid rgba(255,255,255,0.08);
            background: rgba(255,255,255,0.03);
            color: #d7dde1;
            border-radius: 999px;
            padding: 7px 11px;
            font-size: 12px;
            font-weight: 700;
            transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
        }

        .csv-date-guidance-toggle:hover {
            border-color: rgba(255,255,255,0.14);
            background: rgba(255,255,255,0.05);
            color: #eef2f3;
        }

        .csv-date-choice-group {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 8px;
        }

        .csv-date-choice-btn {
            appearance: none;
            border: 1px solid rgba(255,255,255,0.08);
            background: rgba(255,255,255,0.03);
            color: #d9dddf;
            border-radius: 12px;
            padding: 10px 12px;
            display: grid;
            gap: 3px;
            text-align: left;
            cursor: pointer;
            transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
        }

        .csv-date-choice-btn:hover {
            border-color: rgba(255,255,255,0.14);
            background: rgba(255,255,255,0.05);
            transform: translateY(-1px);
        }

        .csv-date-choice-btn.is-active {
            border-color: rgba(77,171,154,0.3);
            background: rgba(77,171,154,0.12);
            box-shadow: inset 0 0 0 1px rgba(77,171,154,0.08);
        }

        .csv-date-choice-btn.is-recommended:not(.is-active) {
            border-color: rgba(77,171,154,0.2);
            background: rgba(77,171,154,0.08);
        }

        .csv-date-choice-label {
            font-size: 13px;
            font-weight: 700;
            color: #eef2f3;
        }

        .csv-date-choice-meta {
            font-size: 11px;
            color: #8f959d;
        }

        .csv-date-guidance-examples {
            display: grid;
            gap: 8px;
        }

        .csv-date-example-card {
            border-radius: 12px;
            border: 1px solid rgba(255,255,255,0.05);
            background: rgba(255,255,255,0.025);
            overflow: hidden;
        }

        .csv-date-example-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            padding: 10px 12px;
            border-bottom: 1px solid rgba(255,255,255,0.04);
        }

        .csv-date-example-raw {
            font-size: 13px;
            font-weight: 700;
            color: #f1f4f5;
        }

        .csv-date-example-badge {
            font-size: 10px;
            font-weight: 700;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: #7e858d;
        }

        .csv-date-example-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .csv-date-example-option {
            padding: 10px 12px;
            display: grid;
            gap: 4px;
        }

        .csv-date-example-option + .csv-date-example-option {
            border-left: 1px solid rgba(255,255,255,0.04);
        }

        .csv-date-example-option-label {
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            color: #8a9198;
        }

        .csv-date-example-option-value {
            font-size: 13px;
            color: #d7dde1;
            line-height: 1.45;
        }

        .csv-date-example-option.is-active .csv-date-example-option-label,
        .csv-date-example-option.is-active .csv-date-example-option-value {
            color: #9edccd;
        }

        .csv-date-example-note {
            font-size: 12px;
            line-height: 1.55;
            color: #899099;
        }

        .csv-mapping-signal {
            padding: 12px 14px;
            border-radius: 12px;
            border: 1px solid rgba(255,255,255,0.06);
            background: rgba(255,255,255,0.028);
            display: grid;
            gap: 8px;
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.018);
        }

        .csv-mapping-signal--info {
            border-color: rgba(77,171,154,0.16);
            background: rgba(77,171,154,0.055);
        }

        .csv-mapping-signal--warning {
            border-color: rgba(251, 191, 36, 0.2);
            background: rgba(251, 191, 36, 0.08);
        }

        .csv-mapping-signal--positive {
            border-color: rgba(77,171,154,0.18);
            background: rgba(77,171,154,0.07);
        }

        .csv-mapping-signal-title {
            font-size: 12px;
            font-weight: 700;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: #d9dddf;
        }

        .csv-mapping-signal--info .csv-mapping-signal-title {
            color: #9edccd;
        }

        .csv-mapping-signal--warning .csv-mapping-signal-title {
            color: #f7cc73;
        }

        .csv-mapping-signal--positive .csv-mapping-signal-title {
            color: #9edccd;
        }

        .csv-mapping-signal-body {
            font-size: 13px;
            line-height: 1.55;
            color: #b7bdc4;
        }

        .csv-mapping-signal-list {
            display: grid;
            gap: 6px;
            padding-top: 2px;
        }

        .csv-mapping-signal-item {
            font-size: 12px;
            line-height: 1.5;
            color: #8f959d;
            padding-left: 12px;
            position: relative;
        }

        .csv-mapping-signal-item::before {
            content: '';
            position: absolute;
            left: 0;
            top: 8px;
            width: 4px;
            height: 4px;
            border-radius: 999px;
            background: rgba(255,255,255,0.22);
        }

        .csv-date-format-note {
            margin-top: 7px;
            font-size: 12px;
            line-height: 1.5;
            color: #7b7b84;
        }

        .csv-date-format-note code {
            font-family: inherit;
            font-size: 12px;
            color: #cfd7d5;
            background: rgba(255,255,255,0.04);
            padding: 1px 5px;
            border-radius: 999px;
        }

        @media (max-width: 720px) {
            .csv-date-guidance-head {
                flex-direction: column;
                align-items: flex-start;
            }

            .csv-date-choice-group {
                grid-template-columns: 1fr;
            }

            .csv-date-example-grid {
                grid-template-columns: 1fr;
            }

            .csv-date-example-option + .csv-date-example-option {
                border-left: none;
                border-top: 1px solid rgba(255,255,255,0.04);
            }
        }

        .csv-preview-section {
            margin-bottom: 0;
        }

        .csv-preview-wrap {
            overflow-x: auto;
            overflow-y: auto;
            max-height: 120px;
            font-size: 13px;
        }

        .csv-toggle-section {
            margin-top: 4px;
        }

        .csv-result-hero {
            padding: 18px 0 16px;
            text-align: center;
        }

        .csv-result-icon {
            width: 56px;
            height: 56px;
            margin: 0 auto 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 16px;
        }

        .csv-result-icon-mark {
            width: 32px;
            height: 32px;
        }

        .csv-result-title {
            margin: 0 0 8px;
            font-size: 18px;
            font-weight: 600;
        }

        .csv-result-subtitle {
            margin: 0;
            font-size: 13px;
            color: #5c5c66;
            line-height: 1.55;
        }

        .csv-result-progress {
            width: min(100%, 520px);
            margin: 16px auto 0;
            display: grid;
            gap: 10px;
        }

        .csv-result-progress-track {
            position: relative;
            height: 7px;
            border-radius: 999px;
            background: rgba(255,255,255,0.06);
            overflow: hidden;
            border: 1px solid rgba(255,255,255,0.05);
        }

        .csv-result-progress-fill {
            height: 100%;
            width: 0;
            border-radius: inherit;
            background: linear-gradient(90deg, rgba(77,171,154,0.62), rgba(77,171,154,1));
            box-shadow: 0 0 18px rgba(77,171,154,0.25);
            transition: width 220ms ease;
        }

        .csv-result-progress-caption {
            font-size: 12px;
            color: #8f959d;
            letter-spacing: 0.01em;
        }

        .csv-result-progress-steps {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 8px;
        }

        .csv-result-progress-step {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 6px 10px;
            border-radius: 999px;
            border: 1px solid rgba(255,255,255,0.06);
            background: rgba(255,255,255,0.028);
            color: #70757f;
            font-size: 11px;
            font-weight: 600;
            letter-spacing: 0.08em;
            text-transform: uppercase;
        }

        .csv-result-progress-step::before {
            content: '';
            width: 6px;
            height: 6px;
            border-radius: 999px;
            background: rgba(255,255,255,0.16);
        }

        .csv-result-progress-step.is-active {
            color: #d7efea;
            background: rgba(77,171,154,0.1);
            border-color: rgba(77,171,154,0.22);
            box-shadow: 0 0 0 1px rgba(77,171,154,0.06) inset;
        }

        .csv-result-progress-step.is-active::before {
            background: #4DAB9A;
            box-shadow: 0 0 10px rgba(77,171,154,0.45);
        }

        .csv-result-progress-step.is-complete {
            color: #a9dacf;
            border-color: rgba(77,171,154,0.14);
            background: rgba(77,171,154,0.055);
        }

        .csv-result-progress-step.is-complete::before {
            background: rgba(77,171,154,0.8);
        }

        .csv-result-spinner {
            width: 32px;
            height: 32px;
            border-radius: 999px;
            border: 2.5px solid rgba(77,171,154,0.14);
            border-top-color: #4DAB9A;
            border-right-color: rgba(77,171,154,0.6);
            animation: csv-import-spin 0.9s linear infinite;
        }

        @keyframes csv-import-spin {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }

        .csv-result-messages,
        .csv-result-errors {
            display: none;
            margin-top: 16px;
            padding: 10px 14px;
            max-height: 120px;
            overflow-y: auto;
            border-radius: 8px;
            font-size: 13px;
            line-height: 1.55;
        }

        .csv-result-messages {
            background: rgba(77,171,154,0.07);
            border: 1px solid rgba(77,171,154,0.16);
            color: #b8ddd5;
        }

        .csv-result-errors {
            background: rgba(239,68,68,0.06);
            border: 1px solid rgba(239,68,68,0.12);
            color: #bbb;
        }

        .csv-result-breakdown,
        .csv-result-insights {
            display: none;
            width: min(100%, 680px);
            max-width: 680px;
            margin: 22px auto 0;
            justify-items: stretch;
        }

        .csv-result-breakdown {
            display: grid;
            gap: 10px;
        }

        .csv-result-insights {
            display: grid;
            gap: 10px;
        }

        .csv-result-section-title {
            width: 100%;
            font-size: 12px;
            font-weight: 700;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: #8f959d;
            text-align: center;
            margin-bottom: 2px;
        }

        .csv-result-chip-row {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            justify-content: center;
            align-items: center;
        }

        .csv-result-chip {
            display: inline-grid;
            grid-auto-flow: column;
            align-items: baseline;
            gap: 8px;
            padding: 10px 12px;
            min-height: 42px;
            border-radius: 999px;
            border: 1px solid rgba(255,255,255,0.06);
            background: rgba(255,255,255,0.028);
            font-size: 12.5px;
            color: #8f959d;
            line-height: 1.2;
        }

        .csv-result-chip strong {
            color: #eef2f3;
            font-weight: 700;
        }

        .csv-result-insight-grid {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            justify-content: center;
            align-items: center;
        }

        .csv-result-breakdown + .csv-result-insights,
        .csv-result-messages + .csv-result-breakdown,
        .csv-result-errors + .csv-result-breakdown {
            margin-top: 24px;
        }

        .csv-result-insight {
            display: inline-grid;
            grid-auto-flow: column;
            align-items: baseline;
            gap: 8px;
            padding: 10px 12px;
            min-height: 42px;
            border-radius: 999px;
            border: 1px solid rgba(255,255,255,0.06);
            background: rgba(255,255,255,0.028);
        }

        .csv-result-insight-label {
            font-size: 12px;
            font-weight: 700;
            color: #dfe5e7;
            line-height: 1.2;
        }

        .csv-result-insight-divider {
            font-size: 12px;
            color: #646a73;
        }

        .csv-result-insight-value {
            font-size: 12px;
            font-weight: 600;
            color: #8f959d;
            line-height: 1.2;
        }

        @media (max-width: 640px) {
            .csv-result-breakdown,
            .csv-result-insights {
                width: 100%;
                max-width: 100%;
            }

            .csv-result-progress {
                width: 100%;
            }

            .csv-result-progress-steps {
                justify-content: flex-start;
            }

            .csv-result-chip-row,
            .csv-result-insight-grid {
                gap: 8px;
            }

            .csv-result-chip,
            .csv-result-insight {
                width: 100%;
                justify-content: space-between;
            }
        }

        .journal-import-support-banner {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 14px;
            padding: 14px 16px;
            padding-right: 64px;
            border-color: rgba(255,255,255,0.08);
            background: rgba(255,255,255,0.02);
            position: relative;
        }

        .journal-import-support-copy {
            display: flex;
            flex-direction: column;
            gap: 6px;
            min-width: 0;
            flex: 1 1 auto;
        }

        .journal-import-support-kicker {
            font-size: 0.72rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.12em;
            color: #aeb4bc;
        }

        .journal-import-support-dismiss {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 34px;
            height: 34px;
            border-radius: 999px;
            border: none;
            background: transparent;
            color: #8e949d;
            cursor: pointer;
            transition: color 0.18s ease, background 0.18s ease;
            position: absolute;
            top: 8px;
            right: 8px;
        }

        .journal-import-support-dismiss:hover {
            color: #d2d6dd;
            background: rgba(255,255,255,0.04);
        }

        .journal-import-support-title {
            margin: 0;
            font-size: 1rem;
            line-height: 1.35;
            letter-spacing: -0.02em;
            color: #f0f0f2;
        }

        .journal-import-support-file {
            margin: 0;
            font-size: 0.75rem;
            line-height: 1.4;
            color: #7f8690;
            word-break: break-all;
        }

        .journal-import-support-actions {
            display: flex;
            align-items: center;
            flex-shrink: 0;
        }

        .import-support-accent-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            min-height: 44px;
            padding: 12px 18px;
            min-width: 154px;
            border-color: rgba(251, 191, 36, 0.22) !important;
            background: rgba(251, 191, 36, 0.12) !important;
            color: #f8d06a !important;
            box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.04);
            white-space: nowrap;
            font-weight: 700;
            line-height: 1;
        }

        .import-support-accent-btn:hover {
            border-color: rgba(251, 191, 36, 0.34) !important;
            background: rgba(251, 191, 36, 0.16) !important;
            color: #ffe08a !important;
        }

        .import-support-accent-btn .btn-icon-16 {
            flex-shrink: 0;
            display: block;
        }

        .import-support-accent-btn:disabled {
            opacity: 0.72;
        }

        .import-support-modal {
            width: min(100%, 720px);
        }

        .import-support-body {
            display: flex;
            flex-direction: column;
            gap: 18px;
        }

        .import-support-summary {
            display: flex;
            flex-direction: column;
            gap: 6px;
            padding-bottom: 14px;
            border-bottom: 1px solid rgba(255,255,255,0.08);
        }

        .import-support-summary-kicker {
            color: #fbbf24;
            font-size: 0.74rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.12em;
        }

        .import-support-summary-body {
            color: #c7ccd5;
            line-height: 1.55;
            font-size: 0.95rem;
            max-width: 620px;
        }

        .import-support-block {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .import-support-section-head {
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            gap: 12px;
        }

        .import-support-section-kicker {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            color: #c7ccd5;
            font-size: 0.82rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.08em;
        }

        .import-support-section-hint {
            color: #787f88;
            font-size: 0.82rem;
        }

        .import-support-note-label {
            display: inline-flex;
            align-items: center;
            cursor: default;
        }

        .import-support-note-helper {
            color: #8d949d;
            font-size: 0.86rem;
            line-height: 1.5;
        }

        .import-support-issue-grid {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 10px;
        }

        .import-support-issue-card {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 8px;
            width: 100%;
            padding: 14px;
            border-radius: 14px;
            border: 1px solid rgba(255,255,255,0.08);
            background: rgba(255,255,255,0.025);
            color: #c7ccd5;
            text-align: left;
            transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
        }

        .import-support-issue-card strong {
            font-size: 0.9rem;
            color: #f0f0f2;
        }

        .import-support-issue-card span {
            font-size: 0.8rem;
            line-height: 1.5;
            color: #9aa0a8;
        }

        .import-support-issue-card:hover {
            transform: translateY(-1px);
            border-color: rgba(255,255,255,0.12);
        }

        .import-support-issue-card.is-active {
            border-color: rgba(77, 171, 154, 0.35);
            background: rgba(77, 171, 154, 0.09);
        }

        .import-support-textarea {
            min-height: 124px;
            resize: vertical;
            border-radius: 16px;
            background: rgba(255,255,255,0.022);
        }

        @media (max-width: 900px) {
            .journal-import-support-banner {
                flex-direction: column;
                align-items: stretch;
                padding: 13px 14px;
                padding-right: 52px;
            }

            .journal-import-support-actions {
                justify-content: flex-start;
            }

            .journal-import-support-actions .app-action-btn {
                width: 100%;
                justify-content: center;
            }

            .import-support-issue-grid {
                grid-template-columns: 1fr;
            }
        }

        .csv-mapping-row {
            display: grid;
            grid-template-columns: minmax(0, 1fr) 28px minmax(240px, 0.95fr);
            align-items: center;
            gap: 12px;
            padding: 10px 12px;
            background: rgba(255,255,255,0.018);
            border: 1px solid rgba(255,255,255,0.055);
            border-radius: 10px;
        }

        .csv-mapping-source {
            min-width: 0;
        }

        .csv-mapping-header {
            font-size: 14px;
            font-weight: 600;
            color: #f0f0f2;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .csv-mapping-sample {
            margin-top: 3px;
            font-size: 13px;
            line-height: 1.45;
            color: #7b7b84;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .csv-mapping-note {
            margin-top: 5px;
            font-size: 12px;
            line-height: 1.45;
            color: #fbbf24;
        }

        .csv-mapping-arrow {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            color: #6d6d77;
        }

        .csv-mapping-arrow i {
            width: 15px;
            height: 15px;
        }

        .csv-field-select {
            min-width: 0;
            padding: 10px 40px 10px 14px;
            font-size: 14px;
            line-height: 1.3;
            background-color: rgba(255,255,255,0.022);
            border: 1px solid rgba(255,255,255,0.06);
            border-radius: 10px;
            appearance: 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='%23a0a0aa' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 14px center;
        }

        .csv-field-select:hover {
            border-color: rgba(255,255,255,0.09);
            background-color: rgba(255,255,255,0.03);
        }

        .csv-field-select:focus {
            background-color: rgba(255,255,255,0.034);
        }

        .csv-field-select--error {
            border-color: rgba(239, 68, 68, 0.45);
            background-color: rgba(239, 68, 68, 0.08);
        }

        .csv-field-select--error:hover,
        .csv-field-select--error:focus {
            border-color: rgba(239, 68, 68, 0.55);
            background-color: rgba(239, 68, 68, 0.1);
        }

        .csv-mapping-row--error {
            border-color: rgba(239, 68, 68, 0.22);
            background: rgba(239, 68, 68, 0.035);
        }

        .csv-mapping-row--compact-hidden {
            display: none;
        }

        .csv-preview-table {
            width: 100%;
            border-collapse: collapse;
            table-layout: auto;
        }

        .csv-preview-table th {
            padding: 7px 8px;
            text-align: left;
            font-size: 13px;
            font-weight: 600;
            color: #8a8a94;
            border-bottom: 1px solid rgba(255,255,255,0.06);
            white-space: nowrap;
        }

        .csv-preview-table td {
            padding: 6px 8px;
            font-size: 13px;
            line-height: 1.45;
            color: #c3c3c8;
            white-space: nowrap;
            max-width: 140px;
            overflow: hidden;
            text-overflow: ellipsis;
            border-bottom: 1px solid rgba(255,255,255,0.035);
        }

        .csv-preview-table tr:last-child td {
            border-bottom: 0;
        }

        .prop-rules-inputs {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
        }

        .prop-rule-input-group {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .prop-rule-input-group.full-width {
            grid-column: 1 / -1;
        }

        .prop-rule-input-label {
            font-size: 13px;
            font-weight: 500;
            color: #9898a0;
        }

        .prop-rule-input {
            padding: 12px 13px;
            background: rgba(255,255,255,0.045);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 12px;
            font-size: 14px;
            color: #f0f0f2;
        }

        .prop-rule-input:focus {
            outline: none;
            border-color: #4DAB9A;
        }

        .prop-rule-input::placeholder {
            color: #3a3a42;
        }

        .goal-modal.modal--account-settings .prop-rule-input,
        .goal-modal.modal--account-settings .prop-preset-select {
            min-height: 48px;
            font-size: 14px;
        }

        .goal-modal.modal--account-settings .prop-rule-input-label {
            margin-bottom: 6px;
            font-size: 13px;
            color: #8a8e97;
        }

        .account-transactions-section {
            margin-top: 20px;
        }

        .cash-movements-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 10px;
        }

        .goal-modal.modal--account-settings .cash-movements-header {
            margin-bottom: 12px;
        }

        .cash-movements-add-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            min-height: 34px;
            padding: 7px 11px;
            border-radius: 10px;
            font-size: 13px;
            font-weight: 600;
            line-height: 1;
            white-space: nowrap;
            color: #4DAB9A;
            background: rgba(77,171,154,0.1);
            border: 1px solid rgba(77,171,154,0.2);
        }

        .goal-modal.modal--account-settings .cash-movements-add-btn {
            min-height: 36px;
            padding: 8px 12px;
            border-radius: 11px;
        }

        .cash-movements-add-btn:hover {
            background: rgba(77,171,154,0.15);
            border-color: rgba(77,171,154,0.28);
        }

        .cash-movements-add-icon {
            width: 12px;
            height: 12px;
            flex-shrink: 0;
            display: block;
        }

        .account-cash-flow-summary {
            align-items: center;
            justify-content: space-between;
            margin-bottom: 8px;
            padding: 8px 12px;
            border-radius: 8px;
            background: rgba(255,255,255,0.03);
        }

        .account-transactions-list {
            max-height: 200px;
            overflow-y: auto;
            border: 1px solid rgba(255,255,255,0.06);
            border-radius: 8px;
        }

        /* Phase indicator */
        .phase-indicator {
            display: flex;
            align-items: center;
            gap: 4px;
            margin-top: 12px;
        }

        .phase-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: rgba(255,255,255,0.1);
        }

        .phase-dot.active {
            background: #4DAB9A;
        }

        .phase-dot.completed {
            background: #22c55e;
        }

        .phase-line {
            flex: 1;
            height: 2px;
            background: rgba(255,255,255,0.1);
        }

        .phase-line.completed {
            background: #22c55e;
        }

        .phase-label {
            font-size: 12px;
            color: #5c5c66;
            text-transform: uppercase;
        }

        /* Trading days counter */
        .trading-days-counter {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 10px;
            background: rgba(255,255,255,0.02);
            border-radius: 6px;
            margin-top: 8px;
        }

        .trading-days-dots {
            display: flex;
            gap: 3px;
        }

        .trading-day-dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: rgba(255,255,255,0.1);
        }

        .trading-day-dot.filled {
            background: #4DAB9A;
        }

        .trading-days-text {
            font-size: 12px;
            color: #5c5c66;
        }

        .trading-days-text strong {
            color: #f0f0f2;
        }

        /* MAIN CONTENT */
        .trades-main {
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        .trades-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 16px;
        }

        .trades-header-actions {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 10px;
            flex-wrap: wrap;
            align-self: flex-start;
            margin-left: auto;
        }

        .actions-primary,
        .actions-secondary {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }

        /* NEW STATS ROW - Card-based design */
        .stats-row {
            display: grid;
            grid-template-columns: repeat(5, minmax(0, 1fr));
            gap: 0;
        }

.stat-card {
            grid-column: span 1;
            position: relative;
        }

        .stats-row .app-stat-card {
            min-height: 74px;
            padding: 10px 18px;
            background: transparent;
            border: none;
            border-radius: 0;
            box-shadow: none;
            transform: none;
        }

        .journal-overview-stats .stat-card:first-child .app-stat-card {
            padding-left: 0;
        }

        .journal-overview-stats .stat-card:last-child .app-stat-card {
            padding-right: 0;
        }

        .journal-overview-stats .app-stat-card:hover {
            background: transparent;
            border-color: transparent;
            box-shadow: none;
            transform: none;
        }

        .journal-overview-stats .app-stat-card:hover::after {
            width: 0;
        }

        .journal-overview-stats .stat-card:not(:first-child)::before {
            content: '';
            position: absolute;
            inset: 10px auto 10px 0;
            width: 1px;
            background: rgba(255,255,255,0.05);
        }

        .journal-overview-stats .app-stat-card::after {
            display: none;
        }

        .stat-card.highlight {
            background: transparent;
            border-color: transparent;
            box-shadow: none;
        }

        .stat-icon {
            width: 28px;
            height: 28px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(255,255,255,0.022);
            border-radius: 9px;
            color: #6d737d;
        }

        .stat-icon.win { background: rgba(255,255,255,0.026); color: #8b919b; }
        .stat-icon.loss { background: rgba(239, 68, 68, 0.08); color: #dd6e6e; }

        .stat-content {
            display: flex;
            flex-direction: column;
            gap: 3px;
            min-width: 0;
        }

.stat-card .stat-value {
            font-size: var(--journal-fs-metric);
            font-weight: 700;
            line-height: 1;
            letter-spacing: -0.03em;
            font-family: 'JetBrains Mono', monospace;
        }

        .stat-card .stat-label {
            font-size: var(--journal-fs-kicker);
            letter-spacing: 0.08em;
            color: #777a83;
        }

        .stat-support {
            display: none;
        }

        /* Mobile Responsive */
        @media (max-width: 1024px) {
            .filter-input-inline {
                min-width: 100px;
            }

            .stats-row {
                grid-template-columns: repeat(2, minmax(0, 1fr));
                gap: 8px;
            }

            .journal-overview-stats .stat-card::before {
                display: none;
            }

            .stats-row .app-stat-card {
                min-height: 72px;
                padding: 12px 14px;
                background: rgba(255,255,255,0.018);
                border: 1px solid rgba(255,255,255,0.042);
                border-radius: 14px;
                box-shadow: inset 0 1px 0 rgba(255,255,255,0.018);
            }
        }

        @media (max-width: 768px) {
            .journal-header {
                padding: 0;
                border-radius: 0;
            }

            .journal-command-deck {
                padding: 16px;
            }

            .journal-command-deck-head {
                position: static;
                justify-content: space-between;
                margin-bottom: 12px;
            }

            .journal-command-toggle {
                width: auto;
                justify-content: flex-start;
                align-self: flex-start;
            }

            .journal-command-panel--filters .journal-command-head {
                padding-right: 0;
            }

            .journal-command-panel {
                padding: 0;
            }

            .journal-command-head {
                flex-direction: column;
            }

            .journal-review-actions {
                width: 100%;
                align-self: stretch;
                margin-left: 0;
            }

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

            .accounts-section .app-section-header {
                align-items: stretch;
                gap: 12px;
            }

            .accounts-header-actions {
                width: 100%;
                flex-wrap: wrap;
                justify-content: flex-start;
            }

            .accounts-scope-note {
                align-self: stretch;
                width: 100%;
                max-width: 100%;
                margin-top: 6px;
                padding: 8px 10px;
            }

            .filter-account-select {
                flex: 1 1 220px;
                min-width: 0;
            }

            .filters-bar {
                flex-direction: column;
                align-items: stretch;
                gap: 10px;
            }

            .filters-group,
            .filters-search {
                width: 100%;
            }

            .filters-group-dates,
            .filters-group-selects {
                display: grid;
                grid-template-columns: 1fr 1fr;
                gap: 8px;
            }

            .filter-separator {
                display: none;
            }

            .filter-input-inline {
                width: 100%;
            }

            .btn-reset-filters {
                margin-left: 0;
            }

            .accounts-scroll {
                display: flex;
                width: max-content;
                min-width: 100%;
                padding-right: 16px;
            }

            .account-card {
                flex: 0 0 264px;
                width: 264px;
                min-width: 264px;
                max-width: none;
            }
        }

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

            .trades-header-actions {
                width: 100%;
                flex-wrap: nowrap;
                justify-content: flex-start;
                overflow-x: auto;
                padding-bottom: 2px;
                scrollbar-width: none;
                -webkit-overflow-scrolling: touch;
            }

            .trades-header-actions::-webkit-scrollbar {
                display: none;
            }

            .actions-primary,
            .actions-secondary {
                width: auto;
                flex-wrap: nowrap;
                flex-shrink: 0;
            }

            .trades-header-actions .app-toolbar-group-shell {
                flex-shrink: 0;
            }

            .journal-toolbar-view {
                padding-left: 8px;
            }

            .actions-primary .app-action-btn,
            .actions-secondary .app-action-btn {
                flex: 0 0 auto;
                justify-content: center;
            }

            .accounts-section {
                padding: 14px;
            }

            .accounts-section .app-section-header {
                flex-direction: column;
                align-items: stretch;
            }

            .accounts-header-actions {
                display: grid;
                grid-template-columns: repeat(2, minmax(0, 1fr));
                gap: 8px;
            }

            .accounts-header-actions .app-action-btn {
                width: 100%;
                justify-content: center;
            }

            .filter-account-select {
                grid-column: 1 / -1;
                width: 100%;
            }

            .stats-row {
                grid-template-columns: 1fr;
            }

            .stat-card {
                grid-column: span 1;
            }

            .filters-group-dates,
            .filters-group-selects {
                grid-template-columns: 1fr;
            }

            .filters-bar-label,
            .filters-search,
            .btn-reset-filters {
                width: 100%;
            }

            .btn-reset-filters {
                justify-content: center;
            }

            .accounts-scroll {
                display: grid;
                grid-template-columns: 1fr;
                width: 100%;
                min-width: 0;
                padding-right: 0;
            }

            .account-card {
                flex: 0 0 auto;
                min-width: 0;
                max-width: none;
                width: 100%;
            }

            .account-no-goal {
                flex-direction: column;
                align-items: stretch;
            }
        }

        .trades-table {
            width: 100%;
            border-collapse: collapse;
            table-layout: fixed;
        }

        .trades-table .select-col {
            width: 0;
            padding: 0;
            opacity: 0;
            overflow: hidden;
            white-space: nowrap;
        }

        .trades-table.is-selecting .select-col {
            width: 48px;
            padding: 0 8px;
            opacity: 1;
        }

        .trades-table th {
            text-align: left;
            padding: 13px 16px;
            font-size: 11.5px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: #8d929c;
            border-bottom: 1px solid rgba(255,255,255,0.05);
            background: rgba(255,255,255,0.018);
            position: sticky;
            top: 0;
            z-index: 10;
        }

        .trades-table td {
            padding: 16px 16px;
            font-size: 14px;
            border-bottom: 1px solid rgba(255,255,255,0.035);
            color: var(--text-secondary);
            vertical-align: middle;
        }

        .trades-table tr.clickable-row {
            cursor: pointer;
            transition: background 0.18s ease, transform 0.18s ease;
        }

        .trades-table tr.clickable-row:hover td {
            background:
                linear-gradient(180deg, rgba(77, 171, 154, 0.048), rgba(77, 171, 154, 0.03)),
                rgba(255,255,255,0.006);
        }

        .trades-table tr.clickable-row.selected td {
            background:
                linear-gradient(180deg, rgba(77,171,154,0.07), rgba(77,171,154,0.04)),
                rgba(255,255,255,0.008);
        }

        .trades-table .col-date {
            width: 15%;
        }

        .trades-table .col-symbol {
            width: 24%;
        }

        .trades-table .col-side {
            width: 12%;
        }

        .trades-table .col-setup {
            width: 20%;
        }

        .trades-table .col-pl {
            width: 15%;
        }

        .trades-table .col-result {
            width: 9%;
        }

        .trades-table .col-utils {
            width: 88px;
            text-align: right;
        }

        .profit-positive { color: #4DAB9A; font-weight: 600; }
        .profit-negative { color: #ef4444; font-weight: 600; }
        .profit-neutral { color: #c7c7cf; font-weight: 600; }

        .badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 28px;
            padding: 4px 10px;
            border-radius: 999px;
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.07em;
        }

        .badge-win { background: rgba(255,255,255,0.05); color: #c8ccd3; }
        .badge-loss { background: rgba(239, 68, 68, 0.13); color: #f07d7d; }
        .badge-long { background: rgba(34, 197, 94, 0.13); color: #62d889; }
        .badge-short { background: rgba(239, 68, 68, 0.1); color: #ef8b8b; }
        .badge-flat { background: rgba(148, 163, 184, 0.1); color: #bcc5d0; }
        .badge-open { background: rgba(255,255,255,0.05); color: #c8ccd3; }

        /* Source badge — small indicator for Notion/CSV trades */
        .source-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 18px;
            height: 18px;
            border-radius: 5px;
            vertical-align: middle;
            margin-left: 0;
            flex-shrink: 0;
        }

        .source-badge svg {
            width: 11px;
            height: 11px;
            display: block;
        }

        .source-badge.notion {
            background: rgba(255,255,255,0.03);
            color: rgba(255,255,255,0.92);
            border: 1px solid rgba(255,255,255,0.08);
            box-shadow: none;
        }

        .table-container {
            background: var(--bg-primary);
            border: 1px solid rgba(255,255,255,0.06);
            border-radius: var(--radius-lg);
            overflow: hidden;
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.015);
        }

        .table-scroll {
            max-height: calc(100vh - 250px);
            overflow-y: auto;
        }

        .table-scroll::-webkit-scrollbar { width: 6px; }
        .table-scroll::-webkit-scrollbar-track { background: transparent; }
        .table-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

        /* Legacy stat classes for JS compatibility */
        .stat-label { font-size: 12px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.05em; }
        .stat-value { font-size: 18px; font-weight: 700; color: var(--text-primary); }

        .search-input {
            background: rgba(255,255,255,0.04);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 8px;
            padding: 10px 14px;
            font-size: 13px;
            color: #f0f0f2;
            width: 250px;
            transition: all 0.2s;
        }

        .search-input:focus {
            outline: none;
            border-color: #4DAB9A;
            background: rgba(255,255,255,0.06);
        }

        .search-input::placeholder { color: #5c5c66; }

        /* Date input styling */
        .filter-input-sm::-webkit-calendar-picker-indicator {
            filter: invert(0.78) brightness(0.92);
            opacity: 0.92;
            cursor: pointer;
        }

        /* Active filter state - used by JS */
        .active-filter {
            border-color: #4DAB9A !important;
            background: rgba(77, 171, 154, 0.1) !important;
        }

        /* Sortable headers */
        .sortable {
            cursor: pointer;
            user-select: none;
            transition: color 0.15s;
        }

        .sortable:hover {
            color: #4DAB9A;
        }

        .sortable .sort-icon {
            display: inline-block;
            vertical-align: middle;
            margin-left: 4px;
            opacity: 0.4;
            transition: opacity 0.15s;
        }

        .sortable:hover .sort-icon {
            opacity: 0.7;
        }

        .sortable.sort-asc .sort-icon,
        .sortable.sort-desc .sort-icon {
            opacity: 1;
            color: #4DAB9A;
        }

        .table-empty-state {
            text-align: center;
            padding: 44px 20px;
            color: #6c6c76;
            font-size: 14px;
        }

        .table-date-cell,
        .table-symbol-cell,
        .table-setup-cell,
        .table-pl-cell,
        .table-result-cell {
            min-width: 0;
        }

        .table-date-main,
        .table-symbol-main,
        .table-setup-main,
        .table-pl-main {
            font-size: 15px;
            font-weight: 650;
            color: var(--text-primary);
            min-width: 0;
        }

        .table-date-meta,
        .table-symbol-meta,
        .table-pl-meta,
        .table-result-meta {
            margin-top: 3px;
            font-size: 12.5px;
            color: #797e88;
            line-height: 1.35;
        }

        .table-date-main {
            white-space: nowrap;
        }

        .table-date-meta {
            white-space: nowrap;
        }

        .table-symbol-main {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            max-width: 100%;
            letter-spacing: -0.015em;
        }

        .table-symbol-text {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .table-symbol-account {
            display: inline-block;
            max-width: 100%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            font-size: 13px;
        }

        .table-symbol-account.is-empty {
            color: #666670;
        }

        .table-side-cell {
            white-space: nowrap;
        }

        .table-setup-main {
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            line-height: 1.35;
        }

        .table-setup-main.is-empty {
            color: #74747d;
            font-weight: 500;
        }

        .table-pl-cell {
            text-align: right;
        }

        .table-pl-main {
            font-family: 'JetBrains Mono', monospace;
            font-size: 16px;
            letter-spacing: -0.025em;
        }

        .table-pl-meta {
            font-family: 'DM Mono', monospace;
            font-size: 12px;
        }

        .table-result-stack {
            display: inline-flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 5px;
        }

        .table-result-meta {
            margin-top: 0;
        }

        .table-utilities-cell {
            text-align: right;
        }

        .table-utilities {
            display: inline-flex;
            align-items: center;
            justify-content: flex-end;
            gap: 8px;
            min-height: 28px;
            width: 100%;
        }

        .table-utilities-empty {
            color: #5d5d66;
            font-size: 14px;
        }

        .table-utility {
            width: 28px;
            height: 28px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 9px;
            border: 1px solid rgba(255,255,255,0.055);
            background: rgba(255,255,255,0.02);
            color: #7a7f89;
        }

        .table-utility.is-active {
            color: #b3b8c0;
        }

        .table-utility.is-reviewed {
            color: #4DAB9A;
            border-color: rgba(77,171,154,0.18);
            background: rgba(77,171,154,0.08);
        }

        .table-utility.is-pending {
            color: #f0c27c;
            border-color: rgba(245,158,11,0.18);
            background: rgba(245,158,11,0.08);
        }

        .table-utility.is-linked {
            color: #4dab9a;
            border-color: rgba(77,171,154,0.14);
            background: rgba(77,171,154,0.06);
        }

        .table-cell-empty {
            color: #6f6f78;
            font-size: 13px;
        }

        .table-setup-cell .setup-tag-mini {
            padding: 4px 10px;
            font-size: 12px;
            background: rgba(77,171,154,0.05);
            border-color: rgba(77,171,154,0.1);
            color: #88c5b8;
        }

        .table-domain-meta {
            display: grid;
            gap: 4px;
            margin-top: 6px;
        }

        .table-domain-meta .setup-tag-mini {
            padding: 2px 8px;
            font-size: 11.5px;
        }

        .trade-domain-group {
            display: inline-flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 6px;
            min-width: 0;
        }

        .trade-domain-label {
            color: #727781;
            font-size: 10.5px;
            font-weight: 700;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            white-space: nowrap;
        }

        .trade-domain-pills {
            display: inline-flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 4px;
            min-width: 0;
        }

        .trades-table.is-selecting .col-date {
            width: 14%;
        }

        .trades-table.is-selecting .col-symbol {
            width: 21%;
        }

        .trades-table.is-selecting .col-side {
            width: 11%;
        }

        .trades-table.is-selecting .col-setup {
            width: 18%;
        }

        .trades-table.is-selecting .col-pl {
            width: 14%;
        }

        .trades-table.is-selecting .col-result {
            width: 9%;
        }

        @media (max-width: 1400px) {
            .trades-table .col-symbol {
                width: 22%;
            }

            .trades-table .col-setup {
                width: 18%;
            }

            .trades-table .col-pl {
                width: 16%;
            }
        }

        .loading-spinner { display: flex; justify-content: center; align-items: center; padding: 60px; }

        .spinner {
            width: 32px;
            height: 32px;
            border: 3px solid rgba(77, 171, 154, 0.2);
            border-top-color: #4DAB9A;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }

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

        html.modal-open,
        body.modal-open {
            overflow: hidden;
        }

        /* Modal Styles */
        .modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(8, 10, 12, 0.68);
            backdrop-filter: blur(10px);
            z-index: 1000;
            display: flex;
            align-items: flex-start;
            justify-content: center;
            padding: 18px;
            overflow-y: auto;
            overscroll-behavior: contain;
            opacity: 0;
            visibility: hidden;
            transition: all 0.2s;
        }

        .modal-overlay.active {
            opacity: 1;
            visibility: visible;
        }

        .modal {
            position: relative;
            background: var(--bg-primary);
            border: 1px solid rgba(255,255,255,0.07);
            border-radius: var(--radius-lg);
            width: 100%;
            max-width: 600px;
            max-height: min(calc(100dvh - 36px), 920px);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            margin: auto;
            box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
            transform: scale(0.95);
            transition: transform 0.2s;
        }

        .modal-form {
            display: flex;
            flex: 1 1 auto;
            flex-direction: column;
            min-height: 0;
            overflow: hidden;
        }

        .modal--trade {
            max-width: 680px;
        }

        .modal--wide {
            max-width: 620px;
        }

        .modal--account {
            max-width: 500px;
        }

        .modal--compact {
            max-width: 440px;
        }

        .modal.is-processing::before {
            content: '';
            position: absolute;
            inset: 0;
            background: rgba(10, 12, 14, 0.52);
            backdrop-filter: blur(5px);
            z-index: 6;
        }

        .modal.is-processing::after {
            content: attr(data-processing-label);
            position: absolute;
            top: 20px;
            right: 20px;
            z-index: 7;
            padding: 10px 14px;
            border-radius: 999px;
            border: 1px solid rgba(77,171,154,0.18);
            background:
                linear-gradient(180deg, rgba(77,171,154,0.09), rgba(77,171,154,0.04)),
                rgba(18, 20, 21, 0.96);
            color: #b6efe4;
            font-size: 13px;
            font-weight: 600;
            letter-spacing: -0.01em;
            box-shadow:
                inset 0 1px 0 rgba(255,255,255,0.03),
                0 12px 30px rgba(0,0,0,0.26);
        }

        .modal-overlay.active .modal {
            transform: scale(1);
        }

        .modal-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 20px 22px 16px;
            border-bottom: 1px solid rgba(255,255,255,0.06);
            flex-shrink: 0;
        }

        .modal-title {
            font-size: 1.32rem;
            font-weight: 600;
            color: var(--text-primary);
            letter-spacing: -0.04em;
            line-height: 1.05;
        }

        .modal-title-compact {
            font-size: 1.24rem;
        }

        .modal-subtitle {
            margin: 3px 0 0;
            font-size: 13px;
            color: var(--text-secondary);
            line-height: 1.45;
            max-width: 46ch;
        }

        .modal-icon-wrap {
            width: 34px;
            height: 34px;
            border-radius: var(--radius-sm);
            background: rgba(77,171,154,0.08);
            display: flex;
            align-items: center;
            justify-content: center;
            border: 1px solid rgba(77,171,154,0.14);
        }

        .modal-close {
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            align-self: flex-start;
            border-radius: var(--radius-sm);
            border: 1px solid var(--glass-border);
            background: var(--glass-bg);
            color: var(--text-tertiary);
            transition: all 0.15s;
            cursor: pointer;
        }

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

        .modal-body {
            flex: 1 1 auto;
            min-height: 0;
            padding: 20px 22px;
        }

        .modal-body-scroll {
            overflow-y: auto;
            overscroll-behavior: contain;
            scrollbar-gutter: stable;
        }

        .trade-modal-body {
            padding-bottom: 10px;
        }

        /* Custom scrollbar for modals */
        .modal::-webkit-scrollbar { width: 6px; }
        .modal::-webkit-scrollbar-track { background: transparent; }
        .modal::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
        .modal::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.18); }

        .modal-body::-webkit-scrollbar { width: 6px; }
        .modal-body::-webkit-scrollbar-track { background: transparent; }
        .modal-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
        .modal-body::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.18); }

        .edit-notion-info {
            display: none;
            margin-top: 12px;
            padding: 11px 12px;
            background: var(--accent-subtle);
            border: 1px solid rgba(77,171,154,0.16);
            border-radius: var(--radius-md);
            font-size: 13.5px;
            color: var(--text-secondary);
        }

        .edit-notion-info-inner {
            display: flex;
            align-items: flex-start;
            gap: 9px;
        }

        .edit-notion-info-icon {
            width: 16px;
            height: 16px;
            color: #4dab9a;
            flex-shrink: 0;
            margin-top: 1px;
        }

        .edit-notion-info-copy {
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 2px;
            line-height: 1.5;
        }

        .edit-notion-info-text {
            color: #bbb;
        }

        .edit-notion-info-subtext {
            color: #6f6f78;
            font-size: 13px;
        }

        .trade-modal-summary {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 12px;
            margin-bottom: 20px;
            padding: 14px;
            border-radius: 16px;
            border: 1px solid rgba(255,255,255,0.06);
            background: rgba(255,255,255,0.022);
        }

        .trade-summary-card {
            padding: 12px 13px;
            border-radius: 12px;
            background: rgba(255,255,255,0.026);
            border: 1px solid rgba(255,255,255,0.06);
            min-width: 0;
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
        }

        .trade-summary-card:nth-child(2) {
            border-color: rgba(77,171,154,0.11);
            background: rgba(77,171,154,0.045);
        }

        .trade-summary-label {
            display: block;
            margin-bottom: 5px;
            font-size: 12.5px;
            font-weight: 700;
            color: var(--text-tertiary);
            text-transform: uppercase;
            letter-spacing: 0.08em;
        }

        .trade-summary-value {
            display: block;
            font-size: 14px;
            font-weight: 600;
            color: var(--text-primary);
            line-height: 1.25;
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .trade-summary-value.is-mono {
            font-family: 'JetBrains Mono', monospace;
            letter-spacing: -0.02em;
        }

        .trade-summary-value.is-positive {
            color: #4DAB9A;
        }

        .trade-summary-value.is-negative {
            color: #e57373;
        }

        .trade-summary-value.is-muted {
            color: #9a9aa3;
        }

        .form-section-intro {
            margin: 0 0 14px;
            font-size: 13.5px;
            color: #767680;
            line-height: 1.5;
        }

        .trade-modal .form-row {
            gap: 12px;
            margin-bottom: 12px;
        }

        .trade-modal .form-row:last-child {
            margin-bottom: 0;
        }

        .trade-modal .form-group {
            margin-bottom: 0;
            padding: 13px 14px 14px;
            border-radius: 14px;
            background: rgba(255,255,255,0.02);
            border: 1px solid rgba(255,255,255,0.055);
            box-shadow: none;
        }

        .trade-modal .form-section > .form-group + .form-group,
        .trade-modal .form-section > .form-row + .form-group,
        .trade-modal .form-section > .form-group + .form-row {
            margin-top: 12px;
        }

        #execution-fields,
        #edit-execution-fields {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        #execution-fields .form-row,
        #edit-execution-fields .form-row,
        #execution-fields .form-group,
        #edit-execution-fields .form-group {
            margin-top: 0;
            margin-bottom: 0;
        }

        #execution-fields > .form-group,
        #edit-execution-fields > .form-group {
            background: rgba(255,255,255,0.016);
            border-color: rgba(255,255,255,0.048);
        }

        .trade-modal .form-group-span {
            grid-column: 1 / -1;
        }

        .trade-modal .form-label {
            margin-bottom: 9px;
            font-size: 13.5px;
            color: #9999a4;
            text-transform: none;
            letter-spacing: 0.01em;
        }

        .trade-modal .form-label i {
            width: 13px;
            height: 13px;
            color: #84aaa5;
            opacity: 0.82;
        }

        .trade-modal .form-input,
        .trade-modal .form-textarea {
            background: rgba(255,255,255,0.022);
            border: 1px solid rgba(255,255,255,0.05);
            border-radius: var(--radius-sm);
            padding: 11px 12px;
            font-size: 14px;
            box-shadow: none;
        }

        .trade-modal .form-input:hover,
        .trade-modal .form-textarea:hover {
            border-color: rgba(255,255,255,0.085);
            background: rgba(255,255,255,0.03);
        }

        .trade-modal .form-input:focus,
        .trade-modal .form-textarea:focus {
            background: rgba(255,255,255,0.034);
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(77,171,154,0.1);
        }

        .trade-modal .autocomplete-dropdown {
            margin-top: 2px;
            border-radius: 12px;
        }

        .trade-modal .side-toggle {
            gap: 10px;
        }

        .trade-modal .side-option {
            min-height: 42px;
            padding: 11px 12px;
            border-radius: 10px;
            font-size: 14px;
        }

        .trade-modal .session-pill {
            padding: 8px 12px;
            font-size: 13px;
        }

        .trade-modal .pnl-input-wrap .form-input {
            font-size: 16px;
        }

        .trade-modal .screenshot-drop {
            min-height: 78px;
            padding: 14px;
        }

        #edit-push-notion-section,
        #edit-executions-section {
            margin-top: 12px;
        }

        .trade-modal .form-textarea {
            min-height: 84px;
        }

        .edit-notion-info-link {
            color: #4dab9a;
            text-decoration: none;
            font-weight: 600;
            white-space: nowrap;
            font-size: 13px;
        }

        .edit-notion-info-link:hover {
            color: #5dbcab;
        }

        .form-group {
            margin-bottom: 16px;
        }

        .form-label {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 13.5px;
            font-weight: 600;
            color: var(--text-tertiary);
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-bottom: 7px;
        }

        .form-label i { width: 14px; height: 14px; opacity: 0.72; }

        .form-input {
            width: 100%;
            background: var(--glass-bg);
            border: 1px solid var(--glass-border);
            border-radius: var(--radius-md);
            padding: 13px 14px;
            font-size: 14px;
            color: var(--text-primary);
            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);
        }

        .form-input:focus {
            outline: none;
            border-color: var(--accent);
            background: var(--glass-bg-hover);
            box-shadow: 0 0 0 3px var(--accent-subtle);
        }

        .modal:not(.trade-modal) .form-input,
        .modal:not(.trade-modal) .form-textarea,
        .goal-input,
        .prop-rule-input,
        .prop-preset-select {
            background: rgba(255,255,255,0.024);
            border-color: rgba(255,255,255,0.055);
            box-shadow: none;
        }

        .modal:not(.trade-modal) .form-input:hover,
        .modal:not(.trade-modal) .form-textarea:hover,
        .goal-input:hover,
        .prop-rule-input:hover,
        .prop-preset-select:hover {
            background: rgba(255,255,255,0.03);
            border-color: rgba(255,255,255,0.085);
        }

        .modal:not(.trade-modal) .form-input:focus,
        .modal:not(.trade-modal) .form-textarea:focus,
        .goal-input:focus,
        .prop-rule-input:focus,
        .prop-preset-select:focus {
            background: rgba(255,255,255,0.034);
            border-color: #4DAB9A;
            box-shadow: 0 0 0 3px rgba(77,171,154,0.1);
        }

        .modal select.form-input,
        .form-input--select {
            appearance: none;
            -webkit-appearance: none;
            -moz-appearance: none;
            padding-right: 40px;
            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='%2393939c' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 14px center;
            background-size: 12px 12px;
            transition-property: border-color, background-color, box-shadow, color;
        }

        .modal input.form-input[type="date"] {
            color-scheme: dark;
            min-height: 46px;
        }

        .modal input.form-input[type="time"] {
            color-scheme: dark;
            min-height: 46px;
        }

        .modal input.form-input[type="date"]::-webkit-calendar-picker-indicator {
            filter: invert(0.78) brightness(0.92);
            opacity: 0.88;
            cursor: pointer;
        }

        .modal input.form-input[type="time"]::-webkit-calendar-picker-indicator {
            filter: invert(0.78) brightness(0.92);
            opacity: 0.88;
            cursor: pointer;
        }

        .modal input.form-input[type="number"]::-webkit-outer-spin-button,
        .modal input.form-input[type="number"]::-webkit-inner-spin-button {
            margin: 0;
        }

        .modal input.form-input[type="number"] {
            -moz-appearance: textfield;
        }

        .form-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 14px;
        }

        .modal--transaction {
            max-width: 548px;
        }

        .modal--transaction .modal-header {
            padding: 22px 24px 14px;
        }

        .modal--transaction .modal-title {
            font-size: 1.34rem;
            line-height: 1.04;
        }

        .modal--transaction .modal-subtitle {
            margin-top: 5px;
            font-size: 14px;
            line-height: 1.5;
            color: #888c95;
        }

        .modal--transaction .modal-body {
            padding: 20px 24px 24px;
        }

        .modal--transaction .modal-footer {
            padding: 16px 24px 20px;
        }

        .transaction-form {
            display: flex;
            flex-direction: column;
            gap: 18px;
        }

        .transaction-form-group {
            margin-bottom: 0;
        }

        .transaction-form-row {
            gap: 14px;
            margin-bottom: 0;
        }

        .modal--transaction .form-label {
            margin-bottom: 10px;
            font-size: 13px;
            font-weight: 600;
            color: #9296a0;
            letter-spacing: 0.06em;
        }

        .modal--transaction .form-input {
            min-height: 52px;
            padding: 13px 15px;
            background: rgba(255,255,255,0.028);
            border-color: rgba(255,255,255,0.06);
            border-radius: 14px;
            font-size: 15px;
        }

        .modal--transaction .form-input:hover {
            border-color: rgba(255,255,255,0.085);
            background: rgba(255,255,255,0.032);
        }

        .modal--transaction .form-input::placeholder {
            color: #7d7d86;
        }

        .modal--transaction .btn-secondary,
        .modal--transaction .btn-primary--journal {
            min-height: 44px;
        }

        /* === Custom Autocomplete Dropdown === */
        .autocomplete-wrap {
            position: relative;
        }

        .autocomplete-wrap .form-input {
            padding-right: 32px;
        }

        .autocomplete-chevron {
            position: absolute;
            right: 12px;
            top: 50%;
            transform: translateY(-50%);
            width: 14px;
            height: 14px;
            color: #5c5c66;
            pointer-events: none;
            transition: transform 0.2s;
        }

        .autocomplete-wrap.open .autocomplete-chevron {
            transform: translateY(-50%) rotate(180deg);
        }

        .autocomplete-dropdown {
            display: none;
            position: absolute;
            top: calc(100% + 4px);
            left: 0;
            right: 0;
            z-index: 100;
            background: var(--bg-primary);
            border: 1px solid var(--glass-border);
            border-radius: var(--radius-md);
            max-height: 180px;
            overflow-y: auto;
            box-shadow: var(--shadow-md);
        }

        .autocomplete-wrap.open .autocomplete-dropdown {
            display: block;
        }

        .autocomplete-dropdown::-webkit-scrollbar { width: 4px; }
        .autocomplete-dropdown::-webkit-scrollbar-track { background: transparent; }
        .autocomplete-dropdown::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

        .autocomplete-option {
            padding: 11px 12px;
            font-size: 13.5px;
            color: #d5d5dc;
            cursor: pointer;
            transition: background 0.15s, color 0.15s;
        }

        .autocomplete-option:first-child {
            border-radius: 9px 9px 0 0;
        }

        .autocomplete-option:last-child {
            border-radius: 0 0 9px 9px;
        }

        .autocomplete-option:hover,
        .autocomplete-option.highlighted {
            background: rgba(77,171,154,0.12);
            color: #f0f0f2;
        }

        .setup-autocomplete-option {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 5px;
        }

        .setup-autocomplete-filters {
            position: sticky;
            top: 0;
            z-index: 2;
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            padding: 10px 12px 8px;
            background: rgba(17,17,19,0.96);
            border-bottom: 1px solid rgba(255,255,255,0.05);
            backdrop-filter: blur(8px);
        }

        .setup-autocomplete-filter {
            appearance: none;
            border: 1px solid rgba(255,255,255,0.08);
            background: rgba(255,255,255,0.03);
            color: #9498a5;
            border-radius: 999px;
            padding: 5px 10px;
            font-size: 11px;
            line-height: 1;
            font-weight: 700;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            cursor: pointer;
            transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease;
        }

        .setup-autocomplete-filter:hover {
            border-color: rgba(77,171,154,0.24);
            color: #c8cbcf;
        }

        .setup-autocomplete-filter.is-active {
            border-color: rgba(77,171,154,0.34);
            color: #8ee1d3;
            background: rgba(77,171,154,0.12);
        }

        .setup-autocomplete-option__head {
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
        }

        .setup-autocomplete-option__label {
            font-size: 13.5px;
            line-height: 1.25;
            color: inherit;
            word-break: break-word;
        }

        .setup-autocomplete-option__meta {
            font-size: 11px;
            line-height: 1.25;
            color: #7a7d89;
            word-break: break-word;
        }

        .autocomplete-option--with-meta {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 4px;
        }

        .autocomplete-option__label {
            font-size: 13.5px;
            line-height: 1.25;
            color: inherit;
            word-break: break-word;
        }

        .autocomplete-option__meta {
            font-size: 11px;
            line-height: 1.25;
            color: #7a7d89;
            word-break: break-word;
        }

        .autocomplete-empty {
            padding: 12px 14px;
            font-size: 13px;
            color: #5c5c66;
            text-align: center;
            font-style: italic;
        }

        /* === Add Trade Form Sections === */
        .form-section {
            margin-bottom: 18px;
            padding: 16px 16px 18px;
            border-radius: 18px;
            border: 1px solid rgba(255,255,255,0.045);
            background: rgba(255,255,255,0.016);
        }

        .form-section:first-of-type {
            margin-top: 2px;
        }

        .form-section--flush {
            margin-bottom: 12px;
        }

        .form-section--toggle {
            margin-top: 0;
            padding: 0;
            border: 0;
            background: transparent;
        }

        .form-section--notes {
            background: rgba(255,255,255,0.018);
        }

        .form-section--subsection {
            margin-top: 14px;
            margin-bottom: 0;
            padding: 14px 14px 15px;
            border-radius: 15px;
            border-color: rgba(255,255,255,0.04);
            background: rgba(255,255,255,0.014);
        }

        .form-section-title {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 13.5px;
            font-weight: 700;
            color: #a3a3ad;
            text-transform: uppercase;
            letter-spacing: 0.075em;
            margin-bottom: 12px;
            padding-bottom: 0;
            border-bottom: none;
        }

        .form-section-title--split {
            justify-content: space-between;
        }

        .form-section-title i { width: 14px; height: 14px; opacity: 0.7; }

        .form-section-title .section-accent {
            color: #73b6aa;
            opacity: 0.76;
        }

        .form-section-title.collapsible {
            cursor: pointer;
            user-select: none;
        }

        .form-section-title.collapsible:hover {
            color: #9898a0;
        }

        .form-section-title .section-hint {
            font-size: 12.5px;
            font-weight: 500;
            color: #666671;
            text-transform: none;
            letter-spacing: 0;
            margin-left: auto;
            margin-right: 4px;
        }

        .form-section-title .section-chevron {
            width: 14px;
            height: 14px;
            transition: transform 0.2s;
            opacity: 0.4;
        }

        .form-section-title .section-chevron.open {
            transform: rotate(180deg);
        }

        #edit-details-section {
            padding: 14px 16px 16px;
            border-radius: 16px;
            border: 1px dashed rgba(255,255,255,0.065);
            background: rgba(255,255,255,0.012);
        }

        #edit-details-section .form-section-title {
            color: #7b7b85;
        }

        #edit-details-section .form-section-title .section-accent {
            color: #77a7a1;
            opacity: 0.5;
        }

        #edit-details-section .form-section-intro {
            color: #72727b;
        }

        #edit-details-section .form-group {
            background: rgba(255,255,255,0.016);
            border-color: rgba(255,255,255,0.04);
        }

        #edit-details-section .form-row.form-row--single-visible > .form-group[style*="display: none"] + .form-group,
        #edit-details-section .form-row.form-row--single-visible > .form-group:not([style*="display: none"]) {
            grid-column: 1 / -1;
        }

        #edit-details-section .form-input {
            background: rgba(255,255,255,0.018);
            border-color: rgba(255,255,255,0.04);
            color: #b9b9c2;
        }

        /* Side toggle pills */
        .side-toggle {
            display: flex;
            gap: 8px;
        }

        .form-label--split {
            width: 100%;
            justify-content: space-between;
        }

        .form-label-main {
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        .form-label-meta {
            font-size: 13px;
            font-weight: 600;
            color: #4dab9a;
            letter-spacing: 0;
            text-transform: none;
        }

        .form-group--flush {
            margin-bottom: 0;
        }

        .trade-datetime-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 12px;
            margin-bottom: 10px;
        }

        .trade-datetime-card {
            padding: 12px 13px 13px;
            border-radius: 14px;
            border: 1px solid rgba(255,255,255,0.045);
            background:
                linear-gradient(180deg, rgba(255,255,255,0.018), rgba(255,255,255,0.012)),
                rgba(255,255,255,0.01);
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
        }

        .trade-datetime-card .form-label {
            margin-bottom: 10px;
        }

        .trade-datetime-card .form-label-meta {
            color: #7fbfb2;
            font-size: 12px;
            font-weight: 600;
        }

        .trade-datetime-inputs {
            display: grid;
            grid-template-columns: minmax(0, 1fr) 138px;
            gap: 10px;
            align-items: center;
        }

        .trade-datetime-input {
            margin: 0;
        }

        .trade-time-input-wrap {
            position: relative;
            min-width: 0;
        }

        .trade-datetime-input--time {
            min-width: 0;
            text-align: left;
            font-variant-numeric: tabular-nums;
            padding-left: 16px;
            padding-right: 58px;
        }

        .trade-datetime-input--time::-webkit-calendar-picker-indicator {
            opacity: 0;
            width: 0;
            min-width: 0;
            margin: 0;
            padding: 0;
        }

        .trade-time-now-btn {
            border: 0;
            background: transparent;
            color: #7e8b88;
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            padding: 0 2px;
            min-width: 0;
            height: auto;
            cursor: pointer;
            transition: color 0.16s ease;
            position: absolute;
            right: 12px;
            top: 50%;
            transform: translateY(-50%);
            z-index: 1;
            line-height: 1;
        }

        .trade-time-now-btn:hover {
            color: #9fd8ca;
        }

        .trade-time-now-btn:focus-visible {
            outline: none;
            color: #c8f5ea;
        }

        .notion-push-toggle {
            display: flex;
            align-items: center;
            gap: 12px;
            cursor: pointer;
            padding: 12px 14px;
            background: rgba(255,255,255,0.018);
            border: 1px solid rgba(255,255,255,0.055);
            border-radius: 14px;
            transition: border-color 0.16s ease, background 0.16s ease;
        }

        .notion-push-toggle:hover {
            background: rgba(255,255,255,0.024);
            border-color: rgba(255,255,255,0.08);
        }

        .notion-push-copy {
            flex: 1;
            min-width: 0;
        }

        .notion-push-title {
            font-size: 14px;
            font-weight: 600;
            color: #e3e3e6;
        }

        .notion-push-subtitle {
            margin-top: 2px;
            font-size: 13px;
            line-height: 1.45;
            color: #777781;
        }

        .notion-toggle-track {
            width: 38px;
            height: 22px;
            border-radius: 999px;
            background: rgba(255,255,255,0.1);
            position: relative;
            transition: background 0.2s;
            flex-shrink: 0;
        }

        .notion-toggle-thumb {
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: #b0b0b8;
            position: absolute;
            top: 2px;
            left: 2px;
            transition: left 0.2s, background 0.2s;
            box-shadow: 0 1px 3px rgba(0,0,0,0.3);
        }

        .section-title-actions {
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        .modal-inline-alert {
            padding: 11px 14px;
            border-radius: 10px;
            font-size: 13px;
            line-height: 1.45;
        }

        .modal-inline-alert--sticky {
            position: sticky;
            top: -20px;
            z-index: 6;
            margin: -20px -22px 16px;
            border-radius: 0;
            border-left: 0;
            border-right: 0;
            backdrop-filter: blur(14px);
        }

        .modal-inline-alert--error {
            background: rgba(239,68,68,0.1);
            border: 1px solid rgba(239,68,68,0.18);
            color: #ef7777;
        }

        .side-option {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            padding: 12px 14px;
            border-radius: 13px;
            border: 1px solid rgba(255,255,255,0.1);
            background: rgba(255,255,255,0.03);
            color: #9b9ba5;
            font-size: 14px;
            font-weight: 600;
            text-align: center;
            cursor: pointer;
            transition: all 0.2s;
            user-select: none;
        }

        .side-option:hover {
            border-color: rgba(255,255,255,0.14);
            background: rgba(255,255,255,0.04);
            color: #b1b1ba;
        }

        .side-option.active-long {
            background: rgba(77,171,154,0.11);
            border-color: rgba(77,171,154,0.28);
            color: #87c8bc;
            box-shadow: none;
        }

        .side-option.active-short {
            background: rgba(176,106,106,0.11);
            border-color: rgba(176,106,106,0.28);
            color: #e08f8f;
            box-shadow: none;
        }

        /* P&L input special styling */
        .pnl-input-wrap {
            position: relative;
            --pnl-currency-space: 58px;
        }

        .pnl-input-wrap .pnl-currency {
            position: absolute;
            left: 14px;
            top: 50%;
            transform: translateY(-50%);
            display: inline-flex;
            align-items: center;
            min-width: calc(var(--pnl-currency-space) - 22px);
            color: #5c5c66;
            font-size: 14px;
            font-weight: 600;
            letter-spacing: 0.03em;
            text-transform: uppercase;
            pointer-events: none;
        }

        .pnl-input-wrap .form-input {
            padding-left: var(--pnl-currency-space);
            font-size: 18px;
            font-weight: 700;
            letter-spacing: -0.02em;
            font-family: 'JetBrains Mono', monospace;
        }

        .pnl-input-wrap .form-input.pnl-positive {
            color: #4DAB9A;
            border-color: rgba(77,171,154,0.18);
            background: rgba(77,171,154,0.045);
        }

        .pnl-input-wrap .form-input.pnl-negative {
            color: #e57373;
            border-color: rgba(229,115,115,0.18);
            background: rgba(229,115,115,0.045);
        }

        /* Session pills */
        .session-pills {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
        }

        .session-row {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
        }

        .session-pill {
            padding: 8px 13px;
            border-radius: 999px;
            border: 1px solid rgba(255,255,255,0.08);
            background: rgba(255,255,255,0.022);
            color: #7b7b84;
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
        }

        .session-pill:hover {
            border-color: rgba(255,255,255,0.1);
            color: #a5a5af;
        }

        .session-pill.active {
            background: rgba(77,171,154,0.07);
            border-color: rgba(77,171,154,0.18);
            color: #78bcae;
        }

        .session-custom-toggle {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 34px;
            padding: 0 12px;
            border-radius: 999px;
            border: 1px solid rgba(255,255,255,0.06);
            background: rgba(255,255,255,0.018);
            color: #8a8f99;
            font-size: 12.5px;
            font-weight: 600;
            transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
        }

        .session-custom-toggle:hover {
            border-color: rgba(255,255,255,0.095);
            color: #aeb4be;
        }

        .session-custom-toggle.is-active {
            border-color: rgba(77,171,154,0.16);
            background: rgba(77,171,154,0.05);
            color: #86c5b8;
        }

        .session-custom-wrap {
            margin-top: 10px;
            width: min(240px, 100%);
        }

        .session-custom-input {
            width: 100%;
        }

        /* Screenshot upload improved */
        .screenshot-drop {
            border: 2px dashed rgba(255,255,255,0.08);
            border-radius: 14px;
            padding: 18px;
            text-align: center;
            cursor: pointer;
            transition: all 0.2s;
            position: relative;
            overflow: hidden;
        }

        .screenshot-drop:hover {
            border-color: rgba(77,171,154,0.3);
            background: rgba(77,171,154,0.03);
        }

        .screenshot-drop.has-file {
            border-color: rgba(77,171,154,0.3);
            background: rgba(77,171,154,0.05);
        }

        .screenshot-drop.is-drag-over {
            border-color: rgba(77,171,154,0.48);
            background: rgba(77,171,154,0.09);
            box-shadow: inset 0 0 0 1px rgba(77,171,154,0.18);
        }

        .screenshot-drop-text {
            color: #5c5c66;
            font-size: 14px;
        }

        .screenshot-drop-text i { width: 26px; height: 26px; margin-bottom: 8px; opacity: 0.45; }

        .screenshot-drop-text .drop-filename {
            color: #4DAB9A;
            font-weight: 600;
        }

        .trade-screenshot-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 14px;
        }

        .trade-screenshot-slot {
            display: flex;
            flex-direction: column;
            gap: 10px;
            min-width: 0;
        }

        .trade-screenshot-slot-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
        }

        .trade-screenshot-slot-label {
            font-size: 13px;
            font-weight: 700;
            color: var(--text-secondary);
        }

        .trade-screenshot-clear {
            display: none;
            padding: 0;
            border: none;
            background: transparent;
            color: #78bcae;
            font-size: 12px;
            font-weight: 700;
            cursor: pointer;
        }

        .trade-screenshot-clear:hover {
            color: #9fe4d8;
        }

        .trade-screenshot-preview-wrap {
            overflow: hidden;
            border-radius: 12px;
            border: 1px solid rgba(255,255,255,0.08);
            background: rgba(255,255,255,0.02);
        }

        .trade-screenshot-preview {
            display: block;
            width: 100%;
            max-height: 208px;
            object-fit: cover;
            cursor: pointer;
        }

        /* Notes textarea */
        .form-textarea {
            width: 100%;
            background: rgba(255,255,255,0.04);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 13px;
            padding: 13px 14px;
            font-size: 14px;
            color: #f0f0f2;
            transition: all 0.2s;
            resize: vertical;
            font-family: inherit;
            line-height: 1.5;
        }

        .form-textarea:focus {
            outline: none;
            border-color: #4DAB9A;
            background: rgba(255,255,255,0.06);
            box-shadow: 0 0 0 3px rgba(77,171,154,0.08);
        }

        /* Required asterisk */
        .required-star { color: #cc7f7f; margin-left: 2px; }

        /* Form label hint (?) tooltip */
        .form-label-hint {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: rgba(255,255,255,0.06);
            border: 1px solid rgba(255,255,255,0.1);
            font-size: 12px;
            font-weight: 700;
            color: #5c5c66;
            cursor: help;
            margin-left: 4px;
            vertical-align: middle;
            text-transform: none;
            letter-spacing: 0;
        }

        .form-label-hint:hover {
            background: rgba(77,171,154,0.15);
            border-color: rgba(77,171,154,0.3);
            color: #4DAB9A;
        }

        /* P&L calculation hint below field */
        .pnl-calc-hint {
            margin-top: 4px;
            font-size: 13px;
            color: #5c5c66;
            font-family: 'DM Mono', monospace;
        }

        .pnl-calc-hint .formula {
            color: #4DAB9A;
            opacity: 0.7;
        }

        .execution-summary-input {
            opacity: 0.56 !important;
            cursor: default;
        }

        .execution-summary-input:focus {
            border-color: rgba(255,255,255,0.08) !important;
            box-shadow: none !important;
        }

        .view-value {
            padding: 12px 16px;
            background: rgba(255,255,255,0.04);
            border-radius: 10px;
            font-size: 14px;
            color: #f0f0f2;
            min-height: 44px;
            display: flex;
            align-items: center;
        }

        .view-value.view-notes {
            min-height: 80px;
            align-items: flex-start;
            white-space: pre-wrap;
            line-height: 1.5;
        }

        .view-value.profit-positive {
            color: #4DAB9A;
        }

        .view-value.profit-negative {
            color: #e57373;
        }

        .screenshot-view {
            border-radius: 12px;
            overflow: hidden;
        }

        .screenshot-view img {
            width: 100%;
            border-radius: 12px;
            cursor: pointer;
            transition: opacity 0.2s;
        }

        .screenshot-view img:hover {
            opacity: 0.9;
        }

        .screenshot-upload {
            border: 2px dashed rgba(255,255,255,0.1);
            border-radius: 12px;
            padding: 24px;
            text-align: center;
            cursor: pointer;
            transition: all 0.2s;
        }

        .screenshot-upload:hover {
            border-color: #4DAB9A;
            background: rgba(77, 171, 154, 0.05);
        }

        .screenshot-upload.has-image {
            padding: 0;
            border: none;
        }

        .screenshot-upload img {
            width: 100%;
            border-radius: 12px;
        }

        .screenshot-placeholder {
            color: #5c5c66;
        }

        .screenshot-placeholder i {
            width: 40px;
            height: 40px;
            margin-bottom: 12px;
            opacity: 0.5;
        }

        .modal-footer {
            display: flex;
            gap: 12px;
            justify-content: flex-end;
            padding: 16px 22px 20px;
            border-top: 1px solid rgba(255,255,255,0.06);
            background: rgba(255,255,255,0.022);
            flex-shrink: 0;
            box-shadow: 0 -1px 0 rgba(255,255,255,0.02);
        }

        .modal-footer--split {
            justify-content: space-between;
        }

        @media (max-width: 768px) {
            .modal-overlay {
                padding: 14px;
            }

            .modal,
            .modal--trade,
            .modal--wide,
            .modal--account,
            .modal--compact {
                max-width: none;
                max-height: calc(100dvh - 28px);
            }

            .trade-modal-summary {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }

            .trade-modal .form-row {
                grid-template-columns: 1fr;
            }

            .form-section {
                padding: 14px 14px 16px;
            }

            .csv-smart-detect-head,
            .csv-manual-review-summary,
            .csv-mapping-group-summary {
                flex-direction: column;
                align-items: flex-start;
            }

            .csv-mapping-row {
                grid-template-columns: 1fr;
            }

            .csv-mapping-arrow {
                display: none;
            }

            .modal-header,
            .modal-body,
            .modal-footer {
                padding-left: 16px;
                padding-right: 16px;
            }

            .goal-modal.modal--account-settings .account-goal-balance-grid,
            .goal-modal.modal--account-settings .account-type-selector,
            .goal-modal.modal--account-settings .prop-rules-inputs {
                grid-template-columns: 1fr;
            }

            .goal-modal.modal--account-settings .account-mode-row {
                grid-template-columns: 1fr;
            }

            .modal--transaction .transaction-form-row {
                grid-template-columns: 1fr;
            }
        }

        .modal-footer-secondary {
            display: flex;
            gap: 8px;
        }

        .modal-footer-primary {
            display: flex;
            gap: 10px;
            margin-left: auto;
        }

        .btn {
            padding: 10px 18px;
            border-radius: 11px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }

        .btn-secondary {
            background: rgba(255,255,255,0.04);
            border: 1px solid rgba(255,255,255,0.08);
            color: #9898a0;
        }

        .btn-secondary:hover {
            background: rgba(255,255,255,0.08);
            color: #f0f0f2;
        }

        @media (max-width: 760px) {
            .trade-modal-summary {
                grid-template-columns: 1fr 1fr;
            }

            .trade-datetime-grid {
                grid-template-columns: 1fr;
            }

            .trade-datetime-inputs {
                grid-template-columns: minmax(0, 1fr) 132px;
            }
        }

        .btn-primary {
            background: #4DAB9A;
            border: none;
            color: #051010;
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        .btn-primary:hover {
            background: #58b8a8;
            transform: translateY(-1px);
        }

        .btn-primary i {
            flex-shrink: 0;
        }

        .btn-primary--journal {
            min-height: 44px;
            padding: 12px 22px;
            font-weight: 700;
            color: #051010;
        }

        /* Action Buttons — now use .app-action-btn from style.css */

        /* account-add-btn — removed, use .app-action-btn-primary */

        .filter-account-select {
            min-width: 140px;
        }

        .btn-danger {
            background: rgba(239, 68, 68, 0.15);
            border: 1px solid rgba(239, 68, 68, 0.3);
            color: #ef4444;
        }

        .btn-danger:hover {
            background: rgba(239, 68, 68, 0.25);
        }

        .btn-danger--modal {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 9px 12px;
            font-size: 13px;
        }

        .modal-footer--between {
            justify-content: space-between;
        }

        .modal-footer-actions {
            display: flex;
            gap: 10px;
            margin-left: auto;
        }

        #toast.toast {
            position: fixed;
            top: 24px;
            right: 24px;
            bottom: auto;
            left: auto;
            width: auto;
            height: auto;
            max-width: min(360px, calc(100vw - 32px));
            min-height: 48px;
            background: rgba(19, 20, 22, 0.94);
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 14px;
            padding: 10px 13px;
            display: flex;
            align-items: center;
            gap: 10px;
            z-index: 2000;
            transform: translateY(-10px) scale(0.98);
            opacity: 0;
            box-shadow:
                0 14px 32px rgba(0,0,0,0.24),
                inset 0 1px 0 rgba(255,255,255,0.02);
            backdrop-filter: blur(14px);
            pointer-events: none;
            transition: opacity 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
        }

        #toast.toast.show {
            transform: translateY(0);
            opacity: 1;
        }

        #toast.toast.success {
            border-color: rgba(77, 171, 154, 0.2);
        }

        #toast.toast.error {
            border-color: rgba(239, 68, 68, 0.22);
        }

        #toast.toast.warning {
            border-color: rgba(245, 158, 11, 0.22);
        }

        #toast.toast #toast-icon {
            width: 18px;
            height: 18px;
            flex-shrink: 0;
        }

        #toast.toast.success #toast-icon {
            color: #4dab9a;
        }

        #toast.toast.error #toast-icon {
            color: #ef4444;
        }

        #toast.toast.warning #toast-icon {
            color: #f59e0b;
        }

        #toast.toast #toast-message {
            display: block;
            min-width: 0;
            font-size: 13px;
            font-weight: 600;
            line-height: 1.35;
            color: #ececf1;
            letter-spacing: -0.01em;
            word-break: break-word;
        }

        @media (max-width: 640px) {
            #toast.toast {
                top: 16px;
                right: 16px;
                left: 16px;
                bottom: auto;
                max-width: none;
            }
        }

        .screenshot-actions {
            position: absolute;
            top: 8px;
            right: 8px;
            display: flex;
            gap: 8px;
        }

        .screenshot-action-btn {
            width: 32px;
            height: 32px;
            border-radius: 8px;
            background: rgba(0,0,0,0.7);
            border: 1px solid rgba(255,255,255,0.1);
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.15s;
        }

        .screenshot-action-btn:hover {
            background: rgba(0,0,0,0.9);
        }

        .screenshot-wrapper {
            position: relative;
        }

        .has-screenshot {
            color: #4DAB9A;
        }

        /* View Toggle */
.view-toggle {
            gap: 0;
        }

        .view-toggle-btn {
            color: var(--text-muted);
        }

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

        .view-toggle-btn.active {
            color: var(--accent);
        }

        /* Cards Grid */
        .cards-container {
            display: none;
        }

        .cards-container.active {
            display: block;
        }

        .table-container.hidden {
            display: none;
        }

        .cards-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
            gap: 18px;
            align-items: start;
        }

        .cards-grid.cards-grid--masonry {
            display: block;
            position: relative;
        }

        /* Trade Card */
        .trade-card {
            --trade-card-accent: rgba(255,255,255,0.02);
            background:
                linear-gradient(180deg, rgba(255,255,255,0.012) 0%, rgba(255,255,255,0) 100%),
                #131313;
            border: 1px solid rgba(255,255,255,0.058);
            border-radius: 12px;
            padding: 17px 17px 15px;
            cursor: pointer;
            transition:
                background var(--duration-normal) var(--ease-out),
                border-color var(--duration-normal) var(--ease-out),
                box-shadow var(--duration-normal) var(--ease-out),
                transform var(--duration-normal) var(--ease-out);
            position: relative;
            overflow: hidden;
            isolation: isolate;
            display: flex;
            flex-direction: column;
            align-self: start;
            min-height: 300px;
            box-shadow:
                inset 0 1px 0 rgba(255,255,255,0.015),
                0 10px 24px rgba(0,0,0,0.11);
        }

        .cards-grid:not(.cards-grid--masonry) > .trade-card:only-child {
            width: min(100%, 560px);
            justify-self: start;
        }

        .trade-card.win {
            --trade-card-accent: rgba(77,171,154,0.052);
        }

        .trade-card.loss {
            --trade-card-accent: rgba(229,115,115,0.048);
        }

        .trade-card.flat {
            --trade-card-accent: rgba(148,163,184,0.032);
        }

        .trade-card::before {
            content: '';
            position: absolute;
            inset: 0;
            background:
                radial-gradient(175% 112% at 100% 0%, var(--trade-card-accent) 0%, transparent 61%),
                linear-gradient(180deg, rgba(255,255,255,0.013) 0%, transparent 32%);
            pointer-events: none;
            opacity: 0.72;
        }

        .trade-card:hover {
            background:
                linear-gradient(180deg, rgba(255,255,255,0.018) 0%, rgba(255,255,255,0) 100%),
                #151516;
            border-color: rgba(77,171,154,0.18);
            box-shadow:
                inset 0 1px 0 rgba(255,255,255,0.018),
                0 14px 28px rgba(0,0,0,0.13),
                0 0 0 1px rgba(77,171,154,0.04);
            transform: translateY(-1px);
        }

        .trade-card.selected {
            border-color: rgba(77,171,154,0.38) !important;
            background:
                linear-gradient(180deg, rgba(77,171,154,0.08) 0%, rgba(77,171,154,0.034) 24%, rgba(255,255,255,0.006) 100%),
                rgba(20,21,22,0.98) !important;
            box-shadow:
                inset 0 1px 0 rgba(255,255,255,0.02),
                0 0 0 1px rgba(77,171,154,0.08);
        }

        .trade-card.reviewed {
            border-color: rgba(77,171,154,0.14);
        }

        .trade-card.is-review-target,
        .clickable-row.is-review-target {
            animation: reviewTargetPulse 1.5s ease-out;
        }

        @keyframes reviewTargetPulse {
            0% {
                box-shadow: 0 0 0 0 rgba(77,171,154,0.28);
            }
            100% {
                box-shadow: 0 0 0 14px rgba(77,171,154,0);
            }
        }

        .card-kicker-left {
            display: flex;
            align-items: center;
            gap: 8px;
            min-width: 0;
        }

        .card-checkbox {
            width: 18px;
            height: 18px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            flex-shrink: 0;
        }

        .card-kicker {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            margin-bottom: 14px;
        }

        .card-source-group {
            display: flex;
            align-items: center;
            gap: 6px;
            flex-wrap: wrap;
            min-width: 0;
        }

        .card-source-pill {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 4px 8px;
            border-radius: var(--radius-sm);
            font-size: 10.5px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            border: none;
            background: rgba(255,255,255,0.028);
            color: #828894;
        }

        .card-open-badge {
            display: inline-flex;
            align-items: center;
            padding: 3px 7px;
            border-radius: 999px;
            border: 1px solid rgba(245,158,11,0.24);
            background: rgba(245,158,11,0.1);
            color: #f59e0b;
            font-size: 12px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.08em;
        }

        .card-reviewed-badge {
            display: inline-flex;
            align-items: center;
            padding: 3px 8px;
            border-radius: 999px;
            border: 1px solid rgba(77,171,154,0.22);
            background: rgba(77,171,154,0.1);
            color: #91dccd;
            font-size: 11px;
            font-weight: 600;
            letter-spacing: 0.02em;
            max-width: 100%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .card-reviewed-badge.is-pending {
            border-color: rgba(245,158,11,0.22);
            background: rgba(245,158,11,0.1);
            color: #f0c27c;
        }

        .card-source-pill.notion {
            color: var(--text-primary);
            border-color: var(--glass-border-hover);
            background: var(--glass-bg-hover);
        }

        .card-notion-badge {
            display: inline-flex;
            align-items: center;
            color: #4dab9a;
            opacity: 0.7;
        }

        .card-source-pill.binance,
        .card-source-pill.bybit,
        .card-source-pill.okx,
        .card-source-pill.bitget,
        .card-source-pill.oanda,
        .card-source-pill.json,
        .card-source-pill.html,
        .card-source-pill.alpaca,
        .card-source-pill.tradestation,
        .card-source-pill.tradier,
        .card-source-pill.ibkr,
        .card-source-pill.tastytrade,
        .card-source-pill.tradovate,
        .card-source-pill.ctrader,
        .card-source-pill.mt4,
        .card-source-pill.mt5,
        .card-source-pill.import,
        .card-source-pill.csv {
            color: #98a4b2;
            border-color: rgba(148, 163, 184, 0.12);
            background: rgba(148, 163, 184, 0.055);
        }

        .card-source-pill.manual {
            color: var(--text-tertiary);
        }

        .card-header {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            align-items: start;
            gap: 16px;
            margin-bottom: 12px;
        }

        .card-media-strip {
            display: grid;
            grid-template-columns: minmax(0, 1fr);
            gap: 7px;
            margin-top: 12px;
            margin-bottom: 14px;
        }

        .card-screenshot-grid {
            display: grid;
            grid-template-columns: minmax(0, 1fr);
            gap: 7px;
        }

        .card-screenshot-grid.has-dual {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .card-screenshot-preview {
            position: relative;
            display: block;
            width: 100%;
            padding: 0;
            overflow: hidden;
            isolation: isolate;
            border-radius: 12px;
            border: none;
            background:
                radial-gradient(circle at center, rgba(255,255,255,0.02), rgba(255,255,255,0.008)),
                rgba(255,255,255,0.016);
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
        }

        .card-screenshot-preview.is-dual {
            min-width: 0;
        }

        .card-screenshot-preview::after {
            content: '';
            position: absolute;
            inset: 0;
            z-index: 1;
            pointer-events: none;
            background:
                linear-gradient(90deg, rgba(17,18,19,0.94) 0%, rgba(17,18,19,0) 15%, rgba(17,18,19,0) 85%, rgba(17,18,19,0.94) 100%),
                linear-gradient(180deg, rgba(17,18,19,0.88) 0%, rgba(17,18,19,0.08) 16%, rgba(17,18,19,0.05) 82%, rgba(17,18,19,0.92) 100%);
        }

        .card-screenshot-chip {
            position: absolute;
            left: 9px;
            top: 9px;
            z-index: 2;
            display: inline-flex;
            align-items: center;
            padding: 3px 7px;
            border-radius: 999px;
            background: rgba(14,16,17,0.72);
            border: 1px solid rgba(255,255,255,0.08);
            color: rgba(236,240,244,0.86);
            font-size: 10px;
            font-weight: 700;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            backdrop-filter: blur(8px);
        }

        .card-voice-pill {
            display: grid;
            grid-template-columns: auto minmax(0, 1fr);
            align-items: center;
            gap: 10px;
            width: 100%;
            padding: 9px 10px;
            border-radius: 12px;
            border: 1px solid rgba(255,255,255,0.06);
            background: rgba(255,255,255,0.03);
            color: #dce9e7;
            text-align: left;
            transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
        }

        .card-voice-pill-main {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 32px;
            height: 32px;
            border-radius: 10px;
            background: rgba(255,255,255,0.035);
            border: 1px solid rgba(255,255,255,0.06);
            flex-shrink: 0;
        }

        .card-voice-pill-main i {
            width: 15px;
            height: 15px;
            color: #d8dee8;
        }

        .card-voice-pill-copy {
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

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

        .card-voice-pill-label-wrap {
            min-width: 0;
            display: inline-flex;
            align-items: baseline;
            gap: 7px;
            overflow: hidden;
        }

        .card-voice-pill-label {
            min-width: 0;
            font-size: 12px;
            font-weight: 700;
            color: #eef1f5;
        }

        .card-voice-pill-state {
            flex-shrink: 0;
            font-size: 11px;
            color: #7d8897;
            font-weight: 600;
        }

        .card-voice-pill-time {
            flex-shrink: 0;
            color: #aeb8c5;
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.01em;
        }

        .card-voice-progress {
            display: block;
            width: 100%;
            height: 3px;
            border-radius: 999px;
            overflow: hidden;
            background: rgba(255,255,255,0.07);
        }

        .card-voice-progress-fill {
            display: block;
            height: 100%;
            width: 0;
            border-radius: inherit;
            background: linear-gradient(90deg, rgba(148,163,184,0.72), rgba(214,222,233,0.95));
            transition: width 0.14s linear;
        }

        .card-voice-pill.is-playing {
            border-color: rgba(77,171,154,0.3);
            background: rgba(77,171,154,0.12);
            box-shadow: 0 0 0 1px rgba(77,171,154,0.08) inset;
        }

        .card-voice-pill.is-playing .card-voice-pill-main {
            background: rgba(77,171,154,0.16);
            border-color: rgba(77,171,154,0.24);
        }

        .card-voice-pill.is-playing .card-voice-pill-main i,
        .card-voice-pill.is-playing .card-voice-pill-time {
            color: #9fe5d8;
        }

        .card-voice-pill.is-playing .card-voice-pill-state {
            color: #9fe5d8;
        }

        .card-voice-pill.is-playing .card-voice-progress-fill {
            background: linear-gradient(90deg, rgba(77,171,154,0.72), rgba(127,213,196,1));
        }

        .card-voice-pill.is-paused {
            border-color: rgba(255,255,255,0.08);
            background: rgba(255,255,255,0.038);
        }

        .card-voice-pill.is-paused .card-voice-pill-state {
            color: #aeb8c8;
        }

        .card-title-stack {
            min-width: 0;
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 9px;
        }

        .card-title-main {
            font-size: 1.3rem;
            font-weight: 700;
            color: var(--text-primary);
            letter-spacing: -0.035em;
            line-height: 1.02;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .card-title-meta {
            display: flex;
            align-items: center;
            gap: 6px;
            flex-wrap: wrap;
        }

        .card-setup-line {
            font-size: 13px;
            font-weight: 500;
            color: var(--text-secondary);
            line-height: 1.38;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
        }

        .card-setup-line.empty {
            color: #777782;
        }

        .card-side {
            font-size: 10.5px;
            font-weight: 700;
            padding: 5px 9px;
            border-radius: 999px;
            text-transform: uppercase;
            letter-spacing: 0.06em;
        }

        .card-side.long {
            background: rgba(34, 197, 94, 0.14);
            color: #4ade80;
        }

        .card-side.short {
            background: rgba(229, 115, 115, 0.15);
            color: #e57373;
        }

        .card-profit-stack {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            gap: 6px;
            text-align: right;
        }

        .card-profit {
            font-size: clamp(1.12rem, 1.36vw, 1.32rem);
            font-weight: 700;
            text-align: right;
            letter-spacing: -0.04em;
            line-height: 1;
            font-family: 'JetBrains Mono', monospace;
            white-space: nowrap;
        }

        .card-profit-caption {
            font-size: 10px;
            font-weight: 700;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            color: #6d727d;
        }

        .card-profit.positive {
            color: #4DAB9A;
        }

        .card-profit.negative {
            color: #e57373;
        }

        .card-profit.neutral {
            color: #c7c7cf;
        }

        .card-date {
            font-size: 12px;
            color: #707581;
            white-space: nowrap;
        }

        .card-body {
            display: flex;
            flex-direction: column;
            gap: 8px;
            padding-bottom: 8px;
        }

        .card-primary-stats {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 0;
            padding: 2px 0 9px;
            border-bottom: 1px solid rgba(255,255,255,0.045);
        }

        .card-stat {
            display: flex;
            flex-direction: column;
            gap: 4px;
            padding: 10px 12px 10px 0;
            min-width: 0;
            position: relative;
        }

        .card-primary-stats > .card-stat:last-child,
        .card-secondary-row > .card-inline-stat:last-child {
            padding-left: 14px;
        }

        .card-stat-label {
            font-size: 10.5px;
            font-weight: 600;
            color: #777c86;
            letter-spacing: 0.075em;
            text-transform: uppercase;
        }

        .card-stat-value {
            font-size: 16px;
            font-weight: 620;
            color: var(--text-primary);
            line-height: 1.25;
            font-variant-numeric: tabular-nums;
        }

        .card-stat-primary .card-stat-label {
            color: #7f848e;
        }

        .card-stat-primary .card-stat-value {
            font-size: 17px;
            letter-spacing: -0.03em;
        }

        .card-secondary-row {
            display: grid;
            grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
            gap: 0;
            padding-top: 2px;
        }

        .card-inline-stat {
            display: flex;
            flex-direction: column;
            justify-content: center;
            gap: 6px;
            min-height: 60px;
            padding: 8px 12px 8px 0;
            position: relative;
        }

        .card-inline-stat-head {
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            gap: 10px;
            min-height: 24px;
        }

        .card-inline-stat-label {
            font-size: 10.5px;
            font-weight: 600;
            color: #777c86;
            letter-spacing: 0.075em;
            text-transform: uppercase;
        }

        .card-inline-stat-value {
            font-size: 16px;
            font-weight: 620;
            color: #d9dde4;
            letter-spacing: -0.025em;
            font-variant-numeric: tabular-nums;
        }

        .card-inline-stat--rr {
            justify-content: flex-start;
        }

        .card-inline-stat--rr .card-inline-stat-label,
        .card-inline-stat--rr .card-inline-stat-value {
            line-height: 1.25;
        }

        .rr-bar {
            width: 100%;
            height: 4px;
            background: rgba(255,255,255,0.065);
            border-radius: 2px;
            overflow: hidden;
        }

        .rr-bar.is-empty {
            background: rgba(255,255,255,0.05);
        }

        .rr-fill {
            height: 100%;
            border-radius: 2px;
            transition: width 0.3s ease;
        }

        .rr-fill.positive {
            background: linear-gradient(90deg, #4DAB9A, #5BC4B0);
        }

        .rr-fill.negative {
            background: linear-gradient(90deg, #e57373, #ef9a9a);
        }

        .card-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 10px;
            margin-top: auto;
            padding-top: 12px;
            border-top: 1px solid rgba(255,255,255,0.038);
        }

        .card-review-actions {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 10px;
            margin-top: 14px;
            padding-top: 14px;
            border-top: 1px solid rgba(255,255,255,0.06);
        }

        .card-review-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 7px;
            min-width: 0;
            padding: 10px 12px;
            border-radius: 12px;
            border: 1px solid rgba(255,255,255,0.08);
            background: rgba(255,255,255,0.03);
            color: var(--text-primary);
            font-size: 12px;
            font-weight: 600;
            transition: all var(--duration-fast) var(--ease-out);
        }

        .card-review-btn:hover {
            border-color: rgba(77,171,154,0.24);
            background: rgba(77,171,154,0.08);
            color: #dce9e7;
        }

        .card-review-btn i {
            width: 14px;
            height: 14px;
            flex-shrink: 0;
        }

        .card-review-btn span {
            min-width: 0;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .card-review-btn.is-reviewed {
            border-color: rgba(77,171,154,0.24);
            background: rgba(77,171,154,0.14);
            color: #9fe5d8;
        }

        .card-footer-meta {
            display: flex;
            align-items: flex-start;
            gap: 7px;
            flex-wrap: wrap;
            min-width: 0;
        }

        .card-domain-stack {
            display: flex;
            flex-direction: column;
            gap: 5px;
            min-width: 0;
        }

        .card-domain-row {
            display: flex;
            flex-wrap: wrap;
            gap: 4px;
            min-width: 0;
        }

        .card-domain-row .trade-domain-group {
            width: 100%;
            gap: 7px;
        }

        .card-domain-row .trade-domain-label {
            font-size: 10px;
        }

        .card-footer-right {
            display: flex;
            align-items: center;
            gap: 8px;
            min-width: 0;
            margin-left: auto;
            opacity: 0.58;
        }

        .trade-review-status {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
            margin-bottom: 16px;
        }

        .trade-review-status-pill {
            display: inline-flex;
            align-items: center;
            min-height: 30px;
            padding: 0 12px;
            border-radius: 999px;
            border: 1px solid rgba(255,255,255,0.08);
            background: rgba(255,255,255,0.04);
            color: var(--text-secondary);
            font-size: 12px;
            font-weight: 700;
            letter-spacing: 0.06em;
            text-transform: uppercase;
        }

        .trade-review-status-pill.is-complete {
            border-color: rgba(77,171,154,0.22);
            background: rgba(77,171,154,0.12);
            color: #9fe5d8;
        }

        .trade-review-status-pill.is-pending {
            border-color: rgba(245,158,11,0.22);
            background: rgba(245,158,11,0.1);
            color: #f0c27c;
        }

        .trade-review-status-copy {
            color: var(--text-secondary);
            font-size: 13px;
            line-height: 1.5;
        }

        .card-setup-empty-note {
            font-size: 12px;
            color: #72727b;
        }

        .card-account-text {
            display: inline-flex;
            align-items: center;
            max-width: 146px;
            font-size: 12px;
            font-weight: 550;
            color: #6d7884;
            letter-spacing: -0.01em;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .card-icons {
            display: flex;
            align-items: center;
            gap: 6px;
            color: var(--text-tertiary);
            margin-left: auto;
        }

        .card-icon-badge {
            width: 30px;
            height: 30px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: var(--radius-sm);
            border: 1px solid rgba(255,255,255,0.06);
            background: rgba(255,255,255,0.03);
            color: var(--text-tertiary);
            flex-shrink: 0;
        }

        #edit-executions-section .form-section-title,
        #add-executions-section .form-section-title {
            margin-bottom: 10px;
            align-items: center;
            flex-wrap: nowrap;
        }

        #edit-executions-section .form-section-title .section-accent,
        #add-executions-section .form-section-title .section-accent {
            opacity: 0.62;
        }

        #edit-executions-section .form-section-title > div:first-child,
        #add-executions-section .form-section-title > div:first-child {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            min-width: 0;
            white-space: nowrap;
        }

        #edit-executions-section .form-section-intro,
        #add-executions-section .form-section-intro {
            max-width: 520px;
            margin: 0 0 14px;
            line-height: 1.5;
        }

        .exec-action-btn {
            min-height: 34px;
            padding: 7px 13px;
            font-size: 14px;
            font-weight: 600;
            border-radius: 999px;
        }

        .exec-action-btn-entry {
            background: rgba(74,222,128,0.07);
            border: 1px solid rgba(74,222,128,0.18);
            color: #72d89a;
        }

        .exec-action-btn-exit {
            background: rgba(209,112,112,0.07);
            border: 1px solid rgba(209,112,112,0.18);
            color: #dd8686;
        }

        #executions-list,
        #add-executions-list {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .executions-columns {
            display: grid;
            grid-template-columns: 72px minmax(0, 1fr) 72px 72px 22px;
            align-items: center;
            gap: 8px;
            padding: 0 10px 2px;
        }

        .executions-column-label {
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.12em;
            text-transform: uppercase;
            color: #70707a;
        }

        .executions-columns-spacer,
        .executions-columns-actions {
            display: block;
        }

        .executions-empty-state {
            padding: 14px 15px;
            border: 1px dashed rgba(255,255,255,0.08);
            border-radius: 10px;
            background: rgba(255,255,255,0.012);
            color: #82828c;
            font-size: 13.5px;
            line-height: 1.55;
        }

        .executions-empty-state strong {
            color: #bcbcc4;
            font-weight: 600;
        }

        .executions-divider {
            height: 1px;
            margin: 2px 0;
            background: rgba(255,255,255,0.05);
        }

        .execution-row {
            display: grid;
            grid-template-columns: 72px minmax(0, 1fr) 72px 72px 22px;
            align-items: center;
            gap: 8px;
            padding: 9px 10px;
            background: rgba(255,255,255,0.018);
            border: 1px solid rgba(255,255,255,0.055);
            border-radius: 10px;
        }

        .execution-row-label {
            font-size: 14px;
            font-weight: 600;
            letter-spacing: -0.01em;
            white-space: nowrap;
        }

        .execution-row-label--entry {
            color: #72d89a;
        }

        .execution-row-label--exit {
            color: #dd8686;
        }

        .execution-row-input {
            width: 100%;
            min-width: 0;
            background: rgba(255,255,255,0.018);
            border: 1px solid rgba(255,255,255,0.06);
            border-radius: 7px;
            padding: 7px 9px;
            color: #dddddf;
            font-family: 'JetBrains Mono', monospace;
            font-size: 13px;
            line-height: 1.2;
        }

        .execution-row-input--price {
            font-size: 13.5px;
        }

        .execution-row-input--fee {
            color: #a2a2aa;
        }

        .execution-row-remove {
            background: none;
            border: none;
            color: #6f6f78;
            cursor: pointer;
            padding: 0;
            width: 22px;
            height: 22px;
            line-height: 1;
            font-size: 16px;
            border-radius: 6px;
        }

        .execution-row-remove:hover {
            background: rgba(255,255,255,0.04);
            color: #b0b0b8;
        }

        #executions-summary,
        #add-executions-summary {
            display: flex;
            gap: 12px;
            flex-wrap: wrap;
            margin-top: 12px;
            padding: 12px 13px;
            background: rgba(255,255,255,0.015);
            border: 1px solid rgba(255,255,255,0.06);
            border-radius: var(--radius-sm);
            font-size: 13.5px;
            color: #8c8c96;
        }

        #executions-summary strong,
        #add-executions-summary strong {
            color: #f0f0f2;
            font-weight: 600;
        }

        @media (min-width: 769px) {
            .modal--trade {
                max-width: 760px;
            }

            .trade-modal .modal-header {
                padding: 22px 24px 17px;
            }

            .trade-modal .modal-body {
                padding: 18px 24px 20px;
            }

            .trade-modal .modal-footer {
                padding: 15px 24px 19px;
            }
        }

        .trade-modal-body {
            padding-bottom: 14px;
        }

        .trade-modal--new .trade-modal-body {
            display: flex;
            flex-direction: column;
        }

        .trade-modal-summary {
            gap: 10px;
            margin-bottom: 16px;
            padding: 12px;
            border-radius: 15px;
            border-color: rgba(255,255,255,0.045);
            background: rgba(255,255,255,0.014);
        }

        .trade-summary-card {
            padding: 11px 12px;
            border-radius: 11px;
            border-color: rgba(255,255,255,0.045);
            background: rgba(255,255,255,0.018);
        }

        .trade-summary-card:nth-child(2) {
            border-color: rgba(77,171,154,0.09);
            background: rgba(77,171,154,0.036);
        }

        .trade-media-strip {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 10px;
            margin-bottom: 14px;
        }

        .trade-media-card {
            display: flex;
            align-items: center;
            gap: 12px;
            width: 100%;
            min-width: 0;
            padding: 10px 12px;
            border-radius: 14px;
            border: 1px solid rgba(255,255,255,0.055);
            background: rgba(255,255,255,0.018);
            color: var(--text-primary);
            text-align: left;
            transition: all var(--duration-fast) var(--ease-out);
        }

        .trade-media-card:hover {
            border-color: rgba(77,171,154,0.18);
            background: rgba(77,171,154,0.045);
        }

        .trade-media-card-icon {
            width: 18px;
            height: 18px;
            flex-shrink: 0;
            color: #9fe4d8;
        }

        .trade-media-card-copy {
            display: flex;
            flex-direction: column;
            gap: 3px;
            min-width: 0;
        }

        .trade-media-card-title {
            font-size: 13px;
            font-weight: 700;
            color: var(--text-primary);
        }

        .trade-media-card-meta {
            font-size: 12px;
            line-height: 1.45;
            color: var(--text-secondary);
        }

        .trade-media-thumb-wrap {
            width: 64px;
            height: 46px;
            flex-shrink: 0;
            overflow: hidden;
            border-radius: 10px;
            border: 1px solid rgba(255,255,255,0.06);
            background: rgba(255,255,255,0.03);
        }

        .trade-media-thumb {
            display: block;
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .trade-modal--new .add-trade-section--core { order: 1; }
        .trade-modal--new .add-trade-section--result { order: 2; }
        .trade-modal--new .add-trade-section--voice { order: 3; }
        .trade-modal--new .add-trade-section--evidence { order: 4; }
        .trade-modal--new .add-trade-section--context { order: 5; }
        .trade-modal--new .add-trade-section--advanced { order: 6; }
        .trade-modal--new .add-trade-section--notion { order: 7; }

        .trade-modal--new.is-voice-focus .add-trade-section--voice { order: 0; }

        .trade-modal--new .add-trade-section--context {
            background: rgba(255,255,255,0.008);
        }

        .trade-modal--new .add-trade-section--advanced .form-section-intro {
            margin-bottom: 10px;
        }

        .trade-modal .form-section {
            margin-bottom: 14px;
            padding: 14px 14px 16px;
            border-radius: 16px;
            border-color: rgba(255,255,255,0.038);
            background: rgba(255,255,255,0.012);
        }

        .trade-modal .form-section--flush {
            margin-bottom: 10px;
        }

        .trade-modal .form-section--notes {
            background: rgba(255,255,255,0.014);
        }

        .trade-modal .form-section--subsection {
            margin-top: 12px;
            padding: 12px 12px 13px;
            border-radius: 14px;
            border-color: rgba(255,255,255,0.035);
            background: rgba(255,255,255,0.01);
        }

        .trade-modal .form-section-title {
            margin-bottom: 10px;
            font-size: 12.85px;
            color: #9a9aa3;
            letter-spacing: 0.07em;
        }

        .trade-modal .form-section-title i,
        .trade-modal .form-section-title svg,
        .trade-modal .form-section-title .section-accent {
            width: 14px;
            height: 14px;
            color: #7cb9ae;
            opacity: 0.7;
        }

        .trade-modal .form-section-intro {
            margin: 0 0 12px;
            font-size: 14px;
            line-height: 1.5;
            color: #70707a;
        }

        .form-field-note {
            margin-top: 9px;
            font-size: 12.5px;
            line-height: 1.45;
            color: #6d6d77;
        }

        .execution-summary-panel {
            margin: 0 0 10px;
            padding: 14px;
            border-radius: 14px;
            border: 1px solid rgba(255,255,255,0.055);
            background: rgba(255,255,255,0.02);
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.018);
        }

        .execution-summary-grid {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 10px;
        }

        .execution-summary-metric {
            min-width: 0;
            padding: 11px 12px;
            border-radius: 12px;
            border: 1px solid rgba(255,255,255,0.05);
            background: rgba(255,255,255,0.016);
        }

        .execution-summary-kicker {
            display: block;
            margin-bottom: 6px;
            color: #8c8c96;
            font-size: 12px;
            font-weight: 700;
            letter-spacing: 0.08em;
            text-transform: uppercase;
        }

        .execution-summary-value {
            display: block;
            min-width: 0;
            color: #f0f0f2;
            font-size: 15px;
            font-weight: 650;
            line-height: 1.25;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .trade-modal .form-row {
            gap: 10px;
            margin-bottom: 10px;
        }

        .trade-modal .form-row > .form-group:only-child,
        .trade-modal .form-row > .form-group-span:only-child {
            grid-column: 1 / -1;
        }

        .trade-modal .form-group {
            padding: 12px 13px 13px;
            border-radius: 12px;
            background: rgba(255,255,255,0.014);
            border-color: rgba(255,255,255,0.04);
        }

        .trade-modal .form-section > .form-group + .form-group,
        .trade-modal .form-section > .form-row + .form-group,
        .trade-modal .form-section > .form-group + .form-row {
            margin-top: 10px;
        }

        .trade-modal .form-label {
            margin-bottom: 8px;
            font-size: 13.25px;
            color: #9696a0;
        }

        .trade-modal .form-label i,
        .trade-modal .form-label svg {
            width: 13px;
            height: 13px;
            opacity: 0.82;
        }

        .trade-modal .side-option svg,
        .trade-modal .session-pill svg {
            width: 15px;
            height: 15px;
        }

        .trade-modal .form-input,
        .trade-modal .form-textarea {
            background: rgba(255,255,255,0.018);
            border-color: rgba(255,255,255,0.045);
        }

        .trade-modal--new :is(.add-trade-section--core, .add-trade-section--result, .add-trade-section--context, .add-trade-section--evidence) .form-group,
        .trade-modal--edit :is(.edit-trade-section--core, .edit-trade-section--result, .edit-trade-section--context) .form-group {
            padding: 0;
            border: 0;
            border-radius: 0;
            background: transparent;
        }

        .trade-modal--new :is(.add-trade-section--core, .add-trade-section--result, .add-trade-section--context, .add-trade-section--evidence) .form-section > .form-group + .form-group,
        .trade-modal--new :is(.add-trade-section--core, .add-trade-section--result, .add-trade-section--context, .add-trade-section--evidence) .form-section > .form-row + .form-group,
        .trade-modal--new :is(.add-trade-section--core, .add-trade-section--result, .add-trade-section--context, .add-trade-section--evidence) .form-section > .form-group + .form-row,
        .trade-modal--edit :is(.edit-trade-section--core, .edit-trade-section--result, .edit-trade-section--context) .form-section > .form-group + .form-group,
        .trade-modal--edit :is(.edit-trade-section--core, .edit-trade-section--result, .edit-trade-section--context) .form-section > .form-row + .form-group,
        .trade-modal--edit :is(.edit-trade-section--core, .edit-trade-section--result, .edit-trade-section--context) .form-section > .form-group + .form-row {
            margin-top: 12px;
        }

        .trade-modal .form-input:hover,
        .trade-modal .form-textarea:hover {
            border-color: rgba(255,255,255,0.07);
            background: rgba(255,255,255,0.026);
        }

        .trade-modal .form-input:focus,
        .trade-modal .form-textarea:focus {
            background: rgba(255,255,255,0.03);
        }

        #edit-executions-section .form-section-title,
        #add-executions-section .form-section-title {
            margin-bottom: 8px;
        }

        .executions-empty-state {
            padding: 12px 13px;
            border-color: rgba(255,255,255,0.065);
            background: rgba(255,255,255,0.01);
        }

        .execution-row {
            padding: 8px 9px;
            background: rgba(255,255,255,0.014);
            border-color: rgba(255,255,255,0.045);
            border-radius: 9px;
        }

        .execution-row-input {
            background: rgba(255,255,255,0.014);
            border-color: rgba(255,255,255,0.05);
        }

        #executions-summary,
        #add-executions-summary {
            gap: 10px;
            margin-top: 10px;
            padding: 10px 11px;
            background: rgba(255,255,255,0.012);
            border-color: rgba(255,255,255,0.045);
            font-size: 13px;
        }

        #exec-status-badge,
        #add-exec-status-badge {
            display: none;
            align-items: center;
            padding: 2px 8px;
            border-radius: 999px;
            border: 1px solid rgba(245,158,11,0.22);
            background: rgba(245,158,11,0.1);
            color: #f59e0b;
            font-weight: 700;
            font-size: 12.5px;
            text-transform: uppercase;
            letter-spacing: 0.08em;
        }

        @media (max-width: 640px) {
            .trade-screenshot-grid {
                grid-template-columns: 1fr;
            }

            .trade-media-strip {
                grid-template-columns: 1fr;
            }

            .executions-columns {
                display: none;
            }

            .execution-row {
                grid-template-columns: 1fr;
            }

            .execution-row-remove {
                justify-self: end;
            }
        }

        .form-input:disabled,
        .form-textarea:disabled,
        .goal-input:disabled,
        .prop-rule-input:disabled,
        .prop-preset-select:disabled {
            opacity: 0.82;
            color: #c7c7cf;
            background: rgba(255,255,255,0.028);
            cursor: default;
        }

        .card-icon-badge svg,
        .card-icon-badge i {
            width: 15px;
            height: 15px;
            display: block;
        }

        .card-icon-badge.notion {
            background: linear-gradient(180deg, rgba(255,255,255,0.065), rgba(255,255,255,0.03));
            border-color: rgba(255,255,255,0.1);
            color: rgba(255,255,255,0.92);
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
        }

        .card-icons .has-content {
            color: #4DAB9A;
            border-color: rgba(77, 171, 154, 0.18);
            background: rgba(77, 171, 154, 0.06);
        }

        .card-screenshot-thumb {
            display: block;
            width: 100%;
            height: 112px;
            object-fit: cover;
            opacity: 0.92;
            transform: scale(1.035);
            transition: transform 0.22s ease, opacity 0.2s ease;
            margin-top: 0;
        }
        .trade-card:hover .card-screenshot-thumb {
            opacity: 1;
            transform: scale(1.06);
        }

        .card-screenshot-grid.has-dual .card-screenshot-thumb {
            height: 98px;
        }

        .cards-empty {
            grid-column: 1 / -1;
            width: 100%;
            max-width: 560px;
            margin: 0 auto;
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
            padding: 60px 20px;
            color: #5c5c66;
        }

        .cards-loading {
            display: flex;
            justify-content: center;
            align-items: center;
            grid-column: 1 / -1;
            width: 100%;
            padding: 60px;
        }

        .journal-bulk-bar {
            position: fixed;
            bottom: 24px;
            left: 50%;
            transform: translateX(-50%);
            display: none;
            align-items: center;
            gap: 10px;
            padding: 10px 12px;
            background: #151515;
            border: 1px solid rgba(255,255,255,0.08);
            border-radius: 16px;
            z-index: 100;
            box-shadow: 0 18px 44px rgba(0,0,0,0.36);
            backdrop-filter: blur(12px);
        }

        body.has-sidebar .journal-bulk-bar {
            left: calc(50% + 32px);
        }

        body.has-sidebar.sidebar-expanded .journal-bulk-bar {
            left: calc(50% + 124px);
        }

        .journal-bulk-count {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            min-height: 42px;
            padding: 0 14px;
            background: rgba(255,255,255,0.025);
            border: 1px solid rgba(255,255,255,0.06);
            border-radius: 10px;
            font-size: 13px;
            color: #f0f0f2;
            font-weight: 600;
            line-height: 1;
            white-space: nowrap;
        }

        .journal-bulk-count-label {
            color: inherit;
        }

        .journal-bulk-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            min-height: 42px;
            padding: 0 16px;
            background: rgba(255,255,255,0.028);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 10px;
            color: #c7c7ce;
            font-size: 13px;
            font-weight: 500;
            line-height: 1;
            white-space: nowrap;
            cursor: pointer;
            transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
        }

        .journal-bulk-btn:hover {
            background: rgba(255,255,255,0.045);
            border-color: rgba(255,255,255,0.16);
            color: #f0f0f2;
            transform: translateY(-1px);
        }

        .journal-bulk-btn i {
            width: 16px;
            height: 16px;
            flex-shrink: 0;
        }

        #bulk-push-notion-btn {
            background: rgba(77, 171, 154, 0.08);
            border-color: rgba(77, 171, 154, 0.22);
            color: #88d8c9;
        }

        #bulk-push-notion-btn:hover {
            background: rgba(77, 171, 154, 0.14);
            border-color: rgba(77, 171, 154, 0.32);
            color: #c8f2ea;
        }

        .journal-bulk-btn-danger {
            display: flex;
            align-items: center;
            gap: 6px;
            justify-content: center;
            min-height: 42px;
            padding: 0 16px;
            background: rgba(239,68,68,0.12);
            border: 1px solid rgba(239,68,68,0.24);
            color: #ef4444;
            font-size: 13px;
            font-weight: 600;
            line-height: 1;
            border-radius: 10px;
            white-space: nowrap;
            cursor: pointer;
            transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
        }

        .journal-bulk-btn-danger:hover {
            background: rgba(239,68,68,0.18);
            border-color: rgba(239,68,68,0.34);
            color: #ff7878;
            transform: translateY(-1px);
        }

        .journal-bulk-btn-danger i {
            width: 16px;
            height: 16px;
            flex-shrink: 0;
        }

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

            body.has-sidebar .journal-bulk-bar,
            body.has-sidebar.sidebar-expanded .journal-bulk-bar {
                left: 50%;
            }
        }

        @media (max-width: 560px) {
            .trade-card {
                padding: 16px;
                min-height: 0;
            }

            .card-header {
                grid-template-columns: 1fr;
                align-items: flex-start;
                gap: 10px;
            }

            .card-profit-stack {
                align-items: flex-start;
                text-align: left;
            }

            .card-primary-stats,
            .card-secondary-row {
                grid-template-columns: 1fr;
            }

            .card-primary-stats {
                gap: 4px;
            }

            .card-secondary-row {
                gap: 2px;
            }

        }

        /* Legacy - for JS compatibility */

        /* ============================================
           DEMO BANNERS
           ============================================ */
        .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-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);
        }

        @media (max-width: 640px) {
            .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 {
            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); }
        @media (max-width: 640px) { .demo-float-cta { display: none; } }

        /* ============================================
           TAG INPUT (multi-tag setup/strategy)
           ============================================ */
        .tag-input-wrap {
            position: relative;
            border: 1px solid rgba(255,255,255,0.055);
            border-radius: 14px;
            padding: 6px 8px;
            display: flex;
            flex-wrap: wrap;
            gap: 4px;
            align-items: center;
            background: rgba(255,255,255,0.02);
            cursor: text;
            transition: border-color 0.2s;
        }
        .tag-input-wrap:focus-within {
            border-color: rgba(77,171,154,0.4);
        }
        .tag-input-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 4px;
        }
        .tag-pill {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 3px 8px;
            border-radius: 999px;
            background: rgba(77,171,154,0.07);
            border: 1px solid rgba(77,171,154,0.18);
            color: #78bcae;
            font-size: 12px;
            font-weight: 500;
            white-space: nowrap;
            animation: tagFadeIn 0.15s ease;
        }
        @keyframes tagFadeIn {
            from { opacity: 0; transform: scale(0.9); }
            to { opacity: 1; transform: scale(1); }
        }
        .tag-pill-remove {
            cursor: pointer;
            opacity: 0.5;
            font-size: 14px;
            line-height: 1;
            transition: opacity 0.15s, color 0.15s;
        }
        .tag-pill-remove:hover {
            opacity: 1;
            color: #ef4444;
        }
        .tag-input-field {
            border: none;
            background: transparent;
            color: var(--text-primary, #f0f0f2);
            outline: none;
            font-size: 13px;
            min-width: 80px;
            flex: 1;
            padding: 4px 0;
        }
        .tag-input-field::placeholder {
            color: #5c5c66;
        }
        .tag-input-wrap .autocomplete-dropdown {
            top: calc(100% + 4px);
            left: 0;
            right: 0;
            max-height: 320px;
        }
        .tag-input-wrap.open .autocomplete-dropdown {
            display: block;
        }

        /* Table: compact tag display */
        .setup-tags-compact {
            display: flex;
            gap: 3px;
            align-items: center;
        }
        .setup-tag-mini {
            padding: 1px 6px;
            border-radius: 999px;
            font-size: 13px;
            background: rgba(77,171,154,0.06);
            color: #78bcae;
            border: 1px solid rgba(77,171,154,0.12);
            white-space: nowrap;
        }

        .setup-tag-mini--strategy {
            background: rgba(96,165,250,0.08);
            border-color: rgba(96,165,250,0.18);
            color: #9ec9ff;
        }

        .setup-tag-mini--behavior {
            background: rgba(245,158,11,0.08);
            border-color: rgba(245,158,11,0.18);
            color: #f2c27b;
        }

        .setup-tag-overflow {
            padding: 1px 6px;
            border-radius: 999px;
            font-size: 11px;
            background: rgba(255,255,255,0.04);
            color: #5c5c66;
            white-space: nowrap;
        }

        /* Card: setup tags */
        .card-setup-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 3px;
            overflow: hidden;
            max-height: 44px;
        }

        /* ============================================
           VOICE DEBRIEF
           ============================================ */
        .voice-debrief {
            margin-top: 4px;
            display: flex;
            flex-direction: column;
            gap: 14px;
        }

        .voice-debrief.is-quick-capture {
            background:
                linear-gradient(180deg, rgba(214,171,84,0.075), rgba(214,171,84,0.02)),
                rgba(255,255,255,0.012);
            border: 1px solid rgba(214,171,84,0.16);
            border-radius: 18px;
            box-shadow: 0 0 0 3px rgba(214,171,84,0.07);
            padding: 10px 12px;
        }

        .voice-debrief-head {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 12px;
        }

        .voice-debrief-title {
            font-size: 14px;
            font-weight: 700;
            color: var(--text-primary);
            line-height: 1.25;
        }

        .voice-debrief-copy {
            margin-top: 4px;
            font-size: 13px;
            line-height: 1.55;
            color: var(--text-tertiary);
            max-width: 560px;
        }

        .voice-debrief-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 6px 10px;
            border-radius: 999px;
            border: 1px solid rgba(214, 171, 84, 0.22);
            background: rgba(214, 171, 84, 0.08);
            color: #d5b36b;
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            white-space: nowrap;
        }

        .voice-debrief-usage {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 10px;
        }

        .voice-debrief-usage-pill {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 28px;
            padding: 6px 11px;
            border-radius: 999px;
            border: 1px solid rgba(77,171,154,0.18);
            background: rgba(77,171,154,0.08);
            color: #9fe4d8;
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.05em;
            text-transform: uppercase;
            white-space: nowrap;
        }

        .voice-debrief-usage-pill.is-at-limit {
            border-color: rgba(239, 68, 68, 0.18);
            background: rgba(239, 68, 68, 0.08);
            color: #f2a3a3;
        }

        .voice-debrief-usage-note {
            font-size: 12px;
            line-height: 1.5;
            color: var(--text-tertiary);
        }

        .voice-debrief-toolbar {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .voice-debrief-toolbar-group {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .voice-debrief-toolbar-group--secondary {
            align-items: flex-start;
        }

        .voice-debrief-btn {
            min-height: 40px;
            padding-inline: 14px;
            border-radius: 12px;
            font-size: 13px;
            font-weight: 600;
        }

        .voice-debrief-btn[disabled] {
            opacity: 0.55;
            cursor: not-allowed;
        }

        .voice-debrief-meta {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 12px;
            min-height: 22px;
        }

        .voice-debrief-timer {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 28px;
            padding: 0 10px;
            border-radius: 999px;
            font-size: 12px;
            font-weight: 700;
            letter-spacing: 0.08em;
            color: #9fe4d8;
            font-family: 'JetBrains Mono', monospace;
            background: rgba(77, 171, 154, 0.08);
            border: 1px solid rgba(77, 171, 154, 0.16);
        }

        .voice-debrief-timer.is-warning {
            color: #f4d27a;
            background: rgba(212, 168, 68, 0.1);
            border-color: rgba(212, 168, 68, 0.18);
        }

        .voice-debrief-timer.is-danger {
            color: #ff9f9f;
            background: rgba(239, 68, 68, 0.1);
            border-color: rgba(239, 68, 68, 0.18);
        }

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

        .voice-debrief-remaining.is-warning {
            color: #f4d27a;
            background: rgba(212, 168, 68, 0.08);
            border-color: rgba(212, 168, 68, 0.16);
        }

        .voice-debrief-remaining.is-danger {
            color: #ff9f9f;
            background: rgba(239, 68, 68, 0.08);
            border-color: rgba(239, 68, 68, 0.16);
        }

        .voice-debrief-status {
            font-size: 13px;
            line-height: 1.5;
            color: var(--text-tertiary);
        }

        .voice-debrief-audio {
            width: 100%;
            min-height: 48px;
            border-radius: 16px;
            padding: 4px;
            border: 1px solid rgba(255, 255, 255, 0.07);
            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.02);
            color-scheme: dark;
            accent-color: #8ed5c7;
            filter: saturate(0.92) contrast(1.03);
        }

        .voice-debrief-audio::-webkit-media-controls-enclosure {
            border-radius: 12px;
            background: linear-gradient(180deg, rgba(24, 25, 27, 0.96), rgba(18, 19, 21, 0.96));
        }

        .voice-debrief-audio::-webkit-media-controls-panel {
            background: transparent;
        }

        .voice-debrief-transcript {
            display: flex;
            flex-direction: column;
            gap: 10px;
            padding-top: 2px;
        }

        .voice-debrief-transcript-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
        }

        .voice-debrief-transcript-header > span:first-child {
            font-family: 'Instrument Sans', sans-serif;
            font-size: 12px;
            font-weight: 700;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: #9aa3ad;
        }

        .voice-debrief-actions {
            display: inline-flex;
            align-items: center;
            gap: 14px;
            flex-wrap: wrap;
            justify-content: flex-end;
        }

        .voice-debrief-transcript-header strong {
            font-size: 12px;
            font-weight: 700;
            color: var(--text-secondary);
            text-transform: uppercase;
            letter-spacing: 0.08em;
        }

        .voice-debrief-link {
            border: none;
            background: transparent;
            color: #8ed5c7;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            padding: 0;
        }

        .voice-debrief-link:hover {
            color: #b4f0e5;
        }

        .voice-debrief-textarea {
            min-height: 96px;
            resize: vertical;
            background: rgba(255,255,255,0.024);
            border-color: rgba(255,255,255,0.06);
            color: var(--text-secondary);
            font-family: 'Instrument Sans', sans-serif;
            font-size: 15px;
            line-height: 1.55;
            letter-spacing: -0.01em;
        }

        .voice-debrief-textarea[readonly] {
            cursor: default;
        }

        @media (max-width: 640px) {
            .voice-debrief-head {
                flex-direction: column;
                align-items: flex-start;
            }

            .voice-debrief-badge {
                align-self: flex-start;
            }

            .voice-debrief-usage {
                align-items: flex-start;
                flex-direction: column;
                gap: 8px;
            }

            .voice-debrief-toolbar {
                gap: 7px;
            }

            .voice-debrief-toolbar-group {
                gap: 7px;
            }

            .voice-debrief-btn {
                flex: 1 1 calc(50% - 4px);
                justify-content: center;
            }

            .voice-debrief-transcript-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 10px;
            }

            .voice-debrief-actions {
                width: 100%;
                justify-content: flex-start;
            }
        }
