*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600&family=Jost:wght@300;400;500;600;700&display=swap');

:root {
  /* Paleta */
  --bordeaux-dark:  #4A1228;
  --bordeaux-mid:   #6B1E3A;
  --bordeaux-light: #8B2F50;
  --rose-gold:      #C9956B;
  --rose-gold-light:#E8C4A8;
  --cream:          #FDF6F0;
  --beige:          #F5E8DD;
  --white:          #FFFFFF;
  --warm-gray:      #8B6E6A;

  /* WhatsApp (mantido para o botão de envio) */
  --wa-green:       #25d366;
  --wa-green-dark:  #128c7e;
  --wa-green-light: #d4f5e2;

  /* Tokens de UI */
  --bg:     var(--cream);
  --card:   var(--white);
  --text:   #2C1018;
  --muted:  var(--warm-gray);
  --border: var(--beige);
  --accent: var(--rose-gold);

  --radius: 14px;
  --shadow: 0 1px 3px rgba(74,18,40,.06), 0 6px 20px rgba(74,18,40,.08);
}

/* ── Base ───────────────────────────────────── */

body {
  font-family: 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.55;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 16px 56px; }

/* ── Header ─────────────────────────────────── */

.site-header {
  background: var(--bordeaux-dark);
  box-shadow: 0 2px 12px rgba(74,18,40,.35);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: stretch;
  gap: 32px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  flex-shrink: 0;
  text-decoration: none;
}

.logo-icon {
  width: 38px; height: 38px;
  background: var(--rose-gold);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--white);
  letter-spacing: .02em;
}

.logo-sub {
  font-family: 'Jost', sans-serif;
  font-size: 11px;
  font-weight: 400;
  color: var(--rose-gold-light);
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 0;
  flex: 1;
  align-items: flex-end;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 14px 22px;
  border: none;
  background: none;
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--rose-gold-light);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  letter-spacing: .04em;
  transition: all .18s;
  opacity: .75;
}
.tab-btn:hover {
  color: var(--white);
  opacity: 1;
  background: rgba(255,255,255,.06);
}
.tab-btn.active {
  color: var(--rose-gold);
  border-bottom-color: var(--rose-gold);
  font-weight: 600;
  opacity: 1;
}

.tab-content { padding-top: 28px; }
.tab-content.hidden { display: none; }

/* ── Cards ─────────────────────────────────── */

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--beige);
  padding: 28px;
  margin-bottom: 20px;
}

.card h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 17px;
  font-weight: 600;
  font-style: italic;
  color: var(--bordeaux-mid);
  letter-spacing: .01em;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--beige);
}

/* ── Layout helpers ─────────────────────────── */

.row { display: flex; gap: 20px; }
.flex-1 { flex: 1; min-width: 0; }
.flex-2 { flex: 2; min-width: 0; }
@media (max-width: 700px) { .row { flex-direction: column; } }

/* ── Forms ──────────────────────────────────── */

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.template-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 10px;
  border: 1.5px solid var(--beige);
  border-radius: 12px;
  background: var(--cream);
  cursor: pointer;
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--warm-gray);
  transition: all .18s;
  text-align: center;
  line-height: 1.3;
}
.template-btn:hover {
  border-color: var(--rose-gold);
  color: var(--bordeaux-mid);
  background: #fef5ee;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(201,149,107,.18);
}
.template-btn.active {
  border-color: var(--rose-gold);
  background: linear-gradient(135deg, #fef5ee 0%, #fde8d5 100%);
  color: var(--bordeaux-mid);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(201,149,107,.22);
}
.template-btn .icon { font-size: 22px; }

.template-form { display: none; flex-direction: column; gap: 14px; }
.template-form.active { display: flex; }

.field { display: flex; flex-direction: column; gap: 5px; }

.field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--warm-gray);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.field input, .field textarea, .field select {
  border: 1.5px solid var(--beige);
  border-radius: 8px;
  padding: 10px 13px;
  font-size: 14px;
  font-family: 'Jost', sans-serif;
  color: var(--text);
  background: var(--white);
  transition: border-color .18s, box-shadow .18s;
  resize: vertical;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--rose-gold);
  box-shadow: 0 0 0 3px rgba(201,149,107,.14);
}
.field input::placeholder, .field textarea::placeholder {
  color: #c9b8b5;
}

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ── Buttons ─────────────────────────────────── */

.actions { display: flex; gap: 10px; margin-top: 10px; }

.btn-primary, .btn-secondary {
  flex: 1; padding: 12px; border-radius: 8px; border: none;
  font-family: 'Jost', sans-serif;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: all .18s;
  letter-spacing: .03em;
}

.btn-primary {
  background: linear-gradient(135deg, var(--rose-gold) 0%, #b87f56 100%);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(201,149,107,.35);
}
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #d4a07a 0%, var(--rose-gold) 100%);
  box-shadow: 0 4px 14px rgba(201,149,107,.45);
  transform: translateY(-1px);
}
.btn-primary:disabled {
  background: var(--beige);
  color: #c9b8b5;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: var(--white);
  color: var(--warm-gray);
  border: 1.5px solid var(--beige);
}
.btn-secondary:hover {
  background: var(--cream);
  border-color: var(--rose-gold-light);
  color: var(--bordeaux-mid);
}

.btn-link {
  background: none; border: none; color: var(--warm-gray);
  font-family: 'Jost', sans-serif;
  font-size: 12px; cursor: pointer;
  text-decoration: underline;
  letter-spacing: .02em;
}
.btn-link:hover { color: var(--bordeaux-light); }

/* ── Individual: Preview ─────────────────────── */

.preview-bubble {
  background: linear-gradient(135deg, var(--cream) 0%, var(--beige) 100%);
  border: 1px solid var(--beige);
  border-radius: 4px 14px 14px 14px;
  padding: 16px 18px;
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 100px;
  color: var(--text);
  margin-bottom: 20px;
  position: relative;
}
.preview-bubble::before {
  content: '';
  position: absolute;
  top: 0; left: -1px;
  width: 3px; height: 40px;
  background: var(--rose-gold);
  border-radius: 0 0 3px 0;
}

#preview-text { color: var(--warm-gray); font-style: italic; }
#preview-text.has-content { color: var(--text); font-style: normal; }

#result-section h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 15px;
  font-weight: 600;
  font-style: italic;
  color: var(--bordeaux-mid);
  margin-bottom: 10px;
}

.link-box { display: flex; gap: 8px; margin-bottom: 12px; }
.link-box input {
  flex: 1; border: 1.5px solid var(--beige); border-radius: 8px;
  padding: 9px 12px; font-size: 12px; color: var(--warm-gray);
  background: var(--cream); font-family: monospace; min-width: 0;
}

.btn-copy {
  padding: 9px 13px; border: 1.5px solid var(--beige); border-radius: 8px;
  background: var(--white); cursor: pointer; color: var(--warm-gray);
  display: flex; align-items: center; transition: all .15s; flex-shrink: 0;
}
.btn-copy:hover {
  border-color: var(--rose-gold);
  color: var(--bordeaux-mid);
  background: #fef5ee;
}

.btn-whatsapp-open {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 13px; background: var(--wa-green); color: white;
  text-decoration: none; border-radius: 8px;
  font-family: 'Jost', sans-serif;
  font-size: 14px; font-weight: 600;
  transition: background .15s;
  box-shadow: 0 2px 8px rgba(37,211,102,.3);
}
.btn-whatsapp-open:hover { background: var(--wa-green-dark); }

/* ── Individual: Histórico ─────────────────── */

.historico-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px;
}
.historico-header h2 { margin-bottom: 0; border-bottom: none; padding-bottom: 0; }
.empty-state { color: var(--warm-gray); font-size: 14px; text-align: center; padding: 24px 0; font-style: italic; }

#historico-lista { display: flex; flex-direction: column; gap: 10px; }

.historico-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 1.5px solid var(--beige); border-radius: 10px; background: var(--cream);
  transition: border-color .15s;
}
.historico-item:hover { border-color: var(--rose-gold-light); }

.historico-item-info { flex: 1; min-width: 0; }

.historico-item-tipo {
  font-size: 11px; font-weight: 600; color: var(--bordeaux-mid);
  background: #fde8d5;
  padding: 2px 9px; border-radius: 20px;
  display: inline-block; margin-bottom: 4px;
  letter-spacing: .05em; text-transform: uppercase;
}
.historico-item-preview { font-size: 13px; color: var(--warm-gray); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.historico-item-time { font-size: 11px; color: #c9b8b5; white-space: nowrap; }

.historico-item-actions { display: flex; gap: 6px; }
.historico-item-actions a, .historico-item-actions button {
  padding: 6px 10px; border-radius: 6px; font-size: 12px; font-weight: 500;
  cursor: pointer; transition: all .15s; text-decoration: none;
  border: 1.5px solid var(--beige); background: var(--white); color: var(--warm-gray);
  font-family: 'Jost', sans-serif;
}
.historico-item-actions a:hover {
  border-color: var(--rose-gold);
  color: var(--bordeaux-mid);
  background: #fef5ee;
}
.historico-item-actions button:hover {
  border-color: #fca5a5; color: #b91c1c; background: #fef2f2;
}

/* ── Lote: Mensagens Prontas ─────────────────── */

.msg-library {
  margin-top: 18px;
  border-top: 1px solid var(--beige);
  padding-top: 18px;
  display: flex; flex-direction: column; gap: 12px;
}
.msg-library-header {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}
.msg-library-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 15px; font-weight: 600; font-style: italic; color: var(--bordeaux-mid);
}

.vars-hint { font-size: 12px; color: var(--warm-gray); }
.vars-hint code {
  background: var(--cream);
  border: 1px solid var(--beige);
  padding: 1px 6px; border-radius: 4px;
  font-family: monospace; font-size: 11px;
  color: var(--bordeaux-light);
}

.msg-pills { display: flex; flex-wrap: wrap; gap: 8px; }

.msg-pill {
  padding: 7px 15px;
  border: 1.5px solid var(--beige);
  border-radius: 20px;
  background: var(--white);
  font-family: 'Jost', sans-serif;
  font-size: 12px; font-weight: 500; color: var(--warm-gray);
  cursor: pointer; transition: all .15s; white-space: nowrap;
  letter-spacing: .03em;
}
.msg-pill:hover {
  border-color: var(--rose-gold); color: var(--bordeaux-mid); background: #fef5ee;
}
.msg-pill.active {
  border-color: var(--rose-gold);
  background: linear-gradient(135deg, var(--rose-gold) 0%, #b87f56 100%);
  color: var(--white); font-weight: 600;
  box-shadow: 0 2px 8px rgba(201,149,107,.3);
}
.msg-pill.editada::after { content: ' ✎'; font-size: 11px; opacity: .8; }

.msg-editor { display: flex; flex-direction: column; gap: 8px; }

#lote-template {
  border: 1.5px solid var(--beige); border-radius: 8px; padding: 13px;
  font-size: 13px; font-family: 'Jost', sans-serif;
  line-height: 1.7; resize: vertical; color: var(--text);
  background: var(--white);
  transition: border-color .18s, box-shadow .18s;
}
#lote-template:focus {
  outline: none; border-color: var(--rose-gold);
  box-shadow: 0 0 0 3px rgba(201,149,107,.14);
}

.msg-editor-footer { display: flex; align-items: center; justify-content: space-between; }
.msg-editando-hint { font-size: 12px; color: var(--rose-gold); font-style: italic; }

/* ── Lote: Upload ───────────────────────────── */

.upload-zone {
  border: 2px dashed var(--beige);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  background: var(--cream);
  user-select: none;
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--rose-gold);
  background: #fef5ee;
}
.upload-zone:hover .upload-icon svg,
.upload-zone.drag-over .upload-icon svg {
  color: var(--rose-gold);
}

.upload-icon { color: var(--beige); margin-bottom: 12px; display: flex; justify-content: center; }
.upload-icon svg { transition: color .2s; }

.upload-label { font-size: 14px; color: var(--text); margin-bottom: 5px; font-weight: 500; }
.upload-sub { font-size: 13px; color: var(--warm-gray); }

.arquivo-info {
  display: flex; align-items: center; gap: 10px; margin-top: 14px;
  padding: 11px 14px;
  background: #fef5ee;
  border: 1.5px solid var(--rose-gold-light);
  border-radius: 8px;
}
.arquivo-nome { font-size: 13px; font-weight: 600; color: var(--bordeaux-mid); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arquivo-linhas { font-size: 12px; color: var(--warm-gray); white-space: nowrap; }

/* ── Lote: Resultados ───────────────────────── */

.resultados-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; margin-bottom: 4px;
}
.resultados-info { display: flex; align-items: center; gap: 10px; }

.badge-count {
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--rose-gold) 0%, #b87f56 100%);
  color: var(--white);
  font-family: 'Jost', sans-serif;
  font-size: 13px; font-weight: 700;
  min-width: 30px; height: 30px; border-radius: 20px; padding: 0 10px;
  box-shadow: 0 2px 6px rgba(201,149,107,.35);
}

.text-secondary { font-size: 13px; color: var(--warm-gray); }
.text-secondary-light { font-size: 13px; color: var(--warm-gray); }

#lote-lista { display: flex; flex-direction: column; gap: 12px; }

/* ── Lote: Card de confirmação ──────────────── */

.conf-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--beige);
  transition: border-color .2s, box-shadow .2s;
  overflow: hidden;
}
.conf-card:hover {
  box-shadow: 0 4px 20px rgba(74,18,40,.1);
}
.conf-card.enviada {
  border-color: var(--rose-gold-light);
  background: linear-gradient(to bottom, #fffaf6, var(--white));
}

.conf-card-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 16px 20px 12px; gap: 12px; flex-wrap: wrap;
  border-bottom: 1px solid var(--beige);
}
.conf-card-info { flex: 1; min-width: 0; }

.conf-nome {
  display: block;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 17px; font-weight: 600; color: var(--bordeaux-dark);
  margin-bottom: 5px;
}

.conf-meta { display: flex; flex-wrap: wrap; gap: 5px; }
.conf-meta-item {
  font-size: 12px; color: var(--warm-gray);
  background: var(--cream);
  border: 1px solid var(--beige);
  padding: 2px 9px; border-radius: 20px;
  font-family: 'Jost', sans-serif;
  letter-spacing: .02em;
}

.conf-meta-status {
  background: var(--bordeaux-dark) !important;
  color: var(--rose-gold-light) !important;
  border: 1px solid var(--bordeaux-light) !important;
  font-weight: 600;
  letter-spacing: .05em;
}

.conf-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.conf-tel {
  font-size: 13px; font-weight: 500; color: var(--warm-gray);
  font-family: 'Jost', monospace;
}

.conf-badge-enviada {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600; color: var(--bordeaux-light);
  background: #fde8d5;
  border: 1px solid var(--rose-gold-light);
  padding: 3px 10px; border-radius: 20px;
  letter-spacing: .04em; text-transform: uppercase;
}
.conf-badge-enviada.hidden { display: none; }

.conf-msg { padding: 14px 20px 16px; }
.conf-msg pre {
  background: linear-gradient(135deg, var(--cream) 0%, #faeee2 100%);
  border: 1px solid var(--beige);
  border-left: 3px solid var(--rose-gold);
  border-radius: 0 10px 10px 10px;
  padding: 13px 15px;
  font-size: 13px;
  font-family: 'Jost', sans-serif;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
}

.conf-actions {
  display: flex;
  border-top: 1px solid var(--beige);
  background: var(--cream);
}
.conf-actions button, .conf-actions a {
  flex: 1; padding: 12px; border: none; background: none;
  font-family: 'Jost', sans-serif;
  font-size: 13px; font-weight: 600; cursor: pointer;
  text-align: center; text-decoration: none; transition: background .12s;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  letter-spacing: .03em;
}

.conf-btn-copiar {
  color: var(--warm-gray);
  border-right: 1px solid var(--beige) !important;
}
.conf-btn-copiar:hover { background: var(--beige); color: var(--bordeaux-mid); }
.conf-btn-copiar.copiado { color: var(--rose-gold); background: #fef5ee; }

.conf-btn-wa { color: var(--wa-green-dark); }
.conf-btn-wa:hover { background: var(--wa-green-light); }

/* ── Aviso sem telefone ──────────────────────── */

.aviso-card { border: 1.5px solid #fca5a5 !important; }
.aviso-card h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 16px; font-style: italic;
  color: #b91c1c; margin-bottom: 12px;
}
.aviso-item { font-size: 13px; color: var(--text); padding: 6px 0; border-bottom: 1px solid var(--beige); }
.aviso-item:last-child { border-bottom: none; }

/* ── Toast ──────────────────────────────────── */

.toast {
  position: fixed; bottom: 28px; left: 50%;
  transform: translateX(-50%) translateY(0);
  background: linear-gradient(135deg, var(--bordeaux-dark) 0%, var(--bordeaux-mid) 100%);
  color: var(--rose-gold-light);
  padding: 11px 26px; border-radius: 30px;
  font-family: 'Jost', sans-serif;
  font-size: 14px; font-weight: 500;
  box-shadow: 0 6px 24px rgba(74,18,40,.4);
  transition: opacity .3s, transform .3s; z-index: 100;
  letter-spacing: .03em;
}
.toast.hidden { opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(10px); }
.hidden { display: none !important; }

/* ── Checkbox do card ───────────────────────── */

.conf-check-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
  margin-right: 4px;
}
.conf-check-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}
.conf-check-custom {
  width: 20px; height: 20px;
  border: 2px solid var(--beige);
  border-radius: 6px;
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  transition: all .18s;
  flex-shrink: 0;
}
.conf-check-label input:checked + .conf-check-custom {
  background: linear-gradient(135deg, var(--rose-gold) 0%, #b87f56 100%);
  border-color: var(--rose-gold);
}
.conf-check-label input:checked + .conf-check-custom::after {
  content: '';
  display: block;
  width: 5px; height: 9px;
  border: 2px solid white;
  border-top: none; border-left: none;
  transform: rotate(45deg) translateY(-1px);
}
.conf-check-label:hover .conf-check-custom {
  border-color: var(--rose-gold-light);
}

/* ── Botão Enviar Automaticamente ───────────── */

.auto-send-bar {
  display: flex;
  justify-content: flex-end;
  padding: 4px 0 16px;
}
.btn-auto-send {
  display: flex; align-items: center; gap: 8px;
  padding: 13px 24px;
  background: linear-gradient(135deg, var(--bordeaux-mid) 0%, var(--bordeaux-dark) 100%);
  color: var(--rose-gold-light);
  border: none; border-radius: 10px;
  font-family: 'Jost', sans-serif;
  font-size: 14px; font-weight: 600;
  cursor: pointer; letter-spacing: .04em;
  box-shadow: 0 4px 16px rgba(74,18,40,.35);
  transition: all .18s;
}
.btn-auto-send:hover {
  background: linear-gradient(135deg, var(--bordeaux-light) 0%, var(--bordeaux-mid) 100%);
  box-shadow: 0 6px 20px rgba(74,18,40,.45);
  transform: translateY(-1px);
  color: var(--white);
}

/* ── Modal ──────────────────────────────────── */

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(74,18,40,.55);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
}
.modal-overlay.hidden { display: none; }

.modal-box {
  background: var(--white);
  border-radius: 18px;
  padding: 36px 32px;
  width: min(420px, 90vw);
  box-shadow: 0 20px 60px rgba(74,18,40,.3);
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}

.modal-icon {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--bordeaux-mid), var(--bordeaux-dark));
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  color: var(--rose-gold-light);
  margin-bottom: 4px;
}

.modal-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 22px; font-weight: 700; font-style: italic;
  color: var(--bordeaux-dark);
}

.modal-body {
  font-family: 'Jost', sans-serif;
  font-size: 15px; color: var(--text); line-height: 1.6;
}

.modal-warn {
  font-family: 'Jost', sans-serif;
  font-size: 12px; color: var(--warm-gray); line-height: 1.5;
  background: var(--cream); border: 1px solid var(--beige);
  border-radius: 8px; padding: 10px 14px;
}

.modal-actions {
  display: flex; gap: 10px; width: 100%; margin-top: 6px;
}

.modal-btn-cancel, .modal-btn-confirm {
  flex: 1; padding: 12px;
  border-radius: 8px; border: none; cursor: pointer;
  font-family: 'Jost', sans-serif;
  font-size: 14px; font-weight: 600; transition: all .15s;
}

.modal-btn-cancel {
  background: var(--cream); color: var(--warm-gray);
  border: 1.5px solid var(--beige);
}
.modal-btn-cancel:hover { background: var(--beige); color: var(--bordeaux-mid); }

.modal-btn-confirm {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  background: linear-gradient(135deg, var(--bordeaux-mid) 0%, var(--bordeaux-dark) 100%);
  color: var(--rose-gold-light);
  box-shadow: 0 3px 10px rgba(74,18,40,.3);
}
.modal-btn-confirm:hover {
  background: linear-gradient(135deg, var(--bordeaux-light) 0%, var(--bordeaux-mid) 100%);
  color: var(--white);
}

/* ── Barra de progresso fixa ─────────────────── */

.auto-progress {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--bordeaux-dark);
  border-top: 2px solid var(--bordeaux-light);
  z-index: 150;
  box-shadow: 0 -4px 20px rgba(74,18,40,.4);
}
.auto-progress.hidden { display: none; }

.auto-progress-inner {
  max-width: 1100px; margin: 0 auto;
  padding: 14px 20px;
  display: flex; flex-direction: column; gap: 10px;
}

.auto-progress-top {
  display: flex; align-items: center; gap: 16px;
}

.auto-progress-label {
  display: flex; align-items: center; gap: 7px;
  font-family: 'Jost', sans-serif;
  font-size: 14px; color: var(--rose-gold-light);
  flex: 1;
}
.auto-progress-label strong {
  color: var(--white); font-size: 16px; letter-spacing: .02em;
}

.auto-progress-countdown {
  font-family: 'Jost', sans-serif;
  font-size: 13px; color: var(--rose-gold);
  white-space: nowrap;
  min-width: 120px; text-align: right;
}

.auto-progress-proximo {
  background: var(--wa-green);
  border: none;
  color: #fff;
  padding: 6px 16px; border-radius: 20px;
  font-family: 'Jost', sans-serif;
  font-size: 12px; font-weight: 700;
  cursor: pointer; transition: all .15s; white-space: nowrap;
  letter-spacing: .03em;
}
.auto-progress-proximo:hover { filter: brightness(1.1); }

.auto-progress-abort {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: var(--rose-gold-light);
  padding: 6px 14px; border-radius: 20px;
  font-family: 'Jost', sans-serif;
  font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all .15s; white-space: nowrap;
}
.auto-progress-abort:hover {
  background: rgba(255,255,255,.18);
  color: var(--white);
}

.auto-progress-bar-track {
  height: 5px;
  background: rgba(255,255,255,.12);
  border-radius: 10px;
  overflow: hidden;
}

.auto-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--rose-gold) 0%, #e8b08a 100%);
  border-radius: 10px;
  width: 0%;
  transition: width .4s ease;
}

/* ── Scrollbar sutil ─────────────────────────── */

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb { background: var(--beige); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--rose-gold-light); }

/* ════════════════════════════════════════════
   LOGIN SCREEN
════════════════════════════════════════════ */

.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--bordeaux-dark) 0%, #2e0b1c 60%, #1a0510 100%);
  padding: 24px 16px;
  position: relative;
  overflow: hidden;
}

/* Ornamento de fundo */
.login-screen::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,149,107,.08) 0%, transparent 70%);
  top: -100px; right: -100px;
  pointer-events: none;
}

.login-card {
  background: var(--white);
  border-radius: 20px;
  padding: 40px 36px;
  width: min(420px, 100%);
  box-shadow: 0 24px 64px rgba(0,0,0,.45);
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: relative;
  z-index: 1;
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--beige);
}

.login-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  font-style: italic;
  color: var(--bordeaux-dark);
  text-align: center;
  margin: 0;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-btn {
  margin-top: 4px;
  padding: 14px;
  font-size: 15px;
  letter-spacing: .06em;
}

.login-footer {
  text-align: center;
  font-size: 13px;
  color: var(--warm-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding-top: 4px;
  border-top: 1px solid var(--beige);
}

/* Mensagens de formulário */
.form-msg {
  font-size: 13px;
  border-radius: 8px;
  padding: 10px 14px;
  font-family: 'Jost', sans-serif;
  line-height: 1.4;
}
.form-erro {
  background: #fff1f2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}
.form-sucesso {
  background: #f0faf4;
  color: #166534;
  border: 1px solid #86efac;
}

/* Modal de cadastro */
.modal-cadastro-box {
  width: min(480px, 92vw);
  max-height: 90vh;
  overflow-y: auto;
}
.cadastro-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  text-align: left;
}

/* ════════════════════════════════════════════
   ADMIN PANEL
════════════════════════════════════════════ */

.admin-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  padding: 12px 0;
}

.admin-header-badge {
  font-family: 'Jost', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--rose-gold);
  background: rgba(201,149,107,.15);
  border: 1px solid rgba(201,149,107,.3);
  padding: 3px 10px;
  border-radius: 20px;
}

.btn-admin-logout {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  color: var(--rose-gold-light);
  border-radius: 8px;
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
}
.btn-admin-logout:hover {
  background: rgba(255,255,255,.15);
  color: var(--white);
}

.admin-hint {
  font-size: 12px;
  color: var(--warm-gray);
  font-style: italic;
  margin-bottom: 12px;
}

.admin-table-wrap {
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid var(--beige);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Jost', sans-serif;
  font-size: 13px;
}

.admin-table thead tr {
  background: var(--cream);
  border-bottom: 2px solid var(--beige);
}

.admin-table th {
  padding: 11px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--warm-gray);
  white-space: nowrap;
}

.admin-td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--beige);
  color: var(--text);
  vertical-align: middle;
}

.admin-row:last-child .admin-td { border-bottom: none; }

.admin-cell-edit {
  cursor: pointer;
}
.admin-cell-edit:hover {
  background: #fef9f5;
}

.admin-inline-input {
  border: 1.5px solid var(--rose-gold);
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 13px;
  font-family: 'Jost', sans-serif;
  width: 100%;
  min-width: 120px;
  color: var(--text);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(201,149,107,.14);
  outline: none;
}

.admin-empty {
  text-align: center;
  padding: 24px;
  color: var(--warm-gray);
  font-style: italic;
  font-size: 14px;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  white-space: nowrap;
}
.badge-ok {
  background: #f0faf4;
  color: #166534;
  border: 1px solid #86efac;
}
.badge-pend {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.admin-td-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.admin-btn {
  padding: 5px 12px;
  border-radius: 6px;
  border: none;
  font-family: 'Jost', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.admin-btn-ok   { background: #f0faf4; color: #166534; border: 1px solid #86efac; }
.admin-btn-ok:hover { background: #dcfce7; }
.admin-btn-warn { background: #fffbeb; color: #92400e; border: 1px solid #fcd34d; }
.admin-btn-warn:hover { background: #fef3c7; }
.admin-btn-del  { background: #fff1f2; color: #b91c1c; border: 1px solid #fca5a5; }
.admin-btn-del:hover { background: #fee2e2; }

/* ════════════════════════════════════════════
   USER BAR (usuário logado no header do app)
════════════════════════════════════════════ */

.user-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  padding: 10px 0;
}

.user-bar-name {
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  color: var(--rose-gold-light);
  letter-spacing: .03em;
}

.user-bar-logout {
  padding: 6px 14px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  color: var(--rose-gold-light);
  border-radius: 8px;
  font-family: 'Jost', sans-serif;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
}
.user-bar-logout:hover {
  background: rgba(255,255,255,.15);
  color: var(--white);
}

/* ── Tab desabilitada ───────────────────────── */

.tab-btn--disabled {
  opacity: .38;
  cursor: not-allowed;
}
.tab-btn--disabled:hover {
  background: none !important;
  color: var(--rose-gold-light) !important;
  opacity: .38 !important;
}

/* ── Status: checkboxes ─────────────────────── */

.status-checks-box {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 12px;
  border: 1.5px solid var(--beige);
  border-radius: 8px;
  background: var(--white);
}

.status-check-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-family: 'Jost', sans-serif;
  color: var(--warm-gray);
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--beige);
  background: var(--cream);
  transition: all .15s;
  white-space: nowrap;
  user-select: none;
}
.status-check-item:hover {
  border-color: var(--rose-gold-light);
  color: var(--bordeaux-mid);
  background: #fef5ee;
}
.status-check-item input[type="checkbox"] {
  accent-color: var(--rose-gold);
  width: 13px;
  height: 13px;
  cursor: pointer;
}
.status-check-item:has(input:checked) {
  background: linear-gradient(135deg, var(--rose-gold) 0%, #b87f56 100%);
  border-color: var(--rose-gold);
  color: var(--white);
}
.status-check-item:has(input:checked):hover {
  background: linear-gradient(135deg, #d4a07a 0%, var(--rose-gold) 100%);
}

/* ── Botão contato WA no card ───────────────── */

.conf-btn-contact {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--wa-green-light);
  color: var(--wa-green-dark);
  text-decoration: none;
  flex-shrink: 0;
  transition: all .15s;
}
.conf-btn-contact:hover {
  background: var(--wa-green);
  color: var(--white);
  transform: scale(1.1);
}

/* ── Tooltip serviços ───────────────────────── */

.conf-meta-serv {
  position: relative;
  cursor: default;
}
.conf-meta-serv::after {
  content: attr(data-full);
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--bordeaux-dark);
  color: var(--rose-gold-light);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  white-space: normal;
  word-break: break-word;
  max-width: 300px;
  z-index: 60;
  box-shadow: 0 4px 16px rgba(74,18,40,.35);
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s;
}
.conf-meta-serv:hover::after {
  opacity: 1;
}

/* ── Editar / Salvar nos cards ──────────────── */

.conf-btn-editar {
  color: var(--warm-gray);
  border-left: 1px solid var(--beige) !important;
  border-right: 1px solid var(--beige) !important;
}
.conf-btn-editar:hover { background: var(--cream); color: var(--bordeaux-mid); }

.conf-btn-salvar {
  color: #155724;
  border-left: 1px solid var(--beige) !important;
  border-right: 1px solid var(--beige) !important;
  background: #f0faf4 !important;
}
.conf-btn-salvar:hover { background: #d4edda !important; color: #0a3d1f; }

/* ── Pre editável ───────────────────────────── */

.conf-msg pre.editavel {
  border-color: var(--rose-gold) !important;
  box-shadow: 0 0 0 3px rgba(201,149,107,.16);
  background: var(--white) !important;
  cursor: text;
}
.conf-msg pre[contenteditable="true"]:focus {
  outline: none;
}
