/* תקציב הבית — styles ported from Esther's approved sketches
 * (~/checklists/receipts-group/2026-11-18-{welcome-v2,onboard4-v2,invite,login-v2}).
 * The CSP has no 'unsafe-inline': never put style="" in markup; add a class here. */
@font-face {
  font-family: "Noto Sans Hebrew";
  src: url("/vendor/noto-sans-hebrew.ttf") format("truetype");
  font-weight: 100 900; font-display: swap;
}
:root {
  --leaf: #2F7A4A; --leaf-ink: #1F5C36; --leaf-soft: #E3F0E2; --leaf-tint: #F2F8F1;
  --ink: #2A251F; --ink2: #4A433A; --line: #E2D9CB; --field: #D9CFBF;
  --attn-bg: #FFF1D6; --attn-ink: #8A5A00; --danger: #C42B3F;
  --wa: #25D366;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Noto Sans Hebrew", system-ui, sans-serif; color: var(--ink);
  background: #E8E2D8; min-height: 100dvh;
}
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--leaf); outline-offset: 2px; }
[hidden] { display: none !important; }

/* The app column: the sketch's phone, but real width; the room photo under a white fade. */
.app {
  max-width: 480px; min-height: 100dvh; margin: 0 auto; position: relative;
  background:
    linear-gradient(to bottom, rgba(255,255,255,.96) 0%, rgba(255,255,255,.84) 30%, rgba(255,255,255,.72) 65%, rgba(255,255,255,.62) 100%),
    url("/img/room.jpg") center top / cover no-repeat, #FAF5EC;
}
@media (min-width: 520px) { .app { box-shadow: 0 0 40px rgba(60,40,10,.12); } }
.scr { min-height: 100dvh; padding: 18px 18px calc(26px + var(--safe-b)); display: flex; flex-direction: column; gap: 12px; }
.boot { min-height: 100dvh; display: grid; place-items: center; }
.boot img { width: 96px; height: 96px; border-radius: 24px; opacity: .9; }

/* header row */
.top { display: flex; justify-content: space-between; align-items: center; min-height: 34px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 17px; color: var(--leaf); }
.brand img { width: 30px; height: 30px; border-radius: 9px; box-shadow: 0 2px 6px rgba(0,0,0,.12); }
.back { font-size: 15px; color: var(--ink2); font-weight: 600; padding: 6px 2px; }
.steps { display: flex; gap: 6px; justify-content: center; }
.steps i { width: 22px; height: 6px; border-radius: 9px; background: var(--line); }
.steps i.on { background: var(--leaf); }
.stepname { font-size: 13px; color: var(--ink2); text-align: center; font-weight: 600; margin-top: -4px; }
.sp1 { flex: 2 1 0; min-height: 8px; }
.sp2 { flex: 3 1 0; min-height: 12px; }

.hello { font-size: 23px; font-weight: 700; text-align: center; line-height: 1.3; }
.sub { font-size: 15px; color: var(--ink2); text-align: center; line-height: 1.45; margin-top: -6px; }
.center { display: flex; flex-direction: column; align-items: center; text-align: center; }
.grow { flex: 1; justify-content: center; padding-bottom: 40px; }

.card {
  background: rgba(255,255,255,.92); -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px);
  border: 1px solid rgba(255,255,255,.8); border-radius: 22px; padding: 14px 16px;
  box-shadow: 0 6px 24px rgba(80,60,30,.10); display: flex; flex-direction: column; gap: 11px;
}
.card.tight { gap: 6px; padding: 10px 16px; }
.card.inv { background: linear-gradient(135deg, var(--leaf-tint), #fff); border: 1.5px solid #CFE3CC; }

/* welcome + returning */
.biglogo { width: 132px; height: 132px; border-radius: 32px; box-shadow: 0 14px 34px rgba(80,60,30,.22); }
.biglogo.sm { width: 112px; height: 112px; border-radius: 28px; }
.appname { font-size: 34px; font-weight: 800; color: var(--leaf); margin-top: 14px; letter-spacing: -.3px; }
.appname.lg { font-size: 36px; margin-top: 12px; }
.tag { font-size: 16px; color: var(--ink2); line-height: 1.5; margin-top: 4px; max-width: 300px; }
.greet { font-size: 21px; font-weight: 700; }
.mt-l { margin-top: 34px; } .mt-m { margin-top: 22px; gap: 4px; } .mt-fp { margin-top: 28px; gap: 14px; }
.fp {
  width: 96px; height: 96px; border-radius: 50%; background: var(--leaf-soft); display: grid; place-items: center;
  font-size: 48px; box-shadow: 0 0 0 10px rgba(227,240,226,.55);
}
.fptext { font-size: 17px; font-weight: 800; }

/* buttons */
.actions { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.pbtn {
  background: var(--leaf); color: #fff; font-weight: 800; font-size: 17px; text-align: center; border-radius: 16px;
  padding: 14px; box-shadow: 0 6px 14px rgba(47,122,74,.28); width: 100%; display: block;
}
.pbtn:disabled { opacity: .45; box-shadow: none; cursor: default; }
.wbtn {
  background: #fff; color: var(--ink); font-weight: 700; font-size: 16px; text-align: center; border-radius: 16px;
  padding: 13px; border: 1.5px solid var(--line); width: 100%; display: flex; align-items: center; justify-content: center; gap: 9px;
}
.wabtn {
  background: var(--wa); color: #fff; font-weight: 800; font-size: 16.5px; text-align: center; border-radius: 16px;
  padding: 13px; box-shadow: 0 6px 14px rgba(37,211,102,.28); width: 100%;
}
.wabtn:disabled { opacity: .5; box-shadow: none; }
.link { font-size: 15px; font-weight: 700; color: var(--leaf-ink); text-align: center; padding: 4px; }
.link.muted { color: var(--ink2); font-weight: 600; }
.links { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 6px; font-size: 14px; font-weight: 700; color: var(--leaf-ink); }
.links button { color: var(--leaf-ink); font-weight: 700; padding: 4px 2px; }
.links .dot { color: var(--ink2); }
.fine { font-size: 13px; color: var(--ink2); text-align: center; line-height: 1.45; }
.addbtn {
  border: 2px dashed var(--leaf); color: var(--leaf); background: rgba(242,248,241,.9); border-radius: 16px;
  padding: 13px; text-align: center; font-weight: 800; font-size: 16.5px; width: 100%;
}

/* fields */
.lbl { font-size: 14px; font-weight: 700; margin-bottom: 5px; display: block; }
.field {
  border: 1.5px solid var(--field); border-radius: 13px; background: #fff; padding: 10px 12px;
  font-size: 16.5px; font-weight: 600; width: 100%;
}
.field:focus { border-color: var(--leaf); box-shadow: 0 0 0 3px rgba(47,122,74,.12); outline: none; }
.field.ltr { direction: ltr; text-align: right; }
.field.ok { border-color: #9CC9A6; }
.hint { font-size: 12.5px; color: var(--ink2); margin-top: 4px; line-height: 1.35; }
.err { font-size: 14px; color: var(--danger); font-weight: 700; text-align: center; }
.err:empty { display: none; }

/* 6-digit code: one real input over six painted boxes */
.codes { position: relative; display: flex; gap: 8px; direction: ltr; justify-content: center; margin-top: 4px; }
.codes span {
  width: 42px; height: 52px; border: 1.5px solid var(--field); border-radius: 12px; background: #fff;
  display: grid; place-items: center; font-size: 24px; font-weight: 800;
}
.codes span.f { border-color: var(--leaf); }
.codes.focus span.cur { border-color: var(--leaf); box-shadow: 0 0 0 3px rgba(47,122,74,.15); }
.codes.focus span.cur:empty::after { content: ""; width: 2px; height: 24px; background: var(--leaf); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.codes input {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; font-size: 16px; caret-color: transparent;
  letter-spacing: 40px; direction: ltr;
}
.resend { font-size: 13.5px; color: var(--ink2); text-align: center; margin-top: 8px; }
.resend button { color: var(--leaf-ink); font-weight: 700; font-size: 13.5px; }

.chk { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; color: var(--ink2); line-height: 1.4; cursor: pointer; }
.chk input { width: 20px; height: 20px; accent-color: var(--leaf); flex: 0 0 auto; margin-top: 1px; }
.chk a { color: var(--leaf-ink); font-weight: 700; text-decoration: underline; }

/* members */
.memwrap { border-bottom: 1px solid #F1EADF; padding-bottom: 6px; }
.memwrap:last-child { border: 0; padding-bottom: 0; }
.mem { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; padding: 6px 0; }
.av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 14px; flex: 0 0 auto; }
.av.c0 { background: #5A57D6; } .av.c1 { background: #12B5C9; } .av.c2 { background: #E2479B; }
.av.c3 { background: #FF8A00; } .av.c4 { background: #33B94A; } .av.q { background: #12B5C9; }
.mem small { font-weight: 600; color: var(--ink2); font-size: 13px; margin-right: auto; }
.mem small.w { color: var(--attn-ink); background: var(--attn-bg); border-radius: 8px; padding: 1px 8px; }
.memsub { font-size: 12.5px; color: var(--ink2); margin-right: 40px; margin-top: -4px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.memsub button { font-size: 12.5px; font-weight: 700; color: var(--leaf-ink); }
.memsub button.plain { color: var(--ink2); }
.done { display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; color: var(--ink2); line-height: 1.4; }
.done div::before { content: "✓ "; color: #1E9E46; font-weight: 800; }
.famrow { display: flex; justify-content: center; }
.famrow .av { width: 44px; height: 44px; font-size: 20px; border: 3px solid #fff; margin: 0 -5px; }

/* month start */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 7px; }
.cal button {
  height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 17px; font-weight: 700;
  background: #fff; border: 1.5px solid #E6DDCF; color: var(--ink);
}
.cal button.on { background: var(--leaf); border-color: var(--leaf); color: #fff; box-shadow: 0 5px 12px rgba(47,122,74,.3); transform: scale(1.06); }
.explain {
  font-size: 16px; font-weight: 800; color: var(--leaf-ink); background: var(--leaf-soft); border-radius: 12px;
  padding: 9px 12px; text-align: center; line-height: 1.4;
}
.explain small { display: block; font-size: 13.5px; font-weight: 600; color: #3D6B4B; margin-top: 1px; }

/* shared / separate */
.big {
  display: flex; gap: 12px; align-items: center; border: 1.5px solid var(--line); border-radius: 18px; padding: 14px;
  background: #fff; width: 100%; text-align: right;
}
.big.on { border-color: var(--leaf); background: var(--leaf-tint); box-shadow: 0 0 0 3px rgba(47,122,74,.12); }
.rad { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #BDB2A2; flex: 0 0 auto; position: relative; }
.big.on .rad { border-color: var(--leaf); }
.big.on .rad::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--leaf); }
.big .txt { flex: 1; }
.big .txt, .big .ot, .big .od { display: block; }
.ot { font-weight: 800; font-size: 17px; color: var(--ink); }
.od { font-size: 14px; color: var(--ink2); line-height: 1.35; margin-top: 3px; font-weight: 500; }
.ill { width: 76px; height: 76px; border-radius: 18px; background: #F6F0E6; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; font-size: 40px; }
.big.on .ill { background: var(--leaf-soft); }
.ill .av { width: 30px; height: 30px; border: 2.5px solid #fff; margin: 0 -3px; }
@media (max-width: 380px) { .big { gap: 10px; padding: 12px; } .ill { width: 60px; height: 60px; font-size: 32px; border-radius: 15px; } }
.invhead { gap: 8px; margin-top: 12px; }
.invhead .sub { margin-top: 0; max-width: 310px; }

/* invite sheet */
.dim { position: fixed; inset: 0; background: rgba(30,25,18,.42); z-index: 20; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; max-width: 480px; margin: 0 auto; max-height: 92dvh; overflow-y: auto;
  background: #fff; border-radius: 26px 26px 0 0; padding: 10px 18px calc(22px + var(--safe-b));
  display: flex; flex-direction: column; gap: 11px; box-shadow: 0 -10px 30px rgba(0,0,0,.18);
}
.grab { width: 44px; height: 5px; border-radius: 9px; background: #DDD3C4; align-self: center; }
.sheet h2 { font-size: 20px; font-weight: 800; display: flex; justify-content: space-between; align-items: center; }
.sheet h2 button { font-size: 22px; color: var(--ink2); font-weight: 600; padding: 0 6px; }
.wa {
  background: #DCF8C6; border-radius: 14px 14px 4px 14px; padding: 10px 12px; font-size: 14px; line-height: 1.45;
  color: #1f2a1f; box-shadow: 0 2px 6px rgba(0,0,0,.08); white-space: pre-line;
}
.wa .u { color: #1767C4; font-weight: 600; display: block; }
.codebig { display: flex; justify-content: space-between; align-items: center; background: #FBF8F3; border: 1.5px dashed var(--field); border-radius: 14px; padding: 9px 14px; }
.codebig b { font-size: 24px; letter-spacing: 3px; direction: ltr; }
.codebig button { font-size: 13.5px; color: var(--leaf-ink); font-weight: 700; }

/* settings + home */
.stack { display: flex; flex-direction: column; gap: 12px; }
.sec { font-size: 16px; font-weight: 800; }
.saved { font-size: 13px; color: #1E9E46; font-weight: 700; text-align: center; min-height: 18px; }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translateX(-50%); z-index: 40;
  background: var(--leaf-ink); color: #fff; font-weight: 700; font-size: 14.5px; border-radius: 14px; padding: 10px 16px;
  box-shadow: 0 8px 20px rgba(0,0,0,.2); max-width: calc(100vw - 32px);
}
.toast.bad { background: var(--danger); }

.prose { display: flex; flex-direction: column; gap: 10px; font-size: 15px; line-height: 1.6; }
.prose h1 { font-size: 22px; } .prose h2 { font-size: 17px; margin-top: 6px; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
