/* Daily Checker Page Styles
   App palette: body var(--tv-bg-tertiary), cards #fff, text var(--tv-text-primary), muted var(--tv-text-secondary),
   border var(--tv-border), primary var(--tv-accent), danger var(--tv-red), success var(--tv-green) */

#page-daily {
  padding: 16px;
}

/* ── Page Header ── */
.dc-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.dc-header-left { min-width: 0; }

.dc-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--tv-text-primary);
  margin: 0 0 2px;
}

.dc-meta { font-size: 0.75rem; color: var(--tv-text-secondary); }

.dc-header-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dc-header-actions .btn { padding-top: 8px; padding-bottom: 8px; }

/* ── Filter Tabs ── */
.dc-filter-tabs {
  display: flex;
  gap: 4px;
  background: var(--tv-border);
  border-radius: 8px;
  padding: 3px;
  width: fit-content;
}

.dc-filter-tab {
  padding: 5px 14px;
  border-radius: 5px;
  border: none;
  background: transparent;
  color: var(--tv-text-secondary);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.dc-filter-tab.active {
  background: var(--tv-bg);
  color: var(--tv-text-primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.dc-filter-tab[data-filter="starred"] { color: #eab308; }
.dc-filter-tab[data-filter="starred"].active { color: #ca8a04; }

/* ── Check Cards ── */
.dc-cards { display: flex; flex-direction: column; gap: 10px; }

.dc-card {
  background: var(--tv-bg);
  border: 1px solid var(--tv-border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
  position: relative;
}

.dc-card-top-actions {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  gap: 4px;
  z-index: 2;
}

.dc-top-btn {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: 1px solid var(--tv-border);
  background: var(--tv-bg);
  color: var(--tv-text-secondary);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.15s;
}

.dc-top-btn.dc-top-run {
  color: var(--tv-accent, #6366f1);
  border-color: var(--tv-accent, #6366f1);
}

.dc-top-btn.dc-top-run:hover {
  background: var(--tv-accent, #6366f1);
  color: #fff;
}

.dc-top-btn.dc-top-star {
  color: var(--tv-text-tertiary);
  border-color: transparent;
  background: transparent;
}

.dc-top-btn.dc-top-star:hover {
  color: #eab308;
}

.dc-top-btn.dc-top-star.starred {
  color: #eab308;
  border-color: transparent;
  background: transparent;
}

.dc-top-btn.dc-top-del {
  color: var(--tv-text-tertiary);
}

.dc-top-btn.dc-top-del:hover {
  border-color: var(--tv-red);
  color: #fff;
  background: var(--tv-red);
}

.dc-card:hover {
  border-color: var(--tv-accent);
  box-shadow: 0 2px 8px rgba(129,140,248,0.1);
}

.dc-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
  flex-wrap: wrap;
}

.dc-card-header:hover { background: var(--tv-bg-secondary); }

/* Signal badge */
.dc-signal {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.dc-signal.entry-now  { background: var(--tv-red-bg-solid); color: var(--tv-red); border: 1px solid #fca5a5; }
.dc-signal.entry-soon { background: #ffedd5; color: #c2410c; border: 1px solid #fdba74; }
.dc-signal.watch      { background: #fef9c3; color: #a16207; border: 1px solid #fde047; }
.dc-signal.wait       { background: var(--tv-bg-tertiary); color: var(--tv-text-secondary); border: 1px solid var(--tv-border); }
.dc-signal.exit       { background: #f3e8ff; color: var(--tv-purple); border: 1px solid #d8b4fe; }
.dc-signal.running    { background: #dbeafe; color: #1d4ed8; border: 1px solid #93c5fd; }
.dc-signal.no-data    { background: var(--tv-bg-tertiary); color: var(--tv-text-tertiary); border: 1px solid var(--tv-border); }

/* Score bar */
.dc-score-wrap { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.dc-score-bar {
  width: 60px;
  height: 5px;
  background: var(--tv-border);
  border-radius: 3px;
  overflow: hidden;
}

.dc-score-fill { height: 100%; border-radius: 3px; transition: width 0.4s ease; }
.dc-score-fill.high   { background: var(--tv-green); }
.dc-score-fill.medium { background: var(--tv-orange); }
.dc-score-fill.low    { background: var(--tv-border); }

.dc-score-val {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--tv-text-primary);
  min-width: 22px;
}

/* Ticker + direction */
.dc-ticker-info { display: flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: wrap; }

.dc-ticker {
  font-size: 1rem;
  font-weight: 700;
  color: var(--tv-text-primary);
  cursor: pointer;
}
.dc-ticker:hover { color: var(--tv-accent); text-decoration: underline; }

.dc-dir-badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  flex-shrink: 0;
}
.dc-dir-badge.long    { color: var(--tv-green); background: var(--tv-green-bg-solid); }
.dc-dir-badge.short   { color: var(--tv-red); background: var(--tv-red-bg-solid); }
.dc-dir-badge.monitor { color: var(--tv-text-secondary); background: var(--tv-bg-tertiary); }

/* Metrics row */
.dc-metrics-row {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.74rem;
  color: var(--tv-text-secondary);
  min-width: 0;
}

.dc-metric { display: flex; flex-direction: column; gap: 1px; }
.dc-metric-label { font-size: 0.65rem; color: var(--tv-text-tertiary); }
.dc-metric-value { font-weight: 600; color: var(--tv-text-primary); }
.dc-metric-value.positive { color: var(--tv-green); }
.dc-metric-value.negative { color: var(--tv-red); }
.dc-metric-value.warn     { color: var(--tv-orange); }

/* Expand toggle */
.dc-expand-btn {
  background: none;
  border: none;
  color: var(--tv-text-tertiary);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 4px;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.dc-expand-btn.open { transform: rotate(180deg); }

/* Summary */
.dc-summary {
  padding: 0 14px 10px;
  font-size: 0.78rem;
  color: var(--tv-text-secondary);
  font-style: italic;
  line-height: 1.4;
}

/* ── Expanded Panel ── */
.dc-expanded {
  display: none;
  border-top: 1px solid var(--tv-bg-tertiary);
  padding: 14px;
  background: var(--tv-bg-secondary);
}
.dc-expanded.open { display: block; }

.dc-expanded-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
@media (max-width: 640px) { .dc-expanded-grid { grid-template-columns: 1fr; } }

.dc-exp-block {
  background: var(--tv-bg);
  border: 1px solid var(--tv-border);
  border-radius: 8px;
  padding: 10px 12px;
}

.dc-exp-title {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--tv-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.dc-exp-text { font-size: 0.78rem; color: var(--tv-text-primary); line-height: 1.5; }

.dc-exp-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }

.dc-badge {
  font-size: 0.67rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
}
.dc-badge.valid   { color: var(--tv-green); background: var(--tv-green-bg-solid); border: 1px solid #a7f3d0; }
.dc-badge.invalid { color: var(--tv-red); background: var(--tv-red-bg-solid); border: 1px solid #fca5a5; }
.dc-badge.aligned { color: var(--tv-green); background: var(--tv-green-bg-solid); border: 1px solid #a7f3d0; }
.dc-badge.neutral { color: var(--tv-text-secondary); background: var(--tv-bg-tertiary); border: 1px solid var(--tv-border); }
.dc-badge.opposed { color: var(--tv-red); background: var(--tv-red-bg-solid); border: 1px solid #fca5a5; }
.dc-badge.risk    { color: #c2410c; background: #ffedd5; border: 1px solid #fdba74; }

/* Key levels */
.dc-levels { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.dc-level { display: flex; flex-direction: column; gap: 2px; }
.dc-level-label { font-size: 0.65rem; color: var(--tv-text-tertiary); text-transform: uppercase; }
.dc-level-value { font-size: 0.9rem; font-weight: 700; color: var(--tv-text-primary); }

/* Priority dots */
.dc-priority { display: flex; gap: 2px; flex-shrink: 0; }
.dc-priority-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--tv-border); }
.dc-priority-dot.filled { background: var(--tv-accent); }

/* Expanded actions */
.dc-exp-actions { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0; }

.dc-exp-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  font-size: 0.74rem;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid var(--tv-border);
  border-radius: 6px;
  background: var(--tv-bg);
  color: var(--tv-text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  line-height: 1.4;
}

.dc-exp-actions .btn:hover {
  background: var(--tv-bg-tertiary);
  border-color: var(--tv-border);
  color: var(--tv-text-primary);
}

.dc-exp-actions .btn-danger {
  color: var(--tv-red) !important;
  border-color: #fca5a5 !important;
  background: var(--tv-bg) !important;
}

.dc-exp-actions .btn-danger:hover {
  background: var(--tv-red-bg-solid) !important;
  border-color: var(--tv-red) !important;
}

.dc-exp-actions .dc-run-one-btn {
  color: var(--tv-accent);
  border-color: #c7d2fe;
}

.dc-exp-actions .dc-run-one-btn:hover {
  background: #eef2ff;
  border-color: #a5b4fc;
}

.dc-exp-actions .dc-run-one-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
  background: #eef2ff;
  color: var(--tv-accent);
  border-color: #c7d2fe;
}

/* Empty state */
.dc-empty { text-align: center; padding: 60px 20px; color: var(--tv-text-tertiary); }
.dc-empty-icon { font-size: 2.5rem; margin-bottom: 12px; }
.dc-empty-text { font-size: 0.9rem; font-weight: 600; color: var(--tv-text-secondary); margin-bottom: 6px; }
.dc-empty-hint { font-size: 0.78rem; }

/* Run spinner */
.dc-run-spinner {
  display: inline-block;
  width: 12px; height: 12px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: dc-spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 4px;
}
@keyframes dc-spin { to { transform: rotate(360deg); } }

/* ── Modal Overlay ── */
.dc-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.dc-overlay.dc-open { display: flex; }

.dc-dialog {
  background: var(--tv-bg);
  border: 1px solid var(--tv-border);
  border-radius: 12px;
  padding: 24px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.dc-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--tv-text-primary);
}

.dc-dialog-close {
  background: none;
  border: none;
  color: var(--tv-text-tertiary);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}
.dc-dialog-close:hover { color: var(--tv-text-secondary); }

.dc-dialog-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 20px;
}

.dc-btn-cancel {
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid var(--tv-border);
  background: var(--tv-bg-secondary);
  color: var(--tv-text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}
.dc-btn-cancel:hover { background: var(--tv-bg-tertiary); }

.dc-btn-save {
  padding: 8px 20px;
  border-radius: 6px;
  border: none;
  background: var(--tv-accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.dc-btn-save:hover { background: var(--tv-accent-hover); }

/* ── Form Fields ── */
.dc-modal-field { margin-bottom: 14px; }

.dc-modal-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--tv-text-secondary);
  margin-bottom: 5px;
}

.dc-modal-field input,
.dc-modal-field textarea,
.dc-modal-field select {
  width: 100%;
  background: var(--tv-bg-secondary);
  border: 1px solid var(--tv-border);
  border-radius: 6px;
  color: var(--tv-text-primary);
  padding: 8px 10px;
  font-size: 0.85rem;
  font-family: inherit;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.15s;
}

.dc-modal-field input:focus,
.dc-modal-field textarea:focus,
.dc-modal-field select:focus {
  border-color: var(--tv-accent);
}

.dc-modal-field textarea { resize: vertical; min-height: 80px; }

.dc-modal-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}
@media (max-width: 480px) { .dc-modal-row { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .dc-metrics-row { display: none; } }

/* ── Confirmation Conditions ── */
.dc-confirm-block {
  border-top: 1px dashed var(--tv-border);
  padding: 10px 14px;
  background: var(--tv-bg-secondary);
}

.dc-confirm-title {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--tv-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.dc-confirm-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dc-confirm-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 5px;
  font-size: 0.74rem;
  line-height: 1.4;
}

.dc-confirm-icon {
  font-weight: 700;
  flex-shrink: 0;
  width: 14px;
  text-align: center;
}

.dc-confirm-text {
  color: var(--tv-text-primary);
}

/* Pending */
.dc-confirm-pending {
  background: var(--tv-bg-tertiary);
  border-left: 2px solid var(--tv-border);
}
.dc-confirm-pending .dc-confirm-icon { color: var(--tv-text-tertiary); }

/* Met */
.dc-confirm-met {
  background: #f0fdf4;
  border-left: 2px solid #a7f3d0;
}
.dc-confirm-met .dc-confirm-icon { color: var(--tv-green); }
.dc-confirm-met .dc-confirm-text { color: var(--tv-green); }

/* Invalidated */
.dc-confirm-invalidated {
  background: var(--tv-red-bg-solid);
  border-left: 2px solid #fca5a5;
}
.dc-confirm-invalidated .dc-confirm-icon { color: var(--tv-red); }
.dc-confirm-invalidated .dc-confirm-text { color: var(--tv-red); text-decoration: line-through; }

/* ── Key levels R:R ── */
.dc-level-value { font-weight: 700; color: var(--tv-text-primary); }

/* ── Dashboard ── */
.dc-dash {
  background: var(--tv-bg);
  border: 1px solid var(--tv-border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.dc-dash-bar {
  display: flex;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  background: var(--tv-bg-tertiary);
  margin-bottom: 8px;
}
.dc-dash-seg { transition: width 0.4s ease; }
.dc-dash-seg.bar-entry-now  { background: var(--tv-red); }
.dc-dash-seg.bar-entry-soon { background: var(--tv-orange); }
.dc-dash-seg.bar-watch      { background: #eab308; }
.dc-dash-seg.bar-wait       { background: var(--tv-border); }
.dc-dash-seg.bar-exit       { background: var(--tv-purple); }

.dc-dash-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.dc-dash-leg-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  color: var(--tv-text-secondary);
  font-weight: 500;
}
.dc-dash-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}
.dc-dash-dot.bar-entry-now  { background: var(--tv-red); }
.dc-dash-dot.bar-entry-soon { background: var(--tv-orange); }
.dc-dash-dot.bar-watch      { background: #eab308; }
.dc-dash-dot.bar-wait       { background: var(--tv-border); }
.dc-dash-dot.bar-exit       { background: var(--tv-purple); }

.dc-dash-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.dc-dash-stat {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.dc-dash-stat-val {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--tv-text-primary);
}
.dc-dash-stat-val.high   { color: var(--tv-green); }
.dc-dash-stat-val.medium { color: var(--tv-orange); }
.dc-dash-stat-val.low    { color: var(--tv-text-tertiary); }
.dc-dash-stat-label {
  font-size: 0.62rem;
  color: var(--tv-text-tertiary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.dc-dash-sub {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--tv-text-tertiary);
  margin-left: 1px;
}
.dc-dash-sub.conv-high { color: var(--tv-green); }
.dc-dash-sub.conv-med  { color: var(--tv-orange); }
.dc-dash-sub.conv-low  { color: var(--tv-text-tertiary); }
.dc-dash-stale { color: var(--tv-orange); }

/* ── Controls row (tabs + sort) ── */
.dc-controls-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.dc-sort-select {
  padding: 5px 10px;
  border-radius: 5px;
  border: 1px solid var(--tv-border);
  background: var(--tv-bg-secondary);
  color: var(--tv-text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  outline: none;
}
.dc-sort-select:focus { border-color: var(--tv-accent); }

.dc-search-input {
  padding: 5px 10px;
  border-radius: 5px;
  border: 1px solid var(--tv-border);
  background: var(--tv-bg-secondary);
  color: var(--tv-text-primary);
  font-size: 0.75rem;
  font-weight: 500;
  outline: none;
  width: 120px;
}
.dc-search-input::placeholder { color: var(--tv-text-tertiary); }
.dc-search-input:focus { border-color: var(--tv-accent); }

/* ── AVOID signal ── */
.dc-signal.avoid { background: var(--tv-red-bg-solid); color: #991b1b; border: 1px solid #fca5a5; font-style: italic; }

/* ── Conviction badge ── */
.dc-conv-badge {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.dc-conv-badge.conv-high { color: var(--tv-green); background: var(--tv-green-bg-solid); }
.dc-conv-badge.conv-med  { color: #a16207; background: #fef9c3; }
.dc-conv-badge.conv-low  { color: var(--tv-text-tertiary); background: var(--tv-bg-tertiary); }

/* ── Earnings date badges ── */
.dc-earnings-urgent {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--tv-red-bg-solid);
  color: var(--tv-red);
  border: 1px solid #fca5a5;
  flex-shrink: 0;
  animation: dc-pulse 2s ease-in-out infinite;
}
.dc-earnings-soon {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fdba74;
  flex-shrink: 0;
}

/* ── Catalyst calendar in expanded view ── */
.dc-cat-calendar {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 4px;
}
.dc-cat-line {
  font-size: 0.72rem;
  color: var(--tv-text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}
.dc-cat-icon {
  font-size: 0.7rem;
  width: 14px;
  text-align: center;
}

/* ── Fund holder chips ── */
.dc-funds-row {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  padding: 0 14px 8px;
}
.dc-fund-chip {
  font-size: 0.6rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
  background: #f0f9ff;
  color: #0369a1;
  border: 1px solid #bae6fd;
  letter-spacing: 0.02em;
}
.dc-fund-chip.dc-fund-new {
  background: var(--tv-green-bg-solid);
  color: var(--tv-green);
  border-color: #a7f3d0;
}
.dc-fund-chip.dc-fund-exit {
  background: var(--tv-red-bg-solid);
  color: var(--tv-red);
  border-color: #fca5a5;
  text-decoration: line-through;
}
.dc-fund-chip.dc-fund-up {
  background: #f0fdf4;
  color: #15803d;
  border-color: #bbf7d0;
}
.dc-fund-chip.dc-fund-down {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fed7aa;
}
.dc-fund-chip.dc-fund-more {
  background: var(--tv-bg-tertiary);
  color: var(--tv-text-tertiary);
  border-color: var(--tv-border);
}

/* ── Stale indicator ── */
.dc-stale { border-left: 3px solid var(--tv-orange); }
.dc-stale-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--tv-orange);
  flex-shrink: 0;
  animation: dc-pulse 2s ease-in-out infinite;
}
@keyframes dc-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ── Timeframe alignment compact (header) ── */
.dc-tf-compact {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}
.dc-tf-dot {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 3px;
  border-radius: 2px;
  line-height: 1.3;
}
.dc-tf-dot.tf-bull { color: var(--tv-green); background: var(--tv-green-bg-solid); }
.dc-tf-dot.tf-bear { color: var(--tv-red); background: var(--tv-red-bg-solid); }
.dc-tf-dot.tf-neutral { color: var(--tv-text-tertiary); background: var(--tv-bg-tertiary); }

/* ── Tags row ── */
.dc-tags-row {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  padding: 0 14px 8px;
}
.dc-tag {
  font-size: 0.62rem;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: 3px;
  background: #ede9fe;
  color: #6d28d9;
  letter-spacing: 0.02em;
}

/* ── Timeframe alignment detail grid (expanded) ── */
.dc-tf-grid {
  display: flex;
  gap: 8px;
}
.dc-tf-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 12px;
  border-radius: 6px;
  flex: 1;
  text-align: center;
}
.dc-tf-item.tf-bull { background: var(--tv-green-bg-solid); }
.dc-tf-item.tf-bear { background: var(--tv-red-bg-solid); }
.dc-tf-item.tf-neutral { background: var(--tv-bg-tertiary); }

.dc-tf-label { font-size: 0.62rem; font-weight: 600; color: var(--tv-text-secondary); text-transform: uppercase; }
.dc-tf-arrow { font-size: 1.1rem; font-weight: 800; line-height: 1; }
.dc-tf-item.tf-bull .dc-tf-arrow { color: var(--tv-green); }
.dc-tf-item.tf-bear .dc-tf-arrow { color: var(--tv-red); }
.dc-tf-item.tf-neutral .dc-tf-arrow { color: var(--tv-text-tertiary); }
.dc-tf-bias { font-size: 0.65rem; font-weight: 500; color: var(--tv-text-secondary); }

/* ── Alignment quality badge ── */
.dc-badge.align-strong     { color: var(--tv-green); background: var(--tv-green-bg-solid); border: 1px solid #a7f3d0; }
.dc-badge.align-moderate   { color: #a16207; background: #fef9c3; border: 1px solid #fde047; }
.dc-badge.align-weak       { color: #c2410c; background: #ffedd5; border: 1px solid #fdba74; }
.dc-badge.align-conflicted { color: var(--tv-red); background: var(--tv-red-bg-solid); border: 1px solid #fca5a5; }

/* ── Position sizing ── */
.dc-sizing-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}
.dc-size-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  text-transform: uppercase;
}
.dc-size-badge.size-full    { color: var(--tv-green); background: var(--tv-green-bg-solid); border: 1px solid #a7f3d0; }
.dc-size-badge.size-half    { color: #a16207; background: #fef9c3; border: 1px solid #fde047; }
.dc-size-badge.size-quarter { color: #c2410c; background: #ffedd5; border: 1px solid #fdba74; }
.dc-size-badge.size-starter { color: var(--tv-text-secondary); background: var(--tv-bg-tertiary); border: 1px solid var(--tv-border); }
.dc-size-badge.size-none    { color: var(--tv-red); background: var(--tv-red-bg-solid); border: 1px solid #fca5a5; }

.dc-size-risk {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--tv-red);
  padding: 2px 6px;
  border: 1px dashed #fca5a5;
  border-radius: 3px;
}

.dc-scale-plan {
  font-size: 0.74rem;
  color: var(--tv-text-secondary);
  margin-top: 6px;
  padding: 6px 8px;
  background: var(--tv-bg-tertiary);
  border-radius: 4px;
  line-height: 1.45;
}
.dc-scale-label { font-weight: 600; color: var(--tv-text-secondary); }

/* ── Trade structure conditions ── */
.dc-trade-cond {
  font-size: 0.76rem;
  color: var(--tv-text-secondary);
  margin-top: 4px;
  line-height: 1.45;
}
.dc-trade-cond-label {
  font-weight: 600;
  color: var(--tv-text-secondary);
  font-size: 0.7rem;
}
.dc-trade-avoid {
  font-size: 0.76rem;
  color: var(--tv-red);
  margin-top: 4px;
  padding: 4px 8px;
  background: var(--tv-red-bg-solid);
  border-radius: 4px;
  border-left: 2px solid #fca5a5;
  line-height: 1.45;
}

/* ── Entry zone / stop basis ── */
.dc-entry-zone {
  font-size: 0.72rem;
  color: var(--tv-text-secondary);
  margin-top: 6px;
  padding: 4px 8px;
  background: #f0fdf4;
  border-radius: 4px;
  border-left: 2px solid #a7f3d0;
}
.dc-stop-basis {
  font-size: 0.68rem;
  color: var(--tv-text-tertiary);
  margin-top: 3px;
  font-style: italic;
}

/* ── R:R emphasis ── */
.dc-level.dc-level-rr .dc-level-value {
  font-size: 1rem;
  color: var(--tv-accent);
  font-weight: 800;
}

/* ── Counter-Check Review Badge (header) ── */
.dc-review-badge {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  cursor: default;
}
.dc-review-badge.dc-review-pass   { color: var(--tv-green); background: var(--tv-green-bg-solid); border: 1px solid #a7f3d0; }
.dc-review-badge.dc-review-flag   { color: #a16207; background: #fef9c3; border: 1px solid #fde047; }
.dc-review-badge.dc-review-reject { color: var(--tv-red); background: var(--tv-red-bg-solid); border: 1px solid #fca5a5; }

/* ── Counter-Check Review Block (expanded) ── */
.dc-review-block {
  grid-column: 1 / -1;
}
.dc-review-block.dc-review-pass   { border-left: 3px solid var(--tv-green); }
.dc-review-block.dc-review-flag   { border-left: 3px solid var(--tv-orange); }
.dc-review-block.dc-review-reject { border-left: 3px solid var(--tv-red); }

.dc-review-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.dc-review-grade {
  font-size: 1.1rem;
  font-weight: 800;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}
.dc-review-grade.dc-review-pass   { color: var(--tv-green); background: var(--tv-green-bg-solid); }
.dc-review-grade.dc-review-flag   { color: #a16207; background: #fef9c3; }
.dc-review-grade.dc-review-reject { color: var(--tv-red); background: var(--tv-red-bg-solid); }

.dc-review-action {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}
.dc-review-action.dc-review-pass   { color: var(--tv-green); background: var(--tv-green-bg-solid); }
.dc-review-action.dc-review-flag   { color: #a16207; background: #fef9c3; }
.dc-review-action.dc-review-reject { color: var(--tv-red); background: var(--tv-red-bg-solid); }

.dc-review-conf {
  font-size: 0.7rem;
  color: var(--tv-text-secondary);
  margin-left: auto;
}

.dc-review-concern {
  font-size: 0.78rem;
  color: var(--tv-text-primary);
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.4;
}

.dc-review-counter {
  font-size: 0.76rem;
  color: var(--tv-text-secondary);
  line-height: 1.5;
  margin-bottom: 8px;
  padding: 6px 8px;
  background: var(--tv-bg-tertiary);
  border-radius: 4px;
}

.dc-review-flags {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
}

.dc-review-flag-item {
  display: flex;
  gap: 8px;
  font-size: 0.72rem;
  padding: 4px 8px;
  background: var(--tv-red-bg-solid);
  border-radius: 4px;
  border-left: 2px solid #fca5a5;
}

.dc-review-flag-name {
  font-weight: 600;
  color: var(--tv-red);
  text-transform: capitalize;
  white-space: nowrap;
  flex-shrink: 0;
}

.dc-review-flag-detail {
  color: var(--tv-text-secondary);
  line-height: 1.4;
}

/* ── Active/Inactive Toggle ── */
.dc-toggle-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 0;
}

.dc-toggle-track {
  display: inline-block;
  width: 28px;
  height: 16px;
  border-radius: 8px;
  background: #475569;
  position: relative;
  transition: background 0.2s;
  pointer-events: none;
}

.dc-toggle-btn.on .dc-toggle-track {
  background: var(--tv-green, #22c55e);
}

.dc-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}

.dc-toggle-btn.on .dc-toggle-thumb {
  transform: translateX(12px);
}

/* Inactive card */
.dc-card.dc-paused {
  opacity: 0.45;
}

.dc-card.dc-paused:hover {
  opacity: 0.7;
}

/* Toggle All button */
#dcToggleAllBtn {
  font-size: 0.75rem;
}

#dcToggleAllBtn.dc-toggle-all-off {
  color: var(--tv-red, #ef4444);
  border-color: var(--tv-red, #ef4444);
}

#dcToggleAllBtn.dc-toggle-all-on {
  color: var(--tv-green, #22c55e);
  border-color: var(--tv-green, #22c55e);
}

/* ── Mobile: daily checker header ── */
@media (max-width: 600px) {
  .dc-header {
    flex-direction: column;
    align-items: stretch;
  }

  .dc-header-actions {
    gap: 6px;
  }

  .dc-header-actions .btn {
    flex: 1;
    min-width: 0;
    font-size: 0.72rem;
    padding: 6px 8px;
    text-align: center;
    white-space: nowrap;
  }

  .dc-filter-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }

  .dc-filter-tab {
    padding: 5px 10px;
    font-size: 0.7rem;
    white-space: nowrap;
  }

  .dc-card-header {
    gap: 6px 10px;
    padding: 10px 12px;
  }

  .dc-ticker-info {
    width: 100%;
  }

  .dc-metrics-row {
    width: 100%;
    gap: 10px;
  }

  .dc-score-wrap {
    margin-left: auto;
  }
}

/* ── Options Recommendation Block ── */
.dc-optrec-container { width: 100%; }
.dc-optrec-loading {
  padding: 16px; text-align: center;
  color: #94a3b8; font-size: 0.8rem;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.dc-optrec-error {
  padding: 12px; color: #ef4444; font-size: 0.78rem;
  background: rgba(239,68,68,0.08); border-radius: 6px;
}
.dc-optrec-block {
  border: 1px solid rgba(59,130,246,0.25);
  background: rgba(59,130,246,0.04);
  border-radius: 8px; padding: 0;
}
.dc-optrec-summary {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; cursor: pointer; user-select: none;
  list-style: none;
}
.dc-optrec-summary::-webkit-details-marker { display: none; }
.dc-optrec-summary::before {
  content: '▸'; font-size: 0.7rem; color: #94a3b8;
  transition: transform 0.15s;
}
.dc-optrec-block[open] > .dc-optrec-summary::before { transform: rotate(90deg); }
.dc-optrec-summary-info {
  display: flex; align-items: center; gap: 10px; margin-left: auto;
}
.dc-optrec-body { padding: 0 12px 12px; }
.dc-optrec-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
}
.dc-optrec-strategy {
  font-weight: 700; font-size: 0.82rem; color: #60a5fa;
  letter-spacing: 0.5px;
}
.dc-optrec-rr {
  font-weight: 700; font-size: 0.82rem; color: #34d399;
  margin-left: auto;
}
.dc-optrec-legs {
  background: rgba(15,23,42,0.5); border-radius: 6px;
  padding: 8px; margin-bottom: 8px; font-family: monospace; font-size: 0.75rem;
}
.dc-optrec-leg {
  display: flex; align-items: center; gap: 8px;
  padding: 3px 0; border-bottom: 1px solid rgba(148,163,184,0.08);
}
.dc-optrec-leg:last-child { border-bottom: none; }
.dc-optrec-leg-action {
  font-weight: 700; width: 36px; text-align: center;
  padding: 1px 4px; border-radius: 3px; font-size: 0.7rem;
}
.dc-optrec-leg-action.buy { color: #34d399; background: rgba(52,211,153,0.1); }
.dc-optrec-leg-action.sell { color: #f87171; background: rgba(248,113,113,0.1); }
.dc-optrec-leg-desc { color: #e2e8f0; flex: 1; }
.dc-optrec-leg-price { color: #94a3b8; }
.dc-optrec-leg-delta { color: #60a5fa; min-width: 36px; }
.dc-optrec-leg-oi { color: #64748b; font-size: 0.68rem; }
.dc-optrec-metrics {
  display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 8px;
  font-size: 0.75rem;
}
.dc-optrec-metric { display: flex; flex-direction: column; }
.dc-optrec-metric-label { color: #64748b; font-size: 0.65rem; text-transform: uppercase; }
.dc-optrec-metric span:last-child { color: #e2e8f0; font-weight: 600; }
.dc-optrec-greeks {
  display: flex; gap: 12px; margin-bottom: 8px;
  font-family: monospace; font-size: 0.75rem;
}
.dc-optrec-greek { color: #60a5fa; }
.dc-optrec-greek.neg { color: #f87171; }
.dc-optrec-entry, .dc-optrec-timestop, .dc-optrec-sizing, .dc-optrec-avoid {
  font-size: 0.75rem; color: #cbd5e1; margin-bottom: 4px;
}
.dc-optrec-entry-label { color: #94a3b8; font-weight: 600; }
.dc-optrec-sizing { color: #94a3b8; font-size: 0.72rem; }
.dc-optrec-avoid { color: #fbbf24; font-size: 0.72rem; margin-top: 6px; }
.dc-optrec-rationale {
  font-size: 0.73rem; color: #94a3b8; margin: 6px 0;
  line-height: 1.4;
}
.dc-optrec-badges {
  display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0;
}
.dc-optrec-badge {
  font-size: 0.65rem; padding: 2px 6px; border-radius: 4px;
  background: rgba(148,163,184,0.1); color: #94a3b8;
  text-transform: uppercase; font-weight: 600;
}
.dc-optrec-badge.liq-A { color: #34d399; background: rgba(52,211,153,0.1); }
.dc-optrec-badge.liq-B { color: #fbbf24; background: rgba(251,191,36,0.1); }
.dc-optrec-badge.liq-C { color: #f87171; background: rgba(248,113,113,0.1); }
.dc-optrec-badge.iv-cheap { color: #34d399; }
.dc-optrec-badge.iv-fair { color: #60a5fa; }
.dc-optrec-badge.iv-expensive { color: #f87171; }
.dc-optrec-adjust {
  font-size: 0.72rem; color: #94a3b8; margin: 4px 0;
}
.dc-optrec-adjust summary {
  cursor: pointer; color: #60a5fa; font-weight: 600;
}
.dc-optrec-adjust ul { margin: 4px 0 0 16px; padding: 0; }
.dc-optrec-adjust li { margin-bottom: 2px; }
.dc-optrec-alt {
  border-top: 1px solid rgba(148,163,184,0.1);
  margin-top: 8px; padding-top: 8px;
}
.dc-optrec-alt-title { font-size: 0.72rem; color: #60a5fa; font-weight: 600; }
.dc-optrec-alt-legs { font-size: 0.72rem; color: #cbd5e1; font-family: monospace; }
.dc-optrec-alt-rationale { font-size: 0.7rem; color: #94a3b8; margin-top: 2px; }
.dc-optrec-meta {
  font-size: 0.65rem; color: #475569; margin-top: 6px; text-align: right;
}
.dc-optrec-fail {
  border-color: rgba(239,68,68,0.25);
  background: rgba(239,68,68,0.04);
}
.dc-optrec-fail-msg {
  color: #f87171; font-weight: 600; font-size: 0.8rem; margin-bottom: 8px;
}
.dc-optrec-diag-row {
  display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px;
}
.dc-optrec-eliminated {
  margin-top: 6px; font-size: 0.72rem; color: #94a3b8;
}
.dc-optrec-elim-title {
  color: #64748b; font-weight: 600; font-size: 0.68rem;
  text-transform: uppercase; margin-bottom: 4px;
}
.dc-optrec-eliminated ul {
  margin: 0 0 0 16px; padding: 0;
}
.dc-optrec-eliminated li {
  margin-bottom: 2px; line-height: 1.4;
}
.dc-optrec-stale {
  border-color: rgba(251,191,36,0.25);
  background: rgba(251,191,36,0.04);
}
.dc-optrec-stale-tag {
  font-size: 0.6rem; font-weight: 700; color: #fbbf24;
  background: rgba(251,191,36,0.12); padding: 1px 6px;
  border-radius: 3px; margin-left: 8px; vertical-align: middle;
}
.dc-optrec-badge.stale {
  color: #fbbf24; background: rgba(251,191,36,0.12);
}
.dc-copy-llm-btn {
  border: 1px solid rgba(96,165,250,0.3) !important;
  color: #60a5fa !important;
}
.dc-copy-llm-btn:hover {
  background: rgba(96,165,250,0.12) !important;
  border-color: rgba(96,165,250,0.5) !important;
}
