:root {
  --bg0: #1e1f22;
  --bg1: #2b2d31;
  --bg2: #313338;
  --bg3: #383a40;
  --ink: #f2f3f5;
  --muted: #b5bac1;
  --dim: #80848e;
  --blurple: #5865f2;
  --blurple-hot: #4752c4;
  --green: #23a559;
  --yellow: #f0b232;
  --red: #f23f43;
  --pink: #eb459e;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  --radius: 16px;
  --font: "IBM Plex Sans", "Segoe UI", sans-serif;
  --display: "Bricolage Grotesque", Impact, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg0);
  line-height: 1.45;
}

a { color: #00a8fc; text-decoration: none; }
a:hover { text-decoration: underline; }

.chaos {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 420px at 8% -8%, rgba(88, 101, 242, 0.35), transparent 55%),
    radial-gradient(700px 380px at 100% 0%, rgba(235, 69, 158, 0.22), transparent 50%),
    radial-gradient(600px 400px at 70% 110%, rgba(35, 165, 89, 0.15), transparent 55%),
    linear-gradient(165deg, #1a1b1e 0%, #232428 45%, #1e1f22 100%);
}

.noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.04;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.marquee {
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.25);
  color: var(--yellow);
  font-family: var(--display);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.marquee-track {
  display: inline-block;
  padding: 0.45rem 0;
  animation: scroll 28s linear infinite;
}

@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.wrap {
  width: min(760px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.75rem 0 3rem;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.35rem;
  animation: rise 0.5s ease both;
}

.brand-row {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}

.avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.4rem;
  color: #fff;
  background: linear-gradient(145deg, var(--blurple), var(--pink));
  box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.25);
  flex-shrink: 0;
}

.eyebrow {
  margin: 0 0 0.2rem;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.sub {
  margin: 0.4rem 0 0;
  color: var(--muted);
  max-width: 36ch;
}

.sub em { color: var(--yellow); font-style: normal; }

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: rgba(88, 101, 242, 0.18);
  border: 1px solid rgba(88, 101, 242, 0.35);
  color: #c9cdfb;
  font-size: 0.82rem;
  white-space: nowrap;
}

.pill.soft {
  background: rgba(35, 165, 89, 0.14);
  border-color: rgba(35, 165, 89, 0.3);
  color: #8ee0ad;
}

.pill strong { color: #fff; }

.current {
  position: relative;
  padding: 1.25rem 1.3rem 1.35rem;
  border-radius: calc(var(--radius) + 4px);
  background:
    linear-gradient(180deg, rgba(88, 101, 242, 0.18), transparent 40%),
    var(--bg1);
  border: 1px solid rgba(88, 101, 242, 0.45);
  box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  margin-bottom: 1.5rem;
  animation: rise 0.55s ease 0.06s both;
  overflow: hidden;
}

.current::before {
  content: "";
  position: absolute;
  inset: auto -20% -40% auto;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(235, 69, 158, 0.25), transparent 65%);
  pointer-events: none;
}

.current-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.65rem;
  border-radius: 8px;
  background: var(--blurple);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.badge.pulse::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
  animation: ping 1.6s ease infinite;
}

@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(255, 255, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.who {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.92rem;
}

.current h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.35rem, 3.5vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.notes {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.notes:empty { display: none; }

.progress-block { margin-top: 1.1rem; }

.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.45rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.progress-meta strong {
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.bar {
  position: relative;
  height: 18px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blurple), var(--pink) 70%, var(--yellow));
  transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.bar-glow {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40px;
  margin-left: -20px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  animation: shimmer 2.2s ease-in-out infinite;
  opacity: 0.7;
  pointer-events: none;
}

@keyframes shimmer {
  0%, 100% { transform: translateX(0); opacity: 0.2; }
  50% { transform: translateX(min(100vw, 700px)); opacity: 0.8; }
}

.queue-head {
  margin-bottom: 0.75rem;
  animation: rise 0.55s ease 0.12s both;
}

.queue-head h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 800;
}

.queue-head p {
  margin: 0.25rem 0 0;
  color: var(--dim);
  font-size: 0.92rem;
}

.status {
  min-height: 1.2rem;
  margin: 0 0 0.55rem;
  color: var(--dim);
  font-size: 0.88rem;
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
  animation: rise 0.55s ease 0.16s both;
}

.item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
  padding: 0.95rem 1rem;
  background: var(--bg2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  transition: transform 0.15s ease, border-color 0.15s ease, opacity 0.2s ease;
}

.item:hover {
  border-color: rgba(88, 101, 242, 0.35);
  transform: translateY(-1px);
}

.item.done {
  opacity: 0.55;
}

.item.done .task-title {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  color: var(--dim);
}

.check {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.2rem;
  accent-color: var(--green);
  pointer-events: none;
}

.task-title {
  margin: 0;
  font-weight: 600;
  font-size: 1.02rem;
  word-break: break-word;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.7rem;
  margin-top: 0.4rem;
  color: var(--dim);
  font-size: 0.82rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.12rem 0.45rem;
  border-radius: 6px;
  background: rgba(240, 178, 50, 0.12);
  color: #f0d078;
  font-weight: 600;
}

.task-notes {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.empty {
  margin: 0;
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--dim);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.5rem;
  color: var(--dim);
  font-size: 0.84rem;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* —— Admin —— */
.admin-wrap { width: min(820px, calc(100% - 2rem)); }

.panel {
  background: var(--bg1);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}

.panel h2 {
  margin: 0 0 0.85rem;
  font-family: var(--display);
  font-size: 1.15rem;
}

.grid {
  display: grid;
  gap: 0.75rem;
}

.grid.two {
  grid-template-columns: 1fr 1fr;
}

label.field {
  display: grid;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--muted);
}

input[type="text"],
input[type="password"],
input[type="number"],
textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--bg0);
  color: var(--ink);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  font: inherit;
  outline: none;
}

input:focus, textarea:focus {
  border-color: var(--blurple);
  box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.25);
}

textarea { min-height: 72px; resize: vertical; }

.slider-row {
  display: grid;
  grid-template-columns: 1fr 90px;
  gap: 0.65rem;
  align-items: center;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--blurple);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.9rem;
}

.btn {
  border: 0;
  border-radius: 10px;
  padding: 0.7rem 1rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  background: var(--blurple);
  color: #fff;
  transition: transform 0.12s ease, background 0.15s ease;
}

.btn:hover { background: var(--blurple-hot); }
.btn:active { transform: scale(0.97); }
.btn.ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--ink);
}
.btn.danger { background: var(--red); }
.btn.green { background: var(--green); }

.admin-item {
  display: grid;
  gap: 0.55rem;
  padding: 0.85rem;
  border-radius: 12px;
  background: var(--bg2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 0.55rem;
}

.admin-item-top {
  display: flex;
  gap: 0.55rem;
  align-items: center;
}

.msg {
  min-height: 1.2rem;
  margin: 0.4rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}
.msg.err { color: #ff8b8e; }
.msg.ok { color: #8ee0ad; }

@media (max-width: 640px) {
  .hero { flex-direction: column; }
  .stats { justify-content: flex-start; }
  .grid.two { grid-template-columns: 1fr; }
  .slider-row { grid-template-columns: 1fr; }
}
