
/* =====================================================================
   TRADING SUITE · PREMIUM DARK — Kern (v5.260)

   Quelle: 04 Marketing/Website/Redesign/Design NEU/TradingSuite_Redesign
   (index.html, design-tokens.json). Diese Datei ist auf JEDER Seite
   dieselbe: Dashboard, Anmeldung, Landingpage, Profil, Admin, Rechtliches.
   Wer eine Farbe, einen Radius oder einen Abstand aendern will, aendert
   ihn hier - und nur hier.
   ===================================================================== */
:root {
  --ts-bg: #070B11;
  --ts-side: #090F18;
  --ts-bg2: #101724;            /* Karten */
  --ts-panel-soft: #0D1420;
  --ts-surface: #131C2A;
  --ts-surface2: #162131;
  --ts-line: #1B2735;
  --ts-line2: #263344;
  --ts-rand: #283646;           /* Kartenrand */
  --ts-rand-knopf: #34475D;
  --ts-rand-feld: #2D3C4C;
  --ts-text: #F4F7FB;
  --ts-sub: #C5D0DF;
  --ts-dim: #A9B6C8;
  --ts-muted: #8190A5;
  --ts-blue: #9BD7FF;
  --ts-teal: #7ACDF2;
  --ts-mint: #BDE4FF;
  --ts-green: #80C9AB;
  --ts-pos: #80C9AB;
  --ts-neg: #EF7D85;
  --ts-warn: #E4B587;
  --ts-akzent-text: #9BD7FF;
  --ts-mint-text: #BDE4FF;
  --ts-pos-text: #80C9AB;
  --ts-neg-text: #EF7D85;
  --ts-warn-text: #E4B587;
  --ts-radius: 14px;
  --ts-radius-s: 10px;
  --ts-glow: 0 0 0 1px rgba(131,178,206,.045), 0 14px 46px rgba(0,0,0,.16);
  --ts-karte: linear-gradient(140deg, rgba(17,26,39,.97), rgba(11,17,26,.97));
  --ts-font: Inter, 'Inter Display', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ts-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
/* Hellmodus - Werte aus .light-mode des Prototyps. Zwei Toene sind
   nachgerechnet statt uebernommen: #677A91 kommt als Kleintext auf dem
   hellen Grund nur auf 3,9:1 - mit #56677D sind es 5,0:1. */
body.theme-light {
  --ts-bg: #EFF3F8;
  --ts-side: #E7EDF4;
  --ts-bg2: #FFFFFF;
  --ts-panel-soft: #F7F9FC;
  --ts-surface: #F7F9FC;
  --ts-surface2: #EDF2F7;
  --ts-line: #D9E1EB;
  --ts-line2: #C5D0DF;
  --ts-rand: #CDD7E3;
  --ts-rand-knopf: #C5D0DF;
  --ts-rand-feld: #C5D0DF;
  --ts-text: #152134;
  --ts-sub: #33455A;
  --ts-dim: #44576D;
  --ts-muted: #56677D;
  --ts-blue: #2F6F96;
  --ts-teal: #2F6F96;
  --ts-mint: #255F86;
  --ts-green: #2B7355;
  --ts-pos: #2B7355;
  --ts-neg: #C23A45;
  --ts-warn: #8A5E1E;
  --ts-akzent-text: #255F86;
  --ts-mint-text: #255F86;
  --ts-pos-text: #2B7355;
  --ts-neg-text: #C23A45;
  --ts-warn-text: #8A5E1E;
  --ts-glow: 0 1px 2px rgba(21,33,52,.05), 0 10px 30px -18px rgba(21,33,52,.18);
  --ts-karte: #FFFFFF;
}

/* ---------------------------------------------------------------- Knoepfe */
.ts-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: #121E2E; border: 1px solid var(--ts-rand-knopf); border-radius: 9px;
  color: #DBE8F6; padding: 8px 13px; font: inherit; font-size: 13px; line-height: 1.25;
  letter-spacing: -.015em; cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: border-color .15s, background .15s, color .15s;
}
.ts-btn:hover { border-color: #5F8FB0; color: #FFFFFF; }
.ts-btn.primaer { border-color: #5F8FB0; background: #1A3449; color: #CFECFF; }
.ts-btn.primaer:hover { background: #20405A; border-color: #7DB6DC; }
.ts-btn.aktion {
  background: linear-gradient(140deg, #BAD9EA, #80BFAE); color: #06121C;
  border: 0; font-weight: 700; min-height: 44px; border-radius: 10px;
}
.ts-btn.aktion:hover { filter: brightness(1.06); color: #06121C; }
.ts-btn svg { width: 14px; height: 14px; flex: none; }
body.theme-light .ts-btn { background: #F8FAFC; color: #26354A; border-color: #C5D0DF; }
body.theme-light .ts-btn:hover { border-color: #2F6F96; color: #152134; }
body.theme-light .ts-btn.primaer { background: #E3EEF7; border-color: #9DBFD8; color: #1D4F72; }
body.theme-light .ts-btn.aktion { color: #06121C; }

/* ------------------------------------------------- Segmente / Reiter */
.ts-seg {
  display: inline-flex; border: 1px solid #2A394B; border-radius: 10px; padding: 4px;
  background: rgba(10,17,26,.75); gap: 2px;
}
.ts-seg button, .ts-reiter button {
  background: transparent; color: #AEB9CB; border: 1px solid transparent; border-radius: 7px;
  padding: 9px 15px; font: inherit; font-size: 13px; letter-spacing: -.015em; cursor: pointer;
  white-space: nowrap;
}
.ts-reiter { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.ts-reiter button { padding: 7px 13px; font-size: 11px; }
.ts-seg button:hover, .ts-reiter button:hover { color: #FFFFFF; }
.ts-seg button.active, .ts-seg button.on, .ts-reiter button.active, .ts-reiter button.on {
  border-color: #7D9CBA; color: #FFFFFF;
  background: linear-gradient(130deg, rgba(89,142,188,.28), rgba(41,61,81,.38));
  box-shadow: 0 0 14px rgba(99,182,241,.14);
}
body.theme-light .ts-seg { background: #F8FAFC; border-color: #C5D0DF; }
body.theme-light .ts-seg button, body.theme-light .ts-reiter button { color: #44576D; }
body.theme-light .ts-seg button:hover, body.theme-light .ts-reiter button:hover { color: #152134; }
body.theme-light .ts-seg button.active, body.theme-light .ts-seg button.on,
body.theme-light .ts-reiter button.active, body.theme-light .ts-reiter button.on {
  border-color: #8FB4D0; color: #152134; background: #DDEAF5; box-shadow: none;
}

/* ------------------------------------------------------------ Plaketten */
.ts-tag {
  padding: 5px 10px; border: 1px solid #34566A; border-radius: 999px; color: #AFE1F5;
  font-size: 11px; line-height: 1.2; display: inline-flex; align-items: center; gap: 7px;
  white-space: nowrap; letter-spacing: 0;
}
.ts-tag.gruen { border-color: #3E665E; color: #91D4B8; background: rgba(79,158,128,.08); }
.ts-tag.rot   { border-color: #6F3C48; color: #EC929B; background: rgba(160,50,64,.09); }
.ts-tag.gelb  { border-color: #6B5536; color: #E9C08F; background: rgba(190,140,70,.08); }
.ts-tag.grau  { border-color: #34475D; color: #A9B6C8; background: transparent; }
.ts-tag i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }
body.theme-light .ts-tag { border-color: #9DBFD8; color: #255F86; }
body.theme-light .ts-tag.gruen { border-color: #9CCDB7; color: #2B7355; background: rgba(43,115,85,.07); }
body.theme-light .ts-tag.rot { border-color: #E3A9AE; color: #B5343E; background: rgba(194,58,69,.06); }
body.theme-light .ts-tag.gelb { border-color: #DCC197; color: #8A5E1E; background: rgba(138,94,30,.06); }
body.theme-light .ts-tag.grau { border-color: #C5D0DF; color: #44576D; }

/* ------------------------------------------------------------- Schalter */
.ts-toggle {
  width: 36px; height: 21px; background: #1C2836; border: 1px solid #465466; border-radius: 20px;
  display: inline-flex; align-items: center; justify-content: flex-start; padding: 3px;
  vertical-align: middle; transition: all .2s; cursor: pointer; flex: none; box-sizing: border-box;
}
.ts-toggle .knob {
  width: 13px; height: 13px; border-radius: 50%; background: #9BAABD; display: block;
  transition: all .2s; pointer-events: none;
}
.ts-toggle.on, .ts-toggle[aria-checked="true"] { background: #28526A; border-color: #75B5DD; justify-content: flex-end; }
.ts-toggle.on .knob, .ts-toggle[aria-checked="true"] .knob { background: #A7E2FF; }
body.theme-light .ts-toggle { background: #E3E9F0; border-color: #B4C1D1; }
body.theme-light .ts-toggle .knob { background: #7C8CA1; }
body.theme-light .ts-toggle.on, body.theme-light .ts-toggle[aria-checked="true"] { background: #BBD9EE; border-color: #5E9DC8; }
body.theme-light .ts-toggle.on .knob, body.theme-light .ts-toggle[aria-checked="true"] .knob { background: #2F6F96; }
/* Ankreuzfelder, die als Schalter gemeint sind */
input[type="checkbox"].ts-schalter {
  -webkit-appearance: none; appearance: none; width: 36px; height: 21px; margin: 0;
  background: #1C2836; border: 1px solid #465466; border-radius: 20px; position: relative;
  cursor: pointer; vertical-align: middle; flex: none; transition: all .2s;
}
input[type="checkbox"].ts-schalter::after {
  content: ""; position: absolute; left: 3px; top: 3px; width: 13px; height: 13px;
  border-radius: 50%; background: #9BAABD; transition: all .2s;
}
input[type="checkbox"].ts-schalter:checked { background: #28526A; border-color: #75B5DD; }
input[type="checkbox"].ts-schalter:checked::after { left: 18px; background: #A7E2FF; }
input[type="checkbox"].ts-schalter:focus-visible { outline: 2px solid #9BD7FF; outline-offset: 2px; }
body.theme-light input[type="checkbox"].ts-schalter { background: #E3E9F0; border-color: #B4C1D1; }
body.theme-light input[type="checkbox"].ts-schalter::after { background: #7C8CA1; }
body.theme-light input[type="checkbox"].ts-schalter:checked { background: #BBD9EE; border-color: #5E9DC8; }
body.theme-light input[type="checkbox"].ts-schalter:checked::after { background: #2F6F96; }

/* ------------------------------------------------------- Felder */
.ts-feld, .ts-wahl {
  background: #090F18; border: 1px solid var(--ts-rand-feld); border-radius: 9px; padding: 12px;
  color: #E9EEF7; outline: none; width: 100%; font: inherit; font-size: 12px; box-sizing: border-box;
}
.ts-feld:focus, .ts-wahl:focus { border-color: #75B5DD; }
.ts-feld::placeholder { color: #6F7F95; }
.ts-feldname {
  font-size: 10px; letter-spacing: .09em; color: #8E9EB2; text-transform: uppercase;
  margin-bottom: 7px; display: block; font-weight: 500;
}
body.theme-light .ts-feld, body.theme-light .ts-wahl { background: #FFFFFF; border-color: #C5D0DF; color: #152134; }
body.theme-light .ts-feldname { color: #56677D; }

/* ------------------------------------------------- Karten, Kacheln, Zeilen */
.ts-karte {
  background: var(--ts-karte); border: 1px solid var(--ts-rand); box-shadow: var(--ts-glow);
  border-radius: var(--ts-radius);
}
.ts-soft {
  background: rgba(10,16,25,.64); border: 1px solid #273647; border-radius: 12px; padding: 18px;
}
.ts-feat { border: 1px solid #27394B; border-radius: 12px; padding: 18px; background: #0C1622; min-width: 0; }
.ts-feat .v { font-size: 23px; font-weight: 650; margin-top: 9px; letter-spacing: -.03em; color: var(--ts-text); }
.ts-caps {
  font-size: 10px; color: #8F9DAF; text-transform: uppercase; letter-spacing: .14em; font-weight: 650;
}
.ts-mini { font-size: 11px; color: #A4B1C1; }
.ts-helfer { color: var(--ts-muted); font-size: 12px; }
body.theme-light .ts-soft { background: #F7F9FC; border-color: #D5DDE8; }
body.theme-light .ts-feat { background: #F7F9FC; border-color: #D5DDE8; }
body.theme-light .ts-caps { color: #56677D; }
body.theme-light .ts-mini { color: #56677D; }

/* Fortschritt */
.ts-prog { height: 5px; border-radius: 30px; background: #192637; overflow: hidden; margin-top: 9px; }
.ts-prog > span, .ts-prog > i { display: block; height: 100%; border-radius: 30px;
  background: linear-gradient(90deg, #84C8DB, #A3DBFF); transition: width .3s; }
.ts-prog.gruen > span, .ts-prog.gruen > i { background: linear-gradient(90deg, #67AF9C, #99D5C7); }
.ts-prog.rot > span, .ts-prog.rot > i { background: linear-gradient(90deg, #AA5D70, #E58A93); }
.ts-prog.gelb > span, .ts-prog.gelb > i { background: linear-gradient(90deg, #B98F5E, #E9C08F); }
.ts-prog.grau > span, .ts-prog.grau > i { background: #4A5B70; }
body.theme-light .ts-prog { background: #DFE6EE; }

/* Regelzeile: Name links, Wert rechts, Balken, Anmerkung */
.ts-regel { padding: 13px 0; border-bottom: 1px solid #22303F; }
.ts-regel:last-child { border-bottom: 0; }
.ts-regel-zeile { display: flex; align-items: center; justify-content: space-between; gap: 14px; font-size: 13px; }
.ts-regel-zeile b { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
body.theme-light .ts-regel { border-bottom-color: #E1E8F0; }

/* Tabellen */
.ts-tab { width: 100%; border-collapse: collapse; }
.ts-tab th {
  text-align: left; text-transform: uppercase; font-size: 10px; letter-spacing: .13em; font-weight: 650;
  color: #7D8CA2; padding: 13px 15px; border-bottom: 1px solid #293744; white-space: nowrap;
}
.ts-tab td { padding: 15px; color: #DCE4ED; border-bottom: 1px solid #1D2B3B; font-size: 12px; }
.ts-tab tr:last-child td { border-bottom: 0; }
.ts-tab tbody tr:hover td { background: rgba(49,88,117,.12); }
body.theme-light .ts-tab th { color: #56677D; border-bottom-color: #D5DDE8; }
body.theme-light .ts-tab td { color: #33455A; border-bottom-color: #E6ECF3; }
body.theme-light .ts-tab tbody tr:hover td { background: rgba(47,111,150,.06); }

/* Codezeile mit Kopierknopf */
.ts-code {
  border: 1px solid #2E4255; background: #0A121B; border-radius: 9px; padding: 13px; color: #A8CBDA;
  font: 11px var(--ts-mono); display: flex; align-items: center; justify-content: space-between;
  gap: 15px; word-break: break-all; letter-spacing: 0;
}
.ts-code > span, .ts-code > code { min-width: 0; flex: 1; background: none; color: inherit; font: inherit; padding: 0; }
body.theme-light .ts-code { background: #F3F7FB; border-color: #C9D6E3; color: #26587A; }

.ts-plus { color: var(--ts-pos-text) !important; }
.ts-minus { color: var(--ts-neg-text) !important; }

/* =====================================================================
   TRADING SUITE · PREMIUM DARK — Dashboard (v5.260)

   Huelle (Seitenleiste, Kopfzeile, Seitenkopf, Kennzahlenreihe) und die
   Uebersetzung der vorhandenen Bausteine in die neue Formensprache.
   Die Karten selbst behalten ihre IDs und Aufrufe; hier steht nur, wie
   sie aussehen.
   ===================================================================== */
html { background: var(--ts-bg); }
body {
  margin: 0 !important; padding: 0 !important;
  background: var(--ts-bg) !important; color: var(--ts-text);
  font-size: 13px; letter-spacing: -.015em; -webkit-font-smoothing: antialiased;
}
body, body *:not(code):not(pre):not(kbd):not(samp):not(.ts-code):not(.ts-code *):not(.mono) {
  font-family: var(--ts-font) !important;
}
code, pre, kbd, samp, .mono { font-family: var(--ts-mono) !important; letter-spacing: 0; }
* { box-sizing: border-box; }

/* ------------------------------------------------------------- Huelle */
.ts-shell { display: grid; grid-template-columns: 238px minmax(0, 1fr); min-height: 100vh; align-items: start; }
.ts-side {
  position: sticky; top: var(--ts-oben, 0px); align-self: start; height: calc(100vh - var(--ts-oben, 0px));
  overflow-y: auto; overscroll-behavior: contain;
  background: linear-gradient(153deg, #081018 4%, #0C1421 68%, #0A111B);
  border-right: 1px solid #233044; display: flex; flex-direction: column; padding: 0;
  z-index: 96; scrollbar-width: none;
}
.ts-side::-webkit-scrollbar { display: none; }
.ts-brand { display: flex; align-items: center; padding: 27px 22px 44px; flex: none; text-decoration: none; }
.ts-brand img { width: 164px !important; height: auto !important; max-width: 100%; display: block; aspect-ratio: 7079/1566; }
.ts-side-gruppe { margin: 0 0 27px; flex: none; }
.ts-side-gruppe > b {
  display: block; font-size: 9px; color: #8996A9; letter-spacing: .2em; font-weight: 700;
  text-transform: uppercase; padding: 9px 24px 14px;
}
.ts-side .tabs {
  display: block !important; background: none !important; padding: 0 !important; margin: 0 !important;
  border: 0 !important; border-radius: 0 !important; position: static !important; box-shadow: none !important;
}
.ts-side .ts-grp, .ts-side .tabs .tab {
  border: 0 !important; background: transparent !important; background-image: none !important;
  color: #B6C1D0 !important; text-align: left; width: calc(100% - 30px) !important; margin: 0 15px 5px !important;
  padding: 12px 14px !important; display: flex !important; gap: 14px; align-items: center; justify-content: flex-start;
  border-radius: 10px !important; position: relative; transition: background .15s, color .15s; cursor: pointer;
  font-size: 13px !important; font-weight: 400 !important; line-height: 1.25; letter-spacing: -.015em;
  box-shadow: none !important; text-shadow: none !important; min-height: 0; flex: none; white-space: nowrap;
}
.ts-grp-ico { width: 16px; height: 16px; display: inline-flex; justify-content: center; align-items: center; color: #96A5B8; flex: none; }
.ts-grp-ico svg { width: 16px; height: 16px; display: block; }
.ts-side .ts-grp:hover, .ts-side .tabs .tab:hover { background: #172333 !important; color: #FFFFFF !important; }
.ts-side .ts-grp[aria-current="true"], .ts-side .tabs .tab[aria-current="true"] {
  color: #F7FBFF !important;
  background: linear-gradient(100deg, #1A3145 0%, #152536 55%, #172333 100%) !important;
  box-shadow: inset 1px 0 0 #A2DDFF, inset 0 0 0 1px rgba(125,170,205,.20), inset 0 0 15px rgba(65,152,219,.08) !important;
  font-weight: 650 !important;
}
.ts-side .ts-grp[aria-current="true"] .ts-grp-ico,
.ts-side .tabs .tab[aria-current="true"] .ts-grp-ico { color: var(--ts-blue); }
/* In welchem Workspace die gewaehlte Seite liegt: ein kleiner Punkt, keine
   zweite Markierung - der Entwurf hebt immer genau einen Eintrag hervor. */
.ts-side .tabs .tab.active:not([aria-current="true"]) { color: #E6EEF7 !important; }
.ts-side .tabs .tab.active:not([aria-current="true"])::after {
  content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--ts-blue);
  margin-left: auto; opacity: .85;
}
.ts-side-luecke { flex: 1 1 auto; min-height: 8px; }
.ts-side-alt { display: none !important; }
.ts-side-notiz {
  margin: 0 17px 22px; background: linear-gradient(145deg, #152438 0%, #101A28 55%, #0F1721);
  border: 1px solid #304051; border-radius: 12px; padding: 16px 15px 15px; position: relative;
  overflow: hidden; flex: none; text-decoration: none; display: block;
}
.ts-side-notiz::before {
  content: ""; position: absolute; width: 220px; height: 95px;
  background: linear-gradient(150deg, transparent, #457DA4 50%, transparent 52%);
  transform: rotate(-18deg); opacity: .25; right: -85px; top: -45px; pointer-events: none;
}
.ts-side-notiz::after {
  content: ""; position: absolute; width: 94%; height: 51px; right: 0; top: -12px; pointer-events: none;
  background: linear-gradient(120deg, transparent 0%, rgba(127,174,202,.22) 38%, rgba(67,108,138,.32) 58%, transparent 100%);
  clip-path: polygon(0 95%, 14% 76%, 30% 83%, 46% 41%, 51% 58%, 66% 6%, 79% 50%, 89% 41%, 100% 88%, 100% 100%, 0 100%);
}
.ts-side-notiz b { display: block; font-size: 12px; margin-bottom: 5px; color: var(--ts-text); position: relative; z-index: 1; font-weight: 700; }
.ts-side-notiz span, .ts-side-notiz small { font-size: 11px; color: #A6B2C2; position: relative; z-index: 1; display: block; }
.ts-side-notiz a { color: var(--ts-blue); text-decoration: none; }
/* v5.261: "14 Tage verbleibend · Plan waehlen" ist EIN Satz, nicht drei Zeilen */
.ts-side-notiz span span { display: inline; }
.ts-side-notiz u { color: var(--ts-blue); text-decoration: none; }

.ts-main {
  min-width: 0; position: relative; min-height: 100vh; padding: 0;
  background:
    radial-gradient(ellipse 70% 55% at 51% -31%, rgba(32,76,109,.27), transparent 75%) no-repeat 0 0 / 100% 900px,
    linear-gradient(175deg, #080E16, #070B11 56%) no-repeat 0 0 / 100% 900px,
    var(--ts-bg);
}
.ts-main::before {
  content: ""; position: absolute; pointer-events: none; left: 17%; top: -435px; width: 1050px; height: 520px;
  border-radius: 0 0 68% 58%; border-bottom: 2px solid rgba(114,192,246,.24); transform: rotate(-17deg);
  box-shadow: 0 18px 65px rgba(54,112,155,.24); z-index: 0;
}
.ts-main::after {
  content: ""; position: absolute; pointer-events: none; left: 23%; top: -358px; width: 680px; height: 410px;
  transform: rotate(-20deg); background: linear-gradient(168deg, transparent 70%, rgba(63,132,183,.13) 82%, transparent 94%);
  filter: blur(6px); z-index: 0;
}
.ts-main-fenster { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }

/* ------------------------------------------------------------ Kopfzeile */
.ts-main .header {
  position: sticky !important; top: var(--ts-oben, 0px); z-index: 95; height: 61px; min-height: 61px; margin: 0 !important;
  border: 0 !important; border-bottom: 1px solid #1D2A39 !important; border-radius: 0 !important;
  display: flex !important; align-items: center; padding: 0 32px !important; gap: 14px;
  background: rgba(7,12,19,.78) !important; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: none !important; overflow: visible !important; flex-wrap: nowrap !important;
}
.ts-krumen { font-size: 12px; color: #AAB7C8; display: flex; gap: 12px; align-items: center; white-space: nowrap; min-width: 0; }
.ts-krumen i { font-style: normal; color: #58697A; }
.ts-krumen b { color: #EEF5FF; font-weight: 650; overflow: hidden; text-overflow: ellipsis; }
.ts-top-rechts { margin-left: auto; display: flex; align-items: center; gap: 13px; min-width: 0; }
.ts-select, .ts-main .header #konten-knopf, .ts-main .header #badge-mt5 {
  border: 1px solid #2B3A4B !important; border-radius: 10px !important; color: #EDF3FA !important;
  background: linear-gradient(180deg, #111B29, #0B131E) !important; min-height: 37px; height: 37px; padding: 0 14px !important;
  white-space: nowrap; min-width: 176px; display: inline-flex !important; align-items: center;
  justify-content: space-between; gap: 24px; font-size: 13px !important; font-weight: 400 !important;
  letter-spacing: -.015em; cursor: pointer; box-shadow: none !important; text-transform: none !important;
  margin: 0 !important; line-height: 1;
}
.ts-select:hover, .ts-main .header #konten-knopf:hover, .ts-main .header #badge-mt5:hover { border-color: #3D5269 !important; }
.ts-select-pfeil { color: #9CABBC; display: inline-flex; }
.ts-select-pfeil svg { width: 10px; height: 10px; }
.ts-select-strat { position: relative; padding: 0 !important; }
.ts-select-strat select {
  -webkit-appearance: none; appearance: none; background: transparent !important; border: 0 !important;
  color: inherit !important; font: inherit !important; height: 35px; padding: 0 38px 0 14px !important; width: 100%;
  min-width: 174px; max-width: 240px; cursor: pointer; outline: none; border-radius: 10px !important; margin: 0 !important;
  text-overflow: ellipsis;
}
.ts-select-strat select option { background: #101724; color: #EDF3FA; }
.ts-select-strat .ts-select-pfeil { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.ts-main .header #konten-wahl { display: none; }
.ts-main .header #konten-wahl[style*="inline-block"] { display: inline-flex !important; }
/* Sobald die Kontenwahl steht, zeigt sie das Konto - die einfache Plakette
   daneben waere dieselbe Angabe ein zweites Mal. */
.ts-main .header #konten-wahl[style*="inline-block"] ~ #badge-mt5 { display: none !important; }
.ts-main .header #badge-symbol, .ts-main .header #badge-worker { display: none !important; }
.ts-top-sep { width: 1px; height: 22px; background: #2D3A48; margin: 0 3px; flex: none; }
.ts-iconbtn, .ts-main .header #theme-toggle {
  border: 1px solid #2B3A4B !important; border-radius: 10px !important; color: #EDF3FA !important;
  background: linear-gradient(180deg, #111B29, #0B131E) !important; min-width: 36px; width: 36px !important; height: 37px !important;
  display: inline-flex !important; align-items: center; justify-content: center; padding: 0 !important; cursor: pointer;
  position: relative; flex: none; box-shadow: none !important; margin: 0 !important;
}
.ts-iconbtn:hover, .ts-main .header #theme-toggle:hover { border-color: #3D5269 !important; }
.ts-iconbtn svg, .ts-main .header #theme-toggle svg { width: 16px; height: 16px; }
.ts-glocke-punkt {
  position: absolute; right: 8px; top: 8px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--ts-blue); box-shadow: 0 0 0 2px #0E1622;
}
.ts-avatar {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; border: 0;
  background: linear-gradient(140deg, #274766, #18334C); color: #C4ECFF; font-weight: 700; font-size: 13px;
  cursor: pointer; flex: none; padding: 0; text-transform: uppercase;
}
.ts-avatar:hover { filter: brightness(1.15); }
.header-burger { display: none !important; }

/* Aufklappflaechen: Nutzermenue, Benachrichtigungen, Filter, Kontenwahl */
.ts-klappe, #konten-menu {
  position: fixed; z-index: 99990; min-width: 260px; max-width: min(360px, calc(100vw - 24px));
  background: #101724 !important; border: 1px solid #2B3A4B !important; border-radius: 12px !important;
  padding: 7px !important; box-shadow: 0 30px 80px -20px rgba(0,0,0,.75), 0 0 0 1px rgba(131,178,206,.04) !important;
  display: none; text-align: left; max-height: calc(100vh - 90px); overflow-y: auto;
}
.ts-klappe.offen { display: block; }
/* v5.261: Das Nutzermenue traegt noch die Klassen des alten Handy-Menues
   (mobile-menu) - und damit dessen Regeln: bildschirmhoch, mit einer
   eingerueckten Flaeche darin. Es stand als hoher Kasten mit einem dunklen
   Streifen links unter dem Kuerzel. Hier wird es zur Aufklappflaeche wie
   die anderen auch. */
.ts-klappe.mobile-menu {
  inset: auto; height: auto; animation: none; -webkit-backdrop-filter: none; backdrop-filter: none;
}
.ts-klappe .mobile-menu-panel {
  position: static; width: auto; max-width: none; height: auto; background: transparent !important; border: 0 !important;
  box-shadow: none !important; animation: none; padding: 0; overflow: visible;
}
.ts-klappe .ts-lang-btn .ts-lang-code { display: inline !important; }
.ts-klappe-kopf { padding: 10px 12px 11px; border-bottom: 1px solid #1D2A39; margin: 0 0 6px; }
.ts-klappe-kopf b { display: block; font-size: 13px; font-weight: 650; color: var(--ts-text); overflow: hidden; text-overflow: ellipsis; }
.ts-klappe-kopf span { font-size: 11px; color: var(--ts-muted); }
.ts-klappe-punkt, #konten-menu > div[role="menuitem"] {
  display: flex !important; align-items: center; gap: 11px; width: 100%; padding: 9px 12px !important;
  border: 0; background: transparent; color: #DCE4ED; font: inherit; font-size: 13px; text-align: left;
  border-radius: 8px !important; cursor: pointer; text-decoration: none; letter-spacing: -.015em;
}
.ts-klappe-punkt:hover, #konten-menu > div[role="menuitem"]:hover { background: #172333 !important; color: #FFFFFF; }
.ts-klappe-punkt svg { width: 15px; height: 15px; color: #96A5B8; flex: none; }
.ts-klappe-punkt.rot { color: var(--ts-neg-text); }
.ts-klappe-punkt.rot svg { color: var(--ts-neg-text); }
.ts-klappe-trenner { height: 1px; background: #1D2A39; margin: 6px 4px; }
.ts-klappe-sprache { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 12px; font-size: 13px; color: #DCE4ED; }
.ts-klappe .ts-lang-switch { display: inline-flex; gap: 2px; border: 1px solid #2A394B; border-radius: 8px; padding: 3px; background: rgba(10,17,26,.75); }
.ts-klappe .ts-lang-btn {
  border: 1px solid transparent !important; background: transparent !important; color: #AEB9CB !important; font: inherit;
  font-size: 11px !important; font-weight: 650 !important; padding: 4px 9px !important; border-radius: 6px !important; cursor: pointer;
}
.ts-klappe .ts-lang-btn.active { border-color: #7D9CBA !important; color: #FFFFFF !important; background: linear-gradient(130deg, rgba(89,142,188,.28), rgba(41,61,81,.38)) !important; }
.ts-klappe .ts-lang-flag { display: none !important; }
.ts-meldung { padding: 10px 12px; border-bottom: 1px solid #1D2A39; display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; color: #DCE4ED; }
.ts-meldung:last-child { border-bottom: 0; }
.ts-meldung time { margin-left: auto; font-size: 11px; color: #A4B1C1; white-space: nowrap; flex: none; padding-left: 10px; }
.ts-meldung small { display: block; color: var(--ts-muted); font-size: 11px; margin-top: 2px; }
.ts-meldung-leer { padding: 22px 12px; text-align: center; color: var(--ts-muted); font-size: 12px; }

/* --------------------------------------------- Seite: Kopf und Kennzahlen */
/* KEIN z-index: sonst wird .ts-screen zum Stapelkontext, und alles darin -
   auch jeder Dialog mit z-index 9000 - liegt unter Seitenleiste (96) und
   Kopfzeile (95). Ein breiter Dialog verschwand halb hinter der Leiste. */
.ts-screen { position: relative; padding: 26px 31px 38px; }
.ts-seitenkopf { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 0 0 26px; flex-wrap: wrap; }
.ts-seitenkopf-text { min-width: 0; }
.ts-seitenkopf h2, #ts-titel {
  font-size: 32px !important; font-weight: 690 !important; line-height: 1.08 !important; letter-spacing: -.055em !important;
  margin: 0 0 8px !important; color: var(--ts-text) !important; background: none !important;
  -webkit-text-fill-color: currentColor !important;
}
.ts-seitenkopf p, #ts-unter { font-size: 14px !important; color: #AEBCCC !important; letter-spacing: -.01em; margin: 0 !important; }
.ts-seitenkopf-aktionen { display: flex; gap: 11px; align-items: center; flex-wrap: wrap; margin-left: auto; }
.ts-live { display: inline-flex; align-items: center; gap: 9px; color: #94DAB8; font-size: 12px; font-weight: 650; letter-spacing: .02em; }
.ts-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #78CBAC; box-shadow: 0 0 13px rgba(126,206,172,.38); }
.ts-live.aus { color: var(--ts-muted); }
.ts-live.aus::before { background: #5F6E82; box-shadow: none; }

.ts-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 0; }
.ts-kpis:empty { display: none; }
.ts-kpi {
  min-height: 122px; padding: 19px 26px; position: relative; overflow: hidden; min-width: 0;
  background: var(--ts-karte); border: 1px solid var(--ts-rand); box-shadow: var(--ts-glow); border-radius: 14px;
}
.ts-kpi::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 92% -42%, rgba(94,153,210,.09), transparent 52%); }
.ts-kpi-label { display: flex; align-items: center; gap: 13px; color: #C3CCDC; font-size: 13px; white-space: nowrap; }
.ts-kpi-label svg { width: 17px; height: 17px; color: #BAC9DA; flex: none; }
.ts-kpi-wert {
  font-size: 31px; font-weight: 690; letter-spacing: -.052em; margin: 18px 0 0; line-height: 1.12;
  font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ts-text);
}
.ts-kpi-wert.plus { color: var(--ts-green); }
.ts-kpi-wert.minus { color: var(--ts-neg); }
.ts-kpi-notiz { color: #91A3B6; font-size: 11px; margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Hinweisleisten zwischen Kopf und Inhalt */
.ts-screen #risk-banner, .ts-screen #bot-protection-banner, .ts-screen #slot-banner {
  border-radius: 12px !important; padding: 12px 18px !important; font-size: 13px !important; font-weight: 600 !important;
  margin: 0 0 18px !important; animation: none !important; box-shadow: none !important;
}
.ts-screen #risk-banner { background: rgba(160,50,64,.14) !important; color: #F4A7AD !important; border: 1px solid #6F3C48 !important; }
.ts-screen #bot-protection-banner { background: rgba(26,52,73,.6) !important; color: #CFECFF !important; border: 1px solid #5F8FB0 !important; }
.ts-screen #slot-banner { background: rgba(190,140,70,.10) !important; color: #E9C08F !important; border: 1px solid #6B5536 !important; }

/* ------------------------------------------------- Ansichten und Raster */
.ts-screen .view { margin: 0; padding: 0; }
.ts-screen .view.active { display: flex !important; flex-direction: column; gap: 23px; margin-top: 23px !important; }
.ts-main[data-kpi="0"] .ts-screen .view.active { margin-top: 0 !important; }
.cardsec {
  background: transparent !important; border: 0 !important; border-radius: 0 !important; padding: 0 !important; margin: 0 !important;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 23px 18px; align-items: stretch; min-width: 0;
}
/* Karten einer Zeile sind gleich hoch, wie im Entwurf. Eine eingeklappte
   Karte bleibt so hoch wie ihr Titel. */
.cardsec > .card.collapsed { align-self: start; }
.cardsec-h { display: none !important; }
.cardsec > .card { margin: 0 !important; min-width: 0; }
.cardsec > .card[data-breit], .cardsec > :not(.card) { grid-column: 1 / -1; }
.ts-main[data-raster="1"] .cardsec { grid-template-columns: minmax(0, 1fr); }

/* Gruppen: was nicht dazugehoert, verschwindet */
.ts-main[data-gruppe="home"] [data-g]:not([data-g~="home"]),
.ts-main[data-gruppe="overview"] [data-g]:not([data-g~="overview"]),
.ts-main[data-gruppe="trading"] [data-g]:not([data-g~="trading"]),
.ts-main[data-gruppe="automation"] [data-g]:not([data-g~="automation"]),
.ts-main[data-gruppe="risk"] [data-g]:not([data-g~="risk"]),
.ts-main[data-gruppe="connect"] [data-g]:not([data-g~="connect"]),
.ts-main[data-gruppe="analytics"] [data-g]:not([data-g~="analytics"]),
.ts-main[data-gruppe="journal"] [data-g]:not([data-g~="journal"]),
.ts-main[data-gruppe="settings"] [data-g]:not([data-g~="settings"]) { display: none !important; }
/* Die Kontokarte ist nur noch Datenquelle der Kennzahlenreihe */
[data-g~="quelle"] { display: none !important; }

/* Reihenfolge und Spalten je Seite, wie im Entwurf */
.ts-main[data-gruppe="trading"] .view.active > .cardsec-back { order: 1; }
.ts-main[data-gruppe="trading"] .view.active > .cardsec-live { order: 2; }
.ts-main[data-gruppe="analytics"] .view.active > .cardsec-back { order: 1; }
.ts-main[data-gruppe="analytics"] .view.active > .cardsec-setup { order: 2; }
.ts-main[data-gruppe="home"] #view-bot .cardsec-live { grid-template-columns: minmax(0, 58fr) minmax(0, 42fr); }

/* ---------------------------------------------------------------- Karten */
.ts-main .card, .ts-main #chart-container {
  background: var(--ts-karte) !important; border: 1px solid var(--ts-rand) !important; box-shadow: var(--ts-glow) !important;
  border-radius: 14px !important; padding: 22px 25px !important; color: var(--ts-text); position: relative;
  text-align: left !important; min-width: 0; backdrop-filter: none !important;
}
.ts-main .card::before, .ts-main .card::after { display: none !important; }
.ts-main .card h2, .ts-main .card-title-row h2, .ts-main .card h3.ts-h2 {
  margin: 0 !important; font-size: 17px !important; letter-spacing: -.035em !important; font-weight: 650 !important;
  color: var(--ts-text) !important; background: none !important; -webkit-text-fill-color: currentColor !important;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; line-height: 1.25; text-transform: none !important;
  text-shadow: none !important; padding: 0 !important; border: 0 !important; cursor: default;
}
.ts-main .card > h2 { margin-bottom: 12px !important; }
.ts-main .card-title-row {
  display: flex !important; align-items: center !important; justify-content: space-between !important; gap: 15px !important;
  margin: 0 0 12px !important; flex-wrap: wrap; row-gap: 10px; cursor: default; padding: 0 !important; border: 0 !important;
}
.ts-main .card-title-row > * { min-width: 0; }
.ts-main .card-title-row > div { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ts-main .card p { color: var(--ts-muted); }
.ts-main .card .ts-helfer, .ts-main .card > p:first-of-type { color: var(--ts-muted) !important; font-size: 12px !important; margin: 5px 0 18px !important; line-height: 1.55 !important; }
.ts-main .card hr { border: 0 !important; border-top: 1px solid #263444 !important; margin: 15px 0 !important; }
.ts-main .card.collapsed > *:not(h2):not(.card-title-row) { display: none !important; }

/* Kleine Kacheln und ihre Beschriftung */
.ts-main .small-label, .ts-main .ts-caps {
  font-size: 10px !important; color: #8F9DAF !important; text-transform: uppercase !important; letter-spacing: .14em !important;
  font-weight: 650 !important; margin: 0 !important; line-height: 1.4;
}
.ts-main .big-num {
  font-size: 23px !important; font-weight: 650 !important; letter-spacing: -.03em !important; margin-top: 9px !important;
  font-variant-numeric: tabular-nums; line-height: 1.2; text-align: left !important;
}
/* Zahlen stehen in der Schrift des Entwurfs - die Altgestaltung setzte sie in
   einer Festbreitenschrift. Festbreite bleibt Adressen, Token und Code. */
.ts-main .big-num, .ts-main .stat-val, .ts-main .mono:not(pre):not(code), .ts-main td, .ts-main th,
.ts-main input, .ts-main select, .ts-main textarea, .ts-main button, .modal input, .modal select, .modal button, .modal td {
  font-family: var(--ts-font) !important; font-variant-numeric: tabular-nums;
}
.ts-main pre, .ts-main code, .ts-main kbd, .ts-main samp, .ts-main .ts-code, .ts-main .ts-code *,
.ts-main #webhook-url, .ts-main [id*="webhook"][readonly], .ts-main #slog-url, .modal pre, .modal code {
  font-family: var(--ts-mono) !important;
}
.ts-main .ts-feat { text-align: left !important; }
.ts-main .ts-feat .big-num { color: var(--ts-text); }
.ts-feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.ts-feats.drei { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Knoepfe der Altgestaltung */
.ts-main .btn-sm, .ts-kopf-btn, .modal .btn-sm, .modal-bg .btn-sm {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: #121E2E !important; background-image: none !important; border: 1px solid #34475D !important;
  border-radius: 9px !important; color: #DBE8F6 !important; padding: 8px 13px !important; font-size: 13px !important;
  font-weight: 400 !important; line-height: 1.25 !important; letter-spacing: -.015em; cursor: pointer; white-space: nowrap;
  box-shadow: none !important; text-shadow: none !important; text-transform: none !important; min-height: 0 !important;
  height: auto !important; width: auto; text-decoration: none !important; transform: none !important; margin: 0;
}
.ts-main .btn-sm:hover, .ts-kopf-btn:hover, .modal .btn-sm:hover, .modal-bg .btn-sm:hover { border-color: #5F8FB0 !important; color: #FFFFFF !important; }
.ts-main .btn-sm[data-ts-icon] { padding: 8px 9px !important; }
.ts-main .btn-sm svg, .ts-kopf-btn svg { width: 14px; height: 14px; flex: none; }
.ts-main .btn-sm.btn-edit, .ts-kopf-btn.primaer, .ts-main .btn-sm.primaer {
  border-color: #5F8FB0 !important; background: #1A3449 !important; color: #CFECFF !important;
}
.ts-main .btn-sm.btn-edit:hover, .ts-kopf-btn.primaer:hover { background: #20405A !important; border-color: #7DB6DC !important; }
.ts-main .btn-sm.btn-close, .ts-main .btn-sm.btn-danger, .modal .btn-sm.btn-danger {
  border-color: #6F3C48 !important; color: #EC929B !important; background: rgba(160,50,64,.09) !important;
}
.ts-main .btn-sm.btn-close:hover, .ts-main .btn-sm.btn-danger:hover { border-color: #A85563 !important; color: #FFC3C8 !important; }
.ts-main .btn-sm:disabled, .ts-main button:disabled { opacity: .45; cursor: not-allowed; }
/* Flaechen, die im style-Attribut den Akzentton tragen, brauchen dunkle Schrift */
.ts-main [style*="background:#9BD7FF"], .ts-main [style*="background: #9BD7FF"],
.ts-main [style*="background:#9bd7ff"], .modal [style*="background:#9BD7FF"], .modal-bg [style*="background:#9BD7FF"],
.ts-main [style*="background:#80C9AB"], .ts-main [style*="background: #80C9AB"], .ts-main [style*="background:#80c9ab"],
.ts-main [style*="background:#e4b587"], .ts-main [style*="background:#E4B587"] { color: #06121C !important; }

/* Reiter und Zeitraumknoepfe innerhalb der Karten */
.ts-main .curve-tabs { display: inline-flex !important; align-items: center; gap: 5px !important; flex-wrap: wrap; }
.ts-main .card .curve-tab, .ts-main .card .tab-sm, .ts-main .card .stats-period-btn, .ts-main #mtchart-bar button:not(#mtc-gear):not(.ts-btn) {
  background: transparent !important; background-image: none !important; color: #AEB9CB !important;
  border: 1px solid transparent !important; border-radius: 7px !important; padding: 7px 13px !important;
  font-size: 11px !important; font-weight: 400 !important; cursor: pointer; box-shadow: none !important; line-height: 1.25 !important;
  min-height: 0 !important; height: auto !important; text-transform: none !important; letter-spacing: -.01em;
}
.ts-main .card .curve-tab:hover, .ts-main .card .stats-period-btn:hover, .ts-main #mtchart-bar button:not(#mtc-gear):hover { color: #FFFFFF !important; }
.ts-main .card .curve-tab.on, .ts-main .card .tab-sm.on, .ts-main .card .stats-period-btn.active,
.ts-main #mtchart-bar button.on:not(#mtc-gear), .ts-main .card button.on.curve-day {
  border-color: #7D9CBA !important; color: #FFFFFF !important;
  background: linear-gradient(130deg, rgba(89,142,188,.28), rgba(41,61,81,.38)) !important;
  box-shadow: 0 0 14px rgba(99,182,241,.14) !important;
}

/* Plaketten */
.ts-main .badge, .modal .badge {
  padding: 5px 10px !important; border: 1px solid #34566A !important; border-radius: 999px !important; color: #AFE1F5 !important;
  font-size: 11px !important; font-weight: 400 !important; line-height: 1.2 !important; display: inline-flex; align-items: center; gap: 7px;
  background: transparent !important; background-image: none !important; letter-spacing: 0 !important; text-transform: none; box-shadow: none !important;
  white-space: nowrap;
}
.ts-main .badge.badge-green, .modal .badge.badge-green { border-color: #3E665E !important; color: #91D4B8 !important; background: rgba(79,158,128,.08) !important; }
.ts-main .badge.badge-red, .modal .badge.badge-red { border-color: #6F3C48 !important; color: #EC929B !important; background: rgba(160,50,64,.09) !important; }
.ts-main .badge.badge-orange, .modal .badge.badge-orange { border-color: #6B5536 !important; color: #E9C08F !important; background: rgba(190,140,70,.08) !important; }

/* Felder */
.ts-main .card input[type="text"], .ts-main .card input[type="number"], .ts-main .card input[type="date"],
.ts-main .card input[type="time"], .ts-main .card input[type="email"], .ts-main .card input[type="password"],
.ts-main .card input[type="search"], .ts-main .card input:not([type]), .ts-main .card select, .ts-main .card textarea, .ts-main .card .input,
.modal input[type="text"], .modal input[type="number"], .modal input[type="date"], .modal input[type="time"],
.modal input[type="email"], .modal input[type="password"], .modal input:not([type]), .modal select, .modal textarea,
.modal-bg input[type="text"], .modal-bg input[type="number"], .modal-bg select, .modal-bg textarea {
  background: #090F18 !important; border: 1px solid #2D3C4C !important; border-radius: 9px !important; color: #E9EEF7 !important;
  outline: none; font-size: 12px !important; padding: 10px 12px !important; box-shadow: none !important; height: auto !important;
  min-height: 38px; line-height: 1.3 !important; letter-spacing: -.01em;
}
.ts-main .card select, .modal select, .modal-bg select { padding-right: 30px !important; }
.ts-main .card textarea, .modal textarea { min-height: 70px; }
.ts-main .card input:focus, .ts-main .card select:focus, .ts-main .card textarea:focus,
.modal input:focus, .modal select:focus, .modal textarea:focus { border-color: #75B5DD !important; }
.ts-main .card input::placeholder, .modal input::placeholder, .ts-main .card textarea::placeholder { color: #6F7F95 !important; }
.ts-main .card label, .modal label { color: #8E9EB2; font-size: 12px; letter-spacing: -.005em; }
.ts-main .card input[type="checkbox"], .modal input[type="checkbox"], .ts-main .card input[type="radio"], .modal input[type="radio"] { accent-color: #7ACDF2; }

/* Tabellen */
.ts-main .card table, .modal table { width: 100%; border-collapse: collapse !important; margin: 5px 0 0 !important; background: none !important; }
.ts-main .card table th, .modal table th {
  text-align: left; text-transform: uppercase !important; font-size: 10px !important; letter-spacing: .13em !important;
  font-weight: 650 !important; color: #7D8CA2 !important; padding: 13px 15px !important; border: 0 !important;
  border-bottom: 1px solid #293744 !important; background: none !important; white-space: nowrap; position: static;
}
.ts-main .card table td, .modal table td {
  padding: 15px !important; color: #DCE4ED; border: 0 !important; border-bottom: 1px solid #1D2B3B !important;
  font-size: 12px !important; background: none; font-variant-numeric: tabular-nums;
}
.ts-main .card table tr:last-child td, .modal table tr:last-child td { border-bottom: 0 !important; }
.ts-main .card table tbody tr:hover td { background: rgba(49,88,117,.12) !important; }
.ts-main .pos-buy, .ts-main .profit-pos { color: var(--ts-pos-text) !important; }
.ts-main .pos-sell, .ts-main .profit-neg { color: var(--ts-neg-text) !important; }

/* Balken der Altgestaltung */
.ts-main .card [style*="height:6px"][style*="overflow:hidden"], .ts-main .card [style*="height: 6px"][style*="overflow: hidden"] {
  height: 5px !important; border-radius: 30px !important; background: #192637 !important; margin-top: 9px;
}
.ts-main .card [style*="height:6px"][style*="overflow:hidden"] > div { border-radius: 30px !important; }

/* Kurschart als Karte */
.ts-main #chart-container { padding: 18px 20px 16px !important; overflow: hidden; margin: 0 !important; }
.ts-main #mtchart-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 0 2px 12px !important; background: none !important; border: 0 !important; }
.ts-main #mtchart-sym {
  background: transparent !important; border: 0 !important; color: var(--ts-text) !important; font-size: 17px !important;
  font-weight: 650 !important; letter-spacing: -.035em; padding: 0 22px 0 0 !important; margin-right: 6px; cursor: pointer; min-height: 0 !important;
}
.ts-main #mtchart-status { color: var(--ts-muted) !important; font-size: 11px !important; }
.ts-main #mtchart-ohlc { color: #A4B1C1 !important; font-size: 11px !important; font-variant-numeric: tabular-nums; }
.ts-main #mtchart { border-radius: 10px; overflow: hidden; }

/* Order-Karte */
.ts-main .trade-panel .big-btn, .ts-main .big-btn {
  border-radius: 9px !important; font-size: 13px !important; font-weight: 650 !important; letter-spacing: .02em !important;
  padding: 12px 14px !important; box-shadow: none !important; background-image: none !important; text-shadow: none !important;
  transform: none !important; cursor: pointer; transition: border-color .15s, background .15s;
}
.ts-main .btn-buy { background: rgba(79,158,128,.10) !important; border: 1px solid #3E665E !important; color: #91D4B8 !important; }
.ts-main .btn-buy:hover { background: rgba(79,158,128,.18) !important; border-color: #5E9A8C !important; }
.ts-main .btn-sell { background: rgba(160,50,64,.10) !important; border: 1px solid #6F3C48 !important; color: #EC929B !important; }
.ts-main .btn-sell:hover { background: rgba(160,50,64,.18) !important; border-color: #A85563 !important; }
.ts-main .spread-info { background: #0C1622 !important; border: 1px solid #27394B !important; border-radius: 9px !important; color: #A4B1C1 !important; font-size: 12px !important; }
.ts-main .spread-info b { color: var(--ts-text); font-variant-numeric: tabular-nums; }

/* Dialoge */
.modal-bg, .modal-overlay { background: rgba(3,6,10,.72) !important; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.modal, .modal-content {
  background: #101724 !important; background-image: none !important; border: 1px solid #2B3A4B !important; border-radius: 16px !important;
  box-shadow: 0 30px 110px rgba(0,0,0,.6), 0 0 100px rgba(34,111,162,.085) !important; color: var(--ts-text);
}
.modal h3, .modal h2, .modal-content h3, .modal-content h2 {
  background: none !important; -webkit-text-fill-color: currentColor !important; color: var(--ts-text) !important;
  font-size: 19px !important; font-weight: 650 !important; letter-spacing: -.035em !important; text-shadow: none !important;
}
#toast {
  background: #172536 !important; border: 1px solid #3C5B72 !important; color: #DCEBF7 !important; border-radius: 9px !important;
  box-shadow: 0 15px 50px rgba(0,0,0,.55) !important; font-weight: 500 !important; font-size: 13px !important; padding: 12px 18px !important;
}
#toast.error { border-color: #6F3C48 !important; color: #F4A7AD !important; background: #2A161C !important; }

/* Demo-Leiste ganz oben */
#demo-banner-top {
  background: #131C2A !important; color: #E9C08F !important; border-bottom: 1px solid #3B3223 !important; box-shadow: none !important;
  font-weight: 500 !important; font-size: 12px !important; padding: 7px 16px !important; min-height: 36px;
}
#demo-banner-top a { background: #1A3449 !important; color: #CFECFF !important; border: 1px solid #5F8FB0; border-radius: 7px !important; padding: 4px 11px !important; font-weight: 500 !important; }
#demo-banner-top button { color: #A9B6C8 !important; border-color: #34475D !important; border-radius: 7px !important; }

/* ------------------------------------------------------------ Hellmodus */
body.theme-light .ts-side { background: #E6EDF5; border-right-color: #CDD7E3; }
body.theme-light .ts-side-gruppe > b { color: #56677D; }
/* v5.261: Die alte Reiterleiste (.tabs) bringt im hellen Thema einen eigenen Grund mit -
   in der Seitenleiste lag er als heller Streifen hinter den beiden Workspace-Eintraegen. */
body.theme-light .ts-side .tabs { background: none !important; border: 0 !important; box-shadow: none !important; }
body.theme-light .ts-side .ts-grp, body.theme-light .ts-side .tabs .tab { color: #33465C !important; }
body.theme-light .ts-grp-ico { color: #5F7189; }
body.theme-light .ts-side .ts-grp:hover, body.theme-light .ts-side .tabs .tab:hover { background: #DAE4EE !important; color: #152134 !important; }
body.theme-light .ts-side .ts-grp[aria-current="true"], body.theme-light .ts-side .tabs .tab[aria-current="true"] {
  background: #CDDFED !important; color: #152134 !important; box-shadow: inset 1px 0 0 #2F6F96, inset 0 0 0 1px rgba(47,111,150,.18) !important;
}
body.theme-light .ts-side .ts-grp[aria-current="true"] .ts-grp-ico,
body.theme-light .ts-side .tabs .tab[aria-current="true"] .ts-grp-ico { color: #255F86; }
body.theme-light .ts-side .tabs .tab.active:not([aria-current="true"]) { color: #152134 !important; }
body.theme-light .ts-side-notiz { background: #D7E4F0; border-color: #BFD0E0; }
body.theme-light .ts-side-notiz b { color: #152134; }
body.theme-light .ts-side-notiz span, body.theme-light .ts-side-notiz small { color: #44576D; }
body.theme-light .ts-main { background: #EFF3F8; }
body.theme-light .ts-main::before, body.theme-light .ts-main::after { display: none; }
body.theme-light .ts-main .header { background: rgba(239,243,248,.86) !important; border-bottom-color: #D5DDE8 !important; }
body.theme-light .ts-krumen { color: #56677D; }
body.theme-light .ts-krumen i { color: #9AA8B9; }
body.theme-light .ts-krumen b { color: #24324B; }
body.theme-light .ts-select, body.theme-light .ts-main .header #konten-knopf, body.theme-light .ts-main .header #badge-mt5,
body.theme-light .ts-iconbtn, body.theme-light .ts-main .header #theme-toggle {
  background: #F8FAFC !important; color: #26354A !important; border-color: #C5D0DF !important;
}
body.theme-light .ts-select-pfeil { color: #6B7C92; }
body.theme-light .ts-select-strat select option { background: #FFFFFF; color: #152134; }
body.theme-light .ts-top-sep { background: #C5D0DF; }
body.theme-light .ts-avatar { background: linear-gradient(140deg, #C8DDED, #A9C8DF); color: #1D4F72; }
body.theme-light .ts-glocke-punkt { box-shadow: 0 0 0 2px #F8FAFC; }
body.theme-light .ts-klappe, body.theme-light #konten-menu { background: #FFFFFF !important; border-color: #C5D0DF !important; box-shadow: 0 24px 60px -20px rgba(21,33,52,.28) !important; }
body.theme-light .ts-klappe-kopf, body.theme-light .ts-meldung { border-bottom-color: #E1E8F0; }
body.theme-light .ts-klappe-trenner { background: #E1E8F0; }
body.theme-light .ts-klappe-punkt, body.theme-light #konten-menu > div[role="menuitem"], body.theme-light .ts-klappe-sprache, body.theme-light .ts-meldung { color: #33455A; }
body.theme-light .ts-klappe-punkt:hover, body.theme-light #konten-menu > div[role="menuitem"]:hover { background: #EDF2F7 !important; color: #152134; }
body.theme-light .ts-klappe-punkt svg { color: #6B7C92; }
body.theme-light .ts-klappe .ts-lang-switch { background: #F8FAFC; border-color: #C5D0DF; }
body.theme-light .ts-klappe .ts-lang-btn { color: #44576D !important; }
body.theme-light .ts-klappe .ts-lang-btn.active { background: #DDEAF5 !important; border-color: #8FB4D0 !important; color: #152134 !important; }
body.theme-light .ts-meldung time { color: #56677D; }
body.theme-light .ts-seitenkopf p, body.theme-light #ts-unter { color: #617184 !important; }
body.theme-light .ts-live { color: #2B7355; }
body.theme-light .ts-live::before { background: #2B7355; box-shadow: none; }
body.theme-light .ts-kpi-label { color: #33455A; }
body.theme-light .ts-kpi-label svg { color: #5F7189; }
body.theme-light .ts-kpi-notiz { color: #56677D; }
body.theme-light .ts-kpi::after { display: none; }
/* Die Altgestaltung setzte Kartentitel im Hellmodus als Verlaufsschrift
   (color: transparent !important). Ohne den Verlauf waeren sie unsichtbar. */
body.theme-light .ts-main .card h2, body.theme-light .ts-main .card-title-row h2, body.theme-light .ts-main .card h3.ts-h2,
body.theme-light .ts-seitenkopf h2, body.theme-light #ts-titel {
  color: var(--ts-text) !important; -webkit-text-fill-color: currentColor !important; background: none !important;
}
body.theme-light .ts-main .small-label, body.theme-light .ts-main .ts-caps { color: #56677D !important; }
body.theme-light .ts-main .btn-sm, body.theme-light .ts-kopf-btn, body.theme-light .modal .btn-sm, body.theme-light .modal-bg .btn-sm {
  background: #F8FAFC !important; color: #26354A !important; border-color: #C5D0DF !important;
}
body.theme-light .ts-main .btn-sm:hover, body.theme-light .ts-kopf-btn:hover { border-color: #2F6F96 !important; color: #152134 !important; }
body.theme-light .ts-main .btn-sm.btn-edit, body.theme-light .ts-kopf-btn.primaer { background: #E3EEF7 !important; border-color: #9DBFD8 !important; color: #1D4F72 !important; }
body.theme-light .ts-main .btn-sm.btn-close, body.theme-light .ts-main .btn-sm.btn-danger { background: rgba(194,58,69,.06) !important; border-color: #E3A9AE !important; color: #B5343E !important; }
body.theme-light .ts-main .card .curve-tab, body.theme-light .ts-main .card .tab-sm, body.theme-light .ts-main .card .stats-period-btn,
body.theme-light .ts-main #mtchart-bar button:not(#mtc-gear):not(.ts-btn) { color: #44576D !important; }
body.theme-light .ts-main .card .curve-tab.on, body.theme-light .ts-main .card .tab-sm.on, body.theme-light .ts-main .card .stats-period-btn.active,
body.theme-light .ts-main #mtchart-bar button.on:not(#mtc-gear), body.theme-light .ts-main .card button.on.curve-day {
  border-color: #8FB4D0 !important; color: #152134 !important; background: #DDEAF5 !important; box-shadow: none !important;
}
body.theme-light .ts-main .badge, body.theme-light .modal .badge { border-color: #9DBFD8 !important; color: #255F86 !important; }
body.theme-light .ts-main .badge.badge-green, body.theme-light .modal .badge.badge-green { border-color: #9CCDB7 !important; color: #2B7355 !important; background: rgba(43,115,85,.07) !important; }
body.theme-light .ts-main .badge.badge-red, body.theme-light .modal .badge.badge-red { border-color: #E3A9AE !important; color: #B5343E !important; background: rgba(194,58,69,.06) !important; }
body.theme-light .ts-main .badge.badge-orange, body.theme-light .modal .badge.badge-orange { border-color: #DCC197 !important; color: #8A5E1E !important; background: rgba(138,94,30,.06) !important; }
body.theme-light .ts-main .card input[type="text"], body.theme-light .ts-main .card input[type="number"], body.theme-light .ts-main .card input[type="date"],
body.theme-light .ts-main .card input[type="time"], body.theme-light .ts-main .card input[type="email"], body.theme-light .ts-main .card input[type="password"],
body.theme-light .ts-main .card input:not([type]), body.theme-light .ts-main .card select, body.theme-light .ts-main .card textarea, body.theme-light .ts-main .card .input,
body.theme-light .modal input[type="text"], body.theme-light .modal input[type="number"], body.theme-light .modal input[type="date"],
body.theme-light .modal input[type="email"], body.theme-light .modal input[type="password"], body.theme-light .modal input:not([type]),
body.theme-light .modal select, body.theme-light .modal textarea, body.theme-light .modal-bg input[type="text"], body.theme-light .modal-bg select {
  background: #FFFFFF !important; border-color: #C5D0DF !important; color: #152134 !important;
}
body.theme-light .ts-main .card label, body.theme-light .modal label { color: #56677D; }
body.theme-light .ts-main .card table th, body.theme-light .modal table th { color: #56677D !important; border-bottom-color: #D5DDE8 !important; }
body.theme-light .ts-main .card table td, body.theme-light .modal table td { color: #33455A; border-bottom-color: #E6ECF3 !important; }
body.theme-light .ts-main .card table tbody tr:hover td { background: rgba(47,111,150,.06) !important; }
body.theme-light .ts-main .card hr { border-top-color: #E1E8F0 !important; }
body.theme-light .ts-main .card [style*="height:6px"][style*="overflow:hidden"] { background: #DFE6EE !important; }
body.theme-light .ts-main .btn-buy { background: rgba(43,115,85,.08) !important; border-color: #9CCDB7 !important; color: #2B7355 !important; }
body.theme-light .ts-main .btn-sell { background: rgba(194,58,69,.07) !important; border-color: #E3A9AE !important; color: #B5343E !important; }
body.theme-light .ts-main .spread-info { background: #F7F9FC !important; border-color: #D5DDE8 !important; color: #56677D !important; }
body.theme-light .modal, body.theme-light .modal-content { background: #FFFFFF !important; border-color: #C5D0DF !important; box-shadow: 0 30px 80px -20px rgba(21,33,52,.35) !important; }
body.theme-light .modal-bg, body.theme-light .modal-overlay { background: rgba(21,33,52,.38) !important; }
body.theme-light #toast { background: #FFFFFF !important; border-color: #C5D0DF !important; color: #152134 !important; }
body.theme-light #demo-banner-top { background: #FBF4E8 !important; color: #8A5E1E !important; border-bottom-color: #E8D5B5 !important; }
body.theme-light #demo-banner-top a { background: #E3EEF7 !important; color: #1D4F72 !important; border-color: #9DBFD8; }
body.theme-light #demo-banner-top button { color: #44576D !important; border-color: #C5D0DF !important; }
body.theme-light .ts-screen #risk-banner { background: rgba(194,58,69,.07) !important; color: #B5343E !important; border-color: #E3A9AE !important; }
body.theme-light .ts-screen #bot-protection-banner { background: #E3EEF7 !important; color: #1D4F72 !important; border-color: #9DBFD8 !important; }
body.theme-light .ts-screen #slot-banner { background: rgba(138,94,30,.06) !important; color: #8A5E1E !important; border-color: #DCC197 !important; }

/* ------------------------------------------------------ Schmale Fenster */
@media (max-width: 1160px) {
  .ts-shell { grid-template-columns: 192px minmax(0, 1fr); }
  .ts-brand { padding: 24px 18px 34px; }
  .ts-brand img { width: 140px !important; }
  .ts-main .header { padding: 0 16px !important; }
  .ts-screen { padding: 22px 19px 30px; }
  .ts-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ts-select-strat { display: none !important; }
  .ts-seitenkopf h2, #ts-titel { font-size: 27px !important; }
  .cardsec, .ts-main[data-gruppe] .cardsec { grid-template-columns: minmax(0, 1fr) !important; }
}

/* Fusszeile */
.ts-fuss {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid #1B2735;
  margin-top: 34px; padding-top: 16px; font-size: 11px; color: #7E91A6;
}
body.theme-light .ts-fuss { border-top-color: #D5DDE8; color: #56677D; }
/* Halbe Karten: Tabellen etwas enger, damit alle Spalten Platz haben */
.ts-main[data-raster="2"] .cardsec > .card:not([data-breit]) table th,
.ts-main[data-raster="2"] .cardsec > .card:not([data-breit]) table td { padding-left: 9px !important; padding-right: 9px !important; }
.ts-main #upgrade-card, .ts-main #onboarding-card { margin-top: 23px; }

/* ------------------------------------------------- v5.263: Konto entfernen
   Der Knopf sitzt in jeder Zeile des Kontenmenues, ausser beim Server-MT5.
   Er ist immer sichtbar, aber leise - ein Zeichen, das erst beim Zeigen
   auftaucht, findet auf dem Handy niemand. */
#konten-menu .ts-konto-weg {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; margin: -3px -5px -3px 0; padding: 0;
  border: 0; border-radius: 7px; background: transparent; color: #7C8BA0; cursor: pointer;
  font: inherit; line-height: 1; -webkit-appearance: none; appearance: none;
}
#konten-menu .ts-konto-weg svg { width: 15px; height: 15px; flex: none; }
#konten-menu .ts-konto-weg:hover,
#konten-menu .ts-konto-weg:focus-visible { background: rgba(239,125,133,.14); color: var(--ts-neg-text); }
#konten-menu .ts-konto-weg:focus-visible { outline: 2px solid var(--ts-blue); outline-offset: 1px; }
#konten-menu .ts-konto-weg-platz { flex: none; width: 23px; }
body.theme-light #konten-menu .ts-konto-weg { color: #6B7C92; }
body.theme-light #konten-menu .ts-konto-weg:hover,
body.theme-light #konten-menu .ts-konto-weg:focus-visible { background: rgba(194,58,69,.09); color: #B5343E; }

/* Die Rueckfrage dazu. Eigene Klassen statt .modal-bg/.modal: Die tragen
   Regeln aus drei Gestaltungsrunden, und keine davon ist fuer diesen Dialog
   gedacht. */
.ts-konto-dlg {
  position: fixed; inset: 0; z-index: 5000; display: flex; align-items: center; justify-content: center;
  padding: 18px; background: rgba(3,6,10,.68);
}
.ts-konto-dlg-karte {
  width: 100%; max-width: 460px; max-height: calc(100vh - 36px); overflow-y: auto; box-sizing: border-box;
  padding: 22px; background: var(--ts-bg2); border: 1px solid var(--ts-rand); border-radius: 14px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.75); text-align: left; font-family: var(--ts-font);
}
.ts-konto-dlg-karte h3 { margin: 0 0 13px; font-size: 17px; font-weight: 650; letter-spacing: -.02em; color: var(--ts-text); }
.ts-kw-konto {
  display: flex; align-items: center; gap: 9px; min-width: 0; margin: 0 0 15px; padding: 10px 12px;
  background: var(--ts-panel-soft); border: 1px solid var(--ts-line2); border-radius: 10px;
  font-size: 13.5px; color: var(--ts-text);
}
.ts-kw-konto b { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-kw-konto .nr { color: var(--ts-akzent-text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ts-kw-konto .stand { margin-left: auto; padding-left: 8px; font-size: 11.5px; color: var(--ts-muted); white-space: nowrap; }
.ts-kw-liste { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; font-size: 13px; line-height: 1.55; color: var(--ts-dim); }
.ts-kw-liste li { position: relative; padding-left: 16px; }
.ts-kw-liste li::before {
  content: ""; position: absolute; left: 2px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--ts-muted);
}
.ts-kw-liste li.warn { color: var(--ts-warn-text); }
.ts-kw-liste li.warn::before { background: var(--ts-warn); }
.ts-kw-fehler { margin-top: 13px; font-size: 13px; line-height: 1.5; color: var(--ts-neg-text); }
.ts-kw-knoepfe { display: flex; gap: 9px; justify-content: flex-end; flex-wrap: wrap; margin-top: 19px; }
.ts-kopf-btn.ts-kw-ja { background: rgba(160,50,64,.14) !important; border-color: #84494D !important; color: #F2A3AA !important; }
.ts-kopf-btn.ts-kw-ja:hover { background: rgba(160,50,64,.24) !important; border-color: #A85563 !important; color: #FFC3C8 !important; }
.ts-kopf-btn.ts-kw-ja:disabled { opacity: .5; cursor: default; }
.ts-konto-dlg .ts-kopf-btn:focus-visible { outline: 2px solid var(--ts-blue); outline-offset: 2px; }
body.theme-light .ts-konto-dlg { background: rgba(21,33,52,.42); }
body.theme-light .ts-konto-dlg-karte { box-shadow: 0 24px 60px -20px rgba(21,33,52,.32); }
body.theme-light .ts-kopf-btn.ts-kw-ja { background: rgba(194,58,69,.07) !important; border-color: #E3A9AE !important; color: #B5343E !important; }
body.theme-light .ts-kopf-btn.ts-kw-ja:hover { background: rgba(194,58,69,.13) !important; border-color: #C9777F !important; color: #9C2731 !important; }
@media (max-width: 480px) {
  .ts-konto-dlg { align-items: flex-end; padding: 12px; }
  .ts-konto-dlg-karte { padding: 19px 17px; }
  .ts-kw-knoepfe { flex-direction: column-reverse; }
  .ts-kw-knoepfe .ts-kopf-btn { width: 100% !important; padding: 11px 13px !important; }
}

/* v5.264: Benachrichtigungen - Strategie und die ganze Meldung (bis vier Zeilen) */
.ts-meldung small.ts-meldung-strat { color: var(--ts-akzent-text); font-weight: 600; font-size: 11px; margin-top: 2px; }
.ts-meldung small.ts-meldung-text {
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
  overflow-wrap: anywhere; line-height: 1.45;
}

/* =====================================================================
   TRADING SUITE · PREMIUM DARK — Karten im Einzelnen (v5.260)
   ===================================================================== */

/* Die beiden Workspace-Eintraege tragen eine ID-Regel aus der alten
   Gestaltung. Gegen eine ID kommt keine Klasse an - deshalb hier ebenfalls
   ueber die ID. */
#tab-manual, #tab-bot, #tab-manual.active, #tab-bot.active {
  background: transparent !important; background-image: none !important; color: #B6C1D0 !important;
  border: 0 !important; box-shadow: none !important; font-weight: 400 !important;
}
#tab-manual:hover, #tab-bot:hover { background: #172333 !important; color: #FFFFFF !important; }
#tab-manual[aria-current="true"], #tab-bot[aria-current="true"],
#tab-manual.active[aria-current="true"], #tab-bot.active[aria-current="true"] {
  color: #F7FBFF !important;
  background: linear-gradient(100deg, #1A3145 0%, #152536 55%, #172333 100%) !important;
  box-shadow: inset 1px 0 0 #A2DDFF, inset 0 0 0 1px rgba(125,170,205,.20), inset 0 0 15px rgba(65,152,219,.08) !important;
  font-weight: 650 !important;
}
#tab-manual.active:not([aria-current="true"]), #tab-bot.active:not([aria-current="true"]) { color: #E6EEF7 !important; }
#tab-manual::before, #tab-bot::before { display: none !important; }
body.theme-light #tab-manual, body.theme-light #tab-bot,
body.theme-light #tab-manual.active, body.theme-light #tab-bot.active { color: #33465C !important; }
body.theme-light #tab-manual:hover, body.theme-light #tab-bot:hover { background: #DAE4EE !important; color: #152134 !important; }
body.theme-light #tab-manual[aria-current="true"], body.theme-light #tab-bot[aria-current="true"],
body.theme-light #tab-manual.active[aria-current="true"], body.theme-light #tab-bot.active[aria-current="true"] {
  background: #CDDFED !important; color: #152134 !important;
  box-shadow: inset 1px 0 0 #2F6F96, inset 0 0 0 1px rgba(47,111,150,.18) !important;
}
body.theme-light #tab-manual.active:not([aria-current="true"]), body.theme-light #tab-bot.active:not([aria-current="true"]) { color: #152134 !important; }

/* Testphase in der Seitenleiste: das Skript schaltet sie mit display:flex ein */
#trial-banner[style*="flex"] { display: block !important; }
#trial-banner[style*="flex"] + #ts-side-notiz { display: none; }
#trial-banner u { color: var(--ts-blue); text-decoration: none; }
#trial-banner:hover u { text-decoration: underline; }
body.theme-light #trial-banner u { color: #255F86; }

/* Statuspunkte */
.ts-ampel { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; margin-right: 7px; vertical-align: middle; }
.ts-gruen { background: #78CBAC; }
.ts-rot   { background: #EF7D85; }
.ts-gelb  { background: #E4B587; }
.ts-grau  { background: #6F7F95; }
.ts-konto-name { display: inline-flex; align-items: center; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ts-pf { font-size: 12px; opacity: .85; }
.ts-quelle { display: none !important; }
.ts-aus { display: none !important; }

/* Nur auf bestimmten Seiten zeigen bzw. dort ausblenden */
.ts-main[data-gruppe="home"] [data-nur]:not([data-nur~="home"]),
.ts-main[data-gruppe="overview"] [data-nur]:not([data-nur~="overview"]),
.ts-main[data-gruppe="trading"] [data-nur]:not([data-nur~="trading"]),
.ts-main[data-gruppe="automation"] [data-nur]:not([data-nur~="automation"]),
.ts-main[data-gruppe="risk"] [data-nur]:not([data-nur~="risk"]),
.ts-main[data-gruppe="connect"] [data-nur]:not([data-nur~="connect"]),
.ts-main[data-gruppe="analytics"] [data-nur]:not([data-nur~="analytics"]),
.ts-main[data-gruppe="journal"] [data-nur]:not([data-nur~="journal"]),
.ts-main[data-gruppe="settings"] [data-nur]:not([data-nur~="settings"]),
.ts-main[data-gruppe="alle"] [data-nur]:not([data-nur~="alle"]) { display: none !important; }

/* ------------------------------------------------------------ Bot-Karte */
.ts-botkopf, .ts-botzeile { display: flex; align-items: center; gap: 14px; }
.ts-botzeile { justify-content: space-between; margin: 2px 0 0; }
.ts-botstatus {
  display: inline-flex; align-items: center; gap: 9px; font-size: 12px !important; font-weight: 650 !important;
  color: var(--ts-muted) !important; text-shadow: none !important; margin: 0 !important; letter-spacing: -.01em;
}
.ts-botstatus::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #5F6E82; flex: none; }
.ts-botstatus.an { color: #94DAB8 !important; }
.ts-botstatus.an::before { background: #78CBAC; box-shadow: 0 0 13px rgba(126,206,172,.38); }
.ts-botfuss { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; flex-wrap: wrap; }
.ts-feat-kopf { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ts-main .card select.ts-mini-wahl {
  background: transparent !important; border: 0 !important; color: #A4B1C1 !important; font-size: 10px !important;
  padding: 0 14px 0 0 !important; min-height: 0 !important; height: auto !important; cursor: pointer; width: auto; max-width: 96px;
}
.ts-main .big-num.klein { font-size: 16px !important; font-weight: 650 !important; }
.ts-main .big-num.ts-blau { color: var(--ts-blue) !important; }
.ts-main .ts-botkarte .ts-feat .big-num { margin-top: 9px !important; }
.ts-main .ts-botkarte hr { margin: 15px 0 !important; }
body.theme-light .ts-botstatus.an { color: #2B7355 !important; }
body.theme-light .ts-botstatus.an::before { background: #2B7355; box-shadow: none; }
body.theme-light .ts-main .card select.ts-mini-wahl { color: #56677D !important; }

/* Aktivitaet in der Karte: ohne Rahmen der Aufklappflaeche */
.card .ts-akt-liste .ts-meldung { padding: 13px 0; border-bottom-color: #22303F; font-size: 13px; }
.card .ts-akt-liste .ts-meldung-leer { padding: 26px 0; }
body.theme-light .card .ts-akt-liste .ts-meldung { border-bottom-color: #E1E8F0; }

/* --------------------------------------------------------- Prop-Regelwerk */
.ts-prop-kopf { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ts-main .card select.ts-tag-wahl {
  -webkit-appearance: none; appearance: none; padding: 5px 26px 5px 11px !important; border: 1px solid #34566A !important;
  border-radius: 999px !important; color: #AFE1F5 !important; font-size: 11px !important; background-color: transparent !important;
  min-height: 0 !important; height: auto !important; max-width: 170px; cursor: pointer; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='6' viewBox='0 0 8 6'%3E%3Cpath d='M1 1l3 3 3-3' stroke='%23AFE1F5' stroke-width='1.3' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important; background-position: right 10px center !important;
}
.ts-main .card select.ts-tag-wahl option { background: #101724; color: #EDF3FA; }
.prop-rules-list { margin-top: 2px; }
.ts-main .card .prop-rules-list .ts-regel:first-child { padding-top: 6px; }
.ts-main[data-gruppe="home"] #view-bot .prop-rules-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; }
.ts-main[data-gruppe="home"] #view-bot .prop-rules-list .ts-regel:nth-last-child(-n+2) { border-bottom: 0; }
.ts-main[data-gruppe="home"] #view-bot [data-card-id="prop-rules-bot"],
.ts-main[data-gruppe="risk"] .cardsec > .card { grid-column: 1 / -1; }
.ts-schaltzeile {
  display: flex !important; align-items: center; justify-content: space-between; gap: 14px; margin-top: 8px; padding: 13px 0 0;
  border-top: 1px solid #22303F; cursor: pointer; font-size: 13px !important; color: var(--ts-text) !important;
  letter-spacing: -.015em !important; text-transform: none !important;
}
.ts-main .card .prop-lock {
  background: rgba(160,50,64,.14) !important; color: #F4A7AD !important; border: 1px solid #6F3C48; border-radius: 10px !important;
}
body.theme-light .ts-main .card select.ts-tag-wahl {
  border-color: #9DBFD8 !important; color: #255F86 !important; background-color: transparent !important;
  /* Die allgemeine Feldregel des Hellmodus setzt 'background' als Kurzform -
     damit kachelte der Pfeil ueber die ganze Flaeche. */
  background-repeat: no-repeat !important; background-position: right 10px center !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='6' viewBox='0 0 8 6'%3E%3Cpath d='M1 1l3 3 3-3' stroke='%23255F86' stroke-width='1.3' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") !important;
}
body.theme-light .ts-main .card select.ts-tag-wahl option { background: #FFFFFF; color: #152134; }
body.theme-light .ts-schaltzeile { border-top-color: #E1E8F0; }
body.theme-light .ts-main .card .prop-lock { background: rgba(194,58,69,.07) !important; color: #B5343E !important; border-color: #E3A9AE; }

/* ------------------------------------------------------------------ Ziele */
.ts-ziele { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 16px; }
.ts-ziele > div { background: rgba(10,16,25,.64); border: 1px solid #273647; border-radius: 12px; padding: 18px; min-width: 0; }
.ts-ziele > div > div:first-child { font-size: 13px !important; margin-bottom: 0 !important; align-items: center !important; gap: 10px; }
.ts-ziele > div > div:first-child > span:first-child { color: var(--ts-text) !important; font-weight: 400 !important; }
.ts-ziele > div > div:first-child > span:last-child { color: var(--ts-text) !important; font-weight: 650 !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ts-ziele [id$="-bar"] { background: linear-gradient(90deg, #67AF9C, #99D5C7) !important; }
.ts-ziele [id$="-label"] { font-size: 11px !important; color: #A4B1C1 !important; margin-top: 12px !important; }
body.theme-light .ts-ziele > div { background: #F7F9FC; border-color: #D5DDE8; }
body.theme-light .ts-ziele [id$="-label"] { color: #56677D !important; }
body.theme-light .ts-ziele [id$="-bar"] { background: linear-gradient(90deg, #3E8E72, #6DB79C) !important; }

/* -------------------------------------------------------------- Historie */
.ts-kopf-knoepfe { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ts-histfilter { margin-right: 6px; }
table[data-filter="g"] tr.ts-v, table[data-filter="v"] tr.ts-g { display: none; }

@media (max-width: 1160px) {
  .ts-ziele { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .ts-main[data-gruppe="home"] #view-bot .prop-rules-list { grid-template-columns: minmax(0, 1fr); }
}

/* Einklappen bleibt (Klick auf die Titelzeile), aber ohne Pfeil vor jeder
   Ueberschrift - der Entwurf hat ruhige Titel. Eine eingeklappte Karte
   zeigt einen kleinen Winkel, damit man sieht, dass da etwas ist. */
.ts-main .card h2::before { content: none !important; display: none !important; }
.ts-main .card.collapsed h2::after {
  content: ""; width: 6px; height: 6px; border-right: 1.5px solid #8190A5; border-bottom: 1.5px solid #8190A5;
  transform: rotate(-45deg); margin-left: 2px; flex: none;
}
.ts-main .card.collapsed .card-title-row { margin-bottom: 0 !important; }
.ts-main .card.collapsed > h2 { margin-bottom: 0 !important; }
.ts-main .big-num.klein { white-space: normal; overflow-wrap: anywhere; line-height: 1.35 !important; }
/* Anordnen: die Karten zeigen, dass sie greifbar sind */

/* Historie: Kurs unter der Zeit, Zustand des Journal-Eintrags am Knopf */
.ts-zeitzelle { white-space: nowrap; }
/* v5.261: Trade eines frueheren Kontos (kommt aus dem Archiv) */
.ts-archiv { display: block; font-size: 10.5px; color: var(--ts-muted); margin-top: 3px; font-weight: 500; letter-spacing: 0; }
.ts-zeitzelle small { display: block; font-size: 10.5px; color: var(--ts-muted); margin-top: 3px; font-variant-numeric: tabular-nums; }
.ts-main .btn-sm.ts-detail { padding: 7px 12px !important; font-size: 12px !important; }
.ts-detail i { width: 6px; height: 6px; border-radius: 50%; background: #4A5B70; display: inline-block; flex: none; }
.ts-detail.teil i { background: #E4B587; }
.ts-detail.fertig i { background: #9BD7FF; }
body.theme-light .ts-detail i { background: #A9B6C8; }
body.theme-light .ts-detail.teil i { background: #B98A3E; }
body.theme-light .ts-detail.fertig i { background: #2F6F96; }
/* Stimmung 1-5: die Knoepfe tragen ihre Zahl, die Auswahl eine Markierung */
.ts-main .mood-btn, .modal .mood-btn, .modal-bg .mood-btn {
  background: #0C1622 !important; border: 1px solid #27394B !important; border-radius: 8px !important; color: #A9B6C8 !important;
  font-size: 12px !important; padding: 8px 0 !important; min-height: 34px; cursor: pointer; font-family: var(--ts-font) !important;
}
.mood-btn:empty::before { content: attr(data-val); }
.ts-main .mood-btn.on, .modal .mood-btn.on, .modal-bg .mood-btn.on {
  border-color: #7D9CBA !important; color: #FFFFFF !important;
  background: linear-gradient(130deg, rgba(89,142,188,.28), rgba(41,61,81,.38)) !important;
}
body.theme-light .ts-main .mood-btn, body.theme-light .modal .mood-btn { background: #FFFFFF !important; border-color: #C5D0DF !important; color: #44576D !important; }
body.theme-light .ts-main .mood-btn.on, body.theme-light .modal .mood-btn.on { background: #DDEAF5 !important; border-color: #8FB4D0 !important; color: #152134 !important; }

/* ------------------------------------------------------------ Auswertung */
/* Drei Spuren: 39 | 11 | 50. Long/Short nimmt die erste, die Kennzahlen
   die beiden anderen (39/61); darunter stehen zwei Karten je zur Haelfte. */
.ts-main[data-gruppe="analytics"] .cardsec-back { grid-template-columns: minmax(0, 39fr) minmax(0, 11fr) minmax(0, 50fr); column-gap: 0; }
.ts-main[data-gruppe="analytics"] .cardsec-back > .card { margin-right: 0 !important; }
.ts-main[data-gruppe="analytics"] .cardsec-back > [data-card-id^="perf-ls"] { grid-column: 1; margin-right: 18px !important; }
.ts-main[data-gruppe="analytics"] .cardsec-back > [data-card-id^="perf-kenn"] { grid-column: 2 / span 2; }
.ts-main[data-gruppe="analytics"] .cardsec-back > [data-card-id="perf"],
.ts-main[data-gruppe="analytics"] .cardsec-back > [data-card-id="perf-bot"] { grid-column: 1 / span 2; margin-right: 9px !important; }
.ts-main[data-gruppe="analytics"] .cardsec-back > [data-card-id^="zeiten"] { grid-column: 3; margin-left: 9px !important; }
.ts-main[data-gruppe="analytics"] .cardsec-back > [data-breit] { grid-column: 1 / -1; }
.ts-main[data-gruppe="analytics"] .cardsec-back > .card { align-self: stretch; }
.ts-main[data-gruppe="analytics"] .cardsec-back { row-gap: 45px; }
/* Kurven: kein eigener Kasten, die Hoehe des Entwurfs */
.ts-kurve { position: relative; height: 262px; margin-top: 13px; }
.ts-kurve canvas { max-height: none !important; min-height: 0 !important; }

.ts-vergleich { display: flex; align-items: center; gap: 40px; padding: 4px 16px 5px; }
.ts-donut {
  border-radius: 50%; width: 128px; height: 128px; flex: none; display: grid; place-items: center; position: relative;
  background: conic-gradient(#91D4FF 0 var(--ts-anteil, 0%), #EF8590 var(--ts-anteil, 0%) 100%);
}
.ts-donut.leer { background: #1C2836; }
.ts-donut::before { content: ""; position: absolute; inset: 11px; background: #111A28; border-radius: 50%; }
.ts-donut-innen { position: relative; text-align: center; }
.ts-donut-innen strong { display: block; font-size: 28px; font-weight: 650; letter-spacing: -.04em; line-height: 1.1; color: var(--ts-text); }
.ts-donut-innen small { font-size: 11px; color: #B5C1D0; }
.ts-vergleich-liste { flex: 1; min-width: 0; }
.ts-vergleich-zeile { padding: 15px 0; border-bottom: 1px solid #253343; display: flex; justify-content: space-between; align-items: center; gap: 14px; font-size: 13px; }
.ts-vergleich-zeile:last-child { border: 0; }
.ts-vergleich-wert { text-align: right; min-width: 0; }
.ts-vergleich-wert strong { font-weight: 650; font-variant-numeric: tabular-nums; display: block; }
.ts-vergleich-wert small { font-size: 11px; color: #A4B1C1; font-variant-numeric: tabular-nums; }
.ts-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--ts-blue); margin-right: 12px; flex: none; }
/* Die Altgestaltung gab diesen Zahlen eigene Groessen und Farben (per ID, mit
   !important). Im Entwurf ist es eine ruhige Zeile: Name links, Anzahl rechts. */
.ts-main .ts-vergleich-zeile > span:first-child { display: inline-flex !important; align-items: center; white-space: nowrap; }
#ls-long-count, #m-ls-long-count, #ls-short-count, #m-ls-short-count,
.ts-main .ts-vergleich-wert strong, .ts-main .ts-vergleich-wert strong span {
  font-size: 13px !important; font-weight: 650 !important; color: var(--ts-text) !important; letter-spacing: -.015em !important;
  margin: 0 !important; font-family: var(--ts-font) !important; line-height: 1.3 !important;
}
#ls-long-profit, #m-ls-long-profit, #ls-short-profit, #m-ls-short-profit,
#ls-long-pips, #m-ls-long-pips, #ls-short-pips, #m-ls-short-pips,
#ls-long-wr, #m-ls-long-wr, #ls-short-wr, #m-ls-short-wr,
.ts-main .ts-vergleich-wert small, .ts-main .ts-vergleich-wert small span {
  font-size: 11px !important; font-weight: 400 !important; color: #A4B1C1 !important; letter-spacing: 0 !important;
  margin: 0 !important; font-family: var(--ts-font) !important; line-height: 1.4 !important;
}
.ts-main .ts-vergleich-wert small { display: block; margin-top: 3px !important; white-space: nowrap; }
body.theme-light #ls-long-profit, body.theme-light #m-ls-long-profit, body.theme-light #ls-short-profit, body.theme-light #m-ls-short-profit,
body.theme-light #ls-long-pips, body.theme-light #m-ls-long-pips, body.theme-light #ls-short-pips, body.theme-light #m-ls-short-pips,
body.theme-light #ls-long-wr, body.theme-light #m-ls-long-wr, body.theme-light #ls-short-wr, body.theme-light #m-ls-short-wr,
body.theme-light .ts-main .ts-vergleich-wert small, body.theme-light .ts-main .ts-vergleich-wert small span { color: #56677D !important; }
.ts-dot.rot { background: var(--ts-neg); }
.ts-metriken { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 24px; }
.ts-metriken > div { padding: 16px 26px; border-right: 1px solid #2C3947; min-width: 0; }
.ts-metriken > div:last-child { border-right: 0; }
.ts-metrik-name { font-size: 12px; color: #B7C2CF; margin-bottom: 12px; white-space: nowrap; }
.ts-metrik-wert { font-size: 20px; font-weight: 650; letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ts-text); }
body.theme-light .ts-donut { background: conic-gradient(#3F86B5 0 var(--ts-anteil, 0%), #D5606A var(--ts-anteil, 0%) 100%); }
body.theme-light .ts-donut.leer { background: #DFE6EE; }
body.theme-light .ts-donut::before { background: #FFFFFF; }
body.theme-light .ts-donut-innen small, body.theme-light .ts-vergleich-wert small { color: #56677D; }
body.theme-light .ts-vergleich-zeile { border-bottom-color: #E1E8F0; }
body.theme-light .ts-metriken > div { border-right-color: #DCE3EC; }
body.theme-light .ts-metrik-name { color: #44576D; }

/* ---------------------------------------------------------------- Journal */
.ts-reflexion { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 16px; }
.ts-soft-titel { font-size: 13px; font-weight: 650; color: var(--ts-text); margin-bottom: 12px; letter-spacing: -.02em; }
.ts-main .card .ts-soft table { margin-top: 0 !important; }
.ts-main .card .ts-soft table th { padding: 8px 6px !important; }
.ts-main .card .ts-soft table td { padding: 9px 6px !important; }
.ts-main .card details {
  background: rgba(10,16,25,.64) !important; border: 1px solid #273647 !important; border-radius: 12px !important; padding: 12px 16px !important;
}
.ts-main .card details > summary { color: #C5D0DF !important; font-size: 12.5px !important; cursor: pointer; }
body.theme-light .ts-main .card details { background: #F7F9FC !important; border-color: #D5DDE8 !important; }
body.theme-light .ts-main .card details > summary { color: #33455A !important; }

@media (max-width: 1160px) {
  .ts-main[data-gruppe="analytics"] .cardsec-back > .card { grid-column: 1 / -1 !important; margin-left: 0 !important; margin-right: 0 !important; }
  .ts-reflexion { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .ts-metriken { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ts-metriken > div:nth-child(2) { border-right: 0; }
  .ts-vergleich { gap: 22px; padding: 4px 0; }
}

/* ------------------------------------------------- Zeilen und Strategien */
.ts-zeile { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.ts-zeile-links, .ts-zeile-rechts { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; }
.ts-strategie { padding: 18px 20px; margin-top: 14px; border: 1px solid #344254; border-radius: 13px; background: rgba(11,18,28,.7); }
.ts-strategie.pausiert { border-color: #283646; }
.ts-strategie.pausiert .ts-strat-name { color: #A9B6C8 !important; }
.ts-main .card input.ts-strat-name {
  background: transparent !important; border: 1px solid transparent !important; color: var(--ts-text) !important;
  font-size: 15px !important; font-weight: 650 !important; letter-spacing: -.03em; padding: 3px 6px !important; margin-left: -7px;
  min-height: 0 !important; width: auto; max-width: 320px; border-radius: 7px !important;
}
.ts-main .card input.ts-strat-name:hover { border-color: #2D3C4C !important; }
.ts-main .card input.ts-strat-name:focus { border-color: #75B5DD !important; background: #090F18 !important; }
.ts-strategie .ts-feldname { margin-top: 0; }
.ts-fuenf { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 11px; margin: 14px 0; }
.ts-main .card .ts-wahl, .ts-main .card .ts-feld { width: 100%; }
.ts-main .card .ts-wahl.warn { border-color: #B98F5E !important; }
.ts-main .btn-sm.ts-mehr { padding: 8px 10px !important; }
.ts-code-art { display: inline-block; min-width: 46px; font-weight: 500; color: #A8CBDA; font-family: var(--ts-mono) !important; }
.ts-code code { background: none !important; color: inherit !important; padding: 0 !important; font-size: 11px !important; }
.ts-strat-hinweis { margin-top: 12px; line-height: 1.6; }
.ts-strat-hinweis code { background: #0A121B; border: 1px solid #263444; border-radius: 5px; padding: 1px 5px; color: #A8CBDA; font-size: 10.5px; }
body.theme-light .ts-strategie { background: #F7F9FC; border-color: #D5DDE8; }
body.theme-light .ts-strategie.pausiert .ts-strat-name { color: #56677D !important; }
body.theme-light .ts-code-art { color: #26587A; }
body.theme-light .ts-strat-hinweis code { background: #F3F7FB; border-color: #C9D6E3; color: #26587A; }
body.theme-light .ts-main .card input.ts-strat-name:focus { background: #FFFFFF !important; }

/* ----------------------------------------------------------- TradeConnect */
.ts-tc-konten { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 8px; }
.ts-slaves { display: contents; }
.ts-slaves > .ts-meldung-leer { grid-column: 1 / -1; border: 1px dashed #273647; border-radius: 12px; }
.ts-soft b { font-size: 13px; font-weight: 650; color: var(--ts-text); }
.ts-schalt-kurz { display: inline-flex !important; align-items: center; gap: 10px; cursor: pointer; font-size: 12px !important; color: #C5D0DF !important;
  text-transform: none !important; letter-spacing: -.01em !important; }
.ts-slave-aktionen { margin-top: 4px; }
.ts-mult-feld { display: inline-flex !important; align-items: center; gap: 8px; text-transform: none !important; letter-spacing: 0 !important; }
.ts-main .card .ts-mult-feld input { width: 74px !important; padding: 6px 8px !important; min-height: 32px !important; }
.ts-main .card .ts-slave .btn-sm { padding: 6px 10px !important; font-size: 12px !important; }
body.theme-light .ts-schalt-kurz { color: #33455A !important; }
body.theme-light .ts-slaves > .ts-meldung-leer { border-color: #D5DDE8; }

@media (max-width: 1160px) {
  .ts-fuenf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ts-tc-konten { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}

/* Long/Short: Feinheiten */
.ts-vergleich-wert strong { font-size: 13px; }
.ts-vergleich-wert small { display: block; white-space: nowrap; margin-top: 3px; }

/* -------------------------------------------------------------- Kurschart */
.ts-main #chart-container { height: 640px; }
.ts-main #mtchart-bar { height: 44px !important; padding: 0 2px 10px !important; gap: 8px !important; border-bottom: 0 !important; }
.ts-main #mtchart { height: calc(100% - 46px) !important; }
.ts-chart-knoepfe { margin-left: auto; display: inline-flex; gap: 8px; align-items: center; }
.ts-main #mtchart-bar .ts-btn { padding: 7px 12px !important; font-size: 12px !important; background: #121E2E !important;
  border: 1px solid #34475D !important; color: #DBE8F6 !important; border-radius: 9px !important; }
.ts-main #mtchart-bar .ts-btn:hover { border-color: #5F8FB0 !important; color: #FFFFFF !important; }
.ts-main #mtchart-tfs { display: inline-flex; gap: 3px; align-items: center; }
.ts-main #mtc-setup, .ts-main #mtc-menu {
  background: #101724 !important; border: 1px solid #2B3A4B !important; border-radius: 12px !important; color: #DCE4ED !important;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.75) !important;
}
#chart-container:fullscreen { padding: 22px 26px !important; border-radius: 0 !important; height: 100vh !important; width: 100vw; background: #070B11 !important; }
#chart-container:-webkit-full-screen { padding: 22px 26px !important; border-radius: 0 !important; height: 100vh !important; width: 100vw; background: #070B11 !important; }
body.theme-light .ts-main #mtchart-bar .ts-btn { background: #F8FAFC !important; border-color: #C5D0DF !important; color: #26354A !important; }
body.theme-light .ts-main #mtc-setup, body.theme-light .ts-main #mtc-menu { background: #FFFFFF !important; border-color: #C5D0DF !important; color: #33455A !important; }
body.theme-light #chart-container:fullscreen { background: #EFF3F8 !important; }

/* ---------------------------------------------------------- Trading Panel
   Aufbau wie "Chart & Workspace" im Entwurf: drei Kacheln (Symbol, Lot,
   Spread), darunter BUY und SELL. Die Kacheln sind hier keine Anzeige,
   sondern die Eingabe selbst - Auswahl und Feld tragen die Schrift des
   Kachelwerts. Einstieg, SL, TP und Trailing stehen als Feldzeile dazwischen. */
.ts-order-kacheln { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.ts-order-kacheln .ts-feat { padding: 16px 18px; transition: border-color .15s; }
.ts-order-kacheln .ts-feat:focus-within { border-color: #75B5DD; }
.ts-order-kacheln label.ts-caps { display: block; cursor: pointer; }
.ts-main .trade-panel .ts-order-kacheln select, .ts-main .trade-panel .ts-order-kacheln input {
  background: transparent !important; border: 0 !important; border-radius: 0 !important; padding: 0 !important;
  margin: 9px 0 0 !important; min-height: 28px !important; height: 28px !important; width: 100%;
  font-size: 23px !important; font-weight: 650 !important; letter-spacing: -.03em !important; line-height: 28px !important;
  color: var(--ts-text) !important; outline: none; font-variant-numeric: tabular-nums;
}
.ts-main .trade-panel .ts-order-kacheln select { font-size: 15px !important; letter-spacing: -.02em !important; padding-right: 18px !important; cursor: pointer; }
.ts-main .trade-panel .ts-order-kacheln select option { background: #101724; color: #F4F7FB; font-size: 13px; font-weight: 400; }
.ts-order-kacheln .v { margin-top: 9px; font-size: 23px; font-weight: 650; letter-spacing: -.03em; line-height: 28px; font-variant-numeric: tabular-nums; color: var(--ts-text); }
.ts-order-raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 12px; align-items: end; margin-top: 14px; }
.ts-order-raster label {
  display: block; font-size: 10px !important; letter-spacing: .09em !important; color: #8E9EB2 !important;
  text-transform: uppercase !important; margin-bottom: 7px !important; font-weight: 500 !important; white-space: nowrap;
}
.ts-order-raster label span { font-size: inherit !important; }
.ts-order-knoepfe { display: flex; gap: 14px; margin-top: 16px; }
.ts-order-knoepfe .big-btn { flex: 1; }
.ts-main .trade-panel input, .ts-main .trade-panel select { width: 100%; }
/* BUY und SELL: die Knopfform des Entwurfs, nur die Schrift traegt die Farbe */
.ts-main .trade-panel .ts-order-knoepfe .big-btn {
  background: #121E2E !important; background-image: none !important; border: 1px solid #34475D !important;
  border-radius: 9px !important; padding: 12px 13px !important; margin: 0 !important; font-size: 13px !important;
  font-weight: 600 !important; letter-spacing: .02em !important; box-shadow: none !important; min-height: 0 !important;
}
.ts-main .trade-panel .ts-order-knoepfe .btn-buy { color: var(--ts-green) !important; }
.ts-main .trade-panel .ts-order-knoepfe .btn-sell { color: var(--ts-neg) !important; }
.ts-main .trade-panel .ts-order-knoepfe .btn-buy:hover:not(:disabled) { border-color: #5E9A8C !important; background: rgba(79,158,128,.12) !important; }
.ts-main .trade-panel .ts-order-knoepfe .btn-sell:hover:not(:disabled) { border-color: #A85563 !important; background: rgba(160,50,64,.12) !important; }
.ts-main .trade-panel .spread-info {
  background: none !important; border: 0 !important; padding: 0 !important; margin: 12px 0 0 !important;
  font-size: 11px !important; color: #A4B1C1 !important; text-align: left !important;
}
.ts-main .trade-panel #trade-risk { justify-content: flex-start !important; text-align: left !important; font-size: 11px !important; margin-top: 4px !important; color: #A4B1C1; }
.ts-main #pretrade-journal { background: rgba(10,16,25,.64) !important; border: 1px solid #273647 !important; border-radius: 12px !important; padding: 12px 14px !important; margin-top: 14px !important; }
.ts-main #pretrade-journal input, .ts-main #pretrade-journal select { margin-top: 5px !important; }
.ts-main #worker-route-banner { background: rgba(26,52,73,.5) !important; border: 1px solid #5F8FB0 !important; border-radius: 10px !important; }
/* Startseite Manual Trading und "Alles anzeigen": Positionen links, Panel rechts */
.ts-main[data-gruppe="home"] #view-manual .cardsec-live,
.ts-main[data-gruppe="alle"] #view-manual .cardsec-live { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ts-main[data-gruppe="home"] #view-manual [data-card-id="positions"],
.ts-main[data-gruppe="alle"] #view-manual [data-card-id="positions"] { order: -2; }
.ts-main[data-gruppe="home"] #view-manual [data-card-id="manual-trade"],
.ts-main[data-gruppe="alle"] #view-manual [data-card-id="manual-trade"] { order: -1; grid-column: auto; }
body.theme-light .ts-order-raster label { color: #56677D !important; }
body.theme-light .ts-main #pretrade-journal { background: #F7F9FC !important; border-color: #D5DDE8 !important; }
body.theme-light .ts-main .trade-panel .ts-order-knoepfe .big-btn { background: #F8FAFC !important; border-color: #C5D0DF !important; }
body.theme-light .ts-main .trade-panel .ts-order-knoepfe .btn-buy:hover:not(:disabled) { border-color: #9CCDB7 !important; background: rgba(43,115,85,.08) !important; }
body.theme-light .ts-main .trade-panel .ts-order-knoepfe .btn-sell:hover:not(:disabled) { border-color: #E3A9AE !important; background: rgba(194,58,69,.07) !important; }
body.theme-light .ts-main .trade-panel .spread-info, body.theme-light .ts-main .trade-panel #trade-risk { color: #56677D !important; }
body.theme-light .ts-main .trade-panel .ts-order-kacheln select option { background: #FFFFFF; color: #152134; }

/* ------------------------------------------------- Offene Positionen
   In einer halben Karte haben zehn Spalten keinen Platz. Der Entwurf zeigt
   dort Symbol, Typ, Lot, Open, Aktuell und P/L - SL, TP und Pips stehen in
   der breiten Tabelle unter "Handel" (und als Linien im Chart). Die Aktionen
   bleiben in jeder Breite erreichbar. */
.ts-main .card[data-card-id="positions"], .ts-main .card[data-card-id="positions-bot"] { container-type: inline-size; container-name: tspos; }
.ts-main .card[data-card-id="positions"] td .btn-sm, .ts-main .card[data-card-id="positions-bot"] td .btn-sm { padding: 6px 10px !important; font-size: 12px !important; }
.ts-main .card[data-card-id="positions"] td .btn-sm + .btn-sm { margin-left: 4px; }
.ts-main .card .btn-sm.btn-buy { border-color: #3E665E !important; color: #91D4B8 !important; background: rgba(79,158,128,.10) !important; }
@container tspos (max-width: 900px) {
  .ts-main .card table th:nth-child(6), .ts-main .card table th:nth-child(7), .ts-main .card table th:nth-child(8),
  .ts-main .card table td:nth-child(6):not([colspan]), .ts-main .card table td:nth-child(7):not([colspan]),
  .ts-main .card table td:nth-child(8):not([colspan]) { display: none; }
  .ts-main .card table th, .ts-main .card table td { padding-left: 9px !important; padding-right: 9px !important; }
}
@container tspos (max-width: 560px) {
  .ts-main .card table th:nth-child(4), .ts-main .card table td:nth-child(4):not([colspan]) { display: none; }
}

/* Leiste der oeffentlichen Vorschau */
#demo-banner-oeffentlich {
  background: #131C2A; color: #C5D0DF; border-bottom: 1px solid #263344; font-size: 12px; padding: 7px 16px; min-height: 36px;
  font-family: var(--ts-font);
}
#demo-banner-oeffentlich b { color: #E9C08F; letter-spacing: .04em; }
body.theme-light #demo-banner-oeffentlich { background: #FBF4E8; color: #44576D; border-bottom-color: #E8D5B5; }
body.theme-light #demo-banner-oeffentlich b { color: #8A5E1E; }

@media (max-width: 1160px) {
  .ts-main #chart-container { height: 520px; }
}
@media (max-width: 760px) {
  .ts-order-kacheln { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ts-order-kacheln .ts-feat:first-child { grid-column: 1 / -1; }
}

/* ---------------------------------------------------------- Einstellungen */
.ts-einst { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 0 0 23px; align-items: stretch; }
.ts-main[data-gruppe="alle"] .ts-einst { display: none !important; }
.ts-set { padding: 22px 25px; min-width: 0; }
.ts-set h2 { margin: 0; font-size: 17px; letter-spacing: -.035em; font-weight: 650; color: var(--ts-text); }
.ts-set .ts-helfer { margin: 5px 0 18px; }
.ts-set-zeile { display: flex; align-items: center; justify-content: space-between; gap: 14px; font-size: 13px; color: var(--ts-text); min-height: 30px; }
.ts-set-rechts { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; min-width: 0; }
.ts-set .ts-seg { padding: 3px; }
.ts-set .ts-seg button { padding: 6px 12px; font-size: 12px; }
body.ts-ohne-signale .card[data-card-id^="aktivitaet"], body.ts-ohne-signale #ts-glocke { display: none !important; }
/* An/Aus-Felder der Einstellungskarten als Schalter (nur die Erscheinung -
   es bleiben dieselben Ankreuzfelder, die das Skript liest und schreibt). */
.ts-main .card [data-curve="botcfg"] input[type="checkbox"], .ts-main .card [data-curve="rg"] input[type="checkbox"],
.ts-main .card [data-curve="wh"] input[type="checkbox"], .ts-main .ts-schaltzeile input[type="checkbox"] {
  -webkit-appearance: none; appearance: none; width: 36px !important; height: 21px !important; margin: 0 10px 0 0 !important;
  background: #1C2836 !important; border: 1px solid #465466 !important; border-radius: 20px !important; position: relative;
  cursor: pointer; vertical-align: middle; flex: none; transition: all .2s; min-height: 0 !important; padding: 0 !important;
}
.ts-main .card [data-curve="botcfg"] input[type="checkbox"]::after, .ts-main .card [data-curve="rg"] input[type="checkbox"]::after,
.ts-main .card [data-curve="wh"] input[type="checkbox"]::after, .ts-main .ts-schaltzeile input[type="checkbox"]::after {
  content: ""; position: absolute; left: 3px; top: 3px; width: 13px; height: 13px; border-radius: 50%; background: #9BAABD; transition: all .2s;
}
.ts-main .card [data-curve="botcfg"] input[type="checkbox"]:checked, .ts-main .card [data-curve="rg"] input[type="checkbox"]:checked,
.ts-main .card [data-curve="wh"] input[type="checkbox"]:checked, .ts-main .ts-schaltzeile input[type="checkbox"]:checked {
  background: #28526A !important; border-color: #75B5DD !important;
}
.ts-main .card [data-curve="botcfg"] input[type="checkbox"]:checked::after, .ts-main .card [data-curve="rg"] input[type="checkbox"]:checked::after,
.ts-main .card [data-curve="wh"] input[type="checkbox"]:checked::after, .ts-main .ts-schaltzeile input[type="checkbox"]:checked::after {
  left: 18px; background: #A7E2FF;
}
.ts-main .card [data-curve] input[type="checkbox"]:focus-visible { outline: 2px solid #9BD7FF; outline-offset: 2px; }
body.theme-light .ts-main .card [data-curve="botcfg"] input[type="checkbox"], body.theme-light .ts-main .card [data-curve="rg"] input[type="checkbox"],
body.theme-light .ts-main .card [data-curve="wh"] input[type="checkbox"], body.theme-light .ts-main .ts-schaltzeile input[type="checkbox"] {
  background: #E3E9F0 !important; border-color: #B4C1D1 !important;
}
body.theme-light .ts-main .card [data-curve] input[type="checkbox"]::after, body.theme-light .ts-main .ts-schaltzeile input[type="checkbox"]::after { background: #7C8CA1; }
body.theme-light .ts-main .card [data-curve="botcfg"] input[type="checkbox"]:checked, body.theme-light .ts-main .card [data-curve="rg"] input[type="checkbox"]:checked,
body.theme-light .ts-main .card [data-curve="wh"] input[type="checkbox"]:checked, body.theme-light .ts-main .ts-schaltzeile input[type="checkbox"]:checked {
  background: #BBD9EE !important; border-color: #5E9DC8 !important;
}
body.theme-light .ts-main .card [data-curve] input[type="checkbox"]:checked::after, body.theme-light .ts-main .ts-schaltzeile input[type="checkbox"]:checked::after { background: #2F6F96; }
/* Wochentage */
.ts-main .btn-sm.ts-tag-knopf { padding: 7px 0 !important; min-width: 0; text-align: center; font-size: 12px !important; }
.ts-main .btn-sm.ts-tag-knopf.on {
  border-color: #7D9CBA !important; color: #FFFFFF !important;
  background: linear-gradient(130deg, rgba(89,142,188,.28), rgba(41,61,81,.38)) !important;
}
body.theme-light .ts-main .btn-sm.ts-tag-knopf.on { background: #DDEAF5 !important; border-color: #8FB4D0 !important; color: #152134 !important; }
/* Desktop-App: Kacheln statt Farbflaechen */
.ts-main .desktop-card-shared h2 { color: var(--ts-text) !important; }
.ts-main .desktop-card-shared > p { font-size: 12px !important; color: var(--ts-muted) !important; margin: 5px 0 18px !important; }
.ts-main .desktop-card-shared > p b { color: var(--ts-sub); font-weight: 600; }
.ts-main .desktop-download-grid { max-width: none !important; margin: 0 !important; gap: 12px !important; }
.ts-main .desktop-card-shared :is(.dl-btn-mac, .dl-btn-win) {
  background: #0C1622 !important; border: 1px solid #27394B !important; border-radius: 12px !important; color: var(--ts-text) !important;
  padding: 18px !important; text-align: left !important; box-shadow: none !important; transform: none !important; transition: border-color .15s !important;
}
.ts-main .desktop-card-shared :is(.dl-btn-mac, .dl-btn-win):hover { border-color: #5F8FB0 !important; }
.ts-main .desktop-card-shared :is(.dl-btn-mac, .dl-btn-win) > div:first-child:empty { display: none; }
.ts-main .desktop-card-shared :is(.dl-btn-mac, .dl-btn-win) > div:nth-child(2) { font-size: 15px !important; font-weight: 650 !important; margin: 0 !important; letter-spacing: -.02em; }
.ts-main .desktop-card-shared :is(.dl-btn-mac, .dl-btn-win) > div:nth-child(3) { font-size: 11px !important; color: #A4B1C1 !important; opacity: 1 !important; margin-top: 7px !important; }
.ts-main .desktop-card-shared > div[style*="repeat(3, 1fr)"] { max-width: none !important; margin: 12px 0 0 !important; gap: 12px !important; }
.ts-main .desktop-card-shared > div[style*="repeat(3, 1fr)"] > div {
  background: #0C1622 !important; border: 1px solid #27394B !important; border-radius: 12px !important; padding: 13px 16px !important; text-align: left !important;
}
.ts-main .desktop-card-shared > div[style*="repeat(3, 1fr)"] > div > div:first-child:empty { display: none; }
.ts-main .desktop-card-shared > div[style*="repeat(3, 1fr)"] > div > div:last-child { margin: 0 !important; font-size: 12px !important; color: var(--ts-sub) !important; }
.ts-main .desktop-card-shared > div[style*="text-align:center"] { text-align: left !important; }
body.theme-light .ts-main .desktop-card-shared :is(.dl-btn-mac, .dl-btn-win), body.theme-light .ts-main .desktop-card-shared > div[style*="repeat(3, 1fr)"] > div {
  background: #F7F9FC !important; border-color: #D5DDE8 !important;
}
body.theme-light .ts-main .desktop-card-shared :is(.dl-btn-mac, .dl-btn-win) > div:nth-child(3) { color: #56677D !important; }
@media (max-width: 1160px) { .ts-einst { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------- Dialoge */
.modal { max-height: calc(100vh - 48px); }
#add-slave-modal .modal { max-width: 560px; width: 100%; }
.modal > p, .modal-content > p { color: var(--ts-muted); font-size: 12px; line-height: 1.55; }
.modal input[type="datetime-local"], .modal input[type="search"], .modal input[type="url"], .modal input[type="tel"],
.ts-main .card input[type="datetime-local"], .ts-main .card input[type="url"], .ts-main .card input[type="tel"] {
  background: #090F18 !important; border: 1px solid #2D3C4C !important; border-radius: 9px !important; color: #E9EEF7 !important;
  outline: none; font-size: 12px !important; padding: 10px 12px !important; min-height: 38px; color-scheme: dark;
}
.ts-main input[type="date"], .ts-main input[type="time"], .modal input[type="date"], .modal input[type="time"] { color-scheme: dark; }
body.theme-light .modal input[type="datetime-local"], body.theme-light .modal input[type="search"], body.theme-light .modal input[type="url"],
body.theme-light .ts-main .card input[type="datetime-local"] { background: #FFFFFF !important; border-color: #C5D0DF !important; color: #152134 !important; color-scheme: light; }
body.theme-light .ts-main input[type="date"], body.theme-light .ts-main input[type="time"],
body.theme-light .modal input[type="date"], body.theme-light .modal input[type="time"] { color-scheme: light; }
/* Knoepfe der Altgestaltung in Dialogen und Karten */
.modal .btn-primary, .modal-bg .btn-primary, .ts-main .btn-primary, .modal button.primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid #5F8FB0 !important;
  background: #1A3449 !important; background-image: none !important; color: #CFECFF !important; border-radius: 9px !important;
  padding: 8px 13px !important; font-size: 13px !important; font-weight: 500 !important; box-shadow: none !important; cursor: pointer;
  text-shadow: none !important; letter-spacing: -.015em; transform: none !important;
}
.modal .btn-primary:hover, .ts-main .btn-primary:hover { background: #20405A !important; border-color: #7DB6DC !important; }
.modal .btn-secondary, .modal-bg .btn-secondary, .ts-main .btn-secondary, .modal button:not([class]):not([style]) {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: #121E2E !important;
  border: 1px solid #34475D !important; border-radius: 9px !important; color: #DBE8F6 !important; padding: 8px 13px !important;
  font-size: 13px !important; font-weight: 400 !important; box-shadow: none !important; cursor: pointer;
}
body.theme-light .modal .btn-primary, body.theme-light .ts-main .btn-primary { background: #E3EEF7 !important; border-color: #9DBFD8 !important; color: #1D4F72 !important; }
body.theme-light .modal .btn-secondary, body.theme-light .ts-main .btn-secondary, body.theme-light .modal button:not([class]):not([style]) {
  background: #F8FAFC !important; border-color: #C5D0DF !important; color: #26354A !important;
}
/* Umschalter, die ihren Zustand ueber ein Stil-Attribut tragen: das Skript
   setzt die Akzentfarbe als Hintergrund. Daraus wird die Markierung des
   Entwurfs - Rahmen und dunkle Flaeche statt einer hellen Vollflaeche. */
.ts-main button[style*="background: rgb(155, 215, 255)"], .ts-main button[style*="background:#9BD7FF"],
.ts-main button[style*="background: rgb(189, 228, 255)"], .ts-main button[style*="background:#BDE4FF"],
.ts-main button[style*="background-color: rgb(155, 215, 255)"], .ts-main button[style*="background-color: rgb(189, 228, 255)"],
.modal button[style*="background: rgb(155, 215, 255)"], .modal button[style*="background:#9BD7FF"],
.modal button[style*="background: rgb(189, 228, 255)"], .modal button[style*="background:#BDE4FF"] {
  background: #1A3449 !important; background-image: none !important; border: 1px solid #5F8FB0 !important; color: #CFECFF !important;
  box-shadow: none !important; font-weight: 500 !important; text-shadow: none !important; transform: none !important;
}
.ts-main button[style*="background: transparent"], .modal button[style*="background: transparent"],
.ts-main button.goal-unit-btn:not([style*="155, 215, 255"]):not([style*="#9BD7FF"]) { color: #AEB9CB !important; }
body.theme-light .ts-main button[style*="background: rgb(155, 215, 255)"], body.theme-light .ts-main button[style*="background:#9BD7FF"],
body.theme-light .ts-main button[style*="background: rgb(189, 228, 255)"], body.theme-light .ts-main button[style*="background:#BDE4FF"],
body.theme-light .modal button[style*="background: rgb(155, 215, 255)"], body.theme-light .modal button[style*="background:#9BD7FF"],
body.theme-light .modal button[style*="background: rgb(189, 228, 255)"], body.theme-light .modal button[style*="background:#BDE4FF"] {
  background: #DDEAF5 !important; border-color: #8FB4D0 !important; color: #152134 !important;
}
body.theme-light .ts-main button[style*="background: transparent"], body.theme-light .modal button[style*="background: transparent"] { color: #44576D !important; }

/* Dialoge, die das Skript zur Laufzeit baut (Journal, Tagebuch, Konto anlegen):
   sie tragen keine .modal-Klasse, nur eine Kennung auf -modal oder -dialog. */
body > div[id$="-modal"] button[style*="background: rgb(155, 215, 255)"], body > div[id$="-modal"] button[style*="background:#9BD7FF"],
body > div[id$="-modal"] button[style*="background: rgb(189, 228, 255)"], body > div[id$="-modal"] button[style*="background:#BDE4FF"],
body > div[id$="-dialog"] button[style*="background: rgb(155, 215, 255)"], body > div[id$="-dialog"] button[style*="background:#9BD7FF"] {
  background: #1A3449 !important; background-image: none !important; border: 1px solid #5F8FB0 !important; color: #CFECFF !important;
  box-shadow: none !important; font-weight: 500 !important; border-radius: 9px !important;
}
body > div[id$="-modal"] .mood-btn { background: #0C1622 !important; border: 1px solid #27394B !important; border-radius: 8px !important; color: #A9B6C8 !important; font-size: 12px !important; }
body > div[id$="-modal"] .mood-btn.on { border-color: #7D9CBA !important; color: #FFFFFF !important; background: linear-gradient(130deg, rgba(89,142,188,.28), rgba(41,61,81,.38)) !important; }
input[type="file"] { color: var(--ts-muted); font-size: 12px; }
input[type="file"]::file-selector-button {
  background: #121E2E; border: 1px solid #34475D; border-radius: 9px; color: #DBE8F6; padding: 7px 12px; margin-right: 10px;
  font: inherit; font-size: 12px; cursor: pointer;
}
input[type="file"]::file-selector-button:hover { border-color: #5F8FB0; color: #FFFFFF; }
body.theme-light input[type="file"]::file-selector-button { background: #F8FAFC; border-color: #C5D0DF; color: #26354A; }
body.theme-light body > div[id$="-modal"] button[style*="background: rgb(155, 215, 255)"],
body.theme-light > div[id$="-modal"] button[style*="background: rgb(155, 215, 255)"], body.theme-light > div[id$="-modal"] button[style*="background:#9BD7FF"],
body.theme-light > div[id$="-dialog"] button[style*="background: rgb(155, 215, 255)"], body.theme-light > div[id$="-dialog"] button[style*="background:#9BD7FF"] {
  background: #DDEAF5 !important; border-color: #8FB4D0 !important; color: #152134 !important;
}
body.theme-light > div[id$="-modal"] .mood-btn { background: #FFFFFF !important; border-color: #C5D0DF !important; color: #44576D !important; }
body.theme-light > div[id$="-modal"] .mood-btn.on { background: #DDEAF5 !important; border-color: #8FB4D0 !important; color: #152134 !important; }

/* ------------------------------------------------ Hellmodus: Farben in Stil-Attributen
   Das Skript schreibt viele Textfarben direkt ans Element - als Hexwert in der
   Vorlage oder (vom Browser umgeschrieben) als rgb(). Auf hellem Grund braucht
   jede davon ihr dunkles Gegenstueck. Erzeugt aus einer Tabelle, nicht von Hand. */
body.theme-light [style*="color:#A9B6C8" i],
body.theme-light [style*="color: #A9B6C8" i],
body.theme-light [style*="color: rgb(169, 182, 200)"],
body.theme-light [style*="color:#B6C1D0" i],
body.theme-light [style*="color: #B6C1D0" i],
body.theme-light [style*="color: rgb(182, 193, 208)"],
body.theme-light [style*="color:#A4B1C1" i],
body.theme-light [style*="color: #A4B1C1" i],
body.theme-light [style*="color: rgb(164, 177, 193)"],
body.theme-light [style*="color:#AEB9CB" i],
body.theme-light [style*="color: #AEB9CB" i],
body.theme-light [style*="color: rgb(174, 185, 203)"] { color: #44576D !important; }
body.theme-light [style*="color:#8190A5" i],
body.theme-light [style*="color: #8190A5" i],
body.theme-light [style*="color: rgb(129, 144, 165)"],
body.theme-light [style*="color:#6F7F95" i],
body.theme-light [style*="color: #6F7F95" i],
body.theme-light [style*="color: rgb(111, 127, 149)"],
body.theme-light [style*="color:#8E9EB2" i],
body.theme-light [style*="color: #8E9EB2" i],
body.theme-light [style*="color: rgb(142, 158, 178)"],
body.theme-light [style*="color:#7D8CA2" i],
body.theme-light [style*="color: #7D8CA2" i],
body.theme-light [style*="color: rgb(125, 140, 162)"],
body.theme-light [style*="color:#8496AA" i],
body.theme-light [style*="color: #8496AA" i],
body.theme-light [style*="color: rgb(132, 150, 170)"] { color: #56677D !important; }
body.theme-light [style*="color:#C5D0DF" i],
body.theme-light [style*="color: #C5D0DF" i],
body.theme-light [style*="color: rgb(197, 208, 223)"],
body.theme-light [style*="color:#DCE4ED" i],
body.theme-light [style*="color: #DCE4ED" i],
body.theme-light [style*="color: rgb(220, 228, 237)"] { color: #33455A !important; }
body.theme-light [style*="color:#E1E8F1" i],
body.theme-light [style*="color: #E1E8F1" i],
body.theme-light [style*="color: rgb(225, 232, 241)"],
body.theme-light [style*="color:#F4F7FB" i],
body.theme-light [style*="color: #F4F7FB" i],
body.theme-light [style*="color: rgb(244, 247, 251)"],
body.theme-light [style*="color:#EDF1F6" i],
body.theme-light [style*="color: #EDF1F6" i],
body.theme-light [style*="color: rgb(237, 241, 246)"],
body.theme-light [style*="color:#E9EEF7" i],
body.theme-light [style*="color: #E9EEF7" i],
body.theme-light [style*="color: rgb(233, 238, 247)"] { color: #152134 !important; }
body.theme-light [style*="color:#E4B587" i],
body.theme-light [style*="color: #E4B587" i],
body.theme-light [style*="color: rgb(228, 181, 135)"],
body.theme-light [style*="color:#D9A066" i],
body.theme-light [style*="color: #D9A066" i],
body.theme-light [style*="color: rgb(217, 160, 102)"],
body.theme-light [style*="color:#E9C08F" i],
body.theme-light [style*="color: #E9C08F" i],
body.theme-light [style*="color: rgb(233, 192, 143)"],
body.theme-light [style*="color:#EBC88F" i],
body.theme-light [style*="color: #EBC88F" i],
body.theme-light [style*="color: rgb(235, 200, 143)"] { color: #8A5E1E !important; }
body.theme-light [style*="color:#9BD7FF" i],
body.theme-light [style*="color: #9BD7FF" i],
body.theme-light [style*="color: rgb(155, 215, 255)"],
body.theme-light [style*="color:#BDE4FF" i],
body.theme-light [style*="color: #BDE4FF" i],
body.theme-light [style*="color: rgb(189, 228, 255)"],
body.theme-light [style*="color:#AEDDFF" i],
body.theme-light [style*="color: #AEDDFF" i],
body.theme-light [style*="color: rgb(174, 221, 255)"],
body.theme-light [style*="color:#B8E2FF" i],
body.theme-light [style*="color: #B8E2FF" i],
body.theme-light [style*="color: rgb(184, 226, 255)"],
body.theme-light [style*="color:#B3E0FF" i],
body.theme-light [style*="color: #B3E0FF" i],
body.theme-light [style*="color: rgb(179, 224, 255)"],
body.theme-light [style*="color:#7ACDF2" i],
body.theme-light [style*="color: #7ACDF2" i],
body.theme-light [style*="color: rgb(122, 205, 242)"],
body.theme-light [style*="color:#CFECFF" i],
body.theme-light [style*="color: #CFECFF" i],
body.theme-light [style*="color: rgb(207, 236, 255)"] { color: #255F86 !important; }
body.theme-light [style*="color:#80C9AB" i],
body.theme-light [style*="color: #80C9AB" i],
body.theme-light [style*="color: rgb(128, 201, 171)"],
body.theme-light [style*="color:#91D4B8" i],
body.theme-light [style*="color: #91D4B8" i],
body.theme-light [style*="color: rgb(145, 212, 184)"],
body.theme-light [style*="color:#94DAB8" i],
body.theme-light [style*="color: #94DAB8" i],
body.theme-light [style*="color: rgb(148, 218, 184)"] { color: #2B7355 !important; }
body.theme-light [style*="color:#EF7D85" i],
body.theme-light [style*="color: #EF7D85" i],
body.theme-light [style*="color: rgb(239, 125, 133)"],
body.theme-light [style*="color:#E69298" i],
body.theme-light [style*="color: #E69298" i],
body.theme-light [style*="color: rgb(230, 146, 152)"],
body.theme-light [style*="color:#E27E85" i],
body.theme-light [style*="color: #E27E85" i],
body.theme-light [style*="color: rgb(226, 126, 133)"],
body.theme-light [style*="color:#EC929B" i],
body.theme-light [style*="color: #EC929B" i],
body.theme-light [style*="color: rgb(236, 146, 155)"],
body.theme-light [style*="color:#F4A7AD" i],
body.theme-light [style*="color: #F4A7AD" i],
body.theme-light [style*="color: rgb(244, 167, 173)"] { color: #B5343E !important; }
body.theme-light .ts-blau, body.theme-light #bot-stat-session, body.theme-light .ts-main .big-num.ts-blau { color: #255F86 !important; }
body.theme-light .ts-seitenkopf p, body.theme-light #ts-unter { color: #5B6C80 !important; }
/* Wochenraster: keine Verlaufsschrift, Gewinn gruen und Verlust rot wie ueberall */
.ts-main .wp-week-num { background: none !important; -webkit-background-clip: border-box !important; background-clip: border-box !important;
  -webkit-text-fill-color: currentColor !important; color: var(--ts-text) !important; letter-spacing: -.02em !important; font-weight: 650 !important; }
.ts-main .wp-day-profit.up, .ts-main .wp-total-profit.up, .ts-main .wp-day-pips.up, .ts-main .wp-day-pct.up { color: var(--ts-pos-text) !important; }
.ts-main .wp-day-profit.down, .ts-main .wp-total-profit.down, .ts-main .wp-day-pips.down, .ts-main .wp-day-pct.down { color: var(--ts-neg-text) !important; }
.ts-order-raster label span, #trade-entry-art { color: #8190A5 !important; }
body.theme-light .ts-order-raster label span, body.theme-light #trade-entry-art { color: #56677D !important; }
body.theme-light .ts-main button[title="ganz schließen"] { color: #B5343E !important; }
body.theme-light .ts-main .wp-day-cell .wp-day-profit.up, body.theme-light .ts-main .wp-total-cell .wp-total-profit.up,
body.theme-light .ts-main .wp-day-profit.up, body.theme-light .ts-main .wp-total-profit.up,
body.theme-light .ts-main .wp-day-pips.up, body.theme-light .ts-main .wp-day-pct.up { color: #2B7355 !important; }
body.theme-light .ts-main .wp-day-cell .wp-day-profit.down, body.theme-light .ts-main .wp-total-cell .wp-total-profit.down,
body.theme-light .ts-main .wp-day-profit.down, body.theme-light .ts-main .wp-total-profit.down,
body.theme-light .ts-main .wp-day-pips.down, body.theme-light .ts-main .wp-day-pct.down { color: #B5343E !important; }

/* Tipps und Befunde: eine ruhige Zeile mit Punkt statt eines Bildzeichens */
.ts-tipp { display: flex; gap: 12px; align-items: flex-start; padding: 13px 0; border-bottom: 1px solid #22303F; }
.ts-tipp:last-child { border-bottom: 0; }
.ts-tipp > i { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex: none; background: var(--ts-blue); }
.ts-tipp b { display: block; font-size: 13px; font-weight: 650; color: var(--ts-text); letter-spacing: -.02em; }
.ts-tipp span { display: block; font-size: 12px; color: var(--ts-muted); margin-top: 3px; line-height: 1.5; }
body.theme-light .ts-tipp { border-bottom-color: #E1E8F0; }

/* ------------------------------------------------ Abgleich mit den Vorschaubildern */
/* Historie: im Kopf nur Alle / Gewinne / Verluste - Anzahl und Sortierung liegen hinter "Filter" */
.ts-main .card[data-card-id="history"] .card-title-row label,
.ts-main .card[data-card-id="history"] .card-title-row select,
.ts-main .card[data-card-id="history"] .card-title-row > div > .btn-sm { display: none !important; }
/* Ueberblick: die Positionskarte traegt nur "Alle anzeigen" */
.ts-main[data-gruppe="overview"] .card[data-card-id="positions"] .btn-close[onclick="closeAll()"],
.ts-main[data-gruppe="overview"] .card[data-card-id="positions"] #frage-zurueck { display: none !important; }
/* Aktualisieren-Knoepfe an Karten, die sich selbst auffrischen */
.ts-main .card[data-card-id="positions-bot"] .card-title-row .btn-sm[onclick="loadBotPositions()"],
.ts-main .card[data-card-id^="prop-rules"] .card-title-row .btn-sm[onclick^="loadPropStatus"] { display: none !important; }
.ts-main .ts-tag[hidden] { display: none !important; }
.ts-sitzung b { color: var(--ts-sub); font-weight: 650; }
.ts-main .card select.ts-tag-wahl, .ts-main .card select.prop-preset { width: auto !important; max-width: 150px; }
#ts-filter-liste select { width: 100%; }

.ts-main #bot-force-sec-btn { background: #121E2E !important; border: 1px solid #6B5536 !important; border-radius: 9px !important; color: #E9C08F !important; font-weight: 500 !important; font-size: 12px !important; }
body.theme-light .ts-main #bot-force-sec-btn { background: #FBF4E8 !important; border-color: #DCC197 !important; color: #8A5E1E !important; }

/* Nachtrag: weitere helle Textfarben aus Stil-Attributen (per Zaehlung gefunden) */
body.theme-light [style*="color:#86D5B5" i],
body.theme-light [style*="color: #86D5B5" i],
body.theme-light [style*="color: rgb(134, 213, 181)"],
body.theme-light [style*="color:#B7E3D1" i],
body.theme-light [style*="color: #B7E3D1" i],
body.theme-light [style*="color: rgb(183, 227, 209)"] { color: #2B7355 !important; }
body.theme-light [style*="color:#B9C6D8" i],
body.theme-light [style*="color: #B9C6D8" i],
body.theme-light [style*="color: rgb(185, 198, 216)"] { color: #44576D !important; }
body.theme-light [style*="color:#E8F4FC" i],
body.theme-light [style*="color: #E8F4FC" i],
body.theme-light [style*="color: rgb(232, 244, 252)"] { color: #152134 !important; }
body.theme-light [style*="color:#F0BABE" i],
body.theme-light [style*="color: #F0BABE" i],
body.theme-light [style*="color: rgb(240, 186, 190)"] { color: #B5343E !important; }
body.theme-light [style*="color:#DEB991" i],
body.theme-light [style*="color: #DEB991" i],
body.theme-light [style*="color: rgb(222, 185, 145)"] { color: #8A5E1E !important; }
body.theme-light [style*="color:#C5E0F2" i],
body.theme-light [style*="color: #C5E0F2" i],
body.theme-light [style*="color: rgb(197, 224, 242)"],
body.theme-light [style*="color:#8ED2FF" i],
body.theme-light [style*="color: #8ED2FF" i],
body.theme-light [style*="color: rgb(142, 210, 255)"] { color: #255F86 !important; }

/* v5.264: Strategie eines Trades, unter dem Symbol der Historie */
.ts-strat-label {
  display: block; max-width: 180px; margin-top: 3px; font-size: 10.5px; font-weight: 600; letter-spacing: .01em;
  color: var(--ts-akzent-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* v5.267: Von Hand geschlossen - kleine Plakette neben der Schliesszeit */
.ts-main .ts-tag.ts-ausstieg {
  padding: 1px 7px; margin-left: 8px; gap: 0; font-size: 10.5px; font-weight: 600; line-height: 1.35;
  vertical-align: 1px; letter-spacing: .01em; cursor: default;
}
/* ... und eines Signals in der Signal-Tabelle */
.ts-sig-strat { color: var(--ts-akzent-text); font-weight: 600; }
.ts-sig-strat::after { content: " \00b7 "; color: var(--ts-muted); font-weight: 400; }

/* =====================================================================
   v5.261 — Handyansicht: Huelle (Dashboard und Nebenseiten)

   Gemeldet am 11.11.2026: "Die Handyansicht muss noch ueberarbeitet werden",
   "oben ist was abgeschnitten", "als Logo nur das Symbol ohne den Text".

   Bis hierher blieb auf dem Handy die Seitenleiste als 58 px breiter
   Streifen aus Symbolen stehen - ein Sechstel der Breite fuer zehn Zeichen
   ohne Beschriftung. Die Kopfzeile war fuer 1700 px gebaut; auf 390 px
   brachen ihre Felder um und ragten oben aus dem Bild.

   Jetzt, bis 760 px:
     oben    Bildzeichen, Kontowahl, Glocke, Nutzer - eine Zeile, die den
             Platz der Statusleiste (Notch) freilaesst
     unten   vier Hauptseiten und "Mehr" - mit dem Daumen erreichbar
     Lade    die Seitenleiste des Entwurfs, vollstaendig und beschriftet,
             faehrt von links herein
   Der Inhalt bekommt die ganze Breite.
   ===================================================================== */

/* Bildzeichen ohne Schriftzug - als Maske, damit es die Textfarbe annimmt
   und es fuer hell und dunkel nur eine Datei braucht. Das Zeichen fuellt in
   seiner Datei gut die Haelfte der Flaeche, deshalb die Vergroesserung. */
.ts-zeichen {
  display: block; width: 30px; height: 30px; flex: none; background: currentColor;
  -webkit-mask: url(/zeichen.svg?v=ef8e0bc1) center / 172% 172% no-repeat; mask: url(/zeichen.svg?v=ef8e0bc1) center / 172% 172% no-repeat;
}
.ts-marke-kurz, .ts-brand .ts-zeichen, .ts-lade-zu, .ts-scrim, .ts-unten { display: none; }

@media (max-width: 760px) {
  html.ts-kein-rollen, html.ts-kein-rollen body { overflow: hidden !important; }
  .ts-shell { display: block !important; min-height: 100vh; min-height: 100dvh; }
  .ts-main { min-height: 100vh; min-height: 100dvh; }
  /* Der Lichtbogen des Entwurfs ist fuer ein breites Fenster gezeichnet. */
  .ts-main::before, .ts-main::after { display: none; }

  /* ------------------------------------------------------------- Lade */
  .ts-side {
    position: fixed !important; top: 0 !important; left: 0; bottom: auto; height: 100vh !important; height: 100dvh !important;
    width: min(304px, 86vw); z-index: 310; transform: translateX(-105%); visibility: hidden;
    transition: transform .26s cubic-bezier(.2,.7,.2,1), visibility 0s linear .26s;
    padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
    border-right: 1px solid #233044;
  }
  .ts-shell.ts-lade-offen .ts-side {
    transform: none; visibility: visible; box-shadow: 30px 0 90px rgba(0,0,0,.6);
    transition: transform .26s cubic-bezier(.2,.7,.2,1), visibility 0s;
  }
  .ts-scrim {
    display: block; position: fixed; inset: 0; z-index: 300; width: 100%; border: 0; padding: 0; margin: 0;
    background: rgba(3,6,10,.62); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); cursor: pointer;
  }
  .ts-scrim[hidden] { display: none; }
  .ts-brand { padding: 14px 14px 18px 20px; justify-content: space-between; gap: 12px; }
  .ts-brand img { display: none !important; }
  .ts-brand .ts-zeichen { display: block; width: 34px; height: 34px; margin-left: -6px; color: #FFFFFF; }
  .ts-lade-zu {
    display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex: none;
    border: 1px solid #2B3A4B; border-radius: 10px; background: linear-gradient(180deg, #111B29, #0B131E);
    color: #EDF3FA; cursor: pointer; padding: 0;
  }
  .ts-lade-zu svg { width: 14px; height: 14px; }
  .ts-side-gruppe { margin: 0 0 18px; }
  .ts-side-gruppe > b { padding: 6px 24px 10px; }
  .ts-side .ts-grp, .ts-side .tabs .tab { padding: 13px 14px !important; font-size: 14px !important; margin-bottom: 3px !important; }
  .ts-side-notiz { margin: 0 17px 16px; }

  /* -------------------------------------------------------- Kopfzeile */
  .ts-main .header {
    height: auto !important; min-height: 0 !important; flex-wrap: nowrap !important; gap: 10px;
    padding: calc(env(safe-area-inset-top, 0px) + 9px) max(14px, env(safe-area-inset-right, 0px)) 9px max(14px, env(safe-area-inset-left, 0px)) !important;
    background: rgba(7,12,19,.9) !important;
  }
  /* Liegt eine Hinweisleiste ueber der Kopfzeile (Demo), nimmt sie den Platz
     der Statusleiste ein - sonst stuende er zweimal da. */
  html.ts-hat-leiste .ts-main .header { padding-top: 9px !important; }
  #demo-banner-top, #demo-banner-oeffentlich { padding-top: calc(env(safe-area-inset-top, 0px) + 8px) !important; }
  .ts-marke-kurz {
    display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 37px; flex: none;
    color: #FFFFFF; text-decoration: none; margin-left: -5px; border-radius: 10px;
  }
  .ts-krumen, .ts-top-sep, .ts-select-strat,
  .ts-main .header #badge-mt5, .ts-main .header #badge-worker, .ts-main .header #badge-symbol { display: none !important; }
  .ts-top-rechts { flex: 1 1 auto; min-width: 0; margin-left: 0; gap: 8px; justify-content: flex-end; flex-wrap: nowrap !important; }
  .ts-main .header #konten-wahl[style*="inline-block"] { display: flex !important; flex: 1 1 auto; min-width: 0; margin-right: auto; }
  .ts-main .header #konten-knopf { min-width: 0 !important; width: auto; max-width: 100%; gap: 10px; padding: 0 12px !important; flex: 0 1 auto; }
  .ts-main .header #konten-knopf .ts-konto-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .ts-main .header #konten-knopf .ts-select-pfeil { flex: none; }
  .ts-klappe, #konten-menu { max-width: calc(100vw - 24px) !important; max-height: calc(100vh - 150px); max-height: calc(100dvh - 150px); }
  #ts-meldungen { width: min(340px, calc(100vw - 24px)) !important; }

  /* ---------------------------------------------------- Leiste unten */
  .ts-unten {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 94;
    background: rgba(8,13,20,.94); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    border-top: 1px solid #1D2A39;
    padding: 6px max(6px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px));
  }
  .ts-unten a, .ts-unten button {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 50px; min-width: 0;
    border: 0; background: transparent; color: #8E9DB1; font: inherit; font-size: 10.5px; font-weight: 500; letter-spacing: 0;
    text-decoration: none; border-radius: 11px; cursor: pointer; padding: 6px 2px 5px; margin: 0;
    -webkit-tap-highlight-color: transparent;
  }
  .ts-unten svg { width: 19px; height: 19px; display: block; flex: none; }
  .ts-unten span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; line-height: 1.2; }
  .ts-unten [aria-current="true"] {
    color: #F7FBFF; font-weight: 650;
    background: linear-gradient(180deg, rgba(26,49,69,.95), rgba(21,37,54,.55));
    box-shadow: inset 0 1px 0 rgba(162,221,255,.55), inset 0 0 0 1px rgba(125,170,205,.14);
  }
  .ts-unten [aria-current="true"] svg { color: var(--ts-blue); }
  /* Platz fuer die Leiste - und fuer die Wischgeste am unteren Rand */
  .ts-screen { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important; }
  #toast, .toast {
    left: 14px !important; right: 14px !important; max-width: none !important;
    bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
  }
  /* Eingabefelder unter 16 px vergroessert iOS beim Antippen die ganze Seite */
  .ts-main input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), .ts-main select, .ts-main textarea,
  .modal input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), .modal select, .modal textarea,
  .ts-klappe select { font-size: 16px !important; }
}

/* Helles Thema */
body.theme-light .ts-marke-kurz, body.theme-light .ts-brand .ts-zeichen { color: #152134; }
body.theme-light .ts-lade-zu { background: #FFFFFF; border-color: #C5D0DF; color: #152134; }
body.theme-light .ts-scrim { background: rgba(21,33,52,.32); }
body.theme-light .ts-unten { background: rgba(255,255,255,.95); border-top-color: #D5DDE8; }
body.theme-light .ts-unten a, body.theme-light .ts-unten button { color: #56677D; }
body.theme-light .ts-unten [aria-current="true"] { color: #152134; background: #E3EEF7; box-shadow: inset 0 0 0 1px #B9D3E6; }
body.theme-light .ts-unten [aria-current="true"] svg { color: #255F86; }
@media (max-width: 760px) {
  body.theme-light .ts-main .header { background: rgba(255,255,255,.93) !important; }
}

/* =====================================================================
   v5.261 — Handyansicht: Inhalt des Dashboards (bis 760 px)

   Die Huelle (Kopfzeile, Lade, Leiste unten) steht in mobil_huelle.css.
   Hier: Seitenkopf, Kennzahlen, Karten - und die beiden Tabellen, die man
   am Handy wirklich liest. Historie und offene Positionen stehen dort als
   Block je Trade statt als Tabelle, von der nur die ersten drei Spalten
   ins Bild passen.
   ===================================================================== */
@media (max-width: 760px) {
  .ts-screen { padding: 16px 14px 26px; }
  .ts-seitenkopf { display: block; margin: 0 0 16px; }
  .ts-seitenkopf h2, #ts-titel { font-size: 26px !important; margin-bottom: 6px !important; }
  .ts-seitenkopf p, #ts-unter { font-size: 13px !important; line-height: 1.45; }
  /* Aktionen: eine Zeile, die sich seitlich schieben laesst, statt umzubrechen */
  .ts-seitenkopf-aktionen {
    margin: 14px -14px 0 0; padding-right: 14px; gap: 8px; flex-wrap: nowrap; overflow-x: auto;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .ts-seitenkopf-aktionen::-webkit-scrollbar { display: none; }
  .ts-seitenkopf-aktionen > * { flex: none; }
  .ts-seitenkopf-aktionen:empty { display: none; }

  /* ------------------------------------------------------ Kennzahlen */
  .ts-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ts-kpi { min-height: 0; padding: 13px 14px 14px; border-radius: 13px; }
  .ts-kpi-label { gap: 8px; font-size: 12px; }
  .ts-kpi-label svg { width: 15px; height: 15px; }
  .ts-kpi-label span { overflow: hidden; text-overflow: ellipsis; }
  /* Die Schriftgroesse setzt tsKpiPassen() so, dass der Wert ganz zu lesen ist. */
  .ts-kpi-wert { font-size: 22px; margin-top: 10px; letter-spacing: -.045em; text-overflow: clip; }
  .ts-kpi-notiz { white-space: normal; line-height: 1.35; }

  /* ----------------------------------------------------------- Karten */
  .ts-screen .view.active { gap: 14px; margin-top: 14px !important; }
  .cardsec, .ts-main[data-gruppe] .cardsec { grid-template-columns: minmax(0, 1fr) !important; gap: 14px; }
  .ts-main .card, .ts-main #chart-container { padding: 16px 15px !important; border-radius: 14px !important; }
  .ts-main .card h2 { font-size: 16px !important; }
  .ts-main .card-title-row { flex-wrap: wrap; gap: 10px 12px; }
  .ts-main .card-title-row > div { flex-wrap: wrap; gap: 8px; min-width: 0; max-width: 100%; }
  .ts-main .card .ts-helfer, .ts-main .card > p:first-of-type { margin: 4px 0 14px !important; }
  /* Reiter und Segmente: seitlich schiebbar, nie abgeschnitten */
  .ts-main .ts-reiter, .ts-main .ts-seg, .ts-main .curve-tabs {
    max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; flex-wrap: nowrap !important;
  }
  .ts-main .ts-reiter::-webkit-scrollbar, .ts-main .ts-seg::-webkit-scrollbar, .ts-main .curve-tabs::-webkit-scrollbar { display: none; }
  .ts-main .ts-reiter > *, .ts-main .ts-seg > *, .ts-main .curve-tabs > * { flex: none; white-space: nowrap; }
  .ts-feats.drei, .ts-feats.vier { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ts-fuss { margin-top: 24px; display: block; line-height: 1.6; }
  .ts-fuss span { display: block; }

  /* Breite Tabellen (Wochenraster, Heatmap, Monate) rollen in ihrer Karte.
     Der weiche Rand rechts zeigt, dass es weitergeht (tsRollHinweis). */
  .ts-main .card div[style*="overflow-x"], .ts-main .card .ts-rollt {
    overflow-x: auto !important; -webkit-overflow-scrolling: touch; max-width: 100%;
  }
  .ts-main .card .ts-mehr-rechts {
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 38px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 38px), transparent);
  }
  .ts-main .card table th, .ts-main .card table td { padding: 10px 8px !important; }
  /* Hinweiszeilen ("Noch keine Eintraege") stehen links - zentriert laegen sie
     in einer breiten Tabelle ausserhalb des Bildes */
  .ts-main .card table td[colspan] { text-align: left !important; white-space: normal; }

  /* --------------------------------------- Historie: ein Block je Trade
     Drei Zeilen: Symbol, Richtung, Lot und rechts das Ergebnis - darunter
     Ein- und Ausstieg mit Kurs, rechts Pips und der Details-Knopf. Die
     beiden Pseudo-Elemente sind die Zeilenumbrueche. */
  .ts-main .card[data-card-id^="history"] table,
  .ts-main .card[data-card-id^="history"] tbody { display: block; width: 100%; min-width: 0 !important; }
  .ts-main .card[data-card-id^="history"] thead { display: none; }
  .ts-main .card[data-card-id^="history"] tbody tr {
    display: flex; flex-wrap: wrap; align-items: center; column-gap: 9px; padding: 13px 0; border-bottom: 1px solid #1B2735;
  }
  .ts-main .card[data-card-id^="history"] tbody tr::before,
  .ts-main .card[data-card-id^="history"] tbody tr::after { content: ""; flex: 0 0 100%; height: 0; }
  .ts-main .card[data-card-id^="history"] tbody tr::before { order: 5; }
  .ts-main .card[data-card-id^="history"] tbody tr::after { order: 8; }
  .ts-main .card[data-card-id^="history"] tbody tr:first-child { padding-top: 4px; }
  .ts-main .card[data-card-id^="history"] tbody tr:last-child { border-bottom: 0; padding-bottom: 2px; }
  .ts-main .card[data-card-id^="history"] tbody td {
    display: block; padding: 0 !important; border: 0 !important; min-width: 0; text-align: left; font-size: 12.5px; background: none !important;
  }
  .ts-main .card[data-card-id^="history"] tbody td[colspan] { flex: 1 1 100%; text-align: center; padding: 18px 0 !important; }
  .ts-main .card[data-card-id^="history"] .ts-z-sym { order: 1; font-size: 14px; }
  .ts-main .card[data-card-id^="history"] .ts-z-sym .ts-archiv { display: inline; margin: 0 0 0 7px; }
  /* v5.264: Strategie in derselben Zeile wie das Symbol */
  .ts-main .card[data-card-id^="history"] .ts-z-sym .ts-strat-label {
    display: inline-block; vertical-align: baseline; max-width: 46vw; margin: 0 0 0 8px;
  }
  .ts-main .card[data-card-id^="history"] .ts-z-typ { order: 2; font-weight: 650; font-size: 11.5px; letter-spacing: .03em; }
  .ts-main .card[data-card-id^="history"] .ts-z-lot { order: 3; color: var(--ts-muted); }
  .ts-main .card[data-card-id^="history"] .ts-z-lot::after { content: " " attr(data-l); }
  .ts-main .card[data-card-id^="history"] .ts-z-pl { order: 4; margin-left: auto; font-size: 15px; font-weight: 690; letter-spacing: -.03em; white-space: nowrap; }
  .ts-main .card[data-card-id^="history"] .ts-z-auf { order: 6; flex: 1 1 0; margin-top: 8px; }
  .ts-main .card[data-card-id^="history"] .ts-z-pips { order: 7; margin: 8px 0 0 auto; color: var(--ts-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
  .ts-main .card[data-card-id^="history"] .ts-z-pips::after { content: " " attr(data-l); }
  .ts-main .card[data-card-id^="history"] .ts-z-zu { order: 9; flex: 1 1 0; margin-top: 6px; }
  .ts-main .card[data-card-id^="history"] .ts-z-akt { order: 10; margin: 6px 0 0 auto; }
  .ts-main .card[data-card-id^="history"] .ts-z-akt:empty { display: none; }
  .ts-main .card[data-card-id^="history"] .ts-zeitzelle { color: #C5D0DF; white-space: nowrap; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
  .ts-main .card[data-card-id^="history"] .ts-zeitzelle::before {
    content: attr(data-l); display: inline-block; width: 44px; font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
    color: var(--ts-muted); font-weight: 650;
  }
  .ts-main .card[data-card-id^="history"] .ts-zeitzelle small { display: inline; margin: 0 0 0 10px; font-size: 11.5px; }
  .ts-main .card[data-card-id^="history"] .ts-detail { min-height: 34px; }
  /* v5.267: "Manuell" steht an der Schliesszeit. Neben dem Knopf "Details"
     passt dann der Schlusskurs nicht mehr in die Zeile - abgeschnitten
     ("18...") hilft er niemandem; in der breiten Ansicht steht er weiter. */
  .ts-main .card[data-card-id^="history"] .ts-zeitzelle .ts-ausstieg { margin-left: 9px; vertical-align: 1px; }
  .ts-main .card[data-card-id^="history"] .ts-zeitzelle .ts-ausstieg ~ small { display: none; }
  .ts-main table[data-filter="g"] tr.ts-v, .ts-main table[data-filter="v"] tr.ts-g { display: none !important; }

  /* ----------------------------- Offene Positionen: ein Block je Position */
  .ts-main .card[data-card-id^="positions"] table,
  .ts-main .card[data-card-id^="positions"] tbody { display: block; width: 100%; min-width: 0 !important; }
  .ts-main .card[data-card-id^="positions"] thead { display: none; }
  .ts-main .card[data-card-id^="positions"] tbody tr {
    display: flex; flex-wrap: wrap; column-gap: 9px; row-gap: 6px; align-items: center; padding: 13px 0; border-bottom: 1px solid #1B2735;
  }
  .ts-main .card[data-card-id^="positions"] tbody tr:first-child { padding-top: 4px; }
  .ts-main .card[data-card-id^="positions"] tbody tr:last-child { border-bottom: 0; padding-bottom: 2px; }
  .ts-main .card[data-card-id^="positions"] tbody td,
  .ts-main .card[data-card-id^="positions"] table td:nth-child(n):not([colspan]) {
    display: block; padding: 0 !important; border: 0 !important; min-width: 0; text-align: left; font-size: 12.5px; background: none !important;
  }
  .ts-main .card[data-card-id^="positions"] tbody td[colspan] { flex: 1 1 100%; }
  .ts-main .card[data-card-id^="positions"] tbody td[colspan="9"],
  .ts-main .card[data-card-id^="positions"] tbody td[colspan="10"] { text-align: center; padding: 18px 0 !important; }
  .ts-main .card[data-card-id^="positions"] tbody td:empty { display: none !important; }
  .ts-main .card[data-card-id^="positions"] tbody tr.ts-posz { row-gap: 0; }
  .ts-main .card[data-card-id^="positions"] tbody tr.ts-posz::before,
  .ts-main .card[data-card-id^="positions"] tbody tr.ts-posz::after { content: ""; flex: 0 0 100%; height: 0; }
  .ts-main .card[data-card-id^="positions"] tbody tr.ts-posz::before { order: 5; }
  .ts-main .card[data-card-id^="positions"] tbody tr.ts-posz::after { order: 9; }
  .ts-main .card[data-card-id^="positions"] .ts-posz td:nth-child(1) { order: 1; font-size: 14px; }
  .ts-main .card[data-card-id^="positions"] .ts-posz td:nth-child(2) { order: 2; font-size: 11.5px; letter-spacing: .03em; }
  .ts-main .card[data-card-id^="positions"] .ts-posz td:nth-child(3) { order: 3; color: var(--ts-muted); }
  .ts-main .card[data-card-id^="positions"] .ts-posz td:nth-child(3)::after { content: " Lot"; }
  .ts-main .card[data-card-id^="positions"] .ts-posz td:nth-child(9) { order: 4; margin-left: auto; font-size: 15px; font-weight: 690; letter-spacing: -.03em; white-space: nowrap; }
  .ts-main .card[data-card-id^="positions"] .ts-posz td:nth-child(4) { order: 6; margin-top: 8px; color: #C5D0DF; font-variant-numeric: tabular-nums; }
  .ts-main .card[data-card-id^="positions"] .ts-posz td:nth-child(5) { order: 7; margin-top: 8px; color: var(--ts-text); font-variant-numeric: tabular-nums; }
  .ts-main .card[data-card-id^="positions"] .ts-posz td:nth-child(5)::before { content: "\2192\00a0"; color: var(--ts-muted); }
  .ts-main .card[data-card-id^="positions"] .ts-posz td:nth-child(8) { order: 8; margin: 8px 0 0 auto; white-space: nowrap; font-variant-numeric: tabular-nums; }
  .ts-main .card[data-card-id^="positions"] .ts-posz td:nth-child(8)::after { content: " Pips"; }
  .ts-main .card[data-card-id^="positions"] .ts-posz td:nth-child(6) { order: 10; margin-top: 6px; color: #C5D0DF; font-variant-numeric: tabular-nums; }
  .ts-main .card[data-card-id^="positions"] .ts-posz td:nth-child(7) { order: 11; margin: 6px 0 0 8px; color: #C5D0DF; font-variant-numeric: tabular-nums; }
  .ts-main .card[data-card-id^="positions"] .ts-posz td:nth-child(4)::before,
  .ts-main .card[data-card-id^="positions"] .ts-posz td:nth-child(6)::before,
  .ts-main .card[data-card-id^="positions"] .ts-posz td:nth-child(7)::before {
    display: inline-block; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ts-muted);
    font-weight: 650; margin-right: 7px;
  }
  .ts-main .card[data-card-id^="positions"] .ts-posz td:nth-child(4)::before { content: "Open"; }
  .ts-main .card[data-card-id^="positions"] .ts-posz td:nth-child(6)::before { content: "SL"; }
  .ts-main .card[data-card-id^="positions"] .ts-posz td:nth-child(7)::before { content: "TP"; }
  .ts-main .card[data-card-id^="positions"] .ts-posz td:nth-child(10) {
    order: 12; flex: 1 1 100%; display: flex !important; flex-wrap: wrap; gap: 7px; white-space: normal !important; margin-top: 11px;
  }
  .ts-main .card[data-card-id^="positions"] .ts-posz td:nth-child(10) .btn-sm {
    margin: 0 !important; padding: 9px 12px !important; font-size: 12.5px !important; min-height: 38px; flex: 1 1 auto;
  }

  /* ------------------------------------------------------ Seitenkopf */
  .ts-seitenkopf-aktionen .ts-seg button { padding: 8px 11px; font-size: 12.5px; }
  .ts-seitenkopf-aktionen #ts-filter-knopf:not(.primaer) span { display: none; }
  .ts-seitenkopf-aktionen #ts-filter-knopf:not(.primaer) { padding-left: 11px !important; padding-right: 11px !important; }

  /* ---------------------------------------------------------- Kurschart
     Zwei Zeilen statt einer: Symbol und Knoepfe, darunter die Zeitrahmen.
     Die Positionsleiste liegt nicht mehr ueber den Kerzen, sondern davor. */
  .ts-main #chart-container { height: auto !important; display: flex; flex-direction: column; padding: 14px 12px 12px !important; }
  .ts-main #mtchart-bar { height: auto !important; flex: none; flex-wrap: wrap; gap: 8px !important; padding: 0 0 10px !important; order: 1; }
  .ts-main #mtchart-sym { order: 1; flex: 1 1 112px; min-width: 0; max-width: none; font-size: 14px !important; padding-left: 4px !important; }
  .ts-main .ts-chart-knoepfe { order: 2; margin-left: 0; gap: 6px; flex: none; }
  .ts-main #mtchart-bar .ts-btn { padding: 8px 8px !important; font-size: 11.5px !important; gap: 5px; }
  .ts-main #mtc-voll > span:first-child { display: none; }
  .ts-main #mtchart-tfs {
    order: 3; flex: 1 1 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; gap: 4px;
  }
  .ts-main #mtchart-tfs::-webkit-scrollbar { display: none; }
  .ts-main #mtchart-tfs button { flex: none; padding: 7px 11px !important; }
  .ts-main #mtchart-ohlc, .ts-main #mtchart-status { display: none !important; }
  .ts-main #mtc-panel {
    position: static !important; order: 2; max-width: none !important; align-items: stretch; margin: 0 0 10px; pointer-events: auto;
  }
  .ts-main #mtc-panel:empty { display: none; }
  .ts-main #mtc-panel .mtc-pos { flex-wrap: wrap; max-width: none; }
  .ts-main #mtchart { order: 3; height: 360px !important; flex: none; }
  .ts-main #mtc-setup { top: 54px; right: 12px; left: 12px; min-width: 0; }
  /* Vollbild, wo der Browser keines kennt (iPhone): die Karte fuellt das Fenster */
  #chart-container.ts-vollbild {
    position: fixed !important; inset: 0; z-index: 400; border-radius: 0 !important; margin: 0 !important; height: auto !important;
    padding: calc(env(safe-area-inset-top, 0px) + 12px) 12px calc(env(safe-area-inset-bottom, 0px) + 12px) !important;
    background: var(--ts-bg) !important;
  }
  #chart-container.ts-vollbild #mtchart { flex: 1 1 auto; height: auto !important; min-height: 0; }

  /* ----------------------------------------------------- Auswertung */
  .ts-vergleich { gap: 18px; padding: 2px 0 4px; }
  .ts-donut { width: 112px; height: 112px; }
  .ts-donut-innen strong { font-size: 24px; }
  .ts-vergleich-zeile { padding: 12px 0; gap: 10px; align-items: flex-start; }
  .ts-vergleich-wert small { display: block; line-height: 1.5; }
  .ts-main .ts-vergleich-wert small span { display: block; }
  /* die Trennpunkte zwischen den drei Angaben entfallen - jede steht in ihrer Zeile */
  .ts-main .ts-vergleich .ts-vergleich-wert small { font-size: 0 !important; }
  .ts-kurve { height: 236px; }
  .ts-main[data-gruppe="analytics"] .cardsec-back { row-gap: 14px; }
}

@media (max-width: 760px) {
  body.theme-light .ts-main .card[data-card-id^="history"] tbody tr,
  body.theme-light .ts-main .card[data-card-id^="positions"] tbody tr { border-bottom-color: #E1E8F0; }
  body.theme-light .ts-main .card[data-card-id^="history"] .ts-zeitzelle,
  body.theme-light .ts-main .card[data-card-id^="positions"] .ts-posz td:nth-child(4),
  body.theme-light .ts-main .card[data-card-id^="positions"] .ts-posz td:nth-child(6),
  body.theme-light .ts-main .card[data-card-id^="positions"] .ts-posz td:nth-child(7) { color: #44576D; }
}


/* ------------------------------------------------ v5.266: Position wird geschlossen */
.ts-main tr[data-schliesst] > td:not(.ts-pos-akt) { opacity: .5; }
.ts-schliesst-text, .mtc-laeuft {
  display: inline-flex; align-items: center; gap: 8px; color: var(--ts-sub, #A9B6C8);
  font-size: 12.5px; font-weight: 550; white-space: nowrap; letter-spacing: -.005em;
}
.mtc-laeuft { font-size: 11px; gap: 6px; padding-top: 2px; }
.ts-dreh {
  width: 12px; height: 12px; border-radius: 50%; border: 1.6px solid currentColor; border-right-color: transparent;
  display: inline-block; flex: none; box-sizing: border-box; animation: tsDreh .8s linear infinite;
}
@keyframes tsDreh { to { transform: rotate(360deg); } }
#positions-body tr.ts-geht, #mtc-panel .ts-geht { opacity: 0; pointer-events: none; transition: opacity .18s ease; }
#mtc-panel .ts-geht {
  max-height: 0 !important; padding-top: 0 !important; padding-bottom: 0 !important; margin: 0 !important; border-width: 0 !important;
  overflow: hidden; transition: opacity .16s ease, max-height .26s ease .04s, padding .26s ease .04s;
}
#frage-was { margin: 2px 0 6px; font-size: 15px; font-weight: 650; letter-spacing: -.015em; color: var(--ts-text); font-variant-numeric: tabular-nums; }
#frage-was[hidden] { display: none; }
/* Der bestaetigende Knopf sah aus wie "Abbrechen" - die rote Fassung galt
   nur in der Seite (.ts-main), nicht im Dialog. Alle Rueckfragen hier sind
   endgueltig: schliessen, loeschen, entfernen. */
#frage-modal .btn-sm.btn-close { border-color: #6F3C48 !important; color: #EC929B !important; background: rgba(160,50,64,.09) !important; }
#frage-modal .btn-sm.btn-close:hover { border-color: #A85563 !important; color: #FFC3C8 !important; }
body.theme-light #frage-modal .btn-sm.btn-close { background: rgba(194,58,69,.06) !important; border-color: #E3A9AE !important; color: #B5343E !important; }
body.theme-light #frage-modal .btn-sm.btn-close:hover { border-color: #C9656F !important; color: #93242E !important; }
@media (prefers-reduced-motion: reduce) {
  .ts-dreh { animation: none; border-right-color: currentColor; opacity: .55; }
  #positions-body tr.ts-geht, #mtc-panel .ts-geht { transition: none; }
}
@media (max-width: 760px) {
  .ts-main .card[data-card-id^="positions"] .ts-posz td.ts-pos-akt .ts-schliesst-text {
    flex: 1 1 100%; justify-content: center; min-height: 38px; box-sizing: border-box;
    border: 1px dashed var(--ts-line2, #2B3A4B); border-radius: 10px;
  }
  /* Gleiche Spezifitaet wie die Regel oben (#positions-body ...), sonst
     gewinnt deren transition und die Zeile springt statt zuzuklappen. */
  #positions-body tr.ts-geht {
    max-height: 0 !important; padding-top: 0 !important; padding-bottom: 0 !important; border-bottom-color: transparent !important;
    overflow: hidden; transition: opacity .16s ease, max-height .26s ease .04s, padding .26s ease .04s;
  }
  /* Rueckfrage als Blatt von unten: der Daumen ist schon dort, und die
     Knoepfe liegen nicht ueber einer Position der Liste. */
  #frage-modal { align-items: flex-end; padding: 0; }
  #frage-modal .modal {
    width: 100% !important; max-width: none !important; min-width: 0 !important; box-sizing: border-box;
    border-radius: 18px 18px 0 0 !important; border-bottom: 0 !important;
    padding: 20px 18px calc(16px + env(safe-area-inset-bottom, 0px)) !important;
    animation: tsBlattHoch .24s cubic-bezier(.16, 1, .3, 1);
  }
  #frage-modal #frage-text { font-size: 14px !important; }
  #frage-modal .btn-sm { min-height: 48px; font-size: 15px !important; font-weight: 600 !important; }
  #frage-modal #frage-merken-zeile { font-size: 13px !important; padding: 4px 0; }
}
@keyframes tsBlattHoch { from { transform: translateY(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { #frage-modal .modal { animation: none !important; } }

/* ---- v5.269: Symbol-Zuordnung je Konto ---- */
/* .ts-btn und .ts-tag setzen display - ohne diese Regel bliebe "hidden" wirkungslos */
.card[data-card-id="symbole-bot"] [hidden] { display: none !important; }
.ts-symz-konto { max-width: 420px; margin: 14px 0 6px; }
.ts-symz-kopf, .ts-symz-zeile {
  display: grid; grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr) 40px; gap: 10px; align-items: center;
}
.ts-symz-kopf { margin-top: 14px; }
.ts-symz-kopf .ts-feldname { margin-bottom: 0; }
.ts-symz-zeile { margin-top: 8px; }
.ts-symz-pfeil { text-align: center; color: var(--ts-muted); }
.ts-main .card .ts-symz-weg { padding: 0; width: 40px; height: 38px; color: var(--ts-dim); }
.ts-main .card .ts-symz-weg:hover { color: var(--ts-neg-text); }
#symz-liste .ts-meldung-leer { margin-top: 12px; border: 1px dashed var(--ts-rand); border-radius: 12px; }
.ts-symz-fuss { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }
.ts-symz-fuss .ts-btn:disabled { opacity: .45; cursor: default; }
.ts-symz-status { font-size: 12px; color: var(--ts-muted); flex: 1 1 220px; min-width: 0; }
.ts-symz-status.ok { color: var(--ts-pos-text); }
.ts-symz-status.warn { color: var(--ts-warn-text); }
.ts-symz-status.fehler { color: var(--ts-neg-text); }
.ts-symz-pruef { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--ts-line); }
.ts-symz-pruefzeile { display: flex; gap: 10px; max-width: 420px; }
.ts-symz-pruefzeile .input { flex: 1 1 auto; min-width: 0; }
.ts-symz-ergebnis { margin-top: 10px; font-size: 12.5px; line-height: 1.55; color: var(--ts-sub); }
.ts-symz-ergebnis .ts-tag { margin-right: 6px; vertical-align: 1px; }
@media (max-width: 760px) {
  .ts-symz-kopf { display: none; }
  .ts-symz-zeile { grid-template-columns: minmax(0, 1fr) 10px minmax(0, 1fr) 38px; gap: 5px; }
  .ts-main .card .ts-symz-zeile .input { padding-left: 9px !important; padding-right: 6px !important; }
  .ts-symz-konto, .ts-symz-pruefzeile { max-width: none; }
}

/* v5.270: Konten-Archiv - Eintraege mit eigener Anordnung */
#archiv-modal .ts-arc-zeile {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto;
  grid-template-areas: "haken text pl aktionen"; align-items: center; column-gap: 12px; row-gap: 10px;
  padding: 12px 14px; margin-bottom: 8px; border: 1px solid var(--ts-rand); border-radius: var(--ts-radius-s);
  background: var(--ts-panel-soft);
}
#archiv-modal .ts-arc-haken { grid-area: haken; display: flex; align-items: center; cursor: pointer; margin: 0; padding: 2px; }
#archiv-modal .ts-arc-haken input { width: 18px; height: 18px; margin: 0; accent-color: var(--ts-pos); cursor: pointer; }
#archiv-modal .ts-arc-text { grid-area: text; min-width: 0; }
#archiv-modal .ts-arc-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: var(--ts-text); font-weight: 600; font-size: 14px; line-height: 1.3; }
#archiv-modal .ts-arc-name > span:first-child { overflow-wrap: anywhere; }
#archiv-modal .ts-arc-name .ts-tag { font-size: 10.5px; padding: 1px 7px; font-weight: 500; }
#archiv-modal .ts-arc-meta { display: flex; flex-direction: column; gap: 1px; margin-top: 3px; font-size: 12px; line-height: 1.45; color: var(--ts-dim); }
#archiv-modal .ts-arc-meta > span { overflow-wrap: anywhere; }
#archiv-modal .ts-arc-pl { grid-area: pl; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 14px; }
#archiv-modal .ts-arc-pl.plus { color: var(--ts-pos-text); }
#archiv-modal .ts-arc-pl.minus { color: var(--ts-neg-text); }
#archiv-modal .ts-arc-aktionen { grid-area: aktionen; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
#archiv-modal .ts-arc-leer { color: var(--ts-muted); text-align: center; padding: 18px; line-height: 1.5; }
#archiv-modal .ts-arc-fehler { color: var(--ts-neg-text); }
body.theme-light #archiv-modal .btn-sm.btn-danger { background: rgba(194,58,69,.06) !important; border-color: #E3A9AE !important; color: #B5343E !important; }
@media (max-width: 760px) {
  #archiv-modal .ts-arc-zeile {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "haken text pl" ". aktionen aktionen";
    align-items: start; column-gap: 10px; padding: 12px;
  }
  #archiv-modal .ts-arc-haken { padding-top: 1px; }
  #archiv-modal .ts-arc-pl { padding-top: 1px; }
  #archiv-modal .ts-arc-aktionen { justify-content: flex-start; }
  #archiv-modal .ts-arc-aktionen .btn-sm { padding: 7px 12px !important; font-size: 12.5px !important; }
}

/* v5.271: Strategien einklappbar */
.ts-strategie .ts-strat-kopf { cursor: pointer; }
.ts-strategie.offen .ts-strat-kopf { margin-bottom: 20px; }
.ts-strategie:not(.offen) .ts-strat-rumpf { display: none; }
.ts-strategie:not(.offen) { padding-top: 14px; padding-bottom: 14px; }
.ts-main .card .ts-strat-klapp {
  display: inline-flex !important; align-items: center; justify-content: center; flex: none;
  width: 28px; height: 28px; min-height: 0 !important; padding: 0 !important; margin: 0;
  border: 1px solid var(--ts-rand-knopf) !important; border-radius: 8px !important;
  background: transparent !important; color: var(--ts-dim) !important; cursor: pointer; box-shadow: none !important;
}
.ts-main .card .ts-strat-klapp:hover { color: var(--ts-text) !important; border-color: #5F8FB0 !important; }
.ts-main .card .ts-strat-klapp:focus-visible { outline: 2px solid var(--ts-blue); outline-offset: 2px; }
.ts-strat-klapp svg { transition: transform .18s ease; }
.ts-strategie.offen .ts-strat-klapp svg { transform: rotate(90deg); }
.ts-strat-ziel-kurz { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-strategie.offen .ts-strat-ziel-kurz { display: none; }
body.theme-light .ts-main .card .ts-strat-klapp:hover { border-color: #2F6F96 !important; }
@media (prefers-reduced-motion: reduce) { .ts-strat-klapp svg { transition: none; } }
@media (max-width: 760px) {
  .ts-strategie:not(.offen) { padding: 12px 14px; }
  /* Schalter und Menue oben rechts neben dem Namen statt in eigener Zeile;
     links bricht um, was nicht passt. "Pausieren" sagt der Schalter selbst. */
  .ts-strategie .ts-strat-kopf { gap: 10px; flex-wrap: nowrap; align-items: flex-start; }
  .ts-strategie .ts-strat-kopf .ts-zeile-links { gap: 6px 10px; flex: 1 1 0; min-width: 0; }
  .ts-strategie .ts-strat-kopf .ts-zeile-rechts { flex: none; gap: 8px; flex-wrap: nowrap; }
  .ts-strategie .ts-strat-kopf .ts-zeile-rechts > .ts-mini { display: none; }
  .ts-main .card .ts-strategie input.ts-strat-name { max-width: 100%; min-width: 0; }
  .ts-strat-ziel-kurz { max-width: 100%; }
}

/* v5.275: Knopf "Auto" - leuchtet, solange die Preisachse automatisch laeuft */
#mtc-auto.on { border-color: #5F8FB0 !important; color: var(--ts-blue) !important; background: rgba(155,215,255,.08) !important; }
body.theme-light #mtc-auto.on { border-color: #2F6F96 !important; color: #1D4F72 !important; background: #E3EEF7 !important; }

/* v5.275: Positionskarte im Bot Dashboard - Umschalter neben der Ueberschrift */
.card[data-card-id="positions-bot"] .ts-botpos-kopf { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; }
.card[data-card-id="positions-bot"] .ts-botpos-kopf h2 { margin: 0; }
.card[data-card-id="positions-bot"] .ts-botpos-tabs button,
.card[data-card-id="positions-bot"] .ts-botpos-anzahl button { padding: 5px 11px; font-size: 12px; }
.card[data-card-id="positions-bot"] [hidden] { display: none !important; }
.card[data-card-id="positions-bot"] .ts-strat-label { display: block; font-size: 10.5px; color: var(--ts-muted); margin-top: 2px; font-weight: 500; }
.card[data-card-id="positions-bot"].ts-botpos-zu #bot-pos-tag { display: none !important; }
/* Die Karte blendet bei geringer Breite Spalten 4, 6-8 der offenen Positionen aus -
   die Tabelle "Geschlossen" hat nur sechs Spalten und braucht alle. */
@media (min-width: 761px) {
  .ts-main .card[data-card-id="positions-bot"] .ts-botpos-kopf-zu th,
  .ts-main .card[data-card-id="positions-bot"] #bot-geschlossen-body td:not([colspan]) { display: table-cell !important; }
  .ts-main .card[data-card-id="positions-bot"] #bot-geschlossen-body td:nth-child(4) { white-space: nowrap; }
}
/* Handy: Block je Trade - oben Symbol, Typ, Lot und Ergebnis, darunter Schliesszeit und Pips */
@media (max-width: 760px) {
  .ts-main .card[data-card-id="positions-bot"] tbody tr.ts-zuz { row-gap: 0; }
  .ts-main .card[data-card-id="positions-bot"] tbody tr.ts-zuz::before { content: ""; flex: 0 0 100%; height: 0; order: 5; }
  .ts-main .card[data-card-id="positions-bot"] .ts-zuz td:nth-child(1) { order: 1; font-size: 14px; }
  .ts-main .card[data-card-id="positions-bot"] .ts-zuz td:nth-child(2) { order: 2; font-size: 11.5px; letter-spacing: .03em; }
  .ts-main .card[data-card-id="positions-bot"] .ts-zuz td:nth-child(3) { order: 3; color: var(--ts-muted); }
  .ts-main .card[data-card-id="positions-bot"] .ts-zuz td:nth-child(3)::after { content: " Lot"; }
  .ts-main .card[data-card-id="positions-bot"] .ts-zuz td:nth-child(6) { order: 4; margin-left: auto; font-size: 15px; font-weight: 690; letter-spacing: -.03em; white-space: nowrap; }
  .ts-main .card[data-card-id="positions-bot"] .ts-zuz td:nth-child(4) { order: 6; margin-top: 7px; color: var(--ts-sub); font-variant-numeric: tabular-nums; }
  .ts-main .card[data-card-id="positions-bot"] .ts-zuz td:nth-child(4)::before { content: "Geschlossen"; display: inline-block; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ts-muted); font-weight: 650; margin-right: 7px; }
  .ts-main .card[data-card-id="positions-bot"] .ts-zuz td:nth-child(5) { order: 7; margin: 7px 0 0 auto; white-space: nowrap; font-variant-numeric: tabular-nums; }
  .ts-main .card[data-card-id="positions-bot"] .ts-zuz td:nth-child(5)::after { content: " Pips"; }
  .ts-main .card[data-card-id="positions-bot"] .ts-zuz .ts-strat-label { display: inline; margin: 0 0 0 6px; }
}

/* v5.276: Knopfleiste des Charts unten rechts (#mtchart-fuss) */
#mtchart-fuss { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding-top: 10px; height: 48px; box-sizing: border-box; }
#mtchart-fuss .ts-chart-knoepfe { margin-left: 0; }
.ts-main #mtchart-fuss .ts-btn { padding: 7px 12px !important; font-size: 12px !important; background: #121E2E !important;
  border: 1px solid #34475D !important; color: #DBE8F6 !important; border-radius: 9px !important; }
.ts-main #mtchart-fuss .ts-btn:hover { border-color: #5F8FB0 !important; color: #FFFFFF !important; }
body.theme-light .ts-main #mtchart-fuss .ts-btn { background: #F8FAFC !important; border-color: #C5D0DF !important; color: #26354A !important; }
.ts-main #mtchart-fuss #mtc-auto.on { border-color: #5F8FB0 !important; color: var(--ts-blue) !important; background: rgba(155,215,255,.08) !important; }
body.theme-light .ts-main #mtchart-fuss #mtc-auto.on { border-color: #2F6F96 !important; color: #1D4F72 !important; background: #E3EEF7 !important; }
#mtc-setup { top: auto; bottom: 58px; right: 20px; }
@media (min-width: 761px) {
  .ts-main #chart-container #mtchart { height: calc(100% - 94px) !important; }
}
@media (max-width: 760px) {
  .ts-main #mtchart-fuss { order: 4; height: auto; padding-top: 10px; flex: none; }
  .ts-main #mtchart-fuss .ts-chart-knoepfe { gap: 6px; }
  .ts-main #mtchart-fuss .ts-btn { padding: 8px 9px !important; font-size: 11.5px !important; gap: 5px; }
  .ts-main #mtc-setup { top: auto; bottom: 60px; right: 12px; left: 12px; min-width: 0; }
}

/* v5.273: Sperre und Balken beim Kontowechsel */
#ts-wechsel-sperre { position: fixed; inset: 0; z-index: 2147483000; cursor: progress; background: transparent; }
#ts-wechsel-sperre .ts-wechsel-balken {
  position: absolute; left: 0; top: 0; height: 2px; width: 40%;
  background: var(--ts-blue); box-shadow: 0 0 8px rgba(155,215,255,.6);
  animation: ts-wechsel-lauf .9s ease-in-out infinite;
}
@keyframes ts-wechsel-lauf { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
@media (prefers-reduced-motion: reduce) {
  #ts-wechsel-sperre .ts-wechsel-balken { animation: none; width: 100%; opacity: .7; }
}

/* v5.279: Strategie bei den offenen Positionen - am Handy neben dem Symbol */
@media (max-width: 760px) {
  .ts-main .card[data-card-id^="positions"] .ts-posz td:nth-child(1) .ts-strat-label {
    display: inline-block; vertical-align: baseline; max-width: 42vw; margin: 0 0 0 8px;
  }
}
