*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #f5f5f5;
  --white: #ffffff;
  --brand: #1a3c5e;
  --accent: #c8832a;
  --text: #222;
  --muted: #666;
  --border: #ddd;
  --danger: #c0392b;
  --success: #27ae60;
  --radius: 8px;
}
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); line-height: 1.5; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
input, textarea, select { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 15px; font-family: inherit; margin-top: 4px; }
input:focus, textarea:focus { outline: 2px solid var(--brand); border-color: var(--brand); }
label { font-size: 14px; font-weight: 600; color: var(--muted); display: block; margin-top: 16px; }
button { cursor: pointer; font-family: inherit; }
.btn { display: inline-block; padding: 10px 20px; background: var(--brand); color: #fff; border: none; border-radius: var(--radius); font-size: 15px; font-weight: 600; cursor: pointer; }
.btn:hover { background: #142e48; color: #fff; text-decoration: none; }
.btn-secondary { background: transparent; color: var(--brand); border: 2px solid var(--brand); }
.btn-secondary:hover { background: var(--brand); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #a93226; }
nav { background: var(--brand); color: #fff; padding: 0 24px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.nav-brand { font-size: 18px; font-weight: 700; color: #fff; }
.nav-brand a { color: #fff; }
.nav-right { display: flex; align-items: center; gap: 20px; font-size: 14px; }
.nav-right a { color: #fff; opacity: .8; }
.nav-right a:hover { opacity: 1; text-decoration: none; }
main { max-width: 1100px; margin: 0 auto; padding: 32px 24px; }
main.narrow { max-width: 560px; }
.auth-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.auth-box { background: var(--white); padding: 40px; border-radius: var(--radius); box-shadow: 0 2px 16px rgba(0,0,0,.08); width: 100%; max-width: 420px; }
.logo { font-size: 22px; font-weight: 800; color: var(--brand); margin-bottom: 8px; }
.auth-box h1 { font-size: 24px; margin-bottom: 24px; }
.auth-box .btn { width: 100%; margin-top: 24px; text-align: center; }
.auth-link { margin-top: 20px; font-size: 14px; color: var(--muted); text-align: center; }
.error { background: #fdecea; color: var(--danger); padding: 10px 14px; border-radius: var(--radius); margin-bottom: 16px; font-size: 14px; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 28px; gap: 16px; }
.page-header h1 { font-size: 28px; }
.badge { display: inline-block; background: var(--accent); color: #fff; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 20px; margin-top: 6px; }
.subtitle { color: var(--muted); margin-top: 6px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.card { background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.07); }
.card-header { margin-bottom: 8px; }
.card-header h2 { font-size: 18px; }
.card-desc { color: var(--muted); font-size: 14px; margin: 8px 0; }
.card-actions { display: flex; gap: 10px; margin-top: 16px; }
.progress-wrap { margin: 12px 0; }
.progress-wrap.big { margin: 0 0 28px; }
.progress-bar { background: #e0e0e0; border-radius: 4px; height: 8px; overflow: hidden; margin-bottom: 6px; }
.progress-fill { background: var(--success); height: 100%; border-radius: 4px; transition: width .3s; }
.progress-label { font-size: 13px; color: var(--muted); }
.two-col { display: grid; grid-template-columns: 1fr 320px; gap: 32px; align-items: start; }
.task-list h2, .add-task h2 { font-size: 18px; margin-bottom: 16px; }
.task-item { display: flex; gap: 12px; background: var(--white); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.06); align-items: flex-start; transition: opacity .2s; }
.task-item.completed { opacity: .65; }
.task-item.completed .task-title { text-decoration: line-through; color: var(--muted); }
.task-check input[type=checkbox] { width: 18px; height: 18px; margin-top: 2px; cursor: pointer; accent-color: var(--success); }
.task-body { flex: 1; }
.task-title { font-weight: 600; font-size: 15px; }
.task-desc { font-size: 14px; color: var(--muted); margin-top: 4px; }
.task-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--muted); margin-top: 8px; }
.done-stamp { color: var(--success); font-weight: 600; }
.proof-form { display: flex; gap: 8px; margin-top: 10px; }
.proof-form input { margin-top: 0; }
.proof-note { font-size: 13px; color: var(--muted); margin-top: 6px; font-style: italic; }
.task-delete { background: none; border: none; color: var(--muted); font-size: 16px; padding: 4px 8px; border-radius: 4px; opacity: .5; }
.task-delete:hover { opacity: 1; color: var(--danger); background: #fdecea; }
.add-task { background: var(--white); border-radius: var(--radius); padding: 24px; box-shadow: 0 1px 4px rgba(0,0,0,.07); position: sticky; top: 24px; }
.add-task .btn { width: 100%; margin-top: 20px; }
.form-actions { display: flex; gap: 12px; margin-top: 24px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state .btn { margin-top: 20px; }
.empty { color: var(--muted); font-size: 14px; }
@media (max-width: 768px) {
  .two-col { grid-template-columns: 1fr; }
  .add-task { position: static; }
  .grid { grid-template-columns: 1fr; }
}
