* { box-sizing: border-box; }
:root {
    color-scheme: light;
    --bg: #f0f3f1;
    --panel: #fff;
    --ink: #162a24;
    --muted: #4a6057;
    --line: #c6d3cb;
    --accent: #13644b;
    --on-accent: #fff;
    --notice: #dcefe5;
    --error: #8d2923;
    --error-bg: #fbe8e6;
    --shadow: 0 8px 24px #182b2110;
    font: 16px/1.5 system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --bg: #10211c; --panel: #192e26; --ink: #e8f4ed; --muted: #b7cfc2;
        --line: #476256; --accent: #9de2bb; --on-accent: #10251c;
        --notice: #294d3f; --error: #ffb6ad; --error-bg: #442b2a; --shadow: none;
    }
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #10211c; --panel: #192e26; --ink: #e8f4ed; --muted: #b7cfc2;
    --line: #476256; --accent: #9de2bb; --on-accent: #10251c;
    --notice: #294d3f; --error: #ffb6ad; --error-bg: #442b2a; --shadow: none;
}
body { margin: 0; background: var(--bg); color: var(--ink); }
a { color: var(--accent); }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.top { background: var(--panel); border-bottom: 1px solid var(--line); }
.shell { width: min(1120px, calc(100% - 32px)); margin-inline: auto; }
.top-inner, .heading, .actions { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; }
.top-inner, .heading { justify-content: space-between; }
.top-inner { min-height: 68px; padding-block: .5rem; }
.brand { color: var(--ink); font-size: 1.15rem; font-weight: 800; text-decoration: none; }
.brand span, small, dt { color: var(--muted); }
main { padding-block: 36px 64px; }
.login { max-width: 440px; }
h1, h2 { margin: 0; line-height: 1.15; letter-spacing: -.035em; }
h1 { font-size: clamp(1.7rem, 5vw, 2.7rem); }
h2 { font-size: 1.35rem; }
.heading { margin: 0 0 1.1rem; }
.login h1 { margin-bottom: 1rem; }
.panel { background: var(--panel); padding: clamp(14px, 3vw, 24px); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); margin-bottom: 1rem; min-width: 0; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; }
.stat { display: grid; color: var(--ink); text-decoration: none; }
.stat[aria-current] { outline: 2px solid var(--accent); outline-offset: -2px; }
.stat strong { font-size: 1.65rem; }
.stack, .ticket-info { display: grid; gap: 1rem; }
.grid, .filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
label { display: grid; gap: .3rem; font-weight: 650; }
input, select, textarea, button, .button { font: inherit; }
input, select, textarea { width: 100%; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: .55rem .65rem; }
textarea { resize: vertical; }
button, .button { display: inline-block; cursor: pointer; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 7px; padding: .45rem .7rem; text-decoration: none; font-weight: 650; }
button[hidden] { display: none; }
button:hover, .button:hover { border-color: var(--accent); }
.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.back { display: inline-block; margin-bottom: .8rem; }
.notice, .error { border-radius: 7px; padding: .6rem .8rem; background: var(--notice); }
.error { background: var(--error-bg); color: var(--error); }
.dates { display: flex; flex-wrap: wrap; gap: .75rem 2rem; margin: 0; }
dd { margin: 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 620px; border-collapse: collapse; text-align: left; }
th, td { padding: .65rem .5rem; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
td small { display: block; }
.badge { display: inline-block; border-radius: 20px; padding: .2rem .55rem; background: var(--bg); font-size: .86rem; font-weight: 700; }
.badge[data-status="Erledigt"] { background: var(--notice); }
.badge[data-status="Storniert"] { background: var(--error-bg); color: var(--error); }
.pager { margin-top: 1rem; }
.backup { margin-bottom: 1rem; text-align: right; }
@media (min-width: 850px) { .filters { grid-template-columns: 2fr 1fr 1fr 1fr; } }
@media (max-width: 440px) {
    .grid, .filters { grid-template-columns: minmax(0, 1fr); }
    .stat { padding: .65rem .45rem; font-size: .84rem; }
}

