/*
 * KG Channel Intelligence OS V10
 * Optional dark interface inspired by modern video-intelligence tools.
 * This layer is presentation-only and does not alter application behavior.
 */

:root {
  --v10-dark-bg: #070d17;
  --v10-dark-bg-alt: #091321;
  --v10-dark-nav: #07101c;
  --v10-dark-surface: #101b2a;
  --v10-dark-surface-2: #152235;
  --v10-dark-surface-3: #1a2a40;
  --v10-dark-line: #26374f;
  --v10-dark-line-strong: #344a68;
  --v10-dark-text: #edf3fb;
  --v10-dark-muted: #9badc2;
  --v10-dark-blue: #4f8cff;
  --v10-dark-blue-strong: #2f6feb;
  --v10-dark-purple: #8b5cf6;
  --v10-dark-cyan: #22d3ee;
  --v10-dark-green: #34d399;
  --v10-dark-amber: #fbbf24;
  --v10-dark-red: #fb7185;
  --v10-dark-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

html {
  background: #f4f1ea;
}

html[data-kg-theme="dark"] {
  color-scheme: dark;
  color: var(--v10-dark-text);
  background: var(--v10-dark-bg);
  --ink: var(--v10-dark-text);
  --muted: var(--v10-dark-muted);
  --green: var(--v10-dark-blue-strong);
  --green2: var(--v10-dark-blue);
  --nav: var(--v10-dark-nav);
  --line: var(--v10-dark-line);
  --soft: var(--v10-dark-surface-2);
  --white: var(--v10-dark-surface);
  --amber: var(--v10-dark-amber);
  --red: var(--v10-dark-red);
  --gold: var(--v10-dark-purple);
  --gold2: #a78bfa;
  --bg: var(--v10-dark-bg);
  --surface: var(--v10-dark-surface);
  --shadow: var(--v10-dark-shadow);
  --shadow2: 0 30px 90px rgba(0, 0, 0, 0.48);
}

html[data-kg-theme="light"] {
  color-scheme: light;
}

body,
.sidebar,
.mainContent,
.card,
.dataTable,
input,
select,
textarea,
button,
.button {
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

/* Theme switch */
.v10ThemeToggle {
  min-height: 50px;
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 9px;
  padding: 8px 10px !important;
  border: 1px solid rgba(124, 141, 151, 0.25) !important;
  border-radius: 13px !important;
  background: rgba(255, 255, 255, 0.07) !important;
  color: #f4f7fb !important;
  box-shadow: none !important;
  text-align: left;
  transform: none !important;
}

.v10ThemeToggle:hover {
  border-color: rgba(129, 164, 255, 0.55) !important;
  background: rgba(79, 140, 255, 0.13) !important;
  transform: none !important;
}

.v10ThemeToggle:focus-visible {
  outline: 3px solid rgba(79, 140, 255, 0.35);
  outline-offset: 2px;
}

.v10ThemeToggle-sidebar {
  width: 100%;
  margin-top: auto;
}

.v10ThemeIcon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(
    135deg,
    rgba(79, 140, 255, 0.26),
    rgba(139, 92, 246, 0.28)
  );
  color: #dfeaff;
  font-size: 18px;
  line-height: 1;
}

.v10ThemeText {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.v10ThemeText b {
  overflow: hidden;
  color: inherit !important;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v10ThemeText small {
  overflow: hidden;
  color: #93a7bd !important;
  font-size: 10px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v10ThemeSwitch {
  position: relative;
  width: 36px;
  height: 21px;
  justify-self: end;
  border: 1px solid rgba(151, 166, 184, 0.45);
  border-radius: 999px;
  background: #445064;
}

.v10ThemeSwitch i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.32);
  transition: transform 160ms ease;
}

.v10ThemeSwitch.isDark {
  border-color: rgba(120, 158, 255, 0.75);
  background: linear-gradient(
    90deg,
    var(--v10-dark-blue),
    var(--v10-dark-purple)
  );
}

.v10ThemeSwitch.isDark i {
  transform: translateX(15px);
}

.v10ThemeToggle-floating {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 30;
  width: 190px;
  background: rgba(9, 18, 31, 0.9) !important;
  border-color: rgba(124, 150, 190, 0.42) !important;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.26) !important;
  backdrop-filter: blur(16px);
}

html[data-kg-theme="light"] .v10ThemeToggle-floating {
  background: rgba(255, 255, 255, 0.92) !important;
  border-color: #d5dfdc !important;
  color: #20302d !important;
  box-shadow: 0 14px 38px rgba(15, 42, 38, 0.16) !important;
}

html[data-kg-theme="light"] .v10ThemeToggle-floating .v10ThemeText small {
  color: #687874 !important;
}

.sidebarFooter {
  margin-top: 12px;
}

/* Dark application shell */
html[data-kg-theme="dark"] body {
  color: var(--v10-dark-text);
  background:
    radial-gradient(
      circle at 82% -12%,
      rgba(79, 140, 255, 0.16),
      transparent 34%
    ),
    radial-gradient(circle at 58% 0%, rgba(139, 92, 246, 0.1), transparent 26%),
    linear-gradient(145deg, var(--v10-dark-bg), var(--v10-dark-bg-alt));
}

html[data-kg-theme="dark"] .shell {
  background: transparent;
}

html[data-kg-theme="dark"] .sidebar {
  overflow-y: auto;
  background:
    radial-gradient(
      circle at 10% 0%,
      rgba(79, 140, 255, 0.14),
      transparent 27%
    ),
    linear-gradient(180deg, #07101c, #081322 64%, #080e19);
  border-right-color: rgba(91, 125, 171, 0.25);
  box-shadow: 14px 0 46px rgba(0, 0, 0, 0.24);
  scrollbar-width: thin;
}

html[data-kg-theme="dark"] .brand {
  border-bottom-color: rgba(130, 155, 189, 0.16);
}

html[data-kg-theme="dark"] .brandMark {
  background: linear-gradient(145deg, #58a6ff, #8b5cf6);
  color: #fff;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.34),
    0 10px 28px rgba(79, 140, 255, 0.28);
}

html[data-kg-theme="dark"] .brand span {
  color: #8fa5bf;
}

html[data-kg-theme="dark"] .sidebar nav a {
  color: #a9b9cc;
}

html[data-kg-theme="dark"] .sidebar nav a:hover,
html[data-kg-theme="dark"] .sidebarNavButton:hover {
  color: #f4f7fc;
  background: rgba(79, 140, 255, 0.1);
}

html[data-kg-theme="dark"] .sidebar nav a.active,
html[data-kg-theme="dark"] .sidebarNavButton.active {
  color: #fff;
  border-color: rgba(112, 155, 255, 0.28);
  background: linear-gradient(
    90deg,
    rgba(79, 140, 255, 0.25),
    rgba(139, 92, 246, 0.1)
  );
  box-shadow: inset 3px 0 var(--v10-dark-blue);
}

html[data-kg-theme="dark"] .navIcon {
  color: #79a7ff;
}

html[data-kg-theme="dark"] .channelNavTree {
  border-left-color: rgba(111, 139, 175, 0.28);
}

html[data-kg-theme="dark"] .channelNavToggle,
html[data-kg-theme="dark"] .channelToolLinks a,
html[data-kg-theme="dark"] .allChannelsLink {
  color: #aebed0;
}

html[data-kg-theme="dark"] .channelNavToggle:hover,
html[data-kg-theme="dark"] .channelNavGroup.expanded > .channelNavToggle {
  background: rgba(79, 140, 255, 0.1);
}

html[data-kg-theme="dark"] .sidebarFooter {
  border-top-color: rgba(130, 155, 189, 0.16);
}

html[data-kg-theme="dark"] .userMeta span {
  color: #8fa5bf;
}

html[data-kg-theme="dark"] .iconButton {
  color: #d9e5f5;
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.12);
}

html[data-kg-theme="dark"] .mainContent {
  color: var(--v10-dark-text);
}

html[data-kg-theme="dark"] .mainContent :where(h1, h2, h3, h4, h5, h6),
html[data-kg-theme="dark"]
  .mainContent
  :where(strong, b, dt, dd, label, legend, summary) {
  color: var(--v10-dark-text);
}

html[data-kg-theme="dark"] .mainContent :where(p, small, .muted),
html[data-kg-theme="dark"] .pageHeader p,
html[data-kg-theme="dark"] .sectionTitle p {
  color: var(--v10-dark-muted);
}

html[data-kg-theme="dark"] .eyebrow,
html[data-kg-theme="dark"] .sectionEyebrow {
  color: #78a7ff;
}

html[data-kg-theme="dark"] .mainContent a:not(.button) {
  color: #80adff;
}

html[data-kg-theme="dark"] .mainContent a:not(.button):hover {
  color: #b2ccff;
}

/* Core surfaces */
html[data-kg-theme="dark"]
  .mainContent
  :where(
    .card,
    .dataTable,
    .videoCard,
    .repairCard,
    .taskCard,
    .candidateCard,
    .personRow,
    .researchSubnav,
    .candidateEvidenceDetails,
    .seoOutputBlock,
    .candidateTrendPanel,
    .postScanControls,
    .adminTabs,
    .adminSectionTabs,
    .taskDetailPanel,
    .customDateRange,
    .periodToggle,
    .v61History,
    .v983SeoDetails,
    .channelSeoHistoryList details,
    .v98PeriodBar,
    .v911ChannelChoice
  ),
html[data-kg-theme="dark"] .mainContent [class*="Card"],
html[data-kg-theme="dark"] .mainContent [class*="Surface"],
html[data-kg-theme="dark"] .mainContent [class*="Details"] {
  background: linear-gradient(
    180deg,
    rgba(17, 29, 45, 0.98),
    rgba(13, 24, 38, 0.98)
  ) !important;
  border-color: var(--v10-dark-line) !important;
  box-shadow: var(--v10-dark-shadow);
}

html[data-kg-theme="dark"]
  .mainContent
  :where(
    .softPanel,
    .copyBox,
    .transcript,
    .assetText,
    .selectedAsset,
    .taskAssignmentPanel,
    .instructionGrid section,
    .taskWorkflowGrid > section,
    .checkGrid label,
    .targetChecks label,
    .interactiveChecklist label,
    .linkedTargets > div,
    .v61ExperimentGrid > div,
    .v61SeoPack,
    .v64SeoTraceGrid > div,
    .v64SeoOutput,
    .measurementPlanCards section,
    .v64BlueprintDetails section,
    .v65RemovedList > div,
    .v82RunDetails dl > div,
    .v82JobDetails dl > div,
    .v91DailyStages > div,
    .v982CycleChannel,
    .v983SeoColumns section,
    .channelSeoSummaryGrid section,
    .v98AiGrid > div,
    .v985NextAction,
    .aiCostFacts > div
  ) {
  color: var(--v10-dark-text);
  background: var(--v10-dark-surface-2) !important;
  border-color: var(--v10-dark-line) !important;
  box-shadow: none;
}

html[data-kg-theme="dark"]
  .mainContent
  :where(
    .miniMetrics span,
    .costSummaryGrid > div,
    .metricCells span,
    .scoreGrid span,
    .candidateScoreGrid span,
    .candidateQuickFacts span,
    .dataScanFacts > div,
    .dataScanSampleBuckets span,
    .dataScanScorecard dl div,
    .dashboardFocusItem,
    .opsStrip span,
    .funnelMetrics > div,
    .evidenceMetrics > div,
    .checkpointRow span,
    .strategyHeroGrid > div,
    .analysisKpis > div,
    .territoryList > div,
    .candidateScores > div,
    .candidateMetrics > div,
    .v6ScoreGrid > div,
    .v61ChipRow span,
    .portfolioChannels .portfolioRole,
    .approvedBenchmarkFacts span,
    .v8WorkflowStatus span,
    .v8FunnelGrid span,
    .referenceMetricList span,
    .v985SimpleProgress > div,
    .v9114LiveMeta > span,
    .v982CycleStages > div,
    .v983SeoPreview > div,
    .v9AutomationChannel,
    .v9AutomationToggles,
    .v98RetentionGrid span,
    .v98PlaylistList > div,
    .v98CoverageSummary span
  ) {
  color: var(--v10-dark-muted);
  background: var(--v10-dark-surface-2) !important;
  border-color: var(--v10-dark-line) !important;
}

html[data-kg-theme="dark"]
  .mainContent
  :where(
    .miniMetrics span,
    .costSummaryGrid > div,
    .metricCells span,
    .scoreGrid span,
    .candidateScoreGrid span,
    .candidateQuickFacts span,
    .dataScanFacts > div,
    .dataScanSampleBuckets span,
    .dataScanScorecard dl div,
    .funnelMetrics > div,
    .evidenceMetrics > div,
    .strategyHeroGrid > div,
    .analysisKpis > div,
    .candidateScores > div,
    .candidateMetrics > div,
    .v6ScoreGrid > div,
    .v985SimpleProgress > div,
    .v9114LiveMeta > span,
    .v982CycleStages > div,
    .v98RetentionGrid span,
    .v98CoverageSummary span
  )
  b {
  color: var(--v10-dark-text) !important;
}

/* Forms and buttons */
html[data-kg-theme="dark"] :where(input, select, textarea) {
  color: var(--v10-dark-text);
  background: #0c1726 !important;
  border-color: var(--v10-dark-line-strong) !important;
  box-shadow: none;
}

html[data-kg-theme="dark"] :where(input, textarea)::placeholder {
  color: #6f8198;
  opacity: 1;
}

html[data-kg-theme="dark"] :where(input, select, textarea):focus {
  border-color: var(--v10-dark-blue) !important;
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.2) !important;
}

html[data-kg-theme="dark"] option,
html[data-kg-theme="dark"] optgroup {
  color: var(--v10-dark-text);
  background: #0c1726;
}

html[data-kg-theme="dark"] input[type="checkbox"],
html[data-kg-theme="dark"] input[type="radio"] {
  accent-color: var(--v10-dark-blue);
}

html[data-kg-theme="dark"]
  button:not(
    .sidebarNavButton,
    .channelNavToggle,
    .v10ThemeToggle,
    .accountPasswordLink
  ),
html[data-kg-theme="dark"] .button {
  color: #fff;
  background: linear-gradient(
    135deg,
    var(--v10-dark-blue-strong),
    var(--v10-dark-purple)
  );
  border-color: rgba(139, 166, 255, 0.36);
  box-shadow: 0 9px 24px rgba(47, 111, 235, 0.2);
}

html[data-kg-theme="dark"]
  button:not(
    .sidebarNavButton,
    .channelNavToggle,
    .v10ThemeToggle,
    .accountPasswordLink
  ):hover:not(:disabled),
html[data-kg-theme="dark"] .button:hover:not(:disabled) {
  box-shadow: 0 12px 30px rgba(79, 140, 255, 0.28);
}

html[data-kg-theme="dark"] :where(button, .button).secondary,
html[data-kg-theme="dark"] .secondary,
html[data-kg-theme="dark"] .globalBackButton,
html[data-kg-theme="dark"] .youtubeDirectLink,
html[data-kg-theme="dark"] .secondaryLink {
  color: #c9d7e8 !important;
  background: var(--v10-dark-surface-2) !important;
  border-color: var(--v10-dark-line-strong) !important;
  box-shadow: none !important;
}

html[data-kg-theme="dark"] :where(button, .button).secondary:hover,
html[data-kg-theme="dark"] .globalBackButton:hover,
html[data-kg-theme="dark"] .youtubeDirectLink:hover,
html[data-kg-theme="dark"] .secondaryLink:hover {
  color: #fff !important;
  background: var(--v10-dark-surface-3) !important;
  border-color: #4f6f98 !important;
}

html[data-kg-theme="dark"] .ghostDanger,
html[data-kg-theme="dark"] button.secondary.danger,
html[data-kg-theme="dark"] .button.secondary.danger {
  color: #ff9aaa !important;
  background: rgba(251, 113, 133, 0.08) !important;
  border-color: rgba(251, 113, 133, 0.4) !important;
  box-shadow: none !important;
}

html[data-kg-theme="dark"] button:disabled,
html[data-kg-theme="dark"] .button:disabled {
  filter: saturate(0.55);
  opacity: 0.52;
}

/* Tabs and segmented controls */
html[data-kg-theme="dark"]
  :where(
    .tabs,
    .dataScanTabs,
    .adminTabs,
    .adminSectionTabs,
    .segmented,
    .periodToggle,
    .v62WorkflowNav,
    .v98PeriodBar,
    .v98DataTabs,
    .v98ScopeTabs
  ) {
  background: rgba(12, 23, 38, 0.92) !important;
  border-color: var(--v10-dark-line) !important;
}

html[data-kg-theme="dark"]
  :where(
    .tabs button,
    .dataScanTabs button,
    .adminTabs button,
    .segmented button,
    .periodToggle button,
    .v98PeriodBar button,
    .v98DataTabs button,
    .v98ScopeTabs button
  ) {
  color: var(--v10-dark-muted);
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

html[data-kg-theme="dark"]
  :where(
    .tabs button.active,
    .dataScanTabs button.active,
    .adminTabs button.active,
    .segmented button.active,
    .periodToggle button.active,
    .v98PeriodBar button.active,
    .v98DataTabs button.active,
    .v98ScopeTabs button.active
  ) {
  color: #fff !important;
  background: linear-gradient(
    135deg,
    rgba(79, 140, 255, 0.28),
    rgba(139, 92, 246, 0.2)
  ) !important;
  border-color: rgba(112, 155, 255, 0.3) !important;
}

html[data-kg-theme="dark"] .adminSectionTabs a {
  color: var(--v10-dark-muted);
}

html[data-kg-theme="dark"] .adminSectionTabs a.active {
  color: #fff;
  background: rgba(79, 140, 255, 0.2);
}

/* Tables and structured data */
html[data-kg-theme="dark"] .dataTable {
  background: rgba(13, 24, 38, 0.96) !important;
  border-color: var(--v10-dark-line) !important;
}

html[data-kg-theme="dark"] table {
  color: var(--v10-dark-text);
}

html[data-kg-theme="dark"] th {
  color: #aebed1;
  background: #0c1726 !important;
  border-color: var(--v10-dark-line) !important;
}

html[data-kg-theme="dark"] td {
  color: #dce6f3;
  border-color: var(--v10-dark-line) !important;
}

html[data-kg-theme="dark"] tbody tr:hover {
  background: rgba(79, 140, 255, 0.07);
}

html[data-kg-theme="dark"] .portfolioMetricsTable th:first-child,
html[data-kg-theme="dark"] .portfolioMetricsTable td:first-child {
  background: #0d1827 !important;
}

html[data-kg-theme="dark"] pre,
html[data-kg-theme="dark"] code {
  color: #d8e6ff;
  background: #091321 !important;
  border-color: var(--v10-dark-line) !important;
}

/* Status and semantic colors */
html[data-kg-theme="dark"] .badge {
  color: #cbd7e6;
  background: rgba(148, 163, 184, 0.14);
  border-color: rgba(148, 163, 184, 0.24);
}

html[data-kg-theme="dark"] .badge.success {
  color: #7ce9bc;
  background: rgba(52, 211, 153, 0.13);
  border-color: rgba(52, 211, 153, 0.28);
}

html[data-kg-theme="dark"] .badge.info {
  color: #9ec2ff;
  background: rgba(79, 140, 255, 0.14);
  border-color: rgba(79, 140, 255, 0.3);
}

html[data-kg-theme="dark"] .badge.warning {
  color: #fbd66d;
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.28);
}

html[data-kg-theme="dark"] .badge.danger {
  color: #ffa2b0;
  background: rgba(251, 113, 133, 0.13);
  border-color: rgba(251, 113, 133, 0.3);
}

html[data-kg-theme="dark"]
  :where(.warningBox, .dataScanDetailNotice, .v6ApprovalPanel) {
  color: #f5d77b;
  background: rgba(251, 191, 36, 0.09) !important;
  border-color: rgba(251, 191, 36, 0.32) !important;
  box-shadow: none;
}

html[data-kg-theme="dark"]
  :where(.warningBox, .dataScanDetailNotice, .v6ApprovalPanel)
  :where(p, span, small, b, strong, li) {
  color: inherit !important;
}

html[data-kg-theme="dark"]
  :where(
    .dangerPanel,
    .memberDeleteZone,
    .revisionBanner,
    .taskReversalPanel,
    .candidateExclusionNotice,
    .v65ReversalBar
  ) {
  color: #ffadba;
  background: rgba(251, 113, 133, 0.09) !important;
  border-color: rgba(251, 113, 133, 0.32) !important;
  box-shadow: none;
}

html[data-kg-theme="dark"]
  :where(
    .dangerPanel,
    .memberDeleteZone,
    .revisionBanner,
    .taskReversalPanel,
    .candidateExclusionNotice,
    .v65ReversalBar
  )
  :where(p, span, small, b, strong, li) {
  color: inherit !important;
}

html[data-kg-theme="dark"]
  :where(
    .toast,
    .truthBanner,
    .strategyBanner,
    .dataScanNotice,
    .dataScanSafetyBanner,
    .v61DecisionBar,
    .v82CompletedStandardRun,
    .v982Assessment
  ) {
  color: #a9edd5;
  background: linear-gradient(
    135deg,
    rgba(52, 211, 153, 0.11),
    rgba(79, 140, 255, 0.08)
  ) !important;
  border-color: rgba(52, 211, 153, 0.28) !important;
  box-shadow: none;
}

html[data-kg-theme="dark"]
  :where(
    .toast,
    .truthBanner,
    .strategyBanner,
    .dataScanNotice,
    .dataScanSafetyBanner,
    .v61DecisionBar,
    .v82CompletedStandardRun,
    .v982Assessment
  )
  :where(p, span, small, b, strong, li) {
  color: inherit !important;
}

/* Live activity and V9.13.1 details control */
html[data-kg-theme="dark"] .v9114LiveActivity {
  background:
    radial-gradient(
      circle at top right,
      rgba(79, 140, 255, 0.14),
      transparent 36%
    ),
    linear-gradient(145deg, #0f1c2d, #0c1725) !important;
  border-color: #2d4564 !important;
}

html[data-kg-theme="dark"] .v9114LiveTask {
  color: var(--v10-dark-text);
  background: rgba(20, 34, 53, 0.92) !important;
  border-color: var(--v10-dark-line) !important;
}

html[data-kg-theme="dark"] .v9114LiveTask.is-failed,
html[data-kg-theme="dark"] .v9114LiveTask.is-stalled {
  background: rgba(72, 28, 40, 0.55) !important;
  border-color: rgba(251, 113, 133, 0.38) !important;
}

html[data-kg-theme="dark"] .v9114LiveTask.is-history {
  background: rgba(76, 57, 24, 0.38) !important;
  border-color: rgba(251, 191, 36, 0.28) !important;
}

html[data-kg-theme="dark"] .v9114LiveMeta > span {
  background: #101d2d !important;
}

html[data-kg-theme="dark"] .v9114LiveError {
  color: #ffadba;
  background: rgba(251, 113, 133, 0.12) !important;
  border-color: rgba(251, 113, 133, 0.24) !important;
}

html[data-kg-theme="dark"] .v9131LiveToggle {
  color: #dce8fb !important;
  background: linear-gradient(
    135deg,
    rgba(79, 140, 255, 0.22),
    rgba(139, 92, 246, 0.18)
  ) !important;
  border-color: rgba(112, 155, 255, 0.36) !important;
  box-shadow: none !important;
}

html[data-kg-theme="dark"] .v9131LiveCollapsed {
  color: var(--v10-dark-muted);
  background: rgba(79, 140, 255, 0.07) !important;
  border-color: rgba(79, 140, 255, 0.2) !important;
}

/* Data, charts and workflow surfaces */
html[data-kg-theme="dark"]
  :where(
    .dataScanEvidencePack,
    .dataScanAnalysis,
    .dataScanProductionBrief,
    .v97EvidenceWorkCard > details,
    .v97TitleDirections > div,
    .dataScanTableWrap,
    .mainWorkflowLinks > a,
    .legacyArchiveGrid > div,
    .v61PrimaryTitle button,
    .v65RevokedAssignments article,
    .v8VideoTable > a,
    .v985SimpleProgress > div,
    .v91DailyStages > div,
    .v982CycleChannel,
    .v983SeoColumns section,
    .channelSeoSummaryGrid section,
    .channelSeoHistoryList details,
    .v98ChartToolbar button,
    .v98PeriodBar button,
    .v98DataTabs button,
    .v98ScopeTabs button,
    .v911ChannelChoice
  ) {
  color: var(--v10-dark-text);
  background: var(--v10-dark-surface-2) !important;
  border-color: var(--v10-dark-line) !important;
}

html[data-kg-theme="dark"]
  :where(.sparkline, .v98BarChart, .v98DailyChart, .referenceDetailChart svg) {
  background: #0b1624 !important;
  border-color: var(--v10-dark-line) !important;
}

html[data-kg-theme="dark"]
  :where(.v98BarChart, .v98DailyChart, .referenceDetailChart)
  svg
  :where(line, path, polyline) {
  stroke: #6aa0ff;
}

html[data-kg-theme="dark"] .v98DataSurface code {
  color: #c7d7f3;
  background: #091321 !important;
}

html[data-kg-theme="dark"] hr,
html[data-kg-theme="dark"] .metricList > div,
html[data-kg-theme="dark"] .healthRows > div,
html[data-kg-theme="dark"] .actionDefinitionList > div {
  border-color: var(--v10-dark-line) !important;
}

/* Login and locked states */
html[data-kg-theme="dark"] .login {
  color: var(--v10-dark-text);
  background:
    radial-gradient(
      circle at 20% 12%,
      rgba(79, 140, 255, 0.2),
      transparent 28%
    ),
    radial-gradient(
      circle at 82% 78%,
      rgba(139, 92, 246, 0.18),
      transparent 32%
    ),
    linear-gradient(145deg, #060b13, #0a1524);
}

html[data-kg-theme="dark"] .loginAura {
  border-color: rgba(112, 155, 255, 0.18);
  box-shadow:
    0 0 0 60px rgba(79, 140, 255, 0.025),
    0 0 0 120px rgba(139, 92, 246, 0.022);
}

html[data-kg-theme="dark"] .loginBox.luxe,
html[data-kg-theme="dark"] .lockCard {
  color: var(--v10-dark-text);
  background: rgba(15, 27, 43, 0.94) !important;
  border-color: rgba(103, 137, 181, 0.36) !important;
  box-shadow: 0 40px 110px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(18px);
}

html[data-kg-theme="dark"] .loginBox.luxe :where(h1, label, b) {
  color: var(--v10-dark-text);
}

html[data-kg-theme="dark"] .loginBox.luxe :where(p, small) {
  color: var(--v10-dark-muted);
}

html[data-kg-theme="dark"] .loginCrest,
html[data-kg-theme="dark"] .lockMark {
  color: #fff;
  background: linear-gradient(145deg, #58a6ff, #8b5cf6);
}

html[data-kg-theme="dark"] .accountLoginForm {
  border-color: var(--v10-dark-line);
  background: rgba(8, 17, 30, 0.5);
}

html[data-kg-theme="dark"] .accountPasswordLink {
  color: #91b7ff !important;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

html[data-kg-theme="dark"] .googleLoginButton {
  color: #dce8f8 !important;
  background: #152235 !important;
  border-color: var(--v10-dark-line-strong) !important;
  box-shadow: none !important;
}

html[data-kg-theme="dark"] .loginDivider {
  color: #71849b;
}

html[data-kg-theme="dark"] .lockedScreen {
  background:
    radial-gradient(
      circle at 50% 10%,
      rgba(79, 140, 255, 0.18),
      transparent 32%
    ),
    linear-gradient(145deg, #060b13, #0a1524);
}

/* Scrollbars */
html[data-kg-theme="dark"] * {
  scrollbar-color: #3a4f6b #0b1523;
}

html[data-kg-theme="dark"] *::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}

html[data-kg-theme="dark"] *::-webkit-scrollbar-track {
  background: #0b1523;
}

html[data-kg-theme="dark"] *::-webkit-scrollbar-thumb {
  border: 3px solid #0b1523;
  border-radius: 999px;
  background: #3a4f6b;
}

html[data-kg-theme="dark"] *::-webkit-scrollbar-thumb:hover {
  background: #4d678a;
}

@media (max-width: 760px) {
  .v10ThemeToggle-floating {
    top: 10px;
    right: 10px;
    width: 54px;
    grid-template-columns: 32px;
    padding: 8px 10px !important;
  }

  .v10ThemeToggle-floating .v10ThemeText,
  .v10ThemeToggle-floating .v10ThemeSwitch {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  body,
  .sidebar,
  .mainContent,
  .card,
  .dataTable,
  input,
  select,
  textarea,
  button,
  .button,
  .v10ThemeSwitch i {
    transition: none !important;
  }
}
