.teow-shell {
  --teow-bg: #07101a;
  --teow-panel: #0b1723;
  --teow-line: #21384b;
  --teow-text: #e8f1f8;
  --teow-muted: #8399aa;
  --teow-cyan: #44d9ff;
  --teow-green: #56e8a6;
  --teow-orange: #ffb45d;
  --teow-red: #ff637e;
  min-height: 100%;
  box-sizing: border-box;
  padding: 12px;
  color: var(--teow-text);
  background: radial-gradient(circle at 0 0, rgba(68,217,255,.08), transparent 32%), var(--teow-bg);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}
.teow-toolbar { display: flex; align-items: end; gap: 9px; flex-wrap: wrap; padding: 10px; border: 1px solid var(--teow-line); border-radius: 9px; background: var(--teow-panel); }
.teow-toolbar label { color: var(--teow-muted); font: 700 9px/1.2 ui-monospace, monospace; letter-spacing: .08em; }
.teow-toolbar select, .teow-toolbar input, .teow-toolbar button { display: block; box-sizing: border-box; margin-top: 5px; min-height: 32px; border: 1px solid #2b4a61; border-radius: 6px; padding: 6px 9px; color: var(--teow-text); background: #07111b; }
.teow-toolbar button { cursor: pointer; color: #001119; background: var(--teow-cyan); border-color: var(--teow-cyan); font-weight: 900; }
.teow-status { margin-left: auto; align-self: center; font: 700 9px/1.2 ui-monospace, monospace; color: var(--teow-muted); }
.teow-kpis { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; margin: 9px 0; }
.teow-kpis > span { min-width: 0; padding: 10px; border: 1px solid var(--teow-line); border-radius: 8px; background: var(--teow-panel); }
.teow-kpis i { display: block; color: var(--teow-muted); font: 700 8px/1.2 ui-monospace, monospace; }
.teow-kpis b { display: block; margin-top: 4px; font-size: 14px; }
.teow-list { display: grid; gap: 8px; }
.teow-journal-row, .teow-breach-row { border: 1px solid var(--teow-line); border-radius: 9px; overflow: hidden; background: linear-gradient(145deg, var(--teow-panel), #08111a); }
.teow-journal-row > header, .teow-breach-row > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--teow-line); }
.teow-journal-row header > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.teow-journal-row time, .teow-breach-row time { color: var(--teow-cyan); font: 700 9px/1 ui-monospace, monospace; }
.teow-journal-row code, .teow-breach-row code, .teow-proof code { color: #9eb4c4; font-size: 10px; }
.teow-journal-row header span, .teow-breach-row header span { padding: 3px 6px; border: 1px solid var(--teow-line); border-radius: 999px; color: var(--teow-muted); font: 700 9px/1 ui-monospace, monospace; }
.teow-analysts, .teow-proof, .teow-performance, .teow-breach-row > div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid rgba(33,56,75,.7); font-size: 10px; }
.teow-reasons, .teow-levels { display: flex; flex-wrap: wrap; gap: 5px; padding: 8px 12px; }
.teow-reasons span, .teow-levels span { padding: 4px 7px; border: 1px solid var(--teow-line); border-radius: 999px; color: #bad0df; background: #08131d; font: 700 9px/1 ui-monospace, monospace; }
.teow-version, .teow-history-warning { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 12px 0; font-size: 11px; }
.teow-version span { border: 1px solid rgba(94,230,168,.25); color: #9fb8ad; padding: 3px 7px; }
.teow-history-warning { border: 1px solid rgba(245,158,11,.7); background: rgba(245,158,11,.12); color: #fbbf24; padding: 8px; }
.teow-history-warning b { letter-spacing: .08em; }
.teow-reasons-historical { opacity: .72; border-left: 3px solid #f59e0b; }
.teow-nonprice { margin: 8px 12px; padding: 8px; border: 1px solid rgba(255,180,93,.4); border-radius: 6px; color: var(--teow-orange); font: 800 9px/1.3 ui-monospace, monospace; }
.teow-performance b { margin-left: auto; }
.teow-good { color: var(--teow-green) !important; }
.teow-warn { color: var(--teow-orange) !important; }
.teow-bad { color: var(--teow-red) !important; }
.teow-muted { color: var(--teow-muted) !important; }
.teow-empty { padding: 36px; text-align: center; border: 1px dashed var(--teow-line); border-radius: 9px; color: var(--teow-muted); }
.teow-working { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255,180,93,.45); }
.teow-working-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; padding: 10px 12px; border: 1px solid rgba(255,180,93,.4); border-radius: 8px; color: var(--teow-orange); background: rgba(255,180,93,.07); }
.teow-working-head b { font: 900 11px/1.2 ui-monospace, monospace; letter-spacing: .08em; }
.teow-working-head span { color: var(--teow-muted); font: 700 9px/1.2 ui-monospace, monospace; text-align: right; }
.teow-working-list { display: grid; gap: 8px; }
.teow-working-row { border: 1px solid rgba(255,180,93,.28); border-radius: 9px; overflow: hidden; background: linear-gradient(145deg, rgba(255,180,93,.06), #08111a); }
.teow-working-row > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-bottom: 1px solid rgba(255,180,93,.22); }
.teow-working-row header > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.teow-working-row time { color: var(--teow-orange); font: 700 9px/1 ui-monospace, monospace; }
.teow-working-row code { color: #9eb4c4; font-size: 10px; }
.teow-working-row header span { padding: 3px 6px; border: 1px solid rgba(255,180,93,.28); border-radius: 999px; color: var(--teow-orange); font: 700 9px/1 ui-monospace, monospace; }
.teow-working-boundary { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; color: var(--teow-orange); font: 800 9px/1.3 ui-monospace, monospace; }
.teow-working-boundary span { color: var(--teow-muted); }
.teow-working-reasons { display: flex; flex-wrap: wrap; gap: 5px; padding: 0 12px 10px; }
.teow-working-reasons span { padding: 4px 7px; border: 1px solid var(--teow-line); border-radius: 999px; color: #bad0df; background: #08131d; font: 700 9px/1 ui-monospace, monospace; }
.teow-working-reasons .teow-working-positive { border-color: rgba(86,232,166,.3); color: var(--teow-green); }
.teow-working-reasons .teow-working-negative { border-color: rgba(255,99,126,.3); color: #ff9aac; }
.teow-breach-entry, .teow-breach-tp { color: var(--teow-green); }
.teow-breach-invalidation, .teow-breach-sl { color: var(--teow-red); }
.teow-breach-data { color: var(--teow-orange); }
@media (max-width: 900px) {
  .teow-kpis { grid-template-columns: repeat(2, 1fr); }
  .teow-status { margin-left: 0; width: 100%; }
  .teow-working-head, .teow-working-row > header, .teow-working-boundary { align-items: flex-start; flex-direction: column; }
  .teow-working-head span { text-align: left; }
}

/* LA JOURNEE — fenetre de lisibilite (demande Gontran 29/07).
   Objectif : repondre « est-ce qu'on est rentable ? » sans jargon et sans
   qu'aucun montant n'apparaisse tant qu'il n'y a rien a mesurer. */
.teow-kpis-4 { grid-template-columns: repeat(4, 1fr); }
.teow-journee-note { margin: 6px 0 10px; color: var(--teow-muted);
  font: 400 11px/1.5 ui-monospace, monospace; }
.teow-journee-bloc { margin-top: 18px; }
.teow-journee-bloc h4 { margin: 0 0 9px; color: var(--teow-muted);
  font: 700 9px/1.2 ui-monospace, monospace; letter-spacing: .1em; }
.teow-journee-motif { display: grid; grid-template-columns: 1fr 120px 60px;
  gap: 9px; align-items: center; padding: 5px 0; }
.teow-journee-lib { font: 400 11px/1.3 ui-monospace, monospace; }
.teow-journee-bar { height: 6px; border-radius: 3px; background: var(--teow-line);
  overflow: hidden; }
.teow-journee-bar i { display: block; height: 100%; background: var(--teow-orange); }
.teow-journee-n { text-align: right; font: 700 11px/1.2 ui-monospace, monospace; }
.teow-journee-dossier { padding: 9px; margin-bottom: 7px;
  border: 1px solid var(--teow-line); border-radius: 8px; background: var(--teow-panel); }
.teow-journee-dossier header { display: flex; flex-wrap: wrap; gap: 7px;
  align-items: center; margin-bottom: 7px; }
.teow-journee-dossier header span { padding: 3px 6px; border: 1px solid var(--teow-line);
  border-radius: 999px; font: 700 9px/1 ui-monospace, monospace; }
.teow-journee-bloquants { display: flex; flex-wrap: wrap; gap: 5px; }
.teow-journee-bloquants span { padding: 3px 7px; border-radius: 999px;
  background: var(--teow-line); font: 400 10px/1.3 ui-monospace, monospace; }


/* 31/07 soir : section TRADES MOTEUR du journal de suivi */
#teow-trades-moteur { margin: 10px 0 14px; }
#teow-trades-moteur .teow-trades-jour { margin: 8px 0 4px; color: #cdd3e0; }
#teow-trades-moteur .teow-trade { padding: 5px 8px; margin: 2px 0; border-left: 3px solid #3a4152; font-size: 12px; }
#teow-trades-moteur .teow-trade.teow-t-gain  { border-left-color: #22c55e; }
#teow-trades-moteur .teow-trade.teow-t-perte { border-left-color: #ef4444; }
#teow-trades-moteur .teow-manque { padding: 3px 8px; margin: 1px 0; color: #6b7280; font-size: 11px; border-left: 3px dotted #3a4152; }
#teow-trades-moteur .teow-gain  { color: #4ade80; }
#teow-trades-moteur .teow-perte { color: #f87171; }

/* nuit 31/07 : manques 'signal juste' mis en valeur */
#teow-trades-moteur .teow-manque.teow-manque-juste { color: #fbbf24; border-left-color: #f59e0b; }
