/* Powersoul Aufgabenliste – Farben und Glas-Look aus den Powersoul-Landingpages */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

:root {
  color-scheme: dark;
  --gold: #e8c97a;
  --gold2: #f5dfa0;
  --gold3: #c9a84c;
  --text: rgba(255, 255, 255, .94);
  --muted: rgba(255, 255, 255, .68);
  --line: rgba(255, 255, 255, .16);
  --panel: rgba(34, 14, 96, .54);
  --field: rgba(255, 255, 255, .09);
  --ink: #23140a;
  --serif: 'Playfair Display', 'Didot', 'Bodoni 72', Georgia, 'Times New Roman', serif;
  --sans: 'Raleway', 'Avenir Next', 'Helvetica Neue', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: #7a24f5;
}

/* Hintergrund: Verlauf + ruhige Farbflächen, fest hinter dem Inhalt */
.bg {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  /* Verlauf aus Patricks Vorlage (Screenshot vom 20.11.2026): Blauviolett links nach Violett rechts */
  background: linear-gradient(90deg, #6129f5 0%, #981ef5 100%);
}
.blob {
  position: absolute; border-radius: 50%;
  -webkit-filter: blur(80px); filter: blur(80px);
  animation: drift 22s ease-in-out infinite alternate;
}
.b1 { width: 760px; height: 760px; top: -18%; left: -10%; background: radial-gradient(circle, rgba(84, 52, 250, .45) 0%, transparent 65%); }
.b2 { width: 680px; height: 680px; top: 6%; right: -12%; background: radial-gradient(circle, rgba(172, 64, 250, .32) 0%, transparent 65%); animation-delay: -8s; }
.b3 { width: 620px; height: 620px; bottom: -22%; left: 28%; background: radial-gradient(circle, rgba(116, 40, 236, .3) 0%, transparent 65%); animation-delay: -14s; }
@keyframes drift {
  from { -webkit-transform: translate3d(0, 0, 0) scale(1); transform: translate3d(0, 0, 0) scale(1); }
  to   { -webkit-transform: translate3d(30px, -22px, 0) scale(1.05); transform: translate3d(30px, -22px, 0) scale(1.05); }
}
@media (prefers-reduced-motion: reduce) { .blob { animation: none; } * { transition: none !important; } }

/* ---------- Kopfzeile ---------- */
.top {
  display: flex; align-items: center; gap: 28px;
  max-width: 1240px; margin: 0 auto; padding: 22px 32px 6px;
}
.brand { display: flex; align-items: baseline; gap: 12px; text-decoration: none; color: inherit; }
.brand-name { font-family: var(--serif); font-size: 26px; color: var(--gold2); letter-spacing: .5px; }
.brand-sub { font-size: 12px; letter-spacing: 4px; text-transform: uppercase; color: var(--muted); }
.nav { display: flex; gap: 6px; margin-left: 8px; }
.nav a {
  padding: 8px 16px; border-radius: 999px; text-decoration: none;
  color: var(--muted); font-weight: 500; font-size: 15px; border: 1px solid transparent;
}
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.nav a[aria-current] { color: var(--gold2); border-color: rgba(232, 201, 122, .45); background: rgba(232, 201, 122, .12); }
.who { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.who-name { font-weight: 600; }
.who-role {
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  padding: 3px 10px; border-radius: 999px; color: var(--gold2); border: 1px solid rgba(232, 201, 122, .45);
}

.page { max-width: 1240px; margin: 0 auto; padding: 18px 32px 64px; }

.headline { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 20px; margin: 18px 0 22px; }
h1 { font-family: var(--serif); font-weight: 500; font-size: 40px; line-height: 1.15; margin: 0; text-wrap: balance; }
h2 { font-family: var(--serif); font-weight: 500; font-size: 22px; margin: 0 0 16px; color: var(--gold2); }
.summary { margin: 0; color: var(--muted); font-size: 16px; }
.warn { color: #ffc4cd; font-weight: 600; }
.gold { color: var(--gold2); }
small { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.center { display: flex; justify-content: center; align-items: center; }
.right { text-align: right; }

/* ---------- Glaskarten ---------- */
.card {
  position: relative;
  background: var(--panel);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 22px;
  padding: 24px 26px;
  margin-bottom: 22px;
  box-shadow: 0 10px 36px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .28);
}
.card-gold {
  background: linear-gradient(180deg, rgba(232, 201, 122, .13), rgba(232, 201, 122, .05)), var(--panel);
  border-color: rgba(232, 201, 122, .42);
  box-shadow: 0 10px 36px rgba(0, 0, 0, .22), 0 0 44px rgba(232, 201, 122, .08), inset 0 1px 0 rgba(255, 230, 150, .5);
}
.card.list { padding: 8px 0; overflow: hidden; }

/* ---------- Meldungen ---------- */
.flashes { margin: 8px 0 4px; }
.flash {
  margin: 0 0 10px; padding: 12px 18px; border-radius: 14px; font-weight: 500;
  background: rgba(18, 9, 64, .6); border: 1px solid rgba(232, 201, 122, .5); color: var(--gold2);
}
.flash-fehler { border-color: rgba(255, 160, 178, .7); color: #ffd3da; }

/* ---------- Formularfelder ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field > span, .field > legend {
  font-size: 11.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); padding: 0;
}
.field > legend { margin-bottom: 6px; }
.field em { font-style: normal; letter-spacing: 0; text-transform: none; }
input, select, textarea, button { font: inherit; color: inherit; }
input:not([type=checkbox]):not([type=hidden]), select, textarea {
  width: 100%; min-height: 44px; padding: 10px 14px;
  background: var(--field); border: 1px solid rgba(255, 255, 255, .26); border-radius: 12px;
  color: #fff; -webkit-appearance: none; appearance: none;
}
textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
::placeholder { color: rgba(255, 255, 255, .45); }
select {
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23f5dfa0' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
select option { color: #111; background: #fff; }
input[type=date] { min-width: 150px; }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--gold3); cursor: pointer; }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 1px; border-color: transparent;
}
a:focus-visible, button:focus-visible, .pick input:focus-visible + span {
  outline: 2px solid var(--gold); outline-offset: 2px;
}

/* Personen-Auswahl als Pillen */
.picks { display: flex; flex-wrap: wrap; gap: 8px; }
.pick { position: relative; display: inline-flex; cursor: pointer; }
.pick input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; }
.pick span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, .28); background: var(--field);
  font-weight: 500; transition: background .15s, border-color .15s;
}
.pick:hover span { background: rgba(255, 255, 255, .16); }
.pick input:checked + span { background: var(--gold2); border-color: var(--gold2); color: var(--ink); font-weight: 600; }
.pick input:checked + span::before { content: "✓"; margin-right: 7px; }

/* ---------- Knöpfe ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 9px 20px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; letter-spacing: .3px; white-space: nowrap;
  text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-solid { background: linear-gradient(180deg, #f8e6ae, #dcbc62); color: var(--ink); box-shadow: 0 4px 18px rgba(232, 201, 122, .28); }
.btn-solid:hover { background: linear-gradient(180deg, #fff1c4, #e6c872); }
.btn-gold { background: rgba(232, 201, 122, .2); border-color: rgba(232, 201, 122, .6); color: var(--gold2); }
.btn-gold:hover { background: rgba(232, 201, 122, .32); color: #fff; }
.btn-glass { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .32); color: #fff; }
.btn-glass:hover { background: rgba(255, 255, 255, .2); }
.btn-quiet { background: transparent; border-color: rgba(255, 255, 255, .26); color: var(--muted); }
.btn-quiet:hover { color: #fff; border-color: rgba(255, 255, 255, .5); }
.btn-danger { background: transparent; border-color: rgba(255, 160, 178, .6); color: #ffd3da; }
.btn-danger:hover { background: rgba(255, 110, 140, .2); }
.btn-small { min-height: 36px; padding: 6px 14px; font-size: 13.5px; border-radius: 10px; }
.btn-wide { width: 100%; }

/* ---------- Neue Aufgabe ---------- */
.new-task { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 16px 18px; align-items: end; }
.new-people { grid-column: 1; grid-row: 2; }
.new-submit { grid-column: 2; grid-row: 2; }

/* ---------- Filter ---------- */
.filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.chip-link {
  padding: 7px 16px; border-radius: 999px; text-decoration: none; font-size: 14.5px; font-weight: 500;
  color: var(--text); background: rgba(18, 9, 64, .34); border: 1px solid rgba(255, 255, 255, .2);
}
.chip-link:hover { background: rgba(255, 255, 255, .16); }
.chip-link[aria-current] { background: var(--gold2); border-color: var(--gold2); color: var(--ink); font-weight: 600; }

/* ---------- Liste ---------- */
.tasks { list-style: none; margin: 0; padding: 0; }
.task { border-top: 1px solid var(--line); }
.row { display: grid; gap: 18px; align-items: center; padding: 14px 26px; }
.row-mod    { grid-template-columns: minmax(0, 1fr) 190px 176px 70px 168px; }
.row-user   { grid-template-columns: minmax(0, 1fr) 200px 330px; }
.row-archiv { grid-template-columns: minmax(0, 1fr) 220px 110px 180px; }
.row-team   { grid-template-columns: 150px minmax(0, 1fr) 160px 96px 60px 250px; }
.row-head {
  padding-top: 12px; padding-bottom: 12px;
  font-size: 11.5px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted);
}
.task:hover > .row { background: rgba(255, 255, 255, .04); }

.task-title {
  display: flex; align-items: baseline; gap: 12px; width: 100%; min-width: 0;
  padding: 6px 0; background: none; border: 0; border-radius: 8px; text-align: left;
  font-size: 17px; font-weight: 500; line-height: 1.4; cursor: pointer;
}
.task-plain { cursor: default; padding-left: 21px; }
.task-text { min-width: 0; overflow-wrap: anywhere; }
.chev {
  flex: none; width: 9px; height: 9px; margin-right: 0; position: relative; top: -2px;
  border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold);
  transform: rotate(-45deg); transition: transform .15s;
}
.task-title[aria-expanded=true] .chev { transform: rotate(45deg); top: -4px; }
.note-mark {
  flex: none; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 600;
  padding: 2px 9px; border-radius: 999px; color: var(--gold2); border: 1px solid rgba(232, 201, 122, .45);
}
.with { padding-left: 21px; margin-top: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 3px 11px; border-radius: 999px; font-size: 13.5px; font-weight: 500;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2);
}
.chip-claimed { border-color: var(--gold); color: var(--gold2); background: rgba(232, 201, 122, .16); }
.cell-people small, .cell-deadline small, .cell-remind small { margin-top: 5px; }

.date { font-variant-numeric: tabular-nums; font-weight: 500; }
.cell-deadline { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; line-height: 1.5; white-space: nowrap;
}
.badge-bald { background: var(--gold2); color: var(--ink); }
.badge-ueberfaellig { background: #ffc4cd; color: #5c0a22; }
.is-overdue .date { color: #ffc4cd; }

/* Erledigt-Haken (Moderator) */
.check {
  width: 36px; height: 36px; padding: 0; border-radius: 11px; cursor: pointer; position: relative;
  background: rgba(255, 255, 255, .08); border: 2px solid rgba(255, 255, 255, .6);
  transition: background .15s, border-color .15s;
}
.check:hover { border-color: var(--gold2); background: rgba(232, 201, 122, .2); }
.check[aria-pressed=true] { background: var(--gold2); border-color: var(--gold2); }
.check[aria-pressed=true]::after, .tick::after {
  content: ""; position: absolute; left: 11px; top: 5px; width: 8px; height: 15px;
  border-right: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: rotate(42deg);
}

/* Mitarbeiter-Ansicht */
.cell-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; flex-wrap: wrap; }
.state { display: flex; flex-direction: column; align-items: flex-end; text-align: right; font-weight: 500; position: relative; }
.state small { margin-top: 2px; }
.tick {
  position: absolute; right: calc(100% + 12px); top: 2px; width: 26px; height: 26px;
  border-radius: 8px; background: var(--gold2);
}
.tick::after { left: 8px; top: 3px; width: 6px; height: 12px; }

/* Erledigt / von jemand anderem übernommen: leicht ausgegraut */
.task.is-done > .row { opacity: .58; }
.task.is-done:hover > .row, .task.is-done:focus-within > .row { opacity: .85; }

/* Aufklappbereich */
.panel {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: end;
  padding: 6px 26px 24px 47px; background: rgba(8, 4, 40, .22);
}
.edit { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 16px 18px; padding-top: 16px; }
.edit-people, .edit-notes, .edit-actions { grid-column: 1 / -1; }
.panel-side { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.notes-form { display: grid; gap: 14px; padding-top: 16px; grid-column: 1 / -1; }
.notes-read { grid-column: 1 / -1; padding-top: 16px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); }

.empty-text { margin: 0; padding: 30px 26px; color: var(--muted); text-align: center; }
.foot-note { color: var(--muted); font-size: 13.5px; margin: 4px 6px; }
.hint { color: var(--muted); font-size: 13.5px; margin: 14px 0 0; }

/* ---------- Team ---------- */
.team-name { font-weight: 600; font-size: 17px; }
.team-name small { display: inline; }
.team-actions { display: flex; gap: 8px; justify-content: flex-end; }
.new-user { display: grid; grid-template-columns: 1fr 1.4fr 180px auto auto; gap: 16px; align-items: end; }
.secret-line { display: flex; align-items: center; gap: 14px; margin: 0 0 12px; }
.secret-value {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 24px; letter-spacing: 2px;
  padding: 8px 18px; border-radius: 12px; background: rgba(0, 0, 0, .35); border: 1px solid rgba(232, 201, 122, .5);
  -webkit-user-select: all; user-select: all;
}
.secret p { margin: 0; }

/* ---------- Anmeldung ---------- */
.is-login .page { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; padding-top: 32px; }
.is-login .flashes { width: 100%; max-width: 420px; }
.login { width: 100%; max-width: 420px; padding: 38px 36px 30px; text-align: center; }
.login-brand { margin: 0; font-family: var(--serif); font-size: 30px; color: var(--gold2); }
.login h1 { font-family: var(--sans); font-size: 13px; font-weight: 500; letter-spacing: 6px; text-transform: uppercase; color: var(--muted); margin: 6px 0 26px; }
.login .field { text-align: left; }
.stack { display: grid; gap: 16px; }
.stack .btn { margin-top: 6px; }
.login .flash { text-align: left; margin-bottom: 18px; }
.empty { text-align: center; padding: 48px 26px; }
.empty p { color: var(--muted); }

/* ---------- Schmale Fenster ---------- */
@media (max-width: 1020px) {
  .top { flex-wrap: wrap; gap: 12px 20px; padding: 18px 16px 4px; }
  .page { padding: 14px 16px 48px; }
  h1 { font-size: 32px; }
  .row-head { display: none; }
  .row, .row-mod, .row-user, .row-archiv, .row-team { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 16px 18px; }
  .center { justify-content: flex-start; }
  .cell-actions, .team-actions { justify-content: flex-start; }
  .state { align-items: flex-start; text-align: left; padding-left: 38px; }
  .tick { right: auto; left: 0; }
  .panel { grid-template-columns: minmax(0, 1fr); padding: 4px 18px 20px; }
  .panel-side { flex-direction: row; }
  .new-task, .edit, .new-user { grid-template-columns: minmax(0, 1fr); }
  .new-people, .new-submit { grid-column: auto; grid-row: auto; }
}
