:root {
  color-scheme: dark;
  --bg: #0c1120;
  --panel: #141b2f;
  --line: #2d3652;
  --text: #ecf0ff;
  --accent: #5867ff;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, system-ui, sans-serif; background: var(--bg); color: var(--text); }
a { color: #9fb0ff; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.5rem; border-bottom: 1px solid var(--line); }
.page { padding: 1rem 1.5rem; }
.auth-shell { min-height: 100vh; display: grid; place-items: center; }
.auth-card, .panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 1rem; }
.auth-card { width: min(420px, 92vw); display: grid; gap: .7rem; }
label { display: grid; gap: .35rem; }
input, select, button { background: #111a2f; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: .6rem .7rem; }
button, .btn { cursor: pointer; background: var(--accent); color: white; border: none; text-decoration: none; padding: .6rem .9rem; border-radius: 8px; }
.btn.subtle { background: transparent; border: 1px solid var(--line); }
.full-width { width: 100%; text-align: center; }
.row-form { display: flex; gap: .5rem; flex-wrap: wrap; }
.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .7rem; margin-top: 1rem; }
.board-card { display: block; background: var(--panel); border: 1px solid var(--line); padding: 1rem; border-radius: 12px; text-decoration: none; }
.board-lanes { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1rem; margin-top: 1rem; }
.lane { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: .8rem; }
.task-list { min-height: 50px; display: grid; gap: .6rem; margin-top: .8rem; }
.task { background: #131d33; border: 1px solid var(--line); border-radius: 10px; padding: .75rem; }
.task-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.chat.hidden { display: none; }
.chat { margin-top: .5rem; border-top: 1px solid var(--line); padding-top: .5rem; }
.chat-messages { max-height: 140px; overflow: auto; display: grid; gap: .35rem; margin-bottom: .4rem; }
.muted { color: #afbbdd; }
.error { color: #ff8d8d; }

.workspace-shell { display: grid; grid-template-columns: 290px 1fr; min-height: 100vh; }
.workspace-sidebar { border-right: 1px solid var(--line); padding: 1rem; background: linear-gradient(180deg, #10172b, #0d1324); position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand-block h2 { margin: .25rem 0 .8rem; }
.eyebrow { margin: 0; letter-spacing: .08em; text-transform: uppercase; font-size: .72rem; color: #94a3d5; }
.sidebar-section { margin-top: 1.1rem; }
.section-title h3 { margin: 0 0 .6rem; font-size: 1rem; }
.board-switcher { display: grid; gap: .45rem; }
.board-switch-item { display: grid; gap: .1rem; text-decoration: none; border: 1px solid var(--line); border-radius: 10px; padding: .6rem .7rem; background: #11182b; }
.board-switch-item small { color: #96a5d8; }
.board-switch-item.active { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); background: #172240; }
.create-board-form { margin-top: .7rem; display: grid; gap: .45rem; }
.workspace-main { padding: 1.25rem; }
.board-topbar { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.board-topbar h1 { margin: .2rem 0 0; }
.group-creator { margin-bottom: .9rem; }
.group-creator h2 { margin-top: 0; }
.color-picker { display: inline-flex; align-items: center; gap: .45rem; background: #111a2f; border: 1px solid var(--line); border-radius: 8px; padding: .35rem .5rem; }
.color-picker input { padding: 0; width: 36px; height: 32px; border: none; }
.group-stack { display: grid; gap: .9rem; }
.group-card { border: 1px solid color-mix(in srgb, var(--group-color) 55%, #243052); border-radius: 14px; background: linear-gradient(180deg, color-mix(in srgb, var(--group-color) 13%, #101628), #101628); overflow: hidden; }
.group-card-head { display: flex; justify-content: space-between; align-items: center; padding: .75rem .85rem; border-bottom: 1px solid #2c3451; }
.group-title { display: flex; align-items: center; gap: .45rem; }
.group-title h3 { margin: 0; }
.group-title small { color: #9eaedd; }
.group-dot { width: 11px; height: 11px; border-radius: 999px; background: var(--group-color); display: inline-block; }
.mini-color-picker input { width: 30px; height: 30px; border-radius: 6px; border: 1px solid #36426a; padding: 0; background: transparent; cursor: pointer; }
.group-card .task-form { padding: .75rem .85rem; border-bottom: 1px solid #2c3451; }
.group-card .task-list { padding: .75rem .85rem; margin-top: 0; }
.task-meta { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0; }
.pill { display: inline-flex; align-items: center; border-radius: 999px; font-size: .74rem; padding: .2rem .5rem; background: #26324e; color: #dce4ff; }
.pill.status.done { background: #065f46; }
.pill.status.in_bearbeitung { background: #1d4ed8; }
.pill.status.blocked { background: #7f1d1d; }
.pill.status.offen { background: #374151; }
.pill.priority.low { background: #1f7a8c; }
.pill.priority.medium { background: #8b5cf6; }
.pill.priority.high { background: #b45309; }
.pill.priority.critical { background: #991b1b; }

@media (max-width: 1024px) {
  .workspace-shell { grid-template-columns: 1fr; }
  .workspace-sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
}
