:root {
  --green-dark: #1a6b3a;
  --green-main: #3a8c3f;
  --green-lime: #8dc63f;
  --bg:         #ffffff;
  --card:       #ffffff;
  --text:       #1a1a1a;
  --muted:      #666666;
  --border:     rgba(26,107,58,.15);
  --shadow:     0 8px 32px rgba(0,0,0,.10);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: 'Poppins', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--green-dark); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; }

/* ── Hojas decorativas ── */
.leaf { position: fixed; width: 320px; height: 320px; pointer-events: none; z-index: 0; }
.leaf--tl { top: -80px; left: -80px; }
.leaf--br { bottom: -80px; right: -80px; transform: rotate(180deg); }

/* ── Layout ── */
.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  position: relative;
  z-index: 1;
}

/* ── Card ── */
.card {
  width: 100%;
  max-width: 440px;
  background: var(--card);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 40px 36px 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Brand ── */
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  margin-bottom: 2px;
}
.brand__logo {
  width: 80px; height: 80px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--green-dark), var(--green-lime));
  display: flex; align-items: center; justify-content: center;
  padding: 13px;
  box-shadow: 0 10px 28px rgba(26,107,58,.30);
}
.brand__logo img { width: 100%; height: auto; display: block; }
.brand__name {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--green-dark);
  letter-spacing: .06em;
  line-height: 1;
}
.brand__tagline {
  font-size: .83rem;
  color: var(--muted);
  font-weight: 500;
  margin-top: -2px;
}

/* ── Alerts ── */
.alert--error {
  background: rgba(220,38,38,.06);
  border: 1px solid rgba(220,38,38,.25);
  border-radius: 14px;
  padding: 13px 15px;
  color: #991b1b;
  font-size: .86rem;
  line-height: 1.5;
}
.alert--ok {
  background: rgba(22,163,74,.07);
  border: 1px solid rgba(22,163,74,.28);
  border-radius: 14px;
  padding: 13px 15px;
  color: #14532d;
  font-size: .86rem;
  line-height: 1.5;
  font-weight: 600;
  text-align: center;
}

/* ── Invite chip ── */
.invite-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(26,107,58,.05);
  border: 1.5px solid rgba(26,107,58,.18);
  border-radius: 16px;
  padding: 12px 14px;
}
.invite-chip__icon {
  flex-shrink: 0;
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--green-dark), var(--green-lime));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  box-shadow: 0 4px 10px rgba(26,107,58,.25);
}
.invite-chip__icon svg { width: 17px; height: 17px; }
.invite-chip__body { flex: 1; min-width: 0; }
.invite-chip__label {
  font-size: .68rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.invite-chip__code {
  font-size: .96rem;
  font-weight: 800;
  color: var(--green-dark);
  word-break: break-all;
  margin-top: 1px;
}

/* ── Form fields ── */
.fields { display: flex; flex-direction: column; gap: 16px; }
.field  { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: .84rem; font-weight: 700; color: var(--green-dark); }

.phone-wrap {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 8px;
}
.phone-prefix {
  height: 52px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(26,107,58,.07);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  font-weight: 700;
  font-size: .84rem;
  color: var(--green-dark);
  gap: 4px;
}

.pass-wrap { position: relative; }
.pass-wrap input { padding-right: 52px; }
.pass-eye {
  position: absolute; right: 14px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  cursor: pointer; padding: 4px;
  color: var(--muted);
  display: flex; align-items: center;
}
.pass-eye svg { width: 20px; height: 20px; }
.pass-eye:hover { color: var(--green-dark); }

input[type="tel"],
input[type="password"],
input[type="text"] {
  width: 100%;
  height: 52px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 0 14px;
  font-size: .95rem;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder { color: #b8c1cc; }
input:focus {
  border-color: var(--green-main);
  box-shadow: 0 0 0 4px rgba(58,140,63,.12);
}

/* ── Botón ── */
.btn--primary {
  width: 100%;
  height: 52px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--green-dark), var(--green-lime));
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(26,107,58,.30);
  transition: filter .15s, transform .1s;
  margin-top: 4px;
}
.btn--primary:hover  { filter: brightness(1.06); }
.btn--primary:active { transform: scale(.98); }

/* ── Footer ── */
.footer-note {
  text-align: center;
  font-size: .84rem;
  color: var(--muted);
  margin-top: -4px;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .card { padding: 30px 22px 26px; gap: 16px; }
  .leaf { width: 220px; height: 220px; }
  .leaf--tl { top: -50px; left: -50px; }
  .leaf--br { bottom: -50px; right: -50px; }
}
