:root {
  --bg: #f6f5f2;
  --card: #ffffff;
  --ink: #24211d;
  --muted: #7a7368;
  --accent: #b5651d;
  --accent-dark: #8f4e15;
  --ok: #2e7d32;
  --warn: #c77700;
  --danger: #c62828;
  --border: #e6e1d8;
  --radius: 14px;
}

* { box-sizing: border-box; }

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

a { color: var(--accent-dark); }

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 16px 64px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--accent);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar h1 {
  font-size: 17px;
  margin: 0;
  font-weight: 700;
}

.topbar .who {
  font-size: 13px;
  opacity: 0.9;
}

.topbar form { display: inline; }

.btn-link {
  background: none;
  border: none;
  color: #fff;
  text-decoration: underline;
  font-size: 13px;
  padding: 0;
  cursor: pointer;
}

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

.card h2 {
  font-size: 15px;
  margin: 0 0 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.big-btn {
  display: block;
  width: 100%;
  padding: 22px;
  font-size: 20px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  color: #fff;
}

.big-btn.in { background: var(--ok); }
.big-btn.out { background: var(--danger); }

.status-line {
  text-align: center;
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

.task-list { list-style: none; padding: 0; margin: 0; }

.task-list li {
  border-bottom: 1px solid var(--border);
}

.task-list li:last-child { border-bottom: none; }

.task-list form { margin: 0; }

.task-btn {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 12px 4px;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: var(--ink);
}

.check {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--border);
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.task-btn.done .check {
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
}

.task-btn.done span.label { color: var(--muted); text-decoration: line-through; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.badge.ok { background: #e6f4ea; color: var(--ok); }
.badge.warn { background: #fff3e0; color: var(--warn); }
.badge.danger { background: #fdecea; color: var(--danger); }

.alert {
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 14px;
  font-size: 14px;
}
.alert.status { background: #e6f4ea; color: var(--ok); }
.alert.error { background: #fdecea; color: var(--danger); }

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

input[type=text], input[type=password], input[type=number], input[type=date], select {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  background: #fff;
  color: var(--ink);
}

.btn {
  display: inline-block;
  padding: 9px 16px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
}

.btn.secondary { background: #efe9df; color: var(--ink); }
.btn.danger { background: var(--danger); color: #fff; }

.tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.tabs a {
  padding: 8px 14px;
  border-radius: 999px;
  background: #efe9df;
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
}
.tabs a.active { background: var(--accent); color: #fff; }

.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 140px; }

.muted { color: var(--muted); font-size: 13px; }

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

.login-card {
  width: 100%;
  max-width: 360px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px 24px;
  border: 1px solid var(--border);
}

.login-card h1 { text-align: center; margin: 0 0 4px; font-size: 20px; }
.login-card p.sub { text-align: center; color: var(--muted); margin: 0 0 20px; font-size: 13px; }
