:root {
  --green-dark: #2f4a34;
  --green: #4a7856;
  --green-light: #e9f0ea;
  --brown: #6b4f3a;
  --bg: #f7f6f2;
  --text: #2a2a26;
  --border: #d8d8d0;
  --danger: #a13d3d;
}

* { box-sizing: border-box; }

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

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

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

.topbar {
  background: var(--green-dark);
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
}
.topbar .brand { font-weight: 700; margin-right: 12px; }
.topbar nav { display: flex; gap: 14px; flex-wrap: wrap; flex: 1; }
.topbar nav a, .topbar .userbox a { color: #dfe9e2; text-decoration: none; }
.topbar nav a:hover, .topbar .userbox a:hover { text-decoration: underline; }
.userbox { margin-left: auto; font-size: 0.9em; color: #cfe0d5; }

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

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.stat {
  background: var(--green-light);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}
.stat .value { font-size: 1.7em; font-weight: 700; color: var(--green-dark); }
.stat .label { font-size: 0.85em; color: #556; text-transform: uppercase; letter-spacing: .03em; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); font-size: 0.95em; }
th { background: var(--green-light); }
tr:hover td { background: #fafaf7; }

form .field { margin-bottom: 14px; }
label { display: block; font-weight: 600; margin-bottom: 4px; font-size: 0.9em; }
input, select, textarea {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1em;
  font-family: inherit;
}
textarea { resize: vertical; min-height: 70px; }

button, .btn {
  display: inline-block;
  background: var(--green);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 1em;
  cursor: pointer;
  text-decoration: none;
}
button:hover, .btn:hover { background: var(--green-dark); }
.btn-secondary { background: #888; }
.btn-secondary:hover { background: #666; }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #7d2f2f; }
.btn-small { padding: 4px 10px; font-size: 0.85em; }

.timer-box {
  text-align: center;
  padding: 30px 20px;
}
.timer-display {
  font-size: 2.6em;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--green-dark);
  margin-bottom: 16px;
}

.alert {
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
}
.alert-error { background: #fbe9e9; color: var(--danger); border: 1px solid #e6c3c3; }
.alert-success { background: var(--green-light); color: var(--green-dark); border: 1px solid #c6d9cb; }

.login-wrap {
  max-width: 380px;
  margin: 60px auto;
}

.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; margin-bottom: 16px; }
.filters .field { margin-bottom: 0; min-width: 140px; }

.totals-row td { font-weight: 700; background: var(--green-light); }

@media print {
  .topbar, .no-print { display: none !important; }
  body { background: #fff; }
  .card { border: none; padding: 0; }
}
