:root{
  --bg:#f6f7fb;
  --card:#ffffff;
  --ink:#1f2937;
  --muted:#6b7280;
  --primary:#4f46e5;
  --primary2:#06b6d4;
  --good:#16a34a;
  --warn:#f59e0b;
  --bad:#ef4444;
  --line:#e5e7eb;
  --shadow: 0 10px 30px rgba(31,41,55,.08);
  --radius: 18px;
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color:var(--ink);
  background: radial-gradient(900px 600px at 10% 0%, rgba(79,70,229,.10), transparent 60%),
              radial-gradient(900px 600px at 100% 20%, rgba(6,182,212,.12), transparent 60%),
              var(--bg);
}

.topbar{
  padding:18px 18px 10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  max-width:1100px;
  margin:0 auto;
}

.brand{display:flex; gap:12px; align-items:center}
.logo{
  width:44px; height:44px;
  display:grid; place-items:center;
  border-radius:14px;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  color:white;
  box-shadow: var(--shadow);
  font-size:22px;
}
h1{margin:0; font-size:20px; line-height:1.1}
.sub{margin:2px 0 0; color:var(--muted); font-size:13px}

.modeToggle{
  display:flex; align-items:center; gap:8px;
  background:rgba(255,255,255,.6);
  border:1px solid var(--line);
  padding:6px;
  border-radius:999px;
  box-shadow: 0 6px 18px rgba(31,41,55,.06);
}
.pillLabel{color:var(--muted); font-size:12px; padding:0 8px}
.pill{
  border:1px solid var(--line);
  background:white;
  border-radius:999px;
  padding:8px 12px;
  font-weight:700;
  cursor:pointer;
}
.pill.active{
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  color:white;
}

.container{
  max-width:1100px;
  margin:0 auto;
  padding:10px 18px 20px;
  display:grid;
  grid-template-columns: 360px 1fr;
  gap:16px;
}
@media (max-width: 960px){
  .container{grid-template-columns:1fr}
}

.panel{display:flex; flex-direction:column; gap:16px}
.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:16px;
  box-shadow: var(--shadow);
}

.row{display:flex; align-items:center; gap:10px}
.space{justify-content:space-between}
.divider{height:1px; background:var(--line); margin:14px 0}

.label{font-size:12px; font-weight:800; color:var(--muted); display:block; margin-bottom:6px}
.input, .select{
  width:100%;
  border:1px solid var(--line);
  padding:10px 12px;
  border-radius:14px;
  font-size:14px;
  outline:none;
  background:white;
}
.input:focus, .select:focus{border-color: rgba(79,70,229,.5); box-shadow:0 0 0 4px rgba(79,70,229,.10)}
.grid2{display:grid; grid-template-columns:1fr 1fr; gap:10px}
@media (max-width: 520px){ .grid2{grid-template-columns:1fr} }

.btn{
  border:1px solid var(--line);
  background:white;
  padding:10px 12px;
  border-radius:14px;
  font-weight:800;
  cursor:pointer;
}
.btn.primary{
  border:0;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  color:white;
}
.btn.ghost{
  background:transparent;
}
.btn:disabled{opacity:.6; cursor:not-allowed}

.smallTag{
  font-size:12px;
  color:var(--muted);
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background: rgba(249,250,251,.9);
}

.stats{
  display:grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap:10px;
  margin-top:12px;
}
.stat{
  border:1px solid var(--line);
  border-radius:16px;
  padding:10px;
  background: rgba(249,250,251,.7);
}
.statLabel{font-size:12px; color:var(--muted); font-weight:900}
.statValue{font-size:18px; font-weight:900; margin-top:4px}

.progressWrap{margin-top:12px}
.progressBar{
  height:14px;
  background:#eef2ff;
  border:1px solid rgba(79,70,229,.15);
  border-radius:999px;
  overflow:hidden;
}
.progressFill{
  height:100%;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  width:0%;
  transition: width .3s ease;
}

.muted{color:var(--muted); font-size:13px}
.chip{
  font-size:12px;
  font-weight:900;
  padding:6px 10px;
  border-radius:999px;
  background: rgba(6,182,212,.10);
  border:1px solid rgba(6,182,212,.25);
  color:#0e7490;
}

.tabs{display:flex; gap:8px; margin-top:10px; flex-wrap:wrap}
.tab{
  border:1px solid var(--line);
  background: rgba(249,250,251,.9);
  padding:8px 10px;
  border-radius:999px;
  cursor:pointer;
  font-weight:900;
  font-size:13px;
}
.tab.active{
  background: rgba(79,70,229,.10);
  border-color: rgba(79,70,229,.25);
  color: var(--primary);
}

.choreGrid{
  margin-top:12px;
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:10px;
}
@media (max-width: 520px){ .choreGrid{grid-template-columns:1fr} }

.choreCard{
  border:1px solid var(--line);
  border-radius:16px;
  padding:12px;
  background: rgba(249,250,251,.65);
  display:flex;
  flex-direction:column;
  gap:8px;
}
.choreTitle{font-weight:1000}
.choreMeta{display:flex; gap:8px; flex-wrap:wrap}
.badge{
  font-size:12px;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid var(--line);
  background:white;
  font-weight:900;
}
.badge.good{border-color: rgba(22,163,74,.25); background: rgba(22,163,74,.08); color: var(--good)}
.badge.warn{border-color: rgba(245,158,11,.25); background: rgba(245,158,11,.10); color: #92400e}
.badge.neutral{border-color: rgba(79,70,229,.25); background: rgba(79,70,229,.08); color: var(--primary)}
.badge.bad{border-color: rgba(239,68,68,.25); background: rgba(239,68,68,.10); color: var(--bad)}

.list{display:flex; flex-direction:column; gap:10px; margin-top:10px}
.listItem{
  border:1px solid var(--line);
  border-radius:16px;
  padding:10px 12px;
  background: rgba(249,250,251,.7);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.footer{
  max-width:1100px;
  margin:0 auto;
  padding:14px 18px 24px;
  color:var(--muted);
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}
