/* Shared light-mode overrides for app pages (settings, portfolio, signals, trading, brokers, wallet, static pages) */

/* ===== Broker / tool CSS variable tokens ===== */
html[data-theme="light"] {
    --ob-bg-page: #f3f6fb;
    --ob-bg-card: #ffffff;
    --ob-bg-elevated: #f1f5f9;
    --ob-border: rgba(15, 23, 42, 0.10);
    --ob-text-primary: #0b1220;
    --ob-text-secondary: #475569;
    --ob-text-muted: #64748b;
    --ob-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);

    --mg-bg-page: #f8fafc;
    --mg-bg-card: #ffffff;
    --mg-bg-elevated: #f1f5f9;
    --mg-bg-input: #f8fafc;
    --mg-border: rgba(15, 23, 42, 0.10);
    --mg-text-primary: #0b1220;
    --mg-text-secondary: #475569;
    --mg-text-muted: #64748b;

    --al-bg-page: #f8fafc;
    --al-bg-card: #ffffff;
    --al-bg-elevated: #f1f5f9;
    --al-border: rgba(15, 23, 42, 0.10);
    --al-text-primary: #0b1220;
    --al-text-secondary: #475569;
    --al-text-muted: #64748b;

    --tb-bg-page: #f8fafc;
    --tb-bg-card: #ffffff;
    --tb-bg-elevated: #f1f5f9;
    --tb-border: rgba(15, 23, 42, 0.10);
    --tb-text-primary: #0b1220;
    --tb-text-secondary: #475569;
    --tb-text-muted: #64748b;
}

/* ===== Page headers (compact MNC style) ===== */
html[data-theme="light"] .signals-header,
html[data-theme="light"] .broker-header,
html[data-theme="light"] .recharge-header,
html[data-theme="light"] .dash-header,
html[data-theme="light"] .depth-header,
html[data-theme="light"] .ticker-header,
html[data-theme="light"] .gtt-header {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
    border-bottom-color: rgba(15, 23, 42, 0.08) !important;
}

html[data-theme="light"] .page-header {
    background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 50%, #f3f6fb 100%) !important;
    border-bottom-color: rgba(15, 23, 42, 0.08) !important;
}

html[data-theme="light"] .page-title,
html[data-theme="light"] .header-title,
html[data-theme="light"] .ob-header h1,
html[data-theme="light"] .mg-header h1,
html[data-theme="light"] .al-header h1,
html[data-theme="light"] .tb-header h1 {
    background: linear-gradient(135deg, #1d4ed8, #059669) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    color: transparent !important;
}

html[data-theme="light"] .page-title:not([class*="gradient"]),
html[data-theme="light"] .signals-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"] .header-subtitle,
html[data-theme="light"] .page-desc {
    color: #475569 !important;
}

/* ===== Stat bars & pills ===== */
html[data-theme="light"] .stat-item,
html[data-theme="light"] .filter-pill,
html[data-theme="light"] .tab-pill,
html[data-theme="light"] .quick-filter {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.10) !important;
    color: #334155 !important;
}

html[data-theme="light"] .stat-item:hover,
html[data-theme="light"] .filter-pill:hover,
html[data-theme="light"] .tab-pill:hover {
    background: rgba(37, 99, 235, 0.08) !important;
    border-color: rgba(37, 99, 235, 0.25) !important;
}

html[data-theme="light"] .stat-item.active,
html[data-theme="light"] .filter-pill.active,
html[data-theme="light"] .tab-pill.active {
    background: rgba(37, 99, 235, 0.12) !important;
    border-color: rgba(37, 99, 235, 0.35) !important;
    color: #1d4ed8 !important;
}

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

html[data-theme="light"] .stat-value {
    color: #0b1220 !important;
}

html[data-theme="light"] .stat-value.positive,
html[data-theme="light"] .text-success,
html[data-theme="light"] .change-positive {
    color: #059669 !important;
}

html[data-theme="light"] .stat-value.negative,
html[data-theme="light"] .text-danger,
html[data-theme="light"] .change-negative {
    color: #dc2626 !important;
}

/* ===== Cards ===== */
html[data-theme="light"] .stat-card,
html[data-theme="light"] .card-premium,
html[data-theme="light"] .section-card,
html[data-theme="light"] .info-card,
html[data-theme="light"] .feature-card,
html[data-theme="light"] .pricing-card,
html[data-theme="light"] .plan-card,
html[data-theme="light"] .stock-card,
html[data-theme="light"] .signal-card,
html[data-theme="light"] .alert-card,
html[data-theme="light"] .wishlist-card,
html[data-theme="light"] .portfolio-card,
html[data-theme="light"] .prediction-card,
html[data-theme="light"] .metric-card,
html[data-theme="light"] .backtest-card,
html[data-theme="light"] .error-card,
html[data-theme="light"] .content-card,
html[data-theme="light"] .step-content-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"] .stat-card:hover,
html[data-theme="light"] .card-premium:hover,
html[data-theme="light"] .section-card:hover,
html[data-theme="light"] .stock-card:hover,
html[data-theme="light"] .signal-card:hover,
html[data-theme="light"] .feature-card:hover,
html[data-theme="light"] .plan-card:hover {
    border-color: rgba(37, 99, 235, 0.28) !important;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.10) !important;
}

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

html[data-theme="light"] .card-header-premium h5,
html[data-theme="light"] .card-header h5,
html[data-theme="light"] .section-title,
html[data-theme="light"] .symbol-info h1,
html[data-theme="light"] .current-price {
    color: #0b1220 !important;
}

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

html[data-theme="light"] .card-body-premium,
html[data-theme="light"] .card-body,
html[data-theme="light"] .section-body {
    color: #334155 !important;
}

/* ===== Settings sidebar ===== */
/* ===== Settings sidebar ===== */
html[data-theme="light"] .menu-sidebar {
    background: transparent !important;
    border-color: rgba(15, 23, 42, 0.10) !important;
}

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

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

html[data-theme="light"] .menu-item {
    color: #475569 !important;
    border-color: transparent !important;
}

html[data-theme="light"] .menu-item:hover,
html[data-theme="light"] .menu-item.active {
    background: rgba(37, 99, 235, 0.10) !important;
    border-color: rgba(37, 99, 235, 0.25) !important;
    color: #1d4ed8 !important;
}

/* ===== Tables ===== */
html[data-theme="light"] .table-container,
html[data-theme="light"] .data-table-wrap,
html[data-theme="light"] .ob-table-wrap,
html[data-theme="light"] .mg-table-wrap,
html[data-theme="light"] .al-table-wrap,
html[data-theme="light"] .tb-table-wrap {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.10) !important;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06) !important;
}

html[data-theme="light"] .table-container table thead th,
html[data-theme="light"] .data-table thead th,
html[data-theme="light"] .ob-table thead th,
html[data-theme="light"] .mg-table thead th,
html[data-theme="light"] .al-table thead th,
html[data-theme="light"] .tb-table thead th {
    background: #f8fafc !important;
    color: #475569 !important;
    border-bottom-color: rgba(15, 23, 42, 0.08) !important;
}

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

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

html[data-theme="light"] .table-container table tbody td strong,
html[data-theme="light"] .data-table tbody td strong {
    color: #0b1220 !important;
}

/* ===== Broker page shells ===== */
html[data-theme="light"] .ob-page,
html[data-theme="light"] .mg-page,
html[data-theme="light"] .al-page,
html[data-theme="light"] .tb-page {
    background: var(--ob-bg-page) !important;
    color: var(--ob-text-primary) !important;
}

html[data-theme="light"] .ob-card,
html[data-theme="light"] .mg-card,
html[data-theme="light"] .al-card,
html[data-theme="light"] .tb-card,
html[data-theme="light"] .ob-stat-card,
html[data-theme="light"] .mg-stat-card,
html[data-theme="light"] .al-stat-card,
html[data-theme="light"] .tb-stat-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;
}

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

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

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

html[data-theme="light"] .ob-badge,
html[data-theme="light"] .mg-badge,
html[data-theme="light"] .al-badge,
html[data-theme="light"] .tb-badge {
    border-color: rgba(15, 23, 42, 0.08) !important;
}

/* ===== Wallet / recharge ===== */
html[data-theme="light"] .wallet-balance-card,
html[data-theme="light"] .amount-card,
html[data-theme="light"] .payment-card,
html[data-theme="light"] .recharge-card,
html[data-theme="light"] .quick-amount-btn {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.10) !important;
    color: #0b1220 !important;
}

html[data-theme="light"] .quick-amount-btn:hover,
html[data-theme="light"] .quick-amount-btn.selected,
html[data-theme="light"] .amount-card.selected {
    background: rgba(37, 99, 235, 0.10) !important;
    border-color: rgba(37, 99, 235, 0.35) !important;
    color: #1d4ed8 !important;
}

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

html[data-theme="light"] .recharge-details h4 {
    color: #0b1220 !important;
}

html[data-theme="light"] .recharge-details span {
    color: #64748b !important;
}

/* ===== Search page ===== */
html[data-theme="light"] .search-page,
html[data-theme="light"] .search-results-section {
    background: transparent !important;
}

html[data-theme="light"] .search-header,
html[data-theme="light"] .results-header {
    color: #0b1220 !important;
}

html[data-theme="light"] .stock-card-header,
html[data-theme="light"] .stock-card-body,
html[data-theme="light"] .stock-card-footer,
html[data-theme="light"] .signal-card-header,
html[data-theme="light"] .signal-card-body {
    color: #334155 !important;
}

html[data-theme="light"] .stock-symbol,
html[data-theme="light"] .stock-name {
    color: #0b1220 !important;
}

/* ===== Static / info pages ===== */
html[data-theme="light"] .about-hero::after,
html[data-theme="light"] .contact-hero::after,
html[data-theme="light"] .features-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.82) 0%, rgba(241, 245, 249, 0.78) 100%);
    pointer-events: none;
    z-index: 0;
}

html[data-theme="light"] .about-hero,
html[data-theme="light"] .contact-hero,
html[data-theme="light"] .features-hero,
html[data-theme="light"] .legal-hero,
html[data-theme="light"] .page-hero {
    position: relative;
}

html[data-theme="light"] .hero-content {
    position: relative;
    z-index: 1;
}

html[data-theme="light"] .about-section,
html[data-theme="light"] .contact-section,
html[data-theme="light"] .features-section,
html[data-theme="light"] .legal-section,
html[data-theme="light"] .content-section {
    background: #f3f6fb !important;
    color: #334155 !important;
}

html[data-theme="light"] .content-section:nth-child(even) {
    background: #eef2f7 !important;
    border-top-color: rgba(15, 23, 42, 0.06) !important;
}

html[data-theme="light"] .about-section h2,
html[data-theme="light"] .contact-section h2,
html[data-theme="light"] .features-section h2,
html[data-theme="light"] .legal-section h2,
html[data-theme="light"] .content-section h2,
html[data-theme="light"] .hero-content h1,
html[data-theme="light"] .section-heading {
    background: linear-gradient(135deg, #1d4ed8, #059669) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

html[data-theme="light"] .hero-desc,
html[data-theme="light"] .hero-subtitle,
html[data-theme="light"] .about-text,
html[data-theme="light"] .legal-content,
html[data-theme="light"] .terms-content,
html[data-theme="light"] .privacy-content,
html[data-theme="light"] .mission-text p,
html[data-theme="light"] .mission-text li {
    color: #475569 !important;
}

html[data-theme="light"] .mission-text h3,
html[data-theme="light"] .feature-title,
html[data-theme="light"] .contact-info h3 {
    color: #0b1220 !important;
}

html[data-theme="light"] .value-card,
html[data-theme="light"] .team-card,
html[data-theme="light"] .mission-card {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.10) !important;
    color: #334155 !important;
}

/* ===== Tutorials ===== */
html[data-theme="light"] .tutorial-page {
    background: #f3f6fb !important;
}

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

html[data-theme="light"] .tutorial-sidebar a,
html[data-theme="light"] .tutorial-nav-item {
    color: #475569 !important;
}

html[data-theme="light"] .tutorial-sidebar a.active,
html[data-theme="light"] .tutorial-nav-item.active {
    background: rgba(37, 99, 235, 0.10) !important;
    color: #1d4ed8 !important;
}

html[data-theme="light"] .tutorial-main {
    color: #334155 !important;
}

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

/* ===== Backtest ===== */
html[data-theme="light"] .backtest-header,
html[data-theme="light"] .backtest-form-section {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
}

html[data-theme="light"] .backtest-results,
html[data-theme="light"] .results-panel {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.10) !important;
}

/* ===== Alerts & trading ===== */
html[data-theme="light"] .alert-form-card,
html[data-theme="light"] .trade-form-card,
html[data-theme="light"] .order-panel,
html[data-theme="light"] .history-filters {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.10) !important;
}

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

/* ===== Subscriptions / checkout ===== */
html[data-theme="light"] .subscription-card,
html[data-theme="light"] .checkout-card,
html[data-theme="light"] .billing-card {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.10) !important;
    color: #334155 !important;
}

html[data-theme="light"] .plan-price,
html[data-theme="light"] .plan-name {
    color: #0b1220 !important;
}

html[data-theme="light"] .plan-feature {
    color: #475569 !important;
}

/* ===== SEBI consent popup ===== */
html[data-theme="light"] .sebi-consent-overlay {
    background: rgba(15, 23, 42, 0.45) !important;
}

html[data-theme="light"] .sebi-consent-modal {
    background: #ffffff !important;
    border-color: rgba(37, 99, 235, 0.25) !important;
    box-shadow: 0 25px 80px rgba(15, 23, 42, 0.15) !important;
}

html[data-theme="light"] .sebi-consent-title {
    color: #0b1220 !important;
}

html[data-theme="light"] .sebi-consent-text,
html[data-theme="light"] .sebi-consent-note {
    color: #475569 !important;
}

html[data-theme="light"] .sebi-consent-icon {
    background: rgba(37, 99, 235, 0.10) !important;
}

/* ===== Error pages ===== */
html[data-theme="light"] .error-container {
    background: transparent !important;
}

html[data-theme="light"] .error-title {
    color: #0b1220 !important;
}

html[data-theme="light"] .error-message {
    color: #475569 !important;
}

/* ===== Modals & overlays ===== */
html[data-theme="light"] .modal-content,
html[data-theme="light"] .popup-card,
html[data-theme="light"] .drawer-panel {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.10) !important;
    color: #0b1220 !important;
}

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

html[data-theme="light"] .modal-backdrop.show {
    opacity: 0.35 !important;
}

/* ===== Badges & status chips ===== */
html[data-theme="light"] .badge-success,
html[data-theme="light"] .status-success,
html[data-theme="light"] .chip-buy {
    background: rgba(5, 150, 105, 0.12) !important;
    color: #047857 !important;
    border-color: rgba(5, 150, 105, 0.25) !important;
}

html[data-theme="light"] .badge-danger,
html[data-theme="light"] .status-danger,
html[data-theme="light"] .chip-sell {
    background: rgba(220, 38, 38, 0.10) !important;
    color: #b91c1c !important;
    border-color: rgba(220, 38, 38, 0.22) !important;
}

html[data-theme="light"] .badge-warning,
html[data-theme="light"] .status-warning,
html[data-theme="light"] .chip-hold {
    background: rgba(217, 119, 6, 0.12) !important;
    color: #b45309 !important;
    border-color: rgba(217, 119, 6, 0.25) !important;
}

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

/* ===== Generic dark-surface overrides (inline style patterns) ===== */
html[data-theme="light"] [style*="background: rgba(30, 41, 59"],
html[data-theme="light"] [style*="background:rgba(30, 41, 59"] {
    background: #ffffff !important;
}

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

html[data-theme="light"] .divider,
html[data-theme="light"] hr {
    border-color: rgba(15, 23, 42, 0.08) !important;
}

html[data-theme="light"] .text-muted,
html[data-theme="light"] .muted,
html[data-theme="light"] .secondary-text {
    color: #64748b !important;
}

html[data-theme="light"] .label,
html[data-theme="light"] .form-label,
html[data-theme="light"] .field-label {
    color: #475569 !important;
}

/* ===== Market depth / live ticker / GTT (broker secondary pages) ===== */
html[data-theme="light"] .depth-panel,
html[data-theme="light"] .ticker-panel,
html[data-theme="light"] .gtt-panel,
html[data-theme="light"] .depth-card,
html[data-theme="light"] .ticker-card,
html[data-theme="light"] .gtt-card {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.10) !important;
}

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

html[data-theme="light"] .bid-side {
    background: rgba(5, 150, 105, 0.06) !important;
}

html[data-theme="light"] .ask-side {
    background: rgba(220, 38, 38, 0.06) !important;
}

/* ===== Predictions pages (IPO, MF, market) ===== */
html[data-theme="light"] .predictions-grid .stock-card,
html[data-theme="light"] .ipo-card,
html[data-theme="light"] .mf-card {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.10) !important;
}

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

html[data-theme="light"] .filter-tab,
html[data-theme="light"] .category-tab {
    color: #64748b !important;
}

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