:root {
  --bg: #0c1016;
  --surface: #161d29;
  --surface-2: #1e2736;
  --text: #edf1f7;
  --muted: #93a0b5;
  --accent: #4c8dff;
  --accent-2: #2f6fe0;
  --danger: #f07178;
  --success: #7fd99a;
  --warn: #e6b35a;
  --line: rgba(237, 241, 247, 0.1);
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: system-ui, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  background:
    radial-gradient(900px 420px at 10% -10%, rgba(76, 141, 255, 0.18), transparent 55%),
    var(--bg);
}

button, input, select, textarea { font: inherit; color: inherit; }
button, .btn, input, select, textarea { min-height: 42px; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.banner {
  position: sticky;
  top: 0;
  z-index: 30;
  margin: 12px auto 0;
  width: min(1100px, calc(100% - 24px));
  padding: 10px 14px;
  border-radius: 10px;
  background: #3a2226;
  color: var(--danger);
}
.banner.ok { background: #1c3326; color: var(--success); }

.center { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.card, .panel {
  background: rgba(22, 29, 41, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card { width: min(420px, 100%); padding: 28px; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }
.muted { color: var(--muted); }
.stack { display: grid; gap: 12px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }

label { display: grid; gap: 6px; font-size: 0.92rem; color: var(--muted); }
input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0f1520;
}
textarea { min-height: 96px; resize: vertical; }

.btn {
  border: 0;
  border-radius: 10px;
  padding: 0 16px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font-weight: 650;
}
.btn:hover { background: var(--accent-2); }
.btn:disabled { opacity: 0.55; cursor: wait; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid rgba(240, 113, 120, 0.45); }

.shell { width: min(1100px, calc(100% - 28px)); margin: 0 auto; padding: 22px 0 48px; }
.top { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 18px; }
.brand { display: flex; gap: 12px; align-items: center; }
.mark {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(160deg, #6aa4ff, #2d5ec4);
  font-weight: 750;
}
.who { display: flex; gap: 10px; align-items: center; }
.tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.tabs button[aria-selected="true"] { background: var(--surface-2); border-color: var(--accent); }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); gap: 16px; align-items: start; }
.layout.solo { grid-template-columns: 1fr; }
.toolbar { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 12px; }
.filters { display: flex; gap: 8px; }
.filters label { min-width: 140px; }

.list { display: grid; gap: 8px; }
.task {
  text-align: left;
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
}
.task.active, .task:hover { border-color: rgba(76, 141, 255, 0.7); background: var(--surface-2); }
.meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; color: var(--muted); font-size: 0.86rem; }
.pill {
  border-radius: 999px;
  padding: 2px 8px;
  background: #243044;
  color: var(--text);
}
.pill.high { background: rgba(240, 113, 120, 0.18); color: #ffc1c4; }
.pill.done { background: rgba(127, 217, 154, 0.16); color: var(--success); }
.pill.progress { background: rgba(230, 179, 90, 0.16); color: var(--warn); }

.detail { padding: 18px; position: sticky; top: 12px; }
.notes { display: grid; gap: 8px; max-height: 280px; overflow: auto; }
.note { padding: 10px 12px; border-radius: 10px; background: #101722; border: 1px solid var(--line); }
.note p { margin: 6px 0 0; white-space: pre-wrap; }
.files { display: flex; gap: 8px; flex-wrap: wrap; }
.files a { color: #9ec0ff; }

.panel { padding: 16px; }
.content { display: grid; gap: 12px; }

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .detail { position: static; }
  .top { align-items: flex-start; flex-direction: column; }
}
