/* MundaApp · Secure — verification, PIN lock, and the locked doors. */

.se-wrap { max-width: 520px; margin: 0 auto; padding: 8px 0 40px; }
.se-panel {
  border: 1px solid var(--line, #e7e1d6); border-radius: 16px; background: var(--card, #fff);
  padding: 18px;
}
.se-panel h2 { margin: 0 0 6px; font-size: 20px; color: var(--ink, #14231c); }
.se-small { font-size: 12.5px; line-height: 1.55; color: var(--muted, #5d6b64); margin: 0 0 12px; }
.se-muted { color: var(--faint, #8a968f); }
.se-foot { margin: 16px 2px 0; text-align: center; }
.se-field { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted, #5d6b64); margin: 0 0 14px; }
/* One size for every control on this form: 48 px tall, 16 px text (so Android
   does not zoom the page when the field is focused), and flush with the card. */
.se-field input, .se-field .se-select, .se-select {
  display: block; width: 100%; box-sizing: border-box; margin-top: 6px;
  padding: 13px 12px; min-height: 48px; font-family: inherit; font-size: 16px;
  line-height: 1.25; color: var(--ink, #14231c); letter-spacing: .01em;
  border: 1px solid var(--line, #e7e1d6); border-radius: 12px; background: #fff;
  -webkit-appearance: none; appearance: none;
}
.se-field input::placeholder { color: #9aa79f; font-weight: 400; }
.se-field input:focus, .se-select:focus {
  outline: none; border-color: var(--green-700, #0e5a3a);
  box-shadow: 0 0 0 3px rgba(14, 90, 58, .14);
}
.se-field input[aria-invalid="true"] { border-color: #b3403f; box-shadow: 0 0 0 3px rgba(157, 43, 43, .12); }
/* A dropdown that looks like one: same box as the name field, plus a chevron
   the browser cannot drop, so "where do I choose my district" has an answer. */
.se-field--select .se-select, select.se-select {
  padding-right: 42px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235d6b64' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 16px 16px;
}
.se-consent { display: flex; gap: 9px; align-items: flex-start; font-size: 12px; line-height: 1.5;
  color: var(--muted, #5d6b64); margin: 4px 0 14px; }
.se-consent input { margin-top: 2px; accent-color: var(--green-700, #0e5a3a); flex: none; }
/* The sentence must be one block. Bare text either side of the Privacy Notice
   link used to become separate flex items, so the label stacked into three
   columns on a phone. */
.se-consent span { flex: 1 1 auto; min-width: 0; }
.se-consent a { color: var(--green-700, #0e5a3a); }
.se-err {
  color: #8f2424; background: #fdf0ef; border: 1px solid #f0cfcc; border-radius: 10px;
  font-size: 13px; line-height: 1.45; padding: 9px 11px; margin: 0 0 12px;
}
.se-err[hidden] { display: none; }
.se-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.se-actions .se-btn { flex: 1 1 auto; min-height: 48px; }
.se-btn {
  padding: 11px 16px; font-size: 13.5px; font-weight: 700; border-radius: 10px;
  border: 1px solid var(--line, #e7e1d6); background: transparent; color: var(--ink, #14231c); cursor: pointer;
}
.se-btn.is-go { background: var(--green-700, #0e5a3a); border-color: var(--green-700, #0e5a3a); color: #fff; }
.se-btn:disabled { opacity: .55; cursor: default; }
.se-code {
  display: block; width: 100%; padding: 14px; margin: 4px 0 12px; text-align: center;
  font-size: 24px; letter-spacing: .35em; border: 1px solid var(--line, #e7e1d6);
  border-radius: 12px; background: var(--paper, #fbfaf6); color: var(--ink, #14231c);
}
.se-demo {
  display: flex; gap: 9px; align-items: flex-start; padding: 10px 12px; margin: 0 0 12px;
  background: #fdf6e6; border: 1px solid #ecd9a8; border-radius: 10px;
  font-size: 12px; line-height: 1.5; color: #7a5b12;
}
.se-demo svg { width: 15px; height: 15px; flex: none; margin-top: 1px; }
/* Not a warning: this is how verification actually works until Firebase is on. */
.se-note {
  display: flex; gap: 9px; align-items: flex-start; padding: 10px 12px; margin: 0 0 12px;
  background: #eef6f1; border: 1px solid #cfe3d8; border-radius: 10px;
  font-size: 12px; line-height: 1.5; color: #20503c;
}
.se-note svg { width: 15px; height: 15px; flex: none; margin-top: 1px; }
.se-shield { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: var(--green-50, #eaf4ec); color: var(--green-700, #0e5a3a); margin: 0 auto 12px; }
.se-shield svg { width: 26px; height: 26px; }
.se-done { text-align: center; }
.se-back { display: inline-flex; align-items: center; gap: 5px; background: none; border: 0; padding: 0 0 12px;
  font-size: 12.5px; color: var(--muted, #5d6b64); cursor: pointer; }
.se-back svg { width: 14px; height: 14px; }

/* lock screen */
.se-lock {
  position: fixed; inset: 0; z-index: 2147482000; background: #0E1F16;
  display: grid; place-items: center; padding: 24px;
}
.se-lock-box { width: 100%; max-width: 320px; text-align: center; color: #fff; }
.se-lock-ico { width: 46px; height: 46px; margin: 0 auto 14px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(255,255,255,.08); }
.se-lock-ico svg { width: 22px; height: 22px; }
.se-lock h2 { font-size: 19px; margin: 0 0 6px; font-weight: 700; }
.se-lock-sub { font-size: 12.5px; color: rgba(255,255,255,.66); margin: 0 0 18px; line-height: 1.5; }
.se-dots { display: flex; gap: 12px; justify-content: center; margin-bottom: 10px; }
.se-dots i { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,.18); display: block; }
.se-dots i.on { background: #F2C14E; }
.se-lock-err { height: 16px; font-size: 12px; color: #F2C14E; margin: 0 0 12px; }
.se-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.se-keys button {
  padding: 15px 0; font-size: 19px; font-weight: 600; border-radius: 12px; cursor: pointer;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); color: #fff;
}
.se-keys button:active { background: rgba(255,255,255,.18); }
.se-key-ghost { font-size: 12px !important; font-weight: 500 !important; color: rgba(255,255,255,.7) !important; }

/* --- onboarding: the account is a number, and the number gets confirmed --- */
.se-onboard {
  position: fixed; inset: 0; z-index: 9500;
  background: rgba(12, 24, 18, .55);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 16px 14px 22px;
}
.se-onboard-box {
  width: 100%; max-width: 480px; max-height: 92vh; overflow: auto;
  background: var(--paper, #fbfaf6); border-radius: 18px; padding: 16px;
  box-shadow: 0 18px 50px rgba(0,0,0,.28);
}
.se-skip {
  display: block; width: 100%; margin-top: 10px; padding: 10px;
  background: none; border: 0; color: var(--muted, #5d6b64);
  font: inherit; font-size: 12.5px; text-decoration: underline; cursor: pointer;
}

/* --- the gate: the app has no front door except an account ------------------ */
body.se-gated { overflow: hidden; }
.se-gate {
  position: fixed; inset: 0; z-index: 2147483600;
  background: var(--paper, #fbfaf6);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: max(14px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom));
}
.se-gate-inner { max-width: 520px; margin: 0 auto; }
.se-gate-head {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 2px 16px; font-family: Fraunces, Georgia, serif; font-size: 19px; color: var(--green-800, #0b3d24);
}
.se-gate-head em { font-style: italic; }
.se-gate-x {
  margin-left: auto; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line, #e7e1d6); background: #fff; color: var(--ink, #14231c);
  font-size: 18px; line-height: 1; cursor: pointer;
}
.se-gate .se-onboard-box {
  width: 100%; max-width: none; max-height: none; overflow: visible;
  border: 1px solid var(--line, #e7e1d6); border-radius: 18px; padding: 18px 16px;
  box-shadow: 0 8px 26px rgba(0,0,0,.06);
}
.se-gate-foot {
  margin: 16px 4px 0; font-size: 12px; line-height: 1.55;
  color: var(--muted, #5d6b64); text-align: center;
}

/* the account form inside the gate */
.se-label { font-size: 12px; font-weight: 600; color: var(--muted, #5d6b64); margin: 4px 0 7px; }
.se-select {
  display: block; width: 100%; margin-top: 5px; padding: 12px; font-size: 16px;
  border: 1px solid var(--line, #e7e1d6); border-radius: 10px;
  background: var(--paper, #fbfaf6); color: var(--ink, #14231c);
}
.se-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.se-chips { gap: 8px; }
.se-chip {
  padding: 10px 14px; min-height: 40px; border-radius: 999px; border: 1px solid var(--line, #e7e1d6);
  background: #fff; color: var(--ink, #14231c); font: inherit; font-size: 13px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.se-chip.is-on { background: var(--green-700, #0e5a3a); border-color: var(--green-700, #0e5a3a); color: #fff; font-weight: 600; }

/* --- the account card in Me ------------------------------------------------
   The account is the one screen that is about the person, so it opens their
   way: the app ribbon, a warm name plate, then the rows as two labelled
   groups instead of one long undifferentiated list.
 */
.se-acc { padding: 0; overflow: hidden; position: relative; border-radius: 18px; }
.se-acc-top {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 22px 15px 16px;
  background:
    radial-gradient(90% 120% at 100% 0, rgba(223, 160, 60, .22), transparent 58%),
    linear-gradient(160deg, #0C6E42, #0A4F30 72%, #083F27);
}
.se-acc-top:before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, #198A00 0 58%, #DE2010 58% 72%, #111 72% 86%, #EF7D00 86% 100%);
}
.se-acc-av {
  width: 48px; height: 48px; border-radius: 15px; flex: none;
  display: grid; place-items: center;
  background: #F7F1DF; color: #0B4029;
  font-family: var(--display); font-size: 21px; font-weight: 600;
  box-shadow: 0 10px 22px -14px rgba(0, 0, 0, .9), inset 0 0 0 1px rgba(255, 255, 255, .7);
}
.se-acc-idtx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.se-acc-nm {
  display: block; font-family: var(--display); font-size: 19px; font-weight: 600;
  letter-spacing: -.015em; line-height: 1.2; color: #FFFDF6;
}
.se-acc-vf {
  display: block; font-size: 10.5px; letter-spacing: .04em;
  color: rgba(247, 240, 220, .78);
}
.se-acc-where {
  display: block; font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase;
  color: #F3C97C; font-weight: 600;
}
.se-acc-id { display: flex; align-items: center; gap: 11px; padding: 0 14px 13px; }

.se-grp { padding: 4px 0 6px; }
.se-grp + .se-grp { border-top: 8px solid #F7F3E9; }
.se-k {
  display: block; padding: 10px 15px 4px;
  font-size: 9px; letter-spacing: .18em; text-transform: uppercase;
  font-weight: 700; color: #9A6C14;
}
.se-row {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  padding: 11px 15px; border: 0; background: none;
  font: inherit; color: var(--ink, #14231c); text-decoration: none; cursor: pointer;
}
.se-row:active { background: rgba(14, 90, 58, .05); }
.se-row-ic {
  width: 30px; height: 30px; flex: none; border-radius: 10px;
  display: grid; place-items: center;
  background: #EDF5EE; color: #0B5C39;
}
.se-row-ic svg { width: 16px; height: 16px; }
.se-row-tx { flex: 1 1 auto; min-width: 0; }
.se-row-tx b { display: block; font-size: 13.5px; font-weight: 600; letter-spacing: -.005em; }
.se-row-tx i { display: block; font-style: normal; font-size: 11.5px; color: var(--muted, #5d6b64); margin-top: 2px; }
.se-row-go { flex: none; color: var(--faint, #8a968f); font-size: 15px; }
.se-row-btns { display: flex; gap: 6px; flex: none; }
.se-row--static { cursor: default; }
.se-row--out {
  margin-top: 4px; border-top: 8px solid #F7F3E9;
  padding: 13px 15px;
}
.se-row--out .se-row-ic { background: #FBEDE9; color: #9d2b2b; }
.se-row--out .se-row-tx b { color: var(--clay, #9d2b2b); }

/* The old sign-out row at the bottom of Me said the same thing less clearly,
   and it dropped the session as well as the number. One sign-out, one meaning. */
[data-act="logout"] { display: none !important; }

/* --- the account screen opens with a real Chipata harvest ------------------
   A photograph of the thing the account is for, rather than a form arriving
   cold. Cropped by the box, not by hand, so it holds at any width. */
.se-gate-photo {
  position: relative;
  margin: 0 0 14px;
  border-radius: 16px;
  overflow: hidden;
  background: #1d3a28;
  box-shadow: 0 10px 26px -18px rgba(8, 42, 28, .8);
}
.se-gate-photo img {
  display: block;
  width: 100%;
  height: 176px;
  object-fit: cover;
  object-position: 50% 10%;   /* keeps her hat and face in frame, not the sky */
}
/* a quiet darkening at the foot, so the credit stays legible on any screen */
.se-gate-photo::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 58px;
  background: linear-gradient(to top, rgba(10, 32, 20, .72), rgba(10, 32, 20, 0));
  pointer-events: none;
}
.se-gate-photo figcaption {
  position: absolute; left: 12px; right: 12px; bottom: 8px; z-index: 1;
  color: rgba(255, 255, 255, .88);
  font-size: 9.5px; letter-spacing: .01em; line-height: 1.35;
}
.se-gate-photo figcaption a { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.4); }
.se-gate-photo .se-photo-lead {
  position: absolute; left: 14px; top: 12px; z-index: 1;
  background: rgba(255,255,255,.92); color: #0b3d24;
  font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px;
}
@media (min-width: 480px) {
  .se-gate-photo img { height: 208px; }
}

/* --- the code screen says what happened, and what to do next ------------ */
.se-sent { margin-top: 2px; }
.se-sent b { color: var(--ink); font-weight: 600; }
.se-hint {
  margin: 8px 2px 0;
  font-size: 12px;
  line-height: 1.45;
  color: #6b7280;
  min-height: 17px;
}
.se-hint.is-warn { color: #a8320a; }

/* --- where to find the code: steps, not a hint -------------------------- */
.se-steps {
  background: #F3F7F1;
  border: 1px solid #DDE7D9;
  border-radius: 13px;
  padding: 12px 14px 11px;
  margin: 12px 0 4px;
}
.se-steps > b {
  display: block;
  font-size: 11px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #0E5A3A;
  margin-bottom: 7px;
}
.se-steps ol {
  margin: 0;
  padding-left: 18px;
  color: #33443B;
  font-size: 13px;
  line-height: 1.6;
}
.se-steps li { margin-bottom: 4px; }
.se-steps li b { font-weight: 600; color: #14231c; }
.se-steps .se-small { margin: 8px 0 0; font-size: 12px; color: #6B7570; }
