/* ZapManager — App CSS */
:root {
  --bg: #F8FAFC;
  --sidebar-bg: #0F172A;
  --sidebar-width: 240px;
  --primary: #2563EB;
  --success: #16A34A;
  --warning: #F59E0B;
  --danger: #DC2626;
  --text: #1E293B;
  --muted: #64748B;
  --border: #E2E8F0;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 14px;
}

/* ── Sidebar ── */
#wrapper {
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background-color: var(--sidebar-bg);
  color: #CBD5E1;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  transition: width 0.2s ease;
}

.sidebar-brand {
  padding: 1.25rem 1.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-brand i {
  font-size: 1.4rem;
  color: #25D366;
}

.sidebar-nav {
  list-style: none;
  padding: 0.75rem 0;
  margin: 0;
}

.sidebar-nav-item {
  margin: 2px 0.75rem;
}

.sidebar-nav-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.85rem;
  color: #94A3B8;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.15s ease;
}

.sidebar-nav-link:hover {
  background-color: rgba(255,255,255,0.07);
  color: #fff;
}

.sidebar-nav-link.active {
  background-color: var(--primary);
  color: #fff;
}

.sidebar-nav-link i {
  font-size: 1rem;
  width: 18px;
  text-align: center;
}

.sidebar-nav-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 0.5rem 0.75rem;
}

/* ── Page Content ── */
#page-content-wrapper {
  min-width: 0;
  background-color: var(--bg);
}

/* ── Cards ── */
.card {
  border-radius: 12px;
}

.metric-card .card-body {
  padding: 1.25rem;
}

.metric-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* ── Tables ── */
.table th {
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.table td {
  vertical-align: middle;
}

/* ── Navbar ── */
.navbar {
  min-height: 56px;
}

/* ── Badges ── */
.badge {
  font-weight: 500;
  font-size: 0.7rem;
}

/* ── Buttons ── */
.btn {
  border-radius: 8px;
  font-weight: 500;
}

.btn-sm {
  border-radius: 6px;
}

/* ── Forms ── */
.form-control, .form-select {
  border-radius: 8px;
  border-color: var(--border);
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

/* ── Login ── */
.login-logo {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, #25D366, #128C7E);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

/* ── WhatsApp Preview ── */
.whatsapp-preview {
  border-radius: 8px 8px 8px 0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.13);
  line-height: 1.5;
}

/* ── Progress ── */
.progress {
  border-radius: 10px;
}

/* ── Sidebar toggle for mobile ── */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: -260px;
    z-index: 1000;
    transition: left 0.25s ease;
  }
  .sidebar.open {
    left: 0;
  }
  #page-content-wrapper {
    margin-left: 0 !important;
  }
}

/* ── Select2 fixes ── */
.select2-container--bootstrap-5 .select2-selection {
  border-color: var(--border);
  border-radius: 8px;
}
