/* Orbit – Aussehen (Werte aus der Vorschau) */
:root { --bg:#0B1020; --card:#151C30; --text:#E8ECF8; --muted:#9AA5C2; --acc:#8EA8FF; --line:#26304A; --onAcc:#0B1020; --chip:#202942; --done:#22A06B; --rot:#E5484D; --orange:#E8890C;
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px); --tab: calc(50px + var(--sab)); color-scheme: dark; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI", Roboto, system-ui, sans-serif; font-size: 16px; -webkit-text-size-adjust: 100%; overscroll-behavior: none; }
body { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--acc); }
a.chip, a.btn { text-decoration: none; }
input, select, textarea { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; height: 46px; font-size: 16px; width: 100%; outline: none; }
textarea { padding: 10px 12px; height: auto; min-height: 90px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { border-color: var(--acc); }
input[type=date], input[type=time], input[type=datetime-local] { -webkit-appearance: none; appearance: none; min-width: 0; }
input[type=checkbox] { width: auto; height: auto; }
.noscroll, .scroll { scrollbar-width: none; }
.noscroll::-webkit-scrollbar, .scroll::-webkit-scrollbar { display: none; }
.muted { color: var(--muted); } .klein { font-size: 13px; } .fett { font-weight: 700; } .acc { color: var(--acc); }
.zeile { display: flex; align-items: center; gap: 10px; } .spalte { display: flex; flex-direction: column; gap: 10px; }
.wachsen { flex: 1; min-width: 0; } .rechts { margin-left: auto; } .ellipse { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.versteckt { display: none !important; }

/* Grundgerüst eines Bildschirms */
.screen { position: fixed; inset: 0; display: flex; flex-direction: column; background: var(--bg); }
.kopf { padding: calc(var(--sat) + 12px) 20px 8px; }
.kopf h1 { margin: 2px 0 0; font-size: 34px; font-weight: 800; letter-spacing: -0.5px; line-height: 1.1; }
.kopf .ober { display: flex; justify-content: space-between; align-items: center; min-height: 32px; gap: 8px; }
.kopf .datum { font-size: 14px; font-weight: 600; color: var(--muted); text-transform: none; }
.zurueckleiste { padding: calc(var(--sat) + 4px) 8px 0; display: flex; justify-content: space-between; align-items: center; min-height: 52px; }
.zurueck { color: var(--acc); font-size: 17px; display: inline-flex; align-items: center; gap: 2px; padding: 10px 8px; }
.scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 16px calc(var(--tab) + 110px); overscroll-behavior: contain; }
.abschnitt { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); padding: 18px 4px 8px; }
.karte { background: var(--card); border-radius: 16px; overflow: hidden; }
.karte.innen { padding: 14px; }
.feld { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 14px; border-bottom: 1px solid var(--line); min-height: 48px; }
.feld:last-child { border-bottom: 0; }
.feld > .wert { color: var(--muted); text-align: right; min-width: 0; }
.feld.knopf { width: 100%; text-align: left; }
.hinweis { font-size: 13px; color: var(--muted); padding: 8px 4px; line-height: 1.4; }

/* Knöpfe */
.btn { height: 50px; border-radius: 14px; background: var(--acc); color: var(--onAcc); font-weight: 700; font-size: 16px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.zweit { background: var(--chip); color: var(--text); }
.btn.gefahr { background: transparent; color: var(--rot); border: 1px solid var(--line); }
.btn.breit { width: 100%; }
.btn:disabled { opacity: .5; }
.rund { width: 44px; height: 44px; border-radius: 22px; background: var(--chip); color: var(--text); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.chip { height: 34px; padding: 0 14px; border-radius: 17px; background: var(--chip); color: var(--text); font-size: 14px; font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.chip.an { background: var(--acc); color: var(--onAcc); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px 8px; }
.chips.umbruch { flex-wrap: wrap; overflow: visible; padding: 0; }
.punkt { width: 10px; height: 10px; border-radius: 5px; flex: none; display: inline-block; }
.seg { margin: 0 16px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; background: var(--chip); border-radius: 10px; padding: 2px; }
.seg button { text-align: center; padding: 8px 0; border-radius: 8px; font-size: 13px; font-weight: 600; }
.seg button.an { background: var(--card); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.schalter { width: 51px; height: 31px; border-radius: 16px; background: var(--chip); position: relative; flex: none; transition: background .2s; }
.schalter::after { content: ''; position: absolute; left: 2px; top: 2px; width: 27px; height: 27px; border-radius: 14px; background: #fff; transition: transform .2s; box-shadow: 0 2px 4px rgba(0,0,0,.25); }
.schalter.an { background: var(--done); }
.schalter.an::after { transform: translateX(20px); }

/* Leiste unten */
.leiste { position: fixed; left: 0; right: 0; bottom: 0; height: var(--tab); background: var(--card); border-top: 1px solid var(--line); display: flex; justify-content: space-around; align-items: flex-start; padding-top: 4px; z-index: 5; }
.leiste button { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--muted); min-width: 62px; padding: 2px 0; }
.leiste button.an { color: var(--acc); }
.fab { position: fixed; right: 20px; bottom: calc(var(--tab) + 16px); width: 60px; height: 60px; border-radius: 30px; background: var(--acc); color: var(--onAcc); display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(0,0,0,.3); z-index: 4; }
.fab.links { right: auto; left: 20px; width: 52px; height: 52px; border-radius: 26px; background: var(--card); color: var(--text); border: 1px solid var(--line); }

/* Aufgaben-Zeile */
.liste { background: var(--card); border-radius: 16px; overflow: hidden; }
.az { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); touch-action: pan-y; }
.az:last-child { border-bottom: 0; }
.az .hinten { position: absolute; inset: 0; display: flex; justify-content: space-between; }
.az .hinten .erl { background: var(--done); color: #fff; display: flex; align-items: center; padding-left: 20px; font-weight: 700; flex: 1; }
.az .hinten .akt { display: flex; }
.az .hinten .akt button { width: 60px; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800; }
.az .vorne { position: relative; background: var(--card); display: flex; align-items: center; gap: 12px; padding: 11px 14px; min-height: 58px; transition: transform .22s ease; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.az .vorne.ziehen { transition: none; }
.kreis { width: 26px; height: 26px; border-radius: 13px; border: 2px solid var(--muted); flex: none; display: flex; align-items: center; justify-content: center; color: #fff; }
.kreis.an { background: var(--done); border-color: var(--done); }
.az .text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; text-align: left; }
.az .titel { font-size: 16px; font-weight: 500; line-height: 1.3; word-break: break-word; }
.az .meta { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.az.erledigt .titel { text-decoration: line-through; opacity: .55; }
.az.erledigt .meta { opacity: .55; }
.az .ueberf { color: var(--rot); font-weight: 600; }
.ausstehend { width: 6px; height: 6px; border-radius: 3px; background: var(--orange); }
.gruppe { margin-top: 14px; }
.gruppe .gkopf { font-size: 14px; font-weight: 700; color: var(--muted); padding: 0 4px 8px; display: flex; justify-content: space-between; }
.leer { text-align: center; color: var(--muted); padding: 40px 20px; line-height: 1.5; }

/* Blätter (von unten) */
.overlay { position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; justify-content: flex-end; }
.overlay .dunkel { position: absolute; inset: 0; background: rgba(0,0,0,.5); animation: ein .2s; }
.blatt { position: relative; background: var(--bg); border-radius: 22px 22px 0 0; padding: 8px 16px calc(var(--sab) + 18px); max-height: 92vh; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; animation: hoch .25s ease; }
.blatt.voll { height: calc(100% - var(--sat) - 10px); max-height: none; }
.blatt > * { flex-shrink: 0; }
.griff { align-self: center; width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 2px 0 4px; flex: none; }
.griffzone { padding: 4px 0; display: flex; justify-content: center; cursor: grab; touch-action: none; }
.blatt h2 { margin: 0; font-size: 26px; font-weight: 800; line-height: 1.2; word-break: break-word; }
.blatt h3 { margin: 0; font-size: 18px; font-weight: 800; }
.aktionen { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.aktionen button, .aktionen a { height: 50px; border-radius: 14px; background: var(--card); font-size: 15px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; color: var(--text); }
.aktionen .erledigt { background: var(--done); color: #fff; }
.aktionen .loeschen { grid-column: span 2; color: var(--rot); }
@keyframes hoch { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes ein { from { opacity: 0; } to { opacity: 1; } }

.toast { position: fixed; left: 16px; right: 16px; bottom: calc(var(--tab) + 90px); background: var(--text); color: var(--bg); border-radius: 14px; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; z-index: 30; box-shadow: 0 8px 24px rgba(0,0,0,.3); animation: hoch .2s; font-weight: 600; font-size: 15px; }
.overlay ~ .toast { bottom: auto; top: calc(var(--sat) + 10px); }
.toast button { color: var(--acc); font-weight: 800; filter: brightness(.7); }
.toast.fehler { background: var(--rot); color: #fff; } .toast.fehler button { color: #fff; filter: none; }
.offline { height: 30px; padding: 0 10px; border-radius: 15px; background: var(--chip); font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.offline .p { width: 8px; height: 8px; border-radius: 4px; background: var(--orange); }
.banner { margin: 0 16px 8px; padding: 12px 14px; border-radius: 14px; background: var(--rot); color: #fff; font-size: 14px; line-height: 1.4; }
.banner button { color: #fff; font-weight: 800; text-decoration: underline; }

/* Kalender */
.monat { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; padding: 0 8px; }
.monat .wt { text-align: center; font-size: 12px; font-weight: 600; color: var(--muted); padding: 6px 0; }
.monat .tag { height: 50px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding-top: 4px; border-radius: 12px; }
.monat .tag .n { width: 32px; height: 32px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 17px; }
.monat .tag.heute .n { color: var(--acc); font-weight: 700; }
.monat .tag.sel .n { background: var(--text); color: var(--bg); font-weight: 700; }
.monat .tag.sel.heute .n { background: var(--acc); color: var(--onAcc); }
.monat .tag.fremd .n { opacity: .35; }
.monat .dots { display: flex; gap: 3px; height: 6px; }
.monat .dots i { width: 6px; height: 6px; border-radius: 3px; }
.woche { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; padding: 10px 8px calc(var(--tab) + 30px); overflow-y: auto; flex: 1; }
.woche .sp { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.woche .sk { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; border-radius: 12px; }
.woche .sk.heute { background: var(--acc); color: var(--onAcc); }
.woche .fl { flex: 1; min-height: 440px; border-radius: 10px; background: var(--card); padding: 4px; display: flex; flex-direction: column; gap: 4px; }
.woche .ev { text-align: left; border-radius: 6px; padding: 5px 4px; font-size: 10.5px; line-height: 1.25; font-weight: 600; word-break: break-word; border-left: 3px solid; }
.streifen { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; padding: 8px 12px; }
.streifen button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 0; border-radius: 14px; }
.streifen .wd { font-size: 11px; font-weight: 600; color: var(--muted); }
.streifen .n { width: 34px; height: 34px; border-radius: 17px; display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 600; }
.streifen .heute .n { color: var(--acc); }
.streifen .sel .n { background: var(--text); color: var(--bg); }
.streifen .sel.heute .n { background: var(--acc); color: var(--onAcc); }
.stunden { padding: 0 16px calc(var(--tab) + 40px); }
.stunde { display: flex; gap: 10px; min-height: 52px; border-top: 1px solid var(--line); }
.stunde .z { width: 44px; font-size: 12px; color: var(--muted); padding-top: 4px; flex: none; }
.stunde .inh { flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 4px 0; min-width: 0; }
.ev2 { text-align: left; border-radius: 8px; padding: 8px 10px; font-size: 14px; font-weight: 600; border-left: 4px solid; }
.jahr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 12px; padding: 10px 16px calc(var(--tab) + 40px); }
.jahr .m { text-align: left; }
.jahr .mn { font-size: 15px; font-weight: 800; margin-bottom: 4px; }
.jahr .mg { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; }
.jahr .mg span { font-size: 8.5px; text-align: center; height: 13px; line-height: 13px; border-radius: 7px; }
.jahr .mg span.heute { background: var(--acc); color: var(--onAcc); }

/* Fokus */
.ring { position: relative; width: 250px; height: 250px; }
.ring .uhr { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.ring .uhr b { font-size: 56px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -1px; }

/* Projekte */
.raster2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.smart { text-align: left; background: var(--card); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.smart .k { display: flex; justify-content: space-between; align-items: center; }
.smart .i { width: 30px; height: 30px; border-radius: 15px; display: flex; align-items: center; justify-content: center; color: #fff; }
.smart .z { font-size: 24px; font-weight: 800; }
.smart .l { font-size: 14px; font-weight: 600; color: var(--muted); }
.balken { display: flex; align-items: flex-end; gap: 8px; height: 90px; padding-top: 6px; }
.balken .b { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; font-size: 11px; color: var(--muted); }
.balken .b i { width: 100%; border-radius: 6px; background: var(--acc); min-height: 3px; }
.vorlagen { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.vorlage { text-align: left; background: var(--card); border-radius: 18px; padding: 16px 14px; min-height: 120px; display: flex; flex-direction: column; gap: 8px; border-top: 4px solid; }
.vorlage b { font-size: 17px; } .vorlage span { font-size: 13px; color: var(--muted); line-height: 1.35; }
.themes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.theme { border-radius: 14px; padding: 8px; display: flex; flex-direction: column; gap: 6px; align-items: center; font-size: 12px; font-weight: 600; border: 2px solid transparent; }
.theme .vs { width: 100%; height: 44px; border-radius: 10px; display: flex; flex-direction: column; justify-content: flex-end; padding: 6px; gap: 4px; }
.theme .vs i { height: 6px; border-radius: 3px; display: block; }

/* Anmelden */
.anmelden { position: fixed; inset: 0; overflow-y: auto; display: flex; flex-direction: column; align-items: center; padding: calc(var(--sat) + 40px) 20px 40px; }
.anmelden .innen { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 14px; }
.logo { width: 72px; height: 72px; border-radius: 18px; }
.anmelden h1 { margin: 6px 0 0; font-size: 32px; font-weight: 800; }
label.f { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.fehlertext { color: var(--rot); font-size: 14px; font-weight: 600; line-height: 1.4; }
.oktext { color: var(--done); font-size: 14px; font-weight: 600; }
.schritte { margin: 0; padding-left: 22px; line-height: 1.55; font-size: 14px; color: var(--muted); }
.schritte b { color: var(--text); }

/* Kontextmenü (PC) */
.kmenue { position: fixed; z-index: 40; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 6px; min-width: 220px; box-shadow: 0 12px 30px rgba(0,0,0,.35); }
.kmenue button { display: flex; width: 100%; text-align: left; padding: 8px 10px; border-radius: 8px; font-size: 14px; gap: 10px; align-items: center; }
.kmenue button:hover { background: var(--chip); }
.kmenue hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.kmenue .rot { color: var(--rot); }

/* ---------- PC-Fenster (breit) ---------- */
@media (min-width: 900px) {
  :root { --tab: 0px; --sat: 0px; }
  .pc { position: fixed; inset: 0; display: grid; grid-template-columns: 260px minmax(0, 1fr); }
  .pc.mit-rechts { grid-template-columns: 260px minmax(0, 1fr) 380px; }
  .seite { border-right: 1px solid var(--line); background: var(--card); display: flex; flex-direction: column; overflow-y: auto; padding: 16px 12px; gap: 4px; }
  .seite > * { flex-shrink: 0; }
  .seite .marke { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; padding: 4px 8px 12px; }
  .seite .marke img { width: 30px; height: 30px; border-radius: 8px; }
  .seite .nav { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; font-size: 14px; font-weight: 600; width: 100%; text-align: left; }
  .seite .nav:hover { background: var(--chip); }
  .seite .nav.an { background: var(--chip); color: var(--acc); }
  .seite .ueber { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); padding: 14px 10px 6px; }
  .seite .anz { margin-left: auto; color: var(--muted); font-size: 13px; }
  .haupt { position: relative; overflow: hidden; display: flex; flex-direction: column; }
  .haupt .screen, .rechtsspalte .screen { position: absolute; }
  .rechtsspalte .fab, .rechtsspalte .fab.links { display: none; }
  .rechtsspalte { position: relative; border-left: 1px solid var(--line); overflow: hidden; }
  .leiste, .fab.links { display: none; }
  .fab { position: absolute; bottom: 24px; right: 24px; }
  .toast { left: auto; right: 24px; bottom: 24px; width: 380px; }
  .overlay { justify-content: center; align-items: center; }
  .blatt { border-radius: 20px; width: 560px; max-height: 86vh; padding-bottom: 20px; }
  .blatt.voll { height: auto; max-height: 90vh; }
  .griff, .griffzone { display: none; }
  .scroll { padding-bottom: 100px; }
  .kopf { padding-top: 18px; }
  .woche { padding-bottom: 30px; }
  .suche { height: 38px; border-radius: 10px; font-size: 14px; }
  .az .vorne { min-height: 50px; padding: 8px 14px; }
  .az:hover .vorne { background: color-mix(in srgb, var(--card) 85%, var(--text)); }
}
@media (hover: hover) { .chip:hover, .btn.zweit:hover, .rund:hover { filter: brightness(1.15); } }
