:root {
  --violet: #7B2D8E;
  --green: #7AB929;
  --teal: #00A19A;
  --grad-main: linear-gradient(135deg, #7B2D8E, #00A19A, #7AB929);
  --bg: #F8FAFC;
  --text: #1E293B;
  --text-secondary: #64748B;
  --text-muted: #94A3B8;
  --border: rgba(0,0,0,0.08);
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
  --radius: 16px;
  --radius-full: 9999px;
  --transition: all 0.3s ease;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: linear-gradient(-45deg, #E8F5E9, #E1F5FE, #F3E5F5, #E0F2F1);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  min-height: 100vh;
  overflow-x: hidden;
}
@keyframes gradientBG {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
h1, h2, h3 { font-family: 'Nunito', sans-serif; font-weight: 800; }

/* ========== HEADER DISTRITO GOOGLE ========== */
.distrito-header {
  background: #fff;
  padding: 12px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 2px solid #f0f0f0;
}
.distrito-text {
  font-size: 1.1rem;
  font-weight: 700;
  z-index: 10;
  position: relative;
}
.distrito-text .blue { color: #4285F4; }
.distrito-text .red { color: #EA4335; }
.distrito-text .yellow { color: #FBBC05; }
.distrito-text .green { color: #34A853; }

/* CONFETTI CSS PURO */
.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -10px;
  opacity: 0;
  animation: confettiFall 3s ease-in-out infinite;
}
.confetti:nth-child(1) { left: 5%; background: #4285F4; animation-delay: 0s; }
.confetti:nth-child(2) { left: 15%; background: #EA4335; animation-delay: 0.3s; }
.confetti:nth-child(3) { left: 25%; background: #FBBC05; animation-delay: 0.6s; }
.confetti:nth-child(4) { left: 35%; background: #34A853; animation-delay: 0.9s; }
.confetti:nth-child(5) { left: 45%; background: #4285F4; animation-delay: 0.2s; }
.confetti:nth-child(6) { left: 55%; background: #EA4335; animation-delay: 0.5s; }
.confetti:nth-child(7) { left: 65%; background: #FBBC05; animation-delay: 0.8s; }
.confetti:nth-child(8) { left: 75%; background: #34A853; animation-delay: 0.1s; }
.confetti:nth-child(9) { left: 85%; background: #4285F4; animation-delay: 0.4s; }
.confetti:nth-child(10) { left: 95%; background: #EA4335; animation-delay: 0.7s; }
@keyframes confettiFall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(70px) rotate(360deg); opacity: 0; }
}

/* ========== HEADER RAINERO ========== */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.header-brand { display: flex; align-items: center; gap: 10px; }
.header-logo { width: 45px; height: 45px; border-radius: 10px; }
.header-text h1 { font-size: 1.1rem; color: var(--violet); line-height: 1; }
.header-text span { font-size: 0.75rem; color: var(--teal); font-weight: 700; display: block; margin-top: 2px; }
.header-right { display: flex; align-items: center; gap: 12px; }
.edu-badge {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  background: linear-gradient(135deg, rgba(123,45,142,0.1), rgba(0,161,154,0.1));
  border-radius: var(--radius-full);
  cursor: pointer; position: relative;
}
.edu-badge:hover .edu-tooltip { opacity: 1; visibility: visible; transform: translateY(0); }
.edu-badge-icon { font-size: 1.1rem; }
.edu-badge-text { font-size: 0.75rem; font-weight: 600; color: var(--violet); }
.edu-tooltip {
  position: absolute; top: calc(100% + 10px); right: 0;
  width: 300px; background: white; border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 20px;
  opacity: 0; visibility: hidden; transform: translateY(-10px);
  transition: var(--transition); z-index: 200;
}
.edu-tooltip h4 { font-size: 0.9rem; color: var(--violet); margin-bottom: 10px; }
.edu-tooltip p { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.5; margin-bottom: 8px; }
.edu-tooltip .edu-dev { font-size: 0.75rem; color: var(--teal); font-weight: 600; border-top: 1px solid var(--border); padding-top: 10px; margin-top: 10px; }
.mvl-logo { height: 48px; cursor: pointer; transition: var(--transition); }
.mvl-logo:hover { transform: scale(1.05); }

/* ========== MAIN CONTENT ========== */
.main {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 20px 30px;
}
.hero-logo {
  width: 200px; height: 200px;
  object-fit: contain;
  margin-bottom: 10px;
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.hero-subtitle { font-size: 1.2rem; color: var(--text-secondary); text-align: center; margin-bottom: 20px; font-weight: 500; }

/* ========== PRODUCTS ========== */
.products { display: flex; flex-direction: column; gap: 16px; width: 100%; max-width: 550px; }
.product-card {
  display: flex; align-items: center; gap: 18px; padding: 20px;
  background: rgba(255,255,255,0.95); border-radius: var(--radius);
  box-shadow: var(--shadow); cursor: pointer; transition: var(--transition);
  text-decoration: none; color: inherit; border: 2px solid transparent;
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.product-card.academia:hover { border-color: var(--violet); }
.product-card.kids:hover { border-color: var(--green); }
.product-logo-float {
  width: 100px; height: 100px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; background: white;
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
  transition: var(--transition); overflow: hidden;
}
.product-card:hover .product-logo-float { transform: scale(1.08); }
.logo-academia-img, .logo-kids-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.product-info { flex: 1; }
.product-info h3 { font-size: 1.3rem; margin-bottom: 6px; color: var(--text); }
.product-info p { font-size: 0.95rem; color: var(--text-secondary); }
.product-badge { padding: 5px 12px; border-radius: var(--radius-full); font-size: 0.7rem; font-weight: 700; text-transform: uppercase; }
.product-badge.active { background: rgba(122,185,41,0.15); color: var(--green); }
.product-badge.new { background: rgba(123,45,142,0.15); color: var(--violet); }
.product-arrow {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg); border-radius: 50%;
  color: var(--text-muted); font-size: 1.2rem; transition: var(--transition);
}
.product-card:hover .product-arrow { background: var(--violet); color: white; }
.product-card.kids:hover .product-arrow { background: var(--green); }

/* ========== FOOTER ========== */
.footer { padding: 20px; text-align: center; background: rgba(255,255,255,0.6); margin-top: 20px; }
.footer p { font-size: 0.85rem; color: var(--text-secondary); }
.footer-dev { margin-top: 6px; font-size: 0.75rem; color: var(--text-muted); }

/* ========== RESPONSIVE ========== */
@media (min-width: 768px) {
  .distrito-text { font-size: 1.3rem; }
  .header { padding: 14px 40px; }
  .header-logo { width: 50px; height: 50px; }
  .header-text h1 { font-size: 1.25rem; }
  .main { padding: 25px 40px 35px; }
  .hero-logo { width: 240px; height: 240px; }
  .hero-subtitle { font-size: 1.4rem; }
  .products { max-width: 650px; }
  .product-card { padding: 24px; }
  .product-logo-float { width: 110px; height: 110px; }
  .product-info h3 { font-size: 1.4rem; }
}
@media (min-width: 1024px) {
  .distrito-text { font-size: 1.4rem; }
  .main { padding: 30px 50px 40px; }
  .hero-logo { width: 280px; height: 280px; }
  .hero-subtitle { font-size: 1.5rem; }
  .products { flex-direction: row; max-width: 900px; gap: 30px; }
  .product-card { flex: 1; flex-direction: column; text-align: center; padding: 30px 25px; position: relative; }
  .product-logo-float { width: 120px; height: 120px; margin-bottom: 15px; }
  .product-arrow { position: absolute; bottom: 20px; right: 20px; }
}

/* ========== MODALS & DEV PANEL ========== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; z-index: 1000;
  opacity: 0; visibility: hidden; transition: var(--transition);
}
.modal-overlay.show { opacity: 1; visibility: visible; }
.modal {
  background: white; border-radius: var(--radius); width: 90%; max-width: 400px;
  overflow: hidden; transform: scale(0.9); transition: var(--transition);
}
.modal-overlay.show .modal { transform: scale(1); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px; border-bottom: 1px solid var(--border); }
.modal-header h2 { font-size: 1.2rem; }
.modal-close { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; background: var(--bg); border: none; border-radius: 50%; cursor: pointer; font-size: 1.2rem; }
.modal-body { padding: 20px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.form-input { width: 100%; padding: 12px 16px; border: 2px solid var(--border); border-radius: 10px; font-size: 1rem; transition: var(--transition); }
.form-input:focus { outline: none; border-color: var(--violet); }
.btn-primary { width: 100%; padding: 14px; background: var(--grad-main); border: none; border-radius: 10px; color: white; font-size: 1rem; font-weight: 700; cursor: pointer; transition: var(--transition); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.dev-panel { position: fixed; inset: 0; background: #0F172A; z-index: 2000; display: none; flex-direction: column; color: white; overflow: hidden; }
.dev-panel.show { display: flex; }
.dev-header { display: flex; align-items: center; gap: 14px; padding: 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.dev-back { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.1); border: none; border-radius: 10px; cursor: pointer; color: white; font-size: 1.3rem; }
.dev-header h1 { flex: 1; font-size: 1.2rem; }
.dev-badge { padding: 6px 14px; background: var(--green); border-radius: var(--radius-full); font-size: 0.7rem; font-weight: 700; }
.dev-content { flex: 1; overflow-y: auto; padding: 25px; }
.dev-welcome { background: linear-gradient(135deg, rgba(123,45,142,0.4), rgba(0,161,154,0.4)); border-radius: var(--radius); padding: 25px; margin-bottom: 25px; }
.dev-welcome h2 { font-size: 1.3rem; margin-bottom: 6px; }
.dev-welcome p { opacity: 0.8; font-size: 0.9rem; }
.dev-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 30px; }
.dev-stat { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 18px; text-align: center; }
.dev-stat-value { font-size: 1.6rem; font-weight: 800; color: var(--green); }
.dev-stat-label { font-size: 0.7rem; color: rgba(255,255,255,0.6); text-transform: uppercase; margin-top: 4px; }
.dev-section { margin-bottom: 30px; }
.dev-section-title { font-size: 0.8rem; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 14px; }
.dev-product { display: flex; align-items: center; gap: 14px; padding: 16px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; margin-bottom: 12px; cursor: pointer; transition: var(--transition); }
.dev-product:hover { background: rgba(255,255,255,0.1); }
.dev-product-icon { width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.dev-product.academia .dev-product-icon { background: rgba(123,45,142,0.3); }
.dev-product.kids .dev-product-icon { background: rgba(122,185,41,0.3); }
.dev-product.planned .dev-product-icon { background: rgba(255,255,255,0.1); }
.dev-product-info { flex: 1; }
.dev-product-info h4 { font-size: 1rem; margin-bottom: 3px; }
.dev-product-info p { font-size: 0.75rem; color: rgba(255,255,255,0.6); }
.dev-status { padding: 5px 12px; border-radius: var(--radius-full); font-size: 0.65rem; font-weight: 700; }
.dev-status.live { background: rgba(122,185,41,0.2); color: var(--green); }
.dev-status.planned { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.5); }
.dev-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.dev-action { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px 14px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; color: white; cursor: pointer; transition: var(--transition); }
.dev-action:hover { background: rgba(123,45,142,0.3); border-color: var(--violet); }
.dev-action span:first-child { font-size: 1.6rem; }
.dev-action span:last-child { font-size: 0.8rem; font-weight: 600; }
.dev-inscripcion-card { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 20px; margin-bottom: 14px; }
.dev-inscripcion-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.dev-inscripcion-title { display: flex; align-items: center; gap: 12px; }
.dev-inscripcion-title img { width: 40px; height: 40px; border-radius: 50%; }
.dev-inscripcion-title h4 { font-size: 1rem; }
.dev-toggle { position: relative; width: 52px; height: 28px; }
.dev-toggle input { opacity: 0; width: 0; height: 0; }
.dev-toggle-slider { position: absolute; cursor: pointer; inset: 0; background: rgba(255,255,255,0.2); border-radius: 14px; transition: 0.3s; }
.dev-toggle-slider:before { content: ""; position: absolute; height: 22px; width: 22px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: 0.3s; }
.dev-toggle input:checked + .dev-toggle-slider { background: var(--green); }
.dev-toggle input:checked + .dev-toggle-slider:before { transform: translateX(24px); }
.dev-inscripcion-status { font-size: 0.75rem; padding: 5px 12px; border-radius: 20px; font-weight: 600; display: inline-block; margin-bottom: 14px; }
.dev-inscripcion-status.open { background: rgba(122,185,41,0.2); color: #7AB929; }
.dev-inscripcion-status.closed { background: rgba(239,68,68,0.2); color: #EF4444; }
.dev-inscripcion-form { display: grid; gap: 12px; }
.dev-inscripcion-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dev-input-group { display: flex; flex-direction: column; gap: 5px; }
.dev-input-group label { font-size: 0.7rem; color: rgba(255,255,255,0.5); text-transform: uppercase; }
.dev-input-group input, .dev-input-group textarea { background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; padding: 12px 14px; color: white; font-size: 0.9rem; font-family: inherit; }
.dev-input-group input:focus, .dev-input-group textarea:focus { outline: none; border-color: var(--violet); }
.dev-input-group textarea { resize: none; min-height: 70px; }
.dev-save-btn { background: var(--grad-main); border: none; border-radius: 10px; padding: 14px; color: white; font-weight: 700; font-size: 0.9rem; cursor: pointer; margin-top: 10px; transition: var(--transition); }
.dev-save-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(123,45,142,0.4); }
.toast { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(100px); background: white; padding: 14px 28px; border-radius: 12px; font-weight: 600; font-size: 0.95rem; z-index: 3000; opacity: 0; transition: var(--transition); box-shadow: var(--shadow-lg); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (min-width: 768px) { .dev-actions { grid-template-columns: repeat(4, 1fr); } .dev-stats { grid-template-columns: repeat(4, 1fr); } }

#reports-modal { z-index: 2100; }

/* ========== REPORTES DASHBOARD ========== */
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 24px; }
.stat-card { background: #f8fafc; padding: 16px; border-radius: 12px; border: 1px solid #e2e8f0; display: flex; flex-direction: column; gap: 4px; }
.stat-value { font-size: 1.5rem; font-weight: 800; color: #1e293b; }
.stat-label { font-size: 0.75rem; color: #64748b; font-weight: 600; }
.report-section { margin-bottom: 24px; }
.report-section h3 { font-size: 1rem; color: #1e293b; margin-bottom: 8px; }
.bar-chart-container { display: flex; flex-direction: column; gap: 12px; }
.chart-row { display: flex; flex-direction: column; gap: 4px; }
.chart-label { font-size: 0.8rem; color: #475569; font-weight: 500; }
.chart-bar-bg { width: 100%; height: 24px; background: #e2e8f0; border-radius: 6px; overflow: hidden; }
.chart-bar-fill { height: 100%; display: flex; align-items: center; padding-left: 8px; color: white; font-size: 0.7rem; font-weight: 700; transition: width 1s ease; }
.bar-col { width: 100%; background: linear-gradient(to top, #7B2D8E, #00A19A); border-radius: 4px 4px 0 0; opacity: 0.8; transition: height 0.5s ease; }
.bar-col:hover { opacity: 1; }
@media (min-width: 768px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
