:root {
  --green: #0b3d2e; --green2: #14614a; --gold: #f2c14e; --bg: #f4f6f5; --card: #fff;
  --text: #17231f; --muted: #66756f; --line: #dfe5e2; --red: #b3261e; --ok: #1b7a46;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
#app { max-width: 560px; margin: 0 auto; min-height: 100vh; padding-bottom: 40px; }
.admin-wide #app { max-width: 980px; }
header.top { background: var(--green); color: #fff; padding: 16px; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 5; }
header.top h1 { font-size: 18px; margin: 0; color: var(--gold); }
header.top small { opacity: .8; display: block; }
main { padding: 16px; }
.hero { background: var(--green); color: #fff; text-align: center; padding: 36px 16px 28px; }
.hero h1 { color: var(--gold); margin: 8px 0 4px; font-size: 28px; }
.hero p { margin: 0; opacity: .85; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 14px; }
.card h2 { margin: 0 0 4px; font-size: 18px; }
.muted { color: var(--muted); font-size: 14px; }
label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 4px; }
input, select { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 16px; background: #fff; }
input:focus, select:focus { outline: 2px solid var(--green2); border-color: transparent; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
button { font: inherit; cursor: pointer; border: 0; border-radius: 10px; padding: 13px 16px; font-weight: 700; }
.btn { background: var(--green); color: #fff; width: 100%; margin-top: 16px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.gold { background: var(--gold); color: #3a2c00; }
.btn.ghost { background: transparent; color: var(--green); border: 1px solid var(--line); }
.btn.sm, .sm { padding: 7px 12px; font-size: 13px; width: auto; margin: 0; }
.btn.red { background: var(--red); }
.btn.ok { background: var(--ok); }
.link { background: none; color: var(--gold); padding: 6px; }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.tabs button { flex: 1; background: #e8eeeb; color: var(--text); }
.tabs button.on { background: var(--green); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chip { background: #fff; border: 1.5px solid var(--line); color: var(--text); padding: 10px 14px; }
.chip.on { border-color: var(--green); background: #e6f1ec; color: var(--green); }
.chip:disabled { opacity: .35; cursor: not-allowed; }
.sum { background: #eef5f1; border-radius: 12px; padding: 12px; margin-top: 14px; }
.sum div { display: flex; justify-content: space-between; padding: 4px 0; }
.sum .big { font-size: 20px; font-weight: 800; color: var(--green); border-top: 1px dashed #b7c9c0; margin-top: 6px; padding-top: 10px; }
.sched { margin-top: 12px; font-size: 14px; }
.sched div { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line); }
.err { background: #fdecea; color: var(--red); padding: 10px; border-radius: 10px; margin-top: 12px; font-size: 14px; }
.info { background: #fff7e0; color: #5c4400; padding: 10px; border-radius: 10px; margin-top: 12px; font-size: 14px; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; }
.badge.pending { background: #fff1c2; color: #7a5a00; }
.badge.approved { background: #d5f0df; color: var(--ok); }
.badge.rejected { background: #fadad7; color: var(--red); }
.steps { display: flex; gap: 4px; margin-bottom: 14px; }
.steps i { flex: 1; height: 5px; border-radius: 3px; background: var(--line); }
.steps i.on { background: var(--green2); }
.photo { width: 100%; border-radius: 12px; margin-top: 10px; border: 1px solid var(--line); }
.tips { padding-left: 18px; font-size: 14px; color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; font-weight: 400; }
.check input { width: 20px; margin-top: 2px; }
.terms { max-height: 190px; overflow: auto; font-size: 13px; background: #f7f9f8; border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.photos3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photos3 img { width: 100%; border-radius: 8px; border: 1px solid var(--line); }
#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(80px); background: #222; color: #fff; padding: 12px 18px; border-radius: 10px; transition: .25s; opacity: 0; z-index: 20; max-width: 90%; }
#toast.show { transform: translateX(-50%); opacity: 1; }
.badge.open { background: #e8eeeb; color: var(--muted); }
.between { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.loan { border-top: 1px solid var(--line); padding: 12px 0; }
.loan:first-of-type { border-top: 0; }
.tabs { flex-wrap: wrap; }
.tabs button { min-width: 90px; }
.pixqr { display: block; max-width: 220px; width: 100%; margin: 10px auto 0; border-radius: 10px; background: #fff; }
