/* Arbeitsplatz-Funktionen (komfort.js): Schnellzugriff in der Leiste, Suche Strg/⌘+K, Favoriten, Kürzel-Hilfe, Offline-/Ablauf-Hinweise,
   Sichtschutz, Anzeigeoptionen. Farben, Abstände und Bewegung kommen aus den Tokens in stil.css (helles Thema inklusive).
   Ergänzungen für die Seiten von „Mein Arbeitsplatz“, Sicherheitsübersicht und Betrieb stehen in arbeitsplatz.css. */
html, body { font-size: var(--komfort-schrift, 15px); }
.fin-karte, .fin-kpi, .krypto-menge { font-variant-numeric: tabular-nums; }

/* ---------- Sprunglink */
.komfort-skip { position: fixed; left: 12px; top: 12px; z-index: 2000; padding: 10px 14px; border-radius: var(--r-m); background: var(--flaeche-hoch); color: var(--text);
  border: 2px solid var(--akzent); box-shadow: var(--schatten-2); transform: translateY(-160%); transition: transform var(--dauer-2) var(--kurve-aus); }
.komfort-skip:focus { transform: none; }
.komfort-skip:not(:focus) { box-shadow: none; }   /* sonst ragt der Schatten des verborgenen Links oben ins Bild (helles Thema: grauer Fleck) */

/* ---------- Schnellzugriff in der Leiste: Merken, Favoriten, Zuletzt (das Suchfeld steht darüber, os.css .os-suchfeld) */
.komfort-nav { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 0 0 12px; border-bottom: 1px solid var(--linie); margin-bottom: 4px; }
.komfort-nav > button.klein { justify-content: flex-start; width: 100%; min-height: 30px; padding: .3em .7em; background: transparent; border-color: transparent; color: var(--leise); font-weight: 500; }
.komfort-nav > button.klein:hover { background: var(--hover); color: var(--text); }
.komfort-nav > button.klein[aria-pressed="true"] { color: var(--warn-text); }
.komfort-nav details > summary { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 2px; padding: 4px 10px; border-radius: var(--r-s);
  color: var(--leise); font-size: var(--t-xs); font-weight: 600; letter-spacing: .09em; text-transform: uppercase; }
.komfort-nav details > summary:hover { color: var(--text-2); }
.komfort-nav .nav a { min-height: 30px; font-size: var(--t-s); }
.komfort-nav .nav a.aktiv { color: var(--text); }
kbd { font: 500 .75em var(--mono); border: 1px solid var(--linie-stark); border-bottom-width: 2px; border-radius: 5px; padding: 1px 5px; color: var(--leise); background: var(--bg-1); white-space: nowrap; }

/* ---------- Navigationsgruppen (einklappbar) mit ruhigem Pfeil statt Standard-Dreieck */
.komfort-gruppe > summary, .komfort-nav details > summary { list-style: none; cursor: pointer; }
.komfort-gruppe > summary::-webkit-details-marker, .komfort-nav details > summary::-webkit-details-marker { display: none; }
.komfort-gruppe > summary { display: flex; align-items: center; justify-content: space-between; border-radius: var(--r-s); padding-top: 4px; padding-bottom: 4px; }
.komfort-gruppe > summary:hover { color: var(--text-2); }
.komfort-gruppe > summary::after, .komfort-nav details > summary::after { content: ""; width: 6px; height: 6px; margin-right: 4px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px); transition: transform var(--dauer-2) var(--kurve-aus); opacity: .7; }
.komfort-gruppe:not([open]) > summary::after, .komfort-nav details:not([open]) > summary::after { transform: rotate(-45deg); }

/* ---------- Kürzel (Hilfe-Dialog und „Mein Arbeitsplatz“): Tasten als Kappen */
.komfort-kuerzel { display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px; align-items: center; margin: 4px 0 12px; }
.komfort-kuerzel dt { justify-self: start; }
.komfort-kuerzel kbd { font-size: var(--t-xs); padding: 3px 8px; border-radius: var(--r-s); color: var(--text); }
.komfort-kuerzel dd { margin: 0; color: var(--leise); }

/* ---------- Offline-, Server- und Ablaufhinweis: Band über dem Inhalt (ohne Animation – der Text ändert sich minütlich) */
.komfort-hinweise:empty { display: none; }
.komfort-offline { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 16px 32px 0; padding: 10px 14px 10px 16px; border: 1px solid var(--warn-rand); border-radius: var(--r-m);
  background: var(--warn-flaeche); color: var(--text); font-size: var(--t-s); }
.komfort-offline::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 4px var(--warn-flaeche-stark); }
.komfort-offline > span { flex: 1 1 16em; min-width: 0; }
.komfort-offline.komfort-ablauf { border-color: var(--akzent-rand); background: var(--akzent-flaeche); }
.komfort-offline.komfort-ablauf::before { background: var(--akzent-mitte); box-shadow: 0 0 0 4px var(--akzent-flaeche-stark); }
.komfort-offline[hidden] { display: none; }

/* ---------- Sichtschutz (Alt+P): Inhalt, offene Dialoge und Meldungen unsichtbar; ein Knopf holt sie zurück */
html.komfort-privat .inhalt { pointer-events: none; user-select: none; }
html.komfort-privat main.inhalt > *, html.komfort-privat dialog[open] > :not(.komfort-schutz), html.komfort-privat #meldung { visibility: hidden; }
.komfort-schutz { position: fixed; left: calc(var(--leiste-breite) + (100% - var(--leiste-breite)) / 2); top: 42%; transform: translate(-50%, -50%); z-index: 1000;
  display: grid; justify-items: center; gap: 10px; width: min(320px, calc(100vw - 32px)); padding: 22px 24px; border-radius: var(--r-karte); background: var(--flaeche-hoch);
  border: 1px solid var(--akzent-rand); box-shadow: var(--schatten-3); text-align: center; visibility: visible; }
.komfort-schutz small { color: var(--leise); }
dialog .komfort-schutz { position: absolute; left: 50%; top: 50%; }
@media (hover: none) and (pointer: coarse) { .komfort-schutz small { display: none; } }

/* ---------- Anzeigeoptionen (Mein Arbeitsplatz) */
html[data-kontrast=hoch] { --leise: var(--text); --blass: var(--text-2); --linie: color-mix(in srgb, var(--text) 35%, transparent); --linie-stark: color-mix(in srgb, var(--text) 55%, transparent); }
/* Kompakte Abstände: spürbar dichter, ohne Layoutbruch. */
html[data-dichte=dicht] .tafel { padding: 12px 14px; margin-bottom: 10px; }
html[data-dichte=dicht] .raster, html[data-dichte=dicht] .kacheln { gap: 8px; }
html[data-dichte=dicht] .kacheln { margin-bottom: 10px; }
html[data-dichte=dicht] .kachel { padding: 10px 12px; }
html[data-dichte=dicht] td, html[data-dichte=dicht] th { padding: .32em .5em; }
html[data-dichte=dicht] .seitenkopf { margin-bottom: 12px; }
@media (min-width: 861px) { html[data-dichte=dicht] .inhalt { padding: 18px 22px 40px; } }
/* Kompakte Seitenleiste: schmaler, dichtere Zeilen. */
html[data-kompakt=ja] { --leiste-breite: 212px; }
html[data-kompakt=ja] .seitenleiste { padding-top: 14px; padding-bottom: 12px; }
html[data-kompakt=ja] .nav a { min-height: 28px; padding: .24em .6em; gap: 8px; font-size: var(--t-s); }
html[data-kompakt=ja] .navgruppe { margin: 8px 0 2px; }
html[data-kompakt=ja] .komfort-nav details > summary { margin: 4px 0 2px; }
html[data-kompakt=ja] .marke { padding-bottom: 10px; }

/* Ohne Tastatur (Handy/Tablet): keine Kürzel-Hinweise. */
@media (hover: none) and (pointer: coarse) { .komfort-nur-tastatur { display: none; } }
@media (max-width: 860px) {
  .komfort-offline { margin: 12px 16px 0; }
  .komfort-schutz { left: 50%; }
}

/* ---------- Krypto (Reiter /finanzen/krypto; krypto.css ergänzt beim Öffnen) */
.krypto-raster { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,320px),1fr)); gap: 18px; margin-top: 18px; min-height: 260px; }
.krypto-menge { font: 600 1.6rem var(--mono); overflow-wrap: anywhere; }
.krypto-kennzahlen { display: grid; gap: 14px; }
.krypto-kennzahlen > div { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.krypto-symbol { font-size: var(--t-3xl); color: var(--warn); }
.krypto-form { display: grid; gap: 14px; }
.krypto-form label { display: block; margin-bottom: 5px; }
.krypto-form input, .krypto-form select { width: 100%; min-width: 0; }
