:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --surface-2: #f3eee6;
  --text: #2d2a26;
  --muted: #7a726a;
  --border: #e6dfd4;
  --primary: #8a6a4f;
  --primary-2: #b08d6e;
  --sage: #7d9478;
  --rose: #c98b8b;
  --gold: #c2a14d;
  --danger: #b5544c;
  --ok: #5f8a5a;
  --shadow: 0 1px 2px rgba(45, 42, 38, .06), 0 4px 16px rgba(45, 42, 38, .05);
  --radius: 14px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  font-family: Inter, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}
h1, h2, h3, .serif { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; margin: 0; }
h1 { font-size: 30px; }
h2 { font-size: 24px; }
h3 { font-size: 20px; }
a { color: var(--primary); }

.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px; flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: flex; gap: 10px; align-items: center; padding: 22px 18px; border-bottom: 1px solid var(--border); }
.brand-mark { font-size: 24px; color: #d9474f; line-height: 1; }
.ico { width: 20px; height: 20px; flex-shrink: 0; }
nav a .ico { color: var(--muted); }
nav a.active .ico { color: #fff; }
.brand-name { font-family: "Cormorant Garamond", serif; font-size: 24px; font-weight: 700; line-height: 1; }
.brand-sub { font-size: 12px; color: var(--muted); }
nav { padding: 10px; flex: 1; }
nav a {
  display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 10px;
  color: var(--text); text-decoration: none; font-weight: 500;
}
nav a:hover { background: var(--surface-2); }
nav a.active { background: var(--primary); color: #fff; }
nav .nav-sep { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 14px 12px 4px; }
.sidebar-foot { padding: 12px; display: grid; gap: 6px; border-top: 1px solid var(--border); }

.content { flex: 1; min-width: 0; }
.topbar {
  display: flex; align-items: center; gap: 14px; padding: 18px 28px; border-bottom: 1px solid var(--border);
  background: var(--bg); position: sticky; top: 0; z-index: 5;
}
.topbar h1 { flex: 1; }
.menu-btn { display: none; }
.countdown { color: var(--muted); font-size: 14px; }
.countdown b { color: var(--primary); font-size: 18px; }
main { padding: 24px 28px 60px; max-width: 1280px; }

/* Cards & grids */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.stat .label { color: var(--muted); font-size: 13px; }
.stat .value { font-family: "Cormorant Garamond", serif; font-size: 34px; font-weight: 700; line-height: 1.1; }
.stat .hint { font-size: 12px; color: var(--muted); }
.section { margin-top: 26px; }
.section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.section-head h2, .section-head h3 { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

/* Buttons & inputs */
.btn {
  border: 1px solid var(--primary); background: var(--primary); color: #fff; border-radius: 10px;
  padding: 9px 14px; font: inherit; font-weight: 500; cursor: pointer; display: inline-flex; gap: 6px; align-items: center;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sage { background: var(--sage); border-color: var(--sage); }
.btn.danger { background: transparent; color: var(--danger); border-color: transparent; }
.btn.danger:hover { background: #f7e7e5; }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
input, select, textarea {
  font: inherit; color: var(--text); background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 8px 10px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary-2); outline-offset: -1px; }
input[type=checkbox] { width: auto; accent-color: var(--primary); }
.field { display: grid; gap: 4px; margin-bottom: 12px; }
.field label { font-size: 13px; font-weight: 500; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.form-grid .full { grid-column: 1 / -1; }
.inline-select { width: auto; padding: 4px 8px; font-size: 13px; }

/* Tabs / chips */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab {
  border: 1px solid var(--border); background: var(--surface); padding: 8px 14px; border-radius: 999px; cursor: pointer;
  font: inherit; font-weight: 500;
}
.tab.active { background: var(--text); color: #fff; border-color: var(--text); }
.tab .count { opacity: .7; margin-left: 4px; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-2); }
.badge.A { background: #e9d9c8; color: #6b4a2e; }
.badge.B { background: #dfe8db; color: #3f5a3b; }
.badge.C { background: #efdcdc; color: #7d3f3f; }
.badge.ok { background: #e2efdf; color: var(--ok); }
.badge.warn { background: #f7edd5; color: #8a6a1d; }
.badge.no { background: #f5e2e0; color: var(--danger); }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
tr:hover td { background: #fcfaf7; }
tr.ativa td { background: var(--surface-2); }

/* Progress */
.progress { height: 10px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--sage); border-radius: 99px; }
.progress.over > span { background: var(--danger); }

/* Nested lists diagram */
.nest { border-radius: 16px; padding: 12px; }
.nest.C { background: #f7ecec; border: 1px dashed var(--rose); }
.nest.B { background: #eef3ec; border: 1px dashed var(--sage); margin-top: 8px; }
.nest.A { background: #f3e9df; border: 1px dashed var(--primary-2); margin-top: 8px; }
.nest-title { font-weight: 600; font-size: 13px; }

/* Comparison */
.compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.quote { position: relative; }
.quote.best { border-color: var(--sage); box-shadow: 0 0 0 2px var(--sage) inset, var(--shadow); }
.quote.chosen { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold) inset, var(--shadow); }
.quote.discarded { opacity: .55; }
.quote .price { font-family: "Cormorant Garamond", serif; font-size: 32px; font-weight: 700; }
.quote dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; font-size: 13px; margin: 10px 0; }
.quote dt { color: var(--muted); }
.quote dd { margin: 0; }
.ribbon { position: absolute; top: 12px; right: 12px; }
.stars { color: var(--gold); letter-spacing: 2px; cursor: pointer; }

/* Seating */
.seating { display: grid; grid-template-columns: 280px 1fr; gap: 16px; align-items: start; }
.pool { position: sticky; top: 90px; max-height: calc(100vh - 110px); overflow-y: auto; }
.guest-chip {
  display: flex; align-items: center; gap: 6px; padding: 6px 10px; background: var(--surface-2); border-radius: 10px;
  margin-bottom: 6px; cursor: grab; font-size: 14px; border: 1px solid transparent;
}
.guest-chip:hover { border-color: var(--primary-2); }
.guest-chip .grp { font-size: 11px; color: var(--muted); margin-left: auto; }
.tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.table-card { min-height: 200px; transition: background .15s; }
.table-card.drop { background: #f1f6ef; border-color: var(--sage); }
.table-card.full .table-cap { color: var(--danger); }
.table-visual { width: 84px; height: 84px; border-radius: 50%; margin: 6px auto 10px; position: relative; background: var(--surface-2); border: 2px solid var(--primary-2); display: grid; place-items: center; font-weight: 600; }
.seat { position: absolute; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid var(--primary-2); transform: translate(-50%, -50%); }
.seat.taken { background: var(--sage); border-color: var(--sage); }
.pool.drop { outline: 2px dashed var(--sage); }

/* Checklist */
.check-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 4px; border-bottom: 1px solid var(--border); }
.check-item.done .txt { text-decoration: line-through; color: var(--muted); }
.check-item .txt { flex: 1; }
.check-item input { margin-top: 4px; }

/* Gifts */
.gift { display: flex; flex-direction: column; gap: 8px; }
.gift-img { aspect-ratio: 4 / 3; border-radius: 10px; background: var(--surface-2) center / cover no-repeat; display: grid; place-items: center; font-size: 42px; }
.gift .price { font-family: "Cormorant Garamond", serif; font-size: 26px; font-weight: 700; }
.pix-box { text-align: center; }
.pix-box #qrcode { display: inline-block; padding: 10px; background: #fff; border-radius: 12px; border: 1px solid var(--border); margin: 8px 0; }
.pix-code { font-family: ui-monospace, monospace; font-size: 11px; word-break: break-all; background: var(--surface-2); padding: 10px; border-radius: 10px; text-align: left; }
.pay-tabs { display: flex; gap: 6px; justify-content: center; margin-bottom: 12px; }

/* Guest site */
.site-hero {
  text-align: center; padding: 56px 20px; border-radius: 20px; color: #fff;
  background: linear-gradient(135deg, #8a6a4f, #c98b8b);
}
.site-hero h1 { font-size: 52px; font-weight: 600; }
.site-hero .date { letter-spacing: .2em; text-transform: uppercase; font-size: 14px; margin-top: 8px; }
.site-count { display: flex; justify-content: center; gap: 22px; margin-top: 22px; }
.site-count div { font-family: "Cormorant Garamond", serif; font-size: 38px; font-weight: 700; line-height: 1; }
.site-count span { display: block; font-family: Inter, sans-serif; font-size: 11px; letter-spacing: .1em; opacity: .9; }
.banner { background: #f7edd5; border: 1px solid #ecdcb0; color: #6d5417; padding: 10px 14px; border-radius: 12px; font-size: 14px; margin-bottom: 16px; }

/* Timeline (cronograma) */
.timeline { border-left: 2px solid var(--border); margin-left: 8px; padding-left: 18px; }
.tl-item { --cor: var(--primary); position: relative; padding: 6px 0 14px; display: flex; gap: 10px; align-items: baseline; }
.tl-item::before { content: ""; position: absolute; left: -25px; top: 12px; width: 10px; height: 10px; border-radius: 50%; background: var(--cor); }
.tl-time { font-weight: 700; color: var(--cor); min-width: 52px; }
.lanes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.lane { border-top: 4px solid var(--cor); }
.lane-head { margin-bottom: 10px; }
.lane-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--cor); }

/* Convidados: matriz lista × lado, resumo e tabela agrupada */
.conv-top { display: grid; grid-template-columns: 1fr 260px; gap: 24px; align-items: start; }
.matrix { display: grid; grid-template-columns: minmax(150px, auto) repeat(var(--cols), 1fr); gap: 6px; align-items: center; }
.mx-head { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; text-align: center; padding: 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-head.tot { color: var(--text); }
.mx-row { display: flex; gap: 8px; align-items: center; }
.mx-desc { font-size: 12px; color: var(--muted); }
.mx-cell {
  font: inherit; font-size: 18px; font-weight: 600; font-family: "Cormorant Garamond", serif; color: var(--text);
  background: var(--surface-2); border: 1px solid transparent; border-radius: 10px; padding: 8px 4px; cursor: pointer; text-align: center;
}
.mx-cell:hover { border-color: var(--primary-2); background: #efe4d8; }
.mx-cell.tot { background: #ece6dc; font-weight: 700; }
.mx-cell.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.resumo { background: var(--surface-2); border-radius: 12px; padding: 16px; }
.resumo-sel { font-size: 13px; color: var(--muted); }
.resumo-num { font-family: "Cormorant Garamond", serif; font-size: 46px; font-weight: 700; line-height: 1; margin: 6px 0 10px; }
.resumo-num span { font-family: Inter, sans-serif; font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 6px; }
.rsvp-bar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: #e3ddd3; gap: 2px; }
.rsvp-bar .ok, .rsvp-legend i.ok { background: var(--sage); }
.rsvp-bar .pend, .rsvp-legend i.pend { background: var(--gold); }
.rsvp-bar .no, .rsvp-legend i.no { background: var(--rose); }
.rsvp-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; color: var(--muted); }
.rsvp-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.conv-table thead th { position: sticky; top: 0; background: var(--surface); }
.group-row td { background: var(--bg); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; color: var(--primary); padding-top: 14px; }
.group-row:hover td { background: var(--bg); }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions .btn { opacity: .5; }
tr:hover .row-actions .btn { opacity: 1; }
.inline-select.pill-A { background: #e9d9c8; border-color: transparent; font-weight: 600; }
.inline-select.pill-B { background: #dfe8db; border-color: transparent; font-weight: 600; }
.inline-select.pill-C { background: #efdcdc; border-color: transparent; font-weight: 600; }
.inline-select.rsvp-confirmado { color: var(--ok); border-color: #cfe0cb; }
.inline-select.rsvp-recusado { color: var(--danger); border-color: #ecd0cd; }
@media (max-width: 1000px) { .conv-top { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .matrix { grid-template-columns: auto repeat(var(--cols), 1fr); gap: 4px; } .mx-desc { display: none; } .mx-cell { font-size: 15px; padding: 6px 2px; } .mx-head { font-size: 10px; white-space: normal; line-height: 1.2; } }

/* Convidados: filtros rápidos e linhas visuais */
.chips { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-bottom: 12px; }
.chip-group { display: flex; gap: 4px; }
.chip { font: inherit; font-size: 13px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; color: var(--text); }
.chip:hover { border-color: var(--primary-2); }
.chip.on { background: var(--text); color: #fff; border-color: var(--text); }
.chip .count { opacity: .6; margin-left: 5px; font-size: 12px; }
.guest-cell { display: flex; gap: 10px; align-items: center; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex-shrink: 0; color: #fff; }
.avatar.lado-noiva { background: var(--rose); }
.avatar.lado-noivo { background: var(--primary); }
.avatar.lado-ambos { background: var(--sage); }
.pills { display: inline-flex; gap: 2px; }
.pill { font: inherit; font-size: 12px; font-weight: 700; width: 26px; height: 26px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; }
.pill:hover { background: var(--surface-2); }
.pill.on.A { background: #e9d9c8; color: #6b4a2e; }
.pill.on.B { background: #dfe8db; color: #3f5a3b; }
.pill.on.C { background: #efdcdc; color: #7d3f3f; }
.link-btn { font: inherit; font-size: 13px; background: none; border: 0; padding: 4px 8px; border-radius: 8px; cursor: pointer; color: var(--text); }
.link-btn:hover { background: var(--surface-2); }
.lado-txt.lado-noiva { color: #a86a6a; } .lado-txt.lado-noivo { color: var(--primary); } .lado-txt.lado-ambos { color: #4f6b4b; }
.rsvp-btn { font: inherit; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; color: var(--text); }
.rsvp-btn i { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.rsvp-btn.rsvp-confirmado { color: var(--ok); border-color: #cfe0cb; background: #f1f7ef; } .rsvp-btn.rsvp-confirmado i { background: var(--sage); }
.rsvp-btn.rsvp-recusado { color: var(--danger); border-color: #ecd0cd; background: #faf0ef; } .rsvp-btn.rsvp-recusado i { background: var(--rose); }
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable:hover, th.sortable.on { color: var(--primary); }

/* Checklist: ordenação e arrastar entre fases */
.check-tools { opacity: .35; }
.check-item:hover .check-tools { opacity: 1; }
.check-item.dragging { opacity: .4; }
[data-fase-drop].drop { outline: 2px dashed var(--sage); }
.check-tools .inline-select { max-width: 150px; }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(30, 25, 20, .45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal-backdrop[hidden] { display: none; }
.modal { background: var(--surface); border-radius: 18px; width: min(560px, 100%); max-height: 90vh; overflow-y: auto; padding: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.modal-head { display: flex; align-items: center; margin-bottom: 14px; }
.modal-head h2 { flex: 1; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

.empty { text-align: center; padding: 30px; color: var(--muted); }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--text); color: #fff; padding: 10px 18px; border-radius: 12px; z-index: 60; font-size: 14px; }

@media (max-width: 900px) {
  .sidebar { position: fixed; left: -260px; z-index: 40; transition: left .2s; box-shadow: var(--shadow); }
  .sidebar.open { left: 0; }
  .menu-btn { display: inline-flex; }
  main { padding: 16px; }
  .topbar { padding: 12px 16px; }
  .topbar h1 { font-size: 24px; }
  .countdown { display: none; }
  .seating { grid-template-columns: 1fr; }
  .pool { position: static; max-height: 300px; }
  .form-grid { grid-template-columns: 1fr; }
  .site-hero h1 { font-size: 36px; }
}
.lado-chip i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; vertical-align: 0; }
.lado-chip.lado-noiva i { background: var(--rose); }
.lado-chip.lado-noivo i { background: var(--primary); }
.lado-chip.lado-ambos i { background: var(--sage); }
.lado-chip.on.lado-noiva { background: var(--rose); border-color: var(--rose); }
.lado-chip.on.lado-noivo { background: var(--primary); border-color: var(--primary); }
.lado-chip.on.lado-ambos { background: var(--sage); border-color: var(--sage); }
.lado-chip.on i { background: #fff; }

/* Login / entrada */
.auth { position: fixed; inset: 0; z-index: 100; background: var(--bg); display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.auth[hidden] { display: none; }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 28px; width: min(420px, 100%); box-shadow: var(--shadow); }
.auth-card h2 { text-align: center; margin-bottom: 4px; }
.auth-card .sub { text-align: center; color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.auth-card .btn { width: 100%; justify-content: center; }
.auth-sep { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 16px 0; }
.auth-sep::before, .auth-sep::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.auth-social { display: grid; gap: 8px; }
.auth-social .btn { background: var(--surface); color: var(--text); border-color: var(--border); }
.auth-social .btn:hover { background: var(--surface-2); }
.auth-links { text-align: center; font-size: 13px; margin-top: 14px; color: var(--muted); }
.auth-links a { cursor: pointer; color: var(--primary); text-decoration: underline; }
.auth-erro { background: #f7e7e5; color: var(--danger); padding: 8px 12px; border-radius: 10px; font-size: 13px; margin-bottom: 12px; }
.auth-ok { background: #e2efdf; color: var(--ok); padding: 8px 12px; border-radius: 10px; font-size: 13px; margin-bottom: 12px; }

/* Onboarding */
.onb-steps { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.onb-steps span { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.onb-steps span.on { background: var(--primary); color: #fff; }
.onb-steps span.done { background: #e2efdf; color: var(--ok); }
.check-item { cursor: pointer; }
.brand-name { font-size: 21px; }

/* Editor do site dos convidados */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 46%); gap: 18px; align-items: start; }
.preview-col { position: sticky; top: 90px; }
.preview-head { margin-bottom: 8px; }
.preview-head .btn.on { background: var(--surface-2); }
.preview-frame { background: #e9e3da; border-radius: 16px; padding: 10px; border: 1px solid var(--border); }
.preview-frame iframe { width: 100%; height: calc(100vh - 190px); min-height: 520px; border: 0; border-radius: 10px; background: #fff; display: block; }
.preview-frame.mobile iframe { width: 390px; max-width: 100%; margin: 0 auto; }
.galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.modelo { font: inherit; border: 2px solid transparent; background: var(--surface); border-radius: 12px; padding: 6px; cursor: pointer; text-align: center; color: var(--text); }
.modelo:hover { border-color: var(--primary-2); }
.modelo.on { border-color: var(--primary); box-shadow: 0 0 0 3px #efe4d8; }
.modelo .mini { display: grid; place-items: center; gap: 4px; aspect-ratio: 4 / 3; border-radius: 8px; background: var(--bg); color: var(--text); border: 1px solid rgba(0,0,0,.06); }
.modelo .mini i { width: 40%; height: 2px; background: var(--accent); }
.modelo .mini b { font-family: var(--ft); font-size: 22px; font-weight: 600; }
.modelo .mini em { width: 55%; height: 6px; border-radius: 3px; background: var(--accent2); }
.modelo .mini.ab { background: var(--surface-2); position: relative; }
.modelo .ab-ico { font-size: 34px; }
.modelo .luz-dot { position: absolute; right: 8px; bottom: 8px; width: 14px; height: 14px; border-radius: 50%; background: var(--luz); box-shadow: 0 0 8px var(--luz); border: 1px solid rgba(0,0,0,.1); }
.modelo .nome { display: block; font-size: 11px; margin-top: 5px; color: var(--muted); line-height: 1.2; }
.cores-grid { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; }
.cores-grid label { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.cores-grid input[type=color] { width: 36px; height: 30px; padding: 2px; border-radius: 8px; }
@media (max-width: 1100px) { .editor { grid-template-columns: 1fr; } .preview-col { position: static; } .preview-frame iframe { height: 560px; } }

.mp-card { background: #f4f7f3; border-color: #cfe0cb; margin-bottom: 14px; }
tr.muted td { opacity: .55; }

/* Carregando com o logo pulsando */
.auth.carregando .auth-card { background: transparent; border: 0; box-shadow: none; }
.auth.carregando .auth-card > .brand { display: none; }
.loader { text-align: center; padding: 30px 0; }
.loader-heart { display: inline-block; font-size: 64px; color: #d9474f; line-height: 1; animation: batida 1.2s ease-in-out infinite; filter: drop-shadow(0 6px 16px rgba(217,71,79,.35)); }
.loader-txt { font-family: "Cormorant Garamond", serif; font-size: 22px; color: var(--muted); margin-top: 14px; }
@keyframes batida { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.18); } 50% { transform: scale(1); } 70% { transform: scale(1.12); } }

/* Cabeçalho do editor do site */
.site-head { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.site-head-txt { flex: 1; min-width: 260px; }
.site-head-txt p { margin: 4px 0 8px; }
.site-link-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.site-link-row code { background: var(--surface-2); padding: 4px 8px; border-radius: 8px; font-size: 12px; word-break: break-all; }
.site-head-acoes { display: grid; gap: 8px; min-width: 240px; }
.site-head-acoes .btn { justify-content: center; }
.site-publicar { justify-content: center; gap: 6px; }
.steps-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 14px; }
.step-tab { display: flex; gap: 8px; align-items: center; text-align: left; font: inherit; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; color: var(--text); }
.step-tab .num { width: 24px; height: 24px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.step-tab b { display: block; font-size: 13px; }
.step-tab small { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.step-tab.active { border-color: var(--primary); background: #f3e9df; }
.step-tab.active .num { background: var(--primary); color: #fff; }
@media (max-width: 700px) { .steps-tabs { grid-template-columns: 1fr 1fr; } }

/* Locais nas Configurações */
.local-resumo { grid-column: span 1; display: flex; gap: 10px; align-items: center; margin: -6px 0 14px; }
.local-thumb { width: 46px; height: 34px; border-radius: 8px; background: var(--surface-2) center / cover; flex-shrink: 0; }
.mapa-mini { width: 100%; height: 180px; border: 0; border-radius: 12px; margin-bottom: 12px; display: block; }
.local-foto-prev { aspect-ratio: 16 / 9; border-radius: 12px; background: var(--surface-2) center / cover; margin-bottom: 12px; }
@media (max-width: 900px) { .local-resumo { grid-column: 1 / -1; } }

/* Mapa das mesas */
.modelos-mapa { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-top: 12px; }
.modelo-mapa { font: inherit; text-align: left; display: grid; gap: 4px; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); cursor: pointer; color: var(--text); }
.modelo-mapa:hover { border-color: var(--primary); background: #f3e9df; }
.modelo-mapa .mm-ico { font-size: 26px; }
.mapa-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mapa-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr) 250px; gap: 14px; align-items: start; }
.mapa-paleta, .mapa-painel { position: sticky; top: 90px; max-height: calc(100vh - 110px); overflow-y: auto; }
.mapa-bandeja .guest-chip { width: 100%; text-align: left; font: inherit; border: 1px solid transparent; }
.mapa-blocos { display: grid; gap: 4px; }
.bloco-btn { display: flex; align-items: center; gap: 8px; font: inherit; font-size: 13px; text-align: left; padding: 5px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); cursor: pointer; color: var(--text); }
.bloco-btn:hover { border-color: var(--primary-2); background: var(--surface-2); }
.bloco-btn i { width: 18px; height: 12px; border-radius: 3px; background: var(--c); border: 1px solid var(--b); flex-shrink: 0; }
.mapa-canvas-wrap { overflow: auto; padding: 10px; background: #efe9e0; touch-action: none; }
.mapa-svg { display: block; height: auto; border: 1px solid var(--border); border-radius: 8px; background: #fbf8f3; user-select: none; }
.mp-bloco, .mp-mesa { cursor: grab; }
.mp-bloco:active, .mp-mesa:active { cursor: grabbing; }
.mp-alca { cursor: nwse-resize; }
.mapa-conv { max-height: 220px; overflow-y: auto; font-size: 13px; display: grid; gap: 4px; }
@media (max-width: 1100px) { .mapa-layout { grid-template-columns: 1fr; } .mapa-paleta, .mapa-painel { position: static; max-height: none; } .mapa-blocos { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } }

/* Impressão da planta */
#print-area { display: none; }
@media print {
  body.imprimindo > *:not(#print-area) { display: none !important; }
  body.imprimindo #print-area { display: block; }
  .print-amb { page-break-after: always; padding: 10mm; font-family: Inter, sans-serif; color: #000; }
  .print-amb h1 { font-family: "Cormorant Garamond", serif; font-size: 22pt; margin: 0 0 6mm; }
  .print-svg svg { width: 100%; height: auto; max-height: 150mm; border: 1px solid #999; }
  .print-amb table { width: 100%; border-collapse: collapse; margin-top: 6mm; font-size: 10pt; }
  .print-amb th, .print-amb td { border-bottom: 1px solid #bbb; padding: 2mm 1mm; text-align: left; vertical-align: top; }
}

/* ===== Celular ===== */
.backdrop { display: none; position: fixed; inset: 0; background: rgba(30,25,20,.35); z-index: 39; }
.bottom-nav { display: none; }
@media (max-width: 900px) {
  body.menu-aberto .backdrop { display: block; }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 38; background: var(--surface); border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottom-nav a { display: grid; justify-items: center; gap: 2px; text-decoration: none; color: var(--muted); font-size: 10.5px; font-weight: 500; padding: 4px 0; border-radius: 10px; }
  .bottom-nav a .ico { width: 22px; height: 22px; }
  .bottom-nav a.active { color: var(--primary); background: #f3e9df; }
  main { padding-bottom: 92px; }
  .sidebar { padding-bottom: 80px; }
  .btn { padding: 10px 14px; }
  .btn.sm { padding: 7px 10px; }
  .modal-backdrop { align-items: end; padding: 0; }
  .modal { width: 100%; max-height: 92vh; border-radius: 20px 20px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
  .modal-actions .btn { flex: 1; justify-content: center; }
}
@media (max-width: 600px) {
  h1 { font-size: 24px; }
  .grid-4, .grid-3 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .card { padding: 14px; }
  .stat .value { font-size: 26px; }
  .stat .hint, .stat .label { font-size: 12px; }
  .section { margin-top: 18px; }
  th, td { padding: 8px 6px; font-size: 13px; }
  .table-wrap { margin: 0 -14px; padding: 0 14px; }
  .table-wrap table th:first-child, .table-wrap table td:first-child { position: sticky; left: 0; background: var(--surface); z-index: 1; }
  tr.group-row td:first-child { background: var(--bg); }
  /* colunas secundárias ficam só no computador */
  .conv-table th:nth-child(3), .conv-table td:nth-child(3), .conv-table th:nth-child(5), .conv-table td:nth-child(5) { display: none; }
  .row-actions .btn { opacity: 1; }
  .guest-cell .avatar { width: 28px; height: 28px; font-size: 11px; }
  .pills .pill { width: 24px; height: 24px; }
  /* checklist: ferramentas compactas */
  .check-tools .inline-select { display: none; }
  .check-tools { opacity: 1; }
  .check-tools .btn.sm { padding: 4px 7px; }
  /* matriz de convidados */
  .conv-top { gap: 12px; }
  .resumo-num { font-size: 36px; }
  /* editor do site */
  .steps-tabs { grid-template-columns: 1fr 1fr; }
  .galeria { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
  .preview-frame { padding: 6px; }
  .site-head-acoes { min-width: 0; width: 100%; }
  /* mapa das mesas */
  .mapa-layout { display: flex; flex-direction: column; }
  .mapa-layout > * { min-width: 0; width: 100%; }
  .mapa-canvas-wrap { order: 1; padding: 6px; }
  .mapa-painel { order: 2; }
  .mapa-paleta { order: 3; }
  .mapa-blocos { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; }
  .bloco-btn { flex: 0 0 auto; white-space: nowrap; }
  .mapa-bandeja { display: flex; flex-wrap: wrap; gap: 6px; }
  .mapa-bandeja .guest-chip { width: auto; }
  /* mesas */
  .pool { max-height: 220px; }
  /* orçamentos: colunas Pago e Nota só no computador */
  .orc-table th:nth-child(5), .orc-table td:nth-child(5), .orc-table th:nth-child(6), .orc-table td:nth-child(6) { display: none; }
  /* presentes recebidos: Taxa e Data só no computador */
  .contrib-table th:nth-child(5), .contrib-table td:nth-child(5), .contrib-table th:nth-child(8), .contrib-table td:nth-child(8) { display: none; }
  .topbar { padding: 10px 14px; }
  .countdown { display: block; font-size: 12px; }
  .countdown b { font-size: 14px; }
}

/* Presentes com foto */
.gift-img { position: relative; cursor: pointer; overflow: hidden; }
.gift-img.tem-foto { background-color: #eee; }
.gift-img:not(.tem-foto) { background: linear-gradient(135deg, #f3ece3, #efe2e2); border: 1px dashed var(--border); }
.gift-emoji { font-size: 40px; opacity: .55; }
.gift-add { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); font-size: 12px; background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; color: var(--primary); white-space: nowrap; }
.gift-img.tem-foto:hover::after { content: "✎ trocar foto"; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.35); color: #fff; font-size: 13px; }

.badge.S { background: #e4e9f2; color: #3f5577; }
.pill.on.S { background: #e4e9f2; color: #3f5577; }
.nest-title .badge { margin-left: 4px; }

/* Catálogo de presentes */
.catalogo { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; max-height: 55vh; overflow-y: auto; padding: 2px; }
.cat-item { position: relative; display: grid; gap: 6px; border: 2px solid var(--border); border-radius: 12px; padding: 6px; cursor: pointer; background: var(--surface); }
.cat-item:has(input:checked) { border-color: var(--primary); background: #f3e9df; }
.cat-item.tem { opacity: .5; cursor: default; }
.cat-item input { position: absolute; top: 10px; left: 10px; z-index: 1; width: 18px; height: 18px; }
.cat-foto { aspect-ratio: 4 / 3; border-radius: 8px; background: var(--surface-2) center / cover no-repeat; display: grid; place-items: center; font-size: 32px; }
.cat-txt { display: grid; gap: 2px; font-size: 13px; line-height: 1.25; }
.modal.larga { width: min(820px, 100%); }

/* Faixa da demonstração */
.faixa-demo { position: sticky; top: 0; z-index: 45; display: flex; gap: 10px 16px; align-items: center; justify-content: center; flex-wrap: wrap; padding: 8px 16px; background: #2d2a26; color: #fff; font-size: 13px; text-align: center; }
.faixa-demo .btn { padding: 5px 12px; font-size: 13px; }
.faixa-demo .btn.ghost { color: #fff; border-color: rgba(255,255,255,.4); }
.faixa-demo .btn.ghost:hover { background: rgba(255,255,255,.1); }
.faixa-acoes { display: inline-flex; gap: 6px; }
body.com-faixa-demo .topbar { top: 46px; }
body.com-faixa-demo .sidebar { top: 0; }
@media (max-width: 900px) { body.com-faixa-demo .topbar { top: 78px; } .faixa-demo { font-size: 12px; padding: 6px 10px; } }

/* Marca Sim & Sim: o "&" em itálico na cor de destaque */
.brand-name .amp { font-style: italic; font-weight: 500; color: var(--primary); margin: 0 1px; }
