/* 
  ESTILOS PREMIUM - CASA DE BANQUETES SARAHY
  Aesthetics: Modern Slate & Gold Elegant Palette, Glassmorphism, Micro-animations, responsive layout.
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
  /* Color Palette (2026 Premium SaaS Dopaminic Gold & Slate) */
  --bg-primary: #050609;
  --bg-secondary: #0b0d16;
  --bg-tertiary: #121522;
  --accent-gold: #ffcf4b;
  --accent-gold-hover: #ffe28a;
  --accent-gold-glow: rgba(255, 207, 75, 0.25);
  --accent-violet: #8b5cf6;
  --accent-violet-hover: #a78bfa;
  --accent-violet-glow: rgba(139, 92, 246, 0.25);
  --text-primary: #ffffff;
  --text-secondary: #a0aec0;
  --text-muted: #64748b;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --border-color: rgba(255, 207, 75, 0.08);
  --glass-bg: rgba(11, 13, 22, 0.65);
  --glass-border: rgba(255, 255, 255, 0.04);
  
  /* Font Family */
  --font-title: 'Playfair Display', Georgia, serif;
  --font-body: 'Outfit', sans-serif;
  
  /* Layout & Shadows */
  --sidebar-width: 280px;
  --border-radius: 16px;
  --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-premium: 0 20px 50px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(255, 207, 75, 0.15);
}

/* Base resets & scrollbars */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Stunning ambient background glows */
body::before {
  content: '';
  position: fixed;
  top: -15%;
  right: -15%;
  width: 55vw;
  height: 55vw;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, rgba(0,0,0,0) 70%);
  z-index: -2;
  pointer-events: none;
  filter: blur(100px);
  animation: pulseGlow 15s infinite alternate ease-in-out;
}

body::after {
  content: '';
  position: fixed;
  bottom: -20%;
  left: -10%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(255, 207, 75, 0.05) 0%, rgba(0,0,0,0) 70%);
  z-index: -2;
  pointer-events: none;
  filter: blur(120px);
  animation: pulseGlow 20s infinite alternate-reverse ease-in-out;
}

@keyframes pulseGlow {
  0% { transform: scale(1) translate(0, 0); opacity: 0.8; }
  100% { transform: scale(1.1) translate(5%, 5%); opacity: 1; }
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-gold);
}

/* Main SPA layout */
#app-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* Sidebar navigation */
.sidebar {
  width: var(--sidebar-width);
  background: rgba(11, 13, 22, 0.85);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-right: 1px solid rgba(255, 207, 75, 0.05);
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  overflow-y: auto;
}

.logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 3rem;
  text-align: center;
}

.logo-title {
  font-family: var(--font-title);
  background: linear-gradient(135deg, var(--accent-gold) 0%, #fff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  margin-top: 0.5rem;
  text-shadow: 0 4px 15px rgba(255, 207, 75, 0.1);
}

.logo-subtitle {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 4px;
  margin-top: -0.1rem;
}

.nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.nav-item a {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.9rem 1.2rem;
  border-radius: var(--border-radius);
  font-weight: 500;
  transition: var(--transition-smooth);
  border: 1px solid transparent;
  position: relative;
}

.nav-item a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 25%;
  height: 50%;
  width: 3px;
  background: var(--accent-gold);
  border-radius: 4px;
  opacity: 0;
  transform: scaleY(0.3);
  transition: var(--transition-smooth);
  box-shadow: 0 0 10px var(--accent-gold);
}

.nav-item a:hover::before,
.nav-item.active a::before {
  opacity: 1;
  transform: scaleY(1);
}

.nav-item.active a,
.nav-item a:hover {
  color: var(--accent-gold);
  background: linear-gradient(90deg, rgba(255, 207, 75, 0.08) 0%, rgba(255, 207, 75, 0.01) 100%);
  border-color: rgba(255, 207, 75, 0.15);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transform: translateX(4px);
}

.nav-item.active a {
  font-weight: 600;
  text-shadow: 0 0 15px rgba(255, 207, 75, 0.25);
}

.user-profile-panel {
  margin-top: auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.user-profile-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-gold) 0%, var(--accent-violet) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-weight: 700;
  border: 2px solid var(--accent-gold);
}

.user-details {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.user-name {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 0.75rem;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-logout {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.6rem;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.btn-logout:hover {
  background: rgba(229, 62, 62, 0.1);
  color: #feb2b2;
  border-color: rgba(229, 62, 62, 0.4);
}

/* Mobile Top Header (App Bar) */
.mobile-header {
  display: none;
}

/* Mobile Bottom Navigation Bar (Hidden on desktop) */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(23, 25, 35, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(212, 175, 55, 0.2);
  z-index: 110;
  padding: 0.6rem 0;
  padding-bottom: calc(0.6rem + env(safe-area-inset-bottom, 0px)); /* Soporte notch/área segura */
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.6);
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 500;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  flex: 1;
}

.mobile-nav-item.active {
  color: var(--accent-gold);
  transform: translateY(-2px);
}

.mobile-nav-item span:first-child {
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mobile-nav-item.active span:first-child {
  transform: scale(1.15);
}

/* Indicador activo */
.mobile-nav-item::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 12px;
  height: 3px;
  background-color: var(--accent-gold);
  border-radius: 2px;
  transition: transform 0.25s ease;
  box-shadow: 0 0 8px var(--accent-gold);
}

.mobile-nav-item.active::after {
  transform: translateX(-50%) scaleX(1);
}

.mobile-nav-item:hover {
  color: var(--accent-gold-hover);
}

.mobile-nav-item svg {
  width: 22px;
  height: 22px;
  margin-bottom: 0.25rem;
}

/* Main Content Area */
.main-content {
  margin-left: var(--sidebar-width);
  padding: 2.5rem;
  flex-grow: 1;
  min-height: 100vh;
  position: relative;
  min-width: 0;
}

/* Views Wrapper */
.view-section {
  display: none;
  animation: fadeIn 0.4s ease-out forwards;
}

.view-section.active {
  display: block;
}

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

/* Page Header */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 207, 75, 0.1);
  padding-bottom: 1.5rem;
}

.page-title {
  font-family: var(--font-title);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.page-title span {
  background: linear-gradient(90deg, var(--accent-gold) 0%, #ffffff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 20px rgba(255, 207, 75, 0.15);
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--accent-gold) 0%, #d4af37 50%, #b89222 100%);
  background-size: 200% auto;
  color: #050609;
  border: none;
  padding: 0.85rem 2rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 20px rgba(255, 207, 75, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 25px rgba(255, 207, 75, 0.45);
  background-position: right center;
}

.btn-primary:active {
  transform: translateY(-1px) scale(0.98);
}

.btn-secondary {
  background: rgba(18, 21, 34, 0.6);
  color: var(--text-primary);
  border: 1px solid rgba(255, 257, 255, 0.08);
  padding: 0.85rem 2rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-secondary:hover {
  background: rgba(255, 207, 75, 0.05);
  border-color: var(--accent-gold);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(255, 207, 75, 0.05);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent-violet) 0%, #7c3aed 50%, #db2777 100%);
  background-size: 200% auto;
  color: var(--text-primary);
  border: none;
  padding: 0.85rem 2rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-accent:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 25px rgba(139, 92, 246, 0.45);
  background-position: right center;
}

.btn-accent:active {
  transform: translateY(-1px) scale(0.98);
}

.btn-primary.disabled, .btn-disabled {
  background: #1a1e2e !important;
  color: var(--text-muted) !important;
  border: 1px solid rgba(255, 255, 255, 0.02) !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  opacity: 0.5;
  transform: none !important;
}

/* Glassmorphism Cards */
.card {
  background: rgba(18, 21, 34, 0.45);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius);
  padding: 2.2rem;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-gold) 0%, var(--accent-violet) 50%, var(--accent-gold) 100%);
  opacity: 0.95;
  transition: transform 0.8s ease;
  background-size: 50% 100%;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.45), 0 0 25px rgba(255, 207, 75, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 207, 75, 0.25);
}

.card:hover::before {
  transform: translateX(-50%);
}

/* Forms styling */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
select,
textarea {
  background: rgba(18, 21, 34, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: var(--text-primary);
  padding: 0.85rem 1.1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
  width: 100%;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 15px rgba(255, 207, 75, 0.2), inset 0 2px 4px rgba(0, 0, 0, 0.4);
  background: rgba(18, 21, 34, 0.85);
}

/* Dynamic Product Selector Grid */
.products-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.select-card {
  background: rgba(18, 21, 34, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  padding: 1.3rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 130px;
  position: relative;
  overflow: hidden;
}

.select-card:hover {
  border-color: rgba(255, 207, 75, 0.3);
  background: rgba(255, 207, 75, 0.02);
  transform: translateY(-2px);
}

.select-card.selected {
  border-color: var(--accent-gold);
  background: linear-gradient(135deg, rgba(255, 207, 75, 0.12) 0%, rgba(18, 21, 34, 0.85) 100%);
  box-shadow: 0 15px 30px rgba(255, 207, 75, 0.12), inset 0 0 15px rgba(255, 207, 75, 0.08);
  transform: translateY(-4px) scale(1.02);
}

.select-card-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  transition: var(--transition-smooth);
}

.select-card.selected .select-card-name {
  color: var(--accent-gold);
  text-shadow: 0 0 10px rgba(255, 207, 75, 0.25);
}

.select-card-price {
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 1.1rem;
  margin-top: auto;
  transition: var(--transition-smooth);
}

.select-card.selected .select-card-price,
.select-card:hover .select-card-price {
  color: var(--accent-gold);
  text-shadow: 0 0 10px rgba(255, 207, 75, 0.2);
}

/* Quantity Controller inside Select Card */
.qty-controller {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.5rem;
  justify-content: center;
  position: relative;
  z-index: 10;
}

.btn-qty-minus, .btn-qty-plus {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
  cursor: pointer;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-qty-minus:hover, .btn-qty-plus:hover {
  background: var(--accent-gold) !important;
  color: var(--bg-primary) !important;
  border-color: var(--accent-gold) !important;
  box-shadow: 0 0 10px rgba(255, 207, 75, 0.4);
}

.qty-display {
  font-weight: bold;
  min-width: 24px;
  text-align: center;
  font-size: 1rem;
  color: var(--text-primary);
}


/* Checkbox and switch styles */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  font-weight: 500;
  color: var(--text-primary);
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-gold);
  cursor: pointer;
}

/* Cotizador Live Breakdown Sidebar */
.cotizacion-summary-panel {
  background: rgba(11, 13, 22, 0.7);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 207, 75, 0.1);
  border-radius: var(--border-radius);
  padding: 2.2rem;
  position: sticky;
  top: 2rem;
  box-shadow: var(--shadow-premium), 0 0 35px rgba(255, 207, 75, 0.03), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.summary-header {
  font-family: var(--font-title);
  background: linear-gradient(135deg, var(--accent-gold) 0%, #fff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.5rem;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 207, 75, 0.15);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.summary-row.total {
  border-top: 1px solid rgba(255, 207, 75, 0.15);
  padding-top: 1.2rem;
  margin-top: 1.2rem;
  font-size: 1.45rem;
  color: var(--accent-gold);
  font-weight: 800;
  text-shadow: 0 0 15px rgba(255, 207, 75, 0.35);
}

.summary-row.accent {
  color: var(--text-primary);
  font-weight: 600;
}

/* Tabs */
.tab-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.75rem;
}

.tab-btn {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition-smooth);
  border-bottom: 2px solid transparent;
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  color: var(--accent-gold);
  border-bottom-color: var(--accent-gold);
}

/* Event List Card Grid */
.events-grid,
.quotes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.event-card,
.quote-card {
  cursor: pointer;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-nueva { background: rgba(107, 70, 193, 0.2); color: #b7791f; border: 1px solid var(--accent-violet); }
.badge-en_proceso { background: rgba(221, 107, 32, 0.2); color: #ed8936; border: 1px solid var(--warning); }
.badge-pendiente_pago { background: rgba(229, 62, 62, 0.2); color: #fc8181; border: 1px solid var(--danger); }
.badge-confirmada, .badge-confirmado { background: rgba(56, 161, 105, 0.2); color: #48bb78; border: 1px solid var(--success); }
.badge-cancelada, .badge-cancelado { background: rgba(113, 128, 150, 0.2); color: #cbd5e0; border: 1px solid var(--text-muted); }
.badge-realizada, .badge-realizado { background: rgba(49, 130, 206, 0.2); color: #63b3ed; border: 1px solid #3182ce; }

/* Calendar component */
.calendar-wrapper {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  max-width: 100%;
  overflow: hidden;
}

.calendar-scroll-container {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

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

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
  text-align: center;
}

.calendar-day-header {
  font-weight: 700;
  color: var(--accent-gold);
  font-size: 0.85rem;
  padding: 0.5rem 0;
  text-transform: uppercase;
}

.calendar-cell {
  background: var(--bg-tertiary);
  aspect-ratio: 1.2;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 0.5rem;
  font-size: 0.9rem;
  min-height: 80px;
  transition: var(--transition-smooth);
  border: 1px solid transparent;
}

.calendar-cell.other-month {
  opacity: 0.3;
}

.calendar-cell.today {
  border-color: var(--accent-violet);
  background: rgba(107, 70, 193, 0.1);
}

.calendar-cell-num {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.calendar-event-tag {
  background: var(--accent-gold);
  color: #0f111a;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
  text-align: left;
}

.calendar-event-tag.finca { background: var(--accent-violet); color: white; }
.calendar-event-tag.boston { background: #3182ce; color: white; }
.calendar-event-tag.buenos-aires { background: var(--success); color: white; }

/* Signature Canvas */
.signature-container {
  border: 2px dashed var(--border-color);
  border-radius: var(--border-radius);
  background: rgba(255, 255, 255, 0.02);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

#signature-canvas {
  background: #ffffff;
  border-radius: 8px;
  cursor: crosshair;
  max-width: 100%;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.signature-buttons {
  display: flex;
  gap: 1rem;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 17, 26, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  max-width: 800px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 2.5rem;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal-backdrop.active .modal-content {
  transform: scale(1);
}

.modal-close {
  float: right;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.8rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.modal-close:hover {
  color: var(--danger);
}

/* Dashboard Panels specific */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.metric-card {
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.metric-info {
  display: flex;
  flex-direction: column;
}

.metric-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metric-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent-gold);
  margin-top: 0.25rem;
}

.metric-icon {
  width: 48px;
  height: 48px;
  background: rgba(212, 175, 55, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-gold);
}

/* Inventory Alerts & Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin-top: 1.5rem;
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th {
  background-color: rgba(255, 255, 255, 0.02);
  color: var(--accent-gold);
  font-weight: 600;
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}

td {
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.95rem;
  color: var(--text-primary);
}

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

.low-stock {
  color: var(--danger);
  font-weight: 600;
  background: rgba(229, 62, 62, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}

/* General design tweaks */
.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flex-gap {
  display: flex;
  gap: 1rem;
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.timeline-item {
  display: flex;
  gap: 1.5rem;
  position: relative;
  padding-left: 1rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-gold);
}

.timeline-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1.2rem;
  bottom: -1rem;
  width: 2px;
  background: rgba(255, 255, 255, 0.05);
}

.timeline-time {
  font-weight: 700;
  color: var(--accent-gold);
  min-width: 60px;
}

.timeline-activity {
  color: var(--text-primary);
}

.timeline-item.completed .timeline-activity {
  text-decoration: line-through;
  color: var(--text-muted);
}

.timeline-item.completed::before {
  background: var(--success);
}

/* Custom Guest Counter Widget */
.guest-counter-widget {
  background: rgba(107, 70, 193, 0.05);
  border: 1px solid rgba(107, 70, 193, 0.2);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  text-align: center;
  display: flex;
  justify-content: space-around;
  margin-bottom: 1.5rem;
}

.guest-stat-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-violet);
}

.guest-stat-num.confirmed {
  color: var(--success);
}

.guest-stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* Login box style */
.login-view-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
}

.login-card {
  max-width: 420px;
  width: 100%;
}

.demo-credentials {
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.demo-credentials select {
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

/* Responsive Grid Utilities & Custom Editors */
.grid-2-1 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  align-items: start;
}

.grid-1-1 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.grid-1-2 {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  align-items: start;
}

/* Custom row items for editors */
.abono-row-item {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  align-items: center;
}

.cronograma-row-item {
  display: grid;
  grid-template-columns: 100px 1fr auto auto;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  align-items: center;
}

/* Responsive queries */
@media (max-width: 1024px), (max-height: 600px) {
  .sidebar {
    display: none;
  }
  
  .mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: rgba(15, 17, 26, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    padding: 0 1.25rem;
    z-index: 100;
  }

  .mobile-logo-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .mobile-logo-text {
    font-family: var(--font-title);
    font-weight: 700;
    color: var(--accent-gold);
    font-size: 1.2rem;
    letter-spacing: 2px;
  }

  .mobile-user-actions {
    display: flex;
    align-items: center;
  }

  .mobile-user-badge {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-gold) 0%, var(--accent-violet) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.9rem;
    border: 2px solid var(--accent-gold);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
    transition: transform 0.2s ease;
  }

  .mobile-user-badge:active {
    transform: scale(0.92);
  }
  
  .mobile-nav {
    display: flex;
  }
  
  .main-content {
    margin-left: 0;
    padding: 1.2rem;
    padding-top: 5rem; /* Espacio para cabecera móvil */
    padding-bottom: 5.5rem; /* Espacio para navegación inferior */
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }

  .grid-2-1,
  .grid-1-2 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .tab-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-bottom: none;
    padding-bottom: 0.5rem;
    width: 100%;
    max-width: 100%;
    scrollbar-width: none; /* Firefox */
  }
  
  .tab-container::-webkit-scrollbar {
    display: none; /* Safari y Chrome */
  }
  
  .tab-btn {
    padding: 0.55rem 0.95rem;
    font-size: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    flex-shrink: 0;
    white-space: nowrap;
    text-align: center;
  }

  .tab-btn.active {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
  }

  .grid-1-1 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Compact calendar for mobile */
  .calendar-wrapper {
    padding: 0.75rem;
  }

  .calendar-header {
    gap: 0.25rem;
  }

  .calendar-header button {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
  }

  .calendar-header h3 {
    font-size: 1.1rem !important;
  }

  .calendar-scroll-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .calendar-grid {
    min-width: 700px; /* Evita que el calendario colapse y se corte */
  }

  /* Evitar que las tablas se compriman demasiado y forzar scrollbar horizontal */
  .table-responsive table {
    min-width: 650px;
  }

  .calendar-cell {
    min-height: 60px;
    padding: 0.25rem;
    font-size: 0.8rem;
  }
  .calendar-day-header {
    font-size: 0.75rem;
  }
  .calendar-event-tag {
    font-size: 0.65rem;
    padding: 1px 2px;
  }

  /* Modal responsive spacing */
  .modal-content {
    padding: 1.5rem 1rem;
    max-height: 90vh;
  }
  .modal-backdrop {
    padding: 0.5rem;
  }
}

@media (max-width: 600px) {
  .abono-row-item {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .abono-row-item select {
    grid-column: 1 / span 2;
  }
  .abono-row-item button {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .cronograma-row-item {
    grid-template-columns: 80px 1fr;
    gap: 0.5rem;
  }
  .cronograma-row-item label {
    grid-column: 1;
    margin-top: 0.25rem;
  }
  .cronograma-row-item button {
    grid-column: 2;
    justify-self: end;
  }
}

@media (max-width: 480px) {
  .guest-counter-widget {
    flex-direction: column;
    gap: 1rem;
  }
  .main-content {
    padding: 0.75rem;
    padding-top: 4.8rem;
    padding-bottom: 6rem;
  }
}

/* ==========================================
   PWA FLOATING INSTALLATION BANNER
   ========================================== */
.pwa-banner {
  position: fixed;
  bottom: 80px; /* Arriba de la barra de navegación móvil */
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 480px;
  background: rgba(23, 25, 35, 0.95);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1.5px solid var(--accent-gold);
  border-radius: 16px;
  padding: 1.2rem;
  z-index: 200; /* Sobreponer a todo */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  animation: slideUpPWA 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpPWA {
  from { transform: translate(-50%, 120px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

.pwa-banner-content {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  align-items: center;
  text-align: center;
}

.pwa-banner-content span {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
}

.pwa-banner-buttons {
  display: flex;
  gap: 1rem;
  width: 100%;
  justify-content: center;
}

/* Escritorio: flotando a la derecha */
@media (min-width: 1025px) {
  .pwa-banner {
    bottom: 24px;
    right: 24px;
    left: auto;
    transform: none;
    width: 360px;
    animation: slideInRightPWA 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }
  @keyframes slideInRightPWA {
    from { transform: translateX(120px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
  }
}

/* ==========================================
   FLOATING WHATSAPP BUTTON (Public mode)
   ========================================== */
.whatsapp-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background-color: #25d366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  z-index: 150;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, background-color 0.3s ease;
  cursor: pointer;
}

.whatsapp-btn:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
  background-color: #20ba5a;
}

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

.whatsapp-btn svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

/* Ajustes de posición en móviles para evitar solapamiento */
@media (max-width: 1024px), (max-height: 600px) {
  .whatsapp-btn {
    bottom: 90px; /* Arriba de la barra de navegación inferior móvil */
    right: 20px;
    width: 52px;
    height: 52px;
  }
  .whatsapp-btn svg {
    width: 28px;
    height: 28px;
  }
}

/* ==========================================================================
   Valores Base de Operación - Tarjetas de Parámetros Dinámicos (v12)
   ========================================================================== */
.setting-item-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  position: relative;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0,0,0,0.15);
}

.setting-item-card:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(212, 175, 55, 0.2);
  box-shadow: 0 6px 12px rgba(0,0,0,0.25);
}

.setting-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.setting-item-title-input {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--accent-gold) !important;
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 0 !important;
  padding: 0.25rem 0 !important;
  width: 50%;
  min-width: 150px;
  transition: border-bottom-color 0.2s ease;
}

.setting-item-title-input:focus {
  border-bottom-color: var(--accent-gold) !important;
  outline: none !important;
}

.setting-item-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.setting-item-select {
  padding: 0.35rem 0.5rem;
  font-size: 0.8rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
  cursor: pointer;
  height: 30px;
}

.setting-item-select:focus {
  border-color: var(--accent-gold);
  outline: none;
}

.setting-item-delete-btn {
  padding: 0;
  border-radius: 50%;
  font-size: 0.8rem;
  background: #e53e3e;
  color: #ffffff;
  border: none;
  cursor: pointer;
  font-weight: 700;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.setting-item-delete-btn:hover {
  background: #c53030;
  transform: scale(1.15);
}

.setting-item-body {
  width: 100%;
}

.setting-item-body .setting-custom-value {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 0.25rem;
}

.setting-item-hint {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
  display: block;
}

/* Color chips and appointments custom styles */
.color-chip {
  transition: var(--transition-smooth);
}
.color-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.25);
  border-color: var(--accent-gold) !important;
}

.cita-client-item {
  transition: var(--transition-smooth);
}
.cita-client-item:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  background-color: rgba(255, 255, 255, 0.02) !important;
}

.abono-row-item, .cronograma-row-item, .cita-row-item {
  animation: slideIn 0.3s ease-out;
}

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

/* ==========================================
   2026 SAAS PREMIUM EXTENSIONS & OVERRIDES
   ========================================== */

/* Shimmer Loader / Skeletons */
.shimmer-loader {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, #23273d 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: loadingShimmer 1.6s infinite ease-in-out;
  border-radius: 6px;
  display: inline-block;
}

@keyframes loadingShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text {
  height: 14px;
  margin-bottom: 8px;
  width: 100%;
}
.skeleton-text.short {
  width: 60%;
}
.skeleton-title {
  height: 20px;
  margin-bottom: 12px;
  width: 40%;
}

/* Visually stunning metric cards overrides */
.metric-card {
  background: linear-gradient(135deg, rgba(23, 26, 38, 0.7) 0%, rgba(15, 17, 26, 0.7) 100%);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-premium);
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-gold) 0%, var(--accent-violet) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.metric-card:hover {
  transform: translateY(-2px);
  border-color: rgba(229, 193, 88, 0.25);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

.metric-card:hover::before {
  opacity: 1;
}

.metric-icon {
  background: rgba(229, 193, 88, 0.06);
  border: 1px solid rgba(229, 193, 88, 0.15);
  box-shadow: 0 4px 15px rgba(229, 193, 88, 0.05);
  transition: var(--transition-smooth);
}

.metric-card:hover .metric-icon {
  background: rgba(229, 193, 88, 0.15);
  transform: scale(1.08);
}

/* Elegant empty state design */
.empty-state {
  text-align: center;
  padding: 3.5rem 2rem;
  color: var(--text-secondary);
  background: var(--glass-bg);
  border: 1.5px dashed var(--border-color);
  border-radius: var(--border-radius);
  margin: 1.5rem 0;
}

.empty-state-icon {
  font-size: 3rem;
  color: var(--accent-gold);
  margin-bottom: 1rem;
  opacity: 0.7;
}

.empty-state-title {
  font-family: var(--font-title);
  color: var(--text-primary);
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

/* Loading spinner and overlays */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(8, 9, 13, 0.75);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: var(--border-radius);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.loading-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(229, 193, 88, 0.1);
  border-radius: 50%;
  border-top-color: var(--accent-gold);
  animation: spin 1s ease-in-out infinite;
  box-shadow: 0 0 15px rgba(229, 193, 88, 0.2);
}

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

/* Responsive Table enhancements */
.table-responsive {
  box-shadow: var(--shadow-premium);
  border-color: var(--border-color);
}

tr:hover td {
  background-color: rgba(229, 193, 88, 0.02) !important;
}

/* Premium Form Elements */
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], input[type="time"], select, textarea {
  background: rgba(18, 21, 34, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: var(--text-primary);
  padding: 0.85rem 1.1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
  width: 100%;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 15px rgba(255, 207, 75, 0.2), inset 0 2px 4px rgba(0, 0, 0, 0.4);
  background: rgba(18, 21, 34, 0.85);
}
