:root{
  --bg: #e6f3ff;
  --card: #ffffff;
  --accent: #0d6efd;
  --accent-soft: #cfe2ff;
  --ok: #20c997;
  --bad: #dc3545;
  --text: #222;
  --muted: #666;
  --shadow: 0 6px 20px rgba(0,0,0,.08);
}

*{ box-sizing: border-box; }
html, body{
  margin: 0;
  font-family: system-ui, -apple-system, "Poppins", Arial, sans-serif;
  background: linear-gradient(180deg, #e6f3ff, #d6ecff);
  color: var(--text);
}

.topbar{
  position: sticky; top: 0; z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1rem;
  align-items: center;
  background: var(--card);
  padding: 0.8rem 1rem;
  border-bottom: 1px solid #e9ecef;
  box-shadow: var(--shadow);
}
/*Reset Button  */
.reset-btn {
  background: var(--bad);
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 1rem;
}
.reset-btn:hover {
  background: #c82333;
}

.back{
  text-decoration: none;
  color: var(--accent);
  font-weight: 600;
}
.now{ display: flex; gap: .75rem; color: var(--muted); font-size: .95rem; }
.scoreboard{ display: flex; gap: 1rem; font-weight: 600; }

main{
  max-width: 1000px;
  margin: 1.25rem auto;
  padding: 0 1rem;
}

.panel{
  background: var(--card);
  border: 1px solid #eef2f6;
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

h1, h2{ margin: 0 0 .75rem; }
.hint{ margin: .5rem 0 1rem; color: var(--muted); }

.tasks{
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 10px;
}
.tasks thead th{
  background: var(--accent);
  color: #fff;
  text-align: left;
  padding: .75rem;
  font-weight: 600;
}
.tasks tbody td{
  padding: .65rem .75rem;
  border-bottom: 1px solid #f1f3f5;
  vertical-align: middle;
}
.tasks tbody tr:last-child td{ border-bottom: none; }

.idx{ width: 44px; color: var(--muted); }
.task-input{
  width: 100%;
  padding: .55rem .65rem;
  border: 1px solid #e2e6ea;
  border-radius: 8px;
  outline: none;
}
.task-input:focus{ border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.chk-wrap{ text-align: center; width: 90px; }
.chk{
  width: 20px; height: 20px; cursor: pointer;
  accent-color: var(--ok);
}
.status{
  width: 90px; text-align: center; font-weight: 700;
}
.status.done{ color: var(--ok); }
.status.miss{ color: var(--bad); }

.locked{
  opacity: .65; pointer-events: none;
}

.calendar{
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: .5rem;
}
.day{
  background: #fff;
  border: 1px solid #edf1f5;
  border-radius: 8px;
  padding: .5rem;
  min-height: 64px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.day .d{
  font-weight: 700; color: var(--muted);
}
.badge{
  align-self: flex-end;
  font-weight: 900;
  font-size: 1.1rem;
  line-height: 1;
}
.badge.ok{ color: var(--ok); }
.badge.no{ color: var(--bad); }

.legend{ margin-top: .75rem; color: var(--muted); }
.legend .yes{ color: var(--ok); font-weight: 900; }
.legend .no{ color: var(--bad); font-weight: 900; }

.month-list{
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: .5rem;
}
.month-list li{
  background: #fff;
  border: 1px solid #edf1f5;
  border-radius: 8px;
  padding: .5rem .75rem;
  display: flex; justify-content: space-between; align-items: center;
  box-shadow: var(--shadow);
}
.tag{
  padding: .15rem .5rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  color: #fff;
}
.tag.ok{ background: var(--ok); }
.tag.no{ background: var(--bad); }
.meta{ color: var(--muted); font-size: .9rem; }

.foot{
  text-align: center; color: var(--muted);
  padding: 2rem 1rem;
}

@media (max-width: 720px){
  .topbar{ grid-template-columns: 1fr; gap: .5rem; text-align: center; }
  .scoreboard{ justify-content: center; flex-wrap: wrap; }
  .now{ justify-content: center; }
}
