/* =========================================================
   AC Stopuhr – Stylesheet
   Farbwelt und Formensprache sind aus der Mobile-App übernommen.
   ========================================================= */

:root {
    /* Dunkle Ansicht: neutrales Schiefergrau statt Nachtblau mit Leuchten */
    --ink:        #0E1117;
    --ink-2:      #141922;
    --panel:      #151A23;
    --panel-2:    #1B212B;
    --line:       #2A313D;
    --line-soft:  #222833;

    --blue:       #3B7DDD;
    --violet:     #5B6BDB;
    --green:      #35A06B;
    --amber:      #C08A2E;
    --red:        #CF5147;

    --text:       #E8EBF0;
    --soft:       #A7AFBC;
    --muted:      #78818F;

    --radius-lg:  10px;
    --radius:     8px;
    --radius-sm:  6px;

    --rail:       232px;
    --wrap:       1180px;

    --shadow:     0 1px 2px rgba(0, 0, 0, .35);
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    background: var(--ink);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
}


a { color: inherit; }

h1, h2, h3, h4 {
    margin: 0;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -.02em;
}

p { margin: 0 0 1em; }

img { max-width: 100%; height: auto; }

svg { width: 22px; height: 22px; flex: none; }

.skip {
    position: absolute;
    left: -9999px;
}
.skip:focus {
    left: 12px;
    top: 12px;
    z-index: 100;
    background: var(--blue);
    color: #fff;
    padding: 10px 16px;
    border-radius: 10px;
}

:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
}

/* ------------------------------------------------- Seitenleiste (Desktop) */

.rail {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--rail);
    display: none;
    flex-direction: column;
    gap: 8px;
    padding: 26px 18px;
    background: var(--panel);
    border-right: 1px solid var(--line-soft);
    z-index: 20;
}

.rail__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    padding: 4px 8px 22px;
}
.rail__brand img { border-radius: var(--radius-sm); }
.rail__brand span { display: grid; }
.rail__brand strong { font-size: 14.5px; font-weight: 600; letter-spacing: .01em; }
.rail__brand small { color: var(--muted); font-size: 11px; }

.rail__nav { display: grid; gap: 4px; }

.rail__link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--soft);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid transparent;
    transition: background .15s ease, color .15s ease;
}
.rail__link:hover { background: rgba(255, 255, 255, .04); color: var(--text); }
.rail__link.is-active {
    background: rgba(59, 125, 221, .12);
    border-color: transparent;
    color: var(--text);
    box-shadow: inset 2px 0 0 var(--blue);
}
.rail__link svg { width: 20px; height: 20px; }

.rail__user {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .04);
}
.rail__user-text { display: grid; min-width: 0; }
.rail__user-text strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail__user-text small { color: var(--muted); font-size: 12px; }
.rail__logout {
    margin-left: auto;
    color: var(--muted);
    display: grid;
    place-items: center;
}
.rail__logout:hover { color: var(--red); }

.avatar {
    width: 34px;
    height: 34px;
    flex: none;
    border-radius: var(--radius-sm);
    display: grid;
    place-items: center;
    font-weight: 700;
    background: var(--blue);
}

/* ------------------------------------------------- Topbar + Tabbar (Mobil) */

.topbar {
    position: sticky;
    top: 0;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    padding-top: max(12px, env(safe-area-inset-top));
    background: rgba(5, 5, 30, .88);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line-soft);
}
.topbar__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 16px;
}
.topbar__brand img { border-radius: 4px; }
.topbar__logout { color: var(--muted); display: grid; place-items: center; }
.topbar__back {
    background: none;
    border: 0;
    padding: 6px;
    margin-right: 2px;
    color: var(--soft);
    display: grid;
    place-items: center;
    cursor: pointer;
}

/* Bildanzeige über der Seite – kein Verlassen der App */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    grid-template-rows: auto 1fr;
    background: rgba(3, 3, 16, .96);
    backdrop-filter: blur(6px);
}
.lightbox[hidden] { display: none; }
.lightbox__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    padding-top: max(14px, env(safe-area-inset-top));
    border-bottom: 1px solid var(--line-soft);
}
.lightbox__bar strong { font-size: 15px; font-weight: 600; }
.lightbox__close {
    background: rgba(255, 255, 255, .08);
    border: 0;
    border-radius: 12px;
    padding: 8px 14px;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}
.lightbox__close svg { width: 18px; height: 18px; }
.lightbox__body {
    overflow: auto;
    padding: 16px;
    display: grid;
    place-items: center;
}
.lightbox__body img {
    max-width: 100%;
    border-radius: 12px;
    background: #fff;
}

.tabbar {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 20;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    background: rgba(11, 11, 38, .94);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--line-soft);
    padding-bottom: env(safe-area-inset-bottom);
}
.tabbar__link {
    display: grid;
    justify-items: center;
    gap: 3px;
    padding: 10px 4px 9px;
    color: var(--muted);
    text-decoration: none;
    font-size: 11px;
    position: relative;
}
.tabbar__link svg { width: 21px; height: 21px; }
.tabbar__link.is-active { color: var(--text); }
.tabbar__link.is-active::before {
    content: "";
    position: absolute;
    top: 0;
    width: 24px;
    height: 2px;
    background: var(--blue);
}

/* ------------------------------------------------- Layout */

.main {
    position: relative;
    z-index: 1;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 22px 18px 104px;
}

.page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px;
    margin-bottom: 26px;
}
.page-head__text { flex: 1 1 260px; min-width: 0; }
.page-head h1 { font-size: clamp(21px, 3vw, 26px); letter-spacing: -.01em; }
.page-head p { color: var(--soft); margin: 6px 0 0; font-size: 15px; }
.page-head__actions { display: flex; flex-wrap: wrap; gap: 10px; width: 100%; }
@media (min-width: 720px) {
    .page-head__actions { width: auto; }
}
.page-head__actions .btn { flex: 1 1 auto; justify-content: center; }
.page-head h1 { overflow-wrap: anywhere; }

.eyebrow {
    color: var(--muted);
    font-size: 13px;
    margin: 0 0 4px;
}

section + section { margin-top: 26px; }

.grid { display: grid; gap: 14px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid--stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .grid--stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

/* ------------------------------------------------- Panels */

.panel {
    background: var(--panel);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    padding: 20px;
}
.panel--tight { padding: 18px; }
.panel__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}
.panel__head > div { flex: 1 1 200px; min-width: 0; }
.panel__head h2 { font-size: 16px; font-weight: 600; }
.panel__head p { margin: 4px 0 0; color: var(--soft); font-size: 14px; }

.tile {
    background: var(--panel);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    padding: clamp(13px, 3.4vw, 18px);
    min-width: 0;
    display: grid;
    gap: 6px;
    align-content: start;
}
.tile__label {
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 7px;
}
.tile__label svg { width: 14px; height: 14px; color: var(--muted); }
.tile__value {
    font-size: clamp(18px, 4.4vw, 22px);
    font-weight: 600;
    letter-spacing: -.01em;
    font-variant-numeric: tabular-nums;
}
.tile__note { color: var(--muted); font-size: 12.5px; }
.tile__unit { font-size: 16px; font-weight: 500; color: var(--soft); }
.tile--green .tile__value { color: var(--green); }
.tile--amber .tile__value { color: var(--amber); }
.tile--red   .tile__value { color: var(--red); }
.tile--blue  .tile__value { color: #7fb0ff; }

/* ------------------------------------------------- Stopuhr */

.clock {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: clamp(20px, 4vw, 40px);
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: clamp(20px, 5vw, 32px) clamp(18px, 4vw, 32px);
    box-shadow: var(--shadow);
}
.clock[data-status="running"] { border-color: rgba(0, 230, 118, .42); }
.clock[data-status="paused"]  { border-color: rgba(255, 193, 7, .42); }

.clock__main {
    flex: 1 1 240px;
    min-width: 0;
}

.clock__status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .02em;
    background: rgba(255, 59, 92, .14);
    color: var(--red);
}
.clock[data-status="running"] .clock__status { background: rgba(0, 230, 118, .14); color: var(--green); }
.clock[data-status="paused"]  .clock__status { background: rgba(255, 193, 7, .14); color: var(--amber); }

.clock__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}
.clock[data-status="running"] .clock__dot { animation: pulse 1.6s ease-in-out infinite; }

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: .35; transform: scale(.8); }
}

.clock__time {
    font-size: clamp(40px, 11vw, 60px);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
    overflow-wrap: normal;
}

.clock__meta {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 13.5px;
    font-variant-numeric: tabular-nums;
}

.controls {
    display: flex;
    flex: 0 1 auto;
    flex-wrap: wrap;
    gap: 8px;
}

/* Schaltflächen statt bunter Kreise – lesbar und ohne Spielzeugoptik */
.control {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--panel-2);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}
.control__ring {
    display: inline-flex;
    width: auto;
    height: auto;
    background: none;
    box-shadow: none;
}
.control svg { width: 17px; height: 17px; color: currentColor; }
.control span { font-size: 14px; color: inherit; }

.control--start {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
}
.control--pause { color: var(--amber); border-color: var(--line); }
.control--stop  { color: var(--red);   border-color: var(--line); }

.control:hover:not(:disabled) { border-color: var(--text); }
.control--start:hover:not(:disabled) { filter: brightness(1.08); border-color: var(--green); }

.control:disabled {
    cursor: not-allowed;
    background: transparent;
    border-color: var(--line-soft);
    color: var(--muted);
}
.control:disabled svg { color: var(--muted); }

/* Sehr schmale Geräte: Uhr und Tasten untereinander, beides zentriert */
@media (max-width: 480px) {
    .clock { justify-content: center; text-align: center; }
    .clock__main { flex-basis: 100%; }
    .clock__status { margin-bottom: 10px; }
    .controls { width: 100%; }
    .control { flex: 1 1 auto; justify-content: center; }
}

/* ------------------------------------------------- Buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 15px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    background: rgba(255, 255, 255, .06);
    color: var(--text);
    font: inherit;
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: filter .15s ease, background .15s ease;
}
.btn:hover { filter: brightness(1.12); }
.btn svg { width: 19px; height: 19px; }
.btn--primary { background: var(--blue); color: #fff; }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--soft); }
.btn--ghost:hover { color: var(--text); border-color: var(--blue); }
.btn--danger { background: rgba(255, 59, 92, .16); color: #ff8ca2; border-color: rgba(255, 59, 92, .35); }
.btn--block { width: 100%; }
.btn--lg { padding: 12px 20px; font-size: 15px; }

.linkline {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--soft);
    text-decoration: none;
    font-size: 14.5px;
    margin-bottom: 16px;
}
.linkline:hover { color: var(--text); }
.linkline svg { width: 17px; height: 17px; }

/* ------------------------------------------------- Listen */

.entries { display: grid; gap: 10px; }

.entry {
    display: flex;
    align-items: center;
    gap: clamp(10px, 3vw, 14px);
    padding: clamp(12px, 3.4vw, 15px) clamp(13px, 3.6vw, 18px);
    background: var(--panel);
    border: 1px solid var(--line-soft);
    border-left: 3px solid var(--blue);
    border-radius: var(--radius);
}
.entry--start  { border-left-color: var(--green); }
.entry--weiter { border-left-color: var(--green); }
.entry--pause  { border-left-color: var(--amber); }
.entry--stop   { border-left-color: var(--red); }

.entry__icon {
    width: 42px;
    height: 42px;
    flex: none;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: rgba(37, 117, 252, .14);
    color: var(--blue);
}
.entry--start .entry__icon, .entry--weiter .entry__icon { background: rgba(0, 230, 118, .13); color: var(--green); }
.entry--pause .entry__icon { background: rgba(255, 193, 7, .13); color: var(--amber); }
.entry--stop .entry__icon  { background: rgba(255, 59, 92, .13); color: var(--red); }
.entry__icon svg { width: 19px; height: 19px; }

.entry__body { min-width: 0; flex: 1; }
.entry__title { font-weight: 600; font-size: 14.5px; }
.entry__meta {
    color: var(--muted);
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.entry__value {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-size: 15px;
    white-space: nowrap;
}

.daygroup { margin-bottom: 22px; }
.daygroup__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 0 4px 10px;
    color: var(--soft);
    font-size: 14px;
}
.daygroup__head strong { color: var(--text); font-size: 15px; }

/* ------------------------------------------------- Rapportkarten */

.report {
    display: flex;
    align-items: center;
    gap: clamp(11px, 3vw, 16px);
    padding: clamp(13px, 3.6vw, 18px);
    background: var(--panel);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    transition: border-color .15s ease;
}
.report:hover { border-color: rgba(37, 117, 252, .45); }
.report__date {
    width: 58px;
    flex: none;
    text-align: center;
    border-radius: 15px;
    padding: 9px 4px;
    background: rgba(37, 117, 252, .12);
}
.report__day { font-size: 18px; font-weight: 600; line-height: 1; }
.report__month { font-size: 11.5px; color: var(--soft); text-transform: none; }
.report__body { flex: 1; min-width: 0; }
.report__title {
    font-weight: 600;
    font-size: 15.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.report__meta { color: var(--muted); font-size: 13px; }
.report__hours {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.report__hours strong { font-size: 16px; display: block; }
.report__hours small { color: var(--muted); font-size: 12px; }

/* ------------------------------------------------- Tabellen */

.tablewrap {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--line-soft);
}
table.data {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    background: var(--panel);
    min-width: 640px;
}
table.data th,
table.data td {
    padding: 9px 12px;
    text-align: left;
    border-bottom: 1px solid var(--line-soft);
    vertical-align: top;
}
table.data th {
    background: transparent;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
    white-space: nowrap;
    border-bottom: 1px solid var(--line);
}
table.data tr:last-child td { border-bottom: 0; }
table.data td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data tr.is-free td { color: var(--muted); }
table.data tr.is-holiday td { background: rgba(142, 45, 226, .08); }
table.data tr.is-weekend td { background: rgba(255, 255, 255, .02); }
table.data tfoot td {
    font-weight: 700;
    background: rgba(37, 117, 252, .10);
    border-top: 1px solid var(--line);
}

.badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(255, 255, 255, .07);
    color: var(--soft);
}
.badge--green { background: rgba(0, 230, 118, .14); color: var(--green); }
.badge--amber { background: rgba(255, 193, 7, .14); color: var(--amber); }
.badge--red   { background: rgba(255, 59, 92, .14); color: #ff8ca2; }
.badge--blue  { background: rgba(37, 117, 252, .16); color: #7fb0ff; }

/* ------------------------------------------------- Formulare */

.form { display: grid; gap: 16px; }
.form__row { display: grid; gap: 16px; }
@media (min-width: 620px) {
    .form__row--2 { grid-template-columns: 1fr 1fr; }
    .form__row--3 { grid-template-columns: repeat(3, 1fr); }
}

.field { display: grid; gap: 7px; }
.field > label {
    font-size: 13.5px;
    color: var(--soft);
    font-weight: 500;
}
.field small { color: var(--muted); font-size: 12.5px; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="month"],
select,
textarea {
    width: 100%;
    padding: 13px 15px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--ink-2);
    color: var(--text);
    font: inherit;
    font-size: 15px;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus {
    border-color: var(--blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 117, 252, .18);
}
input::placeholder, textarea::placeholder { color: #55557d; }

select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--soft) 50%),
                      linear-gradient(135deg, var(--soft) 50%, transparent 50%);
    background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 42px;
}

.switch {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--ink-2);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-sm);
    cursor: pointer;
}
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch__box {
    width: 46px;
    height: 27px;
    flex: none;
    border-radius: 999px;
    background: #23234b;
    position: relative;
    transition: background .18s ease;
}
.switch__box::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    background: #fff;
    transition: transform .18s ease;
}
.switch input:checked + .switch__box { background: var(--blue); }
.switch input:checked + .switch__box::after { transform: translateX(19px); }
.switch input:focus-visible + .switch__box { outline: 2px solid var(--blue); outline-offset: 3px; }
.switch__text { display: grid; }
.switch__text strong { font-size: 15px; font-weight: 600; }
.switch__text small { color: var(--muted); font-size: 12.5px; }

.form__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.bausteine {
    display: grid;
    gap: 8px;
    margin-bottom: 4px;
}
.bausteine__reihe {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
.bausteine__titel {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-right: 2px;
}
.baustein {
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 7px 12px;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}
.baustein:hover { border-color: var(--blue); }
.baustein--auftrag {
    font-variant-numeric: tabular-nums;
    border-color: rgba(59, 125, 221, .45);
    color: var(--blue);
}
.baustein--weg {
    justify-self: start;
    font-size: 13px;
    color: var(--muted);
    background: transparent;
    border-style: dashed;
}

/* ------------------------------------------------- Meldungen und Leerzustände */

.flashes { display: grid; gap: 10px; margin-bottom: 20px; }
.flash {
    margin: 0;
    padding: 13px 18px;
    border-radius: var(--radius-sm);
    font-size: 14.5px;
    border: 1px solid;
}
.flash--ok    { background: rgba(0, 230, 118, .10); border-color: rgba(0, 230, 118, .35); color: #7dffbc; }
.flash--error { background: rgba(255, 59, 92, .10); border-color: rgba(255, 59, 92, .35); color: #ffa1b3; }
.flash--info  { background: rgba(37, 117, 252, .10); border-color: rgba(37, 117, 252, .35); color: #a9c8ff; }

.empty {
    text-align: center;
    padding: 44px 24px;
    background: var(--panel);
    border: 1px dashed var(--line);
    border-radius: var(--radius-lg);
}
.empty svg { width: 40px; height: 40px; color: var(--blue); margin-bottom: 12px; }
.empty h3 { font-size: 18px; margin-bottom: 6px; }
.empty p { color: var(--soft); margin: 0 auto; max-width: 42ch; font-size: 14.5px; }
.empty .btn { margin-top: 18px; }

/* ------------------------------------------------- Menüliste (Profil) */

.menu { display: grid; gap: 10px; }
.menu__item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 17px 18px;
    background: var(--panel);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    transition: border-color .15s ease;
}
.menu__item:hover { border-color: rgba(37, 117, 252, .45); }
.menu__item svg { color: var(--blue); }
.menu__item span { flex: 1; font-weight: 500; font-size: 14.5px; }
.menu__item .chev { color: var(--muted); width: 18px; height: 18px; }

.identity {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 22px;
}
.identity img { width: 56px; height: 56px; border-radius: var(--radius); }
.identity h1 { font-size: 21px; }
.identity p { margin: 4px 0 0; color: var(--soft); font-size: 14.5px; }

/* ------------------------------------------------- Login */

body.auth {
    display: grid;
    place-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 24px;
}
.authcard {
    position: relative;
    width: min(400px, 100%);
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 34px 30px 30px;
    box-shadow: var(--shadow);
    text-align: center;
}
.authcard img { width: 56px; border-radius: var(--radius); }
.authcard h1 { font-size: 21px; margin: 16px 0 6px; }
.authcard p.sub { color: var(--soft); font-size: 14.5px; margin-bottom: 26px; }
.authcard .form { text-align: left; }
.authcard .foot { margin: 22px 0 0; color: var(--muted); font-size: 12.5px; }

/* ------------------------------------------------- Hilfsklassen */

.muted { color: var(--muted); }
.soft { color: var(--soft); }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; }
.mt-l { margin-top: 26px; }
.center { text-align: center; }
.hidden { display: none !important; }

.monthnav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1 1 220px;
}
.monthnav select,
.monthnav input[type="month"] { flex: 1 1 140px; width: auto; min-width: 0; }
@media (min-width: 720px) {
    .monthnav { flex: 0 0 auto; }
    .monthnav select { min-width: 160px; }
}

.split {
    display: grid;
    gap: 16px;
}
@media (min-width: 1040px) {
}

/* ------------------------------------------------- Breakpoints */

@media (min-width: 900px) {
    .topbar, .tabbar { display: none; }
    .rail { display: flex; }
    .main {
        margin-left: var(--rail);
        max-width: calc(var(--wrap) - var(--rail));
        padding: 34px 34px 60px;
    }
}

@media (max-width: 400px) {
    .main { padding-left: 13px; padding-right: 13px; }
    .entry__icon { width: 36px; height: 36px; border-radius: 11px; }
    .report__date { width: 50px; }
    .panel { padding: 18px 16px; border-radius: 22px; }
    .tabbar__link { font-size: 10.5px; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}


/* =========================================================
   Helle Ansicht

   Nicht einfach umgedreht: auf Weiss braucht es dunklere
   Signalfarben und feinere Linien, sonst flimmert alles.
   ========================================================= */

[data-theme="hell"] {
    --ink:        #F5F6F8;
    --ink-2:      #FFFFFF;
    --panel:      #FFFFFF;
    --panel-2:    #F8F9FB;
    --line:       #DCE0E7;
    --line-soft:  #E6E9EF;

    --blue:       #1F5FD0;
    --violet:     #4553B8;
    --green:      #16794C;
    --amber:      #8A6100;
    --red:        #B4302B;

    --text:       #11161D;
    --soft:       #4A5361;
    --muted:      #6E7885;

    --shadow:     0 1px 2px rgba(17, 24, 39, .08);
}

[data-theme="hell"] .rail {
    background: #FFFFFF;
    border-right-color: var(--line-soft);
}
[data-theme="hell"] .rail__link:hover { background: rgba(31, 99, 214, .07); }
[data-theme="hell"] .rail__link.is-active {
    background: rgba(31, 99, 214, .08);
    border-color: transparent;
    box-shadow: inset 2px 0 0 var(--blue);
}
[data-theme="hell"] .rail__user { background: #F2F5FA; }

[data-theme="hell"] .topbar,
[data-theme="hell"] .tabbar { background: rgba(255, 255, 255, .94); }

[data-theme="hell"] .clock { background: var(--panel); }


[data-theme="hell"] .btn { background: #EEF2F8; }
[data-theme="hell"] .btn--primary { background: var(--blue); color: #fff; }
[data-theme="hell"] .btn--ghost { background: transparent; }
[data-theme="hell"] .btn--danger { background: rgba(206, 36, 64, .10); color: #A81B33; }

[data-theme="hell"] table.data th { background: #F1F4F9; }
[data-theme="hell"] table.data tr.is-weekend td { background: #F7F9FC; }
[data-theme="hell"] table.data tr.is-holiday td { background: rgba(123, 35, 196, .06); }
[data-theme="hell"] table.data tfoot td { background: rgba(31, 99, 214, .07); }

[data-theme="hell"] input::placeholder,
[data-theme="hell"] textarea::placeholder { color: #9AA3B6; }
[data-theme="hell"] .switch__box { background: #C9D2E0; }
[data-theme="hell"] .badge { background: #EDF1F7; }

[data-theme="hell"] .lightbox { background: rgba(244, 246, 251, .97); }
[data-theme="hell"] .lightbox__close { background: #EEF2F8; }
[data-theme="hell"] .ocrtext { color: var(--soft); }
[data-theme="hell"] .authcard { box-shadow: 0 24px 60px rgba(23, 33, 61, .14); }
[data-theme="hell"] 
/* Umschalter */
.themetoggle {
    background: none;
    border: 0;
    padding: 6px;
    color: var(--muted);
    display: grid;
    place-items: center;
    cursor: pointer;
}
.themetoggle:hover { color: var(--text); }
.rail__user .themetoggle { margin-left: auto; }
.rail__user .rail__logout { margin-left: 0; }

.fab {
    position: fixed;
    right: 18px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    z-index: 25;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    display: grid;
    place-items: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .28);
    text-decoration: none;
}
.fab svg { width: 24px; height: 24px; }
.fab:hover { filter: brightness(1.08); }

/* Am Rechner steht der Knopf schon oben in der Kopfzeile */
@media (min-width: 900px) {
    .fab { display: none; }
}

/* ------------------------------------------------- Druckansicht */

@media print {
    body::before, .rail, .topbar, .tabbar, .btn, .controls, .no-print { display: none !important; }
    body { background: #fff; color: #111; }
    .main { margin: 0; max-width: none; padding: 0; }
    .panel, .tile, table.data { background: #fff; border-color: #ddd; color: #111; }
    table.data th { background: #f3f4f6; color: #111; }
}
