/* Watchlist & Alerts – professional dark theme (Markets) */

body.rsi-dark-page {
    background: #0b0f14 !important;
    color: #e2e8f0 !important;
    padding-top: 70px !important;
}

body.rsi-dark-page .page-wrap {
    max-width: 1320px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}

/* Panels */
body.rsi-dark-page .panel {
    background: #141b26 !important;
    border: 1px solid #2a3544 !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35) !important;
}

body.rsi-dark-page .title-line h1 {
    color: #f8fafc !important;
}

body.rsi-dark-page .title-line h2 {
    color: #e2e8f0 !important;
}

body.rsi-dark-page .subtitle,
body.rsi-dark-page .tiny,
body.rsi-dark-page .countdown {
    color: #94a3b8 !important;
}

/* Badges */
body.rsi-dark-page .badge-soft {
    background: rgba(59, 130, 246, 0.12) !important;
    color: #93c5fd !important;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

body.rsi-dark-page .badge-soft.loading {
    background: rgba(245, 158, 11, 0.12) !important;
    color: #fbbf24 !important;
    border-color: rgba(245, 158, 11, 0.25);
}

body.rsi-dark-page .badge-soft.error {
    background: rgba(239, 68, 68, 0.12) !important;
    color: #fca5a5 !important;
    border-color: rgba(239, 68, 68, 0.25);
}

/* Bootstrap form controls */
body.rsi-dark-page .form-label {
    color: #94a3b8 !important;
    font-size: 0.82rem;
    font-weight: 600;
}

body.rsi-dark-page .form-control,
body.rsi-dark-page .form-select {
    background: #0c1219 !important;
    border: 1px solid #2a3544 !important;
    color: #e2e8f0 !important;
}

body.rsi-dark-page .form-control:focus,
body.rsi-dark-page .form-select:focus {
    background: #0c1219 !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2) !important;
    color: #f8fafc !important;
}

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

body.rsi-dark-page .btn-primary {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: #fff !important;
}

body.rsi-dark-page .btn-primary:hover {
    background: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
}

body.rsi-dark-page .btn-success {
    background: #059669 !important;
    border-color: #059669 !important;
}

body.rsi-dark-page .btn-outline-primary {
    color: #60a5fa !important;
    border-color: #3b82f6 !important;
    background: transparent !important;
}

body.rsi-dark-page .btn-outline-primary:hover {
    background: rgba(59, 130, 246, 0.12) !important;
    color: #93c5fd !important;
}

body.rsi-dark-page .btn-outline-secondary {
    color: #94a3b8 !important;
    border-color: #2a3544 !important;
    background: transparent !important;
}

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

/* Accordion sections */
body.rsi-dark-page .alert-section-header {
    background: linear-gradient(135deg, #1a2332 0%, #141b26 100%) !important;
    border-color: #2a3544 !important;
}

body.rsi-dark-page .alert-section-header:hover {
    background: #1e293b !important;
    border-color: #334155 !important;
}

body.rsi-dark-page .alert-section-header.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(99, 102, 241, 0.1) 100%) !important;
    border-color: rgba(59, 130, 246, 0.35) !important;
}

body.rsi-dark-page .alert-section-header h3 {
    color: #e2e8f0 !important;
}

body.rsi-dark-page .alert-section-header .toggle-icon {
    color: #64748b !important;
}

body.rsi-dark-page .alert-section-body {
    background: #0c1219 !important;
    border-color: #2a3544 !important;
}

body.rsi-dark-page .alert-row {
    border-bottom-color: #1e293b !important;
}

body.rsi-dark-page .alert-row label {
    color: #cbd5e1 !important;
}

body.rsi-dark-page .alert-row input[type="number"],
body.rsi-dark-page .alert-row select {
    background: #141b26 !important;
    border-color: #2a3544 !important;
    color: #e2e8f0 !important;
}

body.rsi-dark-page .alert-row input[type="number"]:focus,
body.rsi-dark-page .alert-row select:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15) !important;
}

/* Table */
body.rsi-dark-page .table-wrap {
    border-color: #2a3544 !important;
    background: #0c1219 !important;
}

body.rsi-dark-page table th {
    background: #1a2332 !important;
    color: #94a3b8 !important;
    border-bottom-color: #2a3544 !important;
}

body.rsi-dark-page table th:hover {
    background: #1e293b !important;
}

body.rsi-dark-page table th.sorted .sort-icon {
    color: #60a5fa !important;
}

body.rsi-dark-page table td {
    color: #e2e8f0 !important;
    border-bottom-color: #1e293b !important;
}

body.rsi-dark-page table tr:hover td {
    background: rgba(59, 130, 246, 0.04) !important;
}

body.rsi-dark-page .error-row {
    background: rgba(239, 68, 68, 0.08) !important;
}

/* Signal pills */
body.rsi-dark-page .sig-long {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #6ee7b7 !important;
}

body.rsi-dark-page .sig-short {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #fca5a5 !important;
}

body.rsi-dark-page .sig-neutral {
    background: rgba(100, 116, 139, 0.2) !important;
    color: #94a3b8 !important;
}

/* Action buttons */
body.rsi-dark-page .btn-action {
    background: #1a2332 !important;
    border-color: #2a3544 !important;
    color: #cbd5e1 !important;
}

body.rsi-dark-page .btn-action:hover {
    background: #1e293b !important;
    color: #f8fafc !important;
}

body.rsi-dark-page .btn-action.primary {
    background: #4f46e5 !important;
    border-color: #4f46e5 !important;
    color: #fff !important;
}

body.rsi-dark-page .btn-action.primary:hover {
    background: #4338ca !important;
}

body.rsi-dark-page .btn-action.danger {
    color: #fca5a5 !important;
    border-color: rgba(239, 68, 68, 0.35) !important;
}

body.rsi-dark-page .btn-action.danger:hover {
    background: rgba(239, 68, 68, 0.12) !important;
}

/* Info bar */
body.rsi-dark-page .info-bar .stats {
    color: #94a3b8 !important;
}

body.rsi-dark-page .info-bar .stats strong {
    color: #f8fafc !important;
}

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

/* History panel */
body.rsi-dark-page .history-item {
    border-bottom-color: #1e293b !important;
}

body.rsi-dark-page .history-item.unread {
    background: rgba(245, 158, 11, 0.08) !important;
}

body.rsi-dark-page .history-item .time {
    color: #64748b !important;
}

body.rsi-dark-page .history-item .symbol {
    color: #f8fafc !important;
}

body.rsi-dark-page .history-item .message {
    color: #94a3b8 !important;
}

body.rsi-dark-page .history-item .ack-btn {
    background: #1a2332 !important;
    color: #94a3b8 !important;
}

body.rsi-dark-page .history-item .ack-btn:hover {
    background: #1e293b !important;
    color: #e2e8f0 !important;
}

/* Modal */
body.rsi-dark-page .modal-backdrop {
    background: rgba(0, 0, 0, 0.65) !important;
}

body.rsi-dark-page .modal-content {
    background: #141b26 !important;
    border: 1px solid #2a3544 !important;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55) !important;
}

body.rsi-dark-page .modal-header {
    background: linear-gradient(135deg, #1e3a5f 0%, #312e81 100%) !important;
}

body.rsi-dark-page .modal-body {
    color: #e2e8f0 !important;
}

body.rsi-dark-page .modal-footer {
    background: #0c1219 !important;
    border-top-color: #2a3544 !important;
}

body.rsi-dark-page .preset-row {
    border-bottom-color: #2a3544 !important;
}

body.rsi-dark-page .preset-row label,
body.rsi-dark-page .modal-body label,
body.rsi-dark-page .modal-body strong {
    color: #cbd5e1 !important;
}

body.rsi-dark-page .preset-row select,
body.rsi-dark-page .condition-row-modal select,
body.rsi-dark-page .condition-row-modal input {
    background: #0c1219 !important;
    border-color: #2a3544 !important;
    color: #e2e8f0 !important;
}

body.rsi-dark-page .condition-row-modal {
    border-bottom-color: #1e293b !important;
}

body.rsi-dark-page .condition-row-modal .remove-cond {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #fca5a5 !important;
}

body.rsi-dark-page .condition-row-modal .remove-cond:hover {
    background: rgba(239, 68, 68, 0.25) !important;
}

/* Footer */
body.rsi-dark-page .footer-simple {
    background: #0c1219 !important;
    border-top: 1px solid #2a3544 !important;
    color: #64748b !important;
}

@media (max-width: 640px) {
    body.rsi-dark-page .page-wrap {
        padding: 14px 10px 28px;
    }
}

/* Horizontal scroll + sticky symbol column */
body.rsi-dark-page.watchlist-alerts-page .watchlist-alerts-table-scroll {
    max-height: min(62vh, calc(100vh - 300px));
    overflow: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    background: #0c1219 !important;
    border: 1px solid #2a3544 !important;
    border-radius: 10px;
    position: relative;
}

body.rsi-dark-page.watchlist-alerts-page .watchlist-alerts-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.watchlist-alerts-page #watchlistTable {
    width: max-content !important;
    min-width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background: #0c1219 !important;
    margin: 0 !important;
    table-layout: auto !important;
    color: #e2e8f0 !important;
}

body.rsi-dark-page.watchlist-alerts-page #watchlistTable th,
body.rsi-dark-page.watchlist-alerts-page #watchlistTable td {
    display: table-cell !important;
    white-space: nowrap;
    padding: 9px 10px !important;
}

body.rsi-dark-page.watchlist-alerts-page #watchlistTable 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;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    border-bottom: 1px solid #2a3544 !important;
}

body.rsi-dark-page.watchlist-alerts-page #watchlistTable th:first-child,
body.rsi-dark-page.watchlist-alerts-page #watchlistTable td:first-child {
    position: sticky !important;
    left: 0 !important;
    z-index: 3 !important;
    background: #0c1219 !important;
    box-shadow: 4px 0 14px rgba(0, 0, 0, 0.45) !important;
    border-right: 1px solid #2a3544 !important;
    min-width: 100px;
}

body.rsi-dark-page.watchlist-alerts-page #watchlistTable thead th:first-child {
    z-index: 5 !important;
    background: #1a2332 !important;
}

html[dir="rtl"] body.rsi-dark-page.watchlist-alerts-page .watchlist-alerts-table-scroll,
html[dir="rtl"] body.rsi-dark-page.watchlist-alerts-page #watchlistTable {
    direction: rtl;
}

html[dir="rtl"] body.rsi-dark-page.watchlist-alerts-page #watchlistTable th:first-child,
html[dir="rtl"] body.rsi-dark-page.watchlist-alerts-page #watchlistTable td:first-child {
    left: auto !important;
    right: 0 !important;
    box-shadow: -4px 0 14px rgba(0, 0, 0, 0.45) !important;
    border-right: none !important;
    border-left: 1px solid #2a3544 !important;
    text-align: right !important;
    padding-right: 16px !important;
    padding-left: 10px !important;
}

@media (max-width: 768px) {
    body.rsi-dark-page.watchlist-alerts-page #watchlistTable th:first-child,
    body.rsi-dark-page.watchlist-alerts-page #watchlistTable td:first-child {
        min-width: 88px;
    }
}

/* SEO + FAQ sections (inside page-wrap, match Supertrend / indicator pages) */
body.rsi-dark-page.watchlist-alerts-page .seo-description-section {
    margin-top: 4px !important;
}

body.rsi-dark-page.watchlist-alerts-page .seo-description-section .card {
    background: #141b26 !important;
    border: 1px solid #2a3544 !important;
    border-radius: 14px !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35) !important;
    overflow: hidden;
}

body.rsi-dark-page.watchlist-alerts-page .seo-description-section .card::before {
    content: "";
    display: block;
    height: 4px;
    background: linear-gradient(90deg, #1d4ed8, #06b6d4, #a855f7);
}

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

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

body.rsi-dark-page.watchlist-alerts-page .seo-description-section h2 {
    font-weight: 900 !important;
    letter-spacing: -0.02em;
    margin-bottom: 14px !important;
    padding-bottom: 10px !important;
    border-bottom: 2px solid rgba(96, 165, 250, 0.25) !important;
}

body.rsi-dark-page.watchlist-alerts-page .seo-description-section h2::before {
    content: "▸";
    display: inline-block;
    margin-inline-end: 10px;
    color: #60a5fa !important;
}

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

body.rsi-dark-page.watchlist-alerts-page .seo-description-section .alert-heading {
    color: #e2e8f0 !important;
}

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

html[dir="rtl"] body.rsi-dark-page.watchlist-alerts-page .seo-description-section h2::before {
    content: "◂";
    margin-inline-end: 0;
    margin-inline-start: 10px;
}

html[dir="rtl"] body.rsi-dark-page.watchlist-alerts-page .seo-description-section .row {
    direction: rtl;
}
