
:root {
  --green: #176344;
  --green-dark: #104b34;
  --red: #b83943;
  --gold: #e7bd69;
  --cream: #fffaf1;
  --text: #26352d;
  --muted: #718078;
  --white: #fff;
  --border: #e7e9e3;
  --shadow: 0 8px 25px #1d35200c;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: var(--cream);
}

button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid #e7bd69;
  outline-offset: 2px;
}

.container {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.nav {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  text-decoration: none;
  color: var(--green);
}

.brand-logo {
  width: 180px;
  max-height: 65px;
  object-fit: contain;
}

.brand-divider {
  height: 42px;
  width: 1px;
  background: var(--border);
}

.brand-title {
  font-size: 16px;
  line-height: 1.25;
}

.brand-title strong { font-size: 20px; }

.nav-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 11px 16px;
  font-weight: 700;
  transition: background .2s, transform .2s;
}

.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); }
.btn-light { background: #edf3ed; color: var(--green); }
.btn-outline { background: #fff; border-color: var(--border); color: var(--text); }
.btn-gold { background: var(--gold); color: #174d35; margin-top: 10px; }

.hero {
  overflow: hidden;
  color: #fff;
  background: linear-gradient(125deg, #104b34, #217650);
}

.hero-inner {
  min-height: 350px;
  padding-block: 52px;
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  align-items: center;
  gap: 35px;
}

.eyebrow {
  color: #f1d28d;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.eyebrow-red { color: var(--red); }

.hero h1 {
  max-width: 650px;
  margin: 15px 0;
  font-size: clamp(34px, 5vw, 53px);
  line-height: 1.08;
  letter-spacing: -1.5px;
}

.hero h1 span { color: #f1d28d; }

.hero-content > p {
  max-width: 570px;
  color: #e0eee5;
  font-size: 16px;
  line-height: 1.7;
}

.hero-note {
  margin-top: 18px;
  color: #d1e5d6;
  font-size: 12px;
}

.hero-art {
  min-height: 230px;
  position: relative;
  display: grid;
  place-content: center;
  text-align: center;
}

.gift-circle {
  width: 175px;
  height: 175px;
  display: grid;
  place-items: center;
  border: 1px solid #ffffff30;
  border-radius: 50%;
  background: #ffffff0d;
  font-size: 95px;
  box-shadow: 0 15px 45px #082f2040;
}

.hero-art-caption {
  margin-top: 16px;
  color: #e0eee5;
  line-height: 1.5;
  font-size: 14px;
}

.decor { position: absolute; color: var(--gold); }
.decor-one { top: 18px; right: 25%; font-size: 30px; }
.decor-two { top: 60px; left: 15%; font-size: 28px; }
.decor-three { bottom: 12px; right: 15%; font-size: 22px; }

.stats {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: -25px;
}

/* V9: quando a apresentação é ocultada nas telas internas, mantém os indicadores abaixo do cabeçalho. */
body:has(#inicio[hidden]) .stats {
  margin-top: 24px;
}


.stat {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 19px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: #fff;
  box-shadow: var(--shadow);
}

.stat-icon {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #edf5ec;
  font-size: 23px;
}

.stat strong {
  display: block;
  color: var(--green);
  font-size: 25px;
}

.stat div > span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.main-content { padding-block: 48px 65px; }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-heading h2 {
  margin: 8px 0;
  font-size: 28px;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.count-label {
  padding-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) 220px;
  gap: 12px;
  margin-bottom: 23px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 14px;
  border: 1px solid #dfe4dc;
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  font-size: 25px;
}

.search-box input {
  width: 100%;
  min-width: 0;
  padding: 13px 12px 13px 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
}

.field {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid #dfe4dc;
  border-radius: 10px;
  outline: none;
  background: #fff;
  color: var(--text);
}

.field:focus, .search-box:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px #17634415;
}

.children-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 20px;
}

.child-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e9e5dc;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 5px 18px #23352508;
  transition: transform .2s, box-shadow .2s;
}

.child-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px #23352512;
}

.child-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 17px 18px 14px;
  border-bottom: 1px solid #f0eee8;
}

.child-number {
  color: #625b50;
  font-size: 13px;
  font-weight: 650;
}

.status-badge {
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: #ddf4e5;
  color: #176744;
  font-size: 11px;
  font-weight: 800;
}

.status-reserved { background: #fff0d4; color: #93651a; }
.status-bought { background: #e6edff; color: #3456a0; }
.status-delivered { background: #eee8fa; color: #6941a5; }

.child-card-body {
  flex: 1;
  padding: 18px;
}

.child-card h3 {
  margin: 0;
  color: #252d28;
  font-size: 19px;
  line-height: 1.35;
}

.gift-heading {
  margin: 18px 0 10px;
  color: #756c60;
  font-size: 12px;
}

.gift-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.gift-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  padding: 13px;
  border: 1px solid #e7edf1;
  border-radius: 13px;
  background: #f1f5f9;
}

.gift-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 11px;
  background: #dce8f2;
  font-size: 23px;
}

.gift-item > div { min-width: 0; }
.gift-caption {
  display: block;
  margin-bottom: 5px;
  color: #756c60;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .6px;
  text-transform: uppercase;
}

.gift-item strong {
  display: block;
  overflow-wrap: anywhere;
  color: #252d28;
  font-size: 14px;
  line-height: 1.4;
}

.child-card-footer { padding: 0 18px 18px; }
.child-card-footer .btn { width: 100%; min-height: 46px; }
.child-card-footer .btn:disabled {
  background: #e7e9e5;
  color: #838b84;
  cursor: not-allowed;
  transform: none;
}

.empty {
  grid-column: 1 / -1;
  padding: 45px 15px;
  border-radius: 15px;
  background: #fff;
  color: var(--muted);
  text-align: center;
}

.admin-panel {
  margin-bottom: 35px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
}

.admin-panel[hidden], .modal-backdrop[hidden], .toast[hidden] {
  display: none !important;
}

.demo-notice {
  margin-bottom: 20px;
  padding: 13px 14px;
  border: 1px solid #f0dfb8;
  border-radius: 10px;
  background: #fff7e5;
  color: #76551a;
  font-size: 13px;
  line-height: 1.5;
}

.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 620px; }
th, td {
  padding: 13px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 13px;
}
th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}
.admin-select {
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}
.reset-btn { margin-top: 20px; }

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 20px;
  background: #103e2d;
  color: #fff;
  text-align: center;
}

.footer-logo {
  width: min(240px, 75vw);
  max-height: 90px;
  object-fit: contain;
  margin-bottom: 10px;
}

.site-footer h2 { margin: 6px 0; font-size: 22px; }
.site-footer p { margin: 8px 0; color: #d1e2d5; font-size: 13px; }
.site-footer span { color: #d1e2d5; font-size: 12px; }
.site-footer small { margin-top: 18px; color: #aac9b5; font-size: 11px; }
.footer-instagram-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 12px;
  padding: 8px 12px;
  border: 1px solid rgba(209, 226, 213, .28);
  border-radius: 999px;
  color: #e5f0e8;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .2s ease, border-color .2s ease;
}
.footer-instagram-link:hover,
.footer-instagram-link:focus-visible {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(209, 226, 213, .6);
  outline-offset: 3px;
}
.footer-instagram-icon { flex: 0 0 auto; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 18px;
  background: #10281f9c;
}

.modal {
  width: 100%;
  max-width: 470px;
  max-height: 92vh;
  overflow-y: auto;
  position: relative;
  padding: 28px;
  border-radius: 18px;
  background: #fff;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 28px;
}

.modal-icon { font-size: 34px; }
.modal h2 { margin: 10px 0; font-size: 24px; }
.modal p { color: var(--muted); font-size: 14px; line-height: 1.6; }
.modal label { display: block; margin: 15px 0 7px; font-size: 13px; font-weight: 700; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.modal-actions button { flex: 1; }

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
  max-width: calc(100% - 40px);
  padding: 16px 20px;
  border-radius: 12px;
  background: #174f37;
  color: #fff;
  box-shadow: 0 10px 35px #0002;
}

.sponsored-card .child-card-body { display: grid; gap: 12px; }
.sponsored-detail { display: flex; flex-direction: column; gap: 4px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.sponsored-detail span { color: var(--muted); font-size: 13px; }
.sponsored-detail strong { overflow-wrap: anywhere; }

@media (max-width: 900px) {
  .brand-logo { width: 145px; }
  .hero-inner { grid-template-columns: 1fr .6fr; }
  .children-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 650px) {
  body:has(#inicio[hidden]) .stats { margin-top: 18px; }
  .container { width: min(100% - 28px, 1180px); }
  .nav { min-height: auto; flex-wrap: wrap; padding-block: 12px; }
  .brand { gap: 9px; }
  .brand-logo { width: 110px; max-height: 48px; }
  .brand-divider { height: 34px; }
  .brand-title { font-size: 13px; }
  .brand-title strong { font-size: 16px; }
  .nav-actions { width: 100%; }
  .nav-actions .btn { flex: 1; padding: 10px 8px; font-size: 12px; }
  .hero-inner { grid-template-columns: 1fr; padding-block: 38px 50px; }
  .hero h1 { font-size: 38px; }
  .hero-art { display: none; }
  .stats { grid-template-columns: 1fr; margin-top: -20px; gap: 9px; }
  .stat { padding: 13px 15px; }
  .stat strong { font-size: 22px; }
  .main-content { padding-block: 38px 50px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .toolbar { grid-template-columns: 1fr; }
  .children-grid { grid-template-columns: 1fr; }
  .gift-item { padding: 11px; }
  .admin-panel { padding: 15px; }
  .modal { padding: 24px 19px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

.admin-login-form { display:grid; gap:8px; max-width:420px; margin-top:12px; }
.admin-login-form .field { width:100%; }
#spreadsheetInput { display:block; max-width:100%; margin:12px 0; }
#adminLoginBox p, #importBox p { margin:8px 0; }


/* Cancelamento seguro e histórico administrativo */
.cancellation-alert { margin: 18px 0; padding: 15px 17px; border: 1px solid #e7a2a2; border-left: 5px solid #c62828; border-radius: 10px; background: #fff0f0; color: #7f1717; }
.cancellation-alert p { margin: 7px 0; font-size: 13px; }
.cancellation-alert ul { margin: 8px 0 0; padding-left: 20px; font-size: 13px; }
.cancellation-alert li { margin: 5px 0; }
.admin-cancel-btn { padding: 7px 9px; border: 1px solid #c62828; border-radius: 8px; background: #fff; color: #b71c1c; font-weight: 700; cursor: pointer; }
.admin-cancel-btn:disabled { opacity: .45; cursor: not-allowed; }
.cancel-help { margin-top: 20px; color: var(--muted); font-size: 13px; }
.text-button { padding: 0; border: 0; background: transparent; color: var(--green); text-decoration: underline; font: inherit; font-weight: 800; cursor: pointer; }
.password-help { margin: 7px 0 12px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.status-canceled { background: #ffe3e3; color: #a11b1b; }


/* Campo de senha com controle de visualização */
.password-field-wrap { position: relative; display: flex; align-items: center; }
.password-field-wrap .field { width: 100%; padding-right: 48px; }
.password-toggle { position: absolute; right: 8px; border: 0; background: transparent; cursor: pointer; font-size: 19px; padding: 6px; line-height: 1; }
.password-toggle:focus-visible { outline: 2px solid var(--primary, #176344); border-radius: 6px; }


/* Autenticação Google e cartinhas estáticas PNG/PDF */
.user-badge { display:inline-flex; align-items:center; max-width:220px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted); font-size:12px; }
.child-letter-link { margin: 0 18px 14px; padding: 12px; border: 1px solid #d7e8dc; border-radius: 12px; background: #f3faf5; }
.letter-invitation { margin: 0 0 9px; color: #176344; font-size: 13px; line-height: 1.4; font-weight: 700; }
.child-letter-link .btn { width:100%; min-height:42px; }
.letter-modal { width:min(900px, 100%); }
.letter-preview { width:100%; min-height:220px; max-height:70vh; overflow:auto; display:flex; justify-content:center; align-items:center; background:#f4f6f4; border-radius:12px; padding:10px; }
.letter-image { display:block; max-width:100%; max-height:66vh; width:auto; height:auto; object-fit:contain; }
.letter-pdf { display:block; width:100%; height:65vh; border:0; background:white; border-radius:8px; }
.letter-admin-row { border-top:1px solid var(--border, #dce4de); padding:12px 0; }
.letter-admin-row label { display:block; font-weight:700; margin-bottom:6px; }
.letter-admin-controls { display:flex; gap:8px; align-items:center; }
.letter-admin-controls .field { flex:1; min-width:0; }
@media (max-width: 680px) { .user-badge { max-width:100%; width:100%; } .letter-admin-controls { flex-direction:column; align-items:stretch; } .letter-admin-controls .btn { width:100%; } .letter-pdf { height:58vh; } }


/* Cartinhas privadas: controles administrativos responsivos */
.letter-admin-controls { display:flex; flex-wrap:wrap; align-items:center; gap:.6rem; margin:.5rem 0 1rem; }
.letter-admin-controls input[type="file"] { flex:1 1 220px; min-width:0; }
.letter-saved-label { font-size:.9rem; opacity:.8; }
.letter-upload-error { margin:.35rem 0 .6rem; padding:.65rem .8rem; border:1px solid #f2a3a3; border-left:4px solid #c62828; border-radius:8px; background:#fff0f0; color:#b42318; font-weight:600; font-size:.9rem; line-height:1.45; }
.letter-upload-error[hidden] { display:none; }
@media (max-width:600px) { .letter-admin-controls { align-items:stretch; flex-direction:column; } .letter-admin-controls .btn { width:100%; } .letter-pdf { width:100%; min-height:60vh; } }

/* Ajustes solicitados: ações de conta alinhadas à direita e upload único por código */
.nav-actions { margin-left: auto; align-items: center; justify-content: flex-end; }
.letter-admin-single { display: grid; gap: .55rem; max-width: 760px; }
.letter-admin-single > .field { width: 100%; min-width: 0; }
.letter-admin-single .letter-admin-controls { margin: .25rem 0; }
.letter-admin-single .letter-saved-label { margin: .15rem 0; }
@media (max-width: 760px) { .nav-actions { margin-left: 0; width: 100%; justify-content: flex-end; } }


/* Respeita o atributo hidden em todos os componentes, inclusive botões do cabeçalho. */
[hidden] { display: none !important; }


/* Acesso protegido: cadastro compacto e responsivo antes de revelar a lista. */
.auth-gate { padding-top: 36px; padding-bottom: 54px; }
.auth-gate-card { max-width: 560px; margin: 0 auto; padding: 28px; border: 1px solid var(--border, #e4e4e4); border-radius: 18px; background: #fff; box-shadow: 0 12px 32px rgba(0,0,0,.05); }
.auth-gate-card h2 { margin: 8px 0 10px; }
.auth-gate-card p { line-height: 1.55; }
.auth-register-form { display: grid; gap: 9px; margin-top: 14px; }
.auth-gate-divider { display: flex; align-items: center; gap: 12px; color: #777; font-size: .9rem; margin: 18px 0; }
.auth-gate-divider::before, .auth-gate-divider::after { content: ""; height: 1px; background: #e5e5e5; flex: 1; }
#emailLinkStatus { min-height: 1.4em; }
[hidden] { display: none !important; }
@media (max-width: 600px) { .auth-gate-card { padding: 20px; } }


/* Identificação da pessoa autenticada no cabeçalho */
.user-badge {
  display: inline-flex;
  flex: 0 1 auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 240px;
  padding: 9px 13px;
  border: 1px solid #dce9df;
  border-radius: 999px;
  background: #edf5ef;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-badge-icon {
  flex: 0 0 17px;
  display: block;
}
#userBadgeName {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.child-code-label {
  display: inline-block;
  color: var(--green);
  font-size: .78em;
  font-weight: 800;
  letter-spacing: .2px;
  white-space: nowrap;
}
@media (max-width: 760px) {
  .user-badge { max-width: 100%; }
}


.child-management { margin-top: 18px; }
.child-management .table-wrapper { margin-top: 14px; }
.child-management-actions { display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.child-management-actions .btn, .child-management-actions .admin-cancel-btn { padding: 7px 10px; font-size: .88rem; }
.edit-child-form { margin-top: 20px; padding: 18px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.edit-child-form h3 { margin: 0 0 14px; }
.edit-child-form label { display: block; margin: 10px 0 6px; font-weight: 650; }
.edit-child-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.edit-child-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
@media (max-width: 640px) { .edit-child-fields { grid-template-columns: 1fr; } .child-management-actions { flex-direction: column; align-items: stretch; } }


/* Botão Meus afilhados: mesma paleta dourada do botão Quero apadrinhar */
.btn-my-sponsored {
  background: #f2c568;
  color: #174d35;
  border: 1px solid #f2c568;
}
.btn-my-sponsored:hover,
.btn-my-sponsored:focus-visible {
  background: #e9b94f;
  border-color: #e9b94f;
  color: #174d35;
}

/* A tela Meus afilhados deve ocupar toda a largura do conteúdo,
   diferente da grade de cartões das crianças. */
#mySponsoredCards {
  display: block;
  width: 100%;
  max-width: none;
  min-width: 0;
}
#mySponsoredCards .sponsored-table-wrap {
  display: block;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

/* Tabela da tela Meus afilhados */
.sponsored-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border, #e7e2d8);
  border-radius: 14px;
  background: #fff;
  -webkit-overflow-scrolling: touch;
}
.sponsored-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 680px;
}
.sponsored-table th,
.sponsored-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border, #e7e2d8);
  vertical-align: middle;
}
.sponsored-table th {
  background: #f7f3eb;
  color: var(--green, #176344);
  font-weight: 800;
  font-size: 13px;
  white-space: nowrap;
}
.sponsored-table td {
  color: var(--text, #222);
  font-size: 14px;
}
.sponsored-table tbody tr:last-child td { border-bottom: 0; }
.sponsored-table tbody tr:hover { background: #fcfaf5; }
.sponsored-child-name { font-weight: 700; }
.sponsored-letter-btn { white-space: nowrap; min-height: 38px; }
.sponsored-no-letter { color: var(--muted, #777); font-size: 13px; }


/* Seleção de presentes e atalho para o card do afilhado */
.chosen-gifts-fieldset { border: 1px solid var(--border, #d9e2dc); border-radius: 12px; padding: 14px; margin: 14px 0; min-width: 0; }
.chosen-gifts-fieldset legend { font-weight: 700; padding: 0 5px; }
.chosen-gifts-options { display: grid; gap: 10px; }
.gift-checkbox-option { display: flex; align-items: flex-start; gap: 10px; border: 1px solid #d9e2dc; border-radius: 10px; padding: 12px; cursor: pointer; }
.gift-checkbox-option:has(input:checked) { border-color: #176344; background: #f0f8f3; }
.gift-checkbox-option input { width: 18px; height: 18px; margin-top: 2px; accent-color: #176344; flex: 0 0 auto; }
.sponsored-card-highlight { outline: 3px solid #d5a72e; outline-offset: 4px; transition: outline-color .25s ease; }
.sponsored-card-link { white-space: nowrap; }

/* Modal de alteração das opções de presentes */
#giftEditBackdrop[hidden] { display: none !important; }
#giftEditBackdrop { z-index: 1001; }
#giftEditOptions { display: grid; gap: 10px; }
#giftEditForm .modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 18px; }


/* Navegação: todos os botões brancos; dourado apenas na tela ativa. */
.nav-actions > .btn {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
}
.nav-actions > .btn:hover,
.nav-actions > .btn:focus-visible {
  background: #fffaf0;
  border-color: var(--gold);
  color: var(--green);
}
.nav-actions > .btn.nav-active,
.nav-actions > .btn.nav-active:hover,
.nav-actions > .btn.nav-active:focus-visible {
  background: var(--gold);
  border-color: var(--gold);
  color: #174d35;
}


/* Versão 22: abas administrativas e acesso por e-mail/senha */
.admin-tabs { display:flex; flex-wrap:wrap; gap:8px; margin:18px 0 22px; padding-bottom:12px; border-bottom:1px solid var(--border, #e2e7e2); }
.admin-tab { appearance:none; border:1px solid var(--border, #dce4de); border-radius:10px; background:#fff; color:var(--green, #176344); padding:10px 15px; font:inherit; font-weight:750; cursor:pointer; transition:background .15s ease, color .15s ease, border-color .15s ease; }
.admin-tab:hover { border-color:#d8ad4e; }
.admin-tab.active, .admin-tab[aria-selected="true"] { background:#eabd61; border-color:#eabd61; color:#173f2e; }
.admin-users-section { margin:16px 0 22px; }
.admin-users-section h3 { margin:0 0 8px; }
.admin-users-section p { color:var(--muted, #66736b); font-size:13px; line-height:1.5; }
.admin-users-section table { min-width:680px; }
.text-link { border:0; padding:5px 0; background:transparent; color:var(--green, #176344); text-decoration:underline; font:inherit; font-weight:650; text-align:left; cursor:pointer; }
.auth-register-form .text-link { justify-self:start; }
@media (max-width:600px) { .admin-tabs { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); } .admin-tab { padding:10px 8px; } }


/* Aviso compacto do apadrinhamento e contatos — versão 13 */
.apadrinhamento-info {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 0 0 22px;
  padding: 16px 18px;
  border: 1px solid var(--green);
  border-left: 5px solid var(--green-dark);
  border-radius: 14px;
  background: linear-gradient(110deg, var(--green-dark) 0%, var(--green) 100%);
  color: #fff;
  box-shadow: var(--shadow);

  /* Fica logo abaixo do cabeçalho ao rolar a página. */
  position: sticky;
  top: 98px;
  z-index: 9;
}
.apadrinhamento-info-icon {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff0ce;
  font-size: 22px;
}
.apadrinhamento-info-content { min-width: 0; flex: 1; }
.apadrinhamento-info-content h3 {
  margin: 0 0 5px;
  color: #fff;
  font-size: 1.05rem;
  line-height: 1.3;
}
.apadrinhamento-info-content p {
  margin: 0;
  color: #fff;
  font-size: .94rem;
  line-height: 1.55;
}
.apadrinhamento-contact {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 11px;
}
.apadrinhamento-contact-label {
  color: var(--muted);
  font-size: .88rem;
}
.apadrinhamento-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 7px 11px;
  border-radius: 9px;
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
  transition: filter .15s ease, transform .15s ease;
}
.apadrinhamento-contact-link:hover {
  filter: brightness(.96);
  transform: translateY(-1px);
}
.instagram-contact {
  color: #9b285f;
  background: #fceaf3;
}
.whatsapp-contact {
  color: #17633a;
  background: #e5f6eb;
}
.apadrinhamento-contact-link span { font-size: 1.1rem; line-height: 1; }

@media (max-width: 600px) {
  .apadrinhamento-info {
    gap: 10px;
    margin-bottom: 18px;
    padding: 13px 12px;
    top: 145px;
  }
  .apadrinhamento-info-icon {
    flex-basis: 34px;
    width: 34px;
    height: 34px;
    font-size: 19px;
  }
  .apadrinhamento-info-content h3 { font-size: .98rem; }
  .apadrinhamento-info-content p { font-size: .88rem; }
  .apadrinhamento-contact {
    align-items: stretch;
    gap: 7px;
  }
  .apadrinhamento-contact-label { flex-basis: 100%; }
  .apadrinhamento-contact-link {
    width: fit-content;
    max-width: 100%;
    min-height: 34px;
    font-size: .85rem;
  }
}


/* Ação de cancelamento no card do afilhado */
.child-card-footer {
  flex-wrap: wrap;
}
.card-cancel-button {
  border: 0;
  background: transparent;
  color: var(--green-dark);
  text-decoration: underline;
  font: inherit;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  padding: 8px 4px;
}
.card-cancel-button:hover { color: var(--green); }


/* Versão 15: aviso verde escuro fixo abaixo do cabeçalho durante a rolagem. */
@media (max-width: 420px) {
  .apadrinhamento-info { top: 165px; }
}


/* Versão 16: menu sanduíche no celular e contatos compactos. */
.mobile-menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}
.mobile-menu-toggle span {
  display: block;
  width: 19px;
  height: 2px;
  border-radius: 2px;
  background: var(--green-dark);
}
@media (max-width: 650px) {
  .site-header .nav {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 70px;
    padding-block: 9px;
  }
  .site-header .brand { min-width: 0; flex: 1 1 auto; }
  .site-header .brand-logo { width: clamp(82px, 28vw, 110px); max-height: 42px; }
  .site-header .brand-divider { height: 31px; }
  .site-header .brand-title { font-size: 12px; line-height: 1.15; }
  .site-header .brand-title strong { font-size: 15px; }
  .mobile-menu-toggle { display: flex; }
  .site-header .nav-actions {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    margin: 0;
    padding: 12px 14px 14px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 10px 18px rgba(0,0,0,.08);
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .site-header.menu-open .nav-actions { display: flex; }
  .site-header .nav-actions .btn { width: 100%; flex: none; }
  .site-header .user-badge { width: 100%; max-width: none; }
  .apadrinhamento-info {
    top: 70px;
    gap: 9px;
    padding: 11px 12px;
    margin-bottom: 16px;
    border-radius: 12px;
  }
  .apadrinhamento-info-icon {
    flex-basis: 32px;
    width: 32px;
    height: 32px;
    font-size: 18px;
  }
  .apadrinhamento-info-content h3 { font-size: .92rem; margin-bottom: 3px; }
  .apadrinhamento-info-content p { font-size: .78rem; line-height: 1.35; }
  .apadrinhamento-contact {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    margin-top: 7px;
  }
  .apadrinhamento-contact-label { 
    flex: 1 1 auto;
    min-width: 0;
    font-size: .72rem;
    line-height: 1.2;
  }
  .apadrinhamento-contact-link {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    justify-content: center;
    border-radius: 9px;
    font-size: 0;
    gap: 0;
  }
  .apadrinhamento-contact-link span { font-size: 1.12rem; }
  .apadrinhamento-contact-link.instagram-contact,
  .apadrinhamento-contact-link.whatsapp-contact {
    color: #fff;
  }
  .apadrinhamento-contact-link.instagram-contact { background: #c13584; }
  .apadrinhamento-contact-link.whatsapp-contact { background: #25a366; }
}
@media (max-width: 380px) {
  .site-header .brand-logo { width: 76px; }
  .site-header .brand-title { font-size: 11px; }
  .site-header .brand-title strong { font-size: 14px; }
  .apadrinhamento-info { gap: 7px; padding: 10px; }
  .apadrinhamento-info-content p { font-size: .74rem; }
  .apadrinhamento-contact-label { font-size: .68rem; }
}

.contact-brand-icon { display: inline-flex; align-items: center; justify-content: center; }
.contact-brand-icon svg { display: block; width: 18px; height: 18px; }
@media (max-width: 650px) {
  .apadrinhamento-contact-link .contact-brand-icon svg { width: 20px; height: 20px; }
}


/* Mensagens de erro visíveis nos formulários de acesso. */
.login-status { min-height: 1.25em; margin: 8px 0; color: #a12622; font-weight: 600; line-height: 1.4; }
.login-status:empty { display: none; }
