/* ==========================================================================
   Hostal El Descanso — Recepcion Dashboard
   Design: Luxury Boutique Hotel Software
   Typography: Outfit (display/body) + JetBrains Mono (data/monospace)
   ========================================================================== */


/* ==========================================================================
   1. CSS VARIABLES & DESIGN TOKENS
   ========================================================================== */

:root {
  /* Background Layers — true dark with clear contrast between levels */
  --bg-0: #08080A;
  --bg-1: #111114;
  --bg-2: #1B1B1F;
  --bg-3: #27272A;
  --bg-4: #3F3F46;

  /* Alpha borders — blend better with any background */
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.10);
  --border-focus: rgba(255, 255, 255, 0.14);

  /* Text hierarchy */
  --text-0: #FAFAFA;
  --text-1: #A1A1AA;
  --text-2: #71717A;

  /* Amber accent — hostal brand identity */
  --accent: #F59E0B;
  --accent-hover: #D97706;
  --accent-subtle: rgba(245, 158, 11, 0.10);
  --accent-glow: rgba(245, 158, 11, 0.04);

  /* Semantic Colors */
  --success: #22C55E;
  --danger: #EF4444;
  --info: #3B82F6;
  --warning: #EAB308;
  --purple: #A855F7;
  --pink: #EC4899;

  /* Cell colors — high visibility with semi-transparent fills */
  --celda-libre: rgba(34, 197, 94, 0.12);
  --celda-libre-hover: rgba(34, 197, 94, 0.25);
  --celda-ocupada: rgba(239, 68, 68, 0.18);
  --celda-ocupada-hover: rgba(239, 68, 68, 0.32);
  --celda-checkin: rgba(59, 130, 246, 0.22);
  --celda-checkin-hover: rgba(59, 130, 246, 0.35);
  --celda-checkout: rgba(245, 158, 11, 0.22);
  --celda-checkout-hover: rgba(245, 158, 11, 0.35);
  --celda-bloqueada: rgba(113, 113, 122, 0.15);
  --celda-reservada: rgba(168, 85, 247, 0.20);

  /* Shadow system */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.15);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.2), 0 1px 2px rgba(0,0,0,0.12);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.25);
  --shadow-lg: 0 12px 32px -4px rgba(0,0,0,0.4);
  --shadow-xl: 0 24px 48px -12px rgba(0,0,0,0.5);

  /* Layout */
  --sidebar-width: 240px;
  --sidebar-collapsed-width: 60px;
  --panel-width: 380px;

  /* Radius — larger for modern hospitality feel */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;

  /* Typography */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;

  /* Transitions */
  --transition-fast: 0.1s ease;
  --transition: 0.15s ease;
  --transition-medium: 0.25s ease;
  --transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}


/* ==========================================================================
   2. RESET & BASE
   ========================================================================== */

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

html {
  font-size: 14px;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-0);
  background: var(--bg-0);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

/* Subtle noise texture overlay on body */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99999;
  opacity: 0.018;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

a {
  color: var(--accent);
  text-decoration: none;
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  outline: none;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: var(--text-0);
  outline: none;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--bg-4);
  border-radius: 100px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.15);
}

::selection {
  background: rgba(245, 158, 11, 0.25);
  color: var(--text-0);
}


/* ==========================================================================
   3. UTILITY CLASSES
   ========================================================================== */

.hidden {
  display: none !important;
}

.mono,
.jb-mono {
  font-family: var(--font-mono);
  font-feature-settings: 'tnum' 1, 'ss01' 1;
}

.text-warning {
  color: var(--warning);
  font-size: 0.8rem;
}

.text-muted {
  color: var(--text-2);
  font-size: 0.8rem;
}


/* ==========================================================================
   4. LOGIN SCREEN
   ========================================================================== */

.login-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  background: var(--bg-0);
  overflow: hidden;
}

/* Dramatic gradient mesh background */
.login-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 50%, rgba(245, 158, 11, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 25% 80%, rgba(59, 130, 246, 0.05) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 80% 20%, rgba(168, 85, 247, 0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* Floating ambient particle effect */
.login-screen::after {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(245, 158, 11, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  animation: loginPulse 8s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

.login-ambient {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.login-ambient::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  top: -100px;
  right: -100px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.04) 0%, transparent 70%);
  border-radius: 50%;
  animation: ambientFloat1 12s ease-in-out infinite;
}

.login-ambient::after {
  content: '';
  position: absolute;
  width: 350px;
  height: 350px;
  bottom: -80px;
  left: -80px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.04) 0%, transparent 70%);
  border-radius: 50%;
  animation: ambientFloat2 15s ease-in-out infinite;
}

.login-card {
  position: relative;
  z-index: 1;
  width: 440px;
  max-width: 92vw;
  padding: 56px 44px;
  background: rgba(17, 17, 20, 0.75);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-xl);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.03),
    var(--shadow-xl),
    0 0 120px -20px rgba(245, 158, 11, 0.06);
  text-align: center;
  animation: loginCardIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.login-logo {
  margin: 0 auto 24px;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-subtle);
  border-radius: 20px;
  border: 1px solid rgba(245, 158, 11, 0.12);
  box-shadow: 0 0 40px rgba(245, 158, 11, 0.08);
}

.login-logo svg {
  width: 48px;
  height: 48px;
}

.login-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-0);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  line-height: 1.2;
}

.login-subtitle {
  font-size: 0.9rem;
  color: var(--text-2);
  margin-bottom: 36px;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.login-field {
  margin-bottom: 20px;
  text-align: left;
}

.login-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-1);
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}

.login-input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-0);
  font-size: 0.95rem;
  transition: all var(--transition);
}

.login-input::placeholder {
  color: var(--text-2);
  opacity: 0.6;
}

.login-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12), 0 0 20px rgba(245, 158, 11, 0.04);
  background: var(--bg-1);
}

.login-error {
  color: var(--danger);
  font-size: 0.8rem;
  margin-bottom: 12px;
  min-height: 1.2em;
  text-align: left;
  padding: 0 2px;
}

.login-btn {
  width: 100%;
  height: 50px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #000;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  letter-spacing: 0.01em;
  margin-top: 8px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(245, 158, 11, 0.15);
}

.login-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.25);
}

.login-btn:hover::before {
  opacity: 1;
}

.login-btn:active {
  transform: translateY(0);
}

.login-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.login-btn-text {
  transition: opacity var(--transition);
}

.login-btn.loading .login-btn-text {
  opacity: 0;
}

.login-btn-spinner {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-btn.loading .login-btn-spinner {
  display: flex !important;
}

.spinner-svg {
  animation: spin 0.8s linear infinite;
}


/* ==========================================================================
   5. DASHBOARD LAYOUT
   ========================================================================== */

.dashboard {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr var(--panel-width);
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  transition: grid-template-columns var(--transition-slow);
}

.dashboard.sidebar-collapsed {
  grid-template-columns: var(--sidebar-collapsed-width) 1fr var(--panel-width);
}


/* ==========================================================================
   6. SIDEBAR
   ========================================================================== */

.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--bg-1) 0%, rgba(17,17,20,0.97) 100%);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  overflow-x: hidden;
  transition: width var(--transition-slow);
  position: relative;
  z-index: 100;
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .sidebar-brand-text,
.sidebar.collapsed .sidebar-nav-item span,
.sidebar.collapsed .sidebar-section-title span,
.sidebar.collapsed .today-card,
.sidebar.collapsed .quick-actions,
.sidebar.collapsed .sidebar-section:has(.search-box),
.sidebar.collapsed .sidebar-user-name,
.sidebar.collapsed .sidebar-divider {
  display: none;
}

.sidebar.collapsed .sidebar-brand {
  justify-content: center;
  padding: 16px 8px;
}

.sidebar.collapsed .sidebar-nav-item {
  justify-content: center;
  padding: 12px;
}

.sidebar.collapsed .sidebar-collapse-btn {
  display: none;
}

/* --- Sidebar Brand --- */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 16px;
  position: relative;
}

.sidebar-brand::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20px;
  right: 20px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0.2;
}

.sidebar-logo {
  width: 36px;
  height: 36px;
  min-width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-subtle);
  border-radius: var(--radius);
  border: 1px solid rgba(245, 158, 11, 0.1);
}

.sidebar-brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.sidebar-brand-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-0);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-brand-sub {
  font-size: 0.7rem;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}

.sidebar-collapse-btn {
  width: 28px;
  height: 28px;
  min-width: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  opacity: 0;
  margin-left: auto;
}

.sidebar-brand:hover .sidebar-collapse-btn {
  opacity: 1;
}

.sidebar-collapse-btn:hover {
  background: var(--bg-3);
  color: var(--text-0);
}

.sidebar.collapsed .sidebar-collapse-btn svg {
  transform: rotate(180deg);
}

/* --- Sidebar Navigation --- */
.sidebar-nav {
  padding: 12px 12px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius);
  color: var(--text-1);
  font-size: 0.875rem;
  font-weight: 450;
  transition: all var(--transition);
  position: relative;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.sidebar-nav-item svg {
  width: 18px;
  height: 18px;
  min-width: 18px;
  opacity: 0.7;
  transition: opacity var(--transition);
}

.sidebar-nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-0);
}

.sidebar-nav-item:hover svg {
  opacity: 1;
}

.sidebar-nav-item.active {
  background: var(--accent-subtle);
  color: var(--text-0);
  font-weight: 500;
}

.sidebar-nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}

.sidebar-nav-item.active svg {
  opacity: 1;
  color: var(--accent);
}

/* --- Sidebar Divider --- */
.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 20px;
}

/* --- Sidebar Section --- */
.sidebar-section {
  padding: 0 14px;
  margin-bottom: 4px;
}

.sidebar-section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 12px 6px 8px;
  font-variant: small-caps;
}

.sidebar-section-title svg {
  width: 13px;
  height: 13px;
  opacity: 0.5;
}

/* --- Today Card --- */
.today-card {
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.today-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.02), transparent);
  pointer-events: none;
}

.today-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.today-stat-label {
  font-size: 0.75rem;
  color: var(--text-2);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.today-stat-value {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-0);
  letter-spacing: -0.02em;
}

.today-ocupacion-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.today-bar {
  height: 6px;
  background: var(--bg-3);
  border-radius: 100px;
  overflow: hidden;
  margin-top: 2px;
}

.today-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #FBBF24);
  border-radius: 100px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 0;
  animation: barGrow 1s cubic-bezier(0.4, 0, 0.2, 1) both;
  position: relative;
}

.today-bar-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: barShimmer 2s ease-in-out infinite;
}

.today-stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.today-stat-mini {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 4px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.today-stat-mini-value {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-0);
}

.today-stat-mini-label {
  font-size: 0.7rem;
  color: var(--text-2);
  font-weight: 500;
  white-space: nowrap;
}

/* --- Live Tarifa Sidebar --- */
.recep-live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #EF4444;
  border-radius: 50%;
  margin-right: 4px;
  animation: recepLiveDot 1.5s infinite;
}
@keyframes recepLiveDot {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}
.live-tarifa-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.live-tarifa-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: .78rem;
  background: var(--bg-3);
}
.live-tarifa-row.has-disc {
  background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.2);
}
.live-tarifa-code {
  color: var(--text-2);
  font-family: var(--mono);
}
.live-tarifa-price {
  font-weight: 700;
  font-family: var(--mono);
  color: var(--text-0);
}
.live-tarifa-row.has-disc .live-tarifa-price {
  color: #EF4444;
}

/* --- Quick Actions --- */
.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.quick-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius);
  color: var(--text-1);
  font-size: 0.8rem;
  font-weight: 450;
  transition: all var(--transition);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.quick-btn svg {
  width: 15px;
  height: 15px;
  min-width: 15px;
  opacity: 0.6;
  transition: all var(--transition);
}

.quick-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-0);
}

.quick-btn:hover svg {
  opacity: 1;
  color: var(--accent);
}

/* --- Search Box --- */
.search-box {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-2);
  pointer-events: none;
  z-index: 1;
  opacity: 0.6;
}

.search-input {
  width: 100%;
  height: 38px;
  padding: 0 12px 0 36px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-0);
  font-size: 0.8rem;
  transition: all var(--transition);
}

.search-input::placeholder {
  color: var(--text-2);
  opacity: 0.5;
}

.search-input:focus {
  border-color: var(--border-focus);
  background: var(--bg-1);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.06);
}

.search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-2);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  max-height: 240px;
  overflow-y: auto;
  z-index: 200;
  box-shadow: var(--shadow-lg);
}

.search-results.active {
  display: block;
}

.search-no-results {
  padding: 14px 16px;
  color: var(--text-2);
  font-size: 0.8rem;
  text-align: center;
}

.search-result-item {
  padding: 10px 14px;
  cursor: pointer;
  transition: background var(--transition-fast);
  border-bottom: 1px solid var(--border);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: rgba(245, 158, 11, 0.06);
}

.search-result-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-0);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.search-result-detail {
  font-size: 0.75rem;
  color: var(--text-2);
  margin-top: 2px;
}

.search-result-sim {
  font-size: 0.7rem;
  color: var(--text-2);
  margin-top: 2px;
  font-family: var(--font-mono);
  opacity: 0.7;
}

.seg-badge {
  display: inline-block;
  font-size: 10px !important;
  padding: 1px 6px;
  border-radius: 8px;
  font-weight: 600;
  vertical-align: middle;
}

/* --- Sidebar Spacer --- */
.sidebar-spacer {
  flex: 1;
}

/* --- Sidebar Footer / User --- */
.sidebar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.sidebar-user-avatar {
  width: 32px;
  height: 32px;
  min-width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-3);
  border-radius: 50%;
  color: var(--text-2);
  border: 1px solid var(--border);
}

.sidebar-user-name {
  font-size: 0.8rem;
  color: var(--text-1);
  font-weight: 450;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logout-btn {
  width: 32px;
  height: 32px;
  min-width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}


/* ==========================================================================
   7. MAIN CONTENT
   ========================================================================== */

.main-content {
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--bg-0);
  position: relative;
}

/* Pendientes Banner */
.pendientes-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.08));
  border-bottom: 1px solid rgba(245, 158, 11, 0.3);
  animation: pendientes-pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pendientes-pulse {
  0%, 100% { background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.08)); }
  50% { background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(245, 158, 11, 0.12)); }
}

.pendientes-icon {
  color: #F59E0B;
  display: flex;
  align-items: center;
}

.pendientes-text {
  flex: 1;
  font-size: 0.85rem;
  color: var(--text-0);
}

.pendientes-text strong {
  color: #F59E0B;
  font-size: 1rem;
}

.btn-pendientes {
  padding: 5px 14px;
  background: rgba(245, 158, 11, 0.2);
  color: #F59E0B;
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-pendientes:hover {
  background: rgba(245, 158, 11, 0.35);
  border-color: #F59E0B;
}

.pendientes-banner[hidden] {
  display: none;
}

.planilla-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}


/* ==========================================================================
   8. PLANILLA TOOLBAR
   ========================================================================== */

.planilla-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-1);
  gap: 16px;
  flex-wrap: wrap;
  min-height: 56px;
  flex-shrink: 0;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toolbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.toolbar-nav-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  color: var(--text-1);
  background: var(--bg-2);
  border: 1px solid var(--border);
  transition: all var(--transition);
  cursor: pointer;
}

.toolbar-nav-btn:hover {
  background: var(--bg-3);
  color: var(--text-0);
  border-color: var(--border-hover);
}

.toolbar-nav-btn:active {
  transform: scale(0.95);
}

.toolbar-month-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-0);
  min-width: 160px;
  text-align: center;
  letter-spacing: -0.01em;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.toolbar-select {
  height: 34px;
  padding: 0 32px 0 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-0);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2371717A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px;
}

.toolbar-select:hover {
  border-color: var(--border-hover);
}

.toolbar-select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.08);
}

.toolbar-legend {
  display: flex;
  align-items: center;
  gap: 14px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-2);
  white-space: nowrap;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.legend-libre {
  background: rgba(34, 197, 94, 0.5);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.legend-ocupada {
  background: rgba(239, 68, 68, 0.5);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.legend-checkin {
  background: rgba(59, 130, 246, 0.5);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.legend-checkout {
  background: rgba(245, 158, 11, 0.5);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.legend-bloqueada {
  background: rgba(113, 113, 122, 0.5);
  border: 1px solid rgba(113, 113, 122, 0.3);
}

.legend-pagado {
  background: #3B82F6;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.legend-sin-pago {
  background: #F59E0B;
  border: 1px solid rgba(245, 158, 11, 0.3);
}


/* ==========================================================================
   9. PLANILLA GRID TABLE
   ========================================================================== */

.planilla-wrapper {
  flex: 1;
  overflow: auto;
  position: relative;
}

.planilla-table {
  border-collapse: separate;
  border-spacing: 0;
  width: max-content;
  min-width: 100%;
  table-layout: fixed;
}

/* --- Header Cells --- */
.planilla-th {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg-2);
  padding: 8px 2px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-1);
  min-width: 44px;
  width: 44px;
  border-bottom: 1px solid var(--border);
  border-right: 0.5px solid rgba(255,255,255,0.03);
  user-select: none;
}

.planilla-th .day-num {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-0);
  line-height: 1.3;
}

.planilla-th .day-name {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* --- Room Cell (Sticky First Column) --- */
.planilla-room-cell {
  position: sticky;
  left: 0;
  z-index: 15;
  background: var(--bg-1);
  width: 100px;
  min-width: 100px;
  max-width: 100px;
  padding: 6px 10px;
  font-size: 0.8rem;
  border-right: 1px solid var(--border);
  border-bottom: 0.5px solid rgba(255,255,255,0.03);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.planilla-room-cell strong {
  font-weight: 600;
  color: var(--text-0);
  font-size: 0.8rem;
}

.planilla-room-cell small {
  font-size: 0.7rem;
  color: var(--text-2);
  font-weight: 400;
}

/* Corner cell (intersection of header + first column) */
.planilla-room-cell.planilla-th {
  z-index: 25;
  background: var(--bg-2);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-1);
  text-align: center;
  padding: 8px 10px;
}

/* --- Day Cells --- */
.planilla-day-cell {
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  height: 44px;
  text-align: center;
  vertical-align: middle;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-1);
  cursor: pointer;
  transition: all var(--transition-fast);
  border-right: 0.5px solid rgba(255,255,255,0.03);
  border-bottom: 0.5px solid rgba(255,255,255,0.03);
  position: relative;
  overflow: hidden;
  padding: 2px;
  white-space: nowrap;
}

.planilla-day-cell:hover {
  z-index: 5;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
  transform: scale(1.05);
}

.planilla-day-cell:active {
  transform: scale(0.95);
  transition: transform 0.05s ease;
}

/* --- Planilla Row --- */
.planilla-row {
  transition: background var(--transition-fast);
}

/* --- Cell State Colors --- */
.celda-libre {
  background: var(--celda-libre);
}
.celda-libre:hover {
  background: var(--celda-libre-hover);
}

.celda-ocupada {
  background: var(--celda-ocupada);
  color: var(--text-0);
  font-weight: 500;
}
.celda-ocupada:hover {
  background: var(--celda-ocupada-hover);
}

.celda-checkin {
  background: var(--celda-checkin);
  color: var(--text-0);
  font-weight: 500;
}
.celda-checkin:hover {
  background: var(--celda-checkin-hover);
}

.celda-checkout {
  background: var(--celda-checkout);
  color: var(--text-0);
  font-weight: 500;
}
.celda-checkout:hover {
  background: var(--celda-checkout-hover);
}

.celda-bloqueada {
  background: var(--celda-bloqueada);
  color: var(--text-2);
  cursor: not-allowed;
}
.celda-bloqueada:hover {
  background: rgba(113, 113, 122, 0.22);
}

.celda-reservada {
  background: var(--celda-reservada);
  color: var(--text-0);
  font-weight: 500;
}
.celda-reservada:hover {
  background: rgba(168, 85, 247, 0.32);
}

.celda-inhabilitada {
  background: rgba(39, 39, 42, 0.6);
  color: var(--text-2);
  opacity: 0.5;
  cursor: not-allowed;
}
.celda-inhabilitada:hover {
  background: rgba(39, 39, 42, 0.6);
  transform: none;
  box-shadow: none;
}

.celda-pendiente {
  background: rgba(245, 158, 11, 0.20);
  color: var(--text-0);
  font-weight: 500;
}
.celda-pendiente:hover {
  background: rgba(245, 158, 11, 0.35);
}

/* Make all occupied cells show pointer cursor */
.celda-ocupada, .celda-checkin, .celda-checkout, .celda-reservada, .celda-pendiente {
  cursor: pointer;
}

/* Payment status overlays — 4 colors */
.celda-pagado {
  background: #3B82F6 !important;
  color: #fff !important;
}
.celda-pagado:hover {
  background: #2563EB !important;
}

.celda-sin-pago {
  background: #F59E0B !important;
  color: #000 !important;
}
.celda-sin-pago:hover {
  background: #D97706 !important;
}

.celda-confirmada-color {
  background: #EF4444 !important;
  color: #fff !important;
}
.celda-confirmada-color:hover {
  background: #DC2626 !important;
}

.celda-verde {
  background: #22C55E !important;
  color: #fff !important;
}
.celda-verde:hover {
  background: #16A34A !important;
}

.celda-abonado {
  background: #8B5CF6 !important;
  color: #fff !important;
}
.celda-abonado:hover {
  background: #7C3AED !important;
}

/* Past days — locked, red tint, no interaction */
.celda-pasada {
  background: rgba(239, 68, 68, 0.12) !important;
  color: var(--text-2) !important;
  cursor: not-allowed !important;
  pointer-events: none;
  opacity: 0.6;
}
.celda-pasada.celda-pagado,
.celda-pasada.celda-sin-pago,
.celda-pasada.celda-confirmada-color,
.celda-pasada.celda-verde,
.celda-pasada.celda-abonado {
  opacity: 0.45;
  pointer-events: none;
}

/* Parking row styling */
.planilla-row[data-piso="E"] .planilla-room-cell {
  font-style: italic;
  color: var(--text-1);
}

/* --- Cell Action Popup --- */
.cell-action-popup {
  position: fixed;
  z-index: 10000;
  background: var(--bg-2);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  min-width: 160px;
  animation: popupFadeIn 0.12s ease;
}
@keyframes popupFadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-4px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.cell-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.cell-popup-close {
  background: none;
  border: none;
  color: var(--text-2);
  font-size: 16px;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
}
.cell-popup-close:hover { color: var(--text-0); }
.cell-popup-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border: none;
  background: transparent;
  color: var(--text-0);
  font-family: var(--font-display);
  font-size: 13px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}
.cell-popup-btn:hover { background: rgba(255,255,255,0.06); }
.cell-popup-icon { font-size: 14px; width: 18px; text-align: center; }
.popup-action-success:hover { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.popup-action-info:hover { background: rgba(59, 130, 246, 0.15); color: var(--info); }
.popup-action-purple:hover { background: rgba(168, 85, 247, 0.15); color: var(--purple); }
.popup-action-danger:hover { background: rgba(239, 68, 68, 0.15); color: var(--danger); }

/* --- Occupancy Gauge --- */
.ocupacion-gauge {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 4px 0 -4px;
}
.gauge-svg {
  width: 110px;
  height: 65px;
}
.gauge-value {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-0);
  transition: color 0.3s ease;
}
.gauge-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-2);
  margin-top: -2px;
}

/* --- Today Column Highlight --- */
.planilla-today {
  position: relative;
}

.planilla-today::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.06), rgba(245, 158, 11, 0.02));
  pointer-events: none;
  z-index: 0;
}

th.planilla-today {
  color: var(--accent);
}

th.planilla-today .day-num {
  color: var(--accent);
}

/* --- Cell Flash Animation (SSE update) --- */
.celda-flash {
  animation: celdaFlash 1.5s ease-out;
}

/* --- Piso Separator --- */
.piso-separator {
  background: none;
}

.piso-separator td {
  padding: 10px 14px 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--bg-0);
  border-bottom: 1px solid var(--border);
  position: relative;
  padding-left: 20px;
}

.piso-separator td::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
  opacity: 0.6;
}

/* --- Celda Tooltip (created by JS, inline styles) --- */
.celda-tooltip {
  /* Base styles set via JS inline, but this provides the class name match */
  font-family: var(--font-display);
}


/* ==========================================================================
   10. RIGHT PANEL
   ========================================================================== */

.right-panel {
  width: var(--panel-width);
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-1);
  border-left: 1px solid var(--border);
  overflow: hidden;
  transition: transform var(--transition-slow), opacity var(--transition-slow);
}

/* --- Panel Tabs (Segmented Control Style) --- */
.panel-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-1);
  flex-shrink: 0;
}

.panel-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 10px;
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 450;
  color: var(--text-2);
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  background: none;
  position: relative;
  white-space: nowrap;
}

.panel-tab svg {
  width: 15px;
  height: 15px;
  opacity: 0.5;
  transition: opacity var(--transition);
}

.panel-tab:hover {
  color: var(--text-1);
  background: rgba(255, 255, 255, 0.03);
}

.panel-tab:hover svg {
  opacity: 0.7;
}

.panel-tab.active {
  background: var(--bg-3);
  color: var(--text-0);
  font-weight: 500;
  box-shadow: var(--shadow-xs);
}

.panel-tab.active svg {
  opacity: 1;
  color: var(--accent);
}

/* --- Panel Content Containers --- */
.panel-content {
  display: none;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
}

.panel-content > * {
  flex-shrink: 0;
}

.panel-content.active {
  display: flex;
}


/* ==========================================================================
   11. CHAT PANEL
   ========================================================================== */

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-message {
  display: flex;
  gap: 10px;
  animation: chatMsgIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.chat-message-ai {
  flex-direction: row;
  align-items: flex-start;
}

.chat-message-user {
  flex-direction: row-reverse;
}

.chat-avatar {
  width: 32px;
  height: 32px;
  min-width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-subtle);
  border-radius: 50%;
  border: 1px solid rgba(245, 158, 11, 0.12);
  flex-shrink: 0;
}

.chat-bubble {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  line-height: 1.55;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* AI bubble — glass effect with amber tint */
.chat-message-ai .chat-bubble {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  color: var(--text-0);
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) var(--radius-xs);
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

/* User bubble — solid with accent left border */
.chat-message-user .chat-bubble {
  background: var(--accent-subtle);
  border: 1px solid rgba(245, 158, 11, 0.08);
  border-left: 3px solid var(--accent);
  color: var(--text-0);
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-xs) var(--radius-lg);
}

.chat-bubble code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
}

.chat-bubble strong {
  font-weight: 600;
  color: var(--text-0);
}

.chat-bubble em {
  font-style: italic;
  color: var(--text-1);
}

.chat-bubble hr.chat-divider {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 10px 0;
}

/* --- Chat Input Area --- */
.chat-input-area {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-1);
  flex-shrink: 0;
}

.chat-input {
  flex: 1;
  height: 44px;
  padding: 0 18px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-0);
  font-size: 0.875rem;
  transition: all var(--transition);
}

.chat-input::placeholder {
  color: var(--text-2);
  opacity: 0.5;
}

.chat-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.06);
  background: var(--bg-1);
}

/* --- Chat Action Buttons (Send, Mic) --- */
.chat-action-btn {
  width: 40px;
  height: 40px;
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}

.chat-send-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #000;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}

.chat-send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.25);
}

.chat-send-btn:active {
  transform: scale(0.95);
}

.chat-mic-btn {
  background: var(--bg-3);
  color: var(--text-1);
  border: 1px solid var(--border);
}

.chat-mic-btn:hover {
  background: var(--bg-4);
  color: var(--text-0);
}

.chat-mic-btn.recording {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.3);
  animation: micPulse 1.5s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.2);
}

/* --- Typing Indicator --- */
.typing-indicator {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 4px 0;
}

.typing-indicator span {
  width: 7px;
  height: 7px;
  background: var(--text-2);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) { animation-delay: 0s; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

/* --- Chat Action Buttons (from AI parsed actions) --- */
.chat-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 0 4px 42px;
  animation: chatMsgIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.chat-actions .chat-action-btn {
  width: auto;
  height: auto;
  min-width: 0;
  border-radius: var(--radius);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-0);
  text-align: left;
  transition: all var(--transition);
  cursor: pointer;
}

.chat-actions .chat-action-btn:hover {
  background: var(--bg-3);
  border-color: var(--border-hover);
  transform: translateX(4px);
}

.chat-actions .chat-action-btn svg {
  min-width: 16px;
}

.chat-action-detail {
  display: block;
  font-size: 0.7rem;
  color: var(--text-2);
  font-weight: 400;
  margin-top: 2px;
}

/* Chat action type variants */
.chat-action-reserva {
  border-left: 3px solid var(--info) !important;
}
.chat-action-checkin {
  border-left: 3px solid var(--purple) !important;
}
.chat-action-checkout {
  border-left: 3px solid var(--accent) !important;
}
.chat-action-pago {
  border-left: 3px solid var(--success) !important;
}
.chat-action-cancelacion {
  border-left: 3px solid var(--danger) !important;
}

.chat-actions .chat-action-btn.executing {
  opacity: 0.6;
  cursor: wait;
  pointer-events: none;
}

.chat-actions .chat-action-btn.executing::after {
  content: '';
  width: 14px;
  height: 14px;
  border: 2px solid var(--text-2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-left: auto;
}

.chat-actions .chat-action-btn.action-done {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.2);
  color: var(--success);
  cursor: default;
  pointer-events: none;
}


/* ==========================================================================
   12. DETAIL PANEL
   ========================================================================== */

.detail-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}

.detail-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-guest-name {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-0);
  letter-spacing: -0.01em;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: capitalize;
  white-space: nowrap;
}

.badge-segmento {
  background: var(--bg-3);
  color: var(--text-1);
}

/* --- Detail Stats --- */
.detail-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.detail-stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  background: var(--bg-2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.detail-stat-value {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-0);
}

.detail-stat-label {
  font-size: 0.7rem;
  color: var(--text-2);
  font-weight: 500;
}

/* --- Detail Sections --- */
.detail-section {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.detail-section:last-child {
  border-bottom: none;
}

.detail-section-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 12px;
  letter-spacing: 0.01em;
}

.detail-info-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-info-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail-info-row svg {
  color: var(--text-2);
  min-width: 14px;
  opacity: 0.6;
}

.detail-info-value {
  font-size: 0.85rem;
  color: var(--text-0);
  word-break: break-all;
}

.detail-list {
  max-height: 260px;
  overflow-y: auto;
}

.detail-empty {
  font-size: 0.8rem;
  color: var(--text-2);
  text-align: center;
  padding: 20px 10px;
  font-style: italic;
}

/* --- Detail Table (Reservations / Payments) --- */
.detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.detail-table thead th {
  text-align: left;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 8px 8px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
  position: sticky;
  top: 0;
}

.detail-table tbody td {
  padding: 8px 8px;
  color: var(--text-1);
  border-bottom: 1px solid rgba(255,255,255,0.03);
  white-space: nowrap;
}

.detail-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* --- Status Badges (Reservations) --- */
.badge-estado {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: capitalize;
}

.badge-pendiente {
  background: rgba(245, 158, 11, 0.12);
  color: var(--accent);
}

.badge-confirmada {
  background: rgba(34, 197, 94, 0.12);
  color: var(--success);
}

.badge-checkin {
  background: rgba(59, 130, 246, 0.12);
  color: var(--info);
}

.badge-checkout {
  background: rgba(168, 85, 247, 0.12);
  color: var(--purple);
}

.badge-cancelada {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
}

.badge-ocupada {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
}

.badge-completada {
  background: rgba(34, 197, 94, 0.12);
  color: var(--success);
}


/* ==========================================================================
   13. RESERVATION FORM PANEL
   ========================================================================== */

.panel-section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-0);
  padding: 20px 20px 4px;
  letter-spacing: -0.01em;
}

.reserva-form {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-1);
  letter-spacing: 0.01em;
}

.form-input {
  height: 44px;
  padding: 0 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-0);
  font-size: 0.875rem;
  transition: all var(--transition);
  width: 100%;
}

.form-input::placeholder {
  color: var(--text-2);
  opacity: 0.5;
}

.form-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.06);
  background: var(--bg-1);
}

.form-textarea {
  height: auto;
  padding: 12px 14px;
  resize: vertical;
  min-height: 60px;
  line-height: 1.5;
}

.form-select {
  height: 44px;
  padding: 0 36px 0 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-0);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--transition);
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2371717A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 10px;
}

.form-select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.06);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-group-check {
  display: flex;
  align-items: flex-end;
  padding-bottom: 4px;
}

.form-check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-1);
  cursor: pointer;
  user-select: none;
  padding: 10px 0;
}

.form-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
  border-radius: var(--radius-xs);
}

/* --- Autocomplete Wrapper --- */
.autocomplete-wrapper {
  position: relative;
}

.reserva-autocomplete {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-2);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  max-height: 220px;
  overflow-y: auto;
  z-index: 200;
  box-shadow: var(--shadow-lg);
}

.reserva-autocomplete.active {
  display: block;
}

.reserva-autocomplete .search-result-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition-fast);
}

.reserva-autocomplete .search-result-item:last-child {
  border-bottom: none;
}

.reserva-autocomplete .search-result-item:hover {
  background: rgba(245, 158, 11, 0.06);
}

/* --- Price Preview --- */
.precio-preview {
  padding: 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  min-height: 48px;
  display: flex;
  align-items: center;
}

.precio-placeholder {
  font-size: 0.8rem;
  color: var(--text-2);
  font-style: italic;
}

.precio-input-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.precio-input-row .precio-prefix {
  font-weight: 600;
  color: var(--text-1);
  font-size: 0.95rem;
}
.precio-input-row .form-input {
  flex: 1;
  font-family: 'JetBrains Mono', monospace;
}
.precio-hint {
  font-size: 0.72rem;
  color: var(--text-2);
  white-space: nowrap;
}

.precio-preview-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.precio-total {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.precio-detail {
  font-size: 0.8rem;
  color: var(--text-1);
}

.precio-descuento {
  font-size: 0.78rem;
  color: var(--success);
  font-weight: 500;
}

.precio-reglas {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.precio-regla-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 0.68rem;
  background: rgba(59, 130, 246, 0.1);
  color: var(--info);
  font-weight: 500;
}

/* --- Submit Button --- */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  min-height: 46px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #000;
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-medium);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(245, 158, 11, 0.12);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.2);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary.loading {
  opacity: 0.7;
  pointer-events: none;
}

.btn-full {
  width: 100%;
}

/* --- Reservation Success --- */
.reserva-success {
  margin-top: 12px;
  animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.reserva-success-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px;
  background: rgba(34, 197, 94, 0.06);
  border: 1px solid rgba(34, 197, 94, 0.12);
  border-radius: var(--radius-lg);
  text-align: center;
}

.reserva-success-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--success);
}

.reserva-success-card p {
  font-size: 0.85rem;
  color: var(--text-1);
}


/* ==========================================================================
   14. TOAST NOTIFICATIONS
   ========================================================================== */

.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 50000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: 400px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(27, 27, 31, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 280px;
}

.toast.toast-entering {
  transform: translateX(0);
  opacity: 1;
}

.toast.toast-exiting {
  transform: translateX(100%);
  opacity: 0;
}

.toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
}

.toast-message {
  flex: 1;
  font-size: 0.8rem;
  color: var(--text-0);
  font-weight: 450;
  line-height: 1.4;
}

.toast-close {
  width: 24px;
  height: 24px;
  min-width: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-2);
  font-size: 1.2rem;
  cursor: pointer;
  border-radius: var(--radius-xs);
  transition: all var(--transition);
  padding: 0;
  line-height: 1;
}

.toast-close:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text-0);
}

/* Toast type variants */
.toast-success {
  border-left: 3px solid var(--success);
}
.toast-success .toast-icon {
  color: var(--success);
}

.toast-error {
  border-left: 3px solid var(--danger);
}
.toast-error .toast-icon {
  color: var(--danger);
}

.toast-warning {
  border-left: 3px solid var(--warning);
}
.toast-warning .toast-icon {
  color: var(--warning);
}

.toast-info {
  border-left: 3px solid var(--info);
}
.toast-info .toast-icon {
  color: var(--info);
}


/* ==========================================================================
   15. KEYFRAME ANIMATIONS
   ========================================================================== */

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

@keyframes loginCardIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes loginPulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.15);
    opacity: 0.6;
  }
}

@keyframes ambientFloat1 {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(-30px, 20px); }
  66% { transform: translate(20px, -15px); }
}

@keyframes ambientFloat2 {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(25px, -20px); }
  66% { transform: translate(-20px, 10px); }
}

@keyframes barGrow {
  from { max-width: 0; }
  to { max-width: 100%; }
}

@keyframes barShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

@keyframes celdaFlash {
  0% {
    box-shadow: inset 0 0 0 2px rgba(245, 158, 11, 0.6);
    background: rgba(245, 158, 11, 0.15);
  }
  100% {
    box-shadow: inset 0 0 0 0 transparent;
  }
}

@keyframes chatMsgIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes typingBounce {
  0%, 80%, 100% {
    transform: scale(0.7);
    opacity: 0.4;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes micPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.25);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes flash {
  0%, 50%, 100% { opacity: 1; }
  25%, 75% { opacity: 0.5; }
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}


/* ==========================================================================
   16. RESPONSIVE — 1200px (COMPACT DESKTOP)
   ========================================================================== */

@media (max-width: 1200px) {
  :root {
    --panel-width: 340px;
  }

  .toolbar-legend {
    gap: 10px;
  }

  .legend-item {
    font-size: 0.7rem;
  }

  .planilla-day-cell {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    height: 40px;
  }

  .planilla-th {
    min-width: 40px;
    width: 40px;
  }

  .planilla-room-cell {
    width: 90px;
    min-width: 90px;
    max-width: 90px;
  }
}


/* ==========================================================================
   17. RESPONSIVE — 1024px (TABLET LANDSCAPE)
   ========================================================================== */

@media (max-width: 1024px) {
  .dashboard {
    grid-template-columns: var(--sidebar-width) 1fr;
  }

  .right-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 380px;
    max-width: 90vw;
    z-index: 200;
    transform: translateX(100%);
    box-shadow: none;
  }

  .right-panel.open {
    transform: translateX(0);
    box-shadow: var(--shadow-xl);
  }

  .toolbar-legend {
    display: none;
  }
}


/* ==========================================================================
   18. RESPONSIVE — 768px (TABLET PORTRAIT / MOBILE)
   ========================================================================== */

@media (max-width: 768px) {
  :root {
    --sidebar-width: 220px;
  }

  .dashboard {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 300;
    transform: translateX(-100%);
    width: var(--sidebar-width);
    box-shadow: none;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-xl);
  }

  /* On mobile, show sidebar initially by not hiding it —
     rely on JS sidebar toggling. For now, always show planilla */

  .planilla-toolbar {
    padding: 10px 14px;
    gap: 10px;
  }

  .toolbar-month-label {
    font-size: 0.9rem;
    min-width: 140px;
  }

  .toolbar-select {
    height: 32px;
    font-size: 0.75rem;
    padding: 0 28px 0 10px;
  }

  .planilla-day-cell {
    width: 38px;
    min-width: 38px;
    max-width: 38px;
    height: 38px;
    font-size: 0.65rem;
  }

  .planilla-th {
    min-width: 38px;
    width: 38px;
    font-size: 0.7rem;
  }

  .planilla-room-cell {
    width: 80px;
    min-width: 80px;
    max-width: 80px;
    font-size: 0.75rem;
    padding: 4px 8px;
  }

  .right-panel {
    width: 100%;
    max-width: 100%;
    position: fixed;
    inset: 0;
    z-index: 200;
    transform: translateX(100%);
  }

  .right-panel.open {
    transform: translateX(0);
  }

  .login-card {
    padding: 40px 28px;
    max-width: 95vw;
  }

  .login-title {
    font-size: 1.6rem;
  }

  .login-logo {
    width: 64px;
    height: 64px;
  }

  .login-logo svg {
    width: 40px;
    height: 40px;
  }

  .today-stat-value {
    font-size: 1.1rem;
  }

  .toast-container {
    top: auto;
    bottom: 16px;
    right: 8px;
    left: 8px;
    max-width: none;
  }

  .toast {
    min-width: auto;
  }
}


/* ==========================================================================
   19. RESPONSIVE — 480px (SMALL MOBILE)
   ========================================================================== */

@media (max-width: 480px) {
  html {
    font-size: 13px;
  }

  .login-card {
    padding: 32px 22px;
    border-radius: var(--radius-lg);
  }

  .login-title {
    font-size: 1.4rem;
  }

  .login-subtitle {
    font-size: 0.8rem;
    margin-bottom: 28px;
  }

  .login-input {
    height: 44px;
  }

  .login-btn {
    height: 46px;
    font-size: 0.9rem;
  }

  .planilla-toolbar {
    padding: 8px 10px;
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-left,
  .toolbar-right {
    justify-content: center;
  }

  .toolbar-month-label {
    font-size: 0.85rem;
    min-width: auto;
  }

  .planilla-day-cell {
    width: 34px;
    min-width: 34px;
    max-width: 34px;
    height: 34px;
    font-size: 0.6rem;
  }

  .planilla-th {
    min-width: 34px;
    width: 34px;
    font-size: 0.65rem;
    padding: 6px 1px;
  }

  .planilla-room-cell {
    width: 70px;
    min-width: 70px;
    max-width: 70px;
    font-size: 0.7rem;
    padding: 3px 6px;
  }

  .chat-input-area {
    padding: 10px 12px;
  }

  .chat-input {
    height: 40px;
    font-size: 0.8rem;
    padding: 0 14px;
  }

  .chat-action-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
  }

  .chat-send-btn svg,
  .chat-mic-btn svg {
    width: 16px;
    height: 16px;
  }

  .panel-tabs {
    padding: 8px 10px;
  }

  .panel-tab {
    padding: 8px;
    font-size: 0.75rem;
    gap: 4px;
  }

  .form-input,
  .form-select {
    height: 40px;
    font-size: 0.8rem;
  }

  .btn-primary {
    height: 42px;
    font-size: 0.85rem;
  }

  .detail-stats {
    gap: 6px;
    padding: 12px 14px;
  }

  .detail-stat-card {
    padding: 8px 4px;
  }

  .detail-stat-value {
    font-size: 1rem;
  }

  .piso-separator td {
    padding: 8px 12px 4px;
    font-size: 0.7rem;
    padding-left: 16px;
  }
}


/* ==========================================================================
   20. PRINT STYLES
   ========================================================================== */

@media print {
  .sidebar,
  .right-panel,
  .planilla-toolbar,
  .toast-container,
  .login-screen {
    display: none !important;
  }

  .dashboard {
    display: block !important;
  }

  .main-content {
    height: auto;
    overflow: visible;
  }

  .planilla-wrapper {
    overflow: visible;
  }

  .planilla-day-cell {
    border: 1px solid #ccc !important;
    background: none !important;
    color: #000 !important;
  }

  .celda-ocupada {
    background: #fdd !important;
  }

  .celda-libre {
    background: #dfd !important;
  }
}


/* ==========================================================================
   20. RESERVAS LIST VIEW
   ========================================================================== */

.reservas-container,
.huespedes-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.reservas-container.hidden,
.huespedes-container.hidden {
  display: none;
}

.reservas-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  gap: 16px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.reservas-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-0);
  margin: 0;
}

.reservas-title svg {
  color: var(--accent);
}

.reservas-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-2);
  background: var(--bg-3);
  padding: 2px 10px;
  border-radius: 10px;
  margin-left: 8px;
}

.reservas-table-wrapper {
  flex: 1;
  overflow: auto;
  padding: 0;
}

.reservas-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.reservas-table thead {
  position: sticky;
  top: 0;
  z-index: 5;
}

.reservas-table th {
  background: var(--bg-2);
  color: var(--text-2);
  font-family: 'Outfit', sans-serif;
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.reservas-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-0);
  white-space: nowrap;
}

.reserva-row {
  transition: background 0.15s ease;
}

.reserva-row:hover {
  background: var(--accent-subtle);
}

/* Fila pendiente — fondo amarillo suave con borde lateral */
.reserva-pendiente {
  background: rgba(245, 158, 11, 0.08) !important;
  border-left: 3px solid #F59E0B;
}

.reserva-pendiente:hover {
  background: rgba(245, 158, 11, 0.15) !important;
}

.reserva-codigo {
  color: var(--accent);
  font-weight: 600;
  font-size: 12px;
}

.reserva-guest {
  font-weight: 500;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Columna de contacto */
.reserva-contacto {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.contacto-tel {
  color: var(--text-0);
  font-family: var(--font-mono);
  font-size: 11px;
}

.contacto-email {
  color: var(--text-1);
  font-size: 11px;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contacto-none {
  color: var(--text-2);
  font-size: 11px;
  font-style: italic;
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.15);
  color: #25D366;
  text-decoration: none;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-whatsapp:hover {
  background: rgba(37, 211, 102, 0.3);
  transform: scale(1.1);
}

.reserva-total {
  font-weight: 600;
  color: var(--success);
}

.center {
  text-align: center;
}

/* Badges */
.badge-success {
  background: rgba(34, 197, 94, 0.15);
  color: #22C55E;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-warning {
  background: rgba(234, 179, 8, 0.15);
  color: #EAB308;
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.badge-info {
  background: rgba(59, 130, 246, 0.15);
  color: #3B82F6;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-purple {
  background: rgba(168, 85, 247, 0.15);
  color: #A855F7;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #EF4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-muted {
  background: rgba(107, 114, 128, 0.15);
  color: #9CA3AF;
  border: 1px solid rgba(107, 114, 128, 0.3);
}

.fuente-tag {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-2);
  background: var(--bg-3);
  padding: 2px 8px;
  border-radius: 4px;
}

/* Action Buttons */
.reserva-actions {
  display: flex;
  gap: 6px;
}

.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text-1);
  cursor: pointer;
  transition: all 0.15s ease;
}

.action-btn:hover {
  border-color: var(--border-hover);
  background: var(--bg-3);
}

.action-checkin:hover {
  color: var(--info);
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.1);
}

.action-checkout:hover {
  color: var(--purple);
  border-color: rgba(168, 85, 247, 0.4);
  background: rgba(168, 85, 247, 0.1);
}

.action-cancel:hover {
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.1);
}

/* Buttons */
.btn-sm {
  padding: 7px 14px;
  font-size: 12px;
  gap: 5px;
}

/* Empty State */
.reservas-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 60px 20px;
  text-align: center;
}

.reservas-empty.hidden {
  display: none;
}

.reservas-empty p {
  color: var(--text-2);
  font-size: 14px;
  margin: 0;
}

/* Pagination */
.reservas-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 24px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.reservas-pagination.hidden {
  display: none;
}

.pagination-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text-1);
  cursor: pointer;
  transition: all 0.15s ease;
}

.pagination-btn:hover:not(:disabled) {
  background: var(--bg-3);
  border-color: var(--accent);
  color: var(--accent);
}

.pagination-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.pagination-info {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-2);
}

/* Search inline */
.search-box-inline {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box-inline .search-icon {
  position: absolute;
  left: 10px;
  color: var(--text-2);
  pointer-events: none;
}

.search-input-inline {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-0);
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  padding: 8px 12px 8px 34px;
  width: 220px;
  transition: border-color 0.15s ease;
}

.search-input-inline:focus {
  outline: none;
  border-color: var(--accent);
}

/* Responsive */
@media (max-width: 768px) {
  .reservas-toolbar {
    padding: 12px 16px;
  }

  .reservas-toolbar .toolbar-right {
    width: 100%;
    flex-wrap: wrap;
  }

  .reservas-table {
    font-size: 12px;
  }

  .reservas-table th,
  .reservas-table td {
    padding: 8px 10px;
  }

  .search-input-inline {
    width: 160px;
  }
}


/* ==========================================================================
   EDIT RESERVATION PANEL
   ========================================================================== */

.editar-reserva-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: var(--bg-2);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.editar-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.editar-label {
  color: var(--text-2);
  font-weight: 500;
}

.editar-value {
  color: var(--text-0);
  font-weight: 600;
  text-align: right;
}

/* Color selector */
.color-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.color-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-2);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-1);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.color-option:hover {
  border-color: var(--text-2);
  background: var(--bg-1);
}

.color-option.color-active {
  border-color: var(--accent);
  background: rgba(245, 158, 11, 0.08);
  color: var(--text-0);
}

.color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Action buttons */
.editar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: none;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-action-success {
  background: rgba(34, 197, 94, 0.15);
  color: #22C55E;
}
.btn-action-success:hover { background: rgba(34, 197, 94, 0.25); }

.btn-action-info {
  background: rgba(59, 130, 246, 0.15);
  color: #3B82F6;
}
.btn-action-info:hover { background: rgba(59, 130, 246, 0.25); }

.btn-action-purple {
  background: rgba(168, 85, 247, 0.15);
  color: #A855F7;
}
.btn-action-purple:hover { background: rgba(168, 85, 247, 0.25); }

.btn-action-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #F59E0B;
}
.btn-action-warning:hover { background: rgba(245, 158, 11, 0.25); }

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(239, 68, 68, 0.12);
  color: #EF4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  width: 100%;
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(239, 68, 68, 0.4);
}

/* Edit panel header row */
.editar-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding: 10px 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.editar-codigo-display {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.5px;
}

.form-static {
  display: block;
  padding: 6px 0;
  font-size: 13px;
  color: var(--text-1);
}
