:root {
  --mf-primary: #7B4397;
  --mf-secondary: #1E9A8A;
  --mf-primary-soft: rgba(123, 67, 151, 0.08);
  --mf-secondary-soft: rgba(30, 154, 138, 0.08);
  --mf-text: #1f2937;
  --mf-text-soft: #6b7280;
  --mf-bg: #f7f8fa;
  --mf-surface: #ffffff;
  --mf-border: #e5e7eb;
  --mf-shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
  --mf-radius: 14px;
}

html, body {
  background: var(--mf-bg);
  color: var(--mf-text);
}

body, button, input, select, textarea {
  font-family: 'Poppins', sans-serif;
}

a {
  transition: all 0.2s ease;
}

/* Base controls */
.btn,
.btn-primary,
.btn-secondary,
button.btn-primary,
button.btn-secondary {
  border-radius: 10px !important;
  border: 1px solid transparent;
  box-shadow: none;
  transition: all 0.2s ease;
}

.btn-primary,
button.btn-primary {
  background: linear-gradient(135deg, var(--mf-primary), var(--mf-secondary)) !important;
  color: #fff !important;
}

.btn-primary:hover,
button.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(64, 49, 110, 0.2);
}

.btn-secondary,
button.btn-secondary {
  background: #fff !important;
  color: #584a77 !important;
  border-color: #d8ddef !important;
}

input,
select,
textarea {
  border-radius: 10px !important;
  border: 1px solid #dfe3ef !important;
  background: #fff;
  color: #2f3550;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input::placeholder,
textarea::placeholder {
  color: #95a0bd !important;
}

input:focus,
select:focus,
textarea:focus {
  outline: none !important;
  border-color: var(--mf-primary) !important;
  box-shadow: 0 0 0 3px rgba(123, 67, 151, 0.1) !important;
}

/* ===== INDEX ===== */
.navbar {
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.9) !important;
  border-bottom: 1px solid var(--mf-border);
  box-shadow: 0 10px 24px rgba(31, 28, 53, 0.08) !important;
}

.nav-logo span,
.nav-link,
.footer h4 {
  color: #2f3550 !important;
}

.nav-btn {
  border-radius: 999px !important;
  background: linear-gradient(135deg, var(--mf-primary), var(--mf-secondary)) !important;
  color: #fff !important;
}

.hero {
  position: relative;
  min-height: 100vh;
}

.hero::before {
  background: url('IMG_8801.jpeg') center center / cover no-repeat !important;
  opacity: 0.44 !important;
  transform: scale(1.02);
}

.hero-overlay {
  background: linear-gradient(118deg, rgba(69, 39, 103, 0.62), rgba(17, 120, 113, 0.50)) !important;
}

.hero-content {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  padding: 28px 26px !important;
  max-width: 900px;
  box-shadow: 0 20px 50px rgba(22, 17, 44, 0.25);
}

.hero-title {
  letter-spacing: -0.02em;
  text-shadow: 0 6px 28px rgba(0, 0, 0, 0.30);
}

.gradient-text {
  background: none !important;
  -webkit-background-clip: initial !important;
  -webkit-text-fill-color: #ffffff !important;
  background-clip: initial !important;
  color: #ffffff !important;
}

.hero-subtitle {
  color: rgba(255, 255, 255, 0.95) !important;
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.22);
}

.section-header h2 {
  color: #2f3550 !important;
  letter-spacing: -0.02em;
  font-weight: 800 !important;
}

.section-header p {
  color: #6e7690 !important;
}

.section-line {
  background: linear-gradient(135deg, var(--mf-primary), var(--mf-secondary)) !important;
  height: 4px !important;
  border-radius: 999px;
}

.footer {
  background: linear-gradient(135deg, #202433 0%, #2c3044 65%, #1e9a8a 180%) !important;
}

/* ===== DASHBOARD REDISEÑO LIMPIO FINAL ===== */
.dashboard {
  background: #f5f6fa !important;
}

.main-content {
  background: transparent !important;
  padding: 20px !important;
}

/* Sidebar */
.sidebar {
  background: #ffffff !important;
  border-right: 1px solid #ececf3 !important;
  box-shadow: 0 8px 24px rgba(35, 34, 66, 0.05) !important;
}

.sidebar-header {
  border-bottom: 1px solid #f1f2f7 !important;
  padding-bottom: 16px !important;
}

.sidebar-header h2 {
  color: #2f3550 !important;
  font-weight: 700 !important;
}

.sidebar-header p {
  color: #7e86a2 !important;
  font-weight: 500 !important;
}

.sidebar-toggle-btn {
  background: #fff !important;
  color: #5d6482 !important;
  border: 1px solid #e4e8f2 !important;
  border-radius: 12px !important;
}

.nav-menu li a {
  color: #3d4463 !important;
  border: 1px solid transparent !important;
  border-radius: 12px !important;
  margin: 4px 10px !important;
  font-weight: 500 !important;
  transition: all 0.2s ease !important;
}

.nav-menu li a i {
  color: #6f7693 !important;
}

.nav-menu li a:hover,
.nav-menu li a.active {
  background: linear-gradient(135deg, var(--mf-primary-soft), var(--mf-secondary-soft)) !important;
  border-color: rgba(123,67,151,0.16) !important;
  color: #2f3550 !important;
}

.nav-menu li a:hover i,
.nav-menu li a.active i {
  color: var(--mf-primary) !important;
}

/* Top bars */
.top-bar,
.top-bar-bottom {
  background: #ffffff !important;
  border: 1px solid #ececf3 !important;
  border-radius: 14px !important;
  box-shadow: 0 6px 20px rgba(35, 34, 66, 0.05) !important;
}

.top-bar h1,
.top-bar-bottom h1,
#sectionTitle,
#sectionTitleBottom {
  color: #2f3550 !important;
  font-weight: 700 !important;
}

.user-info {
  background: #f8f9fd !important;
  border: 1px solid #e7e9f3 !important;
  border-radius: 999px !important;
  color: #4c5470 !important;
}

/* Sections/cards */
.section {
  background: transparent !important;
}

.section,
.section * {
  color: #2f3550;
}

.section p,
.section small {
  color: #4c5470 !important;
}

.modern-clock-container,
.welcome-section,
.cliente-welcome-section,
.stat-card,
.info-card,
.stat-card-alert,
.plan-info-card,
.plan-mf-info-card,
.contrato-card,
.mensajes-container,
.table-container {
  background: #ffffff !important;
  border: 1px solid #ececf3 !important;
  border-radius: 14px !important;
  box-shadow: 0 6px 20px rgba(35, 34, 66, 0.05) !important;
}

/* Clock elegant */
.clock-segment {
  background: #ffffff !important;
  border: 1px solid #e4e8f2 !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 12px rgba(35, 34, 66, 0.05) !important;
  min-width: 92px;
}

.clock-number {
  color: #2f3550 !important;
  font-weight: 800 !important;
  text-shadow: none !important;
}

.clock-label {
  color: #1E9A8A !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em;
}

.clock-separator {
  color: #7B4397 !important;
  font-weight: 800 !important;
}

.clock-date,
#currentDate,
#currentDateCliente {
  background: #f4f1fa !important;
  border: 1px solid #e4deef !important;
  color: #505878 !important;
  border-radius: 10px !important;
  padding: 6px 12px !important;
}

/* Tables legibility */
.table-container table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.table-container thead th {
  background: #ede7f7 !important;
  color: #3d4463 !important; /* mismo tono base del menú */
  font-weight: 800 !important;
  border-bottom: 1px solid #ddd4ee !important;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.82rem !important;
}

/* Refuerzo específico para títulos en sección Clientes */
#clientes .table-container thead th,
#tablaClientes thead th,
#clientesTable thead th {
  color: #3d4463 !important;
}

.table-container tbody td {
  color: #414a69 !important;
  border-bottom: 1px solid #edf0f6 !important;
}

.table-container tbody tr:nth-child(even) {
  background: #fbfcff !important;
}

.table-container tbody tr:hover {
  background: rgba(123,67,151,0.04) !important;
}

/* Horarios / eventos del calendario: legibilidad alta */
.calendar-event,
.fc-event,
.event-item,
.evento-item,
[class*="event"] {
  color: #ffffff !important;
  font-weight: 700 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35) !important;
}

.calendar-event *,
.fc-event *,
.event-item *,
.evento-item *,
[class*="event"] * {
  color: inherit !important;
}

/* Ajuste fino para bloques claros (azules/celestes) */
.calendar-event[style*="rgb(66, 133, 244)"],
.calendar-event[style*="#4285f4"],
.fc-event[style*="rgb(66, 133, 244)"],
.fc-event[style*="#4285f4"] {
  color: #0f1b3d !important;
  text-shadow: none !important;
}

/* Unified modals dashboard+login */
.modal,
.plan-mf-modal,
.modal-login {
  backdrop-filter: blur(7px);
  background: rgba(18, 21, 35, 0.5) !important;
}

.modal .modal-content,
.plan-mf-modal .plan-mf-modal-content,
.modal-login .modal-login-content,
.login-modal-box {
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%) !important;
  border: 1px solid #e7e9f3 !important;
  border-radius: 18px !important;
  box-shadow: 0 24px 60px rgba(23, 28, 47, 0.18) !important;
}

.modal .modal-content h2,
.modal .modal-content h3,
.plan-mf-modal .plan-mf-modal-content h2,
.plan-mf-modal .plan-mf-modal-content h3,
.login-form-modal h2 {
  color: #2f3550 !important;
  font-weight: 700 !important;
}

.modal .close,
.plan-mf-close,
.close-login {
  color: #6f7896 !important;
  background: #f4f5fa !important;
  border: 1px solid #e1e5f1 !important;
  border-radius: 999px !important;
}

.modal .close:hover,
.plan-mf-close:hover,
.close-login:hover {
  color: #2f3550 !important;
  background: #eceff7 !important;
}

.modal .form-group label,
.plan-mf-modal .plan-mf-form-group label,
.form-group-modal label {
  color: #4a5372 !important;
  font-weight: 600 !important;
}

.modal .form-group input,
.modal .form-group select,
.modal .form-group textarea,
.plan-mf-modal .plan-mf-form-group input,
.plan-mf-modal .plan-mf-form-group select,
.plan-mf-modal .plan-mf-form-group textarea,
.input-group-modal input,
.input-group-modal select {
  color: #2f3550 !important;
  border: 1px solid #dfe3ef !important;
  border-radius: 10px !important;
  background: #ffffff !important;
}

.login-options-modal a {
  color: #5d4f7f !important;
}

.login-options-modal a:hover {
  color: #1E9A8A !important;
}

/* Welcome legibility */
#welcomeMessage,
.cliente-welcome-section h2 {
  background: none !important;
  -webkit-text-fill-color: #2f3550 !important;
  color: #2f3550 !important;
  text-shadow: none !important;
}

@media (max-width: 768px) {
  .top-bar,
  .top-bar-bottom,
  .table-container,
  .modal .modal-content {
    border-radius: 12px !important;
  }

  .nav-menu li a {
    margin: 2px 8px !important;
  }

  .clock-segment {
    min-width: 84px;
    padding: 8px 10px !important;
  }

  .clock-number {
    font-size: 1.8rem !important;
  }
}

/* ===== REDISEÑO MINIMALISTA PREMIUM INDEX (SAFE OVERRIDES) ===== */
:root {
  --mf-logo-purple: #7B4397;
  --mf-logo-teal: #1E9A8A;
  --mf-bg-soft: #f6f7fb;
  --mf-surface-2: #ffffff;
  --mf-title: #2a2f45;
  --mf-body: #545d7a;
  --mf-border-soft: #e8ebf3;
  --mf-shadow-soft: 0 14px 34px rgba(37, 40, 66, 0.08);
}

html {
  scroll-padding-top: 95px;
}

body {
  background: var(--mf-bg-soft) !important;
  color: var(--mf-body) !important;
  letter-spacing: 0.01em;
}

.container {
  max-width: 1160px !important;
}

/* Navbar */
.navbar {
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--mf-border-soft) !important;
  box-shadow: 0 8px 24px rgba(30, 33, 54, 0.08) !important;
}

.nav-container {
  padding-top: 12px !important;
  padding-bottom: 12px !important;
}

.nav-logo img {
  height: 46px !important;
}

.nav-logo span {
  color: var(--mf-title) !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em;
}

.nav-link {
  color: #454f72 !important;
  font-weight: 500 !important;
}

.nav-link:hover,
.nav-link.active {
  color: var(--mf-logo-purple) !important;
}

.nav-link::after {
  height: 3px !important;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--mf-logo-purple), var(--mf-logo-teal)) !important;
}

.nav-btn {
  border-radius: 999px !important;
  padding: 11px 22px !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  box-shadow: 0 8px 20px rgba(86, 55, 128, 0.25) !important;
}

/* Hero */
.hero {
  min-height: 100svh !important;
}

.hero::before {
  opacity: 0.35 !important;
}

.hero-overlay {
  background: linear-gradient(135deg, rgba(74, 41, 109, 0.72) 0%, rgba(28, 120, 111, 0.62) 100%) !important;
}

.hero-content {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  border-radius: 20px !important;
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  padding: 34px 30px !important;
  max-width: 860px !important;
  box-shadow: 0 25px 60px rgba(21, 20, 40, 0.24) !important;
}

.hero-title {
  font-size: clamp(2.2rem, 5.2vw, 3.75rem) !important;
  line-height: 1.12 !important;
  margin-bottom: 16px !important;
}

.hero-subtitle {
  max-width: 760px !important;
  margin-bottom: 28px !important;
  font-size: clamp(1rem, 2.2vw, 1.32rem) !important;
}

.hero-buttons {
  gap: 14px !important;
}

.btn,
.btn-primary,
.btn-secondary {
  border-radius: 999px !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: #ffffff !important;
  color: var(--mf-logo-purple) !important;
  border: 1px solid rgba(255, 255, 255, 0.8) !important;
  box-shadow: 0 8px 22px rgba(255, 255, 255, 0.24) !important;
}

.btn-primary:hover {
  transform: translateY(-2px);
  color: #ffffff !important;
  background: linear-gradient(135deg, var(--mf-logo-purple), var(--mf-logo-teal)) !important;
  border-color: transparent !important;
}

.btn-secondary {
  border: 1px solid rgba(255, 255, 255, 0.9) !important;
}

.btn-secondary:hover {
  background: #ffffff !important;
  color: var(--mf-logo-purple) !important;
}

/* Global Sections */
.section-header h2 {
  color: var(--mf-title) !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em;
}

.section-header p {
  color: #687392 !important;
}

.section-line {
  width: 88px !important;
  height: 4px !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, var(--mf-logo-purple), var(--mf-logo-teal)) !important;
}

/* Cards / Blocks */
.objetivo-content,
.mv-card,
.servicio-card,
.que-hacemos,
.instalacion-item,
.contacto-item,
.neuroplay-description,
.neuroplay-programas,
.neuroplay-cta,
.valor-item,
.valor-animal-item,
.ainhoa-quote,
.fundadores-image,
.fundadores-text,
.quienes-image img {
  border-radius: 18px !important;
  border: 1px solid var(--mf-border-soft) !important;
  box-shadow: var(--mf-shadow-soft) !important;
}

.servicio-card:hover,
.mv-card:hover,
.valor-item:hover,
.feature-item:hover,
.contacto-item:hover {
  transform: translateY(-6px) !important;
}

.feature-item {
  border-radius: 12px !important;
  border: 1px solid #ebedf5 !important;
  background: #ffffff !important;
}

/* Sections backgrounds softer */
.objetivo,
.servicios,
.contacto,
.fundadores,
.ainhoa-coco-section {
  background: linear-gradient(180deg, #f8f9fd 0%, #f4f6fb 100%) !important;
}

.mision-vision,
.quienes-somos,
.instalaciones,
.neuroplay {
  background: #ffffff !important;
}

/* Footer */
.footer {
  background: linear-gradient(135deg, #23283a 0%, #2d3348 60%, #1e9a8a 180%) !important;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-section h4,
.footer-section p,
.footer-bottom p {
  color: #eef1fb !important;
}

.footer-section ul li a {
  color: rgba(245, 248, 255, 0.84) !important;
}

.footer-section ul li a:hover {
  color: #ffffff !important;
}

.footer-social a {
  border-radius: 12px !important;
  width: 38px !important;
  height: 38px !important;
}

/* Floating buttons */
.whatsapp-float {
  border: 3px solid #ffffff;
  box-shadow: 0 10px 24px rgba(37, 211, 102, 0.4) !important;
}

.scroll-top {
  box-shadow: 0 10px 24px rgba(74, 53, 118, 0.35) !important;
}

/* Login modal polish (index) */
.modal-login-content {
  max-width: 480px !important;
}

.login-modal-box {
  border-radius: 18px !important;
  border: 1px solid #e7eaf2 !important;
  box-shadow: 0 24px 58px rgba(17, 21, 35, 0.2) !important;
}

.login-btn-modal {
  border-radius: 12px !important;
}

/* Mobile safe */
@media (max-width: 968px) {
  .hero-content {
    padding: 26px 18px !important;
    border-radius: 16px !important;
  }

  .nav-menu {
    background: #ffffff !important;
    border-top: 1px solid var(--mf-border-soft);
  }

  .nav-link {
    color: #3f4868 !important;
  }

  .nav-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 576px) {
  .section-header {
    margin-bottom: 44px !important;
  }

  .objetivo,
  .mision-vision,
  .quienes-somos,
  .fundadores,
  .servicios,
  .neuroplay,
  .instalaciones,
  .contacto,
  .ainhoa-coco-section {
    padding-top: 88px !important;
    padding-bottom: 74px !important;
  }

  .hero-buttons {
    flex-direction: column;
  }
}
