/* Co'ti — páginas públicas (QR e área do responsável) */
:root {
  --brand: #0e7c86;
  --brand-dark: #095d65;
  --brand-light: #e3f3f4;
  --text: #1d2b36;
  --muted: #6b7c88;
  --border: #dde5ea;
  --danger: #c62828;
  --whatsapp: #1fa855;
  --call: #0e7c86;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--text); background: #f2f6f8; line-height: 1.5; font-size: 16px; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--brand); }
h1 { font-size: 1.45rem; margin: 0 0 .6rem; line-height: 1.25; }
h2 { font-size: 1.15rem; margin: 0 0 .6rem; }
.pub-header { background: var(--brand); padding: 14px 18px; text-align: center; }
.pub-brand { color: #fff; font-size: 1.5rem; font-weight: 800; text-decoration: none; letter-spacing: .01em; }
.pub-main { width: 100%; max-width: 560px; margin: 0 auto; padding: 18px 14px 32px; flex: 1; }
.pub-footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 16px; }
.pub-footer p { margin: 4px 0; }

.card { background: #fff; border-radius: var(--radius); padding: 20px; margin-bottom: 16px; box-shadow: 0 1px 4px rgba(16,42,60,.08); border: 1px solid var(--border); }
.card.narrow { max-width: 420px; margin-left: auto; margin-right: auto; }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: baseline; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.hint { color: var(--muted); font-size: .88rem; margin: 0 0 12px; }
.section-title { font-size: 1rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 22px 4px 10px; }

/* Formulário */
fieldset.card { margin: 0 0 16px; }
fieldset.card legend { font-weight: 700; font-size: 1.05rem; padding: 0 6px; margin-left: -6px; }
.field { display: flex; flex-direction: column; gap: 5px; margin: 14px 0 4px; }
.field > span { font-weight: 600; font-size: .92rem; }
input[type=text], input[type=email], input[type=password], input[type=tel], select, textarea {
  width: 100%; padding: 12px; border: 1px solid #c5d1d8; border-radius: 10px; font: inherit; font-size: 16px; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(14,124,134,.25); border-color: var(--brand); }
.phone-input { display: flex; gap: 8px; }
.phone-input select { width: 125px; flex-shrink: 0; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .85rem; }
.visibility { display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--brand-dark); background: var(--brand-light); padding: 6px 12px; border-radius: 99px; margin: 4px 0 6px; cursor: pointer; }
.visibility input { width: 18px; height: 18px; accent-color: var(--brand); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; cursor: pointer; }
.consent input { width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0; accent-color: var(--brand); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 12px; border: 1px solid transparent; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-secondary { background: var(--brand-light); color: var(--brand-dark); }
.btn-ghost { background: #fff; color: var(--text); border-color: var(--border); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-block { width: 100%; font-size: 1.05rem; padding: 15px; }
.btn[disabled] { opacity: .6; }

/* Alertas */
.alert { padding: 14px 16px; border-radius: 12px; margin-bottom: 16px; border: 1px solid; }
.alert-success { background: #e8f5e9; color: #1b5e20; border-color: #c3e6c5; }
.alert-error { background: #fdecea; color: #8e1c1c; border-color: #f5c2bf; }
.alert-warning { background: #fff4e0; color: #7a4a00; border-color: #f7d9a3; }
.alert-info { background: #e3f0fd; color: #0d47a1; border-color: #bcd8f6; }

/* Ficha pública */
.contact-card { padding: 0; overflow: hidden; }
.alert-banner { background: #fff4e0; color: #7a4a00; padding: 14px 18px; font-weight: 600; text-align: center; border-bottom: 1px solid #f7d9a3; }
.child-name { text-align: center; font-size: 1.9rem; margin: 20px 16px 6px; }
.info-list { margin: 10px 18px 6px; }
.info-list > div { padding: 12px 0; border-bottom: 1px solid var(--border); }
.info-list > div:last-child { border-bottom: 0; }
.info-list dt { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 2px; }
.info-list dd { margin: 0; font-size: 1.05rem; }
.info-list dd a { font-weight: 600; text-decoration: none; }
.info-medical { background: #fdecea; margin: 0 -18px; padding: 12px 18px !important; }
.info-medical dt { color: var(--danger); font-weight: 700; }
.action-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 16px 18px 6px; }
.action-buttons .btn { padding: 16px 12px; font-size: 1.05rem; border-radius: 14px; color: #fff; }
.action-buttons svg { width: 22px; height: 22px; }
.btn-call { background: var(--call); }
.btn-whatsapp { background: var(--whatsapp); }
.btn-login { grid-column: 1 / -1; background: #fff !important; color: var(--text) !important; border-color: var(--border) !important; font-weight: 600 !important; font-size: .95rem !important; padding: 12px !important; }
.contact-card .small { margin: 8px 0 16px; }

/* Área do cliente */
.qr-item { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; }
.qr-item-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.qr-item-actions .btn { padding: 9px 14px; font-size: .92rem; }
.tag { font-size: .75rem; padding: 2px 8px; border-radius: 99px; margin-left: 6px; }
.tag-red { background: #fdecea; color: var(--danger); }
.danger-zone { border-color: #f3c3c0; }
