/* TradeAnalyzer.Pro — Daily Report pages (Crypto + Markets), extends rsi-pro-page.css */

body.rsi-dark-page.daily-report-page {
    --rsi-bg: #070b14;
    --rsi-panel: #0d1524;
    --rsi-card: #111a2b;
    --rsi-line: rgba(148, 163, 184, 0.18);
    --rsi-text: #e8eef7;
    --rsi-muted: #94a3b8;
    --rsi-cyan: #38bdf8;
    --rsi-blue: #0ea5e9;
    --rsi-gold: #eab308;
    --rsi-green: #34d399;
    --rsi-red: #f87171;
    --rsi-radius: 16px;
    --rsi-display: "Sora", system-ui, sans-serif;
    --rsi-body: "IBM Plex Sans", system-ui, sans-serif;
    overflow-x: hidden !important;
}

body.rsi-dark-page.daily-report-page .page-header,
body.rsi-dark-page.daily-report-page .page-header .container,
body.rsi-dark-page.daily-report-page .page-header .container-fluid {
    text-align: start !important;
}

body.rsi-dark-page.daily-report-page .page-header h1,
body.rsi-dark-page.daily-report-page .page-header .lead {
    text-align: start !important;
    margin-inline: 0 !important;
    max-width: 78ch;
}

body.rsi-dark-page.daily-report-page .page-header h1 i {
    color: var(--rsi-cyan) !important;
    margin-inline-end: 0.45rem;
}

/* Override dark.css boxed header inside content */
body.rsi-dark-page.daily-report-page #contentArea .page-header {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 0 1.15rem !important;
}

body.rsi-dark-page.daily-report-page #contentArea.page-wrap,
body.rsi-dark-page.daily-report-page #contentArea {
    width: min(1180px, calc(100% - 2rem)) !important;
    max-width: 1180px !important;
    margin: 0 auto !important;
    padding: 1.5rem 0 3.5rem !important;
    background: transparent !important;
}

/* Controls bar */
body.rsi-dark-page.daily-report-page .dr-controls,
body.rsi-dark-page.daily-report-page .controls {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    align-items: flex-end;
    justify-content: space-between;
    margin: 0 0 1.15rem !important;
    padding: 1.1rem 1.2rem !important;
    border: 1px solid var(--rsi-line) !important;
    border-radius: 20px !important;
    background:
        radial-gradient(640px 220px at 0% 0%, rgba(14, 165, 233, 0.14), transparent 55%),
        rgba(13, 21, 36, 0.92) !important;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.26) !important;
}

body.rsi-dark-page.daily-report-page .dr-controls::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    top: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--rsi-cyan), var(--rsi-gold), transparent);
    pointer-events: none;
}

body.rsi-dark-page.daily-report-page .range-label {
    font-family: var(--rsi-body) !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--rsi-muted) !important;
    margin-bottom: 0.4rem !important;
}

body.rsi-dark-page.daily-report-page .dr-controls .actions {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    flex-wrap: wrap;
}

body.rsi-dark-page.daily-report-page .btn-range {
    min-height: 36px;
    padding: 0.45rem 0.95rem !important;
    border: 1px solid var(--rsi-line) !important;
    border-radius: 999px !important;
    background: rgba(17, 26, 43, 0.95) !important;
    color: #cbd5e1 !important;
    font: 700 0.78rem var(--rsi-body) !important;
    box-shadow: none !important;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease !important;
}

body.rsi-dark-page.daily-report-page .btn-range:hover {
    border-color: rgba(56, 189, 248, 0.38) !important;
    background: rgba(56, 189, 248, 0.08) !important;
    color: var(--rsi-text) !important;
}

body.rsi-dark-page.daily-report-page .btn-range.active {
    border-color: rgba(56, 189, 248, 0.55) !important;
    background: rgba(14, 165, 233, 0.18) !important;
    color: #7dd3fc !important;
    box-shadow: none !important;
}

body.rsi-dark-page.daily-report-page .dr-controls .status {
    color: var(--rsi-muted) !important;
    font-size: 0.85rem !important;
}

body.rsi-dark-page.daily-report-page .badge-soft {
    background: rgba(56, 189, 248, 0.12) !important;
    color: #7dd3fc !important;
    border: 1px solid rgba(56, 189, 248, 0.3) !important;
    font-weight: 700 !important;
}

body.rsi-dark-page.daily-report-page #refreshBtn,
body.rsi-dark-page.daily-report-page .btn-primary {
    min-height: 38px;
    padding: 0.5rem 1rem !important;
    border-radius: 999px !important;
    border: 1px solid rgba(56, 189, 248, 0.45) !important;
    background: rgba(14, 165, 233, 0.18) !important;
    color: #7dd3fc !important;
    font-weight: 700 !important;
    box-shadow: none !important;
}

body.rsi-dark-page.daily-report-page #refreshBtn:hover,
body.rsi-dark-page.daily-report-page .btn-primary:hover {
    background: rgba(14, 165, 233, 0.28) !important;
    border-color: rgba(56, 189, 248, 0.65) !important;
    color: #bae6fd !important;
}

/* KPI cards */
body.rsi-dark-page.daily-report-page .kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.15rem !important;
}

body.rsi-dark-page.daily-report-page .kpi-card {
    position: relative;
    overflow: hidden;
    background: rgba(13, 21, 36, 0.92) !important;
    border: 1px solid var(--rsi-line) !important;
    border-radius: 18px !important;
    padding: 1.1rem 1.15rem !important;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.26) !important;
}

body.rsi-dark-page.daily-report-page .kpi-card::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    top: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.55), transparent);
}

body.rsi-dark-page.daily-report-page .kpi-card h4 {
    font-family: var(--rsi-body) !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    color: var(--rsi-muted) !important;
    letter-spacing: 0.05em;
}

body.rsi-dark-page.daily-report-page .kpi-card .value {
    font-family: var(--rsi-display) !important;
    font-size: 1.45rem !important;
    font-weight: 700 !important;
    color: var(--rsi-text) !important;
    letter-spacing: -0.02em;
}

body.rsi-dark-page.daily-report-page .kpi-card .sub,
body.rsi-dark-page.daily-report-page #contentArea .kpi-card .sub {
    color: var(--rsi-muted) !important;
    font-size: 0.82rem !important;
}

/* Sections */
body.rsi-dark-page.daily-report-page .dr-section,
body.rsi-dark-page.daily-report-page .section {
    position: relative;
    overflow: hidden;
    background: rgba(13, 21, 36, 0.92) !important;
    border: 1px solid var(--rsi-line) !important;
    border-radius: 20px !important;
    padding: 1.15rem 1.2rem !important;
    margin-bottom: 1.1rem !important;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.26) !important;
}

body.rsi-dark-page.daily-report-page .dr-section::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    top: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.4), rgba(234, 179, 8, 0.35), transparent);
    pointer-events: none;
}

body.rsi-dark-page.daily-report-page .dr-section h3,
body.rsi-dark-page.daily-report-page .section h3 {
    font-family: var(--rsi-display) !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: var(--rsi-text) !important;
    margin-bottom: 0.85rem !important;
}

body.rsi-dark-page.daily-report-page .dr-section h4,
body.rsi-dark-page.daily-report-page .section h4 {
    font-family: var(--rsi-display) !important;
    font-size: 0.92rem !important;
    font-weight: 700 !important;
    color: var(--rsi-text) !important;
}

body.rsi-dark-page.daily-report-page .summary-grid {
    gap: 0.65rem;
}

body.rsi-dark-page.daily-report-page .summary-pill {
    background: rgba(17, 26, 43, 0.95) !important;
    border: 1px solid var(--rsi-line) !important;
    border-radius: 12px !important;
    padding: 0.75rem 0.85rem !important;
}

body.rsi-dark-page.daily-report-page .summary-pill .label {
    color: var(--rsi-muted) !important;
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em;
}

body.rsi-dark-page.daily-report-page .summary-pill .value,
body.rsi-dark-page.daily-report-page #contentArea .summary-pill .value:not(.pnl-pos):not(.pnl-neg) {
    color: var(--rsi-text) !important;
    font-weight: 700 !important;
}

body.rsi-dark-page.daily-report-page .grid-2 {
    gap: 0.85rem;
    margin-bottom: 0;
}

/* Table tools */
body.rsi-dark-page.daily-report-page .table-tools {
    gap: 0.5rem;
    margin-bottom: 0.75rem !important;
}

body.rsi-dark-page.daily-report-page .table-tools input,
body.rsi-dark-page.daily-report-page .table-tools select {
    min-height: 40px;
    padding: 0.5rem 0.95rem !important;
    border: 1px solid var(--rsi-line) !important;
    border-radius: 999px !important;
    background: rgba(17, 26, 43, 0.95) !important;
    color: var(--rsi-text) !important;
    font: 500 0.86rem var(--rsi-body) !important;
    box-shadow: none !important;
}

body.rsi-dark-page.daily-report-page .table-tools input:focus,
body.rsi-dark-page.daily-report-page .table-tools select:focus {
    border-color: rgba(56, 189, 248, 0.55) !important;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.14) !important;
    outline: none !important;
}

body.rsi-dark-page.daily-report-page .table-tools input::placeholder {
    color: rgba(148, 163, 184, 0.75) !important;
}

body.rsi-dark-page.daily-report-page .note {
    color: var(--rsi-muted) !important;
    font-size: 0.82rem !important;
}

body.rsi-dark-page.daily-report-page .muted,
body.rsi-dark-page.daily-report-page #contentArea .dr-section .muted {
    color: var(--rsi-muted) !important;
}

body.rsi-dark-page.daily-report-page .pnl-pos,
body.rsi-dark-page.daily-report-page #contentArea .table td.pnl-pos,
body.rsi-dark-page.daily-report-page #contentArea .table .pnl-pos {
    color: var(--rsi-green) !important;
}

body.rsi-dark-page.daily-report-page .pnl-neg,
body.rsi-dark-page.daily-report-page #contentArea .table td.pnl-neg,
body.rsi-dark-page.daily-report-page #contentArea .table .pnl-neg {
    color: var(--rsi-red) !important;
}

body.rsi-dark-page.daily-report-page .warn {
    color: #fde68a !important;
}

body.rsi-dark-page.daily-report-page .pill-long {
    background: rgba(52, 211, 153, 0.12) !important;
    color: var(--rsi-green) !important;
    border: 1px solid rgba(52, 211, 153, 0.3) !important;
}

body.rsi-dark-page.daily-report-page .pill-short {
    background: rgba(248, 113, 113, 0.12) !important;
    color: var(--rsi-red) !important;
    border: 1px solid rgba(248, 113, 113, 0.3) !important;
}

/* Trades table — MACD-style sticky Symbol + scrolling thead (all languages / RTL) */
body.rsi-dark-page.daily-report-page .dr-trades-scroll,
body.rsi-dark-page.daily-report-page .table-responsive.dr-trades-scroll {
    max-height: min(62vh, calc(100vh - 300px));
    overflow: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    position: relative;
    border: 1px solid var(--rsi-line) !important;
    border-radius: 14px !important;
    background: rgba(13, 21, 36, 0.96) !important;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.26) !important;
}

body.rsi-dark-page.daily-report-page .dr-trades-scroll::after {
    content: "← scroll for all columns →";
    display: block;
    text-align: center;
    font-size: 0.68rem;
    color: var(--rsi-muted);
    padding: 0.4rem 0 0.35rem;
    letter-spacing: 0.02em;
    background: rgba(13, 21, 36, 0.96);
    position: sticky;
    left: 0;
    bottom: 0;
    z-index: 6;
}

body.rsi-dark-page.daily-report-page .dr-trades-table,
body.rsi-dark-page.daily-report-page .dr-trades-scroll > .table {
    width: max-content !important;
    min-width: 100% !important;
    margin: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    table-layout: auto !important;
    background: transparent !important;
    --bs-table-bg: transparent !important;
    --bs-table-striped-bg: transparent !important;
    --bs-table-hover-bg: transparent !important;
    --bs-table-color: var(--rsi-text) !important;
    --bs-table-striped-color: var(--rsi-text) !important;
    --bs-table-hover-color: var(--rsi-text) !important;
    color: var(--rsi-text) !important;
}

body.rsi-dark-page.daily-report-page .dr-trades-table thead,
body.rsi-dark-page.daily-report-page .dr-trades-scroll > .table thead {
    display: table-header-group !important;
}

body.rsi-dark-page.daily-report-page .dr-trades-table thead th,
body.rsi-dark-page.daily-report-page .dr-trades-scroll > .table thead th,
html[dir="rtl"] body.rsi-dark-page.daily-report-page .dr-trades-table thead th,
html[dir="rtl"] body.rsi-dark-page.daily-report-page .dr-trades-scroll > .table thead th {
    position: sticky !important;
    top: 0 !important;
    z-index: 4 !important;
    background: #111a2b !important;
    background-color: #111a2b !important;
    color: #94a3b8 !important;
    border-bottom: 1px solid var(--rsi-line) !important;
    border-color: var(--rsi-line) !important;
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
    text-align: center !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
    padding: 0.75rem 0.65rem !important;
    direction: ltr !important;
    box-shadow: none !important;
}

body.rsi-dark-page.daily-report-page .dr-trades-table th,
body.rsi-dark-page.daily-report-page .dr-trades-table td,
body.rsi-dark-page.daily-report-page .dr-trades-scroll > .table th,
body.rsi-dark-page.daily-report-page .dr-trades-scroll > .table td,
html[dir="rtl"] body.rsi-dark-page.daily-report-page .dr-trades-table th,
html[dir="rtl"] body.rsi-dark-page.daily-report-page .dr-trades-table td,
html[dir="rtl"] body.rsi-dark-page.daily-report-page .dr-trades-scroll > .table th,
html[dir="rtl"] body.rsi-dark-page.daily-report-page .dr-trades-scroll > .table td {
    display: table-cell !important;
    text-align: center !important;
    direction: ltr !important;
    white-space: nowrap;
    vertical-align: middle !important;
    font-variant-numeric: tabular-nums;
    border-color: rgba(148, 163, 184, 0.12) !important;
    color: #cbd5e1 !important;
    box-shadow: none !important;
}

body.rsi-dark-page.daily-report-page .dr-trades-table td,
body.rsi-dark-page.daily-report-page .dr-trades-scroll > .table td {
    background: transparent !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    padding: 0.7rem 0.55rem !important;
}

body.rsi-dark-page.daily-report-page .dr-trades-table th:first-child,
body.rsi-dark-page.daily-report-page .dr-trades-table td:first-child,
body.rsi-dark-page.daily-report-page .dr-trades-scroll > .table th:first-child,
body.rsi-dark-page.daily-report-page .dr-trades-scroll > .table td:first-child,
html[dir="rtl"] body.rsi-dark-page.daily-report-page .dr-trades-table th:first-child,
html[dir="rtl"] body.rsi-dark-page.daily-report-page .dr-trades-table td:first-child,
html[dir="rtl"] body.rsi-dark-page.daily-report-page .dr-trades-scroll > .table th:first-child,
html[dir="rtl"] body.rsi-dark-page.daily-report-page .dr-trades-scroll > .table td:first-child {
    position: sticky !important;
    left: 0 !important;
    right: auto !important;
    inset-inline-start: 0 !important;
    inset-inline-end: auto !important;
    z-index: 3 !important;
    min-width: 120px !important;
    box-shadow: 4px 0 14px rgba(0, 0, 0, 0.35) !important;
    border-right: 1px solid var(--rsi-line) !important;
    isolation: isolate;
    text-align: center !important;
}

body.rsi-dark-page.daily-report-page .dr-trades-table thead th:first-child,
body.rsi-dark-page.daily-report-page .dr-trades-scroll > .table thead th:first-child,
html[dir="rtl"] body.rsi-dark-page.daily-report-page .dr-trades-table thead th:first-child,
html[dir="rtl"] body.rsi-dark-page.daily-report-page .dr-trades-scroll > .table thead th:first-child {
    top: 0 !important;
    left: 0 !important;
    right: auto !important;
    z-index: 8 !important;
    background: #111a2b !important;
    background-color: #111a2b !important;
}

body.rsi-dark-page.daily-report-page .dr-trades-table td:first-child,
body.rsi-dark-page.daily-report-page .dr-trades-scroll > .table td:first-child {
    background-color: #0d1524 !important;
    color: var(--rsi-cyan) !important;
    font-weight: 700 !important;
}

body.rsi-dark-page.daily-report-page .dr-trades-table td:first-child::before,
body.rsi-dark-page.daily-report-page .dr-trades-scroll > .table td:first-child::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: #0d1524;
    z-index: -1;
    pointer-events: none;
}

body.rsi-dark-page.daily-report-page .dr-trades-table tbody tr:nth-child(even) td:first-child::before,
body.rsi-dark-page.daily-report-page .dr-trades-scroll > .table tbody tr:nth-child(even) td:first-child::before {
    background-color: #111a2b;
}

body.rsi-dark-page.daily-report-page .dr-trades-table tbody tr:hover td:first-child::before,
body.rsi-dark-page.daily-report-page .dr-trades-scroll > .table tbody tr:hover td:first-child::before {
    background-color: #152033;
}

body.rsi-dark-page.daily-report-page .dr-trades-table tbody tr:nth-child(even) td:not(:first-child),
body.rsi-dark-page.daily-report-page .dr-trades-scroll > .table tbody tr:nth-child(even) td:not(:first-child),
body.rsi-dark-page.daily-report-page .dr-trades-table.table-striped > tbody > tr:nth-of-type(even) > *:not(:first-child),
body.rsi-dark-page.daily-report-page .dr-trades-scroll > .table.table-striped > tbody > tr:nth-of-type(even) > *:not(:first-child) {
    background-color: rgba(17, 26, 43, 0.45) !important;
}

body.rsi-dark-page.daily-report-page .dr-trades-table tbody tr:nth-child(even) td:first-child,
body.rsi-dark-page.daily-report-page .dr-trades-scroll > .table tbody tr:nth-child(even) td:first-child {
    background-color: #111a2b !important;
}

body.rsi-dark-page.daily-report-page .dr-trades-table tbody tr:hover td:not(:first-child),
body.rsi-dark-page.daily-report-page .dr-trades-scroll > .table tbody tr:hover td:not(:first-child) {
    background-color: rgba(56, 189, 248, 0.07) !important;
}

body.rsi-dark-page.daily-report-page .dr-trades-table tbody tr:hover td:first-child,
body.rsi-dark-page.daily-report-page .dr-trades-scroll > .table tbody tr:hover td:first-child {
    background-color: #152033 !important;
}

body.rsi-dark-page.daily-report-page .dr-trades-table a,
body.rsi-dark-page.daily-report-page .dr-trades-table .symbol-link,
body.rsi-dark-page.daily-report-page .dr-trades-scroll > .table a,
body.rsi-dark-page.daily-report-page .dr-trades-scroll > .table .symbol-link {
    color: var(--rsi-cyan) !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    position: relative;
    z-index: 1;
}

html[dir="rtl"] body.rsi-dark-page.daily-report-page .dr-trades-scroll,
html[dir="rtl"] body.rsi-dark-page.daily-report-page .dr-trades-table,
html[dir="rtl"] body.rsi-dark-page.daily-report-page .dr-trades-scroll > .table {
    direction: ltr !important;
    unicode-bidi: isolate;
}

@media (min-width: 1200px) {
    body.rsi-dark-page.daily-report-page .dr-trades-scroll::after {
        display: none !important;
    }
}

body.rsi-dark-page.daily-report-page .small-table td,
body.rsi-dark-page.daily-report-page .small-table th {
    font-size: 0.82rem !important;
    padding: 0.45rem 0.55rem !important;
}

/* Diagnostic / secondary tables keep simple dark styling */
body.rsi-dark-page.daily-report-page #aggReport .table,
body.rsi-dark-page.daily-report-page #rollupTable .table,
body.rsi-dark-page.daily-report-page #contentArea #aggReport .table,
body.rsi-dark-page.daily-report-page #contentArea #rollupTable .table {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: rgba(17, 26, 43, 0.55);
    --bs-table-hover-bg: rgba(56, 189, 248, 0.07);
    --bs-table-color: #e2eef7;
    color: var(--rsi-text) !important;
    margin-bottom: 0 !important;
}

body.rsi-dark-page.daily-report-page #aggReport .table thead th,
body.rsi-dark-page.daily-report-page #rollupTable .table thead th {
    background: rgba(17, 26, 43, 0.98) !important;
    color: var(--rsi-muted) !important;
    text-align: center !important;
}

body.rsi-dark-page.daily-report-page #aggReport .table td,
body.rsi-dark-page.daily-report-page #rollupTable .table td {
    color: #cbd5e1 !important;
    text-align: center !important;
}

body.rsi-dark-page.daily-report-page #alertList {
    color: var(--rsi-muted) !important;
    padding-inline-start: 1.1rem;
}

body.rsi-dark-page.daily-report-page #alertList li {
    margin-bottom: 0.4rem;
}

body.rsi-dark-page.daily-report-page .dr-trustpilot-wrap {
    width: min(1180px, calc(100% - 2rem));
    max-width: 1180px;
    margin: 0 auto;
    padding: 0.5rem 0 0;
}

body.rsi-dark-page.daily-report-page .footer-simple,
body.rsi-dark-page.daily-report-page footer.footer-simple {
    background: #070b14 !important;
    background-color: #070b14 !important;
}

@media (max-width: 768px) {
    body.rsi-dark-page.daily-report-page #contentArea.page-wrap,
    body.rsi-dark-page.daily-report-page #contentArea {
        width: min(100%, calc(100% - 1.25rem)) !important;
        padding: 1rem 0 2.5rem !important;
    }

    body.rsi-dark-page.daily-report-page .dr-controls {
        align-items: stretch;
    }

    body.rsi-dark-page.daily-report-page .table-tools input,
    body.rsi-dark-page.daily-report-page .table-tools select {
        flex: 1 1 100%;
        min-width: 0;
        width: 100%;
    }

    body.rsi-dark-page.daily-report-page .dr-trades-scroll {
        max-height: min(70vh, calc(100dvh - 260px)) !important;
    }

    body.rsi-dark-page.daily-report-page .dr-trades-table th:first-child,
    body.rsi-dark-page.daily-report-page .dr-trades-table td:first-child,
    body.rsi-dark-page.daily-report-page .dr-trades-scroll > .table th:first-child,
    body.rsi-dark-page.daily-report-page .dr-trades-scroll > .table td:first-child {
        min-width: 108px !important;
        width: 108px !important;
    }
}
