:root {
  --primary: #4f46e5;
  --secondary: #ec4899;
  --accent: #8b5cf6;
  --background: #0f172a;
  --surface: rgba(30, 41, 59, 0.7);
  --surface-hover: rgba(51, 65, 85, 0.8);
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --border: rgba(148, 163, 184, 0.1);
  --gradient: linear-gradient(135deg, #4f46e5 0%, #ec4899 100%);
  --glass: cubic-bezier(0.37, 0, 0.63, 1);
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--background);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(79, 70, 229, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(236, 72, 153, 0.15) 0%, transparent 40%);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

header {
  margin-bottom: 3rem;
  text-align: center;
}

h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}

.subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Grid de Ranchos */
.ranchos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s var(--glass);
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  background: var(--surface-hover);
  border-color: rgba(148, 163, 184, 0.2);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
}

.card h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-icon {
  font-size: 1.5rem;
  opacity: 0.8;
}

/* Selección Cajas/Perillas */
.selection-container {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.big-option {
  flex: 1;
  min-width: 300px;
  max-width: 450px;
  aspect-ratio: 16/9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
}

.big-option i {
  font-size: 4rem;
  margin-bottom: 1rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Dashboard Layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
}

.filters-panel {
  background: var(--surface);
  border-radius: 16px;
  padding: 1.5rem;
  height: fit-content;
  border: 1px solid var(--border);
}

.main-chart {
  background: var(--surface);
  border-radius: 16px;
  padding: 1.5rem;
  min-height: 500px;
  border: 1px solid var(--border);
}

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

.filter-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

select, .filter-select {
  width: 100%;
  padding: 0.75rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  outline: none;
  transition: all 0.2s;
}

select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
  margin-bottom: 2rem;
}

.btn-back:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Utilities */
.text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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