/* Approved Kisha palette. Colour declarations only: no layout or behaviour rules. */
:root {
  --kisha-chrome: #03132a;
  --kisha-workspace: #f5f7fb;
  --kisha-surface: #ffffff;
  --kisha-tint: #eef5fc;
  --kisha-ink: #10243d;
  --kisha-muted: #52647b;
  --kisha-border: #d5e2f0;
  --kisha-link: #0078b8;
  --bg: #f5f7fb;
  --bg-deep: #f5f7fb;
  --panel: #ffffff;
  --panel-strong: #ffffff;
  --text: #10243d;
  --muted: #52647b;
  --line: #d5e2f0;
  --line-soft: #e5edf5;
}

html, body, body :is(.kisha-app, .app, .kisha-main, .main, .dashboard, .data-page, .ask-page, .reports-page, .auth-page) {
  background-color: var(--kisha-workspace) !important; background-image: none !important;
  color: var(--kisha-ink) !important;
  color-scheme: light;
}

body :is(p, span, small, label, li, td, th, .muted, .subtitle, .sub, .lead, .subline, .footer, .kisha-footer, .data-footer, .analysis-note, .chart-empty, .cross-source-empty, .trial-note, .supported, .intro, .annual, .plan-limits, .monitoring-cell, .monitoring-empty) {
  color: var(--kisha-muted) !important;
}
body :is(h1, h2, h3, h4, h5, h6, strong, b, legend, .kpi-value, .kpi-label, .price, .value, .metric-value, .section-label, .file-title, .page-title, .kisha-page-title) {
  color: var(--kisha-ink) !important;
}
body a { color: var(--kisha-link) !important; }
body :is(.eyebrow, .icon, .ci, .selector-icon, .template-icon, .action-icon, .source-icon-v2, .source-icon-small, .file-upload-icon-v4, .source-group-btn, .hero-copy h1 span, .auth-message h1 span, .kisha-live-kicker, .live-kicker, .monitor-kicker, .dax-kicker) {
  color: var(--kisha-link) !important;
}

/* Content cards and menus retain their existing dimensions and spacing. */
body :is(.card, [class$="-card"], .data-card, .data-card-v2, .data-card-v3, .data-card-v4, .data-card-v5, .insight-card, .suggestion-card, .auth-card, .plan-card, .pricing-plan, .legal-card, .upload-card, .preview-card, .export-card, .feature-card, .chart-card, .mobile-card, .nia-panel, .nia-rightbar, .section, .panel, .modal, .modal-box, .connector-menu, .source-dropdown, .connect-menu, .forgot-container, .reset-container, .box, .kisha-cookie-dialog) {
  background-color: var(--kisha-surface) !important; background-image: none !important;
  color: var(--kisha-ink) !important;
  border-color: var(--kisha-border) !important;
}
body :is(.field, .plan-placeholder, .plan-usage-item, .setting, .security-row, .tester-code-panel, .attention-item, .suggest, .suggestion-item, .insight-kpi, .insight-kpi-card, .insight-note, .insight-chart, .dax-code, .dax-panel, .cross-source-item, .monitoring-row, .context, .context-pill, .data-context-strip, .selector, .period, .context-period, .meta, .quote, .quote:after, .ask, .composer, .speak-tab, .kisha-speech, .source, .source-card, .source-card-v2, .source-card-v3, .source-card-v4, .source-card-v5, .selected-item, .selected-item-v2, .selected-item-v3, .selected-file-row, .selected-file-row-v4, .analysis-empty, .analysis-empty-v3, .analysis-card-v3, .file-upload-v4, .computer-files, .computer-files-v3, .upload-zone, .how-box, .how-box-v3, .org-note, .relation, .issue, .stat, .chip, .file-meta, .drop-zone, .export-option, .legal-note, .ai-result, .ai-stat, .dataset-pill, #answer, .nia-rightbar-answer, .voice-card, .quick-list, .mobile-connection) {
  background-color: var(--kisha-tint) !important; background-image: none !important;
  color: var(--kisha-ink) !important;
  border-color: var(--kisha-border) !important;
}
body :is(main.reset-container, main.forgot-container, body > main:not(.wrap):not(.legal-page):not(.kisha-main):not(.main):not(#home):not(.kisha-page):not(.notifications-page)) {
  background-color: var(--kisha-surface) !important; background-image: none !important;
  color: var(--kisha-ink) !important;
}
body :is(.head, .section-head, .card-head, .modal-head, .modal-foot, .insight-head, table, th, td, .recent th, .recent td) {
  border-color: var(--kisha-border) !important;
}
body :is(.table th, th, .recent th) { background-color: var(--kisha-tint) !important; }

/* Input state and primary action colours; interaction rules stay in their pages. */
body :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea, .select, .auth-field input, .form-row select, .tester-code-controls input) {
  background-color: var(--kisha-surface) !important; background-image: none !important;
  color: var(--kisha-ink) !important;
  border-color: var(--kisha-border) !important;
  caret-color: var(--kisha-ink);
  color-scheme: light;
}
body :is(input, textarea)::placeholder { color: #64758b !important; }
body :is(button, .btn, .secondary, .secondary-button, .btn-mini, .top-btn, .read-action, .filter, .select-btn, .upload-btn, .upload-btn-v2, .upload-btn-v3, .upload-btn-v4, .category-btn, .source-dropdown-btn, .source-group-btn, .remove-file-v4, .close, .suggestion-use, .dax-copy-btn, .carousel-arrow, .nia-action, .suggested-question, .password-eye-toggle, .connect-button, .connect-option) {
  background-color: var(--kisha-tint) !important;
  background-image: none !important;
  color: var(--kisha-ink) !important;
  border-color: var(--kisha-border) !important;
}
body :is(.btn.primary, .kisha-btn.primary, .primary, .primary-button, .top-btn.primary, .btn-mini.primary, .auth-submit, .analyse-btn, .continue-btn-v2, .continue-btn-v3, .continue-btn-v4, .continue-btn-v5, .upload-button, .export-button.primary, .analysis-button, .ask-go, .ask-send, .header-cta, .kisha-cookie-primary, button[type="submit"]) {
  background-color: #0f8fe0 !important; background-image: linear-gradient(180deg, #0f8fe0, #0864aa) !important;
  color: #ffffff !important;
  border-color: #38b9f3 !important;
}
body :is(.primary, .primary-button, .btn.primary, .kisha-btn.primary, .auth-submit, .header-cta, button[type="submit"]) :is(span, strong, b) { color: #ffffff !important; }
body :is(input[type="checkbox"], input[type="radio"]) { accent-color: #087fc6; }
body :is(.source-card:has(.source-check:checked), .source-card-v5:has(input:checked), .filter.active, .selected-source-pills .pill, .pill) {
  background-color: #e3f3ff !important;
  border-color: #168bd0 !important;
  color: #075d91 !important;
}
body :is(.slider, .rank-bar, .distribution-bar-track) { background-color: #dfeaf4 !important; }
body .slider:before { background-color: #52647b !important; }
body .switch input:checked + .slider { background-color: #087fc6 !important; border-color: #087fc6 !important; }
body .switch input:checked + .slider:before { background-color: #ffffff !important; }

/* Dark navigation chrome is the boundary around the light workspace. */
body :is(.kisha-sidebar, .sidebar, .kisha-topbar, .topbar, .site-header, .top, .ask-top, .data-top, .auth-visual, .app-header, .kisha-header, .mobile-brand, .notifications-header, .preview-header, .upload-header, .export-header, .legal-header) {
  background-color: var(--kisha-chrome) !important; background-image: none !important;
  color: #f5f9ff !important;
  border-color: #153453 !important;
  color-scheme: dark;
}
body :is(.kisha-sidebar, .sidebar, .kisha-topbar, .topbar, .site-header, .top, .ask-top, .data-top, .auth-visual, .app-header, .kisha-header, .mobile-brand, .notifications-header, .preview-header, .upload-header, .export-header, .legal-header) :is(a, p, span, small, strong, b, h1, h2, h3, .brand, .brand-name, .page-title, .kisha-page-title, .back, .back-link) {
  color: #e9f3ff !important;
}
body :is(.kisha-sidebar, .sidebar, .kisha-topbar, .topbar, .site-header, .top, .ask-top, .data-top, .app-header, .kisha-header, .mobile-brand) :is(small, .profile span, .kisha-profile span) { color: #a9bdd6 !important; }
body :is(.kisha-nav a.active, .sidebar .nav a.active, .kisha-nav a:hover, .sidebar .nav a:hover) {
  background-color: #082c51 !important; background-image: none !important;
  border-color: #138fce !important;
  color: #ffffff !important;
}
body :is(.kisha-sidebar, .sidebar, .kisha-topbar, .topbar, .site-header, .top, .ask-top, .data-top, .auth-visual) :is(.icon, .eyebrow, .auth-message h1 span) { color: #43ceff !important; }
body :is(.kisha-topbar, .topbar, .site-header, .top, .ask-top, .data-top, .app-header, .kisha-header, .mobile-brand) :is(.kisha-btn:not(.primary), .kisha-icon-btn, .secondary, .icon-btn, .top-btn:not(.primary), .connect-button, .header-actions .upload-link) {
  background-color: #082441 !important; background-image: none !important;
  color: #e9f3ff !important;
  border-color: #285678 !important;
}
body :is(.kisha-avatar, .avatar, .big-avatar, .mark, .brand-mark, .kisha-mark, .mobile-mark, .auth-k-mark) {
  background-color: #082c51 !important;
  color: #e9f3ff !important;
  border-color: #168bd0 !important;
}

/* Legible charts on white: keep data geometry and the bright trace colours. */
body :is(.donut:after, .score-ring:after) { background-color: var(--kisha-surface) !important; background-image: none !important; color: var(--kisha-ink) !important; }
body :is(.chart-label, .chart-legend, .chart-empty) { fill: #52647b !important; }
body :is(.chart-value, .xtick text, .ytick text, .gtitle, .legendtext, svg text) { fill: #10243d !important; }
body :is(.chart-grid, .gridlayer path, .gridlines span) { stroke: #d5e2f0 !important; border-color: #d5e2f0 !important; }
body :is(svg.main-svg, .js-plotly-plot, .plot-container) { background-color: #ffffff !important; }
body .js-plotly-plot rect.bg { fill: #ffffff !important; }

/* Status colours retain their distinctions on the new light surfaces. */
body :is(.error, .error-message, .status.error, .bad, .btn-mini.danger, .warn strong, .important .notification-meta) { color: #a32b36 !important; }
body :is(.success, .status.success, .status-pill, .status, .monitoring-result, .notification-action) { color: #16704f !important; }
body :is(.warning, .warn, .dormant-notice, .notice-dot.warn, .monitoring-result.is-alert, .monitoring-result.is-error) { color: #946000 !important; }
body :is(.dormant-notice, .bad) { background-color: #fff3df !important; border-color: #e4c590 !important; }
body :is(.status-pill, .status) { background-color: #e7f6ee !important; border-color: #b6ddc9 !important; }
body .status.error { color: #a32b36 !important; background-color: #fcebef !important; border-color: #e6afbb !important; }
body :is(.kisha-cookie-dialog, .kisha-cookie-dialog p, .kisha-cookie-dialog label, .kisha-cookie-dialog small) { color: var(--kisha-ink) !important; }
body .kisha-cookie-settings-link { background-color: #ffffff !important; background-image: none !important; color: #0078b8 !important; border-color: var(--kisha-border) !important; }

/* Connection rows and read/unread states keep their existing selection logic. */
body :is(.selected-item-v4, .how-box-v4, .source-monitor-panel, .source-monitor-row, .source-refresh-btn, .source-disconnect-btn, .source-monitor-mode, .connect-selected-btn-v4) { background-color: #eef5fc !important; background-image: none !important; color: #10243d !important; border-color: #d5e2f0 !important; }
body .source-checkmark { background-color: #ffffff !important; border-color: #b5cee7 !important; }
body .source-card:has(.source-check:checked) .source-checkmark { background-color: #087fc6 !important; color: #ffffff !important; border-color: #087fc6 !important; }
body .notice.unread { background-color: #eaf4ff !important; background-image: none !important; }
body .notice:hover { background-color: #f0f6fc !important; }

/* Foregrounds that were explicitly pale in the previous dark content panels. */
body :is(code, pre, .dax-code code, .dax-code code span) { background-color: #eef5fc !important; color: #10243d !important; }
body :is(.data-eyebrow, .kpi-note, .trend-empty-detail, .insight-head span, .kisha-tab-label, .tab-label, .live-analysis, .kisha-answer-label, .speaker-label) { color: #0078b8 !important; }
body :is(.slide-badge, .badge) { background-color: #eef5fc !important; color: #0078b8 !important; border-color: #d5e2f0 !important; }
body :is(.platform-logo, .source-icon-v2, .source-icon-small, .file-upload-icon-v4, .selector-icon, .context-icon, .composer-icon, .template-icon, .action-icon) { color: #43ceff !important; }
body .platform-tile.selected { background-color: #dff1ff !important; background-image: none !important; border-color: #168bd0 !important; }
body .platform-check { background-color: #087fc6 !important; color: #ffffff !important; }
body .platform-status { background-color: #fcebef !important; color: #983449 !important; border-color: #e6afbb !important; }
body :is(.good, .issue.ok strong) { color: #16704f !important; }
body :is(.feature-icon, .setting-icon, .brand, .bell-link, .kisha-bell, .mobile-bell) { color: #0078b8 !important; }
body .feature-icon { background-color: var(--kisha-tint) !important; border-color: var(--kisha-border) !important; }
body a:is(.bell-link, .kisha-bell, .mobile-bell) { background-color: #082441 !important; color: #e9f3ff !important; }
body .carousel-position { color: #52647b !important; }
body :is(.kisha-sidebar, .sidebar, .kisha-topbar, .topbar, .site-header, .top, .ask-top, .data-top, .auth-visual, .app-header, .kisha-header, .mobile-brand, .notifications-header, .preview-header, .upload-header, .export-header, .legal-header) .brand { color: #e9f3ff !important; }

/* Preserve dim overlays; only their existing foreground panels become white. */
body.review-page .modal { background-color: rgba(0, 6, 18, .78) !important; }
body .tiktok-connect-dialog { background-color: #ffffff !important; color: #10243d !important; border-color: #d5e2f0 !important; }
body .tiktok-capability-select option { background-color: #ffffff !important; color: #10243d !important; }
body .tiktok-dialog-continue { background-color: #087fc6 !important; background-image: none !important; color: #ffffff !important; }

/* Existing particle silhouettes and animations stay intact on the light canvas. */
body :is(.hero-kisha, .kisha-core) .blob-particle { fill: #1289bd !important; }
body :is(.hero-kisha, .kisha-core) .blob-particle.bright { fill: #087ab6 !important; }
body :is(.hero-kisha, .kisha-core) .blob-particle.blue { fill: #14afe0 !important; }
body :is(.hero-kisha, .kisha-core) .blob-particle.violet { fill: #8274d0 !important; }
body :is(.hero-kisha, .kisha-core) .blob-glint { fill: #087ab6 !important; }
