/* Trading + Broker pages — light (white) primary theme */

/* ===== Shared page shells ===== */
html[data-theme="light"] .portfolio-header,
html[data-theme="light"] .gtt-header,
html[data-theme="light"] .ticker-header,
html[data-theme="light"] .broker-header,
html[data-theme="light"] .page-header {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
    border-bottom-color: rgba(15, 23, 42, 0.08) !important;
}

html[data-theme="light"] .portfolio-header .page-title,
html[data-theme="light"] .gtt-header .page-title,
html[data-theme="light"] .ticker-header .page-title,
html[data-theme="light"] .broker-header .page-title {
    color: #0b1220 !important;
    -webkit-text-fill-color: #0b1220 !important;
    background: none !important;
}

html[data-theme="light"] .page-subtitle,
html[data-theme="light"] .breadcrumb,
html[data-theme="light"] .breadcrumb-row,
html[data-theme="light"] .breadcrumb-nav a,
html[data-theme="light"] .breadcrumb-nav span {
    color: #64748b !important;
}

html[data-theme="light"] .breadcrumb a,
html[data-theme="light"] .breadcrumb-row a,
html[data-theme="light"] .breadcrumb-nav a:hover,
html[data-theme="light"] .breadcrumb-nav .current {
    color: #1d4ed8 !important;
}

html[data-theme="light"] .btn-action.secondary {
    background: rgba(5, 150, 105, 0.10) !important;
    border-color: rgba(5, 150, 105, 0.25) !important;
    color: #047857 !important;
}

html[data-theme="light"] .btn-action.tertiary {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.12) !important;
    color: #475569 !important;
}

/* ===== Trading / History premium cards ===== */
html[data-theme="light"] .card-premium,
html[data-theme="light"] .stat-card,
html[data-theme="light"] .section-card,
html[data-theme="light"] .summary-card,
html[data-theme="light"] .info-card,
html[data-theme="light"] .depth-card {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.10) !important;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06) !important;
    color: #0b1220 !important;
}

html[data-theme="light"] .summary-card.main {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), #ffffff) !important;
    border-color: rgba(37, 99, 235, 0.20) !important;
}

html[data-theme="light"] .card-header-premium,
html[data-theme="light"] .section-header,
html[data-theme="light"] .tabs-header {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(5, 150, 105, 0.03)) !important;
    border-bottom-color: rgba(15, 23, 42, 0.08) !important;
}

html[data-theme="light"] .card-header-premium h5,
html[data-theme="light"] .section-title h2,
html[data-theme="light"] .section-title {
    color: #1d4ed8 !important;
}

html[data-theme="light"] .form-label,
html[data-theme="light"] .summary-label,
html[data-theme="light"] .summary-meta {
    color: #64748b !important;
}

html[data-theme="light"] .summary-value,
html[data-theme="light"] .stat-value,
html[data-theme="light"] .qty-value,
html[data-theme="light"] .price-value,
html[data-theme="light"] .ltp-value,
html[data-theme="light"] .invested-value,
html[data-theme="light"] .current-value,
html[data-theme="light"] .trigger-main,
html[data-theme="light"] .depth-price,
html[data-theme="light"] .depth-symbol,
html[data-theme="light"] .stock-meta strong,
html[data-theme="light"] .broker-name,
html[data-theme="light"] .broker-val {
    color: #0b1220 !important;
}

html[data-theme="light"] .summary-value.profit,
html[data-theme="light"] .pnl-amount.profit,
html[data-theme="light"] .change-cell.up,
html[data-theme="light"] .change-value.up {
    color: #059669 !important;
}

html[data-theme="light"] .summary-value.loss,
html[data-theme="light"] .pnl-amount.loss,
html[data-theme="light"] .change-cell.down,
html[data-theme="light"] .change-value.down {
    color: #dc2626 !important;
}

html[data-theme="light"] .form-control,
html[data-theme="light"] .form-select,
html[data-theme="light"] .filter-input,
html[data-theme="light"] .filter-select {
    background: #f8fafc !important;
    border-color: rgba(15, 23, 42, 0.12) !important;
    color: #0b1220 !important;
}

html[data-theme="light"] .form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%232563eb' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
}

html[data-theme="light"] .form-select option {
    background: #ffffff !important;
    color: #0b1220 !important;
}

html[data-theme="light"] .signal-item {
    background: #f8fafc !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
    color: #334155 !important;
}

/* ===== Portfolio tables / tabs ===== */
html[data-theme="light"] .tabs-container,
html[data-theme="light"] .tab-content,
html[data-theme="light"] .table-wrap {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.10) !important;
}

html[data-theme="light"] .tab-btn {
    color: #64748b !important;
    background: transparent !important;
}

html[data-theme="light"] .tab-btn.active,
html[data-theme="light"] .tab-btn:hover {
    color: #1d4ed8 !important;
    background: rgba(37, 99, 235, 0.08) !important;
}

html[data-theme="light"] .tab-badge {
    background: rgba(37, 99, 235, 0.10) !important;
    color: #1d4ed8 !important;
}

html[data-theme="light"] .data-table,
html[data-theme="light"] .gtt-table,
html[data-theme="light"] .ticker-table,
html[data-theme="light"] .trades-table,
html[data-theme="light"] .depth-table {
    color: #0b1220 !important;
}

html[data-theme="light"] .data-table thead th,
html[data-theme="light"] .gtt-table thead th,
html[data-theme="light"] .ticker-table thead th,
html[data-theme="light"] .trades-table thead th,
html[data-theme="light"] .depth-table thead th {
    background: #f8fafc !important;
    color: #475569 !important;
    border-bottom-color: rgba(15, 23, 42, 0.08) !important;
}

html[data-theme="light"] .data-table tbody td,
html[data-theme="light"] .gtt-table tbody td,
html[data-theme="light"] .ticker-table tbody td,
html[data-theme="light"] .trades-table tbody td,
html[data-theme="light"] .depth-table tbody td {
    border-bottom-color: rgba(15, 23, 42, 0.06) !important;
    color: #0b1220 !important;
}

html[data-theme="light"] .data-table tbody tr:hover,
html[data-theme="light"] .gtt-table tbody tr:hover,
html[data-theme="light"] .ticker-table tbody tr:hover,
html[data-theme="light"] .trades-table tbody tr:hover {
    background: rgba(37, 99, 235, 0.04) !important;
}

html[data-theme="light"] .ohlc-cell,
html[data-theme="light"] .volume-cell,
html[data-theme="light"] .trigger-secondary,
html[data-theme="light"] .order-detail,
html[data-theme="light"] .date-cell,
html[data-theme="light"] .date-time,
html[data-theme="light"] .stock-meta span {
    color: #64748b !important;
}

html[data-theme="light"] .exchange-badge,
html[data-theme="light"] .product-badge,
html[data-theme="light"] .type-badge,
html[data-theme="light"] .pred-chip,
html[data-theme="light"] .stat-chip,
html[data-theme="light"] .order-badge {
    background: rgba(37, 99, 235, 0.08) !important;
    color: #1d4ed8 !important;
    border-color: rgba(37, 99, 235, 0.18) !important;
}

html[data-theme="light"] .signal-badge,
html[data-theme="light"] .status-badge {
    border-color: transparent !important;
}

html[data-theme="light"] .btn-view,
html[data-theme="light"] .action-btn,
html[data-theme="light"] .depth-link {
    background: rgba(37, 99, 235, 0.08) !important;
    color: #1d4ed8 !important;
    border-color: rgba(37, 99, 235, 0.20) !important;
}

html[data-theme="light"] .empty-state h3,
html[data-theme="light"] .empty-state h4 {
    color: #0b1220 !important;
}

html[data-theme="light"] .empty-state p,
html[data-theme="light"] .table-footer,
html[data-theme="light"] .supported-brokers {
    color: #64748b !important;
}

html[data-theme="light"] .empty-icon {
    background: rgba(37, 99, 235, 0.10) !important;
    color: #2563eb !important;
}

html[data-theme="light"] .brokers-strip,
html[data-theme="light"] .broker-item,
html[data-theme="light"] .broker-mini {
    background: #f8fafc !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
    color: #334155 !important;
}

html[data-theme="light"] .filters-row,
html[data-theme="light"] .stats-bar {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
}

html[data-theme="light"] .stat-chip {
    background: #f8fafc !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    color: #334155 !important;
}

html[data-theme="light"] .depth-header,
html[data-theme="light"] .depth-section,
html[data-theme="light"] .depth-footer,
html[data-theme="light"] .depth-divider {
    border-color: rgba(15, 23, 42, 0.08) !important;
    color: #334155 !important;
}

html[data-theme="light"] .qty-bar {
    background: #e2e8f0 !important;
}

/* ===== Trade book / Margin calculator token pages ===== */
html[data-theme="light"] .tb-header,
html[data-theme="light"] .mg-header,
html[data-theme="light"] .ob-header,
html[data-theme="light"] .al-header {
    background: #ffffff !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    border-radius: 16px !important;
    padding: 20px 24px !important;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05) !important;
}

html[data-theme="light"] .tb-page,
html[data-theme="light"] .mg-page,
html[data-theme="light"] .ob-page,
html[data-theme="light"] .al-page {
    background: #f8fafc !important;
    color: #0b1220 !important;
    min-height: calc(100dvh / var(--ui-scale, 0.75));
}

html[data-theme="light"] .al-btn-outline,
html[data-theme="light"] .ob-btn-outline,
html[data-theme="light"] .tb-btn-outline,
html[data-theme="light"] .mg-btn-outline {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.12) !important;
    color: #334155 !important;
}

html[data-theme="light"] .al-btn-primary,
html[data-theme="light"] .ob-btn-primary,
html[data-theme="light"] .tb-btn-primary,
html[data-theme="light"] .mg-btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25) !important;
}

html[data-theme="light"] .al-stat-card,
html[data-theme="light"] .ob-stat-card,
html[data-theme="light"] .tb-stat-card,
html[data-theme="light"] .mg-stat-card,
html[data-theme="light"] .al-card,
html[data-theme="light"] .ob-card,
html[data-theme="light"] .tb-card,
html[data-theme="light"] .mg-card {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05) !important;
}

html[data-theme="light"] .al-empty h3,
html[data-theme="light"] .ob-empty h3,
html[data-theme="light"] .tb-empty h3,
html[data-theme="light"] .mg-empty h3 {
    color: #0b1220 !important;
}

html[data-theme="light"] .al-empty p,
html[data-theme="light"] .ob-empty p,
html[data-theme="light"] .tb-empty p,
html[data-theme="light"] .mg-empty p {
    color: #64748b !important;
}

html[data-theme="light"] .tb-filter-bar,
html[data-theme="light"] .mg-filter-bar,
html[data-theme="light"] .ob-filter-bar,
html[data-theme="light"] .al-filter-bar,
html[data-theme="light"] .al-card-header,
html[data-theme="light"] .mg-panel,
html[data-theme="light"] .mg-result-card,
html[data-theme="light"] .mg-input-card {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
}

html[data-theme="light"] .tb-header h1,
html[data-theme="light"] .mg-header h1,
html[data-theme="light"] .ob-header h1,
html[data-theme="light"] .al-header h1,
html[data-theme="light"] .tb-title,
html[data-theme="light"] .mg-title {
    color: #0b1220 !important;
}

html[data-theme="light"] .tb-subtitle,
html[data-theme="light"] .mg-subtitle,
html[data-theme="light"] .tb-muted,
html[data-theme="light"] .mg-muted,
html[data-theme="light"] .tb-label,
html[data-theme="light"] .mg-label {
    color: #64748b !important;
}

html[data-theme="light"] .tb-input,
html[data-theme="light"] .mg-input,
html[data-theme="light"] .tb-select,
html[data-theme="light"] .mg-select,
html[data-theme="light"] .ob-input,
html[data-theme="light"] .ob-select,
html[data-theme="light"] .al-input,
html[data-theme="light"] .al-select {
    background: #f8fafc !important;
    border-color: rgba(15, 23, 42, 0.12) !important;
    color: #0b1220 !important;
}

html[data-theme="light"] .tb-table thead th,
html[data-theme="light"] .mg-table thead th,
html[data-theme="light"] .ob-table thead th,
html[data-theme="light"] .al-table thead th {
    background: #f8fafc !important;
    color: #475569 !important;
}

html[data-theme="light"] .tb-table tbody td,
html[data-theme="light"] .mg-table tbody td,
html[data-theme="light"] .ob-table tbody td,
html[data-theme="light"] .al-table tbody td {
    color: #0b1220 !important;
    border-bottom-color: rgba(15, 23, 42, 0.06) !important;
}

html[data-theme="light"] .tb-table tbody tr:hover,
html[data-theme="light"] .mg-table tbody tr:hover,
html[data-theme="light"] .ob-table tbody tr:hover,
html[data-theme="light"] .al-table tbody tr:hover {
    background: rgba(37, 99, 235, 0.04) !important;
}

/* History-specific */
html[data-theme="light"] .page-subtitle {
    color: #64748b !important;
}

html[data-theme="light"] .empty-trades,
html[data-theme="light"] .no-trades {
    color: #64748b !important;
}
