/* JU Zeit - Stempeluhr-PWA (2026-10-13). Mobile-first, JU-Farben
   (Anthrazit + Sand), helles und dunkles Schema, iPhone-Safe-Areas. */
:root {
    --ink: #2c2a2b;
    --sand: #c4bea2;
    --sand-strong: #a39c7b;
    --bg: #f5f3ec;
    --card: #ffffff;
    --text: #2c2a2b;
    --muted: #6f6b62;
    --line: #e4e0d3;
    --ok: #2f7d4f;
    --ok-bg: #e3f1e8;
    --warn: #8a5a00;
    --warn-bg: #fbefd5;
    --danger: #b3261e;
    --danger-bg: #fbe4e2;
    --radius: 18px;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #1c1b1b;
        --card: #2c2a2b;
        --text: #f1eee6;
        --muted: #b3ad9d;
        --line: #3d3a3a;
        --ok-bg: #1f3a2a;
        --ok: #8fd3a8;
        --warn-bg: #3d3018;
        --warn: #f0c46c;
        --danger-bg: #43201e;
        --danger: #f2a49d;
        color-scheme: dark;
    }
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body { min-height: 100dvh; overscroll-behavior-y: none; }

.app {
    max-width: 520px;
    margin: 0 auto;
    min-height: 100dvh;
    padding: calc(env(safe-area-inset-top) + 12px) calc(env(safe-area-inset-right) + 16px)
             calc(env(safe-area-inset-bottom) + 84px) calc(env(safe-area-inset-left) + 16px);
}

.splash { display: grid; place-items: center; min-height: 80dvh; }
.splash img { border-radius: 22px; }

header.top {
    display: flex; align-items: center; gap: 12px;
    margin: 4px 0 16px;
}
header.top img { width: 36px; height: 36px; border-radius: 10px; }
header.top .who { flex: 1; min-width: 0; }
header.top .who strong { display: block; font-size: 17px; }
header.top .who span { color: var(--muted); font-size: 13px; }

h1 { font-size: 22px; margin: 4px 0 16px; }
h2 { font-size: 17px; margin: 0 0 10px; }

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 14px;
}

.banner { border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; font-size: 15px; }
.banner.warn { background: var(--warn-bg); color: var(--warn); }
.banner.danger { background: var(--danger-bg); color: var(--danger); }
.banner.ok { background: var(--ok-bg); color: var(--ok); }

.state { text-align: center; padding: 22px 16px 18px; }
.state .label { font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.state .clock { font-size: 52px; font-weight: 600; font-variant-numeric: tabular-nums; margin: 6px 0 2px; }
.state .since { color: var(--muted); font-size: 14px; }

.pill { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 13px; font-weight: 600; }
.pill.working { background: var(--ok-bg); color: var(--ok); }
.pill.on_break { background: var(--warn-bg); color: var(--warn); }
.pill.off { background: var(--line); color: var(--muted); }

button, .btn {
    appearance: none; border: 0; cursor: pointer;
    font: inherit; font-weight: 600;
    border-radius: 14px; padding: 14px 18px; min-height: 48px;
    background: var(--line); color: var(--text);
    width: 100%;
    touch-action: manipulation;
}
button:disabled { opacity: .45; cursor: default; }
button.primary { background: var(--ink); color: #fff; }
button.big { min-height: 76px; font-size: 21px; border-radius: 20px; }
button.big.in { background: var(--ok); color: #fff; }
button.big.out { background: var(--ink); color: #fff; }
button.ghost { background: transparent; border: 1px solid var(--line); }
button.danger { background: var(--danger-bg); color: var(--danger); }
button.link { background: none; padding: 8px 0; min-height: 0; width: auto; color: var(--muted); font-weight: 500; text-decoration: underline; }
@media (prefers-color-scheme: dark) {
    button.primary, button.big.out { background: var(--sand); color: #1c1b1b; }
}

.stack { display: grid; gap: 10px; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips button { width: auto; flex: 1; min-height: 40px; padding: 8px 10px; font-size: 14px; background: transparent; border: 1px solid var(--line); }
.chips button[aria-pressed="true"] { background: var(--sand); border-color: var(--sand); color: #1c1b1b; }

.project-now { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.project-now .name { flex: 1; font-weight: 600; }
.project-now .time { font-variant-numeric: tabular-nums; color: var(--muted); }
.project-now button { width: auto; min-height: 40px; padding: 8px 16px; }

label { display: block; font-size: 14px; color: var(--muted); margin: 0 0 6px; }
input, select, textarea {
    width: 100%; font: inherit; font-size: 16px; color: var(--text);
    background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
    padding: 12px; min-height: 48px;
}
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 3px solid var(--sand); outline-offset: 1px; }
.field { margin-bottom: 12px; }
.error { color: var(--danger); font-size: 14px; margin-top: 6px; }
.hint { color: var(--muted); font-size: 13px; }

.day { padding: 12px 0; border-top: 1px solid var(--line); }
.day:first-of-type { border-top: 0; padding-top: 0; }
.day .head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.day .head strong { font-size: 15px; }
.day .blocks, .day .projects { font-size: 14px; color: var(--muted); margin-top: 4px; }
.tag { font-size: 12px; padding: 1px 7px; border-radius: 99px; background: var(--warn-bg); color: var(--warn); margin-left: 4px; }


nav.tabs {
    position: fixed; left: 0; right: 0; bottom: 0;
    display: flex; justify-content: center;
    background: var(--card); border-top: 1px solid var(--line);
    padding: 6px calc(env(safe-area-inset-right) + 8px) calc(env(safe-area-inset-bottom) + 6px) calc(env(safe-area-inset-left) + 8px);
}
nav.tabs .inner { display: flex; width: 100%; max-width: 520px; gap: 4px; }
nav.tabs button { background: none; min-height: 52px; padding: 6px; font-size: 13px; font-weight: 500; color: var(--muted); border-radius: 12px; }
nav.tabs button[aria-current="page"] { color: var(--text); background: var(--bg); font-weight: 700; }

.offline-bar {
    position: sticky; top: calc(env(safe-area-inset-top) + 4px); z-index: 5;
}

.privacy p, .privacy li { font-size: 15px; }
.privacy ul { padding-left: 20px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
