/* ==========================================================================
   Todo Dashboard – Modern Dark / Glass
   ========================================================================== */

:root {
  --bg: #0b0b1a;
  --glass: rgba(255, 255, 255, .055);
  --glass-strong: rgba(255, 255, 255, .09);
  --glass-border: rgba(255, 255, 255, .11);
  --glass-highlight: rgba(255, 255, 255, .18);
  --input-bg: rgba(10, 10, 30, .45);
  --text: #eef0ff;
  --muted: #9a9cc0;
  --violet: #a855f7;
  --blue: #3b82f6;
  --pink: #ec4899;
  --cyan: #22d3ee;
  --red: #f43f5e;
  --orange: #f59e0b;
  --green: #22c55e;
  --gradient: linear-gradient(135deg, var(--violet) 0%, var(--blue) 100%);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 40px -10px rgba(0, 0, 0, .55);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font: 15px/1.55 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(124, 58, 237, .35), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(37, 99, 235, .30), transparent 60%),
    radial-gradient(800px 600px at 50% 120%, rgba(236, 72, 153, .18), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

/* Schwebende, weichgezeichnete Farbkugeln im Hintergrund */
.bg-orbs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-orbs span {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: .45;
  animation: float 22s ease-in-out infinite alternate;
}
.bg-orbs span:nth-child(1) { width: 420px; height: 420px; background: #7c3aed; top: -120px; left: -80px; }
.bg-orbs span:nth-child(2) { width: 360px; height: 360px; background: #2563eb; top: 30%; right: -120px; animation-delay: -7s; }
.bg-orbs span:nth-child(3) { width: 300px; height: 300px; background: #db2777; bottom: -120px; left: 30%; opacity: .25; animation-delay: -14s; }
@keyframes float {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(60px, 40px) scale(1.15); }
}

a { color: #c4b5fd; text-decoration: none; transition: color .2s; }
a:hover { color: #fff; }
h1 { font-size: 1.7rem; margin: 0 0 1rem; letter-spacing: -.02em; font-weight: 750; }
h2 {
  font-size: 1rem; margin: 0 0 1rem; font-weight: 650; letter-spacing: -.01em;
  display: flex; align-items: center; gap: 8px;
}
h2 > .icon { color: var(--violet); }
code { background: var(--glass-strong); padding: .1em .4em; border-radius: 6px; font-size: .9em; }
::selection { background: rgba(168, 85, 247, .45); }

.icon { width: 18px; height: 18px; flex: none; vertical-align: middle; }
.gradient-text {
  background: linear-gradient(90deg, #c084fc, #60a5fa, #f472b6);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 28px; padding-bottom: 60px; }

/* ---------- Glas-Karten ---------- */
.card, .tile, .topbar, .todo-card, .list-tile {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
}
.card {
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow), inset 0 1px 0 var(--glass-highlight);
  animation: rise .5s var(--ease) both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Kopfzeile ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  border-width: 0 0 1px;
  background: rgba(11, 11, 26, .6);
}
.topbar-inner { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 1.05rem; color: var(--text); letter-spacing: -.01em; }
.brand:hover { color: var(--text); }
.brand-logo {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: var(--gradient); color: #fff;
  box-shadow: 0 6px 20px -4px rgba(168, 85, 247, .7);
}
.brand-logo .icon { width: 18px; height: 18px; }
.brand-logo.big { width: 64px; height: 64px; border-radius: 20px; }
.brand-logo.big .icon { width: 32px; height: 32px; }

.mainnav { display: flex; gap: 4px; margin-left: auto; }
.mainnav a {
  display: flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px;
  color: var(--muted); font-weight: 550; transition: all .2s var(--ease);
}
.mainnav a:hover { color: var(--text); background: var(--glass-strong); }
.mainnav a.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(168, 85, 247, .35), rgba(59, 130, 246, .35));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15);
}
.mainnav .icon { width: 16px; height: 16px; }

.userbox { display: flex; align-items: center; gap: 8px; }
.avatar {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--violet)); font-weight: 700; color: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .15);
}
.icon-btn {
  display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border-radius: 50%;
  background: transparent; border: 1px solid var(--glass-border); color: var(--muted);
}
.icon-btn:hover { color: var(--text); border-color: var(--glass-highlight); background: var(--glass-strong); }

/* ---------- Allgemein ---------- */
.narrow { max-width: 430px; margin: 0 auto 18px; }
.muted { color: var(--muted); font-weight: normal; }
.small { font-size: .85rem; }
.inline { display: inline; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 18px; align-items: start; }

.flash {
  padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 18px;
  border: 1px solid; backdrop-filter: blur(12px); animation: rise .4s var(--ease) both;
}
.flash-success { border-color: rgba(34, 197, 94, .4); background: rgba(34, 197, 94, .12); color: #86efac; }
.flash-error { border-color: rgba(244, 63, 94, .4); background: rgba(244, 63, 94, .12); color: #fda4af; }
.flash-info { border-color: rgba(59, 130, 246, .4); background: rgba(59, 130, 246, .12); color: #93c5fd; }

/* ---------- Formulare ---------- */
input, select, textarea, button { font: inherit; color: inherit; }
input:not([type=checkbox]), select, textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background: var(--input-bg);
  color: var(--text);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
input::placeholder, textarea::placeholder { color: #6e7099; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: rgba(168, 85, 247, .7);
  box-shadow: 0 0 0 4px rgba(168, 85, 247, .18), 0 0 24px -4px rgba(168, 85, 247, .5);
  background: rgba(10, 10, 30, .65);
}
select option { background: #16162b; }
input[type=date]::-webkit-calendar-picker-indicator { filter: invert(.8); cursor: pointer; }
input[type=checkbox] { accent-color: var(--violet); width: 17px; height: 17px; }

button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 18px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  background: var(--glass-strong);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .15s var(--ease), box-shadow .2s, background .2s, border-color .2s;
}
button:hover { background: rgba(255, 255, 255, .14); border-color: var(--glass-highlight); }
button:active { transform: scale(.97); }
button .icon { width: 16px; height: 16px; }
button.primary {
  background: var(--gradient); border-color: transparent; color: #fff;
  box-shadow: 0 8px 24px -8px rgba(139, 92, 246, .8);
}
button.primary:hover { box-shadow: 0 10px 32px -6px rgba(139, 92, 246, 1); transform: translateY(-1px); filter: brightness(1.08); }
button.danger { background: rgba(244, 63, 94, .08); border-color: rgba(244, 63, 94, .35); color: #fda4af; }
button.danger:hover { background: rgba(244, 63, 94, .2); border-color: rgba(244, 63, 94, .6); color: #fff; }

.stack { display: flex; flex-direction: column; gap: 14px; }
.stack label { display: flex; flex-direction: column; gap: 6px; font-weight: 550; font-size: .9rem; color: #c9cbef; }
.stack.compact { gap: 8px; margin: 12px 0; }
label.check { display: flex; flex-direction: row; align-items: center; gap: 9px; font-weight: normal; color: var(--text); }
.row-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
.row-form input:not([type=checkbox]) { flex: 1 1 200px; width: auto; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Login / Installation ---------- */
.auth-page main.wrap { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding-top: 40px; }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 26px; animation: rise .5s var(--ease) both; }
.auth-title { font-size: 1.5rem; font-weight: 750; letter-spacing: -.02em; }
.auth-page .flash { max-width: 430px; margin-left: auto; margin-right: auto; width: 100%; }
.auth-page .card { padding: 30px; }
.auth-page h1 { text-align: center; font-size: 1.35rem; }
.auth-page button.primary { margin-top: 6px; padding: 12px; }

/* ---------- Hero mit Fortschrittsring ---------- */
.hero {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 28px 32px;
  background:
    linear-gradient(120deg, rgba(168, 85, 247, .18), rgba(59, 130, 246, .10) 50%, rgba(236, 72, 153, .10)),
    var(--glass);
}
.hero h1 { font-size: 2rem; margin: 2px 0 6px; }
.hero p { margin: 0; }
.hero-date { color: #c4b5fd; font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 650; }

.ring { position: relative; width: 120px; height: 120px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); filter: drop-shadow(0 0 12px rgba(168, 85, 247, .55)); }
.ring circle { fill: none; stroke-width: 10; }
.ring-track { stroke: rgba(255, 255, 255, .08); }
.ring-value { stroke-linecap: round; transition: stroke-dasharray 1s var(--ease); }
.ring-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-label strong { font-size: 1.6rem; line-height: 1; font-weight: 750; }
.ring-label span { font-size: .75rem; color: var(--muted); margin-top: 4px; }

/* ---------- Kennzahl-Kacheln ---------- */
.tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.tile {
  --accent: var(--violet);
  position: relative; overflow: hidden;
  border-radius: var(--radius);
  padding: 18px;
  display: flex; flex-direction: column; gap: 2px;
  color: var(--text);
  box-shadow: var(--shadow), inset 0 1px 0 var(--glass-highlight);
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
  animation: rise .5s var(--ease) both;
}
.tile:nth-child(2) { animation-delay: .05s; }
.tile:nth-child(3) { animation-delay: .1s; }
.tile:nth-child(4) { animation-delay: .15s; }
.tile:nth-child(5) { animation-delay: .2s; }
.tile::after {
  content: ""; position: absolute; width: 120px; height: 120px; right: -40px; top: -40px; border-radius: 50%;
  background: var(--accent); opacity: .18; filter: blur(30px); transition: opacity .25s;
}
.tile:hover { color: var(--text); transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.tile:hover::after { opacity: .35; }
.tile.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 10px 40px -10px var(--accent); }
.tile-icon {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; margin-bottom: 10px;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent);
  box-shadow: 0 0 18px -4px var(--accent);
}
.tile-value { font-size: 2rem; font-weight: 750; line-height: 1.1; letter-spacing: -.03em; }
.tile-label { color: var(--muted); font-size: .85rem; font-weight: 550; }
.tile-open { --accent: var(--blue); }
.tile-overdue { --accent: var(--red); }
.tile-today { --accent: var(--orange); }
.tile-upcoming { --accent: var(--violet); }
.tile-done { --accent: var(--green); }

/* ---------- Listenfarben ---------- */
:where(.list-tile, .chip, .view-head, .userlist li) { --accent: var(--violet); }
.c-violet { --accent: #a855f7; }
.c-blue { --accent: #3b82f6; }
.c-cyan { --accent: #22d3ee; }
.c-green { --accent: #22c55e; }
.c-yellow { --accent: #eab308; }
.c-orange { --accent: #f97316; }
.c-red { --accent: #f43f5e; }
.c-pink { --accent: #ec4899; }
.c-slate { --accent: #94a3b8; }

.count {
  min-width: 24px; padding: 0 7px; border-radius: 999px; text-align: center;
  background: rgba(255, 255, 255, .08); color: var(--text); font-size: .75rem; line-height: 20px;
}
.list-badge {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; flex: none;
  font-size: 1.35rem; line-height: 1;
  color: var(--accent, var(--violet));
  background: color-mix(in srgb, var(--accent, var(--violet)) 18%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent, var(--violet)) 35%, transparent), 0 0 22px -6px var(--accent, var(--violet));
}
.list-badge .icon { width: 20px; height: 20px; }
.list-badge.big { width: 60px; height: 60px; border-radius: 18px; font-size: 1.9rem; }
.list-badge.big .icon { width: 28px; height: 28px; }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 0 14px; }
.section-head h2 { margin: 0; font-size: 1.15rem; }

/* ---------- Listen-Kacheln (Übersicht) ---------- */
.list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.list-tile {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 6px;
  min-height: 230px; padding: 20px;
  border-radius: 22px;
  color: var(--text);
  box-shadow: var(--shadow), inset 0 1px 0 var(--glass-highlight);
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
  animation: rise .5s var(--ease) both;
}
.list-tile::after {
  content: ""; position: absolute; width: 180px; height: 180px; right: -60px; top: -60px; border-radius: 50%;
  background: var(--accent); opacity: .22; filter: blur(40px); transition: opacity .25s; pointer-events: none;
}
.list-tile::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
a.list-tile:hover {
  color: var(--text); transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: 0 18px 50px -14px color-mix(in srgb, var(--accent) 70%, transparent), inset 0 1px 0 var(--glass-highlight);
}
a.list-tile:hover::after { opacity: .4; }
.list-tile-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.list-tile h3 { margin: 0; font-size: 1.2rem; letter-spacing: -.01em; overflow-wrap: anywhere; }
.list-tile-count { margin: 0; color: #c9cbef; font-size: .9rem; }
.list-tile-count strong { color: var(--text); font-size: 1.05rem; }
.list-tile-progress { display: flex; align-items: center; gap: 10px; margin: 4px 0 6px; font-size: .75rem; color: var(--muted); font-weight: 600; }
.progress { flex: 1; height: 6px; display: block; }
.progress-track { fill: rgba(255, 255, 255, .08); }
.progress-fill { fill: var(--accent); filter: drop-shadow(0 0 4px var(--accent)); }
.list-tile-preview { list-style: none; margin: 4px 0 0; padding: 10px 0 0; border-top: 1px solid var(--glass-border); display: flex; flex-direction: column; gap: 7px; }
.list-tile-preview li { display: flex; align-items: center; gap: 8px; font-size: .88rem; min-width: 0; }
.list-tile-preview li span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-tile-preview small { color: var(--muted); font-size: .75rem; flex: none; }
.list-tile-preview small.is-late { color: #fb7185; font-weight: 600; }
.list-tile-preview .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: rgba(255, 255, 255, .3); }
.list-tile-preview .prio-3 .dot { background: var(--red); box-shadow: 0 0 8px var(--red); }
.list-tile-preview .prio-2 .dot { background: var(--orange); box-shadow: 0 0 8px var(--orange); }
.list-tile-empty { margin: auto 0 0; display: flex; align-items: center; gap: 8px; font-size: .88rem; color: #86efac; }
.list-tile-empty .icon { width: 16px; height: 16px; }
.list-tile-new {
  background: rgba(255, 255, 255, .025);
  border: 1.5px dashed rgba(255, 255, 255, .18);
  box-shadow: none;
}
.list-tile-new::before { display: none; }
.list-tile-new .list-badge { margin-bottom: 8px; }
.list-tile-new form { margin-top: auto; }

/* ---------- Listenansicht ---------- */
.back-link { display: inline-flex; margin-bottom: 14px; color: var(--muted); font-weight: 600; font-size: .9rem; }
.view-head {
  display: flex; align-items: center; gap: 18px; padding: 22px 26px;
  background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 22%, transparent), transparent 65%), var(--glass);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--glass-border));
}
.view-head h1 { margin: 0; font-size: 1.7rem; overflow-wrap: anywhere; }
.view-head p { margin: 2px 0 0; }
.view-edit { margin-left: auto; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin-bottom: 8px; scrollbar-width: thin; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  padding: 7px 14px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--glass-border);
  color: var(--muted); font-weight: 600; font-size: .88rem; white-space: nowrap;
  transition: all .2s var(--ease);
}
.chip .icon { width: 15px; height: 15px; }
.chip:hover { color: var(--text); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.chip.active {
  color: #fff;
  background: color-mix(in srgb, var(--accent) 28%, transparent);
  border-color: color-mix(in srgb, var(--accent) 70%, transparent);
  box-shadow: 0 0 18px -6px var(--accent);
}

.todo-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.todo-form .grow, .todo-form .full { flex: 1 1 100%; }
.todo-form .grow { font-size: 1.05rem; padding: 13px 16px; }
.todo-form .field { display: flex; flex-direction: column; font-size: .78rem; color: var(--muted); gap: 4px; flex: 1 1 150px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.todo-form .field input, .todo-form .field select { text-transform: none; letter-spacing: normal; font-weight: normal; font-size: .95rem; }

.list-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.list-header h2 { margin: 0; font-size: 1.15rem; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters select { width: auto; padding-right: 30px; }
.search-field { position: relative; display: flex; align-items: center; }
.search-field .icon { position: absolute; left: 12px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.search-field input { width: 190px; padding-left: 36px; }

/* ---------- Todo-Kacheln ---------- */
.todo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; align-items: start; }
.todo-card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 8px;
  min-height: 150px; padding: 16px 18px;
  border-radius: 18px;
  box-shadow: var(--shadow), inset 0 1px 0 var(--glass-highlight);
  transition: transform .2s var(--ease), border-color .2s, box-shadow .2s, opacity .3s;
  animation: rise .45s var(--ease) both;
}
.todo-card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--prio, transparent), transparent);
}
.todo-card:hover { transform: translateY(-3px); border-color: var(--glass-highlight); }
.todo-card:has(details[open]) { grid-column: 1 / -1; transform: none; }
.todo-card.prio-3 { --prio: var(--red); }
.todo-card.prio-2 { --prio: var(--orange); }
.todo-card.prio-1 { --prio: rgba(255, 255, 255, .25); }
.todo-card.is-overdue { background: rgba(244, 63, 94, .07); border-color: rgba(244, 63, 94, .3); }
.todo-card.is-done { opacity: .55; }
.todo-card.is-done:hover { opacity: .9; }
.todo-card.is-done .todo-title { text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, .4); color: var(--muted); }
.todo-card.completing { opacity: .4; transform: scale(.97); }
.todo-card-head { display: flex; justify-content: space-between; align-items: center; }
.todo-title { margin: 0; font-weight: 650; font-size: 1.05rem; line-height: 1.35; overflow-wrap: anywhere; }
.todo-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: auto; }
.todo-notes {
  margin: 0; color: var(--muted); font-size: .88rem; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.todo-card:has(details[open]) .todo-notes { -webkit-line-clamp: unset; }
.list-chip .icon { color: var(--accent); }
.small-btn { padding: 7px 12px; font-size: .85rem; }

.todo-edit { margin-top: 8px; }
.todo-edit[open] {
  background: rgba(0, 0, 0, .25); border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm); padding: 14px;
}
.todo-edit .todo-form { margin: 12px 0; }
details summary {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  color: var(--muted); font-size: .82rem; font-weight: 550; list-style: none; transition: color .2s;
}
details summary::-webkit-details-marker { display: none; }
details summary:hover, details[open] summary { color: #c4b5fd; }
details summary .icon { width: 14px; height: 14px; }

.check-btn {
  width: 26px; height: 26px; padding: 0; border-radius: 50%; margin-top: 1px;
  border: 2px solid rgba(255, 255, 255, .28); background: transparent; color: transparent; flex: none;
}
.check-btn .icon { width: 14px; height: 14px; stroke-width: 3; }
.check-btn:hover { border-color: var(--violet); color: rgba(196, 181, 253, .8); background: rgba(168, 85, 247, .12); box-shadow: 0 0 16px -2px rgba(168, 85, 247, .7); }
.is-done .check-btn, .completing .check-btn {
  background: var(--gradient); border-color: transparent; color: #fff;
  box-shadow: 0 0 16px -2px rgba(139, 92, 246, .9);
}

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 999px; padding: 2px 10px; font-size: .75rem; font-weight: 600; color: #d4d6f5;
}
.badge .icon { width: 12px; height: 12px; }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.badge.prio-3 { color: #fb7185; }
.badge.prio-2 { color: #fbbf24; }
.badge.prio-1 { color: var(--muted); }
.danger-badge { background: rgba(244, 63, 94, .18); border-color: rgba(244, 63, 94, .4); color: #fecdd3; }
.warn-badge { background: rgba(245, 158, 11, .18); border-color: rgba(245, 158, 11, .4); color: #fde68a; }
.muted-badge { color: var(--muted); }

.empty { text-align: center; padding: 36px 0 20px; color: var(--muted); }
.empty-icon { width: 46px; height: 46px; color: var(--violet); opacity: .7; filter: drop-shadow(0 0 14px rgba(168, 85, 247, .7)); }
.empty p { margin: 10px 0 0; }
.clear-done { margin-top: 16px; text-align: right; }

.userlist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.userlist li {
  background: rgba(255, 255, 255, .035); border: 1px solid var(--glass-border);
  border-radius: 14px; padding: 12px 14px; transition: background .2s;
}
.userlist li:hover { background: rgba(255, 255, 255, .06); }
.userlist details { margin-top: 6px; }
.row-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row-head .muted { margin-left: auto; }

/* ---------- Farb- und Symbolauswahl ---------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.picker { border: 0; padding: 0; margin: 0; min-width: 0; }
.picker legend { padding: 0; margin-bottom: 8px; font-weight: 550; font-size: .9rem; color: #c9cbef; }
.color-picker, .emoji-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.picker input { position: absolute; opacity: 0; pointer-events: none; }
.swatch {
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
  background: var(--accent); box-shadow: 0 0 14px -4px var(--accent);
  transition: transform .15s var(--ease), box-shadow .15s;
}
.swatch:hover { transform: scale(1.1); }
.swatch:has(input:checked) { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent), 0 0 18px var(--accent); }
.swatch:has(input:focus-visible), .emoji-opt:has(input:focus-visible) { outline: 2px solid #fff; outline-offset: 2px; }
.emoji-opt span {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; cursor: pointer;
  font-size: 1.2rem; background: var(--input-bg); border: 1px solid var(--glass-border); color: var(--muted);
  transition: all .15s var(--ease);
}
.emoji-opt span .icon { width: 18px; height: 18px; }
.emoji-opt:hover span { border-color: var(--glass-highlight); transform: translateY(-1px); }
.emoji-opt:has(input:checked) span { border-color: var(--violet); background: rgba(168, 85, 247, .2); box-shadow: 0 0 14px -4px var(--violet); }
.userlist .list-badge { width: 36px; height: 36px; border-radius: 11px; font-size: 1.1rem; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .mainnav span { display: none; }
  .mainnav a { padding: 9px; }
}
@media (max-width: 860px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  h1 { font-size: 1.4rem; }
  .hero { padding: 22px; gap: 14px; }
  .hero h1 { font-size: 1.45rem; }
  .ring { width: 92px; height: 92px; }
  .ring-label strong { font-size: 1.25rem; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { padding: 14px; }
  .tile-value { font-size: 1.6rem; }
  .tile:last-child { grid-column: span 2; }
  .list-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .list-tile { min-height: 0; padding: 16px; }
  .list-tile-preview { display: none; }
  .list-tile-new { grid-column: 1 / -1; }
  .todo-grid { grid-template-columns: minmax(0, 1fr); }
  .view-head { padding: 18px; gap: 14px; }
  .view-head h1 { font-size: 1.35rem; }
  .card { padding: 18px; }
  .brand { font-size: 0; gap: 0; }
  .topbar-inner { gap: 8px; }
  .mainnav { gap: 2px; }
  .filters, .search-field, .search-field input { width: 100%; }
  .filters select { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
