/* =====================================================================
   PGD Zeiterfassung – Corporate Design
   Planungsgesellschaft m. b. H. • Dinslaken
   ===================================================================== */

:root {
    /* Hell (Standard) */
    --bg:            #f3f6fa;
    --bg-2:          #eaf0f6;
    --surface:       rgba(255, 255, 255, .78);
    --surface-2:     rgba(255, 255, 255, .92);
    --surface-solid: #ffffff;
    --input:         #ffffff;
    --line:          rgba(20, 40, 70, .10);
    --line-strong:   rgba(20, 40, 70, .18);

    --text:    #0f1b2b;
    --text-2:  #3f4f64;
    --muted:   #68778b;

    --accent:        #2f80d1;
    --accent-strong: #1f6fbf;
    --accent-2:      #1c66b3;
    --accent-soft:   rgba(47, 128, 209, .10);
    --accent-glow:   rgba(47, 128, 209, .28);

    --success: #12925e;
    --warn:    #b97c06;
    --danger:  #d63b49;
    --info:    #3f68d0;

    --shadow:        0 1px 2px rgba(20, 40, 70, .05), 0 14px 34px -20px rgba(20, 40, 70, .28);
    --bg-glow-1:     rgba(47, 128, 209, .10);
    --bg-glow-2:     rgba(47, 128, 209, .06);
    --grid-line:     rgba(30, 80, 140, .045);
    --overlay-1:     rgba(20, 40, 70, .03);
    --overlay-2:     rgba(20, 40, 70, .045);
    --overlay-hover: rgba(20, 40, 70, .06);
    --track:         rgba(20, 40, 70, .08);
    --sidebar-bg:    linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(248, 250, 253, .9));
    --topbar-bg:     linear-gradient(180deg, rgba(243, 246, 250, .92), rgba(243, 246, 250, .7));
    --nav-active:    #0f4f93;
    --link-hover:    #0f4f93;
    --alert-error:   #a3202c;
    --alert-success: #0d6b44;
    --placeholder:   #97a3b3;
    --input-focus:   #ffffff;
    --input-hover:   rgba(20, 40, 70, .30);
    --table-head:    rgba(234, 240, 246, .8);
    --row-hover:     rgba(47, 128, 209, .05);
    --day-row:       rgba(20, 40, 70, .03);
    --modal-bg:      rgba(255, 255, 255, .97);
    --modal-foot:    rgba(20, 40, 70, .03);
    --backdrop:      rgba(15, 27, 43, .35);
    --auth-card-bg:  rgba(255, 255, 255, .82);
    --clock-grad:    linear-gradient(180deg, #0f1b2b, #2f6aa8);
    --today-bar:     linear-gradient(180deg, var(--accent), #0f4f93);
    --logo-gap-bg:   #f3f6fa;
    --switch-knob:   #ffffff;
    --badge-muted:   #6b7788;
    --mobile-shadow: rgba(20, 40, 70, .25);

    --sidebar-w: 268px;
    --radius:    14px;
    --radius-sm: 9px;

    --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --font-display: "Inter Tight", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

    color-scheme: light;
}

:root[data-theme="dark"] {
    --bg:            #070b11;
    --bg-2:          #0b111a;
    --surface:       rgba(15, 22, 33, .72);
    --surface-2:     rgba(24, 34, 49, .78);
    --surface-solid: #111925;
    --input:         rgba(7, 11, 17, .55);
    --line:          rgba(150, 172, 204, .12);
    --line-strong:   rgba(150, 172, 204, .24);

    --text:    #e9eef5;
    --text-2:  #b3bfce;
    --muted:   #7d8a9b;

    --accent:        #4b9fea;
    --accent-strong: #2f80d1;
    --accent-2:      #8cc4f5;
    --accent-soft:   rgba(75, 159, 234, .14);
    --accent-glow:   rgba(75, 159, 234, .35);

    --success: #3fcf8e;
    --warn:    #f4b740;
    --danger:  #f0616d;
    --info:    #7ea9ff;

    --shadow:        0 1px 0 rgba(255,255,255,.04) inset, 0 20px 50px -24px rgba(0,0,0,.7);
    --bg-glow-1:     rgba(47, 128, 209, .16);
    --bg-glow-2:     rgba(47, 128, 209, .10);
    --grid-line:     rgba(140, 180, 230, .035);
    --overlay-1:     rgba(255, 255, 255, .03);
    --overlay-2:     rgba(255, 255, 255, .05);
    --overlay-hover: rgba(255, 255, 255, .06);
    --track:         rgba(255, 255, 255, .07);
    --sidebar-bg:    linear-gradient(180deg, rgba(11, 17, 26, .92), rgba(8, 12, 19, .88));
    --topbar-bg:     linear-gradient(180deg, rgba(7, 11, 17, .88), rgba(7, 11, 17, .55));
    --nav-active:    #ffffff;
    --link-hover:    #ffffff;
    --alert-error:   #ffc5ca;
    --alert-success: #b9f3d6;
    --placeholder:   #5d6a7b;
    --input-focus:   rgba(7, 11, 17, .8);
    --input-hover:   rgba(150, 172, 204, .38);
    --table-head:    rgba(10, 15, 23, .6);
    --row-hover:     rgba(75, 159, 234, .045);
    --day-row:       rgba(255, 255, 255, .025);
    --modal-bg:      rgba(14, 21, 32, .94);
    --modal-foot:    rgba(0, 0, 0, .15);
    --backdrop:      rgba(3, 6, 10, .65);
    --auth-card-bg:  rgba(13, 20, 30, .7);
    --clock-grad:    linear-gradient(180deg, #fff, #a9c7e6);
    --today-bar:     linear-gradient(180deg, #fff, var(--accent));
    --logo-gap-bg:   #0d141e;
    --switch-knob:   #cfd8e3;
    --badge-muted:   #8f9bab;
    --mobile-shadow: rgba(0, 0, 0, .5);

    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(1200px 700px at 85% -10%, var(--bg-glow-1), transparent 60%),
        radial-gradient(900px 600px at -10% 110%, var(--bg-glow-2), transparent 60%),
        var(--bg);
    color: var(--text);
    font: 14px/1.5 var(--font);
    font-feature-settings: "cv11", "ss01", "tnum";
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); letter-spacing: -.01em; }
p { margin: 0; }
code { font-family: var(--font-mono); font-size: .9em; background: var(--accent-soft); color: var(--accent-2); padding: 1px 5px; border-radius: 4px; }
::selection { background: var(--accent); color: #fff; }

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.text-accent { color: var(--accent-2); }
.text-warn { color: var(--warn); }
.inline { display: inline; margin: 0; }

.icon { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: middle; }

/* Hintergrund ------------------------------------------------------- */
#particles {
    position: fixed; inset: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
}
.bg-grid {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse at 60% 30%, #000 20%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at 60% 30%, #000 20%, transparent 75%);
}

/* Glas-Oberflächen ----------------------------------------------------- */
.glass {
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
}

/* Logo ------------------------------------------------------------- */
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); }
.brand--light { --logo-gap: var(--logo-gap-bg); }
.brand--dark  { --logo-gap: #fff; color: #111; }
.logo-mark { width: 44px; height: 44px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: -.01em; }
.brand-name em { font-style: normal; color: var(--accent); padding: 0 1px; }
.brand-tag { font-size: 9.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.brand--compact .logo-mark { width: 38px; height: 38px; }
.brand--compact .brand-name { font-size: 12.5px; }
.brand-img { display: block; height: auto; max-height: 56px; }
[data-theme="dark"] .brand-img--light { filter: invert(1) hue-rotate(180deg) brightness(1.1); mix-blend-mode: screen; }

/* App-Shell -------------------------------------------------------- */
.shell { position: relative; z-index: 1; display: flex; min-height: 100vh; }

.sidebar {
    position: fixed; inset: 0 auto 0 0;
    width: var(--sidebar-w);
    display: flex; flex-direction: column;
    padding: 22px 16px 16px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--line);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    z-index: 40;
    transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}
.sidebar-brand { display: block; padding: 4px 8px 18px; border-bottom: 1px solid var(--line); }
.sidebar-brand .brand-img { max-height: 44px; }
.sidebar-product {
    display: flex; align-items: center; gap: 8px;
    margin: 16px 8px 10px;
    font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--text-2);
}
.product-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), 0 0 14px var(--accent); }

.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav-section { margin: 18px 12px 6px; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.nav-link {
    position: relative;
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--text-2);
    font-weight: 500;
    transition: background .2s, color .2s;
}
.nav-link:hover { background: var(--overlay-2); color: var(--text); }
.nav-link.is-active {
    color: var(--nav-active);
    background: linear-gradient(90deg, rgba(75, 159, 234, .2), rgba(75, 159, 234, .04));
    box-shadow: inset 0 0 0 1px rgba(75, 159, 234, .22);
}
.nav-link.is-active::before {
    content: ""; position: absolute; left: -16px; top: 8px; bottom: 8px; width: 3px;
    border-radius: 0 3px 3px 0; background: var(--accent); box-shadow: 0 0 12px var(--accent);
}
.nav-link.is-active .icon { color: var(--accent-2); }

.sidebar-foot { display: flex; align-items: center; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.user-chip { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; padding: 6px; border-radius: 10px; transition: background .2s; }
.user-chip:hover { background: var(--overlay-2); }
.user-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.user-meta strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.avatar {
    display: grid; place-items: center; flex: none;
    width: 34px; height: 34px; border-radius: 10px;
    background: linear-gradient(135deg, var(--accent-strong), #1b4a7a);
    color: #fff; font-weight: 700; font-size: 12.5px; letter-spacing: .02em;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15);
}
.avatar--lg { width: 46px; height: 46px; border-radius: 13px; font-size: 15px; }
.avatar--xl { width: 72px; height: 72px; border-radius: 18px; font-size: 24px; }

.sidebar-backdrop { display: none; }

.main { flex: 1; min-width: 0; margin-left: var(--sidebar-w); display: flex; flex-direction: column; }

.topbar {
    position: sticky; top: 0; z-index: 30;
    display: flex; align-items: center; gap: 16px;
    padding: 18px 32px;
    background: var(--topbar-bg);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
.topbar-title { flex: 1; min-width: 0; }
.topbar-title h1 { font-size: 21px; font-weight: 700; }
.topbar-title p { color: var(--muted); font-size: 13px; margin-top: 1px; }
.topbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.icon-btn.menu-btn { display: none; }

.content { flex: 1; padding: 28px 32px 40px; display: flex; flex-direction: column; gap: 20px; }

.app-footer {
    display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    padding: 18px 32px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line);
}

/* Laufende Stoppuhr (Kopfzeile) ---------------------------------------- */
.timer-pill {
    display: flex; align-items: center; gap: 10px;
    padding: 5px 5px 5px 14px;
    border-radius: 999px;
    background: rgba(240, 97, 109, .1);
    border: 1px solid rgba(240, 97, 109, .35);
    box-shadow: 0 0 24px -6px rgba(240, 97, 109, .45);
}
.timer-pill-info { display: flex; flex-direction: column; line-height: 1.1; }
.timer-pill-info .mono { font-size: 14px; font-weight: 700; }
.timer-pill-info small { font-size: 10.5px; color: var(--text-2); }
.timer-pill-stop {
    display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
    border: 0; background: var(--danger); color: #fff; cursor: pointer; transition: transform .15s;
}
.timer-pill-stop:hover { transform: scale(1.08); }
.timer-pill-stop .icon { width: 12px; height: 12px; }

.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); flex: none; }
.pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: pulse 1.6s ease-out infinite; }
@keyframes pulse { to { transform: scale(3); opacity: 0; } }

/* Buttons ---------------------------------------------------------- */
.btn {
    --b: var(--line-strong);
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 38px; padding: 0 16px;
    border-radius: 10px;
    border: 1px solid var(--b);
    background: var(--overlay-1);
    color: var(--text);
    font: 600 13.5px/1 var(--font);
    cursor: pointer; white-space: nowrap;
    transition: background .2s, border-color .2s, transform .15s, box-shadow .2s;
}
.btn:hover { background: var(--overlay-hover); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn .icon { width: 16px; height: 16px; }
.btn--primary {
    --b: transparent;
    background: linear-gradient(180deg, #57a9f0, var(--accent-strong));
    color: #fff;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 8px 22px -10px var(--accent-glow);
}
.btn--primary:hover { background: linear-gradient(180deg, #6ab4f3, #3a8ddc); box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 10px 28px -8px var(--accent-glow); }
.btn--danger { --b: transparent; background: linear-gradient(180deg, #f47a84, #d94753); color: #fff; box-shadow: 0 8px 22px -10px rgba(240, 97, 109, .6); }
.btn--danger:hover { background: linear-gradient(180deg, #f78b94, #e0535f); }
.btn--ghost { background: transparent; }
.btn--sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn--sm .icon { width: 14px; height: 14px; }
.btn--lg { height: 46px; padding: 0 22px; font-size: 14.5px; border-radius: 12px; }
.btn--block { width: 100%; }

.icon-btn {
    display: inline-grid; place-items: center;
    width: 34px; height: 34px; border-radius: 9px;
    border: 1px solid transparent; background: transparent;
    color: var(--text-2); cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
}
.icon-btn:hover { background: var(--overlay-hover); color: var(--text); border-color: var(--line); }
.icon-btn--danger:hover { color: var(--danger); background: rgba(240, 97, 109, .1); border-color: rgba(240, 97, 109, .25); }
.icon-btn--flip .icon { transform: scaleX(-1); }
.icon-btn .icon { width: 17px; height: 17px; }

.link { color: var(--accent-2); display: inline-flex; align-items: center; gap: 4px; }
.link:hover { color: var(--link-hover); text-decoration: underline; text-underline-offset: 3px; }
.link .icon { width: 14px; height: 14px; }

/* Meldungen ------------------------------------------------------- */
.toast {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px 12px 16px;
    border-radius: 12px;
    border: 1px solid;
    backdrop-filter: blur(12px);
    animation: toastIn .45s cubic-bezier(.2, .8, .2, 1);
}
.toast span { flex: 1; }
.toast--success { background: rgba(63, 207, 142, .1); border-color: rgba(63, 207, 142, .32); }
.toast--success > .icon { color: var(--success); }
.toast--error   { background: rgba(240, 97, 109, .1); border-color: rgba(240, 97, 109, .35); }
.toast--error > .icon { color: var(--danger); }
.toast--info    { background: rgba(126, 169, 255, .1); border-color: rgba(126, 169, 255, .32); }
.toast--info > .icon { color: var(--info); }
.toast-close { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 4px; display: grid; }
.toast-close:hover { color: var(--text); }
.toast.is-hiding { opacity: 0; transform: translateY(-6px); transition: .35s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } }

.alert { padding: 11px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 16px; border: 1px solid; }
.alert--error   { background: rgba(240, 97, 109, .1); border-color: rgba(240, 97, 109, .35); color: var(--alert-error); }
.alert--success { background: rgba(63, 207, 142, .1); border-color: rgba(63, 207, 142, .3); color: var(--alert-success); }
.alert--info    { background: rgba(126, 169, 255, .1); border-color: rgba(126, 169, 255, .3); }

/* Badges / Tags / Chips ------------------------------------------- */
.badge {
    --c: var(--muted);
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 9px; border-radius: 999px;
    font-size: 11.5px; font-weight: 600; white-space: nowrap;
    color: var(--c);
    background: color-mix(in srgb, var(--c) 13%, transparent);
    border: 1px solid color-mix(in srgb, var(--c) 30%, transparent);
}
.badge .icon { width: 12px; height: 12px; }
.badge--success { --c: var(--success); }
.badge--warn    { --c: var(--warn); }
.badge--muted   { --c: var(--badge-muted); }
.badge--info    { --c: var(--info); }
.badge--accent  { --c: var(--accent-2); }
.badge--live    { --c: var(--danger); }
.badge--live .pulse { width: 6px; height: 6px; }

.tag {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px; margin: 0 4px 4px 0; border-radius: 6px;
    font-size: 11.5px; font-weight: 500;
    background: var(--overlay-2); border: 1px solid var(--line); color: var(--text-2);
}
.tag .icon { width: 12px; height: 12px; }
.tag--accent  { color: var(--accent-2); background: var(--accent-soft); border-color: rgba(75, 159, 234, .25); }
.tag--success { color: var(--success); background: rgba(63, 207, 142, .08); border-color: rgba(63, 207, 142, .25); }
.tag--muted   { color: var(--muted); }
a.tag:hover { filter: brightness(1.2); }
[data-theme="light"] a.tag:hover, :root:not([data-theme]) a.tag:hover { filter: brightness(.9); }

.chip { display: inline-flex; gap: 6px; padding: 5px 11px; border-radius: 999px; background: var(--overlay-2); border: 1px solid var(--line); font-size: 12px; color: var(--text-2); }
.chip strong { color: var(--text); }
.chip--warn { border-color: rgba(244, 183, 64, .3); background: rgba(244, 183, 64, .07); }
.chip--warn strong { color: var(--warn); }

/* Karten ---------------------------------------------------------- */
.card { border-radius: var(--radius); padding: 20px 22px; min-width: 0; }
.card--flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.card-head--pad { padding: 18px 22px 0; }
.card-head h3 { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 650; }
.card-head h3 .icon { color: var(--accent); }
.card-head-meta { display: flex; gap: 8px; flex-wrap: wrap; }

.empty { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 48px 20px; color: var(--muted); }
.empty > .icon { width: 36px; height: 36px; color: var(--accent); opacity: .6; }
.empty--sm { padding: 24px 12px; }
.empty--sm > .icon { width: 26px; height: 26px; }

/* Dashboard -------------------------------------------------------- */
.hero-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.eyebrow { font-size: 13px; color: var(--accent-2); font-weight: 600; letter-spacing: .04em; }
.welcome-name { font-size: clamp(28px, 4vw, 40px); font-weight: 750; letter-spacing: -.03em; line-height: 1.1; margin: 2px 0 6px; }
.accent-dot { color: var(--accent); }

.grid-dash { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.card--wide { grid-column: 1 / -1; }

.card--timer { position: relative; overflow: hidden; grid-row: span 2; }
.card--timer::before {
    content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
    background: linear-gradient(135deg, rgba(75, 159, 234, .35), transparent 40%, transparent 70%, rgba(75, 159, 234, .15));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude; padding: 1px;
}
.card--timer.is-running::before { background: linear-gradient(135deg, rgba(240, 97, 109, .5), transparent 45%, transparent 70%, rgba(240, 97, 109, .2)); }

.timer-display { text-align: center; padding: 12px 0 18px; }
.timer-clock {
    font-size: clamp(46px, 7vw, 76px); font-weight: 700; line-height: 1;
    background: var(--clock-grad);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    text-shadow: 0 0 40px rgba(75, 159, 234, .2);
}
.timer-since { margin-top: 8px; color: var(--muted); font-size: 13px; }
.timer-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 16px; }
.timer-meta > div { padding: 10px 12px; border-radius: 10px; background: var(--overlay-1); border: 1px solid var(--line); min-width: 0; }
.timer-meta dt { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.timer-meta dd { margin: 2px 0 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timer-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.timer-actions .btn--danger { flex: 1; }
.timer-start-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 6px; }
.btn--start { min-width: 220px; }
.btn--start .icon { width: 14px; height: 14px; }

.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.kpi { border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden; }
.kpi::after { content: ""; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: radial-gradient(var(--accent-soft), transparent 70%); }
.kpi-label { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-2); }
.kpi-label .icon { width: 15px; height: 15px; color: var(--accent); }
.kpi-value { font-size: 30px; font-weight: 700; line-height: 1.1; }
.kpi-value small { font-size: 16px; color: var(--muted); margin-left: 2px; }
.kpi-sub { font-size: 12px; color: var(--muted); }

.meter { height: 6px; border-radius: 99px; background: var(--track); overflow: hidden; margin-top: 6px; }
.meter > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-strong), var(--accent-2)); box-shadow: 0 0 12px var(--accent-glow); }
.meter--warn > span { background: linear-gradient(90deg, #d98f1d, var(--warn)); }
.meter--danger > span { background: linear-gradient(90deg, #c83b47, var(--danger)); }

.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; height: 190px; align-items: end; }
.bar { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.bar-val { font-size: 11px; color: var(--text-2); min-height: 16px; }
.bar-track { flex: 1; width: 100%; max-width: 38px; border-radius: 8px; background: var(--overlay-1); display: flex; align-items: flex-end; overflow: hidden; }
.bar-fill {
    width: 100%; height: var(--h); border-radius: 8px;
    background: linear-gradient(180deg, var(--accent-2), var(--accent-strong));
    animation: grow 1s cubic-bezier(.2, .8, .2, 1) both;
    transform-origin: bottom;
}
.bar.is-today .bar-fill { background: var(--today-bar); box-shadow: 0 0 18px var(--accent-glow); }
.bar-label { font-size: 12px; color: var(--muted); }
.bar.is-today .bar-label { color: var(--text); font-weight: 700; }
@keyframes grow { from { transform: scaleY(0); } }

.hbars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.hbar-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; margin-bottom: 6px; }
.hbar-top span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar { height: 8px; border-radius: 99px; background: var(--track); overflow: hidden; }
.hbar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-strong), var(--accent-2)); animation: growX 1s cubic-bezier(.2, .8, .2, 1) both; transform-origin: left; }
@keyframes growX { from { transform: scaleX(0); } }

.entry-list { list-style: none; margin: 0; padding: 0; }
.entry { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto 70px; gap: 16px; align-items: center; padding: 12px 4px; border-top: 1px solid var(--line); }
.entry:first-child { border-top: 0; }
.entry-date { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 11px; background: var(--overlay-2); border: 1px solid var(--line); line-height: 1; }
.entry-date strong { font-size: 17px; }
.entry-date span { font-size: 10.5px; text-transform: uppercase; color: var(--muted); margin-top: 3px; letter-spacing: .06em; }
.entry-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entry-title .sep { color: var(--muted); margin: 0 6px; }
.entry-desc { color: var(--text-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entry-tags { display: flex; flex-wrap: wrap; justify-content: flex-end; }
.entry-tags .tag { margin: 2px 0 2px 4px; }
.entry-dur { text-align: right; font-weight: 700; font-size: 16px; }
.entry-dur.is-nonbill { color: var(--muted); }

/* Formulare ------------------------------------------------------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 12px; font-weight: 600; color: var(--text-2); letter-spacing: .01em; }

input, select, textarea { font: inherit; color: inherit; }
.field input, .field select, .field textarea,
.filters select, .search input, .month-form input, .tb-pop textarea {
    width: 100%;
    min-height: 40px;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid var(--line-strong);
    background: var(--input);
    color: var(--text);
    outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.field textarea { resize: vertical; min-height: 64px; line-height: 1.45; }
.field input::placeholder, .field textarea::placeholder, .search input::placeholder { color: var(--placeholder); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--input-hover); }
.field input:focus, .field select:focus, .field textarea:focus,
.filters select:focus, .search input:focus, .month-form input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
    background: var(--input-focus);
}
.field select:disabled { opacity: .5; cursor: not-allowed; }
select { cursor: pointer; }
select option { background: var(--surface-solid); color: var(--text); }
input[type="date"], input[type="time"], input[type="month"] { color-scheme: inherit; }
.field--highlight input { border-color: rgba(75, 159, 234, .45); background: rgba(75, 159, 234, .08); font-family: var(--font-mono); font-weight: 700; font-size: 15px; }
.field--btn { justify-content: flex-end; }

.input-affix { position: relative; display: flex; align-items: center; }
.input-affix em { position: absolute; right: 12px; font-style: normal; color: var(--muted); font-size: 13px; pointer-events: none; }
.input-affix input { padding-right: 44px; }
.input-affix--btn { gap: 8px; }
.input-affix--btn input { padding-right: 12px; font-family: var(--font-mono); }
.input-affix--btn .btn { height: 40px; }

.hint { font-size: 12px; color: var(--muted); margin-top: -4px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.grid-3-1 { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); gap: 14px; }
.grid-1-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 14px; }
.grid-1-2-1 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr); gap: 14px; }
.time-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-size: 13px; color: var(--text-2); }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track { position: relative; width: 38px; height: 22px; border-radius: 99px; background: var(--track); border: 1px solid var(--line-strong); transition: background .25s, border-color .25s; flex: none; }
.switch-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--switch-knob); transition: transform .25s cubic-bezier(.2, .8, .2, 1), background .25s; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.switch input:checked + .switch-track { background: var(--accent-strong); border-color: var(--accent); }
.switch input:checked + .switch-track::after { transform: translateX(16px); background: #fff; }
.switch input:focus-visible + .switch-track { box-shadow: 0 0 0 3px var(--accent-soft); }
.switch--field { align-self: end; min-height: 40px; }

/* Werkzeugleisten & Filter ----------------------------------------- */
.toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px; border-radius: var(--radius); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; flex: 1 1 520px; margin: 0; align-items: center; }
.filters select { width: auto; min-width: 150px; min-height: 38px; padding: 7px 34px 7px 12px; }
.search { position: relative; display: flex; align-items: center; flex: 1; min-width: 200px; }
.search .icon { position: absolute; left: 12px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.search input { min-height: 38px; padding-left: 36px; }
.search--grow { flex: 1 1 260px; }
.month-nav { display: flex; align-items: center; gap: 4px; }
.month-form { margin: 0; }
.month-form input { min-height: 38px; width: 170px; font-weight: 600; }

.stat-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 14px 18px; border-radius: var(--radius); }
.stat span { font-size: 12px; color: var(--text-2); }
.stat strong { font-size: 24px; font-weight: 700; line-height: 1.2; }
.stat small { font-size: 11.5px; color: var(--muted); }
.stat--warn { border-color: rgba(244, 183, 64, .25); }
.stat--warn strong { color: var(--warn); }
.stat-strip--inner { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 18px; }
.stat-strip--inner .stat { background: var(--overlay-1); border: 1px solid var(--line); }

/* Tabellen -------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th {
    position: sticky; top: 0;
    padding: 12px 16px;
    text-align: left; white-space: nowrap;
    font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
    background: var(--table-head);
    border-bottom: 1px solid var(--line);
}
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: var(--row-hover); }
.table tbody:last-child tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; }
.table .actions { text-align: right; white-space: nowrap; width: 1%; }
.table .check { width: 36px; text-align: center; }
.table input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.card:not(.card--flush) .table th { background: transparent; }
.card:not(.card--flush) .table td:first-child, .card:not(.card--flush) .table th:first-child { padding-left: 0; }
.card:not(.card--flush) .table td:last-child, .card:not(.card--flush) .table th:last-child { padding-right: 0; }

.day-row td { background: var(--day-row); padding-top: 9px; padding-bottom: 9px; }
.table tbody tr.day-row:hover { background: transparent; }
.day-badge { display: inline-block; min-width: 30px; padding: 1px 6px; margin-right: 8px; text-align: center; border-radius: 6px; font-size: 11px; font-weight: 700; color: var(--accent-2); background: var(--accent-soft); }
.desc-cell { min-width: 260px; max-width: 520px; }
tr.is-nonbill td { color: var(--text-2); }
tr.is-inactive, .is-inactive { opacity: .55; }

.select-badge { border-radius: 99px; padding: 4px 26px 4px 10px; font-size: 12px; font-weight: 600; border: 1px solid var(--line-strong); background: var(--overlay-2); color: var(--text); }
.select-badge--versendet  { color: var(--accent-2); border-color: rgba(75, 159, 234, .35); }
.select-badge--bestaetigt { color: var(--success); border-color: rgba(63, 207, 142, .35); }
.budget { display: flex; flex-direction: column; gap: 4px; }
.budget .meter { margin-top: 2px; }

/* Dialoge --------------------------------------------------------- */
.modal { padding: 0; border: 0; background: transparent; color: inherit; max-width: min(720px, calc(100vw - 32px)); width: 100%; overflow: visible; }
.modal::backdrop { background: var(--backdrop); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal[open] { animation: modalIn .35s cubic-bezier(.2, .8, .2, 1); }
.modal[open]::backdrop { animation: fadeIn .3s ease; }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.98); } }
@keyframes fadeIn { from { opacity: 0; } }
.modal-card { border-radius: 18px; padding: 0; gap: 0; background: var(--modal-bg); max-height: calc(100vh - 48px); display: flex; flex-direction: column; }
.modal-card--sm { max-width: 460px; margin: 0 auto; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 17px; }
.modal-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--line); background: var(--modal-foot); border-radius: 0 0 18px 18px; }

/* Nachweis-Assistent ---------------------------------------------- */
.steps { list-style: none; display: flex; gap: 8px; margin: 0; padding: 0; flex-wrap: wrap; }
.steps li { display: flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-weight: 500; font-size: 13px; }
.steps li span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--track); font-size: 12px; font-weight: 700; }
.steps li.is-done { color: var(--text); border-color: rgba(75, 159, 234, .3); }
.steps li.is-done span { background: var(--accent); color: #fff; box-shadow: 0 0 12px var(--accent-glow); }

.wizard-filter { display: grid; grid-template-columns: 1.4fr 1.4fr 1fr .9fr .9fr auto; gap: 14px; align-items: end; }
.wizard-foot { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; padding: 22px; border-top: 1px solid var(--line); }
.wizard-options { display: flex; flex-direction: column; gap: 12px; }
.wizard-summary { border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 10px; background: rgba(75, 159, 234, .06); border-color: rgba(75, 159, 234, .25); }
.wizard-summary > div { display: flex; justify-content: space-between; align-items: baseline; }
.wizard-summary span { color: var(--text-2); font-size: 13px; }
.wizard-summary strong { font-size: 20px; }
.wizard-summary .btn { margin-top: 6px; }

/* Mitarbeiter ------------------------------------------------------ */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.person { border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 14px; transition: transform .25s, border-color .25s; }
.person:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.person-head { display: flex; align-items: center; gap: 12px; }
.person-name { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.person-name strong { font-size: 15px; }
.person-name span { color: var(--muted); font-size: 12.5px; }
.person-badges { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.person-meta { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.person-meta > div { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.person-meta dt { color: var(--muted); }
.person-meta dd { margin: 0; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; padding: 12px; border-radius: 10px; background: var(--overlay-1); border: 1px solid var(--line); }
.person-stats span { font-size: 11.5px; color: var(--muted); display: block; }
.person-stats strong { font-size: 18px; }
.person-stats .meter { grid-column: 1 / -1; }
.person-actions { display: flex; gap: 8px; align-items: center; }
.person-actions form { margin-left: auto; }

/* Einstellungen ---------------------------------------------------- */
.settings-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.settings-main { gap: 20px; }
.settings-main .card { display: flex; flex-direction: column; gap: 14px; }
.settings-main .card-head { margin-bottom: 2px; }
.sticky-save { position: sticky; bottom: 16px; display: flex; justify-content: flex-end; }
.settings-side { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 96px; }
.la-list { list-style: none; margin: 0; padding: 0; }
.la-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.la-list li:first-child { border-top: 0; }
.sys { margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.sys > div { display: flex; justify-content: space-between; gap: 12px; }
.sys dt { color: var(--muted); }
.sys dd { margin: 0; text-align: right; }

.profile-head { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.profile-head h2 { font-size: 22px; }

/* Anmeldung ------------------------------------------------------- */
body.auth { overflow-x: hidden; }
.auth-wrap { position: relative; z-index: 1; min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; }
.auth-hero { display: flex; align-items: center; padding: 60px clamp(24px, 6vw, 96px); }
.auth-hero-inner { max-width: 600px; }
.auth-hero .brand .logo-mark { width: 60px; height: 60px; }
.auth-hero .brand-name { font-size: 20px; }
.auth-hero .brand-img { max-height: 72px; }
.auth-features { list-style: none; margin: 44px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.auth-features li { display: flex; align-items: center; gap: 12px; color: var(--text-2); }
.auth-features .icon { width: 34px; height: 34px; padding: 8px; border-radius: 10px; color: var(--accent-2); background: var(--accent-soft); border: 1px solid rgba(75, 159, 234, .25); }
.auth-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; gap: 20px; }
.auth-card { width: 100%; max-width: 430px; border-radius: 22px; padding: 34px; position: relative; background: var(--auth-card-bg); }
.auth-card::before {
    content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
    background: linear-gradient(140deg, rgba(140, 196, 245, .5), transparent 35%, transparent 65%, rgba(75, 159, 234, .35));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.auth-card-head { margin-bottom: 22px; }
.auth-kicker { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--accent-2); font-weight: 700; }
.auth-card-head h2 { font-size: 26px; margin: 6px 0 4px; }
.auth-card-head p { color: var(--muted); }
.auth-card .btn--lg { margin-top: 6px; }
.auth-foot { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 22px; font-size: 12px; color: var(--muted); }
.auth-foot .icon { width: 14px; height: 14px; }
.auth-copy { font-size: 12px; color: var(--muted); text-align: center; }
.auth-credit { font-size: 12px; color: var(--muted); text-align: center; margin-top: -14px; opacity: .8; }

/* Hell/Dunkel-Umschalter --------------------------------------------- */
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: inline-block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
.theme-toggle--float {
    position: fixed; top: 18px; right: 18px; z-index: 50;
    background: var(--surface); border-color: var(--line); box-shadow: var(--shadow);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after {
    transition: background-color .3s, border-color .3s, color .3s, box-shadow .3s !important;
}

/* Responsiv -------------------------------------------------------- */
@media (max-width: 1280px) {
    .wizard-filter { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
    .grid-dash { grid-template-columns: minmax(0, 1fr); }
    .card--timer { grid-row: auto; }
    .settings-grid { grid-template-columns: minmax(0, 1fr); }
    .settings-side { position: static; }
    .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); box-shadow: 30px 0 60px var(--mobile-shadow); }
    body.nav-open .sidebar { transform: none; }
    body.nav-open .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 35; background: var(--backdrop); backdrop-filter: blur(2px); }
    .main { margin-left: 0; }
    .icon-btn.menu-btn { display: inline-grid; }
    .topbar { padding: 14px 16px; }
    .topbar-right .btn span { display: none; }
    .topbar-right .btn { padding: 0 11px; }
    .content { padding: 20px 16px 32px; }
    .app-footer { padding: 16px; }
    .auth-wrap { grid-template-columns: minmax(0, 1fr); }
    .auth-hero { padding: 40px 20px 0; justify-content: center; }
    .auth-features { display: none; }
    .wizard-foot { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
    .grid-2, .grid-3, .grid-3-1, .grid-1-2, .grid-1-2-1, .wizard-filter { grid-template-columns: minmax(0, 1fr); }
    .time-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .timer-meta { grid-template-columns: minmax(0, 1fr); }
    .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .kpi-value { font-size: 24px; }
    .entry { grid-template-columns: 42px minmax(0, 1fr) 56px; }
    .entry-tags { display: none; }
    .entry-date { width: 42px; height: 42px; }
    .filters select, .month-form input { min-width: 0; width: 100%; }
    .filters { flex-direction: column; align-items: stretch; }
    .month-nav { width: 100%; }
    .month-form { flex: 1; }
    .month-form input { width: 100%; }
    .stat strong { font-size: 19px; }
    .people { grid-template-columns: minmax(0, 1fr); }
    .timer-pill-info small { display: none; }
    .btn--start { min-width: 0; width: 100%; }
    .auth-card { padding: 24px 20px; }
    .modal-foot .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
