/* Autrionex – Oberfläche: tiefes Dunkelblau über Violett bis Magenta */

:root {
  color-scheme: dark;
  --bg: #060818;
  --panel: rgba(18, 21, 58, .9);
  --panel-2: rgba(27, 31, 80, .88);
  --line: rgba(143, 132, 255, .16);
  --line-2: rgba(173, 143, 255, .34);
  --text: #eef0ff;
  --muted: #9096c8;
  --faint: #626a9e;
  --blue: #5b8cff;
  --violet: #8b5cf6;
  --magenta: #e04df0;
  --pink: #ff4fa3;
  --grad: linear-gradient(135deg, #4f7cff 0%, #8b5cf6 52%, #d946ef 100%);
  --grad-soft: linear-gradient(135deg, rgba(79, 124, 255, .22), rgba(139, 92, 246, .22) 55%, rgba(217, 70, 239, .22));
  --green: #3ee6a8;
  --red: #ff5c8a;
  --warn: #ffb454;
  --accent: var(--violet);
  --hdr: 60px;
  --r: 16px;
  --shadow: 0 6px 18px rgba(3, 4, 28, .45), inset 0 1px 0 rgba(173, 143, 255, .14);
  --fs: 14px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font: var(--fs)/1.45 Inter, -apple-system, "Segoe UI", Roboto, system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  background: var(--bg);
}
/* Eigene Ebene statt background-attachment: fixed, sonst malt der Browser bei jedem Scrollen alles neu */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; transform: translateZ(0);
  background:
    radial-gradient(1100px 640px at 8% -12%, rgba(79, 102, 255, .30), transparent 62%),
    radial-gradient(900px 560px at 104% 6%, rgba(217, 70, 239, .22), transparent 58%),
    radial-gradient(1000px 700px at 48% 125%, rgba(139, 92, 246, .22), transparent 62%),
    linear-gradient(180deg, #080b22, #060818 60%);
}
a { color: #a8b8ff; text-decoration: none; }
a:hover { color: #fff; }
code { background: rgba(139, 92, 246, .16); padding: 1px 6px; border-radius: 6px; font-size: .92em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
h2, h3 { margin: 0; font-weight: 650; letter-spacing: .01em; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(139, 92, 246, .35); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }
* { scrollbar-width: thin; scrollbar-color: rgba(139, 92, 246, .4) transparent; }

.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: .86em; }
.pos { color: var(--green); }
.neg { color: var(--red); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.ic { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Kopfzeile ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  height: var(--hdr); padding: 0 20px;
  display: flex; align-items: center; gap: 18px;
  background: linear-gradient(180deg, rgba(10, 13, 40, .97), rgba(10, 13, 40, .92));
  border-bottom: 1px solid var(--line);
}
.top::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, .75), rgba(217, 70, 239, .75), transparent);
  opacity: .55;
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; color: var(--text); }
.brand .mark {
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
  background: var(--grad); box-shadow: 0 6px 22px rgba(139, 92, 246, .55);
}
.brand .mark .ic { stroke: #fff; width: 19px; height: 19px; }
.brand small { display: block; font-weight: 500; font-size: 11px; color: var(--muted); letter-spacing: .04em; margin-top: -2px; }
.nav { display: flex; gap: 4px; margin-left: 6px; }
.nav a {
  display: flex; align-items: center; gap: 8px; padding: 8px 13px; border-radius: 11px;
  color: var(--muted); font-weight: 550; white-space: nowrap; transition: .15s;
}
.nav a:hover { color: var(--text); background: rgba(139, 92, 246, .14); }
.nav a.on { color: #fff; background: var(--grad-soft); box-shadow: inset 0 0 0 1px var(--line-2); }
.top .spacer { flex: 1; }
.top .tools { display: flex; align-items: center; gap: 10px; }
.top form { margin: 0; }

.iconbtn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; color: var(--muted); transition: .15s; }
.iconbtn:hover { color: #fff; background: rgba(139, 92, 246, .2); }

/* ---------- Bausteine ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 99px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  background: rgba(143, 132, 255, .14); color: #c9cdff; border: 1px solid var(--line); white-space: nowrap;
}
.chip i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.ok { color: var(--green); background: rgba(62, 230, 168, .1); border-color: rgba(62, 230, 168, .28); }
.chip.warn { color: var(--warn); background: rgba(255, 180, 84, .1); border-color: rgba(255, 180, 84, .3); }
.chip.bad { color: var(--red); background: rgba(255, 92, 138, .1); border-color: rgba(255, 92, 138, .3); }
.chip.live { color: #fff; background: linear-gradient(135deg, #ff4f7e, #e04df0); border-color: transparent; }
.chip.paper { color: #c3d2ff; background: rgba(91, 140, 255, .14); border-color: rgba(91, 140, 255, .35); }
.chip.long { color: var(--green); background: rgba(62, 230, 168, .1); border-color: rgba(62, 230, 168, .28); text-transform: none; }
.chip.short { color: var(--red); background: rgba(255, 92, 138, .1); border-color: rgba(255, 92, 138, .3); text-transform: none; }
.chip.lev { color: #e3d4ff; background: rgba(139, 92, 246, .22); border-color: rgba(139, 92, 246, .4); text-transform: none; }
.chip.sm { padding: 2px 8px; font-size: 10.5px; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 650; background: rgba(143, 132, 255, .16); color: #cfd3ff; }
.badge.ok { background: rgba(62, 230, 168, .14); color: var(--green); }
.badge.warn { background: rgba(255, 180, 84, .15); color: var(--warn); }
.badge.short { background: rgba(255, 92, 138, .15); color: var(--red); }
.badge.live { background: linear-gradient(135deg, #ff4f7e, #e04df0); color: #fff; }
.badge.paper { background: rgba(91, 140, 255, .16); color: #c3d2ff; }

button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 0; border-radius: 11px; padding: 8px 15px; font: inherit; font-weight: 650; color: #fff; cursor: pointer;
  background: var(--grad); box-shadow: 0 6px 20px rgba(139, 92, 246, .35); transition: transform .12s, box-shadow .12s, filter .12s;
}
button:hover, .btn:hover { filter: brightness(1.1); box-shadow: 0 8px 26px rgba(217, 70, 239, .4); }
button:active { transform: translateY(1px); }
button.sec { background: rgba(143, 132, 255, .14); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); }
button.sec:hover { background: rgba(143, 132, 255, .24); box-shadow: inset 0 0 0 1px var(--line-2); }
button.danger { background: linear-gradient(135deg, #ff4f7e, #d6336c); box-shadow: 0 6px 20px rgba(255, 79, 126, .3); }
button.ghost { background: transparent; box-shadow: none; color: var(--muted); padding: 7px 10px; }
button.ghost:hover { color: var(--text); background: rgba(143, 132, 255, .14); box-shadow: none; }
button.sm, .btn.sm { padding: 6px 11px; font-size: .9em; text-decoration: none; }
button:disabled { opacity: .5; cursor: default; }

input, select, textarea {
  background: rgba(7, 9, 32, .72); color: var(--text); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 11px; font: inherit; outline: none; transition: border-color .15s, box-shadow .15s; min-width: 0;
}
input:focus, select:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(139, 92, 246, .25); }
input[type=checkbox] {
  appearance: none; width: 38px; height: 22px; padding: 0; border-radius: 99px; position: relative; cursor: pointer;
  background: rgba(143, 132, 255, .2); border: 1px solid var(--line);
}
input[type=checkbox]::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: #c9cdff; transition: .18s;
}
input[type=checkbox]:checked { background: var(--grad); border-color: transparent; }
input[type=checkbox]:checked::after { left: 18px; background: #fff; }

.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
form.inline { display: inline; }

/* ---------- Karten ---------- */
.card {
  position: relative; background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow);
  min-width: 0; contain: layout style;
}
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 11px; min-height: 30px; }
.card-h h2 { display: flex; align-items: center; gap: 9px; font-size: 13px; text-transform: uppercase; letter-spacing: .09em; color: #c9cdff; }
.card-h h2 .ic { color: var(--magenta); }
.card-h .count { color: var(--muted); font-weight: 600; letter-spacing: 0; }
.page .card { margin-bottom: 16px; }
.page .card h2 { margin-bottom: 12px; font-size: 14px; }
.page .card-h h2 { margin: 0; }
.tw { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }

/* Kennzahl-Kacheln (Gewinn/Verlust, Fußzeile der Trades, Trade-Statistik) */
.tiles > div { padding: 6px 11px 7px; border-radius: 11px; background: rgba(6, 8, 30, .45); border: 1px solid rgba(143, 132, 255, .1); min-width: 0; }
.tiles .k { display: block; font-size: 10px; color: var(--faint); text-transform: uppercase; letter-spacing: .09em; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tiles .v { display: flex; align-items: baseline; gap: 6px; font-weight: 700; white-space: nowrap; overflow: hidden; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.stats > div { padding: 10px 14px 11px; border-radius: 12px; }
.stats .v { font-size: 21px; font-weight: 740; letter-spacing: -.01em; margin-top: 2px; }

/* ---------- Tabellen ---------- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 7px 8px; white-space: nowrap; }
th { color: var(--faint); font-weight: 650; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; padding-bottom: 6px; }
td { border-top: 1px solid rgba(143, 132, 255, .09); }
tbody tr:first-child td, table tr:first-child td { border-top: 0; }
tr:hover > td { background: rgba(139, 92, 246, .06); }
td.wrap { white-space: normal; min-width: 220px; }
td.num, th.num { text-align: right; }
table.kv td { padding: 5px 4px; font-size: .94em; white-space: normal; }
table.kv td:first-child { color: var(--muted); width: 40%; }

.lvl-warn { color: var(--warn); }
.lvl-error { color: var(--red); }
.flash {
  background: linear-gradient(135deg, rgba(79, 124, 255, .22), rgba(217, 70, 239, .2)); border: 1px solid var(--line-2);
  padding: 11px 16px; border-radius: 12px; margin-bottom: 16px;
}
.toast {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; max-width: 420px; padding: 12px 18px; border-radius: 14px;
  background: rgba(20, 22, 66, .94); border: 1px solid var(--line-2); box-shadow: 0 14px 44px rgba(3, 4, 28, .7);
  animation: toast 5.5s ease forwards;
}
.toast::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--grad); }
@keyframes toast { 0% { opacity: 0; transform: translateY(14px); } 6%, 90% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(8px); pointer-events: none; } }

/* ---------- Unterseiten (Guthaben, Trader, Einstellungen …) ---------- */
.page { max-width: 1180px; margin: 0 auto; padding: 22px 20px 40px; }
.page .grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.page .grid .card { margin-bottom: 0; }
.page .grid + .card, .page .grid + form.card { margin-top: 16px; }
.kpi .v { font-size: 26px; font-weight: 750; letter-spacing: -.01em; }
.page .grid .kpi { padding: 8px 4px; }
body.embed { background: linear-gradient(180deg, #0a0d2a, #070920); }
body.embed .page { padding: 16px 16px 30px; max-width: none; }

.set-group { margin-bottom: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(8, 10, 34, .35); }
.set-group > summary {
  cursor: pointer; padding: 12px 16px; font-weight: 650; list-style: none; display: flex; align-items: center; gap: 10px; color: #d9dcff;
}
.set-group > summary::-webkit-details-marker { display: none; }
.set-group > summary::before { content: "›"; color: var(--magenta); font-size: 20px; line-height: 1; transition: transform .15s; }
.set-group[open] > summary::before { transform: rotate(90deg); }
.set-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 4px 22px; padding: 4px 16px 14px; }
.field { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 9px 0; border-top: 1px solid rgba(143, 132, 255, .09); }
.field .lbl { min-width: 0; }
.field .lbl b { font-weight: 600; }
.field .lbl .help { color: var(--muted); font-size: 12px; line-height: 1.35; margin-top: 2px; }
.field input:not([type=checkbox]) { width: 110px; text-align: right; flex: none; }
.field input.wide { width: 170px; text-align: left; }

/* ---------- Anmeldung ---------- */
body.login { display: grid; place-items: center; padding: 20px; }
.login-card {
  width: 100%; max-width: 380px; padding: 34px 30px 28px; display: grid; gap: 14px;
}
.login-card .mark { width: 54px; height: 54px; border-radius: 17px; margin: 0 auto 4px; display: grid; place-items: center; background: var(--grad); box-shadow: 0 10px 34px rgba(139, 92, 246, .6); }
.login-card .mark .ic { stroke: #fff; width: 28px; height: 28px; }
.login-card h1 { margin: 0; text-align: center; font-size: 21px; }
.login-card p { margin: -6px 0 6px; text-align: center; color: var(--muted); font-size: 13px; }
.login-card input { padding: 11px 14px; }
.login-card button { padding: 12px; margin-top: 4px; }
.login-card .login-alt { margin: 4px 0 0; }
.login-card .login-alt a { color: #c9b8ff; font-weight: 650; }
.err { color: var(--red); background: rgba(255, 92, 138, .1); border: 1px solid rgba(255, 92, 138, .3); border-radius: 10px; padding: 9px 12px; font-size: 13px; }

/* ---------- Übersicht: eine Seite ohne Scrollen ---------- */
body.app { height: 100vh; overflow: hidden; }
.dash {
  height: calc(100vh - var(--hdr)); padding: 16px 20px 20px;
  display: grid; gap: 16px; min-height: 0;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: auto minmax(0, 1.1fr) minmax(0, 1fr);
}
.dash > .card { display: flex; flex-direction: column; min-height: 0; padding: 14px 16px; }
.dash .body { flex: 1; min-height: 0; overflow: auto; margin: 0 -6px; padding: 0 6px; }
.dash .body.fit { overflow: hidden; position: relative; }
.more { padding-top: 7px; text-align: center; font-size: 11.5px; color: var(--faint); letter-spacing: .02em; }

.kpis { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.kpis .card { padding: 13px 16px 12px; overflow: hidden; }
.kpis .lab { font-size: 10.5px; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: .1em; display: flex; align-items: center; gap: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpis .lab .ic { color: var(--magenta); width: 14px; height: 14px; }
.kpis .val { font-size: 25px; font-weight: 760; letter-spacing: -.015em; margin-top: 3px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpis .val.soft { font-size: 19px; padding: 3px 0; color: var(--muted); font-weight: 700; }
.kpis .val small { font-size: .52em; font-weight: 600; color: var(--muted); margin-left: 3px; letter-spacing: 0; }
.kpis .sub { font-size: 12px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meter { height: 5px; border-radius: 5px; background: rgba(143, 132, 255, .16); margin-top: 8px; overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 5px; background: var(--grad); min-width: 3px; }
.meter.hot i { background: linear-gradient(90deg, #ffb454, #ff4f7e); }

/* Büro: die vier Agents bei der Arbeit (office.js) */
.office { grid-column: span 4; }
.office .card-h { margin-bottom: 8px; }
.office-state { font-size: 11.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.office-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.office-state.off i { background: var(--faint); box-shadow: none; }
.office-learn { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 7px;
  border-radius: 99px; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; color: #fff;
  background: rgba(12, 14, 40, .8); box-shadow: 0 0 0 1px rgba(143, 132, 255, .35); transition: background .15s; }
.office-learn .ic { width: 13px; height: 13px; color: var(--magenta); }
.office-learn b { padding: 0 6px; border-radius: 99px; font-size: 10.5px; background: rgba(139, 92, 246, .45); }
.office-learn:hover { background: rgba(60, 40, 130, .92); }
.office-stage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden; border-radius: 12px; background: #1d1d33; box-shadow: inset 0 0 0 1px rgba(143, 132, 255, .12); }
.office-stage canvas { display: block; }
.office-ui { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; --s: 2; }
.o-tag { position: absolute; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px 1px 5px; border-radius: 99px; font-size: clamp(8.5px, calc(var(--s) * 4.6px), 12px); font-weight: 700; letter-spacing: .02em; white-space: nowrap; color: #fff; background: rgba(12, 14, 40, .78); }
.o-tag i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); box-shadow: 0 0 6px var(--c); }
.o-tag.err { outline: 1px solid var(--red); }
.o-pop { position: absolute; transform: translate(-50%, -50%); font-size: calc(var(--s) * 8px); font-weight: 800; letter-spacing: -.01em; white-space: nowrap; padding: 1px 8px; border-radius: 8px; background: rgba(10, 12, 40, .82); box-shadow: 0 0 0 1px currentColor, 0 0 16px currentColor; text-shadow: 0 1px 0 rgba(0, 0, 0, .6); animation: o-pop 2.6s cubic-bezier(.2, .8, .3, 1) forwards; }
@keyframes o-pop { 0% { transform: translate(-50%, -20%) scale(.2); opacity: 0; } 10% { transform: translate(-50%, -55%) scale(1.3); opacity: 1; } 24% { transform: translate(-50%, -60%) scale(1); opacity: 1; } 75% { opacity: 1; } 100% { transform: translate(-50%, -190%) scale(.95); opacity: 0; } }

/* Gewinn / Verlust */
.pnl { grid-column: span 4; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: rgba(6, 8, 30, .6); border: 1px solid var(--line); gap: 2px; }
.seg a, .seg button {
  background: transparent; box-shadow: none; color: var(--muted); padding: 5px 13px; border-radius: 9px; font-size: 12.5px; font-weight: 700;
}
.seg a { display: inline-flex; align-items: center; }
.seg button:hover, .seg a:hover { color: #fff; filter: none; box-shadow: none; }
.seg .on { background: var(--grad); color: #fff; box-shadow: 0 4px 16px rgba(139, 92, 246, .5); }
.pnl-top { display: flex; align-items: baseline; gap: 12px; margin: 2px 0 0; flex-wrap: wrap; }
.pnl-val { font-size: clamp(26px, 3.1vh, 38px); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; white-space: nowrap; }
.pnl-pct { font-size: 15px; font-weight: 700; padding: 2px 10px; border-radius: 99px; background: rgba(143, 132, 255, .12); }
.pnl-pct.pos { background: rgba(62, 230, 168, .12); }
.pnl-pct.neg { background: rgba(255, 92, 138, .12); }
.pnl-note { font-size: 11.5px; color: var(--faint); margin-top: 1px; min-height: 16px; }
.pnl-note.warn { color: var(--warn); }
.pnl-market { display: flex; align-items: center; gap: 8px; font-size: 12px; margin-top: 3px; white-space: nowrap; overflow: hidden; }
.pnl-market b { font-weight: 700; }
.pnl-spark { position: relative; flex: 0 0 64px; width: 64px; height: 18px; }
/* Laufband: alle Coins zweimal hintereinander, wandert nach rechts; bei Mauszeiger steht es */
.mk-view { flex: 1; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent); }
.mk-track { display: inline-flex; animation: mk-roll calc(var(--n, 1) * 7s) linear infinite; will-change: transform; }
.mk-view:hover .mk-track { animation-play-state: paused; }
.mk-item { display: inline-flex; align-items: center; gap: 6px; margin-right: 26px; }
@keyframes mk-roll { from { transform: translateX(-50%); } to { transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) { .mk-track { animation: none; } }
.pnl-chart { position: relative; flex: 1; min-height: 56px; margin: 6px 0 10px; }
.pnl-chart svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.pnl-chart .tip {
  position: absolute; pointer-events: none; transform: translate(-50%, -100%); padding: 5px 10px; border-radius: 9px; font-size: 12px;
  background: rgba(10, 12, 44, .95); border: 1px solid var(--line-2); white-space: nowrap; opacity: 0; transition: opacity .12s; z-index: 2;
}
.pnl-chart .empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); font-size: 12.5px; }
.pnl-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pnl-stats .v b { font-size: 14.5px; font-weight: 700; }
.pnl-stats .v small { font-size: 11px; color: var(--muted); }

/* Aktive Trades */
.active { grid-column: span 8; container-type: inline-size; }
.active table td { padding-top: 5px; padding-bottom: 5px; }
.foot { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.foot .v { font-size: 15px; }
.active thead th { position: sticky; top: 0; z-index: 1; background: #11153d; }
@container (max-width: 1000px) { .c-since { display: none; } }
@container (max-width: 860px) { .c-trend { display: none; } }
@container (max-width: 730px) { .c-value { display: none; } }
@container (max-width: 560px) { .c-entry, .c-sig { display: none; } }
.active tr.go { cursor: pointer; }
.coin { display: flex; align-items: center; gap: 8px; }
.coin b { font-size: 15px; }
.mini { width: 112px; height: 32px; display: block; }
.pl-main { font-weight: 750; font-size: 14.5px; }
.sig { display: inline-flex; align-items: center; gap: 6px; }
.sig .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.sig.bull .dot { background: var(--green); }
.sig.bear .dot { background: var(--red); }
.empty-state { height: 100%; min-height: 80px; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 10px 30px; line-height: 1.5; }
.empty-state b { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }

/* Untere Reihe */
.traders { grid-column: span 2; }
.recent, .activity { grid-column: span 3; }
/* Übersicht eines Mitglieds: Kennzahlen, Büro und Gewinn/Verlust, darunter seine Trades */
.member .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.member .office, .member .pnl { grid-column: span 6; }
.member .recent { grid-column: 1 / -1; }
.spark { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.spark.up { color: var(--green); }
.spark.down { color: var(--red); }
.sigs { margin: 4px 0 0; padding: 0 0 0 16px; font-size: 12.5px; color: var(--muted); }
.sigs li { margin: 2px 0; }
.log-row { display: grid; grid-template-columns: 44px 1fr; gap: 8px; padding: 5px 0; border-top: 1px solid rgba(143, 132, 255, .08); font-size: 12.5px; line-height: 1.35; }
.log-row:first-child { border-top: 0; }
.log-row .t { color: var(--faint); }
.log-row .m { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.trow { display: grid; grid-template-columns: 42px 1fr auto; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid rgba(143, 132, 255, .08); font-size: 13px; }
.trow:first-child { border-top: 0; }
.trow .t { color: var(--faint); font-size: 12px; }
.trow .c { min-width: 0; }
.trow .c b { font-weight: 700; }
.trow .c small { color: var(--muted); margin-left: 6px; }
.trow .c small.buy { color: var(--green); font-weight: 650; }
.trow .c .sold { display: block; margin-top: 1px; font-size: 11px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow .c .sold b { color: var(--red); font-weight: 650; }
.trader-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 7px 0; border-top: 1px solid rgba(143, 132, 255, .08); }
.trader-row:first-child { border-top: 0; }
.trader-row .n { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trader-row .s { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Seitenleiste (Guthaben, Trader …) und Detailansicht ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; display: none; }
.overlay.open { display: block; }
.overlay .veil { position: absolute; inset: 0; background: rgba(3, 4, 20, .62); animation: fade .2s; }
.drawer {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(880px, 100vw); display: flex; flex-direction: column;
  background: linear-gradient(180deg, #0d1034, #090b27); border-left: 1px solid var(--line-2);
  box-shadow: -10px 0 28px rgba(2, 3, 20, .6); animation: slide .24s cubic-bezier(.2, .8, .2, 1);
}
.drawer header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.drawer header h3 { font-size: 15px; display: flex; align-items: center; gap: 10px; }
.drawer header h3 .ic { color: var(--magenta); }
.drawer header .drawer-export { margin-left: auto; margin-right: 10px; display: inline-flex; align-items: center; gap: 6px; }
.drawer header .drawer-export[hidden] { display: none; }
.drawer header .drawer-key { margin-left: 14px; margin-right: auto; }
.drawer header .drawer-key[hidden] { display: none; }
.drawer header .drawer-key button { display: inline-flex; align-items: center; gap: 6px; }
.key-new { margin: 6px 0 10px; padding: 10px 12px; border-radius: 10px; background: rgba(62, 230, 168, .1); border: 1px solid rgba(62, 230, 168, .35); }
.key-new code { font-size: 15px; font-weight: 750; letter-spacing: .04em; margin: 0 8px; user-select: all; }
.drawer iframe { flex: 1; width: 100%; border: 0; background: transparent; }
.modal {
  position: absolute; top: 50%; left: 50%; width: min(620px, 94vw); max-height: 90vh; overflow: auto; transform: translate(-50%, -50%);
  background: linear-gradient(180deg, #11154a, #0a0d2e); border: 1px solid var(--line-2); border-radius: 20px; padding: 20px 22px;
  box-shadow: 0 14px 36px rgba(2, 3, 20, .7); animation: pop .2s cubic-bezier(.2, .8, .2, 1);
}
.modal .tchart { width: 100%; height: auto; display: block; margin: 10px 0; border-radius: 12px; background: rgba(6, 8, 30, .5); }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
@keyframes pop { from { transform: translate(-50%, -46%) scale(.97); opacity: 0; } }

/* ---------- Kleinere Bildschirme ---------- */
@media (max-height: 900px) and (min-width: 1100px) {
  :root { --fs: 13px; --hdr: 54px; }
  .dash { padding: 12px 16px 14px; gap: 12px; }
  .kpis { gap: 12px; }
  .kpis .val { font-size: 21px; }
  .kpis .card { padding: 10px 14px 9px; }
  .dash > .card { padding: 11px 14px; }
  .mini { height: 26px; width: 96px; }
  .coin b { font-size: 14px; }
  .active table td { padding-top: 3px; padding-bottom: 3px; }
  .pnl-stats > div { padding: 4px 10px 5px; }
  .pnl-note:not(.warn) { display: none; }
  .pnl-spark { display: none; }
  .foot { display: none; }
}
@media (max-height: 780px) and (min-width: 1100px) {
  .dash { grid-template-rows: auto minmax(0, 1fr) minmax(0, 1fr); }
  .pnl-market { display: none; }
  .kpis .card { padding: 8px 13px 7px; }
  .kpis .val { font-size: 19px; }
  .kpis .val.soft { font-size: 17px; padding: 2px 0; }
  .kpis .sub { font-size: 11.5px; margin-top: 1px; }
  .card-h { min-height: 26px; margin-bottom: 7px; }
  .active table td { padding-top: 2px; padding-bottom: 2px; }
  .pl-main { font-size: 13.5px; }
  .pnl-val { font-size: 25px; }
}
@media (max-width: 1500px) and (min-width: 1100px) {
  .nav a span { display: none; }
  .nav a { padding: 8px 11px; }
  .kpis .val { font-size: 22px; }
}
@media (max-width: 1099px), (max-height: 620px) {
  body.app { height: auto; overflow: auto; }
  .dash { height: auto; display: flex; flex-direction: column; padding: 14px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash > .card { min-height: 260px; }
  .office-stage { flex: none; aspect-ratio: 1358 / 1092; }
  .pnl-chart { min-height: 150px; }
  .top { padding: 0 12px; gap: 10px; overflow-x: auto; }
  .nav a span, .brand small { display: none; }
}
@media (max-width: 560px) {
  .top .tools .chip { display: none; }
  .pnl-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field { flex-direction: column; align-items: stretch; }
  .field input:not([type=checkbox]) { width: 100%; text-align: left; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Gelerntes (Notizbuch der Agents, lessons.py) ---------- */
.lesson-h { flex-wrap: wrap; row-gap: 2px; }
.lesson-h h2 { white-space: nowrap; }
.lesson-focus { margin: 0 0 8px; padding: 8px 11px; border-radius: 11px; background: rgba(139, 92, 246, .12); font-size: 13px; line-height: 1.4; }
.lesson-sum { margin-bottom: 4px; }
.lesson { padding: 9px 0; border-top: 1px solid rgba(143, 132, 255, .08); }
.lesson-t { font-size: 13.5px; line-height: 1.4; }
.lesson-m { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 5px; font-size: 11.5px; color: var(--muted); }
.wbar { display: inline-block; width: 46px; height: 5px; border-radius: 99px; background: rgba(143, 132, 255, .16); overflow: hidden; }
.wbar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #4f7cff, #e04df0); }

/* ---------- Popout: schwebendes Fenster mit Gewinn/Verlust und Büro ---------- */
.popout-btn { cursor: pointer; font: inherit; font-size: 11px; }
.popout-btn .ic { width: 13px; height: 13px; }
.popout-btn[aria-pressed="true"] { color: #fff; background: var(--grad-soft); border-color: var(--line-2); }
.float-win { position: fixed; z-index: 60; display: flex; flex-direction: column; width: 380px; height: 560px;
  min-width: 260px; min-height: 300px; max-width: calc(100vw - 16px); max-height: calc(100vh - 16px);
  background: rgba(14, 16, 48, .97); border: 1px solid var(--line-2); border-radius: 16px; overflow: hidden;
  box-shadow: 0 18px 50px rgba(3, 4, 28, .75); resize: both; }
.float-win[hidden] { display: none; }
.float-win.ghost { opacity: 0; pointer-events: none; left: 0 !important; top: 0 !important; width: 1400px !important;
  height: 1500px !important; max-width: none; max-height: none; resize: none; }   /* groß: Büro in voller Auflösung fürs Bild-im-Bild */
.float-win.locked { resize: none; }
.float-win .fw-bar { display: flex; align-items: center; gap: 8px; padding: 7px 8px 7px 12px; cursor: grab; user-select: none;
  touch-action: none; font-size: 12px; font-weight: 650; color: #d9dcff; border-bottom: 1px solid var(--line); }
.float-win.locked .fw-bar { cursor: default; }
.float-win.dragging .fw-bar { cursor: grabbing; }
.float-win .fw-bar .ic { width: 14px; height: 14px; color: var(--magenta); }
.float-win .fw-home { display: inline-flex; align-items: center; gap: 8px; padding: 2px 6px; margin-left: -6px; border-radius: 8px;
  background: transparent; box-shadow: none; color: inherit; font: inherit; cursor: pointer; }
.float-win .fw-home:hover { background: rgba(143, 132, 255, .16); }
.float-win .fw-grab { flex: 1; align-self: stretch; }
.float-win iframe { flex: 1; width: 100%; border: 0; background: transparent; }
.float-win.dragging iframe { pointer-events: none; }
.float-win .fw-foot { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.fw-btn { display: inline-grid; place-items: center; width: 26px; height: 26px; padding: 0; border-radius: 8px; background: transparent;
  box-shadow: none; color: var(--muted); cursor: pointer; }
.fw-btn:hover { color: #fff; background: rgba(143, 132, 255, .18); }
.fw-btn .ic { width: 15px; height: 15px; }
.fw-btn.on { color: var(--warn); }
body.popout { height: 100vh; overflow: hidden; }
body.popout .popout-dash { display: flex; flex-direction: column; gap: 8px; padding: 8px; height: 100vh; }
body.popout .popout-dash > .card { grid-column: auto; padding: 9px 11px; min-height: 0; }
body.popout .popout-dash .card-h { margin-bottom: 4px; gap: 8px; }
body.popout .popout-dash .card-h h2 { white-space: nowrap; font-size: 12px; }
body.popout .popout-dash .seg button { padding: 3px 8px; font-size: 11.5px; }
body.popout .popout-dash .pnl { flex: 0 0 auto; }
body.popout .popout-dash .pnl-val { font-size: 22px; }
body.popout .popout-dash .pnl-chart { height: 72px; min-height: 0; flex: none; margin: 4px 0 2px; }
body.popout .popout-dash .office { flex: 1 1 auto; }
body.popout .popout-dash .office-stage { flex: 1; aspect-ratio: auto; min-height: 120px; }
body.popout .pnl-top { flex-wrap: wrap; row-gap: 2px; }
.popout-open { margin-left: auto; font-size: 11.5px; color: var(--muted); align-self: center; }
.popout-open.pos { color: var(--green); }
.popout-open.neg { color: var(--red); }
@media (max-width: 640px) { .popout-btn { padding: 3px 7px; } .popout-btn .lab { display: none; } }
@media (max-width: 560px) { .top .tools .chip.popout-btn { display: inline-flex; } }

/* Schalter intensives / sparsames Lernen unter „Gelerntes“ */
.office-learn-mode { position: absolute; top: 40px; right: 8px; margin: 0; }
.office-learn-mode button { display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px 3px 4px; border-radius: 99px;
  font-size: 11px; font-weight: 700; color: #c9cdff; background: rgba(12, 14, 40, .8); box-shadow: 0 0 0 1px rgba(143, 132, 255, .35); cursor: pointer; }
.office-learn-mode button:hover { background: rgba(60, 40, 130, .92); }
.office-learn-mode i { position: relative; width: 26px; height: 15px; border-radius: 99px; background: rgba(143, 132, 255, .25); transition: background .15s; }
.office-learn-mode i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: #9aa0d6; transition: transform .15s, background .15s; }
.office-learn-mode .on i { background: rgba(62, 230, 168, .35); }
.office-learn-mode .on i::after { transform: translateX(11px); background: var(--green); }
.office-learn-mode .on { color: #fff; }

/* ---------- Startseite für Besucher (landing.html) ---------- */
body.landing { min-height: 100vh; }
.landing a.btn { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.landing .btn.ghost { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--text); }
.landing .btn.ghost:hover { background: rgba(143, 132, 255, .14); }
.l-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 24px; height: 64px; padding: 0 max(20px, calc((100vw - 1180px) / 2));
  background: rgba(6, 8, 24, .78); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.l-nav { display: flex; gap: 22px; margin-left: 12px; }
.l-nav a { color: var(--muted); font-size: 14px; font-weight: 600; }
.l-nav a:hover { color: var(--text); }
.l-actions { margin-left: auto; display: flex; gap: 10px; }
.landing main { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.l-hero { display: grid; grid-template-columns: 1fr 1.05fr; gap: 48px; align-items: center; padding: 64px 0 40px; }
.l-kicker { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #c9b8ff;
  padding: 5px 12px; border-radius: 99px; background: var(--grad-soft); box-shadow: inset 0 0 0 1px var(--line-2); }
.l-name { margin: 18px 0 0 !important; font-size: 15px !important; color: var(--muted); }
.l-name b { color: var(--text); letter-spacing: .02em; }
.l-hero h1 { font-size: clamp(32px, 4.4vw, 52px); line-height: 1.08; letter-spacing: -.02em; margin: 18px 0 16px; }
.l-hero h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.l-hero p { color: var(--muted); font-size: 16.5px; line-height: 1.6; max-width: 540px; }
.l-poem { margin: 0 0 22px; padding: 4px 0 4px 18px; border-left: 3px solid #a463ff; max-width: 540px; }
.l-poem p { font-style: italic; color: #d9d2f5; font-size: 15.5px; line-height: 1.65; margin: 0 0 10px; }
.l-poem footer { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #c9b8ff; }
.l-cta { display: flex; gap: 12px; margin: 26px 0 12px; flex-wrap: wrap; }
.l-cta .btn { padding: 12px 22px; font-size: 15px; }
.l-closed { margin: 4px 0 0; padding: 10px 14px; border-radius: 12px; font-size: 14px !important; max-width: 540px;
  background: rgba(255, 92, 106, .08); box-shadow: inset 0 0 0 1px rgba(255, 92, 106, .3); }
.l-closed b { color: #ff9aa3; }
.l-note { font-size: 13px !important; color: var(--faint) !important; }
.l-office { margin: 0; }
.l-office img { display: block; width: 100%; height: auto; border-radius: 18px; image-rendering: auto;
  box-shadow: 0 30px 80px rgba(80, 40, 200, .35), 0 0 0 1px var(--line-2); }
.l-office figcaption { margin-top: 10px; font-size: 13px; color: var(--faint); text-align: center; }
.l-section { padding: 56px 0 8px; scroll-margin-top: 70px; }
.l-section h2 { font-size: 30px; letter-spacing: -.01em; margin: 0 0 10px; }
.l-lead { color: var(--muted); font-size: 16px; max-width: 720px; line-height: 1.6; margin: 0 0 26px; }
.l-agents { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.l-agents article { padding: 20px; border-radius: var(--r); background: var(--panel); box-shadow: var(--shadow); border-top: 3px solid var(--c); }
.l-agents h3 { margin: 12px 0 8px; font-size: 17px; }
.l-agents p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.l-dot { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--c);
  background: color-mix(in srgb, var(--c) 18%, transparent); box-shadow: 0 0 22px color-mix(in srgb, var(--c) 30%, transparent); }
.l-dot .ic { width: 20px; height: 20px; }
.l-steps { list-style: none; counter-reset: s; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.l-steps li { counter-increment: s; padding: 20px 20px 20px 66px; position: relative; border-radius: var(--r); background: var(--panel); box-shadow: var(--shadow); }
.l-steps li::before { content: counter(s); position: absolute; left: 18px; top: 18px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; background: var(--grad); color: #fff; }
.l-steps b { display: block; margin-bottom: 6px; }
.l-steps span { color: var(--muted); font-size: 14px; line-height: 1.55; }
.l-feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 20px; }
.l-feats div { padding: 20px; border-radius: var(--r); background: var(--panel); box-shadow: var(--shadow); display: grid; gap: 6px; }
.l-feats .ic { width: 22px; height: 22px; color: var(--magenta); }
.l-feats span { color: var(--muted); font-size: 14px; line-height: 1.55; }
.l-risk { margin: 26px 0 0; padding: 14px 16px; border-radius: 12px; font-size: 13px; color: var(--muted); line-height: 1.55;
  background: rgba(255, 180, 84, .07); box-shadow: inset 0 0 0 1px rgba(255, 180, 84, .28); }
.l-beta { display: flex; width: fit-content; align-items: center; gap: 8px; margin: 10px 0 0 0; padding: 5px 12px; border-radius: 99px; font-size: 12.5px;
  font-weight: 600; color: #ffd28a; background: rgba(255, 180, 84, .1); box-shadow: inset 0 0 0 1px rgba(255, 180, 84, .35); }
.l-beta i { width: 8px; height: 8px; border-radius: 50%; background: #ffb454; box-shadow: 0 0 10px #ffb454; animation: l-blink 1.6s ease-in-out infinite; }
@keyframes l-blink { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .l-beta i { animation: none; } }
.l-dev { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.l-dev > div { padding: 20px; border-radius: var(--r); background: var(--panel); box-shadow: var(--shadow); }
.l-dev b { display: inline-block; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 99px; }
.l-dev b.ok { color: #3ee68a; background: rgba(62, 230, 138, .1); }
.l-dev b.wip { color: #ffb454; background: rgba(255, 180, 84, .1); }
.l-dev b.next { color: #9db4ff; background: rgba(91, 140, 255, .12); }
.l-dev ul { margin: 14px 0 0; padding-left: 20px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.l-faq { display: grid; gap: 10px; max-width: 820px; }
.l-faq details { border-radius: 12px; background: var(--panel); box-shadow: var(--shadow); padding: 0 18px; }
.l-faq summary { cursor: pointer; padding: 15px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.l-faq summary::-webkit-details-marker { display: none; }
.l-faq summary::after { content: "+"; color: var(--muted); font-size: 20px; line-height: 1; }
.l-faq details[open] summary::after { content: "–"; }
.l-faq p { margin: 0 0 16px; color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.l-faq a { color: var(--text); }
.l-foot { max-width: 1180px; margin: 56px auto 0; padding: 22px 20px 30px; display: flex; justify-content: space-between; color: var(--faint);
  font-size: 13px; border-top: 1px solid var(--line); }
.l-foot a { color: var(--muted); }
.l-foot-links { display: flex; gap: 18px; }
.l-legal { max-width: 760px !important; padding-top: 40px !important; }
.l-legal h1 { font-size: 34px; margin: 0 0 10px; }
.l-legal h2 { font-size: 18px; margin: 28px 0 8px; }
.l-legal p { color: var(--muted); line-height: 1.65; margin: 0; }
.l-legal a { color: var(--text); }
.l-legal ul { color: var(--muted); line-height: 1.65; margin: 8px 0; padding-left: 22px; }
.l-legal p + p { margin-top: 10px; }
.l-legal code { font-size: 13px; color: var(--text); }
.l-legal-date { margin-top: 32px !important; font-size: 13px; color: var(--faint) !important; }
@media (max-width: 900px) {
  .l-hero { grid-template-columns: 1fr; padding-top: 36px; gap: 30px; }
  .l-nav { display: none; }
  .l-top .brand small { display: none; }
}
@media (max-width: 480px) {
  .l-top { gap: 12px; }
  .l-top .brand > span:last-child { display: none; }
  .l-actions .btn { padding-left: 12px; padding-right: 12px; }
}
.account { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; max-width: 1100px; margin: 0 auto; }
.account-info { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 0; }
.account-info dt { color: var(--muted); }
.account-info dd { margin: 0; font-weight: 600; word-break: break-all; }
.account-form { display: grid; gap: 10px; align-content: start; }
.account-form .card-h { margin-bottom: 2px; }
.account-form p { margin: 0; line-height: 1.55; }
.danger-zone { box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 92, 106, .35); }
.mail { display: grid; gap: 14px; }
.mail-boxes { display: flex; flex-wrap: wrap; gap: 8px; }
.mail-box { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 12px; font-weight: 600; font-size: 14px;
  color: var(--muted); background: rgba(255, 255, 255, .03); box-shadow: inset 0 0 0 1px var(--line); }
.mail-box.on { color: var(--text); background: var(--grad-soft); box-shadow: inset 0 0 0 1px var(--line-2); }
.mail-box .ic { width: 16px; height: 16px; }
.mail-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mail-bar .spacer { flex: 1; }
.mail-bar .chip.on { color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); background: var(--grad-soft); }
.mail-list { display: grid; }
.mail-row { display: grid; grid-template-columns: minmax(140px, 1.2fr) 3fr auto; gap: 14px; padding: 11px 10px; border-bottom: 1px solid var(--line);
  color: var(--muted); font-size: 14px; }
.mail-row:hover { background: rgba(255, 255, 255, .03); }
.mail-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-row.unread { color: var(--text); font-weight: 700; }
.mail-row .when { color: var(--faint); font-size: 12.5px; }
.mail-read h3 { margin: 0 0 10px; font-size: 19px; }
.mail-read dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0 0 14px; font-size: 13.5px; }
.mail-read dt { color: var(--muted); }
.mail-read dd { margin: 0; word-break: break-word; }
.mail-text { white-space: pre-wrap; word-break: break-word; font: inherit; font-size: 14.5px; line-height: 1.6; margin: 0 0 16px; padding: 16px;
  border-radius: 12px; background: rgba(0, 0, 0, .2); box-shadow: inset 0 0 0 1px var(--line); max-height: 60vh; overflow: auto; }
.mail-new { display: grid; gap: 10px; }
.mail-new label { color: var(--muted); font-size: 13.5px; }
.mail-new textarea { font: inherit; resize: vertical; }
.mail-count { min-width: 20px; padding: 1px 7px; border-radius: 99px; font-size: 11.5px; font-weight: 800; text-align: center;
  color: #fff; background: var(--grad); }
.mail-files { display: flex; flex-wrap: wrap; gap: 6px; }
.mail-read .row .spacer { flex: 1; }
.mail-new label { display: flex; align-items: center; gap: 10px; }
.mail-new select { flex: 1; }
.mail-setup { margin-top: 6px; }
.mail-setup summary { cursor: pointer; color: var(--muted); font-size: 13.5px; }
.mail-setup pre { padding: 12px; border-radius: 10px; background: rgba(0, 0, 0, .25); font-size: 13px; overflow: auto; }
@media (max-width: 640px) { .mail-row { grid-template-columns: 1fr auto; } .mail-row .subj { grid-column: 1 / -1; grid-row: 2; } }
