/* Painel dos noivos — estilos fiéis ao protótipo (source/Painel Admin.dc.html).
   Breakpoint: 860px (editor empilha, menu de seções vira faixa rolável). */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: #eeece5; color: #2f3328; font-family: 'Jost', system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: #6b7358; text-decoration: none; }
a:hover { color: #2f3328; }
input, textarea, button, select { font-family: inherit; }
:focus-visible { outline: 2px solid #6b7358; outline-offset: 2px; border-radius: 3px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.hidden { display: none !important; }

/* ---------- login ---------- */
.login-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: #eeece5; }
.login-card { width: 100%; max-width: 380px; background: #f7f4ee; border: 1px solid rgba(47,51,40,.14); border-radius: 8px; padding: 36px 32px; text-align: center; animation: fadeUp .3s ease both; }
.login-card .eyebrow { margin: 0 0 8px; font-size: 10px; letter-spacing: .28em; text-transform: uppercase; color: #6f7162; }
.login-card h1 { margin: 0 0 6px; font-family: 'Playfair Display', serif; font-weight: 400; font-size: 30px; }
.login-card .sub { margin: 0 0 24px; font-size: 13.5px; color: #6b6d61; }
.login-card input { width: 100%; border: 1px solid rgba(47,51,40,.2); background: #fffdf8; border-radius: 6px; padding: 13px 14px; font-size: 15px; outline: none; text-align: center; }
.login-card input:focus { border-color: #6b7358; }
.login-error { margin: 10px 0 0; font-size: 12.5px; color: #95503f; }
.login-btn { width: 100%; margin-top: 16px; cursor: pointer; background: #2f3328; border: 1px solid #2f3328; color: #f7f4ee; border-radius: 999px; padding: 13px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.login-hint { margin: 18px 0 0; font-size: 11.5px; color: #7f8173; }

/* ---------- estrutura ---------- */
.admin { min-height: 100vh; display: flex; flex-direction: column; background: #eeece5; }
.admin-header { position: sticky; top: 0; z-index: 30; background: #f7f4ee; border-bottom: 1px solid rgba(47,51,40,.12); }
.admin-bar { max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px,3vw,28px); height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.admin-title { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.admin-title .names { font-family: 'Playfair Display', serif; font-size: 19px; white-space: nowrap; }
.admin-title .names .amp { font-style: italic; color: #6b7358; padding: 0 2px; }
.admin-title .tag { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: #6f7162; white-space: nowrap; }
.admin-actions { display: flex; align-items: center; gap: 10px; }
.db-badge { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; white-space: nowrap; background: rgba(47,51,40,.08); color: #6f7162; }
.db-badge.is-on { background: #dde4d1; color: #3f4635; }
.dirty-flag { font-size: 11.5px; color: #8a6a33; white-space: nowrap; }
.save-btn { cursor: pointer; border-radius: 999px; padding: 9px 20px; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; transition: all .2s; border: 1px solid rgba(47,51,40,.18); background: transparent; color: #8a8b7c; }
.save-btn.is-dirty { border-color: #6b7358; background: #6b7358; color: #f7f4ee; }
.view-site { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: #5d6055; white-space: nowrap; }
.logout-btn { background: none; border: none; cursor: pointer; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: #7f8173; }
.admin-tabs { max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px,3vw,28px) 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.tab { cursor: pointer; padding: 8px 14px; border-radius: 999px; font-size: 12.5px; letter-spacing: .06em; transition: all .2s; border: 1px solid rgba(47,51,40,.16); background: transparent; color: #54574c; }
.tab.is-active { border-color: #2f3328; background: #2f3328; color: #f7f4ee; }
.tab .badge { margin-left: 7px; font-size: 10px; padding: 2px 6px; border-radius: 999px; background: rgba(47,51,40,.09); }
.tab.is-active .badge { background: rgba(247,244,238,.22); }
.save-error { background: #f4e2dc; border-bottom: 1px solid rgba(149,80,63,.3); padding: 12px 20px; text-align: center; }
.save-error p { margin: 0; font-size: 13px; color: #8a4634; }
.admin-main { flex: 1; max-width: 1240px; width: 100%; margin: 0 auto; padding: clamp(18px,3vw,30px) clamp(16px,3vw,28px) 72px; }

/* ---------- aba conteúdo ---------- */
.content-grid { display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: start; }
.content-aside { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 124px; }
.section-btn { cursor: pointer; text-align: left; white-space: nowrap; padding: 10px 13px; border-radius: 6px; font-size: 13px; transition: all .2s; border: none; background: transparent; color: #5d6055; }
.section-btn.is-active { background: #e3e1d4; color: #2f3328; font-weight: 500; }
.editor { min-width: 0; animation: fadeIn .2s ease both; }
.editor-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.editor-head h2 { margin: 0; font-family: 'Playfair Display', serif; font-weight: 400; font-size: 26px; }
.editor-head p { margin: 0; font-size: 12.5px; color: #6f7162; }
.card { background: #f7f4ee; border: 1px solid rgba(47,51,40,.12); border-radius: 8px; padding: clamp(16px,2.5vw,24px); margin-bottom: 18px; }
.card--group { padding: clamp(16px,2.5vw,22px); margin-bottom: 12px; }
.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.f-wrap { display: block; }
.f-wrap.full { grid-column: 1 / -1; }
.f-label { display: block; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: #6f7162; }
.f-input { width: 100%; margin-top: 7px; border: 1px solid rgba(47,51,40,.18); background: #fffdf8; border-radius: 6px; padding: 11px 12px; font-size: 14px; color: #2f3328; outline: none; }
.f-input:focus { border-color: #6b7358; }
.f-area { width: 100%; margin-top: 7px; border: 1px solid rgba(47,51,40,.18); background: #fffdf8; border-radius: 6px; padding: 11px 12px; font-size: 14px; line-height: 1.55; color: #2f3328; outline: none; resize: vertical; }
.f-area:focus { border-color: #6b7358; }
.f-img-row { display: flex; gap: 12px; align-items: flex-start; margin-top: 7px; }
.f-img-preview { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; border: 1px solid rgba(47,51,40,.16); flex: none; display: block; }
.f-img-preview.big { width: 72px; height: 72px; }
.f-img-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.f-img-col .f-input { margin-top: 0; font-size: 13.5px; }
.f-img-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.upload-label { cursor: pointer; border: 1px solid rgba(47,51,40,.22); border-radius: 999px; padding: 8px 16px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #2f3328; }
.upload-label input { display: none; }
.remove-img { cursor: pointer; background: none; border: 1px solid rgba(149,80,63,.32); color: #95503f; border-radius: 999px; padding: 8px 16px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.group-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.group-head .g-title { margin: 0; font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: #5d6547; }
.group-tools { display: flex; gap: 6px; }
.move-btn { cursor: pointer; background: none; border: 1px solid rgba(47,51,40,.18); color: #5d6055; border-radius: 6px; width: 30px; height: 30px; font-size: 12px; }
.del-btn { cursor: pointer; background: none; border: 1px solid rgba(149,80,63,.35); color: #95503f; border-radius: 6px; width: 30px; height: 30px; font-size: 13px; }
.add-inline { margin-top: 12px; cursor: pointer; background: none; border: 1px dashed rgba(47,51,40,.28); color: #5d6055; border-radius: 6px; padding: 9px 14px; font-size: 12px; }
.add-big { cursor: pointer; width: 100%; background: none; border: 1px dashed rgba(47,51,40,.3); color: #54574c; border-radius: 8px; padding: 14px; font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; }

/* convidados */
.guest-check { display: flex; align-items: flex-start; gap: 11px; cursor: pointer; }
.guest-check input { width: 17px; height: 17px; margin-top: 2px; accent-color: #6b7358; }
.guest-check .t1 { display: block; font-size: 14px; color: #2f3328; }
.guest-check .t2 { display: block; margin-top: 3px; font-size: 12.5px; line-height: 1.55; color: #6b6d61; }
.card .divider { height: 1px; background: rgba(47,51,40,.12); margin: 18px 0; }
.bulk-label { margin: 0 0 8px; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: #6f7162; }
.bulk-help { margin: 0 0 10px; font-size: 12.5px; line-height: 1.6; color: #6b6d61; }
.bulk-help .ex { color: #2f3328; }
.bulk-area { width: 100%; border: 1px solid rgba(47,51,40,.18); background: #fffdf8; border-radius: 6px; padding: 12px; font-size: 14px; line-height: 1.6; outline: none; resize: vertical; }
.bulk-area:focus { border-color: #6b7358; }
.bulk-btn { margin-top: 10px; cursor: pointer; background: #2f3328; border: 1px solid #2f3328; color: #f7f4ee; border-radius: 999px; padding: 11px 22px; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; }
.bulk-msg { margin: 10px 0 0; font-size: 12.5px; color: #5d6547; }

@media (max-width: 859.98px) {
  .content-grid { display: flex; flex-direction: column; gap: 16px; }
  .content-aside { flex-direction: row; gap: 6px; overflow-x: auto; padding-bottom: 4px; position: static; }
  .field-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
}

/* ---------- aba respostas ---------- */
.tab-pane { animation: fadeIn .2s ease both; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: #f7f4ee; border: 1px solid rgba(47,51,40,.12); border-radius: 8px; padding: 18px 20px; }
.stat .label { margin: 0 0 6px; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: #6f7162; }
.stat .value { margin: 0; font-family: 'Playfair Display', serif; font-size: 34px; line-height: 1; color: #2f3328; }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.list-head h2 { margin: 0; font-family: 'Playfair Display', serif; font-weight: 400; font-size: 24px; }
.list-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.list-meta { font-size: 12.5px; color: #6f7162; }
.search-input { border: 1px solid rgba(47,51,40,.2); background: #f7f4ee; border-radius: 999px; padding: 10px 16px; font-size: 13.5px; outline: none; min-width: 220px; }
.search-input:focus { border-color: #6b7358; }
.export-btn { cursor: pointer; background: none; border: 1px solid rgba(47,51,40,.22); color: #2f3328; border-radius: 999px; padding: 9px 18px; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.filter { cursor: pointer; padding: 7px 14px; border-radius: 999px; font-size: 12px; transition: all .2s; border: 1px solid rgba(47,51,40,.15); background: transparent; color: #5d6055; }
.filter.is-active { border-color: #6b7358; background: #e3e6d6; color: #3f4635; }
.empty-box { background: #f7f4ee; border: 1px dashed rgba(47,51,40,.2); border-radius: 8px; padding: 44px; text-align: center; color: #6f7162; font-size: 14px; }
.rsvp-card { background: #f7f4ee; border: 1px solid rgba(47,51,40,.12); border-radius: 8px; padding: 16px 18px; margin-bottom: 8px; }
.rsvp-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.rsvp-id { min-width: 0; }
.rsvp-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pill { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; background: #eddcd7; color: #8a4634; }
.pill.is-yes { background: #dde4d1; color: #3f4635; }
.rsvp-name { margin: 0; font-family: 'Playfair Display', serif; font-size: 20px; }
.rsvp-phone { font-size: 12.5px; }
.rsvp-meta { margin: 7px 0 0; font-size: 13px; color: #54574c; }
.rsvp-msg { margin: 8px 0 0; font-family: 'Playfair Display', serif; font-style: italic; font-size: 15px; color: #5d6547; line-height: 1.5; }
.rsvp-side { display: flex; align-items: center; gap: 12px; }
.rsvp-date { font-size: 11.5px; color: #7f8173; white-space: nowrap; }
.rsvp-del { cursor: pointer; background: none; border: 1px solid rgba(149,80,63,.3); color: #95503f; border-radius: 6px; width: 28px; height: 28px; font-size: 13px; }
.pending-wrap { margin-top: 28px; }
.pending-box { background: #f7f4ee; border: 1px solid rgba(47,51,40,.12); border-radius: 8px; padding: 8px; }
.pending-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; border-bottom: 1px solid rgba(47,51,40,.07); }
.pending-row .p-name { font-size: 14px; color: #2f3328; }
.pending-row .p-seats { font-size: 12px; color: #6f7162; }

/* ---------- aba votos ---------- */
.vote-card { background: #f7f4ee; border: 1px solid rgba(47,51,40,.12); border-radius: 8px; padding: 20px; margin-bottom: 12px; }
.vote-card .c-name { margin: 0 0 14px; font-family: 'Playfair Display', serif; font-size: 20px; }
.tally-row { margin-bottom: 12px; }
.tally-top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 5px; }
.tally-name { font-size: 14px; color: #5d6055; font-weight: 400; }
.tally-name.is-top { color: #2f3328; font-weight: 500; }
.tally-count { font-size: 12.5px; color: #6f7162; }
.tally-track { height: 8px; border-radius: 4px; background: rgba(47,51,40,.08); overflow: hidden; }
.tally-bar { height: 100%; border-radius: 4px; background: rgba(107,115,88,.35); transition: width .3s; }
.tally-bar.is-top { background: #6b7358; }

/* ---------- aba presentes ---------- */
.res-card { background: #f7f4ee; border: 1px solid rgba(47,51,40,.12); border-radius: 8px; padding: 14px 18px; margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.res-card .g-name { margin: 0; font-family: 'Playfair Display', serif; font-size: 19px; }
.res-card .g-by { margin: 4px 0 0; font-size: 13px; color: #54574c; }
.free-btn { cursor: pointer; background: none; border: 1px solid rgba(47,51,40,.22); color: #54574c; border-radius: 999px; padding: 9px 16px; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; }

/* ---------- aba ajustes ---------- */
.settings { max-width: 620px; animation: fadeIn .2s ease both; display: flex; flex-direction: column; gap: 14px; }
.settings .card { margin-bottom: 0; padding: 22px; }
.settings h2 { margin: 0 0 4px; font-family: 'Playfair Display', serif; font-weight: 400; font-size: 22px; }
.card-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-row h2 { margin: 0; }
.card-sub { margin: 8px 0 18px; font-size: 13px; line-height: 1.6; color: #6b6d61; }
.card-sub--tight { margin: 0 0 16px; }
.db-fields { display: flex; flex-direction: column; gap: 12px; }
.db-fields label { display: block; }
.k-label { display: block; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: #6f7162; }
.k-note { display: block; margin-top: 3px; font-size: 12px; line-height: 1.5; color: #6b6d61; }
.k-note.warn { color: #8a6a33; }
.db-fields input { width: 100%; margin-top: 6px; border: 1px solid rgba(47,51,40,.18); background: #fffdf8; border-radius: 6px; padding: 12px 13px; font-size: 13.5px; outline: none; }
.db-fields input:focus { border-color: #6b7358; }
.db-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.db-primary { cursor: pointer; background: #2f3328; border: 1px solid #2f3328; color: #f7f4ee; border-radius: 999px; padding: 11px 22px; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; }
.db-secondary { cursor: pointer; background: none; border: 1px solid rgba(47,51,40,.22); color: #2f3328; border-radius: 999px; padding: 11px 20px; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; }
.db-danger { cursor: pointer; background: none; border: 1px solid rgba(149,80,63,.35); color: #95503f; border-radius: 999px; padding: 11px 20px; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; }
.db-busy { margin: 12px 0 0; font-size: 12.5px; color: #6f7162; }
.db-msg { margin: 10px 0 0; font-size: 12.5px; line-height: 1.6; color: #5d6547; }
.sync-msg { margin: 6px 0 0; font-size: 12.5px; line-height: 1.6; color: #5d6547; }
.sql-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.sql-head p { margin: 0; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: #6f7162; }
.copy-sql { cursor: pointer; background: none; border: 1px solid rgba(47,51,40,.2); color: #2f3328; border-radius: 999px; padding: 7px 14px; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; }
.sql-area { width: 100%; border: 1px solid rgba(47,51,40,.14); background: #f1efe7; border-radius: 6px; padding: 12px; font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; line-height: 1.6; color: #54574c; outline: none; resize: vertical; }
.pw-input { width: 100%; border: 1px solid rgba(47,51,40,.18); background: #fffdf8; border-radius: 6px; padding: 12px 13px; font-size: 14px; outline: none; }
.pw-input:focus { border-color: #6b7358; }
.pw-btn { margin-top: 12px; cursor: pointer; background: #2f3328; border: 1px solid #2f3328; color: #f7f4ee; border-radius: 999px; padding: 11px 22px; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; }
.pw-saved { margin: 10px 0 0; font-size: 12.5px; color: #5d6547; }
.danger-btn { cursor: pointer; background: none; border: 1px solid rgba(149,80,63,.4); color: #95503f; border-radius: 999px; padding: 11px 22px; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; }
.settings-foot { margin: 4px 0 0; font-size: 12px; line-height: 1.6; color: #7f8173; }

/* ---------- convidados: duas listas ---------- */
.guest-list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.guest-list-head .g-title { margin: 0; font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: #5d6547; }
.guest-list-head .g-count { font-size: 12px; color: #6f7162; }
.guest-empty { margin: 0 0 12px; font-size: 13px; color: #7f8173; }

.guest-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) 72px 120px 168px auto auto;
  gap: 8px; align-items: center;
  padding: 10px 0; border-top: 1px solid rgba(47,51,40,.09);
}
.guest-row.is-dup { background: #f9f1e8; }
.guest-row input, .guest-row select {
  border: 1px solid rgba(47,51,40,.18); background: #fffdf8; border-radius: 6px;
  padding: 9px 10px; font-size: 13.5px; color: #2f3328; outline: none; min-width: 0;
}
.guest-row input:focus, .guest-row select:focus { border-color: #6b7358; }
.guest-row .g-name { font-size: 14px; }
.guest-row .g-seats { text-align: center; }
.g-link {
  cursor: pointer; background: none; border: 1px solid rgba(47,51,40,.22); color: #2f3328;
  border-radius: 999px; padding: 8px 14px; font-size: 10.5px; letter-spacing: .1em;
  text-transform: uppercase; white-space: nowrap;
}
.g-link:hover { border-color: #6b7358; color: #6b7358; }
.g-del {
  cursor: pointer; background: none; border: 1px solid rgba(149,80,63,.3); color: #95503f;
  border-radius: 6px; width: 30px; height: 30px; font-size: 13px; flex: none;
}
.g-code {
  grid-column: 1 / -1; margin: 0; padding-left: 2px;
  font-family: ui-monospace, Menlo, monospace; font-size: 11px; color: #8a8b7c;
}
.g-code.is-dup { color: #8a6a33; }

.bulk-side { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.bulk-side select {
  border: 1px solid rgba(47,51,40,.18); background: #fffdf8; border-radius: 6px;
  padding: 8px 10px; font-size: 13.5px; color: #2f3328; outline: none;
}
.bulk-side select:focus { border-color: #6b7358; }

@media (max-width: 859.98px) {
  .guest-row { grid-template-columns: minmax(0,1fr) 64px; grid-auto-flow: row; }
  .guest-row .g-side, .guest-row .g-role { grid-column: span 1; }
  .g-link { grid-column: 1 / 2; }
  .g-del { grid-column: 2 / 3; justify-self: end; }
}

/* ---------- publicar recado no site ---------- */
.pub-btn {
  margin-top: 10px; cursor: pointer; background: none;
  border: 1px solid rgba(47,51,40,.22); color: #54574c;
  border-radius: 999px; padding: 7px 14px;
  font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; transition: all .2s;
}
.pub-btn:hover { border-color: #6b7358; color: #6b7358; }
.pub-btn.is-on { background: #dde4d1; border-color: #6b7358; color: #3f4635; }
