/* ============================================
   Luna Del Desierto — Design System
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@500;700&display=swap');

:root {
  /* Colors */
  --bg-dark: #0f1115;
  --bg-card: #181b21;
  --bg-hover: #22262e;
  
  --primary: #d4af37; /* Dorado desierto */
  --accent: #d4af37;
  --primary-hover: #b8962c;
  --primary-glow: rgba(212, 175, 55, 0.2);
  
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;

  /* Geometry */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  
  /* Effects */
  --shadow-sm: 0 4px 6px -1px rgba(0,0,0,0.3);
  --shadow-glow: 0 0 20px var(--primary-glow);
  --glass-bg: rgba(24, 27, 33, 0.7);
  --glass-border: rgba(255, 255, 255, 0.05);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 13px; /* Base compacta: reduce todo proporcional */
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: auto;
}

select option {
  background-color: var(--bg-card) !important;
  color: var(--text-main) !important;
}

h1, h2, h3, h4, h5 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
}

a { text-decoration: none; color: inherit; }

/* --- Layout --- */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 220px;
  background-color: var(--bg-card);
  border-right: 1px solid var(--glass-border);
  padding: 1.25rem 0.75rem;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 100;
  overflow-y: auto;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Slim scrollbar for sidebar */
.sidebar::-webkit-scrollbar {
  width: 4px;
}
.sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.5rem;
  padding: 0 0.5rem;
}

.brand-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary), #fcd34d);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font-weight: bold;
}

.brand-name {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: white;
  letter-spacing: 0.5px;
}

.nav-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.nav-item {
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 9px;
}

.nav-item:hover {
  background-color: var(--bg-hover);
  color: #fff;
}

.nav-item:hover i {
  color: var(--primary) !important;
}

.nav-item.active {
  background-color: var(--primary-glow);
  color: var(--primary);
  border: 1px solid rgba(212, 175, 55, 0.25);
  font-weight: 600;
}

.nav-item.active i {
  color: var(--primary) !important;
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}

/* Módulos Principales (Padres del Menú) con acento dorado elegante */
#nav-hoteleria-parent i:first-child,
#nav-alimentacion-parent i:first-child,
#nav-bodega i:first-child,
#nav-admin-parent i:first-child {
  color: var(--primary);
  filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.25));
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: 220px;
  padding: 1.25rem 1.75rem;
  min-width: 0;
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.sidebar-collapsed .sidebar {
  transform: translateX(-100%);
}

body.sidebar-collapsed .main-content {
  margin-left: 0;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.header-title h1 {
  font-size: 1.35rem;
  margin-bottom: 0.15rem;
}

.header-title p {
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* --- Components --- */

/* Cards (Glassmorphism) */
.card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}

/* Stat Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.25rem;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
  border-color: rgba(212, 175, 55, 0.3);
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--primary);
  border: 1px solid var(--glass-border);
  flex-shrink: 0;
}

.stat-info h3 {
  font-family: 'Inter', sans-serif;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 500;
  margin-bottom: 0.15rem;
}

.stat-info .value {
  font-size: 1.4rem;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  color: white;
}

/* Buttons */
.btn {
  padding: 0.42rem 0.9rem;
  border-radius: var(--radius-sm);
  border: none;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #000;
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--glass-border);
}

.btn-outline:hover {
  background: var(--bg-hover);
  border-color: var(--text-muted);
}

/* Tables */
.table-container {
  overflow-x: auto;
  /* Scroll suave con indicador visual */
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 175, 55, 0.3) transparent;
}

.table-container::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}
.table-container::-webkit-scrollbar-track,
.table-responsive::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.03);
  border-radius: 4px;
}
.table-container::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.35);
  border-radius: 4px;
}
.table-container::-webkit-scrollbar-thumb:hover,
.table-responsive::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 175, 55, 0.6);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 800px; /* Fuerza scroll antes de romper el diseño */
}

th, td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--glass-border);
  white-space: nowrap;
}

th {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

td {
  font-size: 0.8rem;
}

tr:hover td {
  background-color: rgba(255, 255, 255, 0.02);
}

/* Badges */
.badge {
  display: inline-block;
  white-space: nowrap;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-success { background: rgba(16, 185, 129, 0.1); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.2); }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.2); }
.badge-danger { background: rgba(239, 68, 68, 0.1); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.2); }
.badge-info { background: rgba(59, 130, 246, 0.1); color: var(--info); border: 1px solid rgba(59, 130, 246, 0.2); }

/* Login specific */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: radial-gradient(circle at top right, rgba(212, 175, 55, 0.08) 0%, transparent 40%),
              radial-gradient(circle at bottom left, rgba(136, 45, 97, 0.12) 0%, transparent 50%),
              #0f1115;
  position: relative;
  overflow: hidden;
}

/* Luxury ambient background glows */
.login-container::before {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.06) 0%, rgba(212, 175, 55, 0) 70%);
  top: 15%;
  left: 20%;
  pointer-events: none;
  filter: blur(40px);
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 3rem 2.5rem;
  background: rgba(24, 27, 33, 0.8);
  border: 1px solid rgba(212, 175, 55, 0.15); /* Elegant gold tinted border */
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(212, 175, 55, 0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 10;
}

.login-card .brand {
  justify-content: center;
  margin-bottom: 2rem;
  flex-direction: column;
  gap: 1rem;
}

/* Premium Rotating Rings for Branding logo */
.brand-logo-container {
  position: relative;
  width: 90px;
  height: 90px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
  z-index: 2;
}

.brand-logo-container:hover .brand-logo-img {
  transform: scale(1.06);
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.5);
}

.brand-logo-ring-outer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  border: 1px dashed rgba(212, 175, 55, 0.35);
  animation: rotateClockwise 25s linear infinite;
  pointer-events: none;
  z-index: 1;
}

.brand-logo-ring-inner {
  position: absolute;
  top: 4px;
  left: 4px;
  right: 4px;
  bottom: 4px;
  border-radius: 50%;
  border: 1px solid rgba(136, 45, 97, 0.25);
  animation: rotateCounterClockwise 15s linear infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes rotateClockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes rotateCounterClockwise {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

/* Sidebar Specific Logo styling */
.sidebar-logo-container {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-logo-img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--primary);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
  transition: transform 0.3s ease;
  z-index: 2;
}

.sidebar-logo-ring {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  border: 0.8px dashed rgba(212, 175, 55, 0.4);
  animation: rotateClockwise 30s linear infinite;
  pointer-events: none;
  z-index: 1;
}

.brand:hover .sidebar-logo-img {
  transform: scale(1.08);
}


.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.form-control {
  width: 100%;
  padding: 0.8rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: white;
  font-family: inherit;
  transition: all 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

/* Gold styling for date/month picker calendar icons */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator {
  filter: invert(78%) sepia(35%) saturate(854%) hue-rotate(5deg) brightness(93%) contrast(87%);
  cursor: pointer;
  border: 1px solid var(--primary);
  border-radius: 4px;
  padding: 4px;
  background-color: rgba(212, 175, 55, 0.12);
  transition: all 0.2s ease;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="month"]::-webkit-calendar-picker-indicator:hover {
  transform: scale(1.1);
  background-color: rgba(212, 175, 55, 0.25);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}


select.form-control option {
  background-color: var(--bg-card);
  color: white;
}

/* Utilities */
.hidden { display: none !important; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

/* Backdrop / Overlay para móviles y tablets */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* Responsive (Celulares y Tablets hasta 1024px) */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 999;
    width: 270px;
    box-shadow: none;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 10px 0 35px rgba(0,0,0,0.85);
  }
  .main-content {
    margin-left: 0 !important;
    padding: 0.85rem 1rem;
    max-width: 100vw;
    overflow-x: hidden;
  }
  #mobile-menu-btn {
    display: flex !important;
  }
  .header {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
  }
  .header-actions {
    width: auto;
    flex-wrap: wrap;
    gap: 0.6rem;
  }
  #notification-dropdown {
    right: -10px !important;
    width: min(340px, 92vw) !important;
    max-width: 95vw !important;
  }
  [style*="grid-template-columns: 2fr 1fr 1fr"],
  [style*="grid-template-columns: 1.2fr 0.8fr"],
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  .modal-content {
    width: 95% !important;
    padding: 1.2rem 1rem !important;
    margin: 1rem auto !important;
  }
}

@media (max-width: 600px) {
  .sidebar {
    width: 82vw;
    max-width: 300px;
  }
  .header-title h1 {
    font-size: 1.15rem;
  }
  .header-title p {
    font-size: 0.72rem;
  }
  .table-container {
    -webkit-overflow-scrolling: touch;
  }
}

/* Modal Styles — Premium Popup Layout */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.modal-content {
  width: 90%;
  max-width: 650px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  animation: modalFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes bellRing {
  0% { transform: rotate(0); }
  10% { transform: rotate(15deg); }
  20% { transform: rotate(-10deg); }
  30% { transform: rotate(10deg); }
  40% { transform: rotate(-10deg); }
  50% { transform: rotate(5deg); }
  60% { transform: rotate(-5deg); }
  70% { transform: rotate(0); }
  100% { transform: rotate(0); }
}

.ring-animation {
  animation: bellRing 1s ease-in-out;
  color: var(--primary) !important;
}

/* Persistent slow wiggle & glow for bell when unread notifications are present */
@keyframes bellSlowPulse {
  0%, 100% { transform: rotate(0) scale(1); filter: drop-shadow(0 0 2px var(--primary)); }
  25% { transform: rotate(5deg) scale(1.05); }
  50% { transform: rotate(0) scale(1); filter: drop-shadow(0 0 8px var(--primary)); }
  75% { transform: rotate(-5deg) scale(1.05); }
}

.bell-unread-pulse {
  animation: bellSlowPulse 2s infinite ease-in-out;
  color: var(--primary) !important;
}

/* Connection Status Dot indicators */
.status-dot-online {
  background-color: #2ecc71 !important;
  box-shadow: 0 0 8px #2ecc71, 0 0 15px rgba(46, 204, 113, 0.4);
}

.status-dot-offline {
  background-color: #e74c3c !important;
  box-shadow: 0 0 8px #e74c3c, 0 0 15px rgba(231, 76, 60, 0.4);
}

/* Notification badge pulse animation */
@keyframes badgePulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 6px rgba(231, 76, 60, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(231, 76, 60, 0); }
}

#notification-badge {
  animation: badgePulse 2s infinite;
}

/* Hover effects for notification capsule and bell */
.notification-bell-container {
  transition: all 0.3s ease;
}

.notification-bell-container:hover {
  border-color: rgba(212, 175, 55, 0.3) !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

.notification-bell:hover i {
  color: var(--primary) !important;
  transform: scale(1.1);
  transition: transform 0.2s, color 0.2s;
}

/* Premium styled notification cards */
.notification-item {
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.82rem;
  text-align: left;
  transition: background 0.2s;
  border-left: 3px solid transparent;
}

.notification-item:hover {
  background: rgba(255, 255, 255, 0.02);
}

.notification-item.booking {
  border-left-color: #2ecc71; /* Green */
}

.notification-item.status-update {
  border-left-color: #3498db; /* Blue */
}

.notification-item.system {
  border-left-color: #f39c12; /* Orange */
}

/* Bot Mode Toggle hover */
#bot-mode-toggle-wrap:hover {
  border-color: rgba(212, 175, 55, 0.5);
  background: rgba(255,255,255,0.07);
  transform: translateY(-1px);
  transition: all 0.2s ease;
}

/* Toast slide-in animation */
@keyframes slideInToast {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   Rooms — Drag & Drop + Lock
   ============================================ */

/* Drag handle */
.room-drag-handle {
  user-select: none;
  padding: 0.1rem 0.2rem;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}
.room-drag-handle:hover {
  color: var(--primary) !important;
  background: rgba(212,175,55,0.08);
}

/* Row being dragged */
tr[draggable="true"]:active .room-drag-handle {
  cursor: grabbing !important;
}

/* Lock button hover */
.room-lock-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 8px rgba(212,175,55,0.25);
}

/* Locked row subtle highlight */
tr[data-locked="true"] {
  position: relative;
}
tr[data-locked="true"]::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #d4af37, #b8962c);
  border-radius: 0 2px 2px 0;
}

/* Drop target indicator */
tr.drag-over {
  border-top: 2px solid #d4af37 !important;
  background: rgba(212,175,55,0.05) !important;
}

/* Quick filter tabs styles */
.booking-filters {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.85rem;
  flex-wrap: wrap;
}

.filter-tab {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  padding: 0.45rem 1rem;
  border-radius: 30px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filter-tab:hover {
  background: rgba(212, 175, 55, 0.05);
  border-color: rgba(212, 175, 55, 0.25);
  color: var(--accent);
}

.filter-tab.active {
  background: rgba(212, 175, 55, 0.12);
  border-color: var(--primary);
  color: var(--accent);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.15);
}

/* Colored timing badges for dates */
.month-badge {
  display: inline-block;
  white-space: nowrap;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  margin-left: 0.5rem;
}

.month-badge-current {
  background: rgba(16, 185, 129, 0.08);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.15);
}

.month-badge-next {
  background: rgba(59, 130, 246, 0.08);
  color: var(--info);
  border: 1px solid rgba(59, 130, 246, 0.15);
}

.month-badge-future {
  background: rgba(142, 68, 173, 0.08);
  color: #a55eea;
  border: 1px solid rgba(142, 68, 173, 0.15);
}

.month-badge-past {
  background: rgba(156, 163, 175, 0.08);
  color: var(--text-muted);
  border: 1px solid rgba(156, 163, 175, 0.15);
}

/* Mini Copy Button & Utilities */
.copyable-data {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-copy-mini {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-copy-mini:hover {
  color: var(--primary);
  background: rgba(212, 175, 55, 0.08);
}

.btn-copy-mini i {
  font-size: 0.78rem;
}

/* ============================================
   Receptionist (Read-Only) Role Restrictions
   ============================================ */
body[data-role="receptionist"] #nav-accounts,
body[data-role="receptionist"] #nav-backup,
body[data-role="receptionist"] button[onclick*="openNewBookingModal"],
body[data-role="receptionist"] button[onclick*="openAddPropertyModal"],
body[data-role="receptionist"] button[onclick*="openStaffModal"],
body[data-role="receptionist"] button[onclick*="openCatalogModal"],
body[data-role="receptionist"] button[onclick*="importDatabase"],
body[data-role="receptionist"] button[onclick*="resetTestData"],
body[data-role="receptionist"] button[onclick*="save"],
body[data-role="receptionist"] button[onclick*="openNuevo"],
body[data-role="receptionist"] button[onclick*="openAddResidencia"],
body[data-role="receptionist"] button[onclick*="openGenerarMinuta"],
body[data-role="receptionist"] button[onclick*="openConsumoModal"],
body[data-role="receptionist"] button[onclick*="cleanupStorageAction"],
body[data-role="receptionist"] button[onclick*="openEntregarModal"],
body[data-role="receptionist"] button[onclick*="openDespachoEstadoModal"],
body[data-role="receptionist"] button[onclick*="openCreateDespachoModal"],
body[data-role="receptionist"] button[onclick*="openEdit"],
body[data-role="receptionist"] button[onclick*="deleteDespachoAction"],
body[data-role="receptionist"] button[onclick*="openResolverModal"],
body[data-role="receptionist"] button[onclick*="removeStaff"],
body[data-role="receptionist"] button[onclick*="sendTestNotify"],
body[data-role="receptionist"] button[onclick*="deleteTaskManual"],
body[data-role="receptionist"] button[onclick*="completeTaskManual"],
body[data-role="receptionist"] button[onclick*="sendQuoteViaWhatsApp"],
body[data-role="receptionist"] button[type="submit"]:not(#login-form button):not(#catalog-pin-modal button),
body[data-role="receptionist"] select#bot-mode-select,
body[data-role="receptionist"] .room-drag-handle,
body[data-role="receptionist"] .room-lock-btn,
body[data-role="receptionist"] .action-btn,
body[data-role="receptionist"] .btn-danger,
body[data-role="receptionist"] button[onclick*="delete"],
body[data-role="receptionist"] button[onclick*="edit"],
body[data-role="receptionist"] button[onclick*="confirm"],
body[data-role="receptionist"] button[onclick*="cancel"],
body[data-role="receptionist"] td button[onclick*="changeStatus"],
body[data-role="receptionist"] tr[draggable="true"] {
  display: none !important;
  pointer-events: none !important;
}

body[data-role="receptionist"] tr[draggable="true"] {
  cursor: default !important;
}

/* Notification Items Styling */
.notification-item {
  padding: 1rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.1);
  transition: background 0.2s;
  cursor: pointer;
  border-left: 4px solid transparent;
}
.notification-item:hover {
  background: rgba(212, 175, 55, 0.05);
}
.notification-item.booking {
  border-left-color: #2ecc71;
}
.notification-item.booking-bot {
  border-left-color: #9b59b6;
  background: rgba(155, 89, 182, 0.05);
}
.notification-item.status-update {
  border-left-color: #3498db;
}
.notification-item.system {
  border-left-color: #f39c12;
}

/* Online Users Avatar Stack */
.avatar-stack {
  display: flex;
  align-items: center;
  margin-right: 1rem;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.85rem;
  border: 2px solid var(--bg);
  margin-left: -10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  cursor: pointer;
  transition: transform 0.2s, z-index 0.2s;
  position: relative;
  text-transform: uppercase;
}

.avatar:hover {
  transform: translateY(-3px);
  z-index: 10 !important;
}

.avatar:first-child {
  margin-left: 0;
}

.avatar[data-role="super_admin"] { background: #2ecc71; }
.avatar[data-role="admin"] { background: #f39c12; }
.avatar[data-role="receptionist"] { background: #3498db; }

/* ============================================
   Custom Premium Tooltips
   ============================================ */
.luna-tooltip-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: help;
}

.luna-tooltip-icon {
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.5;
  margin-left: 5px;
  transition: all 0.2s ease;
}

.luna-tooltip-icon:hover {
  opacity: 1;
  color: var(--primary);
}

.luna-tooltip-text {
  visibility: hidden;
  width: 240px;
  background: rgba(24, 27, 33, 0.95);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: var(--text-main);
  text-align: left;
  border-radius: 8px;
  padding: 8px 12px;
  position: absolute;
  z-index: 1000;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  font-size: 0.78rem;
  line-height: 1.35;
  pointer-events: none;
  font-family: 'Inter', sans-serif;
  font-weight: normal;
  text-transform: none;
  letter-spacing: normal;
}

.luna-tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: rgba(212, 175, 55, 0.3) transparent transparent transparent;
}

.luna-tooltip-container:hover .luna-tooltip-text {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

/* KPI Card Tooltip Placement */
.kpi-card-help {
  position: absolute;
  top: 8px;
  right: 10px;
  cursor: help;
}

.kpi-card-help .luna-tooltip-text {
  width: 250px;
  bottom: 130%;
  right: 0;
  left: auto;
  transform: translateX(10%);
}

.kpi-card-help .luna-tooltip-text::after {
  left: auto;
  right: 15px;
  margin-left: 0;
}

.kpi-card-help:hover .luna-tooltip-text {
  visibility: visible;
  opacity: 1;
  transform: translateX(10%) translateY(-2px);
}

/* Table Header Specific Tooltip Placements for Rightmost Columns */
th:nth-last-child(-n+3) .luna-tooltip-text {
  left: auto;
  right: 0;
  transform: translateX(0);
}

th:nth-last-child(-n+3) .luna-tooltip-text::after {
  left: auto;
  right: 15px;
  margin-left: 0;
}

th:nth-last-child(-n+3):hover .luna-tooltip-text {
  transform: translateX(0) translateY(-2px);
}

/* Global & SweetAlert2 Golden Scrollbars */
::-webkit-scrollbar,
.swal2-html-container::-webkit-scrollbar,
.swal2-popup::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}
::-webkit-scrollbar-track,
.swal2-html-container::-webkit-scrollbar-track,
.swal2-popup::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.03);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb,
.swal2-html-container::-webkit-scrollbar-thumb,
.swal2-popup::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.35);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover,
.swal2-html-container::-webkit-scrollbar-thumb:hover,
.swal2-popup::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 175, 55, 0.6);
}





/* ============================================
   Cocina Role Restrictions
   ============================================ */
body[data-role='cocina'] #nav-hoteleria-parent,
body[data-role='cocina'] #submenu-hoteleria,
body[data-role='cocina'] #nav-admin-parent,
body[data-role='cocina'] #submenu-admin {
    display: none !important;
}

body[data-role='cocina'] #submenu-alimentacion > .nav-item:not(#nav-food-pedidos-cocina):not(#nav-food-menu-empresas) {
    display: none !important;
}
