:root {
  --accent: #0E9F6E;
  --accent-dark: #0b7d57;
  --ink: #0F1613;
  --ink-3: #5E6A63;
  --paper: #FAFBFA;
  --surface: #ffffff;
  --line: #E3E8E5;
  --danger: #d64545;
  --r-lg: 18px;
  --r-md: 12px;
  font-size: 18px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  padding-bottom: 40px;
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar h1 {
  font-size: 1.1rem;
  margin: 0;
}

.topbar form { margin: 0; }

.btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

.btn.secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn.danger {
  background: var(--danger);
}

.btn.small {
  padding: 8px 14px;
  font-size: 0.85rem;
}

input[type=text], input[type=password], input[type=tel], input[type=number] {
  width: 100%;
  padding: 14px;
  font-size: 1.1rem;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  margin-bottom: 12px;
}

.login-card {
  margin-top: 15vh;
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 32px 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  text-align: center;
}

.login-card h1 { margin-top: 0; font-size: 1.4rem; }

.pin-input {
  text-align: center;
  letter-spacing: 8px;
  font-size: 1.8rem;
}

.error { color: var(--danger); font-weight: 600; margin-bottom: 12px; }

.progress-wrap {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.progress-bar-bg {
  height: 10px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 8px;
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.2s;
}

.section-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 8px 16px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.section-card h2 {
  font-size: 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.badge {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-dark);
  background: rgba(14,159,110,0.12);
  padding: 4px 10px;
  border-radius: 999px;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.check-item:first-of-type { border-top: none; }

.check-item input[type=checkbox] {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  accent-color: var(--accent);
  margin-top: 2px;
}

.check-item label {
  flex: 1;
  line-height: 1.4;
}

.check-item.done label {
  color: var(--ink-3);
  text-decoration: line-through;
}

.meta-line {
  font-size: 0.8rem;
  color: var(--ink-3);
  margin-top: 2px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: 20px;
}

th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}

th { background: #f2f4f3; }

.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 18px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.weekday-picker {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.weekday-picker label {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.85rem;
  cursor: pointer;
}

.nav-links { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }

a.tab {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  font-size: 0.9rem;
}

a.tab.active { background: var(--accent); color: white; border-color: var(--accent); }

.hint { color: var(--ink-3); font-size: 0.85rem; }

label.inline { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
