/* Work – Oberfläche. Für draußen gebaut: große Tippflächen, hoher Kontrast, Systemschrift (keine externen Fonts). */
:root {
  --ink: #1B2631;          /* Textfarbe */
  --brand: #1B2631;        /* Hauptfarbe: Kopfzeile, Auswahl (einstellbar) */
  --on-brand: #FFFFFF;
  --on-signal: #1B2631;
  --ink-2: #4A5866;
  --line: #CBD2D9;
  --bg: #EEF0F2;
  --paper: #FFFFFF;
  --signal: #F5B800;      /* Warngelb für die Hauptaktion */
  --steel: #2F5D7C;       /* Links, Auswahl */
  --ok: #1E7B4C;
  --warn-bg: #FFF4D1;
  --err: #B42318;
  --err-bg: #FBE7E5;
  --weekend: #E3E7EB;
  --radius: 6px;
  --tap: 48px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--steel); }
:focus-visible { outline: 3px solid var(--steel); outline-offset: 2px; }

/* Rahmen */
.top { position: sticky; top: 0; z-index: 5; background: var(--brand); color: var(--on-brand);
  padding: calc(env(safe-area-inset-top, 0px) + .6rem) 1rem .6rem; display: flex; align-items: center; gap: .75rem; }
.top h1 { font-size: 1.15rem; margin: 0; flex: 1; font-weight: 700; letter-spacing: .01em; }
.top .tenant { font-size: .85rem; opacity: .75; }
main { max-width: 46rem; margin: 0 auto; padding: 1rem 1rem calc(6rem + var(--safe-b)); }
.tabs { position: fixed; bottom: 0; left: 0; right: 0; z-index: 5; background: var(--paper);
  border-top: 1px solid var(--line); display: flex; padding-bottom: var(--safe-b); }
.tabs a { flex: 1; text-align: center; padding: .55rem .25rem .6rem; text-decoration: none; color: var(--ink-2);
  font-size: .8rem; font-weight: 600; border-top: 3px solid transparent; min-height: 56px; }
.tabs a .ico { display: block; font-size: 1.3rem; line-height: 1.2; }
.tabs a[aria-current="page"] { color: var(--ink); border-top-color: var(--signal); }
@media (min-width: 900px) {
  .tabs { position: sticky; top: 52px; bottom: auto; max-width: 46rem; margin: 0 auto; border: 0; background: transparent; padding: 0 1rem; }
  .tabs a { font-size: .95rem; border-top: 0; border-bottom: 3px solid transparent; min-height: 0; }
  .tabs a .ico { display: none; }
  .tabs a[aria-current="page"] { border-bottom-color: var(--signal); }
  main { padding-bottom: 3rem; }
}

/* Bausteine */
h2 { font-size: 1.3rem; margin: .25rem 0 1rem; }
h3 { font-size: 1.05rem; margin: 1.25rem 0 .5rem; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem; }
.muted { color: var(--ink-2); }
.small { font-size: .88rem; }
.row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.row > .grow { flex: 1; min-width: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
@media (max-width: 420px) { .grid2 { grid-template-columns: 1fr; } }

label { display: block; font-weight: 600; font-size: .9rem; margin: .8rem 0 .3rem; }
input, select, textarea { width: 100%; min-height: var(--tap); padding: .55rem .7rem; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); }
input[type="checkbox"] { width: 22px; min-height: 22px; height: 22px; margin: 0; accent-color: var(--steel); }
label.check { display: flex; gap: .6rem; align-items: center; font-weight: 500; }
textarea { min-height: 5rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: var(--tap);
  padding: .55rem 1.1rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--paper);
  font-weight: 600; cursor: pointer; text-decoration: none; color: var(--ink); }
.btn.primary { background: var(--signal); border-color: rgba(0,0,0,.18); color: var(--on-signal); }
.btn.dark { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn.danger { color: var(--err); border-color: #E7B4AE; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--steel); padding-inline: .5rem; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: default; }
.actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1.25rem; }

.msg { padding: .75rem .9rem; border-radius: var(--radius); margin: .75rem 0; }
.msg.err { background: var(--err-bg); color: var(--err); }
.msg.warn { background: var(--warn-bg); color: #6B4E00; }
.msg.ok { background: #E3F2E9; color: var(--ok); }

/* Monatsliste */
.monthbar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .75rem; }
.monthbar strong { font-size: 1.15rem; }
.seg { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.seg button { min-height: 40px; padding: .35rem .9rem; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); font-weight: 600; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.total { display: flex; justify-content: space-between; align-items: baseline; }
.total .hours { font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.days { list-style: none; margin: 0; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.days li + li { border-top: 1px solid var(--line); }
.days a { display: grid; grid-template-columns: 3.2rem 1fr auto; gap: .75rem; align-items: center; padding: .6rem .9rem;
  text-decoration: none; color: inherit; min-height: 56px; }
.days li.we a { background: var(--weekend); }
.days li.today a { box-shadow: inset 4px 0 0 var(--signal); }
.days .d { font-weight: 700; line-height: 1.1; }
.days .d small { display: block; font-weight: 500; color: var(--ink-2); font-size: .78rem; }
.days .what { font-size: .9rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.days .h { font-weight: 700; font-variant-numeric: tabular-nums; }
.badge { display: inline-block; padding: .05rem .45rem; border-radius: 4px; background: var(--brand); color: var(--on-brand); font-size: .75rem; font-weight: 700; margin-right: .35rem; }

/* Tageserfassung */
.entry { border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem; margin-bottom: .75rem; background: #FAFBFC; }
.entry .times { display: grid; grid-template-columns: 1fr 1fr auto; gap: .5rem; align-items: end; }
.entry label { margin-top: .5rem; }
.sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; text-align: center; }
.sum div { background: var(--bg); border-radius: var(--radius); padding: .5rem; }
.sum b { display: block; font-size: 1.2rem; font-variant-numeric: tabular-nums; }

/* Listen */
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: .7rem 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.chips { display: flex; gap: .35rem; flex-wrap: wrap; margin-top: .35rem; }
.chip { font-size: .8rem; padding: .1rem .55rem; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }
.inactive { opacity: .55; }

dialog { border: 0; border-radius: var(--radius); padding: 1.25rem; width: min(30rem, calc(100vw - 2rem)); }
dialog::backdrop { background: rgba(27, 38, 49, .55); }

#toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(76px + var(--safe-b)); z-index: 20;
  background: var(--ink); color: #fff; padding: .7rem 1.1rem; border-radius: var(--radius); max-width: calc(100vw - 2rem); }

.center { max-width: 24rem; width: calc(100% - 2rem); margin: 12vh auto 0; }
.brand { font-size: 2.2rem; font-weight: 800; margin: 0 0 .25rem; }
.brand span { display: inline-block; border-bottom: 5px solid var(--signal); }
@media (prefers-reduced-motion: no-preference) { .btn { transition: background-color .15s; } }

/* Kopfzeile mit Logo */
.top .logo { height: 32px; max-width: 45vw; object-fit: contain; background: #fff; border-radius: 4px; padding: 2px 4px; }

/* Darstellung je Gerät */
html.fs-l, html.fs-l body { font-size: 19px; }
html.fs-xl, html.fs-xl body { font-size: 21px; }
html.big { --tap: 58px; }
html.big input[type="checkbox"] { width: 28px; height: 28px; min-height: 28px; }

/* Spracheingabe */
.mic { width: 96px; height: 96px; border-radius: 50%; border: 0; background: var(--signal); color: var(--on-signal);
  font-size: 2.4rem; display: grid; place-items: center; margin: .5rem auto 1rem; cursor: pointer; box-shadow: 0 2px 0 rgba(0,0,0,.15); }
.mic.on { background: var(--err); color: #fff; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 12px rgba(180,35,24,.18); } }
@media (prefers-reduced-motion: reduce) { .mic.on { animation: none; } }
.voice-text { min-height: 7rem; }

/* Aufgaben */
.task { display: grid; grid-template-columns: auto 1fr; gap: .6rem; align-items: start; padding: .7rem 0; border-top: 1px solid var(--line); }
.task:first-child { border-top: 0; }
.task .t-title { font-weight: 700; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; color: var(--ink); }
.status { font-size: .75rem; font-weight: 700; padding: .05rem .5rem; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }
.status.done { background: #E3F2E9; color: var(--ok); border-color: #B9DEC7; }
.status.urgent { background: var(--err-bg); color: var(--err); border-color: #EBC1BC; }
.sticky-bar { position: sticky; bottom: calc(64px + var(--safe-b)); z-index: 4; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: .6rem; display: flex; gap: .5rem; align-items: center; box-shadow: 0 4px 14px rgba(0,0,0,.12); }
@media (min-width: 900px) { .sticky-bar { bottom: 1rem; } }
.proposal .entry { background: #fff; }
.proposal .skip { opacity: .5; }
.swatch { display: flex; gap: .75rem; align-items: center; }
.swatch input[type="color"] { width: 64px; min-height: 48px; padding: 2px; }
