/* ============================================================
   Export Report
   ============================================================ */
.xr {
  --xr-card: #14171C;
  --xr-line: #21262E;
  --xr-muted: #848E9C;
  --xr-white: #EAECEF;
  --xr-gold: #F0B90B;
  --xr-green: #0ECB81;
  /* the design insets content 16px; app-content already supplies 14px */
  padding: 0 2px 8px;
}
.xr button { text-align: left; }

/* ---------- Title ---------- */
.xr-h1 {
  margin-top: 4px;
  font-size: 17.5px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.xr-sub {
  margin-top: 8px;
  font-size: 9.5px;
  color: var(--xr-muted);
  line-height: 1.4;
}

/* ---------- Bot identity ---------- */
.xr-bot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
}
.xr-bot-id {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}
.xr-bot-id .crypto-avatar {
  width: 42px;
  height: 42px;
  font-size: 21px;
}
.xr-bot-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.xr-pair {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  line-height: 1.3;
  white-space: nowrap;
}
.xr-badge {
  flex-shrink: 0;
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid rgba(240, 185, 11, 0.32);
  background: rgba(240, 185, 11, 0.10);
  color: var(--xr-gold);
  font-size: 8.5px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
}
.xr-bot-meta {
  margin-top: 4px;
  font-size: 10.5px;
  color: var(--xr-muted);
  white-space: nowrap;
}
.xr-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  padding: 3px 6px;
  border-radius: 5px;
  background: rgba(14, 203, 129, 0.10);
  color: var(--xr-green);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.15;
}
.xr-state i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.xr-range {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  padding: 9px;
  border: 1px solid var(--xr-line);
  border-radius: 9px;
  background: var(--xr-card);
  color: var(--xr-white);
  font-size: 10.5px;
  font-weight: 500;
  white-space: nowrap;
}
.xr-range svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  color: var(--xr-muted);
}
.xr-range svg:last-child { width: 11px; height: 11px; }

/* ---------- Section headings ---------- */
.xr-sec {
  margin: 16px 0 11px;
  font-size: 10.5px;
  font-weight: 600;
  color: #fff;
}

/* ---------- 1. Report type ---------- */
.xr-types {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.xr-type {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 13px 12px 7px;
  border: 1px solid var(--xr-line);
  border-radius: 10px;
  background: var(--xr-card);
}
.xr-type.selected {
  border-color: var(--xr-gold);
  background-image: linear-gradient(rgba(240, 185, 11, 0.05), rgba(240, 185, 11, 0.05));
}
.xr-type-h {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding-right: 13px;
}
.xr-type:not(.selected) .xr-type-h { padding-right: 0; }
.xr-type-ico {
  flex-shrink: 0;
  width: 19px;
  height: 19px;
  color: var(--xr-white);
}
.xr-type-ico svg { width: 19px; height: 19px; }
.xr-type.selected .xr-type-ico { color: var(--xr-gold); }
.xr-type-t {
  padding-top: 2px;
  font-size: 10.5px;
  font-weight: 600;
  color: #fff;
  line-height: 1.33;
}
.xr-type-d {
  margin-top: auto;
  padding-top: 7px;
  font-size: 8.5px;
  color: var(--xr-muted);
  line-height: 1.65;
}

.xr-tick {
  position: absolute;
  top: 5px;
  right: 6px;
  display: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--xr-gold);
  place-items: center;
}
.xr-type.selected .xr-tick { display: grid; }
.xr-tick svg {
  width: 9px;
  height: 9px;
  color: #0B0E11;
  stroke-width: 3.6;
}

/* ---------- 2. Sections to include ---------- */
.xr-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 8px;
  row-gap: 9px;
  padding: 12px 13px;
  border: 1px solid var(--xr-line);
  border-radius: 12px;
  background: var(--xr-card);
}
.xr-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 9.5px;
  color: var(--xr-white);
  line-height: 1.4;
}
.xr-check-t { white-space: nowrap; }
.xr .checkbox-box {
  width: 13px;
  height: 13px;
  border-radius: 3px;
  border-width: 1.2px;
}
.xr .checkbox-box.checked svg {
  width: 9px;
  height: 9px;
  stroke-width: 3.6;
}

/* ---------- 3. Format ---------- */
.xr-formats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}
.xr-fmt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
  padding: 10px 8px 9px;
  border: 1px solid var(--xr-line);
  border-radius: 10px;
  background: var(--xr-card);
}
.xr-fmt.selected {
  border-color: var(--xr-gold);
  background-image: linear-gradient(rgba(240, 185, 11, 0.05), rgba(240, 185, 11, 0.05));
}
.xr-fmt-ico {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}
.xr-fmt-ico svg { width: 14px; height: 14px; }
.xr-tone-gold   { color: var(--xr-gold); }
.xr-tone-green  { color: var(--xr-green); }
.xr-tone-violet { color: #8B5CF6; }
.xr-tone-blue   { color: #3B82F6; }
.xr-fmt-n,
.xr-fmt-c {
  display: block;
}
.xr-fmt-n {
  font-size: 9px;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}
.xr-fmt-c {
  margin-top: 3px;
  font-size: 8px;
  color: var(--xr-muted);
  line-height: 1.3;
}
.xr-fmt.selected .xr-fmt-n,
.xr-fmt.selected .xr-fmt-c { color: var(--xr-gold); }

/* ---------- 4. Delivery ---------- */
.xr-delivery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.xr-dl {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--xr-line);
  border-radius: 10px;
  background: var(--xr-card);
}
.xr-dl.selected {
  border-color: var(--xr-gold);
  background-image: linear-gradient(rgba(240, 185, 11, 0.05), rgba(240, 185, 11, 0.05));
}
.xr-dl-ico {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--xr-white);
}
.xr-dl-ico svg { width: 16px; height: 16px; }
.xr-dl-t,
.xr-dl-c {
  display: block;
  white-space: nowrap;
}
.xr-dl-t {
  font-size: 9px;
  font-weight: 600;
  color: #fff;
  line-height: 1.35;
}
.xr-dl-c {
  margin-top: 1.5px;
  font-size: 8px;
  color: var(--xr-muted);
  line-height: 1.3;
}

/* ---------- Preview card ---------- */
.xr-card {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--xr-line);
  border-radius: 12px;
  background: var(--xr-card);
}
.xr-card-h {
  font-size: 9.5px;
  font-weight: 600;
  color: #fff;
}
.xr-preview {
  display: grid;
  grid-template-columns: 40% minmax(0, 1fr);
  gap: 14px;
  margin-top: 11px;
  padding-left: 7px;
}

.xr-meta {
  min-width: 0;
  padding-top: 2px;
}
.xr-meta-h {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--xr-line);
}
.xr-meta-t {
  font-size: 9.5px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}
.xr-pill {
  flex-shrink: 0;
  padding: 2px 6px;
  border: 1px solid rgba(14, 203, 129, 0.45);
  border-radius: 5px;
  color: var(--xr-green);
  font-size: 7.5px;
  font-weight: 600;
  line-height: 1.35;
}
.xr-kv { margin-top: 7px; }
.xr-kv-row + .xr-kv-row { margin-top: 6px; }
.xr-kv-row .k,
.xr-kv-row .v { display: block; }
.xr-kv-row .k {
  font-size: 7px;
  color: var(--xr-muted);
  line-height: 1.45;
}
.xr-kv-row .v {
  margin-top: 1px;
  font-size: 9px;
  font-weight: 500;
  color: var(--xr-white);
  line-height: 1.45;
  white-space: nowrap;
}

/* ---------- Preview thumbnail (decorative mini report) ---------- */
.xr-thumb {
  padding: 5px;
  border: 1px solid #23282F;
  border-radius: 6px;
  background: #0E1116;
  overflow: hidden;
}
.xr-thumb i,
.xr-thumb b { font-style: normal; }
.xr-th-brand {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 8px;
}
.xr-th-logo {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--xr-gold);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.xr-th-name {
  font-size: 5px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}
.xr-th-chev {
  margin-left: auto;
  color: var(--xr-muted);
  line-height: 0;
}
.xr-th-chev svg { width: 5px; height: 5px; }
.xr-th-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px;
  margin-top: 4px;
  font-size: 4.5px;
  font-weight: 600;
  color: #C9CDD4;
  letter-spacing: 0.02em;
  line-height: 1.2;
}
.xr-th-date { color: var(--xr-gold); font-weight: 500; }

.xr-th-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3px;
  margin-top: 5px;
}
.xr-th-stats-2 { margin-top: 3px; }
.xr-th-stats span {
  min-width: 0;
  padding: 2px;
  border-radius: 2px;
  background: #14181E;
  overflow: hidden;
}
.xr-th-stats i,
.xr-th-stats b { display: block; white-space: nowrap; }
.xr-th-stats i {
  font-size: 3.5px;
  color: #6C7480;
  line-height: 1.2;
}
.xr-th-stats b {
  margin-top: 1px;
  font-size: 5px;
  font-weight: 700;
  color: #D8DCE3;
  line-height: 1.2;
}
.xr-th-green { color: var(--xr-green) !important; }

.xr-th-chart {
  margin-top: 3px;
  line-height: 0;
}
.xr-th-chart svg { width: 100%; height: 34px; }

.xr-th-row {
  display: grid;
  grid-template-columns: 1fr 1fr 0.8fr;
  gap: 3px;
  margin-top: 3px;
}
.xr-th-foot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  margin-top: 3px;
}
.xr-th-cell {
  min-width: 0;
  padding: 3px;
  border-radius: 2px;
  background: #14181E;
  overflow: hidden;
}
.xr-th-cell i {
  display: block;
  font-size: 3.5px;
  color: #6C7480;
  line-height: 1.2;
  white-space: nowrap;
}
.xr-th-cell b {
  display: block;
  margin-top: 2px;
  font-size: 4.5px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
.xr-th-bars {
  display: block;
  width: 100%;
  height: 19px;
  margin-top: 2px;
}
.xr-th-donut-cell {
  position: relative;
  display: grid;
  place-items: center;
  padding: 3px 2px;
}
.xr-th-donut-cell i {
  position: absolute;
  top: 3px;
  left: 3px;
}
.xr-th-donut {
  width: 20px;
  height: 20px;
  margin-top: 5px;
}
.xr-th-legend {
  position: absolute;
  right: 2px;
  bottom: 5px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.xr-th-legend i {
  width: 6px;
  height: 1.5px;
  border-radius: 1px;
  background: #3A414C;
}

/* ---------- Generate ---------- */
.xr-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  margin-top: 17px;
  border-radius: 8px;
  background: var(--xr-gold);
  color: #0B0E11;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.xr-btn:active { opacity: 0.9; }
.xr-btn svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.2;
}
.xr-note {
  margin-top: 10px;
  text-align: center;
  font-size: 8.5px;
  color: var(--xr-muted);
  line-height: 1.45;
}

/* Narrow phones: the four format tiles and the two delivery tiles carry the
   longest single-line captions, so they shed padding first. */
@media (max-width: 420px) {
  .xr-h1 { font-size: 16.5px; }
  .xr-sub { font-size: 9px; }
  .xr-bot-meta { font-size: 10px; }
  .xr-range { padding: 9px 7px; font-size: 10px; }
  .xr-check { font-size: 9px; gap: 7px; }
  .xr-fmt { padding: 11px 6px; gap: 4px; }
  .xr-fmt-c { font-size: 7px; }
  .xr-dl { padding: 10px 9px; gap: 8px; }
  .xr-dl-c { font-size: 7.5px; }
  .xr-kv-row .v { font-size: 8.5px; }
  .xr-note { font-size: 8px; }
}
