/* Chart Review. Same cream page, navy type, gold actions as Setups. */

#view-chart-review h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.02em;
  color: var(--navy);
}
#view-chart-review .setup-kicker {
  margin: 6px 0 0;
  color: var(--slate);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
}
#view-chart-review .setup-lead { color: var(--slate); max-width: 68ch; }
.cr-title-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.cr-title-row .setup-kicker { flex: 1 0 100%; }
.cr-title-row h1 { flex: 1 1 auto; }
.cr-help {
  width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--navy); font-weight: 800; cursor: pointer;
}
.cr-nav {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px;
}
.cr-periods, .cr-pager { display: flex; gap: 4px; align-items: center; }
.cr-periods button, .cr-pager button {
  border: 1px solid var(--line); background: var(--surface); color: var(--navy);
  border-radius: 999px; padding: 6px 12px; font-weight: 700; cursor: pointer;
}
.cr-periods button.on { background: var(--fill); color: var(--on-fill); border-color: var(--fill); }
.cr-pager button { min-width: 36px; }
#crPeriodLabel { font-weight: 800; color: var(--navy); min-width: 10ch; text-align: center; }
.cr-summary {
  display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 12px;
  padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  font-weight: 700; color: var(--navy);
}
.cr-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cr-settings { margin-top: 18px; }
.cr-settings > summary { cursor: pointer; font-weight: 800; color: var(--navy); }
.cr-row {
  display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; width: 100%;
  text-align: left; border: 0; background: transparent; color: inherit; font: inherit;
  padding: 8px 4px; cursor: pointer;
}
.cr-time { font-variant-numeric: tabular-nums; min-width: 4.5ch; font-weight: 700; }
.cr-symbol { font-weight: 800; color: var(--navy); }
.cr-qty { color: var(--slate); }
.cr-mini-tag, .cr-snap-count, .cr-cam {
  display: inline-block; padding: 1px 7px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); font-size: 12px; font-weight: 700;
}
.cr-snippet { color: var(--slate); font-size: 13px; font-weight: 500; }
.cr-fills { list-style: none; margin: 0 0 8px; padding: 0; }
.cr-fill { margin: 0 0 10px; }
.cr-fill-label { margin: 0 0 4px; font-size: 13px; font-weight: 700; color: var(--navy); }
.cr-day-head, .cr-week-head {
  display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; width: 100%;
  text-align: left; border: 0; background: transparent; color: var(--navy); font: inherit;
  font-weight: 800; padding: 8px 0; cursor: pointer;
}
.cr-week { margin-top: 8px; }
.cr-day-chart-btn {
  display: inline-flex; gap: 8px; align-items: center; margin: 4px 0 8px;
  border: 1px solid var(--line); background: var(--surface); border-radius: 10px;
  padding: 4px 10px; font-weight: 700; color: var(--navy); cursor: pointer;
}
.cr-day-thumb { width: 72px; height: 40px; object-fit: cover; border-radius: 6px; }
.cr-detail { padding: 4px 4px 12px 18px; }
.cr-text-btn {
  border: 0; background: transparent; color: var(--navy); font-weight: 800;
  text-decoration: underline; cursor: pointer; padding: 4px 0;
}
.cr-snap-download { font-size: 13px; font-weight: 700; color: var(--heading); }

.cr-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  margin-top: 12px;
}
.cr-filters label,
.cr-inline label,
.cr-stack,
.cr-tag-row label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--slate);
}
#view-chart-review input[type="text"],
#view-chart-review input[type="url"],
#view-chart-review input[type="date"],
#view-chart-review select {
  width: 100%;
  font: inherit;
  font-size: 15px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  padding: 7px 10px;
  color: var(--ink);
}
.cr-filters .btn,
.cr-inline .btn,
.cr-link .btn,
.cr-tag-row .btn,
.cr-actions .btn { margin-top: 0; }
.cr-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
#crSummaryCard,
#crManager,
#crTransfer,
#crOrphans { margin-top: 14px; }
.cr-table-wrap { overflow-x: auto; }
#view-chart-review table { min-width: 520px; }
.cr-day {
  margin-top: 18px;
  padding-top: 4px;
}
.cr-day-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: baseline;
  margin: 8px 0 4px;
}
.cr-day-head h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--navy);
}
.cr-day-head .note { margin: 0; }
.cr-day-chart {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 8px 10px;
  margin-top: 8px;
  box-shadow: var(--shadow);
}
.cr-drop {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  margin-top: 8px;
  padding: 12px 14px;
  border: 1px dashed var(--gold);
  border-radius: 10px;
  background: var(--surface);
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}
.cr-drop span { pointer-events: none; }
.cr-drop input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.cr-drop.cr-drop-compact {
  min-height: 0;
  margin-top: 0;
  padding: 6px 12px;
  width: auto;
  display: inline-flex;
  white-space: nowrap;
}
.cr-drop.is-over { background: var(--drop-over); border-style: solid; }
.cr-snaps { margin-top: 8px; }
.cr-snap { margin-top: 8px; }
.cr-snap-label {
  display: inline-block;
  margin: 0 0 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--navy);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.4;
}
.cr-snap-frame {
  display: block;
  width: 100%;
  height: 280px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0b0d12;
}
.cr-media { margin-top: 8px; }
.cr-chart-btn { margin-bottom: 8px; }
.cr-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.cr-thumb {
  flex: 0 0 auto;
  width: 112px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--navy);
  cursor: pointer;
  text-align: left;
}
.cr-thumb img {
  display: block;
  width: 112px;
  height: 72px;
  object-fit: cover;
  border-radius: 7px 7px 0 0;
  background: #0b0d12;
}
.cr-thumb span {
  display: block;
  padding: 4px 6px 6px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
}
.cr-unmatched-fold {
  margin: 12px 0 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.cr-unmatched-fold summary {
  cursor: pointer;
  padding: 10px 12px;
  font-weight: 700;
  color: var(--navy);
}
.cr-unmatched-bar { padding: 0 12px 8px; }
.cr-gallery-label {
  margin: 0 0 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.cr-chart-host { width: 100%; }
.cr-chart-host .cr-snap-frame { height: min(70vh, 640px); background: #0b0d12; }
.cr-unmatched {
  list-style: none;
  margin: 0;
  padding: 0 12px 12px;
  display: grid;
  gap: 10px;
}
.cr-unmatched li {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.cr-unmatched-name {
  flex: 1 1 180px;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  word-break: break-word;
}
.cr-unmatched select { flex: 1 1 220px; }
.cr-unmatched-thumb {
  width: 72px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.cr-day-chip {
  display: inline-flex;
  align-items: center;
  margin-top: 10px;
  border: 1px solid var(--gold);
  background: var(--surface);
  color: var(--navy);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}
.cr-shot { margin: 4px 0 0; width: 100%; }
.cr-zoom { width: 100%; }
.cr-zoom-frame {
  width: 100%;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  touch-action: pan-y;
  cursor: grab;
}
.cr-zoom-frame.is-zoomed { cursor: grab; }
.cr-zoom-frame.is-zoomed:active { cursor: grabbing; }
.cr-zoom-frame img {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  max-height: none;
  transform-origin: 0 0;
  user-select: none;
  -webkit-user-drag: none;
}
.cr-zoom-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
}
.cr-zoom-btn,
.cr-zoom-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  margin: 0;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--navy);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.cr-zoom-btn:disabled { opacity: 0.45; cursor: default; }
.cr-zoom-open { margin-left: auto; }
.cr-tv {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
  margin: 4px 0 8px;
}
.cr-tv .cr-zoom-open { margin-left: 0; }
.cr-tv .cr-tv-paste { flex: 1 1 220px; margin-top: 0; }
.cr-zoom-overlay { overflow: hidden; }
.cr-zoom-overlay .cr-tv-paste {
  flex: 0 0 auto;
  width: 100%;
  margin: 0 0 8px;
}
.cr-zoom-overlay .cr-tv-paste label { color: #fff; }
.cr-zoom-overlay .cr-tv-paste .cr-error { flex: 1 1 100%; }
.cr-zoom-overlay .cr-zoom-stage { position: relative; overflow: hidden; }
.cr-zoom-overlay .cr-chart-host {
  position: absolute;
  inset: 0;
  height: 100%;
}
.cr-zoom-overlay .cr-chart-host .cr-snap-frame {
  height: 100%;
  border: 0;
}
.cr-zoom-overlay input[type="url"] {
  width: 100%;
  font: inherit;
  font-size: 15px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: #fff;
  border-radius: 8px;
  padding: 7px 10px;
  color: #1a1408;
}
.cr-shot-actions { margin-top: 8px; }
.cr-zoom-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  padding: 10px;
  background: rgba(15, 28, 46, 0.94);
}
.cr-zoom-overlay[hidden] { display: none !important; }
.cr-zoom-overlay .cr-zoom {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.cr-zoom-overlay .cr-zoom-bar { margin-top: 0; margin-bottom: 8px; }
.cr-zoom-overlay .cr-zoom-open { color: #fff; background: transparent; border-color: rgba(255, 255, 255, 0.35); }
.cr-zoom-overlay .cr-zoom-btn { background: #fff; color: #1a1408; }
.cr-zoom-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cr-zoom-overlay .cr-zoom-frame {
  width: auto;
  max-width: 100%;
  max-height: 100%;
  background: #0f1c2e;
}
body.cr-zoom-lock { overflow: hidden; }
.cr-link-block { margin-top: 8px; }
.cr-trade {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 8px;
  margin-top: 6px;
}
.cr-trade.is-open {
  padding-bottom: 8px;
  box-shadow: var(--shadow);
}
.cr-trade-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: flex-end;
}
.cr-k {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--slate);
  margin-bottom: 2px;
}
.cr-symbol { font-weight: 800; color: var(--navy); }
.cr-pnl.pos { color: var(--pos); font-weight: 700; }
.cr-pnl.neg { color: var(--neg); font-weight: 700; }
.cr-id { font-weight: 700; color: var(--navy); word-break: break-all; }
.cr-label {
  display: block;
  margin: 12px 0 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--slate);
}
.cr-links-list, .cr-links { display: grid; gap: 8px; }
.cr-link {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: var(--surface);
}
.cr-link a {
  color: var(--navy);
  font-weight: 700;
  word-break: break-all;
}
.cr-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
  margin-top: 8px;
}
.cr-inline label,
.cr-tag-row label { flex: 1; min-width: 180px; }
.cr-stack { margin-top: 12px; }
.cr-error {
  color: var(--neg);
  font-size: 13px;
  font-weight: 700;
  margin: 6px 0 0;
}
.cr-applied, .cr-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.cr-applied-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 2px 4px 2px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
}
.cr-chip {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--navy);
  border-radius: 999px;
  padding: 4px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.cr-chip.on { background: var(--fill); color: var(--on-fill); border-color: var(--fill); }
.cr-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.cr-tag-name { font-weight: 800; color: var(--navy); min-width: 120px; padding-bottom: 8px; }
.cr-confirm { flex: 1 1 220px; margin: 0 0 8px; color: var(--navy); font-weight: 700; }
#view-chart-review button:focus-visible,
#view-chart-review a:focus-visible,
#view-chart-review input:focus-visible,
#view-chart-review select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .cr-filters { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  #view-chart-review h1 { font-size: 24px; }
  .cr-filters { grid-template-columns: 1fr; }
  #view-chart-review input,
  #view-chart-review select { font-size: 16px; }
  .cr-inline .btn,
  .cr-filters .btn,
  .cr-actions .btn,
  .cr-tag-row .btn { width: 100%; }
  .cr-link { align-items: stretch; }
  .cr-link .mini,
  .cr-shot-actions .mini { width: 100%; }
  .cr-zoom-btn,
  .cr-zoom-open { min-height: 44px; }
  .cr-snap-frame { height: 220px; }
  .cr-unmatched .btn,
  .cr-unmatched select { width: 100%; }
  .cr-zoom-open { margin-left: 0; }
  .cr-trade-head > div { min-width: 42%; }
}
