:root {
  --primary: #ff4d67;
  --primary-dark: #e6334f;
  --secondary: #2e2e2e;
  --bg: #fafafa;
  --card-bg: #ffffff;
  --success: #2ecc71;
  --muted: #8a8a8a;
  --border: #ececec;
  --radius: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--secondary);
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar .brand {
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--primary);
}

.topbar nav a {
  margin-left: 16px;
  color: var(--secondary);
  font-weight: 500;
  font-size: 0.95rem;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

.container.narrow {
  max-width: 460px;
}

.hero {
  text-align: center;
  max-width: 720px;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 4px;
}

.subtitle {
  color: var(--muted);
  font-size: 1.1rem;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 48px;
}

.how-it-works {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  text-align: left;
}

.step {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.step-num {
  display: inline-block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  text-align: center;
  line-height: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.btn-primary, .btn-secondary {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 30px;
  border: none;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-dark); text-decoration: none; }

.btn-secondary {
  background: #fff;
  color: var(--secondary);
  border: 1px solid var(--border);
}

.btn-sm { padding: 8px 16px; font-size: 0.9rem; }

.card-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.card-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--secondary);
}

.card-form input, .card-form textarea {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 400;
}

.checkbox-label {
  flex-direction: row !important;
  align-items: center;
  gap: 8px !important;
}

.role-toggle {
  display: flex;
  gap: 16px;
  font-weight: 400;
  font-size: 0.95rem;
}
.role-toggle label { flex-direction: row; align-items: center; gap: 6px; }

.alert {
  background: #ffe8ea;
  color: var(--primary-dark);
  padding: 10px 14px;
  border-radius: 10px;
}
.alert-ok { background: #e6f9ef; color: #1a8a4c; }

.filtro-info { color: var(--muted); margin-bottom: 16px; }

/* Swipe card */
#swipe-area {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.swipe-card {
  width: 100%;
  max-width: 360px;
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  user-select: none;
  cursor: grab;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.swipe-card img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  display: block;
  background: #eee;
}

.card-info { padding: 16px; }
.card-info h2 { margin: 0 0 6px; font-size: 1.3rem; }
.preco { color: var(--primary-dark); font-weight: 700; margin: 4px 0; }
.bio { color: var(--muted); font-size: 0.95rem; }

.swipe-buttons {
  display: flex;
  gap: 24px;
  margin-top: 20px;
}

.swipe-buttons button {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-dislike { background: #fff; color: #999; }
.btn-like { background: var(--primary); color: #fff; }

.match-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--secondary);
  color: #fff;
  padding: 14px 22px;
  border-radius: 30px;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
.match-toast a { color: #ffb3bd; margin-left: 8px; }
.hidden { display: none; }

.empty-state { color: var(--muted); text-align: center; padding: 40px 0; }

/* Matches list */
.matches-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.match-item {
  display: flex;
  gap: 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  align-items: flex-start;
}

.match-item img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: #eee;
}

.match-body { flex: 1; }
.match-body h3 { margin: 0 0 4px; }
.chat-link { display: inline-block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; }

.status { font-size: 0.9rem; margin: 6px 0; }
.status-pendente { color: #b8860b; }
.status-aceita { color: var(--success); font-weight: 700; }

.contato { font-weight: 700; }

.neg-form {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.neg-form input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.neg-actions { margin-top: 8px; }

@media (max-width: 640px) {
  .how-it-works { grid-template-columns: 1fr; }
  .topbar nav a { margin-left: 10px; font-size: 0.85rem; }
}

/* ---------- Chat (conversa entre cliente e faxineira) ---------- */
.chat-page { display: flex; flex-direction: column; height: calc(100vh - 70px); padding-bottom: 16px; }
.chat-voltar { font-size: 0.85rem; color: var(--muted); display: inline-block; margin-bottom: 8px; }
.chat-titulo { margin: 0 0 12px; font-size: 1.3rem; }

.chat-janela {
  flex: 1;
  overflow-y: auto;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.chat-bolha {
  max-width: 75%;
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 0.92rem;
  line-height: 1.4;
  word-wrap: break-word;
}

.chat-dele {
  align-self: flex-start;
  background: #f1f1f3;
  color: var(--secondary);
  border-bottom-left-radius: 4px;
}

.chat-minha {
  align-self: flex-end;
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-texto { white-space: pre-wrap; }
.chat-hora { font-size: 0.7rem; opacity: 0.7; margin-top: 2px; text-align: right; }

.chat-form { display: flex; gap: 8px; }
.chat-form input {
  flex: 1;
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.95rem;
}
.chat-form button { border-radius: 999px; padding: 10px 20px; }

.rg-aviso { font-size: 0.85rem; color: var(--muted); background: #fff7e6; border: 1px solid #ffe4a3; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.verif-banner { background: #fff7e6; border: 1px solid #ffe4a3; color: #8a6300; border-radius: 10px; padding: 10px 14px; font-size: 0.9rem; margin-bottom: 16px; }
.verif-banner.rejeitado { background: #fde8e8; border-color: #f3b8b8; color: #8a1f1f; }
.chat-quick-actions { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.chat-quick-btn { font-size: 0.8rem; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: #fff; color: var(--secondary); cursor: pointer; }
.chat-quick-btn:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- Pedidos estruturados de faxina ---------- */
.pedidos-list { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }

.pedido-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.pedido-topo { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; flex-wrap: wrap; gap: 6px; }
.pedido-data { font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.pedido-detalhe { font-size: 0.9rem; color: var(--secondary); margin: 4px 0; }
.pedido-obs { font-size: 0.85rem; color: var(--muted); font-style: italic; margin: 6px 0; }
.pedido-valor { font-size: 1.15rem; font-weight: 800; color: var(--primary); margin: 6px 0; }
.pedido-acoes { display: flex; gap: 8px; margin-top: 10px; }

.status-tag { font-size: 0.75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.status-aberto { background: #fff3cd; color: #8a6300; }
.status-em_negociacao { background: #e0e7ff; color: #3730a3; }
.status-atendido { background: #d1fae5; color: #065f46; }
.status-cancelado { background: #fde2e2; color: #8a1f1f; }

.btn-link-danger { background: none; border: none; color: #c0392b; font-size: 0.85rem; text-decoration: underline; cursor: pointer; padding: 0; }
.ordenar-form { margin: 12px 0; }
.ordenar-form select { padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border); font-size: 0.9rem; }
