:root {
  --bg: #f4f6fa; --card: #fff; --text: #1b2333; --muted: #64708a; --line: #dfe4ee;
  --accent: #1f2a44; --accent-2: #ffc94d; --primary: #2d5bd7; --primary-text: #fff;
  --ok: #1d7a46; --warn: #a35d00; --err: #b3261e;
  --user: #2d5bd7; --user-text: #fff; --claude: #eef1f7; --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #11151f; --card: #1a2030; --text: #e7ebf3; --muted: #9aa5bd; --line: #2b3347; --primary: #5b84ee; --claude: #232b3e; color-scheme: dark; }
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--primary); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
  background: var(--accent); color: #fff; position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 600; }
.top-nav { display: flex; gap: 14px; align-items: center; font-size: 15px; }
.top-nav a, .top-nav .link { color: #dfe6ff; text-decoration: none; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 16px; padding-bottom: max(24px, env(safe-area-inset-bottom)); }
h1 { font-size: 1.5rem; margin: 8px 0 12px; } h2 { font-size: 1.1rem; margin: 0 0 10px; }
.muted { color: var(--muted); } .small { font-size: .875rem; } .center { text-align: center; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--card); color: var(--text);
  border-radius: 10px; padding: 9px 14px; font: inherit; cursor: pointer; text-decoration: none; min-height: 42px; }
.btn:disabled { opacity: .5; cursor: default; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.btn-lg { padding: 12px 20px; font-size: 1.05rem; }
.btn-sm { min-height: 34px; padding: 5px 10px; font-size: .875rem; }
.btn-ghost { background: transparent; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--primary); cursor: pointer; text-decoration: underline; }
.inline { display: inline; }
.flash { padding: 10px 14px; border-radius: 10px; background: var(--claude); }
.flash-success { border-left: 4px solid var(--ok); } .flash-error { border-left: 4px solid var(--err); } .flash-warning { border-left: 4px solid var(--warn); }
.form-error { color: var(--err); margin: 6px 0 0; }
label { display: block; font-weight: 600; font-size: .9rem; }
input, textarea, select { width: 100%; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; margin-top: 4px; font-weight: 400; }
select { width: auto; max-width: 100%; }
label.check { display: flex; gap: 8px; align-items: center; font-weight: 400; } label.check input { width: auto; margin: 0; }
textarea.mono { font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; }
.stack > * + * { margin-top: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.head-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.badge { display: inline-block; font-size: .78rem; padding: 2px 9px; border-radius: 99px; background: var(--claude); color: var(--muted); font-weight: 600; }
.badge-ausgearbeitet { background: #e3ecff; color: #2d5bd7; } .badge-uebergeben, .badge-testumgebung { background: #fff1d6; color: #8a5200; } .badge-umgesetzt { background: #dcf3e5; color: #1d7a46; }
@media (prefers-color-scheme: dark) { .badge-ausgearbeitet { background: #22325a; color: #a9c0ff; } .badge-uebergeben, .badge-testumgebung { background: #3d3018; color: #ffcf7a; } .badge-umgesetzt { background: #18382a; color: #8fdcb0; } }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.tile { display: flex; flex-direction: column; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; color: var(--text); text-decoration: none; }
.tile:hover { border-color: var(--primary); }
.tile-quick { padding: 0; } .tile-button { all: unset; display: flex; flex-direction: column; gap: 6px; padding: 18px; cursor: pointer; }
.tile-icon { font-size: 2rem; }
.tabs { display: flex; gap: 14px; } .tabs a { text-decoration: none; color: var(--muted); } .tabs a[aria-current] { color: var(--text); font-weight: 600; border-bottom: 2px solid var(--primary); }
.list { list-style: none; padding: 0; margin: 0; }
.list-item { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; text-decoration: none; color: var(--text); }
.list-item .small { grid-column: 1 / -1; } .list-title { font-weight: 600; }
.login { max-width: 460px; margin: 10vh auto; }
.split { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 1000px) { .split { grid-template-columns: 1.1fr 1fr; } .split > :last-child { grid-column: 1 / -1; } }
.chat { display: flex; flex-direction: column; min-height: 60vh; }
.chat-log { flex: 1; overflow-y: auto; max-height: 62vh; display: flex; flex-direction: column; gap: 10px; padding: 4px; }
.msg { max-width: 88%; padding: 10px 13px; border-radius: 16px; position: relative; word-wrap: break-word; }
.msg p { margin: 0 0 8px; } .msg p:last-of-type { margin-bottom: 0; } .msg ul { margin: 4px 0; padding-left: 20px; }
.msg-nutzer { align-self: flex-end; background: var(--user); color: var(--user-text); border-bottom-right-radius: 4px; }
.msg-nutzer code { color: inherit; }
.msg-claude { align-self: flex-start; background: var(--claude); border-bottom-left-radius: 4px; }
.msg-hinweis { align-self: center; font-size: .82rem; color: var(--muted); background: transparent; padding: 2px 8px; text-align: center; }
.msg-time { display: block; font-size: .7rem; opacity: .7; margin-top: 4px; text-align: right; }
.msg-hinweis .msg-time { display: inline; margin-left: 6px; }
.typing { color: var(--muted); font-size: .9rem; margin: 6px 4px; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .4; } }
.composer { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 8px; }
.composer textarea { resize: vertical; }
.composer-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.btn-mic { font-size: 1.4rem; min-width: 64px; min-height: 52px; border-radius: 99px; }
.btn-mic.recording { background: var(--err); border-color: var(--err); color: #fff; animation: pulse 1s infinite; }
.log { background: #0f1420; color: #cfe3ff; border-radius: 10px; padding: 12px; font: 12px/1.45 ui-monospace, Menlo, monospace; max-height: 340px; overflow: auto; white-space: pre-wrap; }
.ergebnis { white-space: pre-wrap; background: var(--claude); padding: 12px; border-radius: 10px; margin: 10px 0; }
.plain { list-style: none; padding: 0; }
code { font: .9em ui-monospace, Menlo, monospace; background: rgba(127,127,127,.15); padding: 1px 5px; border-radius: 5px; }
[hidden] { display: none !important; }
