body.bg-app {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.22), transparent 28%),
    linear-gradient(135deg, #0f172a, #1d4ed8 55%, #38bdf8);
  background-attachment: fixed;
  font-family: Arial, Helvetica, sans-serif;
}

.app-shell {
  max-width: 1400px;
}

.container.pb-6 {
  padding-bottom: 7rem !important;
}

.hero-card,
.card-pro,
.list-card {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-radius: 28px;
  box-shadow: 0 18px 45px rgba(0,0,0,0.15);
}

.hero-card {
  padding: 24px;
}

.card-pro {
  padding: 24px;
}

.list-card {
  overflow: hidden;
}

.hero-top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.app-title {
  font-size: 2rem;
  font-weight: 800;
}

.app-title-sm {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
}

.results-pill {
  background: #eff6ff;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: bold;
  color: #1d4ed8;
}

.search-shell {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 999px;
  border: 1px solid #ddd;
  overflow: hidden;
}

.search-icon {
  padding: 10px;
}

.search-live-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 10px;
}

.search-clear-btn {
  border: none;
  background: none;
  cursor: pointer;
}

.toolbar-pills {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

.toolbar-pill {
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none;
  background: #f1f5f9;
  font-weight: bold;
}

.toolbar-pill.active {
  background: #2563eb;
  color: #fff;
}

/* ===== GRID ===== */

.list-header,
.user-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr 80px 70px;
  gap: 12px;
  align-items: center;
}

.list-header {
  background: #f8fafc;
  padding: 12px;
  font-weight: bold;
}

/* ===== FILAS ===== */

.user-row-card {
  display: block;
}

.user-row {
  padding: 12px;
  border-bottom: 1px solid #eee;
  transition: 0.2s;
}

.user-row:hover {
  background: #f1f5f9;
  transform: translateX(3px);
}

.clickable-row {
  cursor: pointer;
}

/* ===== TEXTO ===== */

.user-row-name {
  font-weight: bold;
}

.user-row-id {
  font-size: 12px;
  color: #2563eb;
}

.phone-link {
  text-decoration: none;
  color: #000;
}

.meta-main {
  font-weight: bold;
}

.meta-sub {
  font-size: 12px;
  color: gray;
}

.role-badge {
  background: #dbeafe;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: bold;
}

/* ===== FOTO MINI (CORREGIDA) ===== */

.mini-photo,
.mini-photo-placeholder {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
}

.mini-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ddd;
}

/* ===== SWITCH ===== */

.switch-btn {
  border: none;
  background: none;
  cursor: pointer;
}

.switch-track {
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: #ccc;
  display: flex;
  align-items: center;
  padding: 3px;
}

.switch-thumb {
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: 0.2s;
}

.switch-btn.on .switch-track {
  background: #22c55e;
}

.switch-btn.on .switch-thumb {
  transform: translateX(20px);
}

/* ===== FOTO GRANDE ===== */

.camera-box {
  width: 100%;
  max-width: 260px;
  height: 260px;
  border-radius: 20px;
  object-fit: cover;
}

.user-photo-placeholder {
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== BOTÓN FLOTANTE ===== */

.fab-new-user {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: linear-gradient(135deg,#111827,#2563eb);
  color: #fff;
  padding: 14px 18px;
  border-radius: 999px;
  font-weight: bold;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  text-decoration: none;
}

.fab-new-user:hover {
  transform: translateY(-2px);
}

/* ===== MODAL IMAGEN ===== */

.image-preview-modal {
  position: fixed;
  inset: 0;
  display: none;
}

.image-preview-modal.show {
  display: block;
}

.image-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.9);
}

.image-preview-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.image-preview-full {
  max-width: 95%;
  max-height: 80%;
  border-radius: 20px;
}

.image-preview-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  font-size: 20px;
  border-radius: 50%;
  width: 40px;
  height: 40px;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 768px) {
  .list-header {
    display: none;
  }

  .user-row {
    grid-template-columns: 1fr 60px;
  }

  .user-col-photo {
    grid-column: 2;
    grid-row: span 5;
  }
}