/* C1 ownership: Shared theme and component presentation. Keep existing --ui-* values and compatibility names. */
:root {
  --ui-font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ui-text: #111827;
  --ui-text-2: #374151;
  --ui-text-muted: #6b7280;
  --ui-text-faint: #9ca3af;
  --ui-bg: #ffffff;
  --ui-surface: #ffffff;
  --ui-surface-2: #fefefe;
  --ui-surface-panel: #ffffff;
  --ui-surface-chart: #ffffff;
  --ui-surface-rail: #fefefe;
  --ui-hover: #f3f4f6;
  --ui-hover-border: #d7dce3;
  --ui-hover-text: #111827;
  --ui-active: #e5e7eb;
  --ui-active-border: #c6ccd4;
  --ui-active-text: #111827;
  --ui-border: #e4e9f0;
  --ui-border-soft: #edf1f6;
  --ui-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --ui-shadow-pop: 0 8px 24px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
  --ui-separator: #dde4ec;
  --ui-separator-strong: #d5dde7;
  --ui-structure-divider: #dbe2eb;
  --ui-axis-text: #4b5563;
  --ui-axis-muted: #6b7280;
  --ui-axis-divider: #e7edf5;
}

html,
body {
  font-family: var(--ui-font);
  color: var(--ui-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.top-toolbar,
.bottom-dock,
.right-panel-card,
.panel-card,
.right-panel-header,
.right-panel-body,
.btn,
select,
.val,
.legend,
.muted {
  font-family: var(--ui-font);
}

.top-toolbar {
  backdrop-filter: none;
}

.bottom-dock {
  background: var(--ui-surface-2);
  backdrop-filter: none;
}

.main-shell {
  background: var(--ui-surface-chart);
}

:where(html:not([data-ca-style-v5="2"])) .top-toolbar {
  border-bottom: 1px solid var(--ui-separator);
}

.left-utility-shell,
:where(html:not([data-ca-style-v5="2"])) .right-shell {
  background: var(--ui-surface-rail);
}

.left-utility-shell {
  border-right: 2px solid var(--ui-structure-divider);
}

.center-panel {
  background: var(--ui-surface-chart);
}

:where(html:not([data-ca-style-v5="2"])) .right-shell {
  border-left: 2px solid var(--ui-structure-divider);
  box-shadow: none;
}

.right-shell.rail-open {
  position: relative;
}

.right-shell.rail-open::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 49px;
  width: 1px;
  background: var(--ui-separator);
  pointer-events: none;
}

.bottom-dock {
  border-color: var(--ui-separator) !important;
  box-shadow: none;
}

#chartWrap {
  background: var(--ui-surface-chart);
}

#chartRsi {
  border-bottom: 1px solid var(--ui-separator);
  background: var(--ui-surface-chart);
}

#chartMain {
  background: var(--ui-surface-chart);
}

.top-toolbar .btn,
.bottom-dock .btn,
.panel-card .btn,
.right-panel-card .btn,
.btn {
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--ui-border);
  background: var(--ui-surface);
  color: var(--ui-text-2);
  box-shadow: none;
  font-size: 12px;
  font-weight: 500;
  transition: background-color .12s ease, border-color .12s ease, color .12s ease, box-shadow .12s ease;
}

.btn-sm {
  height: 26px;
  padding: 0 8px;
  border-radius: 7px;
}

.toolbar-icon-btn {
  min-width: 34px;
  width: 34px;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.toolbar-icon-btn .toolbar-btn-label {
  display: none !important;
}

.toolbar-login-btn,
.toolbar-refresh-btn,
.toolbar-gann-btn,
.toolbar-auto-gann-btn,
.toolbar-save-btn,
.toolbar-magnet-btn {
  min-width: 36px;
  width: 36px;
}

.toolbar-login-btn {
  min-width: 34px;
  width: 34px;
}

.toolbar-btn-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex: 0 0 auto;
}

.toolbar-login-btn .toolbar-btn-icon {
  width: 17px;
  height: 17px;
}

.toolbar-gann-btn .toolbar-btn-icon,
.toolbar-auto-gann-btn .toolbar-btn-icon,
.toolbar-refresh-btn .toolbar-btn-icon,
.toolbar-save-btn .toolbar-btn-icon {
  width: 16px;
  height: 16px;
}

.toolbar-magnet-btn .toolbar-btn-icon {
  width: 17px;
  height: 17px;
}

#btnChartStateSnapshot .toolbar-btn-icon,
#btnChartStateSnapshot .toolbar-icon-host,
#btnChartStateSnapshot .toolbar-icon-host svg {
  width: 21px;
  height: 21px;
}

.toolbar-btn-icon-badged {
  overflow: visible;
}

.toolbar-icon-host {
  width: 100%;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.toolbar-icon-host svg {
  width: 100%;
  height: 100%;
  display: block;
}

.toolbar-badge {
  position: absolute;
  top: -5px;
  right: -8px;
  font-size: 6px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.06em;
  color: var(--ui-text-muted);
  pointer-events: none;
  white-space: nowrap;
}

.toolbar-icon-btn:disabled .toolbar-btn-icon,
.toolbar-icon-btn:disabled .toolbar-badge {
  opacity: 0.72;
}

.toolbar-icon-btn.is-busy .toolbar-btn-icon,
.toolbar-icon-btn.is-busy .toolbar-badge {
  opacity: 0.62;
}

@media (any-hover:hover) {
  .btn:hover,
  .top-toolbar .btn:hover,
  .bottom-dock .btn:hover,
  .panel-card .btn:hover,
  .right-panel-card .btn:hover {
    background: var(--ui-hover);
    border-color: var(--ui-hover-border);
    color: var(--ui-hover-text);
  }
}

.btn.active,
.btn[aria-pressed="true"] {
  background: var(--ui-active);
  border-color: var(--ui-active-border);
  color: var(--ui-active-text);
  font-weight: 600;
}

.btn:disabled {
  opacity: 1;
  color: var(--ui-text-faint);
  border-color: var(--ui-border-soft);
  background: var(--ui-surface-chart);
}

.toolbar-group {
  color: var(--ui-text-2);
}

.top-toolbar .muted,
#gotoStatus,
#kiteAuthStatus {
  color: var(--ui-text-muted) !important;
}

.top-toolbar .btn,
.top-toolbar,
.right-panel-card,
.right-panel-header,
.right-panel-body {
  font-size: 12px;
}

.panel-card,
.right-panel-card {
  background: var(--ui-surface-rail);
  border: 1px solid var(--ui-border);
  border-radius: 10px;
  box-shadow: none;
}

.right-panel-card {
  padding: 0;
  overflow: hidden;
}

.right-shell .right-panel-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.right-panel-header,
.panel-card-title {
  margin: 0;
  min-height: 34px;
  padding: 8px 10px;
  background: var(--ui-surface);
  color: var(--ui-text);
  border-bottom: 1px solid var(--ui-border-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.right-shell .right-panel-header {
  background: transparent;
  border-bottom: 1px solid var(--ui-border-soft);
  padding-left: 6px;
  padding-right: 6px;
}

.panel-card-title {
  margin: -10px -10px 10px -10px;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.right-panel-body {
  padding: 10px;
  color: var(--ui-text-2);
}

.right-shell .right-panel-body {
  padding-left: 0;
  padding-right: 0;
}

.drawings-shell .right-panel-body {
  min-height: 220px;
}

.watchlist-card .right-panel-body,
#watchlistPanelShell .right-panel-body {
  color: var(--ui-text-2);
  font-size: 12px;
}

@media (any-hover:hover) {
  .watchlist-card .right-panel-body > div:hover,
  #watchlistPanelShell .right-panel-body > div:hover,
  .watchlist-card .right-panel-body li:hover,
  #watchlistPanelShell .right-panel-body li:hover {
    background: #f8fafc;
  }
}

.watchlist-card .right-panel-body > div,
#watchlistPanelShell .right-panel-body > div,
.watchlist-card .right-panel-body li,
#watchlistPanelShell .right-panel-body li {
  border-radius: 0;
  border-bottom: 1px solid var(--ui-border-soft);
  transition: background-color .12s ease, color .12s ease;
}

.watchlist-card .right-panel-body > div:last-child,
#watchlistPanelShell .right-panel-body > div:last-child,
.watchlist-card .right-panel-body li:last-child,
#watchlistPanelShell .right-panel-body li:last-child {
  border-bottom: 0;
}


.right-shell .panel-card-title {
  background: transparent;
  border-bottom: 1px solid var(--ui-border-soft);
}

.left-utility-rail .rail-btn,
.utility-rail .rail-btn {
  width: 30px;
  height: 30px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent !important;
  color: var(--ui-text-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none !important;
  transition: background-color .12s ease, color .12s ease, opacity .12s ease, border-color .12s ease, box-shadow .12s ease;
}

.left-utility-rail .rail-btn .tv-ic,
.utility-rail .rail-btn .tv-ic,
.left-utility-rail .rail-btn img,
.utility-rail .rail-btn img,
.left-utility-rail .rail-btn svg,
.utility-rail .rail-btn svg {
  width: 20px;
  height: 20px;
  background: transparent !important;
}

@media (any-hover:hover) {
  .left-utility-rail .rail-btn:hover,
  .utility-rail .rail-btn:hover {
    background: var(--ui-hover) !important;
    border-color: var(--ui-hover-border);
    color: var(--ui-hover-text);
    box-shadow: var(--ui-shadow-sm) !important;
  }
}

.left-utility-rail .rail-btn.active,
.utility-rail .rail-btn.active {
  background: var(--ui-active) !important;
  border-color: var(--ui-active-border);
  color: var(--ui-active-text);
  font-weight: 700;
  box-shadow: var(--ui-shadow-sm) !important;
}

.left-utility-rail .rail-btn:disabled,
.utility-rail .rail-btn:disabled,
.left-utility-rail .rail-btn.rail-btn-placeholder,
.utility-rail .rail-btn.rail-btn-placeholder {
  opacity: 1;
  color: var(--ui-text-faint);
  border-color: transparent;
  background: transparent !important;
  cursor: default;
  box-shadow: none !important;
}

.left-utility-rail .rail-btn:disabled .btn-icon-wrap,
.utility-rail .rail-btn:disabled .btn-icon-wrap {
  opacity: 0.9;
}

.tv-ic {
  display: block;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#gotoLauncher,
#btnToLatestBottom,
#btnToLatest,
#btnMagnet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.zoom-control-icon-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

.zoom-control-icon-btn .toolbar-btn-icon,
.zoom-control-icon-btn .toolbar-icon-host,
.zoom-control-icon-btn .toolbar-icon-host svg {
  display: inline-flex;
  width: 16px;
  height: 16px;
}


#gotoLauncher,
#zoomControls button,
#btnToLatestBottom,
#btnToLatest {
  border: 1px solid var(--ui-border) !important;
  background: rgba(255, 255, 255, 0.94) !important;
  color: var(--ui-text-2) !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 6px 14px rgba(15, 23, 42, 0.06) !important;
  backdrop-filter: saturate(1.05);
}

#gotoLauncher {
  padding: 6px 8px;
}

#gotoLauncher .tv-ic,
#btnToLatestBottom .tv-ic,
#btnToLatest .tv-ic {
  flex: 0 0 auto;
}

@media (any-hover:hover) {
  #zoomControls button:hover,
  #gotoLauncher:hover,
  #btnToLatestBottom:hover,
  #btnToLatest:hover {
    border-color: var(--ui-hover-border) !important;
    background: var(--ui-hover) !important;
    color: var(--ui-hover-text) !important;
  }
}

#zoomControls button:active,
#zoomControls button.active,
#zoomControls button[aria-pressed="true"],
#gotoLauncher:active,
#gotoLauncher.active,
#gotoLauncher[aria-pressed="true"],
#btnToLatestBottom:active,
#btnToLatestBottom.active,
#btnToLatestBottom[aria-pressed="true"],
#btnToLatest:active,
#btnToLatest.active,
#btnToLatest[aria-pressed="true"] {
  background: var(--ui-active) !important;
  border-color: var(--ui-active-border) !important;
  color: var(--ui-active-text) !important;
}

#btnMagnet {
  border: 1px solid var(--ui-border) !important;
  background: var(--ui-surface) !important;
  padding: 0 !important;
  min-width: 36px !important;
  width: 36px !important;
  box-shadow: none !important;
  border-radius: 8px;
  color: var(--ui-text-2);
}

#btnMagnet .toolbar-btn-icon,
#btnMagnet .toolbar-icon-host,
#btnMagnet .toolbar-icon-host svg {
  display: inline-flex;
}

@media (any-hover:hover) {
  #btnMagnet:hover {
    background: var(--ui-hover) !important;
    border-color: var(--ui-hover-border) !important;
    color: var(--ui-hover-text) !important;
  }
}

#btnMagnet.is-active,
#btnMagnet[aria-pressed="true"],
#btnMagnet.active {
  background: var(--ui-active) !important;
  border-color: var(--ui-active-border) !important;
  color: var(--ui-active-text) !important;
}

#btnToLatestBottom {
  font-size: 0 !important;
  color: var(--ui-text-muted) !important;
  line-height: 0 !important;
}

#btnToLatestBottom img,
#btnToLatestBottom svg {
  display: none !important;
}

#btnToLatestBottom::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%3E%3Cpath%20d%3D%27M6%206l6%206-6%206%27%20stroke%3D%27black%27%20stroke-width%3D%271.6%27%20fill%3D%27none%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27/%3E%3Cpath%20d%3D%27M12%206l6%206-6%206%27%20stroke%3D%27black%27%20stroke-width%3D%271.6%27%20fill%3D%27none%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%3E%3Cpath%20d%3D%27M6%206l6%206-6%206%27%20stroke%3D%27black%27%20stroke-width%3D%271.6%27%20fill%3D%27none%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27/%3E%3Cpath%20d%3D%27M12%206l6%206-6%206%27%20stroke%3D%27black%27%20stroke-width%3D%271.6%27%20fill%3D%27none%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27/%3E%3C/svg%3E") center/contain no-repeat;
}

#btnToLatestBottom:hover::before,
#btnToLatestBottom:active::before,
#btnToLatestBottom.active::before,
#btnToLatestBottom[aria-pressed="true"]::before {
  background-color: currentColor;
}

.tf-button-row .tf-btn {
  height: 24px;
  min-width: auto;
  padding: 0 6px !important;
  border: 1px solid transparent !important;
  border-radius: 6px;
  background: transparent !important;
  color: var(--ui-text-muted);
  font-size: 12px !important;
  font-weight: 500;
  line-height: 1.15;
  transition: background-color .12s ease, border-color .12s ease, color .12s ease, box-shadow .12s ease;
}

.tf-button-row .tf-btn.active,
.tf-button-row .tf-btn[aria-pressed="true"] {
  background: var(--ui-active) !important;
  border-color: var(--ui-active-border) !important;
  color: var(--ui-active-text) !important;
  font-weight: 600;
}

@media (any-hover:hover) {
  .tf-button-row .tf-btn:hover {
    background: var(--ui-hover) !important;
    border-color: var(--ui-hover-border) !important;
    color: var(--ui-hover-text) !important;
  }

  .tf-button-row .tf-btn.active:hover,
  .tf-button-row .tf-btn[aria-pressed="true"]:hover {
    background: var(--ui-active) !important;
    border-color: var(--ui-active-border) !important;
    color: var(--ui-active-text) !important;
  }
}

.toolbar-left-zone > #btnKiteLogin + span,
.toolbar-left-zone > #btnKiteLogout + span,
#kiteAuthStatus,
#googleAuthStatus {
  display: none !important;
}

.watchlist-card .watchlist-header select,
.watchlist-card .watchlist-card-header select,
.watchlist-card select.watchlist-select,
.watchlist-card #watchlistSelect,
#watchlistDropdown {
  display: none !important;
}

.watchlist-card-title::after {
  content: none !important;
}

#watchlistHeaderBtn {
  appearance: none;
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  pointer-events: none;
}

#watchlistHeaderBtn .btn-icon-wrap {
  display: none !important;
}

#chartWrap,
#chartMain,
#chartRsi {
  background: #ffffff;
}

#chartMain::after,
#chartRsi::after {
  background: var(--ui-separator) !important;
}

.goto-pop {
  border-color: var(--ui-border) !important;
  box-shadow: var(--ui-shadow-pop) !important;
}

.goto-pop-head,
.goto-cal-month {
  color: var(--ui-text);
}

.goto-cal {
  margin-top: 8px;
}

.goto-cal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.goto-cal-month {
  text-align: center;
  flex: 1 1 auto;
  min-width: 0;
}

.goto-cal-title-btn,
.goto-cal-title-sub {
  display: block;
  width: 100%;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  text-align: center;
  color: var(--ui-text);
}

.goto-cal-title-btn {
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.goto-cal-title-main {
  padding-top: 4px;
}

.goto-cal-title-sub {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ui-text-muted);
}

.goto-cal-title-sub.static {
  cursor: default;
}

.goto-cal-nav {
  width: 28px;
  height: 28px;
  padding: 0 !important;
  border: 1px solid var(--ui-border-soft) !important;
  background: rgba(255, 255, 255, 0.96) !important;
  border-radius: 8px;
  line-height: 1;
  flex: 0 0 28px;
}

.goto-cal-grid {
  min-height: 204px;
}

.goto-cal-week,
.goto-cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.goto-cal-week {
  margin-bottom: 6px;
}

.goto-cal-wd {
  font-size: 10px;
  color: var(--ui-text-muted);
  text-align: center;
}

.goto-cal-day,
.goto-cal-cell {
  height: 32px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ui-text);
  font-size: 12px;
  cursor: pointer;
}

.goto-cal-day.blank {
  cursor: default;
}

.goto-cal-months,
.goto-cal-years {
  display: grid;
  gap: 8px;
}

.goto-cal-months {
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 32px;
  padding-top: 8px;
}

.goto-cal-years {
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 32px;
  padding-top: 8px;
}

.goto-cal-day.sel,
.goto-cal-cell.sel {
  background: var(--ui-active);
  border-color: var(--ui-active-border);
  color: var(--ui-active-text);
  font-weight: 700;
}

@media (any-hover:hover) {
  .goto-cal-day:not(.blank):not(.sel):hover,
  .goto-cal-cell:not(.sel):hover,
  .goto-cal-nav:hover,
  .goto-cal-title-btn:hover {
    background: var(--ui-hover) !important;
    border-color: var(--ui-hover-border) !important;
    color: var(--ui-hover-text) !important;
  }

  .goto-cal-day.sel:hover,
  .goto-cal-cell.sel:hover {
    background: var(--ui-active) !important;
    border-color: var(--ui-active-border) !important;
    color: var(--ui-active-text) !important;
  }
}

th,
td {
  border-bottom-color: var(--ui-border-soft);
}

tr:hover {
  background: var(--ui-hover);
}

.legend {
  color: var(--ui-text-2);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
}

.legend .muted,
.muted {
  color: var(--ui-axis-muted) !important;
}

.gotoDatePill {
  background: #111827;
  color: #ffffff;
  border: 1px solid #111827;
  border-radius: 7px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.18);
}

.gotoDatePill::after {
  border-top-color: #111827;
}


.left-utility-rail .rail-btn:first-child {
  background: transparent !important;
  border-color: transparent;
  color: var(--ui-active-text);
}


.right-panels,
#watchlistPanelShell,
#watchlistPanelShell .right-panel-header,
#watchlistPanelShell .right-panel-body,
#chartMain,
#chartRsi {
  background: var(--ui-surface-chart);
}

.left-utility-shell,
:where(html:not([data-ca-style-v5="2"])) .right-shell,
.bottom-dock {
  background: var(--ui-surface-rail);
}

:where(html:not([data-ca-style-v5="2"])) .top-toolbar {
  background: var(--ui-surface);
}

.indicators-shell .right-panel-body {
  color: var(--ui-text-2);
}

.gann-candidate-row {
  border: 1px solid #d7dce3;
  background: #fbfcfe;
}

.gann-candidate-row[data-selected="true"] {
  border-color: #7a8aa0;
  background: #eef3fb;
}

.gann-candidate-row[data-visible="false"] {
  opacity: 0.6;
}

.gann-candidate-row[data-direction="bullish"] .gann-candidate-title {
  color: #0a8f36;
}

.gann-candidate-row[data-direction="bearish"] .gann-candidate-title {
  color: #c53232;
}

.gann-candidate-badge,
.gann-candidate-submeta {
  color: #5f6b7a;
}

.scan-row {
  border: 1px solid rgba(17,24,39,0.08);
  border-radius: 8px;
  background: rgba(255,255,255,0.72);
  color: #111827;
  cursor: grab;
  user-select: none;
  transition: background 120ms ease, border-color 120ms ease, opacity 120ms ease, box-shadow 120ms ease;
}

.scan-row:hover {
  background: rgba(17,24,39,0.05);
  border-color: rgba(17,24,39,0.12);
}

.scan-row.is-selected,
.scan-row[aria-pressed="true"] {
  border-color: rgba(17,24,39,0.22);
  background: rgba(17,24,39,0.08);
  color: #111827;
}

.scan-row:focus-visible {
  outline: 1px solid rgba(17,24,39,0.24);
  outline-offset: 1px;
}

.scan-row.is-approved .scan-row-approved-badge {
  background: rgba(16,185,129,0.14);
  border: 1px solid rgba(16,185,129,0.28);
  border-radius: 999px;
  color: rgb(5,150,105);
}

.scan-row-action-btn {
  color: #1f2937 !important;
  border: 1px solid rgba(17,24,39,0.14) !important;
  border-radius: 6px;
  background: #ffffff !important;
  font-size: 0 !important;
}

.scan-row-action-btn .scan-row-glyph,
.scan-row-approved-badge {
  font-family: Arial, Helvetica, sans-serif;
}

.scan-row-approved-badge .scan-row-glyph,
.scan-row-action-btn .scan-row-glyph {
  color: inherit !important;
}

.scan-row-action-btn[data-scan-row-action="approve"] {
  color: rgb(5,150,105) !important;
}

.scan-row-action-btn[data-scan-row-action="watch"] {
  color: #a16207 !important;
  font-size: 12px !important;
  font-weight: 800;
}

.scan-row-action-btn[data-scan-row-action="reject"] {
  color: #b42318 !important;
}

.scan-row-action-btn:hover,
.scan-row-action-btn:focus-visible {
  background: rgba(17,24,39,0.06);
  border-color: rgba(17,24,39,0.14);
}

.scan-row-inline-confirm {
  background: rgba(255,255,255,0.9);
}

.scan-inline-confirm-text {
  color: #374151;
}

.scan-row.is-action-busy {
  opacity: 0.72;
}

.scan-row.is-dragging {
  opacity: 0.55;
  cursor: grabbing;
}

.scan-row.drop-before {
  box-shadow: inset 0 2px 0 rgba(17,24,39,0.18);
}

.scan-row.drop-after {
  box-shadow: inset 0 -2px 0 rgba(17,24,39,0.18);
}

.scan-day-header {
  color: #111827;
}

.scan-day-count,
.scan-row-secondary,
.scan-center-date-truth,
.scan-center-status {
  color: #374151;
}

.scan-row-secondary--sip-follow-up {
  color: #166534;
  font-weight: 700;
}


.scan-row.is-invalidated {
  background: rgba(244, 114, 182, 0.08);
  border-color: rgba(244, 114, 182, 0.32);
}

.scan-row.is-invalidated .scan-row-warning-badge {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(244, 114, 182, 0.16);
  border: 1px solid rgba(244, 114, 182, 0.32);
  color: #be185d;
  font-size: 12px;
  font-weight: 700;
  flex: 0 0 auto;
}

.scan-row.is-invalidated .scan-row-secondary {
  color: #be185d;
}

.scan-review-notes {
  border: 1px solid rgba(17,24,39,0.10);
  border-radius: 10px;
  padding: 9px;
}

.scan-review-notes-input {
  border: 1px solid rgba(17,24,39,0.14);
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
}

.scan-review-notes-input:focus {
  outline: 1px solid rgba(37,99,235,0.35);
  outline-offset: 1px;
  border-color: rgba(37,99,235,0.35);
}

.scan-review-notes-save[data-state="dirty"] {
  color: #b45309;
}

.scan-review-notes-save[data-state="saving"] {
  color: #2563eb;
}

.scan-review-notes-save[data-state="saved"] {
  color: #059669;
}

.scan-review-notes-save[data-state="error"] {
  color: #b42318;
}


.scan-review-voice-btn {
  border: 1px solid rgba(17,24,39,0.14);
  background: rgba(255,255,255,0.94);
  color: #4b5563;
  box-shadow: 0 1px 2px rgba(17,24,39,0.06);
}
.scan-review-voice-btn:hover:not(:disabled) {
  background: #f3f4f6;
  color: #111827;
  border-color: rgba(17,24,39,0.22);
}
.scan-review-voice-btn:focus-visible {
  outline: 2px solid rgba(37,99,235,0.38);
  outline-offset: 1px;
}
.scan-review-voice-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.scan-review-voice-btn[data-state="recording"] {
  border-color: rgba(220,38,38,0.55);
  background: rgba(254,226,226,0.96);
  color: #b91c1c;
  box-shadow: 0 0 0 3px rgba(220,38,38,0.10);
}
.scan-review-voice-btn[data-state="transcribing"] {
  border-color: rgba(37,99,235,0.40);
  background: rgba(219,234,254,0.92);
  color: #1d4ed8;
}
.scan-review-voice-state[data-state="error"] { color: #b42318; }
.scan-review-voice-state[data-state="recording"] { color: #b91c1c; font-weight: 600; }
.scan-review-voice-state[data-state="transcribing"] { color: #2563eb; font-weight: 600; }


/* Scan Center review ledger + inline note editor (1.3.0) */
.scan-row.is-watch {
  background: rgba(255, 251, 235, 0.82);
  border-color: rgba(217, 119, 6, 0.24);
}
.scan-row.is-watch:hover { background: rgba(254, 243, 199, 0.82); }
.scan-row-watch-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(217, 119, 6, 0.28);
  color: #a16207;
  font-size: 11px;
  font-weight: 800;
}

.scan-row.is-rejected {
  background: rgba(254, 242, 242, 0.72);
  border-color: rgba(185, 28, 28, 0.18);
}
.scan-row.is-rejected:hover { background: rgba(254, 226, 226, 0.72); }
.scan-row-rejected-badge {
  background: rgba(239, 68, 68, 0.11);
  border: 1px solid rgba(239, 68, 68, 0.24);
  border-radius: 999px;
  color: #b42318;
}
.scan-row-pending-badge {
  border: 1px solid rgba(100, 116, 139, 0.22);
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.9);
}
.scan-row-pending-badge::after { background: #94a3b8; }
.scan-row-action-btn[data-scan-row-action="notes"] { color: #475569 !important; }
.scan-row-action-btn[data-scan-row-action="notes"][data-has-notes="1"] {
  color: #2563eb !important;
  background: rgba(219, 234, 254, 0.78) !important;
  border-color: rgba(37, 99, 235, 0.22) !important;
}
.scan-row-action-btn:disabled { opacity: 0.38; cursor: default; }
.scan-row.is-notes-open {
  border-color: rgba(37, 99, 235, 0.34);
  background: rgba(248, 250, 252, 0.98);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}
.scan-row.is-notes-open .scan-row-summary { border-bottom: 1px solid rgba(17,24,39,0.08); }
.scan-review-notes {
  background: #ffffff;
  border-color: rgba(37, 99, 235, 0.18);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}
.scan-review-notes-close { background: #ffffff; color: #475569; }
.scan-review-notes-save-btn {
  background: #111827;
  color: #ffffff;
  border-color: #111827;
}
.scan-review-notes-save-btn:hover { background: #1f2937; }


.scan-center-exclusions {
  margin: 8px 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(180, 83, 9, 0.28);
  border-radius: 10px;
  background: rgba(255, 247, 237, 0.92);
  color: #7c2d12;
  font-size: 12px;
  line-height: 1.4;
}
.scan-center-exclusions-title { font-weight: 700; margin-bottom: 6px; }
.scan-center-exclusion-row { display: grid; grid-template-columns: auto auto auto 1fr; gap: 6px; align-items: baseline; padding: 3px 0; }
.scan-center-exclusion-row code { font-size: 11px; color: #9a3412; }
.scan-center-exclusion-row span { color: #7c2d12; }
