:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --border: #e2e4e9;
  --text: #1f2430;
  --muted: #6b7280;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #16a34a;
  --danger: #dc2626;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
}

.topbar .brand { font-weight: 700; font-size: 18px; }
.topbar .brand span { color: var(--primary); }

.topbar nav a {
  margin-right: 16px;
  color: var(--text);
  font-weight: 500;
}

.topbar .user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px;
}

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

.card h2, .card h3 { margin-top: 0; }

input, select, button {
  font: inherit;
}

input[type="text"], input[type="email"], input[type="password"], select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 12px;
  background: #fff;
  color: var(--text);
}

label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  display: block;
  margin-bottom: 4px;
}

button, .btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 9px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

button:hover, .btn:hover { background: var(--primary-dark); text-decoration: none; }

button.danger, .btn.danger { background: var(--danger); }
button.secondary, .btn.secondary { background: #6b7280; }

.error {
  background: #fee2e2;
  color: #991b1b;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

th { color: var(--muted); font-weight: 600; }

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #e0e7ff;
  color: #3730a3;
}

.badge.admin { background: #fef3c7; color: #92400e; }

.checklist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.checklist-item:last-child { border-bottom: none; }

.checklist-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
  cursor: pointer;
}

.checklist-item .item-text { flex: 1; }
.checklist-item.done .item-text { color: var(--muted); }
.checklist-item.done .item-label { text-decoration: line-through; }
.checklist-item .meta { font-size: 12px; color: var(--muted); }

.progress-bar {
  height: 8px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin: 8px 0 16px;
}

.progress-bar .fill {
  height: 100%;
  background: var(--success);
}

.tabs { display: flex; gap: 4px; margin-bottom: 20px; }
.tabs a {
  padding: 8px 16px;
  border-radius: 8px 8px 0 0;
  color: var(--muted);
  font-weight: 600;
}
.tabs a.active { background: var(--card); color: var(--primary); border: 1px solid var(--border); border-bottom: none; }

.inline-form { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.inline-form input { margin-bottom: 0; }

.muted { color: var(--muted); font-size: 13px; }
.empty-state { text-align: center; padding: 40px 20px; color: var(--muted); }
