/* Organiza Fácil — base, tokens e componentes */
:root {
  /* Identidade (extraída da logomarca e do layout aprovado) */
  --verde-900: #0b3511;
  --verde-800: #16441f;   /* "Organiza" da logo */
  --verde-700: #1b5e20;
  --verde-600: #23662f;   /* base do selo "Fácil" */
  --verde-500: #28971e;   /* botões principais */
  --verde-400: #3fae2a;
  --verde-300: #6eb23d;   /* topo do selo "Fácil" */
  --verde-050: #eef8ea;
  --laranja:   #f28508;   /* carteira */
  --laranja-2: #f08d11;
  --amarelo:   #ffc928;   /* moedas / item ativo do menu */
  --vermelho:  #e53935;
  --vermelho-050: #fdecea;

  --bg:        #f6f7f7;
  --card:      #ffffff;
  --texto:     #1d2a1f;
  --texto-2:   #5b6b5e;
  --texto-3:   #93a096;
  --borda:     #e3e8e4;
  --borda-2:   #d3dbd5;

  --radius:    12px;
  --radius-lg: 18px;
  --sombra:    0 2px 10px rgba(16, 52, 22, .07);
  --sombra-2:  0 8px 28px rgba(16, 52, 22, .16);
  --nav-h:     64px;
  --assin-h:   26px;
  --safe-b:    env(safe-area-inset-bottom, 0px);
  --safe-t:    env(safe-area-inset-top, 0px);
  --font:      'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--texto);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100dvh;
}
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--verde-500); text-decoration: none; font-weight: 500; }
h1, h2, h3, p { margin: 0; }
.hidden { display: none !important; }
.muted { color: var(--texto-2); }
.small { font-size: 13px; }
.center { text-align: center; }
.stack > * + * { margin-top: 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.spacer { flex: 1; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 50px; padding: 0 20px;
  border: 0; border-radius: 999px; cursor: pointer;
  font-weight: 600; font-size: 15px;
  transition: transform .08s ease, filter .15s ease, background .15s;
  user-select: none;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
.btn-primary { background: var(--verde-500); color: #fff; box-shadow: 0 4px 12px rgba(40,151,30,.28); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-outline { background: #fff; color: var(--verde-600); border: 1.5px solid var(--verde-500); }
.btn-ghost { background: transparent; color: var(--verde-600); }
.btn-danger { background: var(--vermelho); color: #fff; }
.btn-danger-outline { background: #fff; color: var(--vermelho); border: 1.5px solid #f3b6b4; }
.btn-orange { background: var(--laranja-2); color: #fff; }
.btn-sm { min-height: 38px; font-size: 13.5px; padding: 0 14px; width: auto; }
.btn .spin {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff;
  animation: girar .7s linear infinite;
}
.btn-outline .spin, .btn-ghost .spin { border-color: rgba(40,151,30,.25); border-top-color: var(--verde-500); }
@keyframes girar { to { transform: rotate(360deg); } }

/* ---------- Campos ---------- */
.field label { display: block; font-size: 13px; font-weight: 500; color: var(--texto-2); margin-bottom: 6px; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > i.lead { position: absolute; left: 14px; color: var(--texto-3); font-size: 20px; pointer-events: none; }
.input {
  width: 100%; min-height: 50px; padding: 0 14px 0 44px;
  background: #fff; border: 1.5px solid var(--borda-2); border-radius: var(--radius);
  font-size: 16px; /* evita zoom no iOS */
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.input.no-icon { padding-left: 14px; }
.input:focus { border-color: var(--verde-500); box-shadow: 0 0 0 3px rgba(40,151,30,.14); }
.input[readonly] { background: #f2f5f3; color: var(--texto-2); }
.input-wrap .trail {
  position: absolute; right: 6px; width: 40px; height: 40px; border: 0; background: none;
  color: var(--texto-3); font-size: 20px; cursor: pointer; border-radius: 10px;
}
.field .hint { font-size: 12px; color: var(--texto-3); margin-top: 5px; }
.form-erro {
  display: none; background: var(--vermelho-050); color: #b3261e;
  border-radius: 10px; padding: 10px 12px; font-size: 13.5px;
}
.form-erro.show { display: block; }
.form-ok {
  background: var(--verde-050); color: var(--verde-700);
  border-radius: 10px; padding: 12px; font-size: 14px;
}

/* ---------- Cards ---------- */
.card {
  background: var(--card); border-radius: var(--radius-lg);
  box-shadow: var(--sombra); padding: 18px;
}
.card + .card { margin-top: 14px; }
.card-title { font-weight: 600; font-size: 15.5px; display: flex; align-items: center; gap: 8px; }
.card-title i { font-size: 20px; color: var(--verde-500); }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px;
}
.badge-verde { background: var(--verde-050); color: var(--verde-600); }
.badge-laranja { background: #fff3e2; color: #b85f00; }
.badge-cinza { background: #eef1ef; color: var(--texto-2); }

.avatar {
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, var(--verde-400), var(--verde-600));
}
.avatar.laranja { background: linear-gradient(135deg, #ffa42b, var(--laranja)); }

.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.list-item + .list-item { border-top: 1px solid var(--borda); }
.list-item .info { flex: 1; min-width: 0; }
.list-item .info b { display: block; font-weight: 600; font-size: 14.5px; }
.list-item .info span { display: block; font-size: 12.5px; color: var(--texto-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Toast ---------- */
#toast-root {
  position: fixed; left: 0; right: 0; top: calc(12px + var(--safe-t)); z-index: 999;
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px;
}
.toast {
  pointer-events: auto; max-width: 440px; width: 100%;
  background: #1d2a1f; color: #fff; border-radius: 14px; padding: 12px 16px;
  box-shadow: var(--sombra-2); font-size: 14px; display: flex; gap: 10px; align-items: center;
  animation: toastIn .22s ease;
}
.toast i { font-size: 20px; }
.toast.ok i { color: #7ee36a; }
.toast.erro { background: #b3261e; }
.toast.info i { color: var(--amarelo); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } }

/* ---------- Bottom sheet / modal ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; background: rgba(8, 28, 12, .45); z-index: 900;
  display: flex; align-items: flex-end; justify-content: center; animation: fade .18s ease;
}
.sheet {
  background: #fff; width: 100%; max-width: 520px;
  border-radius: 22px 22px 0 0; padding: 22px 20px calc(20px + var(--safe-b));
  animation: subir .22s ease; max-height: 90dvh; overflow: auto;
}
.sheet h3 { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.sheet .acoes { display: flex; gap: 10px; margin-top: 18px; }
@media (min-width: 640px) {
  .sheet-backdrop { align-items: center; }
  .sheet { border-radius: 20px; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes subir { from { transform: translateY(30px); opacity: .6; } }

/* ---------- Carregando ---------- */
.loader-page { min-height: 60dvh; display: grid; place-items: center; }
.loader {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3.5px solid var(--verde-050); border-top-color: var(--verde-500);
  animation: girar .8s linear infinite;
}

/* ---------- Assinatura ---------- */
.assinatura { display: block; margin: 0 auto; width: min(440px, 96%); height: auto; }
