/* Kaza brand: mint #50B081 for the mark only (fails contrast for text), deep green #1F5139 for text and actions,
   off-white #F4FAF7 ground. Status colours: slipping #C77700, in trouble #B3261E. */
:root {
  --mint: #50B081; --deep: #1F5139; --ground: #F4FAF7; --ink: #17261E; --muted: #5B6B62;
  --line: #D5E5DC; --amber: #C77700; --red: #B3261E; --card: #FFFFFF;
  --r: 14px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink); background: var(--ground);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
main { max-width: 520px; margin: 0 auto; padding: 0 14px 40px; }
h2 { font-size: 1.05rem; color: var(--deep); margin: 18px 2px 10px; font-weight: 600; }
button { font: inherit; cursor: pointer; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.primary { background: var(--deep); color: #fff; border: 0; border-radius: var(--r); padding: 14px 18px; font-weight: 600; }
.primary.big { width: 100%; font-size: 1.2rem; padding: 18px; margin-top: 14px; }
.secondary { width: 100%; margin-top: 10px; background: transparent; border: 2px solid var(--deep); color: var(--deep); border-radius: var(--r); padding: 14px; font-weight: 600; }
.link { background: none; border: 0; color: var(--deep); padding: 10px 4px; font-weight: 600; }
.err { color: var(--red); font-weight: 600; min-height: 1.2em; }
.hint { color: var(--muted); font-size: .95rem; }
.hint.warn { color: var(--amber); font-weight: 600; }

/* sign in */
.signin { padding-top: 12vh; }
.signin .logo { display: block; width: 220px; margin: 0 auto 32px; }
.signin label { display: block; font-weight: 600; color: var(--deep); margin: 14px 0; }
.signin input { display: block; width: 100%; margin-top: 6px; font-size: 1.3rem; padding: 14px; border: 2px solid var(--line); border-radius: var(--r); background: #fff; }
.signin input:focus { outline: none; border-color: var(--deep); }

/* top bar and status */
.top { display: flex; align-items: center; gap: 10px; padding: 10px 0; position: sticky; top: 0; background: var(--ground); z-index: 2; }
.top .mini { height: 30px; }
.top .farm { flex: 1; font-weight: 600; color: var(--deep); display: flex; align-items: center; gap: 8px; }
.status { border-radius: 10px; padding: 8px 12px; font-size: .9rem; font-weight: 600; }
.status.ok { background: #E3F2EA; color: var(--deep); }
.status.warn { background: #FBEEDB; color: #7A4A00; }
.status.info { background: #E8EEF9; color: #23406E; }

/* dates */
.dates { display: flex; gap: 8px; margin-top: 12px; }
.chip { position: relative; flex: 1; text-align: center; border: 2px solid var(--line); background: #fff; color: var(--deep);
        border-radius: 999px; padding: 10px 6px; font-weight: 600; font-size: .95rem; overflow: hidden; }
.chip.on { background: var(--deep); color: #fff; border-color: var(--deep); }
.chip input[type=date] { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; }

/* flock list */
.flocks { display: grid; gap: 10px; }
.flock { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: var(--card); border: 2px solid var(--line);
         border-radius: var(--r); padding: 16px; min-height: 76px; }
.flock .names { flex: 1; display: flex; flex-direction: column; }
.flock .names b { font-size: 1.25rem; color: var(--ink); }
.flock .names span { color: var(--muted); }
.flock .state { display: flex; flex-direction: column; align-items: flex-end; color: var(--muted); }
.flock .state small { font-size: .8rem; }
.flock.done { border-color: var(--deep); }
.flock.done .state { color: var(--deep); }
.flock.pending .state { color: var(--amber); }
.dot { width: 18px; height: 18px; border-radius: 50%; display: inline-block; flex: none; border: 2px solid var(--deep); }
.dot.brown { background: #9A5B2E; }
.dot.white { background: #FFFFFF; }
.dot.mixed { background: linear-gradient(90deg, #9A5B2E 50%, #FFFFFF 50%); }
.dot.other { background: #C9D2CD; }
.install { display: block; margin: 24px auto 0; }

/* entry */
.entry .when { font-size: 1.1rem; font-weight: 600; margin: 4px 2px; }
.entry fieldset { border: 0; background: var(--card); border-radius: var(--r); margin: 12px 0; padding: 12px 14px; box-shadow: 0 0 0 2px var(--line) inset; }
.entry legend { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--deep); font-size: 1.05rem; padding: 0; float: left; width: 100%; margin-bottom: 6px; }
.field { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 4px 10px; padding: 8px 0; clear: both; }
.field .ic { color: var(--mint); display: flex; }
.field label { font-weight: 600; }
.field .unit { grid-column: 3; justify-self: end; color: var(--muted); font-size: .85rem; }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper input { width: 92px; font-size: 1.5rem; font-weight: 700; text-align: center; padding: 10px 4px; border: 2px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { outline: none; border-color: var(--deep); }
.stepper button { width: 48px; height: 52px; border-radius: 12px; border: 2px solid var(--line); background: #fff; color: var(--deep); font-size: 1.6rem; font-weight: 700; line-height: 1; }
.sum { margin: 4px 0 0; text-align: right; color: var(--muted); font-weight: 600; clear: both; }
.note { display: block; margin: 12px 2px; font-weight: 600; color: var(--muted); }
.note input { display: block; width: 100%; margin-top: 6px; padding: 12px; border: 2px solid var(--line); border-radius: 12px; font-size: 1rem; }

.notice { background: #fff; border-radius: var(--r); padding: 18px; box-shadow: 0 0 0 2px var(--amber) inset; margin-top: 12px; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--deep); color: #fff; padding: 12px 18px;
         border-radius: 999px; display: flex; gap: 8px; align-items: center; font-weight: 600; box-shadow: 0 6px 20px rgba(0,0,0,.2); }

.sheet { position: fixed; left: 12px; right: 12px; bottom: 16px; background: #fff; border-radius: var(--r); padding: 18px;
         box-shadow: 0 10px 30px rgba(0,0,0,.25); z-index: 10; font-size: 1.05rem; }

/* owner */
.tabs { display: flex; gap: 6px; margin: 4px 0 10px; overflow-x: auto; }
.tab { flex: 1; border: 0; border-bottom: 3px solid transparent; background: none; padding: 10px 6px; font-weight: 600; color: var(--muted); }
.tab.on { color: var(--deep); border-bottom-color: var(--mint); }
.card { background: #fff; border-radius: var(--r); padding: 14px; margin: 8px 0; box-shadow: 0 0 0 2px var(--line) inset; }
.card.row, .card .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.muted { color: var(--muted); font-size: .92rem; margin-top: 2px; }
.tag { background: #E3F2EA; color: var(--deep); border-radius: 999px; padding: 3px 10px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.tag.off { background: #F3E1E0; color: var(--red); }
.actions { display: flex; gap: 8px; margin-top: 10px; }
.small { flex: 1; border: 2px solid var(--line); background: #fff; color: var(--deep); border-radius: 10px; padding: 9px 6px; font-weight: 600; }
.ownerForm label { display: block; font-weight: 600; color: var(--deep); margin: 12px 0; }
.ownerForm input, .ownerForm select { display: block; width: 100%; margin-top: 6px; font-size: 1.05rem; padding: 12px; border: 2px solid var(--line); border-radius: 12px; background: #fff; }
.ownerForm .part { border: 0; background: #fff; border-radius: var(--r); box-shadow: 0 0 0 2px var(--line) inset; margin: 12px 0; padding: 4px 14px; }
.ownerForm legend { font-weight: 700; color: var(--deep); padding-top: 10px; }
.toggle { display: flex; gap: 12px; align-items: flex-start; }
.toggle input { width: 24px; height: 24px; margin-top: 2px; accent-color: var(--deep); flex: none; }

.who { display: flex; gap: 8px; margin-bottom: 8px; }
