/* ============================================================
   EduMarkets — IR Options Module-Specific Styles
   ============================================================
   CLASSROOM MODE: All font sizes are doubled for projector
   readability. Tab navigation font is NOT increased.
   ============================================================ */

/* ── Sidebar controls ── */
/* The shared sidebar section, input and select classes are defined in
   components.css (authoritative source). */

.sidebar-heading {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 10px;
}

.sidebar-select option {
  background-color: var(--bg-input);
  color: var(--text);
}

.sidebar-btn {
  width: 100%;
  padding: 8px 14px;
  min-height: 38px;
  box-sizing: border-box;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: var(--font);
  text-align: left;
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background var(--transition), opacity var(--transition);
}
.sidebar-btn:hover { opacity: 0.9; }
.sidebar-btn.secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--sidebar-accent-dim);
}
.sidebar-btn.secondary:hover {
  border-color: var(--sidebar-accent);
}
.sidebar-btn.iro-reset-btn {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid rgba(46, 109, 164, 0.5);
}
.sidebar-btn.iro-reset-btn:hover {
  border-color: var(--color-accent);
}

.sidebar-checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--text);
  cursor: pointer;
}
.sidebar-checkbox-label input[type="checkbox"] {
  accent-color: var(--color-accent);
  width: 16px;
  height: 16px;
}

/* ── Shock sliders ── */

.shock-group {
  margin-bottom: 8px;
}

/* ── Shock slider rows ── */

.shock-slider-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 6px 0;
}

.shock-type-label {
  font-size: 0.82rem;
  min-width: 62px;
  color: rgba(255, 255, 255, 0.65);
}
[data-theme="light"] .shock-type-label {
  color: rgba(0, 0, 0, 0.55);
}

/* .sidebar-slider (signed shock slider) lives in components.css now — shared
   across the rates modules, Futures and TRS. */

.slider-value {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  min-width: 36px;
  text-align: right;
}
.slider-value.positive {
  color: #34d399;
}
.slider-value.negative {
  color: #f87171;
}
[data-theme="light"] .slider-value.positive {
  color: #059669;
}
[data-theme="light"] .slider-value.negative {
  color: #dc2626;
}

/* ── Rate inputs ── */

.rate-inputs {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rate-input-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.rate-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  min-width: 32px;
  text-align: right;
}

.rate-input {
  flex: 1;
  padding: 4px 8px;
  font-size: 0.92rem;
  font-family: var(--font-mono);
  background: var(--bg-elevated);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  outline: none;
  text-align: right;
  max-width: 90px;
  -moz-appearance: textfield;
}
.rate-input::-webkit-outer-spin-button,
.rate-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.rate-input:focus {
  border-color: var(--color-accent);
  box-shadow: var(--focus-ring);
}

.rate-unit {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  min-width: 12px;
}

/* ── Data tables ── */

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}
/* Reference-tab tables should match surrounding body text, not the
   larger pricer-tab rate tables. */
.learn-chapter-body .data-table { font-size: 0.85rem; }
.learn-chapter-body .data-table th { font-size: 0.72rem; padding: 8px 10px; }
.learn-chapter-body .data-table td { padding: 6px 10px; }
.data-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--border);
  background: var(--bg-surface);
  position: sticky;
  top: 0;
}
.data-table td {
  padding: 8px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text);
}
.data-table td.num {
  text-align: right;
  font-family: var(--font-mono);
}
.data-table tr:hover td {
  background: rgba(255,255,255,0.05);
}
[data-theme="light"] .data-table tr:hover td {
  background: rgba(0,0,0,0.04);
}
.data-table.compact th,
.data-table.compact td {
  padding: 6px 10px;
}

/* Rate table + forward ladder side-by-side container */
#iro-rate-table-wrap .data-table {
  width: auto;
}
#iro-rate-table-wrap .data-table th {
  text-align: center;
}
#iro-fwd-ladder-wrap {
  flex-shrink: 0;
}
#iro-fwd-ladder-wrap .chart-wrap {
  min-width: 630px;
}

.data-table td.positive { color: var(--positive); }
.data-table td.negative { color: var(--negative); }

/* Portfolio instrument table */
#pf-table th {
  padding: 6px 8px;
  font-size: 0.92rem;
}
#pf-table td {
  padding: 6px 8px;
  color: rgba(255,255,255,0.88);
  font-size: 0.95rem;
}
#pf-table td.num {
  white-space: nowrap;
}
#pf-table td.positive { color: var(--positive); }
#pf-table td.negative { color: var(--negative); }

/* ── Instrument grid (bond/swap/swaption input + results side by side) ── */

.iro-instrument-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  align-items: start;
}

/* Sidebar-tab content — stack at the shared 1024 tablet step (was 900). */
@media (max-width: 1024px) {
  .iro-instrument-grid {
    grid-template-columns: 1fr;
  }
}

.iro-instrument-col h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.iro-results-col {
  min-height: 100px;
}

/* ── Chart wrapper ── */

.chart-wrap {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-surface);
}

/* chart-wrap fullscreen + chart-fullscreen-btn styles inherited from components.css */

/* ── Metric cards ── */

.iro-metric-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px 20px;
  min-width: 140px;
}

.iro-metric-label {
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.iro-metric-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: lining-nums tabular-nums;
  font-family: var(--font-mono);
}

/* ── Portfolio layout ── */

.pf-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.pf-left-panel {
  width: 210px;
  min-width: 210px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pf-right-panel {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
}

.pf-metrics-section {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.pf-metrics-section:last-child {
  border-bottom: none;
}


.pf-section-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 6px;
}

.pf-metric-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 3px 0;
  font-size: 1.05rem;
}

.pf-pnl-clickable {
  cursor: help;
  text-decoration: underline dotted transparent;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.12s ease, background 0.12s ease;
}
.pf-pnl-clickable:hover {
  text-decoration-color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
}

.pf-pnl-total-row {
  cursor: help;
  border-radius: 4px;
  padding-left: 4px;
  padding-right: 4px;
  transition: background 0.12s ease;
}
.pf-pnl-total-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.pf-metric-label {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 500;
}

.pf-metric-value {
  font-weight: 700;
  font-variant-numeric: lining-nums tabular-nums;
  font-family: var(--font-mono);
  color: rgba(255, 255, 255, 0.92);
}

.pf-metric-value.positive { color: var(--positive); }
.pf-metric-value.negative { color: var(--negative); }

.pf-pnl-section {
  background: rgba(20, 184, 166, 0.04);
  border-radius: var(--r-md);
  padding: 10px 10px;
  margin: 2px -10px;
}

.pf-pnl-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin: 4px 0;
}

.pf-time-display {
  font-size: 1.4rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text);
  text-align: center;
  padding: 4px 0 8px;
}

.pf-time-btns {
  display: flex;
  gap: 4px;
}

.pf-ctrl-btn {
  flex: 1;
  padding: 5px 0;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg-surface);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s;
}

.pf-ctrl-btn:hover {
  background: var(--bg-elevated);
}

.pf-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 12px;
}

/* (legacy .pf-action-btn / .pf-action-primary / .pf-action-danger removed —
   replaced by shared .btn .btn-ghost / .btn .btn-primary in components.css) */

.pf-error-icon {
  color: var(--negative, #ef4444);
  cursor: help;
  font-size: 0.9rem;
  margin-right: 4px;
}

.pf-group-subtotal td {
  font-weight: 600;
  font-size: 0.82rem;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

/* Light theme portfolio overrides */
[data-theme="light"] .pf-section-label {
  color: rgba(0, 0, 0, 0.55);
}
[data-theme="light"] .pf-metric-label {
  color: rgba(0, 0, 0, 0.7);
}
[data-theme="light"] .pf-metric-value {
  color: rgba(0, 0, 0, 0.85);
}
[data-theme="light"] .pf-metric-value.positive { color: var(--positive); }
[data-theme="light"] .pf-metric-value.negative { color: var(--negative); }
[data-theme="light"] .pf-pnl-section {
  background: rgba(20, 184, 166, 0.06);
}
[data-theme="light"] .pf-pnl-divider {
  border-top-color: rgba(0, 0, 0, 0.15);
}
[data-theme="light"] #pf-table td {
  color: rgba(0, 0, 0, 0.8);
}
[data-theme="light"] #pf-table td.positive { color: var(--positive); }
[data-theme="light"] #pf-table td.negative { color: var(--negative); }
[data-theme="light"] .pf-group-subtotal td {
  background: rgba(0, 0, 0, 0.03);
}

/* ── F7: Drag-to-Reorder ── */
.pf-pos-row[draggable]:hover {
  background: rgba(255, 255, 255, 0.04);
}
[data-theme="light"] .pf-pos-row[draggable]:hover {
  background: rgba(0, 0, 0, 0.04);
}
.pf-drop-indicator td {
  height: 2px !important;
  padding: 0 !important;
  background: var(--color-accent) !important;
}

/* ── F16: Position Drill-Down ── */
.pf-detail-row td.pf-detail-cell {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}
[data-theme="light"] .pf-detail-row td.pf-detail-cell {
  background: rgba(0, 0, 0, 0.02);
}
.pf-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  max-width: 760px;
}
.pf-detail-heading {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pf-detail-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 2px 0;
  font-size: 0.82rem;
}
.pf-detail-key {
  color: var(--text-muted);
  white-space: nowrap;
}
.pf-detail-val {
  color: var(--text);
  font-family: var(--font-mono);
  font-variant-numeric: lining-nums tabular-nums;
  text-align: right;
  white-space: nowrap;
}

/* ── Empty state ── */

.iro-empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.iro-empty-state p {
  margin: 8px 0;
}

/* ── Curve overlay toggle row ── */

.iro-curve-overlays label {
  font-size: 0.8rem;
  color: var(--text);
}

/* ── Remove button ── */


/* ── Multi-instrument card ── */

.iro-instrument-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  transition: border-color var(--transition);
}
.iro-instrument-card:hover {
  border-color: var(--border-hover, var(--color-accent));
}

/* ── Rate table toggle ── */

.iro-rate-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.0rem;
  font-variant-numeric: tabular-nums;
  margin-top: 8px;
}
.iro-rate-table th {
  text-align: center;
  padding: 6px 8px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}
.iro-rate-table td {
  text-align: center;
  padding: 5px 8px;
  font-family: var(--font-mono);
  color: var(--text);
}
.iro-rate-table .delta-pos { color: var(--positive); }
.iro-rate-table .delta-neg { color: var(--negative); }

/* ── Shock status indicator ── */

.shock-indicator {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 10px;
  margin-left: 8px;
}
.shock-indicator.active {
  background: rgba(234, 179, 8, 0.15);
  color: #eab308;
}
.shock-indicator.inactive {
  background: rgba(156, 163, 175, 0.1);
  color: var(--text-muted);
}

/* ── Preset selector ── */

.iro-preset-select {
  padding: 6px 12px;
  font-size: 0.95rem;
  font-family: var(--font);
  background-color: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--sidebar-accent-dim);
  border-radius: var(--r-md);
  outline: none;
}
.iro-preset-select:focus {
  border-color: var(--sidebar-accent);
}

/* ── Sidebar btn disabled state ── */

.sidebar-btn:disabled,
.sidebar-btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Positive / negative value colors (for non-table contexts) ── */

.positive { color: var(--positive, #22c55e); }
.negative { color: var(--negative, #ef4444); }

/* ── Details/summary educational expander ── */

details summary {
  list-style: none;
  user-select: none;
}
details summary::before {
  content: '\25B6 ';
  font-size: 0.65rem;
  margin-right: 4px;
  display: inline-block;
  transition: transform 0.2s;
}
details[open] summary::before {
  transform: rotate(90deg);
}

/* ── Heatmap output toggle buttons ── */

.sabr-view.active,
.swpn-heatmap-output[style*="font-weight:700"],
.cf-heatmap-output[style*="font-weight:700"] {
  border-color: var(--color-accent) !important;
}

/* ── Range slider styling ── */

input[type="range"] {
  accent-color: var(--color-accent);
  height: 4px;
}

#params-content .sidebar-select {
  padding: 8px 14px;
  min-height: 38px;
  box-sizing: border-box;
}

.sidebar-section.fi-no-divider {
  border-bottom: none;
  padding-bottom: 8px;
  margin-bottom: 8px;
}

/* ── Par rates side-by-side table ── */

.iro-par-rates-table {
  width: auto;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  table-layout: fixed;
}
/* Fixed column widths so single-column mode stays narrow */
.iro-par-rates-table th:first-child,
.iro-par-rates-table td:first-child { width: 44px; }
.iro-par-rates-table th:not(:first-child),
.iro-par-rates-table td:not(:first-child) { width: 110px; }
.iro-par-rates-table thead th {
  text-align: center;
  padding: 5px 5px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.55);
  border-bottom: 1px solid var(--border);
}
.iro-par-rates-table tbody td {
  padding: 2px 3px;
  text-align: center;
  vertical-align: middle;
}
.iro-par-rates-table .iro-tenor-cell {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  min-width: 36px;
  text-align: center;
}
.iro-par-rates-table .rate-input {
  max-width: none;
  width: 100%;
  text-align: center;
  padding: 3px 5px;
  font-size: 0.88rem;
}

/* ── Live data source line (below preset selector) ── */
.iro-source-line {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-top: 8px;
  padding: 6px 0 2px;
  border-top: 1px solid var(--border-subtle);
}

/* ── Shock slider label readability ── */

.shock-group span[style*="font-size:0.68rem"] {
  color: rgba(255, 255, 255, 0.55) !important;
}

/* ── Hide Plotly notifier flashes on yield curve chart ── */
#iro-curve-chart .notifier-note,
#iro-curve-chart .notifier {
  display: none !important;
}

/* ============================================================
   Pricer Tab Components — Classroom-Sized
   ============================================================ */

/* ── Toolbar ── */

.pricer-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

/* (legacy .pricer-btn-sm and .pricer-btn-action removed —
   replaced by shared .btn .btn-ghost / .btn .btn-secondary in components.css) */


/* Pricer Grid — now in components.css. Module-specific overrides below. */

/* FI-specific: sidebar select light theme */
[data-theme="light"] .sidebar-select {
  background-color: #f5f5f5;
  color: #222;
  color-scheme: light;
}
[data-theme="light"] .sidebar-select option {
  background-color: #f5f5f5;
  color: #222;
}

/* FI-specific: par rates table light theme */
[data-theme="light"] .iro-par-rates-table thead th {
  color: rgba(0, 0, 0, 0.5);
}
[data-theme="light"] .iro-par-rates-table .iro-tenor-cell {
  color: rgba(0, 0, 0, 0.55);
}

/* ── FRA/SPS Mode Toggle ────────────────────────────────────── */
.fra-mode-toggle {
  display: flex;
  gap: 3px;
  margin-bottom: 4px;
}
.fra-mode-btn {
  flex: 1;
  padding: 5px 6px;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: var(--font, Inter, sans-serif);
  letter-spacing: 0.02em;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  outline: none;
  border-radius: 4px;
}
.fra-mode-btn.fra-mode-active {
  background: rgba(20, 184, 166, 0.18);
  border-color: rgba(20, 184, 166, 0.5);
  color: #818cf8;
}
.fra-mode-btn:hover:not(.fra-mode-active) {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.65);
}
.fra-custom-row input:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
[data-theme="light"] .fra-mode-btn {
  border-color: rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.02);
  color: rgba(0, 0, 0, 0.35);
}
[data-theme="light"] .fra-mode-btn.fra-mode-active {
  background: rgba(79, 70, 229, 0.12);
  border-color: rgba(79, 70, 229, 0.45);
  color: #4f46e5;
}

/* ============================================================
   Yield Curve — full-width chart (override base max-width)
   ============================================================ */

#tab-yield-curve .tab-content-area {
  max-width: none;
}

/* ============================================================
   Dialog content (Price/YTM, Duration, Cashflows)
   Shared chrome (overlay, panel, header, close, body) lives in
   platform.css; only module-specific content is kept below.
   ============================================================ */

/* Cashflow table inside dialog */
.iro-dialog-body .cf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.iro-dialog-body .cf-table th {
  text-align: right;
  padding: 4px 8px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.55);
  border-bottom: 1px solid var(--border, #333);
}
.iro-dialog-body .cf-table th:first-child { text-align: left; }
.iro-dialog-body .cf-table td {
  text-align: right;
  padding: 3px 8px;
  font-family: var(--font-mono);
  color: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.iro-dialog-body .cf-table td:first-child { text-align: left; }
.iro-dialog-body .cf-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}
.iro-dialog-body .cf-table tfoot td {
  font-weight: 700;
  border-top: 2px solid var(--border, #333);
  color: rgba(255, 255, 255, 0.95);
}

/* (legacy .cashflow-btn removed — replaced by shared .btn .btn-secondary .btn-sm) */

/* Narrow dialog variant (wide variant lives in platform.css) */
.iro-dialog.iro-dialog-narrow {
  width: min(440px, 94vw);
}

/* Notional schedule input inside dialog */
.iro-dialog-body .notl-schedule-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0;
}
.iro-dialog-body .notl-schedule-row label {
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  min-width: 80px;
  text-align: right;
}
.iro-dialog-body .notl-schedule-row input {
  flex: 1;
  max-width: 220px;
  padding: 6px 10px;
  font-size: 0.95rem;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  outline: none;
  text-align: right;
}
.iro-dialog-body .notl-schedule-row input:focus {
  border-color: var(--color-accent);
}

/* Action button row inside dialog */
.iro-dialog-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  justify-content: flex-end;
}
.iro-dialog-actions button {
  padding: 8px 20px;
  font-size: 0.92rem;
  font-weight: 600;
  font-family: var(--font, Inter, sans-serif);
  border-radius: 6px;
  cursor: pointer;
  transition: opacity 0.15s;
}
.iro-dialog-actions .btn-primary {
  background: var(--color-accent);
  color: #fff;
  border: none;
}
.iro-dialog-actions .btn-primary:hover { opacity: 0.88; }
.iro-dialog-actions .btn-secondary {
  background: var(--bg-elevated);
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border);
}
.iro-dialog-actions .btn-secondary:hover {
  border-color: var(--color-accent);
}

/* Notional cell with schedule indicator */
.pricer-grid .notl-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pricer-grid .notl-cell input {
  flex: 1;
  min-width: 0;
}
.pricer-grid .schedule-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 5px;
  border-radius: 3px;
  background: rgba(20, 184, 166, 0.15);
  color: #8b8ef8;
  white-space: nowrap;
  flex-shrink: 0;
}
[data-theme="light"] .pricer-grid .schedule-badge {
  background: rgba(20, 184, 166, 0.1);
  color: #14b8a6;
}

/* (legacy .swap-action-btn removed — replaced by shared .btn .btn-secondary .btn-sm) */

/* Light theme */
[data-theme="light"] .iro-dialog {
  background: var(--bg-surface);
  border-color: var(--border);
}
[data-theme="light"] .iro-dialog-body .notl-schedule-row label {
  color: rgba(0, 0, 0, 0.55);
}
[data-theme="light"] .iro-dialog-body .notl-schedule-row input {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.15);
  color: #222;
}
[data-theme="light"] .iro-dialog-actions .btn-secondary {
  color: rgba(0, 0, 0, 0.78);
}

/* ============================================================
   Light Theme — Comprehensive Overrides (H6)
   ============================================================ */

/* Sidebar */
[data-theme="light"] .sidebar-heading {
  color: rgba(0, 0, 0, 0.6);
}
[data-theme="light"] .sidebar-select,
[data-theme="light"] .sidebar-input {
  background-color: #f5f5f5;
  color: #222;
  color-scheme: light;
}
[data-theme="light"] .sidebar-select option {
  background-color: #f5f5f5;
  color: #222;
}
[data-theme="light"] .sidebar-btn.secondary {
  background: var(--bg-elevated);
  color: var(--text);
}

/* Rate inputs (par rate table in sidebar) */
[data-theme="light"] .rate-label {
  color: rgba(0, 0, 0, 0.5);
}
[data-theme="light"] .rate-input {
  color: rgba(0, 0, 0, 0.85);
}
[data-theme="light"] .rate-unit {
  color: rgba(0, 0, 0, 0.4);
}

/* Pricer grid header */
[data-theme="light"] .pricer-grid thead th {
  color: rgba(0, 0, 0, 0.45);
  border-bottom-color: var(--border);
}
[data-theme="light"] .pricer-grid thead th:first-child {
  color: rgba(0, 0, 0, 0.3);
}

/* Pricer grid body rows */
[data-theme="light"] .pricer-grid tbody td {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .pricer-grid .divider-row td {
  border-top-color: rgba(20, 184, 166, 0.25);
}
[data-theme="light"] .pricer-grid .section-row td {
  color: rgba(20, 184, 166, 0.65);
  border-bottom-color: rgba(20, 184, 166, 0.1);
}

/* (legacy light-mode overrides for .pricer-btn-sm / .pricer-btn-action /
   .add-portfolio-btn / .cashflow-btn removed — shared .btn theming handles both modes) */

/* Dialog */
[data-theme="light"] .iro-dialog-body .cf-table th {
  color: rgba(0, 0, 0, 0.5);
}
[data-theme="light"] .iro-dialog-body .cf-table td {
  color: rgba(0, 0, 0, 0.75);
  border-bottom-color: rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .iro-dialog-body .cf-table tr:hover td {
  background: rgba(0, 0, 0, 0.02);
}
[data-theme="light"] .iro-dialog-body .cf-table tfoot td {
  color: rgba(0, 0, 0, 0.85);
}

/* ── Mobile Responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
  .iro-instrument-grid { grid-template-columns: 1fr; }
  .iro-instrument-col { min-width: 0; }
  .fi-data-table,
  .iro-rate-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .iro-chart-wrap { overflow: hidden; }
  .fi-metric-strip { flex-wrap: wrap; gap: 8px; }
  .iro-dialog { width: min(92vw, 640px); }
  .iro-forward-ladder { min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}



/* Inflation Swaps tab: wider instrument columns so dropdown labels like
   "Zero-Coupon (ZCIS)" / "Year-on-Year (YYIS)" fit without truncation.
   The default .col-inst (components.css) is 200px. Scoped override
   following the same pattern as XCS Trade Builder. */
#inflation-swap-content .pricer-grid colgroup .col-inst {
  width: 240px;
  min-width: 240px;
  max-width: 240px;
}
