/* ============================================================
   react_modules.css — React module grid system for ZeroSigma
   All classes prefixed .rmod- to avoid collisions with Dash CSS

   UX model:
     LOCKED mode — controls interactive, charts pan/zoom, no drag/resize/remove
     EDIT mode   — whole-card drag, resize, add/remove, controls+charts disabled
   ============================================================ */

/* (Nuclear override removed — header fixed at the source in Python layout) */


/* --- react-grid-layout base (inlined) --- */

.react-grid-layout {
  position: relative;
  transition: height 200ms ease;
}

.react-grid-item {
  transition: transform 200ms ease;
}

.react-grid-item img {
  pointer-events: none;
  user-select: none;
}

.react-grid-item.cssTransforms {
  transition-property: transform;
}

.react-grid-item.resizing {
  transition: none;
  z-index: 1;
  will-change: width, height;
}

.react-grid-item.react-draggable-dragging {
  transition: none;
  z-index: 3;
  will-change: transform;
}

.react-grid-item.dropping {
  visibility: hidden;
}


/* --- Resize handles: se and sw --- */

.react-grid-item > .react-resizable-handle {
  position: absolute;
  width: 20px;
  height: 20px;
}

.react-grid-item > .react-resizable-handle::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.react-grid-item > .react-resizable-handle-se {
  bottom: 0;
  right: 0;
}

.react-grid-item > .react-resizable-handle-se::after {
  right: 3px;
  bottom: 3px;
}

.react-grid-item > .react-resizable-handle-sw {
  bottom: 0;
  left: 0;
}

.react-grid-item > .react-resizable-handle-sw::after {
  left: 3px;
  bottom: 3px;
  transform: rotate(90deg);
}


/* --- ZeroSigma overrides --- */

.react-grid-placeholder {
  background: rgba(0, 229, 168, 0.1);
  border: 2px dashed var(--accent);
  border-radius: 14px;
}

/* Locked mode: handles fully hidden and inert */
.react-grid-item > .react-resizable-handle {
  opacity: 0;
  pointer-events: none;
  cursor: default;
  color: var(--muted);
  transition: opacity 0.15s ease;
}

/* Edit mode: handles enabled */
.rmod-grid--editing .react-grid-item > .react-resizable-handle {
  opacity: 0.3;
  pointer-events: auto;
}

.rmod-grid--editing .react-grid-item > .react-resizable-handle-se {
  cursor: se-resize;
}

.rmod-grid--editing .react-grid-item > .react-resizable-handle-sw {
  cursor: sw-resize;
}

.rmod-grid--editing .react-grid-item:hover > .react-resizable-handle {
  opacity: 0.7;
}

.react-grid-item.react-grid-item--isDragging {
  opacity: 0.7;
  z-index: 100;
}


/* --- 1. Grid container --- */

.rmod-grid {
  background: var(--bg);
  padding: 12px 16px;
  min-height: 0;
}


/* --- 2. Module card --- */

.rmod-card {
  --zs-ctl-dark-bg: rgba(20,30,48,.58);
  --zs-ctl-dark-bg-hover: rgba(33,49,74,.76);
  --zs-ctl-dark-border: rgba(58,78,112,.42);
  --zs-ctl-dark-fg: rgba(182,199,221,.86);
  --zs-ctl-blue-bg: rgba(45,108,255,.86);
  --zs-ctl-blue-bg-hover: rgba(67,124,255,.94);
  --zs-ctl-blue-border: rgba(101,152,255,.54);
  --zs-ctl-green-bg: rgba(25,245,178,.84);
  --zs-ctl-green-bg-hover: rgba(46,252,190,.92);
  --zs-ctl-green-border: rgba(94,255,211,.42);
  --zs-ctl-green-fg: #04110d;
  background: rgba(20, 26, 34, 0.85);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
  box-sizing: border-box;
  position: relative;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}


/* --- Edit mode card --- */

.rmod-card--editing {
  border-color: rgba(45, 108, 255, 0.35);
  box-shadow: 0 0 0 1px rgba(45, 108, 255, 0.15);
  cursor: grab;
  overflow: visible;
}

.rmod-card--editing:active {
  cursor: grabbing;
}

.rmod-card--shake {
  animation: rmod-wiggle 0.45s ease-in-out 1;
}

@keyframes rmod-wiggle {
  0%   { transform: rotate(0deg); }
  15%  { transform: rotate(-0.5deg); }
  30%  { transform: rotate(0.5deg); }
  50%  { transform: rotate(-0.3deg); }
  70%  { transform: rotate(0.3deg); }
  85%  { transform: rotate(-0.1deg); }
  100% { transform: rotate(0deg); }
}


/* --- 3. Card header --- */

.rmod-card-header {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.rmod-card-header * {
  box-shadow: none !important;
  outline: none !important;
}


/* --- Remove button --- */

.rmod-remove-btn {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 20px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(13, 19, 29, 0.78);
  border: 1px solid rgba(72, 96, 134, 0.34);
  border-radius: 10px;
  color: rgba(232, 241, 255, 0.78);
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  padding: 0 0 2px 0;
  z-index: 20;
  box-shadow: 0 0 0 2px rgba(20, 26, 34, 0.92);
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.rmod-remove-btn:hover {
  background: rgba(20, 29, 43, 0.92);
  border-color: rgba(102, 132, 182, 0.44);
  color: #fff;
  box-shadow: 0 0 0 2px rgba(20, 26, 34, 0.96);
}


/* --- 4. Controls --- */

.rmod-controls {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  transition: opacity 0.2s ease;
}

/* Control row — single flex row that wraps when narrow */
.rmod-controls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px 8px;
  min-height: 26px;
  width: 100%;
}

/* Secondary row (second row of pills) — right-aligned, slightly smaller gap */
.rmod-controls-row--secondary {
  justify-content: flex-end;
  gap: 3px;
}

.rmod-controls-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.rmod-controls-group--left {
  flex: 1 1 200px;
}

.rmod-controls-group--main-right {
  flex: 0 1 auto;
  justify-content: flex-end;
  margin-left: auto;
}

.rmod-controls-group--mode {
  flex: 0 0 auto;
  justify-content: flex-end;
}

.rmod-controls-group--secondary {
  flex: 0 1 auto;
  justify-content: flex-end;
  margin-left: auto;
  gap: 3px;
}

.rmod-controls-row--secondary .rmod-controls-group--secondary {
  gap: 3px;
}

.rmod-controls-row--primary .rmod-controls-group--left {
  grid-area: left;
}

.rmod-controls-row--primary .rmod-controls-group--main-right {
  grid-area: main;
}

.rmod-controls-row--primary .rmod-controls-group--mode {
  grid-area: mode;
  justify-self: end;
}

.rmod-controls--narrow .rmod-controls-row--primary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "left mode"
    "main main";
  align-items: start;
}

.rmod-controls--compact .rmod-controls-row--primary {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
}

.rmod-controls--compact .rmod-controls-row--primary .rmod-controls-group--left {
  flex: 1 1 100%;
}

.rmod-controls--compact .rmod-controls-row--primary .rmod-controls-group--main-right {
  flex: 1 1 auto;
  order: 2;
}

.rmod-controls--compact .rmod-controls-row--primary .rmod-controls-group--mode {
  flex: 0 0 auto;
  order: 3;
  justify-self: auto;
  margin-left: 0;
}

.rmod-controls--narrow .rmod-controls-row--secondary,
.rmod-controls--compact .rmod-controls-row--secondary {
  justify-content: flex-start;
}

.rmod-controls--narrow .rmod-controls-group--main-right,
.rmod-controls--compact .rmod-controls-group--main-right,
.rmod-controls--narrow .rmod-controls-group--secondary,
.rmod-controls--compact .rmod-controls-group--secondary {
  justify-content: flex-start;
  margin-left: 0;
}

.rmod-controls--stacked .rmod-controls-row--stacked {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  justify-content: stretch;
  gap: 5px 6px;
}

.rmod-controls--stacked .rmod-controls-row--stacked > * {
  min-width: 0;
}

.rmod-controls--stacked .rmod-controls-row--stacked > :only-child {
  grid-column: 1 / -1;
}

.rmod-controls--stacked .rmod-controls-row--stacked > .rmod-pill,
.rmod-controls--stacked .rmod-controls-row--stacked > .rmod-select {
  width: 100%;
}

.rmod-controls--stacked .rmod-pill {
  min-width: 0;
}

.rmod-controls--stacked .rmod-pill-option {
  flex: 1 1 0;
  min-width: 0;
  padding: 0 6px;
}

.rmod-controls--stacked .rmod-select {
  min-width: 0;
  padding: 0 9px;
}

.rmod-controls-spacer {
  flex: 1 1 0;
  min-width: 4px;
}


/* --- 5. Pill toggle --- */

.rmod-pill {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  height: 28px;
  background: none;
  border: none;
  padding: 0;
  flex-shrink: 0;
  max-width: 100%;
}

.rmod-pill-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  padding: 0 8px;
  height: 28px;
  font-size: 11px;
  font-weight: 700;
  font-family: inherit;
  line-height: 28px;
  border-radius: 12px;
  border: 1px solid var(--zs-ctl-dark-border);
  background: var(--zs-ctl-dark-bg);
  color: var(--zs-ctl-dark-fg);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  text-align: center;
  box-sizing: border-box;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.rmod-pill-option:hover:not(.rmod-pill-disabled) {
  background: var(--zs-ctl-dark-bg-hover);
  color: #fff;
}

.rmod-pill-option.active {
  background: var(--zs-ctl-blue-bg);
  border-color: var(--zs-ctl-blue-border);
  color: #fff;
}

.rmod-pill-option.active:hover:not(.rmod-pill-disabled) {
  background: var(--zs-ctl-blue-bg-hover);
}

.rmod-pill-option.active.alt {
  background: var(--zs-ctl-green-bg);
  border-color: var(--zs-ctl-green-border);
  color: var(--zs-ctl-green-fg);
}

.rmod-pill-option.active.alt:hover:not(.rmod-pill-disabled) {
  background: var(--zs-ctl-green-bg-hover);
}

.rmod-pill-option:focus-visible {
  outline: 2px solid rgba(140, 180, 255, 0.55) !important;
  outline-offset: 1px;
}

.rmod-pill-disabled {
  cursor: default;
  opacity: 0.5;
}

/* DDOI Prev / Next pills */
.rmod-pill-nav {
  background: var(--zs-ctl-blue-bg);
  border-color: var(--zs-ctl-blue-border);
  color: #fff;
  min-width: 50px;
}

.rmod-pill-nav:hover:not(.rmod-pill-disabled) {
  background: var(--zs-ctl-blue-bg-hover);
}

.rmod-pill-nav--next {
  background: var(--zs-ctl-green-bg);
  border-color: var(--zs-ctl-green-border);
  color: var(--zs-ctl-green-fg);
}

.rmod-pill-nav--next:hover:not(.rmod-pill-disabled) {
  background: var(--zs-ctl-green-bg-hover);
}


/* --- 6. Dropdown select --- */

.rmod-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: rgba(16, 24, 38, 0.96);
  border: 1px solid rgba(82, 102, 136, 0.82);
  border-radius: 12px;
  height: 28px;
  min-width: 90px;
  color: rgba(241, 246, 255, 0.97);
  font-size: 11px;
  font-weight: 700;
  font-family: inherit;
  text-align: center;
  padding: 0 12px;
  cursor: pointer;
  box-sizing: border-box;
  flex-shrink: 0;
  max-width: 100%;
  transition: background 0.12s ease, border-color 0.12s ease, opacity 0.2s ease;
}

.rmod-select:hover:not(.rmod-disabled) {
  background: rgba(22, 32, 50, 0.96);
  border-color: rgba(100, 122, 160, 0.9);
}

.rmod-select:focus {
  outline: none;
  border-color: rgba(45, 108, 255, 0.7);
}

.rmod-select.rmod-disabled {
  cursor: default;
  opacity: 0.5;
}


/* --- 7. Chart wrapper --- */

.rmod-chart-wrap {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  padding: 0 6px 4px 6px;
  min-height: 0;
}

.rmod-chart-wrap--disabled {
  pointer-events: none;
}

.rmod-chart-wrap .nsewdrag {
  cursor: default !important;
}


/* --- 8. Total readout --- */

.rmod-total {
  color: rgba(155, 176, 204, 0.75);
  font-size: 12px;
  padding: 0 12px;
  flex: 0 0 auto;
  white-space: nowrap;
}


/* --- 9. Grid toolbar --- */

.rmod-toolbar {
  --zs-ctl-dark-bg: rgba(20,30,48,.58);
  --zs-ctl-dark-bg-hover: rgba(33,49,74,.76);
  --zs-ctl-dark-border: rgba(58,78,112,.42);
  --zs-ctl-dark-fg: rgba(182,199,221,.86);
  --zs-ctl-blue-bg: rgba(45,108,255,.86);
  --zs-ctl-blue-bg-hover: rgba(67,124,255,.94);
  --zs-ctl-blue-border: rgba(101,152,255,.54);
  --zs-ctl-green-bg: rgba(25,245,178,.84);
  --zs-ctl-green-bg-hover: rgba(46,252,190,.92);
  --zs-ctl-green-border: rgba(94,255,211,.42);
  --zs-ctl-green-fg: #04110d;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  flex-wrap: wrap;
  margin: 4px 0 12px;
  border: 1px solid rgba(72, 96, 134, 0.42);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(23, 33, 49, 0.96) 0%, rgba(13, 19, 30, 0.92) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 0 0 1px rgba(32, 48, 72, 0.32),
    0 10px 24px rgba(0, 0, 0, 0.18);
}

.rmod-toolbar-cluster {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
  flex: 1 1 auto;
}

.rmod-toolbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  padding: 0 13px;
  height: 28px;
  font-size: 11px;
  font-weight: 700;
  font-family: inherit;
  line-height: 28px;
  border-radius: 12px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  text-align: center;
  box-sizing: border-box;
  border: 1px solid var(--zs-ctl-dark-border);
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.28);
}

.rmod-toolbar-btn:disabled {
  opacity: 0.42;
  cursor: default;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.rmod-toolbar-btn.is-soft {
  background: linear-gradient(180deg, rgba(31, 50, 76, 0.92) 0%, rgba(20, 33, 52, 0.88) 100%);
  border-color: rgba(88, 124, 182, 0.42);
  color: rgba(229, 238, 250, 0.94);
}

.rmod-toolbar-btn.is-soft:hover {
  background: linear-gradient(180deg, rgba(38, 61, 93, 0.96) 0%, rgba(24, 39, 62, 0.94) 100%);
  border-color: rgba(112, 151, 214, 0.5);
  color: #fff;
}

.rmod-toolbar-btn.is-primary {
  background: var(--zs-ctl-blue-bg);
  border-color: var(--zs-ctl-blue-border);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 0 1px rgba(45, 108, 255, 0.1), 0 0 16px rgba(45, 108, 255, 0.1);
}

.rmod-toolbar-btn.is-primary:hover {
  background: var(--zs-ctl-blue-bg-hover);
}

.rmod-toolbar-btn.is-alt {
  background: var(--zs-ctl-green-bg);
  border-color: var(--zs-ctl-green-border);
  color: var(--zs-ctl-green-fg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 14px rgba(25, 245, 178, 0.08);
}

.rmod-toolbar-btn.is-alt:hover {
  background: var(--zs-ctl-green-bg-hover);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 18px rgba(25, 245, 178, 0.12);
}

.rmod-toolbar-btn.is-dark {
  background: linear-gradient(180deg, rgba(22, 31, 46, 0.96) 0%, rgba(14, 20, 31, 0.92) 100%);
  border-color: rgba(72, 96, 134, 0.38);
  color: rgba(214, 225, 242, 0.9);
}

.rmod-toolbar-btn.is-dark:hover {
  background: linear-gradient(180deg, rgba(28, 40, 58, 0.98) 0%, rgba(18, 27, 40, 0.96) 100%);
  border-color: rgba(88, 118, 166, 0.46);
  color: #fff;
}

.rmod-toolbar-btn:focus-visible {
  outline: 2px solid rgba(140, 180, 255, 0.55);
  outline-offset: 1px;
}

.rmod-edit-toggle--active {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 0 2px rgba(45, 108, 255, 0.22), 0 0 20px rgba(45, 108, 255, 0.1);
}

/* Load button inside saved-layouts group — tighter to match nested pill feel */
.rmod-toolbar-saved .rmod-toolbar-btn {
  min-width: 48px;
  padding: 0 10px;
  border-color: var(--zs-ctl-dark-border);
}

.rmod-toolbar-saved {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  padding: 2px;
  border-radius: 14px;
  border: 1px solid rgba(68, 93, 132, 0.42);
  background: linear-gradient(180deg, rgba(15, 22, 33, 0.86) 0%, rgba(10, 15, 23, 0.8) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), inset 0 0 0 1px rgba(28, 42, 63, 0.34);
}

.rmod-toolbar-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  height: 28px;
  min-width: 170px;
  max-width: 260px;
  padding: 0 30px 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(74, 101, 144, 0.42);
  background:
    linear-gradient(180deg, rgba(21, 31, 46, 0.98) 0%, rgba(14, 21, 33, 0.94) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 5 5-5' fill='none' stroke='rgba(205,220,243,.72)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center;
  color: rgba(226, 236, 249, 0.94);
  font-size: 11px;
  font-weight: 700;
  font-family: inherit;
  box-sizing: border-box;
  outline: none;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}

.rmod-toolbar-select:hover:not(:disabled) {
  background:
    linear-gradient(180deg, rgba(25, 37, 55, 0.98) 0%, rgba(17, 27, 41, 0.96) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 5 5-5' fill='none' stroke='rgba(225,236,251,.86)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center;
  border-color: rgba(96, 129, 183, 0.58);
  color: #fff;
}

.rmod-toolbar-select:focus {
  border-color: rgba(74, 137, 255, 0.66);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 0 0 1px rgba(45, 108, 255, 0.14);
}

.rmod-toolbar-select:disabled {
  opacity: 0.42;
  cursor: default;
}

@media (max-width: 860px) {
  .rmod-toolbar {
    padding: 10px;
  }

  .rmod-toolbar-cluster {
    flex: 1 1 100%;
  }

  .rmod-toolbar-saved {
    flex: 1 1 100%;
  }

  .rmod-toolbar-select {
    flex: 1 1 auto;
    max-width: none;
  }

  .rmod-save-status {
    margin-left: 0;
    flex: 1 1 100%;
  }
}


/* --- 10. Save status --- */

.rmod-save-status {
  font-size: 11px;
  font-weight: 600;
  color: rgba(155, 176, 204, 0.6);
  user-select: none;
  margin-left: auto;
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rmod-save-ok {
  color: rgba(25, 245, 178, 0.85);
}

.rmod-save-err {
  color: rgba(255, 100, 100, 0.85);
}


/* --- 11. Edit mode grid cue --- */

.rmod-grid--editing {
  border: 1px dashed rgba(45, 108, 255, 0.2);
  border-radius: 16px;
  padding: 12px 16px;
}


/* --- 12. DDOI date navigation --- */

.rmod-ddoi-nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
}


/* --- 13. Flow panel — arc gauge dominance --- */

/* Flow panel — two rows (SPX, SPY), each row: text left, gauge right */
.rmod-flow-wrap {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 2px 16px 8px;
  overflow: hidden;
  min-height: 0;
  justify-content: stretch;
}

.rmod-flow-block {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  padding: 8px 0;
  min-height: 0;
  flex: 1 1 0;
  overflow: hidden;
}

.rmod-flow-block + .rmod-flow-block {
  border-top: 1px solid rgba(58, 78, 112, 0.2);
}

.rmod-flow-inner {
  width: 100%;
  max-width: 430px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 3vw, 18px);
  margin: 0 auto;
  min-width: 0;
}

/* Left: text column */
.rmod-flow-text {
  flex: 1 1 148px;
  max-width: 52%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-width: 0;
}

.rmod-flow-title {
  font-size: 14px;
  font-weight: 800;
  color: rgba(232, 241, 255, 0.92);
  letter-spacing: 0.3px;
  white-space: nowrap;
  flex-shrink: 0;
}

.rmod-flow-stats {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}

.rmod-flow-stat-call {
  font-size: 12px;
  font-weight: 700;
  color: rgba(25, 245, 178, 0.9);
  white-space: nowrap;
}

.rmod-flow-stat-put {
  font-size: 12px;
  font-weight: 700;
  color: rgba(45, 108, 255, 0.9);
  white-space: nowrap;
}

.rmod-flow-dom-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Right: arc gauge — fills remaining space */
.rmod-flow-gauge-wrap {
  flex: 1 1 120px;
  min-width: 0;
  min-height: 0;
  max-width: 48%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rmod-flow-gauge-shell {
  width: 100%;
  max-width: 220px;
  min-width: 0;
  height: auto;
  aspect-ratio: 1.7 / 1;
}

.rmod-flow-gauge-svg {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.rmod-flow-gauge-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  fill: rgba(155, 176, 204, 0.62);
}

.rmod-flow-gauge-label--call {
  fill: rgba(25, 245, 178, 0.88);
}

.rmod-flow-gauge-label--put {
  fill: rgba(45, 108, 255, 0.88);
}
