/* Fiona Trading History — Owner P&L ledger */
.fxh-wrap { max-width: 1100px; }
.fxh-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 8px 0 4px;
  border-bottom: 1px solid var(--fxo-border);
  margin-bottom: 4px;
}
.fxh-header h1 {
  margin: 2px 0 0;
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  letter-spacing: -0.02em;
}
.fxh-header-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.fxh-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  padding: 12px;
  background: var(--fxo-inset);
  border: 1px solid var(--fxo-border);
  border-radius: var(--fxo-radius);
}
.fxh-filters label { display: flex; flex-direction: column; gap: 4px; font-size: 0.75rem; color: var(--fxo-muted); }
.fxh-filters select,
.fxh-filters input {
  background: var(--fxo-card);
  color: var(--fxo-text);
  border: 1px solid var(--fxo-border);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
}
.fxh-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.fxh-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  background: var(--fxo-card);
  border: 1px solid var(--fxo-border);
  border-radius: 12px;
}
.fxh-card strong { font-size: 1.15rem; font-weight: 700; }
.fxh-card .pos,
.fxh-pos { color: var(--fxo-pos); }
.fxh-card .neg,
.fxh-neg { color: var(--fxo-neg); }
.fxh-section { padding: 16px; }
.fxh-section h2 { margin: 0 0 12px; font-size: 1.05rem; }
.fxh-ie-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.fxh-ie-grid > div {
  padding: 12px;
  background: var(--fxo-inset);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fxh-ie-net { grid-column: 1 / -1; border: 1px solid rgba(45, 212, 191, 0.3); }
.fxh-note { font-size: 0.78rem; margin: 10px 0 0; }
.fxh-table-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}
.fxh-table-wrap { overflow-x: auto; }
.fxh-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.fxh-table th,
.fxh-table td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--fxo-border);
  text-align: left;
  white-space: nowrap;
}
.fxh-table th { color: var(--fxo-muted); font-weight: 600; font-size: 0.72rem; }
.fxh-table tbody tr { cursor: pointer; }
.fxh-table tbody tr:hover { background: rgba(255, 255, 255, 0.03); }
.fxh-cards-mobile { display: none; gap: 8px; }
.fxh-mcard {
  padding: 12px 14px;
  border: 1px solid var(--fxo-border);
  border-radius: 12px;
  background: var(--fxo-inset);
}
.fxh-mcard__top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.fxh-mcard__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 10px;
  font-size: 0.78rem;
  color: var(--fxo-muted);
}
.fxh-pager { display: flex; gap: 8px; margin-top: 12px; }
.fxh-daily { display: flex; flex-direction: column; gap: 8px; }
.fxh-day {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 8px;
  padding: 10px 12px;
  background: var(--fxo-inset);
  border-radius: 10px;
  font-size: 0.82rem;
}
#fxhCumChart {
  width: 100%;
  max-width: 100%;
  height: auto;
  background: var(--fxo-inset);
  border-radius: 10px;
}
.fxh-dialog {
  border: 1px solid var(--fxo-border);
  border-radius: 14px;
  background: var(--fxo-card);
  color: var(--fxo-text);
  padding: 0;
  max-width: min(560px, 94vw);
  width: 100%;
}
.fxh-dialog::backdrop { background: rgba(0, 0, 0, 0.55); }
.fxh-dialog-inner { margin: 0; padding: 16px; }
.fxh-dialog-inner header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.fxh-dialog-inner h3 { margin: 0; }
.fxh-detail-body { display: flex; flex-direction: column; gap: 12px; font-size: 0.86rem; }
.fxh-detail-group {
  padding: 10px 12px;
  background: var(--fxo-inset);
  border-radius: 10px;
}
.fxh-detail-group h4 {
  margin: 0 0 8px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fxo-muted);
}
.fxh-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 0;
}
.fxh-badge {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--fxo-border);
  font-size: 0.7rem;
  font-weight: 700;
}
.fxh-badge.win { color: var(--fxo-pos); border-color: rgba(62, 232, 154, 0.35); }
.fxh-badge.loss { color: var(--fxo-neg); border-color: rgba(255, 123, 123, 0.35); }

@media (max-width: 800px) {
  .fxh-table-wrap { display: none; }
  .fxh-cards-mobile { display: flex; flex-direction: column; }
  .fxh-ie-grid { grid-template-columns: 1fr; }
  .fxh-ie-net { grid-column: auto; }
  .fxh-day { grid-template-columns: 1fr; }
}
