.filters-grid {
        display: none;
    }

    .filter-shell {
        margin: 0 0 18px;
        padding: 14px 16px 16px;
        background: #0f1318;
        border: 1px solid #1e3a4a;
        border-radius: 14px;
        box-sizing: border-box;
    }
    .filter-shell-head {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 8px 16px;
        margin-bottom: 12px;
        padding-bottom: 10px;
        border-bottom: 1px solid #1a2c38;
    }
    .filter-shell-title-wrap {
        display: flex;
        align-items: center;
        gap: 10px;
        min-width: 0;
    }
    .filter-shell-ico {
        width: 28px;
        height: 28px;
        border-radius: 8px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: #143028;
        border: 1px solid #2a5a45;
        font-size: 0.9rem;
    }
    .filter-shell-title {
        margin: 0;
        color: #fff;
        font-size: 1.15rem;
        font-weight: 700;
    }
    .filter-shell-badge {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 3px 10px;
        border-radius: 999px;
        background: #15261a;
        border: 1px solid #2a5a38;
        color: #36FF6C;
        font-size: 0.75rem;
        font-weight: 600;
    }
    .filter-shell-meta {
        color: #7f9aab;
        font-size: 0.78rem;
        line-height: 1.35;
        max-width: 520px;
        text-align: right;
    }
    .filter-row {
        display: grid;
        gap: 10px;
        align-items: end;
    }
    .filter-row-main {
        grid-template-columns: minmax(220px, 1.4fr) repeat(5, minmax(120px, 1fr));
        margin-bottom: 10px;
    }
    .filter-row-period {
        grid-template-columns: minmax(140px, 0.9fr) minmax(140px, 0.9fr) max-content auto;
    }
    @media (max-width: 1200px) {
        .filter-row-main { grid-template-columns: repeat(3, minmax(160px, 1fr)); }
        .filter-row-period { grid-template-columns: 1fr 1fr max-content auto; }
        .filter-shell-meta { text-align: left; max-width: none; }
    }
    @media (max-width: 900px) {
        .filter-row-period {
            grid-template-columns: 1fr 1fr;
        }
        .filter-row-period .period-quick {
            grid-column: 1 / -1;
            justify-self: start;
        }
        .filter-row-period .btn-show-stats {
            grid-column: 1 / -1;
            justify-self: start;
        }
    }
    @media (max-width: 700px) {
        .filter-row-main,
        .filter-row-period { grid-template-columns: 1fr; }
    }
    .filter-field {
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
    .filter-field label {
        color: #8aa0b0;
        font-size: 0.72rem;
        line-height: 1.2;
        margin: 0;
    }
    .filter-field input,
    .filter-field select {
        width: 100%;
        box-sizing: border-box;
        background: #121820;
        border: 1px solid #2a4558;
        color: #eee;
        border-radius: 8px;
        padding: 8px 10px;
        font-size: 0.88rem;
        min-height: 38px;
    }
    .filter-field input:focus,
    .filter-field select:focus {
        outline: none;
        border-color: #36FF6C;
    }
    .filter-user-row {
        display: flex;
        gap: 8px;
        align-items: stretch;
    }
    .filter-user-row input { flex: 1; }
    .btn-find {
        white-space: nowrap;
        padding: 8px 14px;
        min-height: 38px;
        font-size: 0.88rem;
        font-weight: 700;
    }
    .btn-show-stats {
        white-space: nowrap;
        min-height: 38px;
        padding: 8px 16px;
        font-weight: 700;
        align-self: end;
    }
    .period-quick {
        display: flex;
        flex-wrap: nowrap;
        gap: 6px;
        align-items: center;
        align-self: end;
        padding-bottom: 1px;
        white-space: nowrap;
    }
    .btn-period {
        background: #121820;
        border: 1px solid #2a4558;
        color: #c5d4de;
        padding: 7px 10px;
        border-radius: 8px;
        cursor: pointer;
        font-size: 0.82rem;
        min-height: 36px;
        flex: 0 0 auto;
        white-space: nowrap;
    }
    .btn-period:hover { border-color: #36FF6C; color: #fff; }
    .btn-period.active {
        border-color: #36FF6C;
        color: #36FF6C;
        background: #122016;
    }
    .form-group-actions { display: none; }
    .stats-actions { display: none; }

    /* ===== Result board (summary dashboard) ===== */
    .result-board {
        margin: 8px 0 20px;
        background: #121212;
        border: 1px solid #2a2a2a;
        border-radius: 16px;
        padding: 16px 18px 18px;
        box-sizing: border-box;
    }
    .result-board-header {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 8px 16px;
        margin-bottom: 14px;
    }
    .result-board-heading {
        display: flex;
        align-items: center;
        gap: 10px;
        min-width: 0;
    }
    .result-board-title {
        margin: 0;
        color: #fff;
        font-size: 1.15rem;
        font-weight: 700;
        letter-spacing: 0.01em;
    }
    .result-board-subtitle {
        color: #7a7a7a;
        font-size: 0.82rem;
    }
    .rb-badge {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 4px 10px;
        border-radius: 999px;
        background: #15261a;
        border: 1px solid #2a5a38;
        color: #36FF6C;
        font-size: 0.78rem;
        font-weight: 600;
    }
    .rb-badge-dot {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: #36FF6C;
        box-shadow: 0 0 6px rgba(54, 255, 108, 0.7);
    }
    .result-board-body {
        display: grid;
        grid-template-columns: minmax(140px, 0.7fr) minmax(280px, 2fr) minmax(220px, 1.1fr);
        gap: 12px;
        align-items: stretch;
    }
    @media (max-width: 1100px) {
        .result-board-body { grid-template-columns: 1fr; }
    }
    .rb-panel {
        background: #181818;
        border: 1px solid #2c2c2c;
        border-radius: 14px;
        padding: 14px 16px;
        min-width: 0;
    }
    .rb-cycles {
        display: flex;
        align-items: center;
        justify-content: space-evenly;
        gap: 8px;
    }
    .rb-cycle-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        flex: 1;
        text-align: center;
    }
    .rb-cycle-icon {
        width: 28px;
        height: 28px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.85rem;
        font-weight: 700;
    }
    .rb-cycle-closed {
        background: #1a3324;
        color: #36FF6C;
        border: 1px solid #2f6b45;
    }
    .rb-cycle-open {
        background: #222;
        color: #aaa;
        border: 1px solid #444;
    }
    .rb-cycle-label {
        color: #888;
        font-size: 0.78rem;
    }
    .rb-cycle-value {
        color: #fff;
        font-size: 1.75rem;
        font-weight: 700;
        line-height: 1.1;
    }
    .rb-cycle-sep {
        width: 1px;
        align-self: stretch;
        background: #2e2e2e;
        margin: 4px 0;
    }
    .rb-finance {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 12px 10px;
        align-items: start;
    }
    .rb-metric {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        min-width: 0;
    }
    .rb-metric-icon {
        width: 26px;
        height: 26px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.85rem;
        font-weight: 700;
        margin-bottom: 2px;
    }
    .rb-icon-minus { background: #3a1518; color: #ff5c6a; border: 1px solid #6b2a32; }
    .rb-icon-up { background: #1a3324; color: #36FF6C; border: 1px solid #2f6b45; }
    .rb-icon-target { background: #1a3324; color: #36FF6C; border: 1px solid #2f6b45; }
    .rb-icon-coins { background: #2a2a2a; color: #b0b0b0; border: 1px solid #444; }
    .rb-icon-pct, .rb-icon-avg { background: #222; color: #9ad4ff; border: 1px solid #35556e; }
    .rb-metric-label {
        color: #888;
        font-size: 0.75rem;
        line-height: 1.2;
    }
    .rb-metric-value {
        color: #fff;
        font-size: clamp(0.95rem, 1.6vw, 1.2rem);
        font-weight: 700;
        line-height: 1.25;
        word-break: break-word;
        overflow-wrap: anywhere;
        max-width: 100%;
    }
    .rb-metric-value.is-pos { color: #36FF6C; }
    .rb-metric-value.is-neg { color: #ff5c6a; }
    .rb-metric-value.is-neu { color: #e8e8e8; }
    .rb-metric-unit {
        color: #666;
        font-size: 0.72rem;
        margin-top: -1px;
    }
    .rb-metric-accent .rb-metric-value { font-size: clamp(1rem, 1.8vw, 1.28rem); }
    .rb-volume-head {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 10px;
        color: #ddd;
        font-size: 0.88rem;
        font-weight: 600;
    }
    .rb-volume-icon { color: #8ab4ff; }
    .rb-volume-bar {
        display: flex;
        height: 10px;
        border-radius: 999px;
        overflow: hidden;
        background: #2a2a2a;
        margin-bottom: 12px;
    }
    .rb-vol-seg { display: block; height: 100%; min-width: 0; }
    .rb-vol-quote { background: linear-gradient(90deg, #6b5cff, #8b7cff); }
    .rb-vol-base { background: linear-gradient(90deg, #2ecc71, #36FF6C); }
    .rb-volume-body {
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }
    .rb-volume-body.volume-simple {
        color: #fff;
        font-size: 1.15rem;
        font-weight: 700;
    }
    .vol-legend {
        display: flex;
        flex-wrap: wrap;
        gap: 10px 14px;
        width: 100%;
    }
    .vol-legend-item {
        display: flex;
        flex-direction: column;
        gap: 2px;
        min-width: 0;
        flex: 1 1 90px;
    }
    .vol-legend-item.is-all .vol-legend-val {
        color: #8ab4ff;
        font-size: 0.98rem;
        font-weight: 700;
    }
    .vol-legend-top {
        display: flex;
        align-items: center;
        gap: 6px;
        color: #888;
        font-size: 0.72rem;
        white-space: nowrap;
    }
    .vol-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        flex-shrink: 0;
    }
    .vol-dot-all { background: #8ab4ff; }
    .vol-dot-quote { background: #7b6cff; }
    .vol-dot-base { background: #36FF6C; }
    .vol-legend-val {
        color: #ddd;
        font-size: 0.82rem;
        font-weight: 600;
        word-break: break-word;
    }
    .asset-lines {
        white-space: pre-line !important;
        line-height: 1.35;
        font-size: inherit !important;
    }
    .asset-list.asset-lines {
        white-space: pre-line;
        font-size: 0.9em;
        line-height: 1.5;
    }
    .table-block { margin-top: 30px; }
    .table-block h3 { margin-bottom: 10px; color: #36FF6C; }
    .stats-note { margin-top: 12px; color: #9a9a9a; font-size: 0.9em; line-height: 1.45; }
    .stats-note div { margin-bottom: 4px; }
    .chart-block { margin-top: 30px; }
    .chart-block h3 { margin-bottom: 10px; color: #36FF6C; }
    .chart-container {
        position: relative; height: 240px; background: #0f0f0f;
        border: 1px solid #333; border-radius: 10px; overflow: hidden;
    }
    .chart-empty {
        position: absolute; inset: 0; display: flex; align-items: center;
        justify-content: center; color: #666; font-size: 0.95em;
    }
    .chart-svg { width: 100%; height: 100%; }
    .chart-line { fill: none; stroke: #36FF6C; stroke-width: 2; }
    .details-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 16px;
        margin-top: 24px;
    }
    .details-card {
        background: #141414;
        border: 1px solid #2a2a2a;
        border-radius: 10px;
        padding: 14px 16px;
    }
    .details-title { color: #36FF6C; margin-bottom: 10px; font-weight: 600; }
    .details-row {
        display: flex; justify-content: space-between; gap: 12px;
        padding: 6px 0; border-bottom: 1px solid #222; color: #ddd; font-size: 0.92em;
    }
    .details-row:last-child { border-bottom: none; }
    .details-row span:last-child {
        text-align: right; max-width: 60%;
        word-break: break-word; overflow-wrap: anywhere;
    }
    .details-hint { margin-top: 10px; color: #777; font-size: 0.82em; }
    .table-hint {
        margin: 0 0 12px;
        color: #9a9a9a;
        font-size: 0.82em;
        line-height: 1.4;
        max-width: 920px;
    }
    .asset-list { color: #eee; font-size: 0.95em; line-height: 1.5; word-break: break-word; }


/* Shared with admin base: buttons + tables (needed on user /stats page) */
.trading-stats-page .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}
.trading-stats-page .btn-primary {
    background: #36FF6C;
    color: #1a1a1a;
}
.trading-stats-page .btn-primary:hover {
    background: #28e05c;
}
.trading-stats-page .admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}
.trading-stats-page .admin-table th,
.trading-stats-page .admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #333;
}
.trading-stats-page .admin-table th {
    background: #2a2a2a;
    color: #36FF6C;
    font-weight: 600;
}
.trading-stats-page .admin-table tr:hover {
    background: #2a2a2a;
}
.trading-stats-page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 16px 16px 40px;
}
.trading-stats-page .alert {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 12px;
}
.trading-stats-page .alert-error {
    background: #3a1515;
    border: 1px solid #7a2a2a;
    color: #ffb4b4;
}
.trading-stats-page .alert-info {
    background: #15261a;
    border: 1px solid #2a5a38;
    color: #c8f5d4;
}
.trading-stats-page.mode-user .filter-field-user,
.trading-stats-page.mode-user .filter-field-user-select {
    display: none !important;
}
.trading-stats-page.mode-user .filter-row-main {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
}

/* Collapsible Dust / details */
.trading-stats-page .stats-fold {
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    background: #121212;
    padding: 0;
    min-width: 0;
}
.trading-stats-page .stats-fold > summary {
    cursor: pointer;
    list-style: none;
    padding: 12px 14px;
    color: #c5d4de;
    font-weight: 600;
    font-size: 0.92rem;
    user-select: none;
}
.trading-stats-page .stats-fold > summary::-webkit-details-marker { display: none; }
.trading-stats-page .stats-fold > summary::before {
    content: '▸';
    display: inline-block;
    margin-right: 8px;
    color: #36FF6C;
    transition: transform 0.15s ease;
}
.trading-stats-page .stats-fold[open] > summary::before {
    transform: rotate(90deg);
}
.trading-stats-page .stats-fold-body {
    padding: 0 14px 14px;
}
.trading-stats-page .stats-fold-dust-row {
    margin-top: 10px;
}
.trading-stats-page.mode-user .filter-shell-badge,
.trading-stats-page.mode-user #resultBoardBadge {
    display: none !important;
}
