:root {
  --primary: #1a6b3c;
  --primary-dark: #124c2a;
  --danger: #c0392b;
  --warn: #b8860b;
  --bg: #f4f6f5;
  --card: #ffffff;
  --border: #dfe4e2;
  --text: #1c2b23;
  --muted: #6b7a72;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}
.topbar {
  background: var(--primary);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar h1 { font-size: 17px; margin: 0; font-weight: 600; }
.topbar .user-info { font-size: 12px; opacity: 0.9; text-align: right; }
.topbar a.logout {
  color: #fff; text-decoration: none; font-size: 13px;
  border: 1px solid rgba(255,255,255,0.5); padding: 5px 10px; border-radius: 6px; margin-left: 8px;
}
.container { max-width: 900px; margin: 0 auto; padding: 16px; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}
label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 6px; color: var(--text); }
input, select, textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  background: #fff;
}
textarea { min-height: 70px; resize: vertical; }
.btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 13px 18px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}
.btn:hover { background: var(--primary-dark); }
.btn.secondary { background: #fff; color: var(--primary); border: 1px solid var(--primary); }
.btn.danger { background: var(--danger); }
.btn.block { width: 100%; margin-top: 14px; }
.btn.small { padding: 7px 12px; font-size: 13px; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.grid-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.nav-tile {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 14px;
  text-decoration: none;
  color: var(--text);
  text-align: center;
  font-weight: 600;
  font-size: 14px;
}
.nav-tile span.icon { display: block; font-size: 26px; margin-bottom: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { border: 1px solid var(--border); padding: 8px; text-align: left; }
th { background: #eef3f0; }
.badge { display: inline-block; padding: 3px 8px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.badge.ok { background: #dff5e4; color: var(--primary-dark); }
.badge.bad { background: #fbe1de; color: var(--danger); }
.msg { padding: 10px 12px; border-radius: 8px; font-size: 13px; margin-bottom: 10px; }
.msg.error { background: #fbe1de; color: var(--danger); }
.msg.ok { background: #dff5e4; color: var(--primary-dark); }
.muted { color: var(--muted); font-size: 12px; }
.list-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.photo-preview { max-width: 100%; border-radius: 8px; margin-top: 8px; border: 1px solid var(--border); }
.ocr-box { background: #f0f4f2; border: 1px dashed var(--border); border-radius: 8px; padding: 10px; font-size: 12px; margin-top: 8px; white-space: pre-wrap; max-height: 140px; overflow-y: auto; }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid #fff; border-top-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: middle; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
.top-actions { display:flex; gap:8px; flex-wrap:wrap; margin-bottom: 10px; }
.temp-stepper { display: flex; align-items: stretch; gap: 8px; margin-top: 2px; }
.stepper-btn {
  width: 52px; min-width: 52px; height: 52px;
  border: none; border-radius: 12px;
  background: var(--primary); color: #fff;
  font-size: 26px; font-weight: 700; line-height: 1;
  cursor: pointer; user-select: none; touch-action: manipulation;
}
.stepper-btn:active { background: var(--primary-dark); }
.temp-display-wrap {
  flex: 1; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 12px; background: #fff;
  padding: 0 8px;
}
.temp-display-wrap input[type="number"] {
  border: none; text-align: center; font-size: 26px; font-weight: 700;
  padding: 10px 0; -moz-appearance: textfield;
}
.temp-display-wrap input[type="number"]::-webkit-outer-spin-button,
.temp-display-wrap input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none; margin: 0;
}
.temp-unit { font-size: 16px; color: var(--muted); font-weight: 600; padding-right: 6px; }
