:root {
  --bg: #0b0f0f;
  --surface: #0f1318;
  --card: #111717;
  --border: #1f2937;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --accent: #16a34a; /* verde principal */
  --accent-2: #22c55e; /* variação de verde */
  --danger: #ef4444;
}

* { box-sizing: border-box; }
body {
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 10% -20%, rgba(22,163,74,0.08), transparent 60%), var(--bg);
  color: var(--text);
}

.container { max-width: 100%; margin: 0 auto; padding: 24px; }
.content { max-width: 980px; margin: 0 auto; }

header {
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  margin-bottom: 16px;
  background: linear-gradient(180deg, rgba(22,163,74,0.10), transparent 60%);
}
header .brand { font-weight: 700; letter-spacing: 0.2px; color: var(--text); }

.card {
  background: linear-gradient(180deg, rgba(34,197,94,0.06), rgba(34,197,94,0.03)), var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }

.btn {
  display:inline-block;
  padding:10px 14px;
  border-radius:10px;
  text-decoration:none;
  color:#fff;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  border: 1px solid #0f3b23;
  cursor:pointer;
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.btn.sm { padding:6px 10px; font-size:13px; }
/* Botão só ícone */
.btn.icon { padding:6px; width:32px; height:32px; display:inline-flex; align-items:center; justify-content:center; }
.btn.icon.xs { padding:3px; width:24px; height:24px; }
.btn.icon .material-symbols-outlined { font-size:20px; }
.btn.icon.xs .material-symbols-outlined { font-size:16px; }

/* Altura padrão para gráficos do dashboard */
.card canvas { width: 100% !important; height: 240px !important; }
/* Ícones de status do WhatsApp na lista de contatos */
.wa-icon { font-size:18px; line-height:1; vertical-align:middle; }
.wa-icon.ok { color:#25D366; }
.wa-icon.bad { color:#ef4444; }
.wa-icon.unknown { color:#9ca3af; }
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 8px 18px rgba(22,163,74,0.25); }
.btn:active { transform: translateY(0); filter: brightness(0.98); }
.btn.secondary {
  background: #1f2937;
  border-color: #2b3443;
}
.btn.secondary:hover { box-shadow: 0 8px 18px rgba(107,114,128,0.25); }
.btn.danger { background: linear-gradient(180deg, #ef4444, #dc2626); border-color: #5c0f0f; }
.btn.success { background: linear-gradient(180deg, var(--accent), var(--accent-2)); border-color: #0f3b23; }

.input, .select, textarea {
  width:100%;
  padding:10px 12px;
  border-radius:10px;
  border:1px solid var(--border);
  background:#0a0f12;
  color:#fff;
  outline: none;
  transition: box-shadow .12s ease, border-color .12s ease;
}
.input:focus, .select:focus, textarea:focus { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(34,197,94,0.25); }
label { display:block; margin-bottom:6px; color: var(--muted); font-size: 13px; }

.table { width:100%; border-collapse: collapse; font-size: 13px; }
.table thead th { border-bottom:1px solid var(--border); padding:12px 10px; text-align:left; color: var(--muted); font-weight:600; }
.table tbody td { border-bottom:1px solid #182027; padding:12px 10px; text-align:left; }
.table tbody tr:hover { background: rgba(34,197,94,0.05); }

.status { display:inline-flex; align-items:center; gap:8px; font-size:14px; }
.dot { width:10px; height:10px; border-radius:50%; box-shadow: 0 0 0 2px rgba(255,255,255,0.06) inset; }
.dot.green { background: var(--accent); }
.dot.red { background: var(--danger); }

/* Status label menor e com cores distintas */
.status-label { display:inline-flex; align-items:center; gap:6px; font-size: 12px; padding:2px 6px; border-radius:8px; border:1px solid var(--border); background:#111517; }
.status-label.failed { color: #fff; border-color: #5c0f0f; background: rgba(239,68,68,0.12); }
.status-label.completed { color: #a7f3d0; border-color: #0f3b23; background: rgba(34,197,94,0.08); }
.status-label.paused { color: #fde68a; border-color: #6b4f0f; background: rgba(245,158,11,0.10); }
.status-label.in_progress { color: #93c5fd; border-color: #0f2f5c; background: rgba(59,130,246,0.10); }

/* Inputs com ícone de ação (calendar/clock) */
.input-group { position: relative; }
.input-group .input { padding-right: 36px; }
.input-group .pick-btn { position:absolute; right:6px; top:50%; transform: translateY(-50%); opacity:0.85; }
.input-group .pick-btn .material-symbols-outlined { font-size:18px; }

/* Helper for hidden rows toggle */
[hidden] { display: none !important; }

/* Links */
a { color: var(--accent-2); }
a:hover { filter: brightness(1.1); }

/* Sidebar */
.sidebar { padding-right:16px; border-right:1px solid var(--border); }
.sidebar-list { list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:6px; }
.sidebar-item { display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:10px; text-decoration:none; color:#fff; background:#1f2937; border:1px solid #2b3443; }
.sidebar-item:hover { filter:brightness(1.05); box-shadow: 0 6px 12px rgba(107,114,128,0.25); }
.sidebar-item .icon { font-size:20px; color:#a7f3d0; }
.sidebar-item.support { background: linear-gradient(180deg, var(--accent), var(--accent-2)); border-color:#0f3b23; }

/* Page Titles */
h2 { margin: 0 0 12px; font-weight: 700; }
h3 { margin: 0 0 12px; font-weight: 600; }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal-card {
  width: min(520px, 92vw);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.35);
}
.modal-card.success { border-color: #0f3b23; box-shadow: 0 12px 28px rgba(22,163,74,0.25); }
.modal-card.error { border-color: #5c0f0f; box-shadow: 0 12px 28px rgba(239,68,68,0.20); }
.modal-content h4 { margin: 0 0 8px; }
.modal-content p { margin: 0; color: var(--muted); }

/* Filtros da página de contatos */
.filters { display:grid; grid-template-columns: repeat(12, 1fr); gap:12px; margin-bottom:12px; }
.filters .field { grid-column: span 2; }
.filters .actions { grid-column: span 12; text-align:right; }
