:root {
  --green: #1d7a69;
  --green-dark: #155d50;
  --green-light: #e4f3ef;
  --ink: #1d2523;
  --muted: #5d6b67;
  --line: #d5dedb;
  --bg: #f6f8f7;
  --red: #b3261e;
  --red-light: #fdecea;
  --radius: 14px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); -webkit-tap-highlight-color: transparent; }

.topbar {
  display: flex; align-items: center; gap: 10px;
  padding: calc(env(safe-area-inset-top) + 12px) 18px 12px;
  background: var(--green); color: #fff;
}
.logo { width: 36px; height: 36px; border-radius: 9px; background: #fff; padding: 2px; }
.brand { font-weight: 700; font-size: 1.2rem; letter-spacing: .2px; }
.offline { margin-left: auto; background: #fff; color: var(--red); font-weight: 700; font-size: .85rem; padding: 4px 10px; border-radius: 99px; }

main { max-width: 480px; margin: 0 auto; padding: 22px 18px calc(env(safe-area-inset-bottom) + 110px); }
.loading { text-align: center; color: var(--muted); margin-top: 40px; }

h1 { font-size: 1.6rem; margin: 6px 0 4px; }
h2 { font-size: 1.15rem; margin: 26px 0 10px; }
p.lead { color: var(--muted); margin: 0 0 22px; font-size: 1.05rem; line-height: 1.45; }

label.field { display: block; font-weight: 600; margin: 18px 0 8px; font-size: 1.05rem; }
input.big {
  width: 100%; font-size: 1.5rem; padding: 14px 16px; border: 2px solid var(--line);
  border-radius: var(--radius); background: #fff; color: var(--ink); letter-spacing: 1px;
}
input.big:focus { outline: none; border-color: var(--green); }

.pin-dots { display: flex; gap: 14px; justify-content: center; margin: 8px 0 18px; }
.pin-dots span { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--green); }
.pin-dots span.on { background: var(--green); }

.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.keypad button {
  font-size: 1.8rem; font-weight: 600; padding: 16px 0; border-radius: var(--radius);
  border: 2px solid var(--line); background: #fff; color: var(--ink);
}
.keypad button:active { background: var(--green-light); }
.keypad button.muted { font-size: 1rem; color: var(--muted); }

.btn {
  display: block; width: 100%; font-size: 1.25rem; font-weight: 700; padding: 18px;
  border: none; border-radius: var(--radius); background: var(--green); color: #fff; margin-top: 22px;
}
.btn:active { background: var(--green-dark); }
.btn[disabled] { opacity: .45; }
.btn.secondary { background: #fff; color: var(--green); border: 2px solid var(--green); }
.btn.quiet { background: transparent; color: var(--muted); font-weight: 600; font-size: 1.05rem; margin-top: 12px; }

.error { background: var(--red-light); color: var(--red); border-radius: var(--radius); padding: 12px 14px; margin-top: 16px; font-weight: 600; }
.notice { background: var(--green-light); color: var(--green-dark); border-radius: var(--radius); padding: 12px 14px; margin-top: 16px; font-weight: 600; }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-top: 14px; }
.card .label { color: var(--muted); font-size: .95rem; }
.card .value { font-size: 1.15rem; font-weight: 600; margin-top: 2px; }

.stepper { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.stepper:last-child { border-bottom: none; }
.stepper .name { font-weight: 600; font-size: 1.05rem; }
.stepper .ctrl { display: flex; align-items: center; gap: 10px; }
.stepper button { width: 48px; height: 48px; border-radius: 12px; border: 2px solid var(--line); background: #fff; font-size: 1.6rem; font-weight: 700; color: var(--green); }
.stepper .num { min-width: 64px; text-align: center; font-size: 1.2rem; font-weight: 700; }

select.big, textarea.big { width: 100%; font-size: 1.25rem; padding: 14px 16px; border: 2px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink); font-family: inherit; }
select.big { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--green) 50%), linear-gradient(135deg, var(--green) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 15px) 50%; background-size: 7px 7px; background-repeat: no-repeat; }
select.big:focus, textarea.big:focus { outline: none; border-color: var(--green); }
textarea.big { font-size: 1.1rem; letter-spacing: normal; }
#reg { text-transform: uppercase; }

.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice button { font-size: 1.25rem; font-weight: 700; padding: 18px 0; border-radius: var(--radius); border: 2px solid var(--line); background: #fff; color: var(--ink); }
.choice button.on { background: var(--green); border-color: var(--green); color: #fff; }
.stepper .num small { font-size: .8rem; font-weight: 600; color: var(--muted); display: block; line-height: 1; }
.stepper .ctrl { gap: 8px; }
.stepper .num { min-width: 58px; line-height: 1.1; }

.brandlogo { display: block; width: 84px; height: 84px; margin: 0 auto 4px; border-radius: 18px; }
