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

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #f59e0b;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --shadow: 0 4px 20px rgba(15, 23, 42, .08);
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* HERO */
.hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #3b82f6 100%);
  color: #fff;
  padding: 60px 0 90px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 0%, rgba(255,255,255,.15), transparent 40%),
              radial-gradient(circle at 80% 100%, rgba(245,158,11,.2), transparent 40%);
}
.hero .container { position: relative; z-index: 1; text-align: center; }

.logo { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 12px; }
.logo-icon { font-size: 2.4rem; }
.logo h1 { font-size: 2.2rem; font-weight: 800; letter-spacing: -.5px; }
.accent { color: var(--accent); }

.subtitle { font-size: 1.05rem; opacity: .9; margin-bottom: 32px; }

.search-box {
  max-width: 640px;
  margin: 0 auto;
  position: relative;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
  display: flex;
  align-items: center;
  padding: 6px 20px;
}
.search-icon { width: 22px; height: 22px; color: var(--muted); flex-shrink: 0; }
#searchInput {
  flex: 1;
  border: none;
  outline: none;
  padding: 16px 12px;
  font-size: 1rem;
  background: transparent;
  font-family: inherit;
}

/* MAIN */
main { padding: 40px 0 80px; }

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
}
.stats { color: var(--muted); font-weight: 500; }

.btn-primary {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all .2s;
  font-family: inherit;
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(37,99,235,.3); }

.btn-secondary {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
}
.btn-secondary:hover { background: var(--bg); }

/* CARDS */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}

.card {
  background: var(--card);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: all .25s;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(15,23,42,.12); }

.card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.card-title { font-size: 1.15rem; font-weight: 700; color: var(--text); }

.card-actions { display: flex; gap: 6px; }
.icon-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  color: var(--muted);
  transition: all .2s;
  display: flex;
}
.icon-btn:hover { background: #fee2e2; color: #dc2626; }
.icon-btn.edit:hover { background: #dbeafe; color: var(--primary); }

.card-info { display: flex; flex-direction: column; gap: 8px; font-size: .92rem; color: var(--muted); }
.card-info-row { display: flex; align-items: center; gap: 8px; }
.card-info-row svg { flex-shrink: 0; width: 16px; height: 16px; }
.card-info-row a { color: var(--primary); text-decoration: none; }
.card-info-row a:hover { text-decoration: underline; }

.badge {
  display: inline-block;
  background: #fef3c7;
  color: #92400e;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: .78rem;
  font-weight: 600;
  align-self: flex-start;
}

.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--muted);
  font-size: 1.1rem;
}

/* MODAL */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.55);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal-overlay.active { display: flex; }

.modal {
  background: #fff;
  border-radius: 18px;
  padding: 32px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: slideUp .25s ease;
}
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.modal h2 { margin-bottom: 22px; font-size: 1.4rem; }

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
  padding: 4px 10px;
  border-radius: 8px;
}
.modal-close:hover { background: var(--bg); color: var(--text); }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.field input, .field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: .95rem;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
  background: #fff;
}
.field input:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

/* FOOTER */
footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 24px 0;
  text-align: center;
  font-size: .88rem;
}

/* TOAST */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #0f172a;
  color: #fff;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: .9rem;
  font-weight: 500;
  opacity: 0;
  transition: all .3s;
  z-index: 200;
  box-shadow: 0 10px 30px rgba(0,0,0,.3);
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.success { background: #059669; }
.toast.error { background: #dc2626; }

@media (max-width: 640px) {
  .logo h1 { font-size: 1.5rem; }
  .subtitle { font-size: .95rem; }
  .hero { padding: 40px 0 70px; }
  .grid-2 { grid-template-columns: 1fr; }
  .modal { padding: 24px; }
}

.auth-bar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 16px;
}

.btn-ghost {
  background: rgba(255, 255, 255, .15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .3);
  padding: 8px 14px;
  border-radius: 8px;
  font-family: inherit;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all .2s;
  backdrop-filter: blur(4px);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, .25);
  transform: translateY(-1px);
}
.btn-ghost[hidden] { display: none !important; }

/* WhatsApp destaque */
.wa-row a { color: #16a34a !important; font-weight: 600; }
.wa-row svg { color: #16a34a; }

/* Botões de redes sociais */
.card-socials {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.social-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all .2s;
}
.social-btn:hover { transform: translateY(-2px); filter: brightness(1.1); }
.social-btn svg { width: 18px; height: 18px; }
.social-btn.insta { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.social-btn.face  { background: #1877f2; }
.social-btn.yt    { background: #ff0000; }