/* mySPI › Tandem (Clemens und Pascal, 2026-10-10): das Aufgabenbuch im Aussehen
   von myLOG. Alles unter .tandem, damit nichts davon auf andere Seiten fällt;
   die Farben aus den Variablen von myLOG (hell/dunkel folgt von selbst).
   Prioritäten: A rost, B ocker, C grün, D grau. Personen: a mySPI-grün, b blau. */
.tandem { --td-a: var(--spi, #8fbf4a); --td-b: #5b9bd5; --td-q1: var(--rust); --td-q2: var(--caution); --td-q3: var(--green); --td-q4: var(--ink-faint); }
/* hidden gilt immer, auch wo eine Regel display setzt (die Glocke). */
.tandem [hidden], .tdToast[hidden] { display: none !important; }
.tandem .tdBar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tandem .tdBar .spacer { flex: 1; }
.tandem .tdSync { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-dim); }
.tandem .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: inline-block; }
.tandem .dot.wait { background: var(--caution); }
.tandem .dot.off { background: var(--rust); }
.tandem .tdBell { color: var(--caution); border-color: var(--caution); display: inline-flex; align-items: center; }

.tandem .tdTabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 6px 0 14px; overflow-x: auto; }
.tandem .tdTabs button { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--ink-dim); padding: 8px 12px; font-size: 13.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.tandem .tdTabs button:hover { color: var(--ink); }
.tandem .tdTabs button.on { color: var(--spi, var(--amber)); border-bottom-color: var(--spi, var(--amber)); }
.tandem .badge { display: inline-block; min-width: 16px; padding: 0 5px; margin-left: 6px; border-radius: 8px; background: var(--spi, var(--amber)); color: var(--spi-on, #10140c); font-size: 11px; line-height: 16px; text-align: center; }

.tandem .view { display: flex; flex-direction: column; gap: 6px; }
.tandem h3 { display: flex; align-items: center; gap: 8px; margin: 16px 0 6px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-dim); font-weight: 600; }
.tandem.tdSheet > h3 { text-transform: none; letter-spacing: 0; font-size: 17px; color: var(--ink); margin: 0 0 4px; display: block; }
.tandem h3 .cnt { color: var(--ink-faint); font-weight: 400; }
.tandem h3 .sp { flex: 1; }
.tandem h4 { margin: 0 0 6px; font-size: 13px; }
.tandem .note { font-size: 12px; color: var(--ink-faint); line-height: 1.45; white-space: pre-line; }
.tandem .note.warnTxt { color: var(--caution); }
.tandem .hint { font-size: 12.5px; color: var(--ink-dim); background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; line-height: 1.45; }
.tandem .sub { font-size: 12.5px; color: var(--ink-dim); margin-bottom: 12px; }
.tandem .strong { font-weight: 600; margin-top: 3px; }

/* Werkzeuge: Suche, Umschalter */
.tandem .tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 4px; }
.tandem .search { display: flex; align-items: center; gap: 6px; flex: 1 1 220px; min-width: 0; background: var(--panel-3); border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; }
.tandem .search .ico { color: var(--ink-faint); display: flex; }
.tandem .search input { flex: 1; min-width: 0; background: none; border: 0; color: var(--ink); padding: 7px 0; font-size: 13px; outline: none; }
.tandem .search button { background: none; border: 0; color: var(--ink-faint); cursor: pointer; }
.tandem .seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.tandem .seg button { background: var(--panel-3); border: 0; border-right: 1px solid var(--line); color: var(--ink-dim); padding: 6px 10px; font-size: 12px; font-weight: 600; cursor: pointer; }
.tandem .seg button:last-child { border-right: 0; }
.tandem .seg button[aria-pressed="true"] { background: var(--spi-wash, rgba(143, 191, 74, .14)); color: var(--spi, var(--amber)); }

/* Listen */
.tandem .list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.tandem .list.flat { background: transparent; }
.tandem .item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); background: var(--panel); color: var(--ink); text-align: left; cursor: pointer; width: 100%; font: inherit; touch-action: pan-y; }
.tandem .list > .item:last-child, .tandem .list > .sw:last-child .item { border-bottom: 0; }
.tandem .item:hover { background: var(--panel-2); }
.tandem .item.still { cursor: default; }
.tandem .item.done .ttl { color: var(--ink-dim); text-decoration: line-through; text-decoration-color: var(--ink-faint); }
.tandem .item .body { flex: 1; min-width: 0; }
.tandem .ttl { display: flex; align-items: baseline; gap: 7px; font-size: 13.5px; font-weight: 600; overflow-wrap: anywhere; }
.tandem .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 4px; font-size: 11.5px; color: var(--ink-faint); }
.tandem .item .dur { font-family: var(--mono); font-size: 12.5px; color: var(--ink-dim); white-space: nowrap; }
.tandem .empty { padding: 14px; font-size: 12.5px; color: var(--ink-faint); }
.tandem .more { background: none; border: 0; border-top: 1px solid var(--line); padding: 9px; color: var(--ink-dim); font-size: 12px; cursor: pointer; }
.tandem .tick { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--ink-faint); background: none; color: var(--panel); display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; margin-top: 1px; }
.tandem .tick.on { background: var(--green); border-color: var(--green); color: #0d1f16; }
.tandem .chip { display: inline-block; padding: 1px 7px; border-radius: 9px; background: var(--panel-3); color: var(--ink-dim); font-size: 11px; }
.tandem .chip.warn { background: var(--caution-wash); color: var(--caution); }
.tandem .chip.ok { background: rgba(79, 156, 110, .14); color: var(--green); }
.tandem .chip.acc { background: var(--spi-wash, rgba(143, 191, 74, .14)); color: var(--spi, var(--amber)); }
.tandem .pend { color: var(--caution); font-style: italic; }
.tandem .pno { font-family: var(--mono); font-size: 11.5px; color: var(--ink-dim); }

/* Priorität (A–D) und Personen */
.tandem .pb { display: inline-block; min-width: 18px; padding: 0 4px; border-radius: 4px; text-align: center; font-size: 11px; font-weight: 700; line-height: 17px; color: #fff; }
.tandem .pb.q1 { background: var(--td-q1); }
.tandem .pb.q2 { background: var(--td-q2); color: #1b1206; }
.tandem .pb.q3 { background: var(--td-q3); }
.tandem .pb.q4 { background: var(--td-q4); }
.tandem .psn { display: inline-block; padding: 0 7px; border-radius: 9px; font-size: 11px; font-weight: 600; background: var(--panel-3); color: var(--ink-dim); }
.tandem .psn.a { background: rgba(143, 191, 74, .16); color: var(--td-a); }
.tandem .psn.b { background: rgba(91, 155, 213, .16); color: var(--td-b); }
.tandem .picker { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tandem .picker button { display: flex; align-items: flex-start; gap: 8px; text-align: left; background: var(--panel-3); border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; color: var(--ink); cursor: pointer; font-size: 12.5px; font-weight: 600; }
.tandem .picker button small { display: block; font-weight: 400; color: var(--ink-faint); font-size: 11px; }
.tandem .picker button[aria-pressed="true"] { border-color: var(--spi, var(--amber)); background: var(--spi-wash, rgba(143, 191, 74, .12)); }

/* Matrix */
.tandem .matrix { display: grid; grid-template-columns: 26px 1fr 1fr; gap: 6px; }
.tandem .matrix .ax { font-size: 11px; color: var(--ink-faint); text-align: center; text-transform: uppercase; letter-spacing: .05em; }
.tandem .matrix .ay { writing-mode: vertical-rl; transform: rotate(180deg); align-self: center; }
.tandem .quad { border: 1px solid var(--line); border-top: 3px solid var(--line); border-radius: 8px; padding: 8px; background: var(--panel); min-height: 110px; display: flex; flex-direction: column; gap: 5px; }
.tandem .quad.q1 { border-top-color: var(--td-q1); } .tandem .quad.q2 { border-top-color: var(--td-q2); }
.tandem .quad.q3 { border-top-color: var(--td-q3); } .tandem .quad.q4 { border-top-color: var(--td-q4); }
.tandem .quad h4 { display: flex; align-items: center; gap: 6px; margin: 0; }
.tandem .quad h4 .c { margin-left: auto; color: var(--ink-faint); font-weight: 400; }
.tandem .hint2 { font-size: 11px; color: var(--ink-faint); }
.tandem .qi { text-align: left; background: var(--panel-3); border: 1px solid var(--line); border-radius: 6px; padding: 5px 7px; color: var(--ink); font-size: 12.5px; cursor: pointer; }
.tandem .qi small { display: block; color: var(--ink-faint); font-size: 11px; }

/* Hinweise der anderen Person */
.tandem .notices { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.tandem .notice { display: flex; align-items: center; gap: 10px; border: 1px solid var(--caution); background: var(--caution-wash); border-radius: var(--radius); padding: 9px 12px; font-size: 13px; }
.tandem .notice .body { flex: 1; min-width: 0; }
.tandem .notice .from { font-size: 11.5px; color: var(--caution); }

/* Wischen zum Löschen */
.tandem .sw { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.tandem .sw .item { border-bottom: 0; position: relative; transition: transform .2s ease; }
.tandem .sw.drag .item { transition: none; }
.tandem .sw-bg { position: absolute; inset: 0; display: flex; justify-content: space-between; align-items: center; padding: 0 16px; background: var(--rust); color: #fff; font-size: 12px; font-weight: 700; }

/* Zeit */
.tandem .timer { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 14px; text-align: center; }
.tandem .timer .lbl { font-size: 12.5px; color: var(--ink-dim); }
.tandem .clock { font-family: var(--mono); font-size: 34px; font-weight: 700; margin: 6px 0 10px; color: var(--spi, var(--amber)); }
.tandem .clock.idle { color: var(--ink-faint); }
.tandem .timer .row { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.tandem .stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.tandem .stat { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 10px 12px; text-align: left; color: var(--ink); font: inherit; }
.tandem .stat .k { font-size: 11.5px; color: var(--ink-dim); }
.tandem .stat .v { font-size: 20px; font-weight: 700; margin-top: 2px; font-family: var(--mono); }
.tandem .stat .t { font-size: 11.5px; color: var(--ink-faint); margin-top: 3px; }
.tandem .stat.sbtn { cursor: pointer; }
.tandem .stat.sbtn.sel { border-color: var(--spi, var(--amber)); }
.tandem .bars { display: flex; flex-direction: column; gap: 8px; }
.tandem .bar .h { display: flex; justify-content: space-between; font-size: 12.5px; }
.tandem .bar .track { height: 6px; border-radius: 3px; background: var(--panel-3); margin-top: 3px; overflow: hidden; }
.tandem .bar .track i { display: block; height: 100%; background: var(--spi, var(--amber)); }

/* Projekte */
.tandem .ptag { display: inline-block; padding: 0 6px; border-radius: 4px; font-size: 10.5px; font-weight: 700; background: var(--panel-3); color: var(--ink-dim); vertical-align: 2px; }
.tandem .ptag.MoC { background: rgba(91, 155, 213, .18); color: var(--td-b); }
.tandem .ptag.RA { background: var(--caution-wash); color: var(--caution); }
.tandem .pbar { display: flex; gap: 3px; margin-top: 6px; }
.tandem .pbar i { flex: 1; height: 4px; border-radius: 2px; background: var(--panel-3); }
.tandem .pbar i.on { background: var(--spi, var(--amber)); }
.tandem .steps { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.tandem .step { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 0; border-bottom: 1px solid var(--line); background: var(--panel); color: var(--ink-dim); text-align: left; font: inherit; font-size: 12.5px; cursor: pointer; }
.tandem div.step { cursor: default; }
.tandem .step:last-child { border-bottom: 0; }
.tandem .step .sd { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ink-faint); display: inline-flex; align-items: center; justify-content: center; }
.tandem .step.done .sd { background: var(--green); border-color: var(--green); color: #0d1f16; }
.tandem .step.cur { color: var(--ink); font-weight: 600; background: var(--spi-wash, rgba(143, 191, 74, .1)); }
.tandem .step.cur .sd { border-color: var(--spi, var(--amber)); }
.tandem .step small { margin-left: auto; color: var(--ink-faint); font-weight: 400; }

/* Chronik */
.tandem .day { margin: 14px 0 6px; font-size: 12px; color: var(--ink-dim); font-weight: 600; }
.tandem .ev { display: flex; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.tandem .list > .ev:last-child { border-bottom: 0; }
.tandem .ev time { font-family: var(--mono); font-size: 11.5px; color: var(--ink-faint); padding-top: 2px; }
.tandem .ev .what { flex: 1; min-width: 0; }
.tandem .ev .meta { margin-top: 0; }
.tandem .verb { font-weight: 600; color: var(--ink-dim); }
.tandem .verb.done { color: var(--green); } .tandem .verb.del { color: var(--rust); }
.tandem .verb.shared, .tandem .verb.proj { color: var(--td-b); } .tandem .verb.note { color: var(--caution); }
.tandem .res { white-space: pre-line; font-size: 12.5px; color: var(--ink-dim); background: var(--panel-2); border-radius: 6px; padding: 6px 8px; margin-top: 4px; overflow-wrap: anywhere; }

/* Dialoge */
.tandem.tdSheet { padding: 18px 18px 14px; display: flex; flex-direction: column; gap: 10px; }
.tandem.tdSheet .field { margin: 0; }
.tandem.tdSheet input[type="text"], .tandem.tdSheet input[type="date"], .tandem.tdSheet input[type="time"], .tandem.tdSheet input:not([type]), .tandem.tdSheet select, .tandem.tdSheet textarea, .tandem.tdSheet > textarea {
  background-color: var(--panel-3); border: 1px solid var(--line); border-radius: 7px; color: var(--ink); padding: 8px 10px; font-size: 13.5px; width: 100%; box-sizing: border-box; font-family: inherit; }
/* (2026-10-20: „background“ nahm der Auswahl den Pfeil aus index.html, „padding“ den Platz dafür) */
.tandem.tdSheet .field select:not([multiple]) { padding-right: 28px; }
.tandem.tdSheet textarea { min-height: 70px; resize: vertical; }
.tandem.tdSheet textarea.big { min-height: 120px; }
.tandem.tdSheet .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tandem .kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.tandem .kv > div { display: flex; flex-direction: column; font-size: 12px; color: var(--ink-faint); }
.tandem .kv b { color: var(--ink); font-size: 13px; }
.tandem .kv small { color: var(--ink-faint); font-weight: 400; }
.tandem .grid-acts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 6px; }
.tandem .tdActions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.tandem .check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink); text-transform: none; letter-spacing: 0; cursor: pointer; }
.tandem .btn.arm { background: var(--rust); color: #fff; }
.tandem .tdMicHint { display: flex; align-items: center; gap: 8px; }
.tandem .tdMic { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; }
.tandem .tdMic.on { color: var(--rust); border-color: var(--rust); }
.tandem .sw-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; cursor: pointer; }
.tandem .sw-row .lbl { font-size: 13px; font-weight: 600; }
.tandem .sw-row .lbl small { display: block; font-weight: 400; color: var(--ink-faint); font-size: 11.5px; }
.tandem .tgl { position: relative; width: 42px; height: 24px; flex: 0 0 auto; }
.tandem .tgl input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.tandem .tgl span { position: absolute; inset: 0; border-radius: 12px; background: var(--panel-3); border: 1px solid var(--line); pointer-events: none; }
.tandem .tgl span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink-dim); transition: left .15s; }
.tandem .tgl input:checked + span { background: var(--caution-wash); border-color: var(--caution); }
.tandem .tgl input:checked + span::after { left: 20px; background: var(--caution); }
.tandem .tdAdmin { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.tandem .tdSetup { max-width: 460px; display: flex; flex-direction: column; gap: 10px; }

.tdToast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 28px; z-index: 95; display: flex; align-items: center; gap: 14px; max-width: calc(100% - 32px);
  background: var(--panel-solid); color: var(--ink); border: 1px solid var(--line); font-size: 13px; padding: 10px 16px; border-radius: 12px; box-shadow: 0 8px 22px rgba(0, 0, 0, .35); }
.tdToast button { background: none; border: 0; color: var(--spi, #8fbf4a); font-weight: 700; cursor: pointer; font-size: 13px; }

@media (max-width: 600px) {
  .tandem .picker { grid-template-columns: 1fr; }
  .tandem.tdSheet .two { grid-template-columns: 1fr; }
  .tandem .matrix { grid-template-columns: 1fr 1fr; }
  .tandem .matrix .ax { display: none; }
  .tandem .matrix > div:first-child { display: none; }
}
.tandem .view > .seg { align-self: flex-start; }

/* Die Einstellungen als Seite (mySPI › Einstellungen › Tandem / Zeiterfassung): derselbe Inhalt wie im Fenster. */
.tandem.tdSheet.tdSetPage { max-width: 640px; padding: 4px 0 24px; }
.tandem .tdThemaNeu { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.tandem .tdThemaNeu input { flex: 1; min-width: 0; }
