/* Supertrend page – professional dark theme */

body.rsi-dark-page #contentArea.container-fluid {
    max-width: 1240px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 20px 16px 36px !important;
}

body.rsi-dark-page .breadcrumb-nav,
body.rsi-dark-page .page-header {
    background: #141b26 !important;
    border: 1px solid #2a3544 !important;
    border-radius: 14px !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35) !important;
}

body.rsi-dark-page .breadcrumb-nav {
    padding: 12px 16px !important;
    margin-bottom: 14px !important;
}

body.rsi-dark-page .breadcrumb-nav .breadcrumb-item a {
    color: #60a5fa !important;
}

body.rsi-dark-page .page-header {
    padding: 18px 20px !important;
    margin-bottom: 14px !important;
}

body.rsi-dark-page .page-header h1 {
    color: #f8fafc !important;
    font-size: 1.75em !important;
    margin-bottom: 10px !important;
}

body.rsi-dark-page .page-header .lead {
    color: #94a3b8 !important;
    margin-bottom: 0 !important;
}

body.rsi-dark-page #status {
    border-radius: 10px !important;
    border: 1px solid #2a3544 !important;
    background: #1a2332 !important;
    color: #94a3b8 !important;
    margin-bottom: 14px !important;
}

/* ── Toolbar: filters + search ── */
body.rsi-dark-page .st-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 14px 16px;
    margin-bottom: 14px;
    background: #141b26;
    border: 1px solid #2a3544;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

body.rsi-dark-page .st-filter-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

body.rsi-dark-page .st-filter-btn {
    border-radius: 10px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    padding: 10px 18px !important;
    border: 1px solid #2a3544 !important;
    background: #0c1219 !important;
    color: #94a3b8 !important;
    box-shadow: none !important;
    transform: none !important;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease !important;
}

body.rsi-dark-page .st-filter-btn:hover {
    background: #1a2332 !important;
    color: #e2e8f0 !important;
}

body.rsi-dark-page .st-filter-btn--all.active,
body.rsi-dark-page .st-filter-btn--all.active-filter {
    background: #243044 !important;
    border-color: #3b4a5e !important;
    color: #f8fafc !important;
}

body.rsi-dark-page .st-filter-btn--long.active,
body.rsi-dark-page .st-filter-btn--long.active-filter {
    background: rgba(52, 211, 153, 0.15) !important;
    border-color: rgba(52, 211, 153, 0.4) !important;
    color: #34d399 !important;
}

body.rsi-dark-page .st-filter-btn--short.active,
body.rsi-dark-page .st-filter-btn--short.active-filter {
    background: rgba(248, 113, 113, 0.15) !important;
    border-color: rgba(248, 113, 113, 0.4) !important;
    color: #f87171 !important;
}

body.rsi-dark-page .st-search-wrap,
body.rsi-dark-page #search-container {
    flex: 1 1 280px;
    max-width: 360px;
    margin-left: auto;
}

body.rsi-dark-page .search-box {
    position: relative;
    width: 100%;
}

body.rsi-dark-page #symbolSearch {
    width: 100% !important;
    padding: 11px 72px 11px 14px !important;
    border: 1px solid #2a3544 !important;
    border-radius: 10px !important;
    background: #0c1219 !important;
    color: #f1f5f9 !important;
    font-size: 14px !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25) !important;
}

body.rsi-dark-page #symbolSearch::placeholder {
    color: #64748b !important;
}

body.rsi-dark-page #symbolSearch:focus {
    outline: none !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2) !important;
    background: #0f1724 !important;
}

body.rsi-dark-page .search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 14px;
    pointer-events: none;
}

body.rsi-dark-page #clearSearch {
    position: absolute;
    right: 38px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent !important;
    border: none !important;
    color: #64748b !important;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    font-size: 12px;
}

body.rsi-dark-page #clearSearch:hover {
    color: #f87171 !important;
}

/* ── Timeframe overview grid ── */
body.rsi-dark-page .st-overview-panel {
    margin-bottom: 14px;
    background: #141b26;
    border: 1px solid #2a3544;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

body.rsi-dark-page .st-overview-header {
    padding: 16px 18px 0;
}

body.rsi-dark-page .st-overview-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

body.rsi-dark-page .st-overview-title strong {
    display: block;
    font-size: 16px;
    font-weight: 800;
    color: #f8fafc;
    letter-spacing: -0.02em;
}

body.rsi-dark-page .st-overview-title small {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    margin-top: 3px;
}

body.rsi-dark-page .st-overview-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    background: rgba(96, 165, 250, 0.12);
    color: #60a5fa;
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.25);
    flex-shrink: 0;
}

body.rsi-dark-page .st-tf-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    padding: 16px 18px 18px;
}

body.rsi-dark-page .st-tf-card {
    background: #0c1219 !important;
    border: 1px solid #2a3544 !important;
    border-radius: 12px !important;
    padding: 14px !important;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease !important;
    box-shadow: none !important;
    transform: none !important;
    border-left-width: 3px !important;
}

body.rsi-dark-page .st-tf-card--15m { border-left-color: #34d399 !important; }
body.rsi-dark-page .st-tf-card--1h { border-left-color: #60a5fa !important; }
body.rsi-dark-page .st-tf-card--4h { border-left-color: #fbbf24 !important; }
body.rsi-dark-page .st-tf-card--1d { border-left-color: #f87171 !important; }

body.rsi-dark-page .st-tf-card:hover {
    background: #1a2332 !important;
    border-color: #3b4a5e !important;
}

body.rsi-dark-page .st-tf-card.active {
    background: #1a2332 !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.3) !important;
    transform: none !important;
}

body.rsi-dark-page .st-tf-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #1e2936;
}

body.rsi-dark-page .st-tf-label {
    font-size: 18px;
    font-weight: 800;
    color: #f8fafc;
    letter-spacing: -0.02em;
}

body.rsi-dark-page .st-tf-badge {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: #64748b;
    border: 1px solid #2a3544;
}

body.rsi-dark-page .st-tf-stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 5px 0;
}

body.rsi-dark-page .st-tf-stat-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

body.rsi-dark-page .st-tf-stat-val {
    font-size: 15px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

body.rsi-dark-page .st-tf-stat-val--long { color: #34d399 !important; }
body.rsi-dark-page .st-tf-stat-val--short { color: #f87171 !important; }

body.rsi-dark-page .st-tf-updated {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #1e2936;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
}

/* ── Signals table panel ── */
body.rsi-dark-page.supertrend-page {
    overflow-x: visible !important;
}

body.rsi-dark-page.supertrend-page #contentArea.container-fluid {
    overflow: visible !important;
}

body.rsi-dark-page .st-table-panel {
    background: #141b26;
    border: 1px solid #2a3544;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    margin-bottom: 14px;
}

body.rsi-dark-page.supertrend-page .st-table-panel {
    overflow: visible !important;
}

body.rsi-dark-page .st-table-header {
    padding: 16px 18px;
    border-bottom: 1px solid #2a3544;
    background: #0c1219;
}

body.rsi-dark-page .st-table-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

body.rsi-dark-page .st-table-title h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: #f8fafc;
    letter-spacing: -0.02em;
}

body.rsi-dark-page .st-table-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    background: rgba(96, 165, 250, 0.12);
    color: #60a5fa;
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.25);
}

body.rsi-dark-page .st-table-body {
    background: #0c1219 !important;
    padding: 0 !important;
}

/* Horizontal scroll + sticky header row (screener pattern) */
body.rsi-dark-page.supertrend-page .st-table-scroll {
    max-height: min(62vh, calc(100vh - 300px));
    overflow: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    background: #0c1219 !important;
    position: relative;
    border-radius: 0 0 14px 14px;
}

body.rsi-dark-page.supertrend-page .st-table-scroll::after {
    content: "← scroll for all columns →";
    display: block;
    text-align: center;
    font-size: 10px;
    color: #64748b;
    padding: 6px 0 4px;
    letter-spacing: 0.02em;
    background: #0c1219;
    position: sticky;
    left: 0;
    bottom: 0;
}

body.rsi-dark-page.supertrend-page #supertrendTable {
    width: max-content !important;
    min-width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background: #0c1219 !important;
    margin: 0 !important;
    box-shadow: none !important;
    table-layout: auto !important;
    color: #e2e8f0 !important;
    overflow: visible !important;
}

body.rsi-dark-page.supertrend-page #supertrendTable th,
body.rsi-dark-page.supertrend-page #supertrendTable td {
    display: table-cell !important;
    white-space: nowrap;
}

body.rsi-dark-page.supertrend-page #supertrendTable thead th {
    position: sticky !important;
    top: 0 !important;
    z-index: 4 !important;
    background: #1a2332 !important;
    color: #94a3b8 !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    border-bottom: 1px solid #2a3544 !important;
    box-shadow: 0 1px 0 #2a3544 !important;
    padding: 11px 10px !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
}

body.rsi-dark-page.supertrend-page #supertrendTable th:first-child,
body.rsi-dark-page.supertrend-page #supertrendTable td:first-child {
    position: sticky !important;
    left: 0 !important;
    z-index: 3 !important;
    box-shadow: 4px 0 14px rgba(0, 0, 0, 0.45) !important;
    border-right: 1px solid #2a3544 !important;
    isolation: isolate;
}

body.rsi-dark-page.supertrend-page #supertrendTable thead th:first-child {
    z-index: 8 !important;
    top: 0 !important;
    left: 0 !important;
    background-color: #1a2332 !important;
    text-align: left !important;
    padding-left: 16px !important;
}

body.rsi-dark-page.supertrend-page #supertrendTable td:first-child {
    background-color: #0c1219 !important;
    color: #93c5fd !important;
    font-weight: 700 !important;
    padding-left: 16px !important;
    text-align: left !important;
}

body.rsi-dark-page.supertrend-page #supertrendTable td:first-child::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: #0c1219;
    z-index: -1;
    pointer-events: none;
}

body.rsi-dark-page.supertrend-page #supertrendTable tbody tr:nth-child(even) td:first-child::before {
    background-color: #0f1520;
}

body.rsi-dark-page.supertrend-page #supertrendTable tbody tr:hover td:first-child::before {
    background-color: #1a2332;
}

body.rsi-dark-page.supertrend-page #supertrendTable td:not(:first-child) {
    background-color: transparent !important;
}

body.rsi-dark-page.supertrend-page #supertrendTable tbody tr {
    background: transparent !important;
}

body.rsi-dark-page.supertrend-page #supertrendTable tbody tr:nth-child(even) td:not(:first-child) {
    background-color: rgba(15, 21, 32, 0.55) !important;
}

body.rsi-dark-page.supertrend-page #supertrendTable tbody tr:nth-child(even) td:first-child {
    background-color: #0f1520 !important;
}

body.rsi-dark-page.supertrend-page #supertrendTable tbody tr:hover td:not(:first-child) {
    background-color: rgba(59, 130, 246, 0.08) !important;
}

body.rsi-dark-page.supertrend-page #supertrendTable tbody tr:hover td:first-child {
    background-color: #1a2332 !important;
}

body.rsi-dark-page.supertrend-page #supertrendTable tbody td {
    border: 0 !important;
    border-bottom: 1px solid #1e2936 !important;
    background: transparent !important;
    color: #cbd5e1 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    padding: 11px 8px !important;
    font-variant-numeric: tabular-nums;
    vertical-align: middle !important;
}

body.rsi-dark-page .supertrend-table tbody tr {
    background: #0c1219 !important;
}

body.rsi-dark-page .supertrend-table tbody tr:nth-child(even) {
    background: #0f1520 !important;
}

body.rsi-dark-page .supertrend-table tbody tr:hover {
    background: #1a2332 !important;
}

body.rsi-dark-page.supertrend-page #supertrendTable tbody tr:hover td {
    background: transparent !important;
    color: #e2e8f0 !important;
}

body.rsi-dark-page.supertrend-page #supertrendTable td:first-child a,
body.rsi-dark-page.supertrend-page #supertrendTable td:first-child .symbol-link {
    color: #93c5fd !important;
}

body.rsi-dark-page .supertrend-table .text-center {
    color: #64748b !important;
    font-style: italic;
    padding: 24px !important;
}

body.rsi-dark-page .signal-long,
body.rsi-dark-page .signal-buy {
    background: rgba(52, 211, 153, 0.12) !important;
    color: #34d399 !important;
    border: 1px solid rgba(52, 211, 153, 0.28) !important;
    font-weight: 800 !important;
    padding: 5px 10px !important;
    border-radius: 6px !important;
    display: inline-block !important;
    min-width: 70px !important;
    text-align: center !important;
}

body.rsi-dark-page .signal-short,
body.rsi-dark-page .signal-sell {
    background: rgba(248, 113, 113, 0.12) !important;
    color: #f87171 !important;
    border: 1px solid rgba(248, 113, 113, 0.28) !important;
    font-weight: 800 !important;
    padding: 5px 10px !important;
    border-radius: 6px !important;
    display: inline-block !important;
    min-width: 70px !important;
    text-align: center !important;
}

body.rsi-dark-page .time-display,
body.rsi-dark-page .signal-value-display {
    background: #1a2332 !important;
    border: 1px solid #2a3544 !important;
    color: #94a3b8 !important;
    border-radius: 6px !important;
    font-size: 12px !important;
}

body.rsi-dark-page .time-display.time-display-recent {
    background: rgba(251, 191, 36, 0.12) !important;
    border-color: rgba(251, 191, 36, 0.35) !important;
    color: #fbbf24 !important;
}

body.rsi-dark-page .symbol-link {
    color: #60a5fa !important;
}

body.rsi-dark-page .symbol-link:hover {
    color: #93c5fd !important;
}

body.rsi-dark-page .new-signal-change {
    background-color: rgba(251, 191, 36, 0.08) !important;
}

body.rsi-dark-page .new-signal-change::before {
    background-color: #fbbf24 !important;
}

body.rsi-dark-page .timeframe-btn {
    border-radius: 10px !important;
    font-weight: 700 !important;
}

body.rsi-dark-page .seo-description-section .card {
    background: #141b26 !important;
    border: 1px solid #2a3544 !important;
    border-radius: 14px !important;
}

body.rsi-dark-page .seo-description-section .card-body {
    color: #94a3b8 !important;
}

body.rsi-dark-page .seo-description-section h2,
body.rsi-dark-page .seo-description-section h3 {
    color: #f1f5f9 !important;
}

body.rsi-dark-page .seo-description-section .alert-info {
    background: #1a2332 !important;
    border: 1px solid #2a3544 !important;
    color: #94a3b8 !important;
}

body.rsi-dark-page .seo-description-section a {
    color: #60a5fa !important;
}

body.rsi-dark-page .accordion-item {
    background: #141b26 !important;
    border: 1px solid #2a3544 !important;
}

@media (max-width: 992px) {
    body.rsi-dark-page .st-tf-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    body.rsi-dark-page.supertrend-page #supertrendTable {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        table-layout: fixed !important;
    }

    body.rsi-dark-page.supertrend-page #supertrendTable th,
    body.rsi-dark-page.supertrend-page #supertrendTable td {
        min-width: 0 !important;
    }

    body.rsi-dark-page.supertrend-page #supertrendTable th:first-child,
    body.rsi-dark-page.supertrend-page #supertrendTable td:first-child {
        position: sticky !important;
        left: 0 !important;
        z-index: 3 !important;
    }

    body.rsi-dark-page.supertrend-page #supertrendTable thead th:first-child {
        z-index: 8 !important;
    }

    body.rsi-dark-page.supertrend-page .st-table-scroll::after {
        display: none !important;
    }
}

@media (max-width: 768px) {
    body.rsi-dark-page #contentArea.container-fluid {
        padding: 14px 10px 30px !important;
    }

    body.rsi-dark-page .st-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    body.rsi-dark-page .st-search-wrap,
    body.rsi-dark-page #search-container {
        max-width: none;
        margin-left: 0;
    }

    body.rsi-dark-page .st-tf-grid {
        grid-template-columns: 1fr;
    }

    body.rsi-dark-page.supertrend-page .st-table-scroll {
        max-height: min(70vh, calc(100dvh - 260px)) !important;
    }

    body.rsi-dark-page.supertrend-page #supertrendTable th:first-child,
    body.rsi-dark-page.supertrend-page #supertrendTable td:first-child {
        min-width: 108px !important;
        width: 108px !important;
        max-width: 108px !important;
        background-color: #0c1219 !important;
        background-image: none !important;
        opacity: 1 !important;
    }

    body.rsi-dark-page.supertrend-page #supertrendTable tbody tr:nth-child(even) td:first-child {
        background-color: #0f1520 !important;
    }

    body.rsi-dark-page.supertrend-page #supertrendTable tbody tr:hover td:first-child {
        background-color: #1a2332 !important;
    }

    body.rsi-dark-page.supertrend-page #supertrendTable th:nth-child(2),
    body.rsi-dark-page.supertrend-page #supertrendTable td:nth-child(2) {
        min-width: 88px !important;
    }

    body.rsi-dark-page.supertrend-page #supertrendTable th:nth-child(3),
    body.rsi-dark-page.supertrend-page #supertrendTable td:nth-child(3),
    body.rsi-dark-page.supertrend-page #supertrendTable th:nth-child(4),
    body.rsi-dark-page.supertrend-page #supertrendTable td:nth-child(4) {
        min-width: 90px !important;
    }

    body.rsi-dark-page.supertrend-page #supertrendTable th:nth-child(5),
    body.rsi-dark-page.supertrend-page #supertrendTable td:nth-child(5),
    body.rsi-dark-page.supertrend-page #supertrendTable th:nth-child(6),
    body.rsi-dark-page.supertrend-page #supertrendTable td:nth-child(6),
    body.rsi-dark-page.supertrend-page #supertrendTable th:nth-child(7),
    body.rsi-dark-page.supertrend-page #supertrendTable td:nth-child(7) {
        min-width: 100px !important;
    }

    body.rsi-dark-page.supertrend-page #supertrendTable th:nth-child(8),
    body.rsi-dark-page.supertrend-page #supertrendTable td:nth-child(8) {
        min-width: 130px !important;
    }
}

html[dir="rtl"] body.rsi-dark-page.supertrend-page .st-table-scroll,
html[dir="rtl"] body.rsi-dark-page.supertrend-page #supertrendTable {
    direction: ltr;
}

html[dir="rtl"] body.rsi-dark-page.supertrend-page #supertrendTable th:first-child,
html[dir="rtl"] body.rsi-dark-page.supertrend-page #supertrendTable td:first-child {
    left: 0 !important;
    right: auto !important;
}

/* ── Page preloader (full-screen overlay, hidden after load) ── */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0b0f14;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}
.preloader .spinner {
    width: 42px;
    height: 42px;
    margin: 0;
    border: 3px solid rgba(148, 163, 184, 0.2);
    border-top-color: #60a5fa;
    border-radius: 50%;
    animation: st-preloader-spin 1s linear infinite;
}
.preloader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    display: none !important;
}
@keyframes st-preloader-spin {
    to { transform: rotate(360deg); }
}
