/* ============================================
   EMPYREAN — ADMIN COMPONENTS
   ============================================ */

/* ─── Botones redondos ──────────────────────── */
.btn-round {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-size: 0.9rem;
}
.btn-edit { background: #f0eaff; color: var(--primary); border: 1px solid #e0d0f0; }
.btn-edit:hover {
  background: var(--info);
  color: white;
  border-color: var(--info);
  transform: rotate(15deg) scale(1.1);
  box-shadow: 0 5px 15px rgba(41, 182, 246, 0.3);
}
.btn-del { background: #fff0f0; color: var(--danger); border: 1px solid #ffd0d0; }
.btn-del:hover {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 5px 15px rgba(255, 71, 87, 0.3);
}

/* ─── Service item ──────────────────────────── */
.service-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fdfaff;
  padding: 11px 14px;
  border-radius: 16px;
  margin-bottom: 7px;
  border: 1px solid #f0e8f5;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
.service-item:hover {
  background: #faf4ff;
  border-color: #e8d5f0;
  transform: translateX(4px);
  box-shadow: 0 4px 14px rgba(96, 32, 96, 0.08);
}
.service-item.selected {
  background: #fdf2ff;
  border: 2px solid var(--primary);
  transform: scale(0.98);
  box-shadow: inset 0 0 10px rgba(96, 32, 96, 0.1);
}

/* ─── Drag & Drop ───────────────────────────── */
.drag-handle {
  cursor: grab;
  color: #b2bec3;
  padding: 12px 14px 12px 4px;
  margin-left: -4px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  min-width: 40px;
  justify-content: center;
}
.drag-handle:hover,
.drag-handle:active { color: var(--primary); cursor: grabbing; }
.drag-handle svg { pointer-events: none; width: 20px; height: 20px; }
.sortable-ghost  { opacity: 0.4; background: #fdf2ff !important; border: 1px dashed var(--primary) !important; }
.sortable-drag   { background: white !important; box-shadow: 0 20px 45px rgba(96, 32, 96, 0.22) !important; border-color: var(--primary) !important; cursor: grabbing !important; transform: scale(1.02) !important; }
.sortable-chosen { background: #fdf2ff !important; border-color: var(--primary) !important; }

/* ─── Category accordion ────────────────────── */
.category-accordion {
  background: white;
  border-radius: 20px;
  margin-bottom: 15px;
  border: 1px solid #fbf4fb;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}
.category-header {
  padding: 16px 20px;
  background: #fdfdfd;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 700;
  color: var(--primary);
  transition: background 0.25s ease, padding-left 0.25s ease;
  border-bottom: 1px solid transparent;
}
.category-header:hover { background: #fdf2ff; padding-left: 24px; }
.category-header.open  { border-bottom-color: #fbf4fb; }
.category-content { display: none; padding: 15px; background: white; }
.category-content.open { display: block; animation: popIn 0.3s ease-out; }
.category-icon { transition: transform 0.3s ease; font-size: 0.9rem; }
.category-icon.open { transform: rotate(180deg); }

/* ─── MSG collapsable ───────────────────────── */
.msg-collapsable {
  background: #fdfaff;
  border: 1px solid #ede0f5;
  border-radius: 18px;
  margin-bottom: 10px;
  overflow: hidden;
}
.msg-collapsable summary {
  padding: 14px 18px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  transition: background 0.2s;
}
.msg-collapsable summary::-webkit-details-marker { display: none; }
.msg-collapsable summary:hover { background: #f5eaff; }
.msg-collapsable[open] summary { border-bottom: 1px solid #ede0f5; background: #f8f0ff; }

/* ─── Edit mode bar ─────────────────────────── */
#editModeBar {
  background: linear-gradient(135deg, var(--info), #0288d1);
  color: white;
  padding: 14px 20px;
  text-align: center;
  font-weight: 800;
  display: none;
  justify-content: space-between;
  align-items: center;
  border-radius: 0 0 24px 24px;
  margin-bottom: 18px;
  box-shadow: 0 8px 20px rgba(41, 182, 246, 0.35);
  letter-spacing: 0.3px;
  animation: popIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ─── Bulk action bar ───────────────────────── */
.bulk-action-bar {
  display: none;
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  padding: 16px 20px;
  border-radius: 28px;
  box-shadow:
    0 25px 60px rgba(96, 32, 96, 0.3),
    0 0 0 1px rgba(96, 32, 96, 0.1);
  z-index: 4000;
  width: 90%;
  max-width: 400px;
  text-align: center;
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid var(--primary);
}
.bulk-btn-row { display: flex; gap: 8px; margin-top: 10px; }
.bulk-btn {
  flex: 1;
  padding: 10px;
  border-radius: 12px;
  border: none;
  font-weight: bold;
  cursor: pointer;
  font-size: 0.8rem;
  transition: transform 0.1s;
}
.bulk-btn:active { transform: scale(0.95); }
.bulk-btn.yes { background: #e0f2f1; color: var(--success); }
.bulk-btn.no  { background: #fff8e1; color: var(--warning); }
.bulk-btn.del { background: #ffebee; color: var(--danger); }

/* ─── Neon controls (burbuja) ───────────────── */
.neon-controls {
  background: #fdfdfd;
  border: 1px solid #fbf4fb;
  padding: 15px;
  border-radius: 20px;
  margin-top: 15px;
}
.neon-controls-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

/* ─── Custom category picker ────────────────── */
#fieldCategoriaTrigger:hover { border-color: var(--primary) !important; }
#fieldCategoriaDropdown::-webkit-scrollbar { width: 4px; }
#fieldCategoriaDropdown::-webkit-scrollbar-track { background: #fdf2ff; }
#fieldCategoriaDropdown::-webkit-scrollbar-thumb { background: #d4b8e8; border-radius: 99px; }

/* ─── Select optgroup ───────────────────────── */
optgroup { font-weight: bold; color: var(--primary); background: #fff; font-style: normal; }
optgroup option { color: var(--text); font-weight: 500; }

/* ══════════════════════════════════════════════════
   MODO FIESTA — Emperean Spa milestone celebrations
   ══════════════════════════════════════════════════ */

/* Banner principal */
@keyframes partyBannerIn {
  0%   { transform: translateX(-50%) translateY(-120px) scale(0.85); opacity: 0; }
  65%  { transform: translateX(-50%) translateY(8px)   scale(1.04);  opacity: 1; }
  100% { transform: translateX(-50%) translateY(0)     scale(1);     opacity: 1; }
}
@keyframes partyGlowPulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--party-color) 0%, transparent); }
  50%       { box-shadow: 0 0 28px 6px color-mix(in srgb, var(--party-color) 35%, transparent); }
}
@keyframes partyFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-5px); }
}
@keyframes partyIndicatorIn {
  0%   { transform: translateX(80px); opacity: 0; }
  100% { transform: translateX(0);    opacity: 1; }
}
@keyframes partyRainbow {
  0%   { border-color: #ff6b6b; }
  16%  { border-color: #feca57; }
  33%  { border-color: #48dbfb; }
  50%  { border-color: #a29bfe; }
  66%  { border-color: #fd79a8; }
  83%  { border-color: #54a0ff; }
  100% { border-color: #ff6b6b; }
}

.party-banner {
  position: fixed;
  top: 22px;
  left: 50%;
  transform: translateX(-50%) translateY(-120px);
  background: linear-gradient(135deg, #1a0530 0%, #2d0a52 100%);
  color: #fff;
  border: 2px solid var(--party-color, #e91e63);
  border-radius: 26px;
  padding: 20px 36px 16px;
  font-family: Poppins, sans-serif;
  text-align: center;
  min-width: 290px;
  max-width: 380px;
  z-index: 99999;
  box-shadow: 0 24px 64px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.05);
  animation: partyBannerIn 0.8s cubic-bezier(0.175,0.885,0.32,1.275) forwards,
             partyFloat     3s ease-in-out 0.8s infinite;
  cursor: default;
}
.party-banner-close {
  position: absolute;
  top: 10px; right: 14px;
  background: none; border: none;
  color: rgba(255,255,255,0.45);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 50%;
  transition: color 0.2s, background 0.2s;
}
.party-banner-close:hover { color: #fff; background: rgba(255,255,255,0.1); }
.party-banner-emoji  { display: block; font-size: 2.6rem; margin-bottom: 6px; line-height: 1; }
.party-banner-title  { display: block; font-size: 1.3rem; font-weight: 800; letter-spacing: -0.3px; }
.party-banner-sub    { display: block; font-size: 0.82rem; opacity: 0.75; margin-top: 4px; font-weight: 400; }
.party-banner-timer  { display: block; font-size: 0.7rem; opacity: 0.5; margin-top: 8px; font-weight: 400; }

/* Indicador flotante persistente (esquina inferior derecha) */
.party-indicator {
  position: fixed;
  bottom: 80px;
  right: 16px;
  background: linear-gradient(135deg, #1a0530, #2d0a52);
  border: 1.5px solid var(--party-color, #e91e63);
  border-radius: 99px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  z-index: 9990;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  animation: partyIndicatorIn 0.5s cubic-bezier(0.175,0.885,0.32,1.275) forwards,
             partyGlowPulse    2.5s ease-in-out 0.5s infinite;
  transition: transform 0.2s;
}
.party-indicator:hover { transform: scale(1.07); }
.party-ind-emoji { font-size: 1.1rem; line-height: 1; }
.party-ind-label { font-family: Poppins, sans-serif; font-size: 0.72rem; font-weight: 700; color: #fff; letter-spacing: 0.5px; }

/* Efecto arcoíris en tarjetas stat mientras party-mode está activo */
body.party-mode .stat-card:first-child,
body.party-mode #kpiTotalCitas {
  animation: partyRainbow 4s linear infinite;
  border-width: 2px;
}
