/* =============================================
   ROSA AGUSTINA RESORTS - PREMIUM DASHBOARD CSS
   ============================================= */

:root {
  --rosa: #ff5a7d;
  --rosa-light: #ff8fa3;
  --azul: #00c2ff;
  --azul-dark: #0096cc;
  --primario: #0a0f1e;
  --gris-bloque: #121827;
  --texto: #eaeaea;
  --texto-secundario: #9ca3af;
  --borde: #1f2937;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #06b6d4;
  --purple: #8b5cf6;
  --gold: #fbbf24;
  --gradient-premium: linear-gradient(135deg, var(--rosa), var(--azul));
  --gradient-dark: linear-gradient(160deg, #0a0f1e, #1c2333);
}

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

html, body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--gradient-dark);
  color: var(--texto);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Header Premium con efectos de neón */
header {
  text-align: center;
  padding: 2rem 1rem 1rem;
  position: relative;
  overflow: hidden;
}



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

header h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--azul);
  text-shadow: 0 0 20px rgba(0, 194, 255, 0.5);
  position: relative;
  z-index: 1;
  animation: fadeInDown 0.8s ease;
}

header p {
  font-size: clamp(0.9rem, 2vw, 1rem);
  color: #ccc;
  margin-top: 0.5rem;
  opacity: 0.95;
  animation: fadeInDown 1s ease;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Control Panel - Búsqueda Premium con Glassmorphism */
.control-panel {
  background: rgba(18, 24, 39, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 20px;
  padding: 2rem;
  margin: 2rem auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  position: relative;
  overflow: hidden;
}

.control-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-premium);
  animation: shimmer 3s infinite;
}

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

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

@media (max-width: 768px) {
  .control-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

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

.control-label {
  font-size: 0.85rem;
  color: var(--texto-secundario);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.date-input, .resort-select {
  width: 100%;
  padding: 1rem 1.2rem;
  background: rgba(255,255,255,0.03);
  border: 2px solid var(--borde);
  border-radius: 12px;
  color: var(--texto);
  font-size: 1rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.date-input:hover, .resort-select:hover {
  border-color: var(--azul);
  background: rgba(255,255,255,0.05);
  transform: translateY(-2px);
}

.date-input:focus, .resort-select:focus {
  outline: none;
  border-color: var(--azul);
  box-shadow: 0 0 0 3px rgba(0,194,255,0.1), 0 0 20px rgba(0,194,255,0.2);
}

/* Botón Analizar con efecto de onda */
.btn-analyze {
  padding: 1.2rem 3rem;
  background: var(--gradient-premium);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(255,90,125,0.3);
}

.btn-analyze::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-analyze:hover::before {
  width: 300px;
  height: 300px;
}

.btn-analyze:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(255,90,125,0.4), 0 0 30px rgba(0,194,255,0.3);
}

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

/* Special Date Alert con animación */
.special-date-alert {
  background: linear-gradient(135deg, rgba(245,158,11,0.1), rgba(239,68,68,0.1));
  border: 1px solid var(--warning);
  border-radius: 12px;
  padding: 1rem;
  margin-top: 1rem;
  display: none;
  animation: slideDown 0.3s ease;
}

.special-date-alert.active {
  display: flex;
  align-items: center;
  gap: 1rem;
}

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

.special-icon {
  font-size: 1.5rem;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

#specialDesc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--texto-secundario);
}

/* Stats Cards con efecto hover 3D */
.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.2rem;
  margin-bottom: 2rem;
  animation: fadeInUp 0.8s ease;
}

.stat-card {
  background: var(--gris-bloque);
  padding: 1.5rem 1.2rem;
  border-radius: 16px;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.05);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  transform-style: preserve-3d;
  perspective: 1000px;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0,194,255,0.05) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.stat-card:hover {
  transform: translateY(-5px) rotateX(5deg);
  box-shadow: 0 15px 40px rgba(0,0,0,0.4), 0 0 20px rgba(0,194,255,0.2);
}

.stat-label {
  font-size: clamp(0.85rem, 2vw, 0.95rem);
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  color: var(--azul);
  margin-bottom: 0.3rem;
  text-shadow: 0 0 10px rgba(0,194,255,0.3);
}

.stat-change {
  font-size: clamp(0.85rem, 2vw, 0.95rem);
  padding: 4px 8px;
  border-radius: 5px;
  display: inline-block;
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid var(--success);
  margin-top: 0.5rem;
}

.stat-change.negative {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border-color: var(--danger);
}

.stat-change.warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
  border-color: var(--warning);
}

/* Analytics Grid */
.analytics-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 1024px) {
  .analytics-grid {
    grid-template-columns: 2fr 1fr;
  }
}

/* Chart Container con sombras múltiples */
.chart-container {
  background: var(--gris-bloque);
  border-radius: 20px;
  padding: 2rem;
  border: 1px solid rgba(255,255,255,0.05);
  box-shadow: 
    0 10px 30px rgba(0,0,0,0.3),
    0 0 50px rgba(0,194,255,0.05),
    inset 0 1px 0 rgba(255,255,255,0.05);
  animation: fadeInUp 1s ease;
  position: relative;
  overflow: hidden;
}

.chart-container::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: var(--gradient-premium);
  border-radius: 20px;
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s ease;
}

.chart-container:hover::after {
  opacity: 0.1;
}

.chart-title {
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  font-weight: 700;
  color: var(--azul);
  text-shadow: 0 0 10px rgba(0,194,255,0.2);
  margin-bottom: 2rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  padding-bottom: 1rem;
}

.chart-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--azul), transparent);
}

.chart-wrapper {
  position: relative;
  height: 400px;
}

.small-chart-wrapper {
  height: 300px;
}

@media (min-width: 1024px) {
  .chart-wrapper {
    height: 450px;
  }
}

/* Chart Grid */
.chart-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin: 2rem 0;
}

@media (min-width: 768px) {
  .chart-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Funnel Container */
.funnel-container {
  padding: 1rem;
}

.funnel-step {
  background: linear-gradient(135deg, rgba(0,194,255,0.05), rgba(255,90,125,0.05));
  border: 1px solid var(--borde);
  border-radius: 10px;
  padding: 1rem;
  margin: 0.5rem 0;
  position: relative;
  transition: all 0.3s ease;
}

.funnel-step:hover {
  transform: translateX(10px);
  border-color: var(--azul);
  box-shadow: 0 5px 20px rgba(0,194,255,0.2);
  background: linear-gradient(135deg, rgba(0,194,255,0.1), rgba(255,90,125,0.1));
}

.funnel-label {
  font-weight: 600;
  color: var(--texto);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.funnel-value {
  font-size: 1.2rem;
  color: var(--azul);
  font-weight: 700;
  text-shadow: 0 0 10px rgba(0,194,255,0.3);
}

.funnel-percentage {
  font-size: 0.9rem;
  color: var(--texto-secundario);
}

.funnel-bar {
  height: 4px;
  background: var(--gradient-premium);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Breakdown Panel */
.breakdown-panel {
  background: var(--gris-bloque);
  border-radius: 20px;
  padding: 2rem;
  border: 1px solid rgba(255,255,255,0.05);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  animation: fadeInUp 1.2s ease;
}

.breakdown-panel h3 {
  color: var(--azul);
  margin: 0 0 1.5rem 0;
  font-size: clamp(1.2rem, 3vw, 1.4rem);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(0,194,255,0.2);
}

.breakdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: all 0.2s ease;
}

.breakdown-item:hover {
  padding-left: 0.5rem;
  background: rgba(0,194,255,0.03);
  margin: 0 -0.5rem;
  padding-right: 0.5rem;
}

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

.breakdown-label {
  font-weight: 600;
  font-size: clamp(0.9rem, 2vw, 1rem);
  color: #eaeaea;
}

.breakdown-value {
  color: var(--azul);
  font-weight: 700;
  font-size: clamp(0.9rem, 2vw, 1rem);
  text-align: right;
}

.breakdown-value.highlight {
  color: var(--gold);
  text-shadow: 0 0 10px rgba(251,191,36,0.5);
}

/* Insights Section con efecto pulse */
.insights {
  background: var(--gris-bloque);
  border-radius: 20px;
  padding: 2rem;
  margin-top: 2rem;
  border: 1px solid rgba(255,255,255,0.05);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  animation: fadeInUp 1.4s ease;
}

.insights h3 {
  color: var(--azul);
  margin: 0 0 1.5rem 0;
  font-size: clamp(1.3rem, 3vw, 1.6rem);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 0 15px rgba(0,194,255,0.3);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.insights h3::after {
  content: '';
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--azul), transparent);
}

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

@media (min-width: 768px) {
  .insights-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1200px) {
  .insights-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.insight-item {
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  padding: 1.5rem;
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.insight-item:hover {
  background: rgba(255,255,255,0.05);
  transform: translateY(-3px);
  box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.insight-priority {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
}

.priority-critical {
  background: var(--danger);
  color: white;
}

.priority-high {
  background: var(--warning);
  color: white;
}

.priority-medium {
  background: var(--info);
  color: white;
}

.priority-low {
  background: var(--texto-secundario);
  color: white;
}

.insight-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  margin-top: 2px;
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 0 20px currentColor;
}

.insight-icon::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: inherit;
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

.insight-icon.success { 
  background: var(--success); 
  color: var(--success);
}
.insight-icon.warning { 
  background: var(--warning); 
  color: var(--warning);
}
.insight-icon.danger {
  background: var(--danger);
  color: var(--danger);
}
.insight-icon.info { 
  background: var(--info); 
  color: var(--info);
}
.insight-icon.purple { 
  background: var(--purple); 
  color: var(--purple);
}

.insight-content {
  flex: 1;
  min-width: 0;
  padding-right: 3rem;
}

.insight-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--texto);
  margin-bottom: 0.3rem;
}

.insight-desc {
  font-size: 0.85rem;
  color: var(--texto-secundario);
  line-height: 1.5;
}

.insight-action {
  font-size: 0.8rem;
  color: var(--azul);
  margin-top: 0.5rem;
  font-weight: 600;
}

.highlight {
  background: linear-gradient(120deg, var(--rosa), var(--azul));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: bold;
}

/* Dictionary Section */
.dictionary-section {
  background: var(--gris-bloque);
  border-radius: 20px;
  padding: 2rem;
  margin: 2rem auto;
  border: 1px solid rgba(255,255,255,0.05);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.dictionary-header {
  color: var(--azul);
  margin: 0 0 1.5rem 0;
  font-size: clamp(1.3rem, 3vw, 1.6rem);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 0 15px rgba(0,194,255,0.3);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.dictionary-header::after {
  content: '';
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--azul), transparent);
}

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

@media (min-width: 768px) {
  .dictionary-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1200px) {
  .dictionary-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.term-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 1.2rem;
  transition: all 0.3s ease;
}

.term-card:hover {
  background: rgba(255,255,255,0.05);
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0,194,255,0.1);
  border-color: var(--azul);
}

.term-title {
  color: var(--azul);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.term-subtitle {
  color: var(--texto-secundario);
  font-size: 0.8rem;
  margin-bottom: 0.8rem;
}

.term-definition {
  color: var(--texto);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.term-formula {
  background: rgba(0,194,255,0.1);
  border-left: 3px solid var(--azul);
  padding: 0.5rem;
  margin-top: 0.5rem;
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  color: var(--azul);
  border-radius: 4px;
}

/* Loading State */
.loading {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10,15,30,0.95);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.loading.active {
  display: flex;
}

.loading-content {
  text-align: center;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 3px solid var(--borde);
  border-top-color: var(--azul);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
  box-shadow: 0 0 20px rgba(0,194,255,0.5);
}

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

.loading-text {
  color: var(--texto);
  font-size: 1.1rem;
  text-shadow: 0 0 10px rgba(0,194,255,0.3);
}

/* Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

/* Scrollbar Premium */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--primario);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--azul), var(--rosa));
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--rosa), var(--azul));
}

/* Glassmorphism effect */
.glass {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Tooltips mejorados */
.custom-tooltip {
  position: fixed;
  background: var(--gris-bloque);
  color: var(--texto);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  border: 1px solid var(--borde);
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  z-index: 10000;
  display: none;
  max-width: 300px;
  pointer-events: none;
  white-space: pre-line;
}

.tooltip-icon {
  cursor: help;
  color: var(--info);
  font-size: 0.9rem;
  margin-left: 0.3rem;
}

[data-tooltip] {
  cursor: help;
  position: relative;
}

/* Responsive */
@media (max-width: 768px) {
  .stats-container {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
  
  .stat-card {
    padding: 1.2rem 0.8rem;
  }
  
  .insights {
    padding: 1.5rem;
  }
  
  .insight-item {
    padding: 1rem;
  }

  .chart-container {
    padding: 1.5rem;
  }
  
  .control-panel {
    padding: 1.5rem;
  }
}