/* ──────────────────────────────────────────
   CSS VARIABLES — compatibilidade login.html
   ────────────────────────────────────────── */
:root {
  --panel:   #ffffff;
  --bg:      #f8fafc;
  --border:  #e2e8f0;
  --radius:  14px;
  --shadow:  0 1px 3px rgba(0,0,0,.06), 0 6px 20px rgba(0,0,0,.05);
  --accent:  #3b82f6;
  --text:    #0f172a;
  --muted:   #64748b;
  --accent3: #ef4444;
}

/* ──────────────────────────────────────────
   SIDEBAR
   ────────────────────────────────────────── */
.sidebar {
  width: 88px;
  background: #1a1d2e;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}
.sb-logo {
  padding: 22px 16px 18px;
  display: flex;
  justify-content: center;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.sb-logo img {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 6px 20px rgba(0,0,0,.5);
}
.sb-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 8px;
}
.sb-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 100%;
  padding: 11px 6px 9px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,.32);
  cursor: pointer;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1.2;
  transition: background .15s, color .15s;
  font-family: inherit;
}
.sb-item .sb-icon {
  color: rgba(255,255,255,.28);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .15s;
}
.sb-item:hover {
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.68);
}
.sb-item:hover .sb-icon { color: rgba(255,255,255,.55); }
.sb-item.is-active {
  background: rgba(74,222,128,.14);
  color: rgba(255,255,255,.95);
}
.sb-item.is-active .sb-icon { color: #4ade80; }
.sb-footer {
  padding: 10px 8px 14px;
  border-top: 1px solid rgba(255,255,255,.05);
  display: flex;
  justify-content: center;
}
.sb-user {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px;
  border-radius: 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: background .15s;
}
.sb-user:hover { background: rgba(255,255,255,.06); }
.sb-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #334155, #1e293b);
  border: 2px solid rgba(255,255,255,.12);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

/* ──────────────────────────────────────────
   VIEW VISIBILITY
   ────────────────────────────────────────── */
.view { display: none; }
.view.is-active { display: block; }

/* ──────────────────────────────────────────
   FILTER PILLS
   ────────────────────────────────────────── */
.pill {
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: #64748b;
  transition: all .15s;
  font-family: inherit;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.pill:hover { border-color: #94a3b8; color: #0f172a; }
.pill.is-active {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}

/* Segment pills — segunda linha de filtros */
.seg-pill {
  padding: 5px 13px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  color: #64748b;
  transition: all .15s;
  font-family: inherit;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.seg-pill:hover { border-color: #7c3aed; color: #7c3aed; }
.seg-pill.is-active {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #fff;
}
.seg-pill.is-active:first-of-type {
  background: #334155;
  border-color: #334155;
}

/* ──────────────────────────────────────────
   STATUS DOTS
   ────────────────────────────────────────── */
.s-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34,197,94,.18);
  flex-shrink: 0;
}
.s-dot.amber { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,.18); }
.s-dot.red   { background: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.18); }

/* ──────────────────────────────────────────
   BADGES
   ────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.badge.novo      { background: #eff6ff; color: #1d4ed8; }
.badge.conversa  { background: #f0fdf4; color: #15803d; }
.badge.agendado  { background: #fff7ed; color: #c2410c; }
.badge.cancelado { background: #f1f5f9; color: #64748b; }

/* ──────────────────────────────────────────
   MODAL
   ────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.52);
  z-index: 100;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.modal-overlay.is-open { display: flex; }
.modal-row { margin-bottom: 14px; }
.modal-row label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #94a3b8;
  margin-bottom: 4px;
}
.modal-row span { font-size: 14px; color: #0f172a; }
.modal-close { cursor: pointer; }

/* ──────────────────────────────────────────
   CONTACT ROWS (gerado por JS)
   ────────────────────────────────────────── */
.contact-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 15px 24px;
  border-bottom: 1px solid #f1f5f9;
  transition: background .1s;
}
.contact-row:last-child { border-bottom: none; }
.contact-row:hover { background: #fafafa; }

.cr-identity { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.cr-init {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.cr-info { min-width: 0; }
.cr-name  { font-size: 14px; font-weight: 600; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-phone { font-size: 12px; color: #94a3b8; margin-top: 2px; }
.cr-status { flex-shrink: 0; min-width: 120px; }
.cr-meta   { flex-shrink: 0; text-align: right; }
.cr-time   { font-size: 12px; color: #94a3b8; }
.cr-actions { display: flex; gap: 8px; flex-shrink: 0; align-items: center; }

.btn-xs {
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  cursor: pointer;
  color: #374151;
  white-space: nowrap;
  transition: all .12s;
  font-family: inherit;
}
.btn-xs:hover { background: #f8fafc; border-color: #cbd5e1; }
.btn-xs.green-outline { border-color: #86efac; color: #16a34a; background: transparent; }
.btn-xs.green-outline:hover { background: #f0fdf4; }
.btn-xs.link { border: none; background: transparent; color: #3b82f6; }
.btn-xs.link:hover { color: #1d4ed8; }

.contact-empty { padding: 56px; text-align: center; color: #94a3b8; font-size: 14px; }

/* ──────────────────────────────────────────
   APPOINTMENT ITEMS (gerado por JS)
   ────────────────────────────────────────── */
.appt-group-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #cbd5e1;
  margin: 12px 0 6px;
}
.appt-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
}
.appt-item:last-child { border-bottom: none; }
.appt-av {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.appt-info { flex: 1; min-width: 0; }
.appt-name  { font-size: 13px; font-weight: 600; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt-phone { font-size: 11px; color: #94a3b8; }
.appt-time  { font-size: 13px; font-weight: 600; color: #0f172a; flex-shrink: 0; }
.appt-empty { font-size: 13px; color: #94a3b8; padding: 8px 0; }

/* ──────────────────────────────────────────
   BUTTON DISABLED
   ────────────────────────────────────────── */
#btnGenerateQR:disabled { opacity: .5; cursor: not-allowed; }
#btnGenerateQR:hover:not(:disabled) { opacity: .9; }
