:root {
    --bg: #101418;
    --surface: #1a2027;
    --surface-2: #232b34;
    --text: #e8edf2;
    --muted: #93a1ae;
    --accent: #4fd6a5;
    --accent-dark: #2fae82;
    --danger: #e0685f;
    --warn: #e2b74e;
    --radius: 10px;
    font-size: 16px;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    line-height: 1.5;
}
main { max-width: 760px; margin: 1.5rem auto; padding: 0 1rem; }

.topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--surface-2);
    padding: 0.75rem 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    align-items: center;
}
.brand { font-weight: 700; letter-spacing: 0.02em; color: var(--accent); }
.topbar nav { display: flex; flex-wrap: wrap; gap: 1rem; }
.topbar a { color: var(--muted); text-decoration: none; }
.topbar a:hover, .topbar a.active { color: var(--text); }

.card {
    background: var(--surface);
    border: 1px solid var(--surface-2);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}
.card h2 { margin: 0 0 0.75rem; font-size: 1.1rem; }
.current { border-left: 4px solid var(--accent); }
.task-title { font-size: 1.35rem; font-weight: 600; margin: 0.25rem 0; }

.muted { color: var(--muted); }
.inactive td { opacity: 0.55; }

label { display: block; margin-bottom: 0.9rem; font-size: 0.95rem; }
input[type=text], input[type=password], input[type=email],
input[type=number], textarea, select {
    width: 100%;
    margin-top: 0.3rem;
    padding: 0.55rem 0.7rem;
    background: var(--surface-2);
    border: 1px solid #303a45;
    border-radius: 6px;
    color: var(--text);
    font: inherit;
}
input:focus, textarea:focus, select:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

button {
    background: var(--accent);
    color: #0d1a15;
    border: 0;
    border-radius: 6px;
    padding: 0.55rem 1.1rem;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
button:hover { background: var(--accent-dark); }
.btn-small { padding: 0.3rem 0.7rem; font-size: 0.85rem; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #c4504a; }

.actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.75rem; }
.row-actions { white-space: nowrap; }
.row-actions form { display: inline-block; margin-right: 0.3rem; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--surface-2); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 0.85rem; }

.flash {
    background: var(--surface-2);
    border-left: 4px solid var(--accent);
    padding: 0.6rem 0.9rem;
    border-radius: 6px;
}
.flash-error { border-left-color: var(--danger); }

.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 600;
}
.badge-late { background: var(--danger); color: #fff; }
.badge-reported { background: var(--warn); color: #1a1405; }

.login-page { display: grid; place-items: center; min-height: 100vh; }
.login-card {
    background: var(--surface);
    border: 1px solid var(--surface-2);
    border-radius: var(--radius);
    padding: 2rem;
    width: min(360px, 92vw);
}
.login-card h1 { margin: 0; font-size: 1.4rem; color: var(--accent); }
.login-card p.muted { margin-top: 0.25rem; }
.login-card button { width: 100%; margin-top: 0.5rem; }

@media (prefers-reduced-motion: no-preference) {
    .card { transition: border-color 0.15s; }
}

/* ----- Kategorien & Formulare (Ergänzung) ----- */
.inline-form { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; margin-bottom: 0.9rem; }
.inline-form input[type=text] { width: auto; flex: 1 1 200px; margin-top: 0; }

.chip-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
    display: inline-flex; align-items: center; gap: 0.35rem;
    background: var(--surface-2); border: 1px solid #303a45;
    padding: 0.25rem 0.5rem 0.25rem 0.7rem; border-radius: 99px; font-size: 0.9rem;
}
.chip form { display: inline; margin: 0; }
.chip-x {
    background: transparent; color: var(--muted); border: 0; padding: 0 0.2rem;
    font-size: 1.1rem; line-height: 1; cursor: pointer; font-weight: 700;
}
.chip-x:hover { color: var(--danger); background: transparent; }

.checkbox-row { display: flex; align-items: center; gap: 0.5rem; font-size: 0.95rem; }
.checkbox-row input[type=checkbox] { width: auto; margin: 0; }

.assign-form { display: flex; gap: 0.75rem; align-items: flex-end; flex-wrap: wrap; margin-top: 0.75rem; }
.assign-form label { margin-bottom: 0; }
.assign-form select { min-width: 180px; }

.edit-form { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.edit-form select { width: auto; min-width: 140px; margin-top: 0; }
.edit-form .checkbox-row { font-size: 0.85rem; }
