/* ============================================================
   LEADY — Sistema de diseño v2.1 (Base Plana & Editorial Tech)
   Identidad: Yvy Pytũ · Azul Guacamayo (Gua'a Hovy) + Kuarahy Gold
   Tipografía: Clash Display (Títulos) + Plus Jakarta Sans / Space Grotesk (UI)
   Regla innegociable: 100% Colores sólidos y planos. CERO GRADIENTES.
   ============================================================ */

@import url('https://api.fontshare.com/v2/css?f[]=clash-display@400,500,600,700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');
@import url('https://unpkg.com/@phosphor-icons/web@2.1.1/src/regular/style.css');
@import url('https://unpkg.com/@phosphor-icons/web@2.1.1/src/bold/style.css');
@import url('https://unpkg.com/@phosphor-icons/web@2.1.1/src/fill/style.css');
/* ============================================================
   TOKENS & VARIABLES (:root)
   ============================================================ */
:root {
  /* Tierra profunda (Yvy Pytũ) — colores 100% sólidos */
  --yvy: #14130f;
  --yvy-2: #1d1b15;
  --surface: #232019;
  --surface-2: #2e2a20;
  --surface-hover: #383327;

  /* Azul Guacamayo (Gua'a Hovy) — identidad de marca */
  --gua: #2563d8;
  --gua-claro: #4f86f5;
  --gua-soft: rgba(37, 99, 216, 0.15);
  --border-gua: rgba(79, 134, 245, 0.4);

  /* Dorado Sol (Kuarahy) — acción, score y motivación */
  --sol: #f0a830;
  --sol-claro: #ffc861;
  --sol-soft: rgba(240, 168, 48, 0.15);
  --border-sol: rgba(240, 168, 48, 0.4);

  /* Acentos funcionales (botánicos y urgencia) */
  --selva: #4a9d5f;       /* verde: vigente / positivo / IA */
  --selva-soft: rgba(74, 157, 95, 0.15);
  --ceibo: #e0512f;       /* rojo: urgencia / cerrado */
  --ceibo-soft: rgba(224, 81, 47, 0.15);

  /* Texto */
  --text: #f7eee2;
  --muted: #b3a293;
  --dim: #7d7063;

  /* Bordes planos */
  --border: #332f25;
  --border-2: #423d31;

  /* Alias semánticos (compatibilidad) */
  --background-primary: var(--yvy);
  --background-secondary: var(--yvy-2);
  --background-card: var(--surface);
  --text-primary: var(--text);
  --text-muted: var(--muted);
  --shadow-color: rgba(0, 0, 0, 0.45);

  /* Espaciados */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;

  /* Radios */
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 18px;
  --border-radius-xl: 24px;
  --border-radius-pill: 999px;

  /* Compatibilidad con nombres antiguos de JS */
  --blue: #2563d8;
  --blue-dark: #1e4eb0;
  --green: #4a9d5f;
  --yellow: #f0a830;
  --white: #ffffff;

  /* Curvas de aceleración */
  --ease-smooth: cubic-bezier(0.25, 1, 0.5, 1);
}

/* ============================================================
   BASE
   ============================================================ */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', 'Space Grotesk', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--background-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

h1, h2, h3, h4, h5, h6, .disp {
  font-family: 'Clash Display', 'Space Grotesk', sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
  line-height: 1.15;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: clamp(1.4rem, 3vw, 1.8rem); }

p {
  font-size: 1.05rem;
  margin-bottom: var(--space-md);
  max-width: 70ch;
  color: var(--text-muted);
}

a {
  color: var(--gua-claro);
  text-decoration: none;
  transition: color 0.2s var(--ease-smooth);
  font-weight: 500;
}

a:hover {
  color: var(--text-primary);
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  opacity: 1;
}

*:focus-visible {
  outline: 2px solid var(--sol);
  outline-offset: 2px;
}

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

/* ============================================================
   UX & GIMMICKS NEUTRALIZADOS
   ============================================================ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--sol); /* Sólido, sin gradientes */
  z-index: 2000;
  transition: width 0.1s linear;
}

.custom-cursor {
  display: none !important; /* Desactivado por rendimiento y reglas mobile */
}

.audio-mute-btn {
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  color: var(--text-muted);
  width: 38px;
  height: 38px;
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s var(--ease-smooth);
}

.audio-mute-btn:hover, .audio-mute-btn.active {
  color: var(--gua-claro);
  border-color: var(--gua-claro);
  background: var(--gua-soft);
}

/* ============================================================
   NAVBAR
   ============================================================ */
.leady-navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background: var(--yvy);
  border-bottom: 1px solid var(--border);
}

.leady-navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.leady-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: 'Clash Display', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s var(--ease-smooth);
}

.leady-logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.leady-logo:hover {
  color: var(--gua-claro);
}

.leady-navbar-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link-leady {
  padding: 8px 16px;
  border-radius: var(--border-radius-md);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s var(--ease-smooth);
  font-family: inherit;
}

.nav-link-leady:hover {
  background: var(--surface-2);
  color: var(--text-primary);
}

.nav-link-leady.active {
  background: var(--gua-soft);
  color: var(--gua-claro);
}

.nav-link-primary {
  background: var(--gua);
  color: var(--text-primary);
}

.nav-link-primary:hover {
  background: var(--gua-claro);
  color: var(--text-primary);
}

.nav-logout {
  color: var(--ceibo);
}

.nav-logout:hover {
  background: var(--ceibo-soft);
  color: var(--ceibo);
}

.nav-link-owner {
  color: var(--sol);
  border: 1px solid var(--border-sol);
  background: var(--sol-soft);
}

.nav-link-owner:hover, .nav-link-owner.active {
  background: var(--sol);
  color: var(--yvy);
}

.leady-navbar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--text-primary);
  cursor: pointer;
}

/* ============================================================
   HERO / LANDING + LAYOUT FIX
   ============================================================ */
.hero {
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  padding: var(--space-lg) 0;
}

.hero-card {
  max-width: 680px;
  margin: 0 auto;
  padding: var(--space-xl);
  border-radius: var(--border-radius-xl);
  background: var(--background-card);
  border: 1px solid var(--border);
  box-shadow: 0 20px 40px var(--shadow-color);
  animation: fadeInUp 0.4s var(--ease-smooth);
}

/* FIX INTELIGENTE: Si el hero-card tiene una grilla adentro (ej: Dashboard), se ensancha */
.hero-card:has(.row) {
  max-width: 1140px;
  width: 100%;
}

.badge-leady {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  margin-bottom: 20px;
  padding: 6px 14px;
  border-radius: var(--border-radius-pill);
  background: var(--gua-soft);
  border: 1px solid var(--border-gua);
  color: var(--gua-claro);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-card h1 {
  margin-bottom: 18px;
  line-height: 1.1;
}

.hero-card p {
  font-size: 1.05rem;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

/* ============================================================
   BOTONES Y FORMULARIOS
   ============================================================ */
.btn-primary-leady,
.btn-secondary-leady {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  border: none;
  border-radius: var(--border-radius-md);
  padding: 12px 24px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s var(--ease-smooth);
}

.btn-primary-leady {
  background: var(--sol);
  color: var(--yvy);
}

.btn-primary-leady:hover {
  background: var(--sol-claro);
  transform: translateY(-2px);
}

.btn-primary-leady:active {
  transform: scale(0.98);
}

.btn-secondary-leady {
  background: var(--surface-2);
  color: var(--text-primary);
  border: 1px solid var(--border-2);
}

.btn-secondary-leady:hover {
  background: var(--surface-hover);
  border-color: var(--border-gua);
  transform: translateY(-2px);
}

.btn-link-leady {
  background: none;
  border: none;
  padding: 0;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: underline;
  cursor: pointer;
}

.btn-link-leady:hover {
  color: var(--gua-claro);
}

.form-control {
  background: var(--background-secondary);
  border: 1px solid var(--border-2);
  color: var(--text-primary);
  border-radius: var(--border-radius-md);
  padding: 12px 14px;
  font-family: inherit;
  transition: border-color 0.2s var(--ease-smooth);
}

.form-control::placeholder {
  color: var(--dim);
}

.form-control:focus {
  background: var(--background-secondary);
  color: var(--text-primary);
  border-color: var(--gua-claro);
  box-shadow: 0 0 0 3px var(--gua-soft);
  outline: none;
}

.form-label {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 6px;
}

select.form-control option {
  background: var(--background-card);
  color: var(--text-primary);
}

.api-status {
  margin-top: 16px;
  font-weight: 500;
  color: var(--text-muted);
}

.auth-switch {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.auth-switch a {
  color: var(--gua-claro);
  font-weight: 600;
}

/* ============================================================
   BADGES DE VIGENCIA (COLORES SÓLIDOS Y PLANOS)
   ============================================================ */
.deadline-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--border-radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.deadline-badge.ok {
  background: var(--selva-soft);
  color: var(--selva);
}

.deadline-badge.soon {
  background: var(--sol-soft);
  color: var(--sol);
}

.deadline-badge.urgent, .deadline-badge.closed {
  background: var(--ceibo-soft);
  color: var(--ceibo);
}

.deadline-badge.unconfirmed {
  background: var(--surface-2);
  color: var(--text-muted);
}

/* ============================================================
   TARJETA DE OPORTUNIDAD (Limpia y con balance Azul/Dorado)
   ============================================================ */
.opportunity-card {
  height: 100%;
  padding: var(--space-md);
  border-radius: var(--border-radius-lg);
  background: var(--background-card);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s var(--ease-smooth), border-color 0.2s ease, box-shadow 0.2s ease;
}

.specular-highlight {
  display: none !important; /* Chau gradiente radial que seguía al mouse */
}

/* COMBO de energía: Borde superior Dorado animado al hover */
.opportunity-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--sol);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease-smooth);
  z-index: 2;
}

.opportunity-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-gua);
  box-shadow: 0 12px 24px var(--gua-soft); /* Resplandor azul */
}

.opportunity-card:hover::before {
  transform: scaleX(1);
}

.opportunity-type {
  display: inline-block;
  margin-bottom: 14px;
  padding: 4px 10px;
  border-radius: var(--border-radius-sm);
  background: var(--gua-soft);
  color: var(--gua-claro);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.opportunity-card h3 {
  margin-bottom: 12px;
  font-size: 1.35rem;
  line-height: 1.25;
}

.opportunity-card p {
  color: var(--text-muted);
  line-height: 1.5;
  font-size: 0.92rem;
}

.opportunity-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.organization-logo-placeholder {
  width: 48px;
  height: 48px;
  border-radius: var(--border-radius-md);
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: var(--background-secondary);
  color: var(--gua-claro);
  font-size: 1.2rem;
  font-weight: 700;
  border: 1px solid var(--border-2);
}

.organization-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--border-radius-md);
  background: var(--white);
}

.organization-name {
  margin-bottom: 4px;
  color: var(--gua-claro);
  font-weight: 600;
  font-size: 0.85rem;
}

.opportunity-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 18px;
  font-weight: 500;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.opportunity-meta span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.opportunity-meta i {
  color: var(--sol);
  font-size: 0.95rem;
}

/* ============================================================
   TARJETA DE RECOMENDACIÓN & SCORE
   ============================================================ */
.recommendation-card {
  position: relative;
}

.recommendation-score {
  position: absolute;
  top: 18px;
  right: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--yvy);
  border: 2px solid var(--sol);
}

.recommendation-score span {
  font-family: 'Clash Display', sans-serif;
  color: var(--sol);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
}

.recommendation-score small {
  color: var(--text-muted);
  font-size: 0.58rem;
  font-weight: 600;
  text-transform: uppercase;
}

.compatibility-bar {
  width: 100%;
  height: 6px;
  margin: var(--space-sm) 0 16px;
  border-radius: var(--border-radius-pill);
  background: var(--background-secondary);
  overflow: hidden;
}

.compatibility-fill {
  height: 100%;
  border-radius: var(--border-radius-pill);
  background: var(--sol);
  width: 0%;
  transition: width 0.8s var(--ease-smooth);
}

.recommendation-reasons {
  margin-top: var(--space-sm);
  padding: 14px;
  border-radius: var(--border-radius-md);
  background: var(--background-secondary);
  border: 1px solid var(--border);
}

.recommendation-reasons strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text-primary);
  font-size: 0.85rem;
}

.recommendation-reasons p, .recommendation-reasons ul {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* ============================================================
   BLOQUE DE IA (TEMA SELVA / VERDE PLANO)
   ============================================================ */
.ai-explanation {
  margin-top: var(--space-sm);
  padding: 14px;
  border-radius: var(--border-radius-md);
  background: var(--selva-soft);
  border: 1px solid rgba(74, 157, 95, 0.3);
  border-left: 4px solid var(--selva);
}

.ai-explanation-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  color: var(--selva);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ai-explanation-text {
  margin: 0;
  color: var(--text-primary);
  font-size: 0.88rem;
  line-height: 1.5;
}

.ai-loading {
  color: var(--text-muted);
  font-style: italic;
}

/* ============================================================
   WIDGET: TERERÉ VIRTUAL (SIMPLIFICADO Y SIN OVERHEAD)
   ============================================================ */
.guampa-widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-xl);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.guampa-frame {
  width: 120px;
  height: 180px;
  margin: var(--space-sm) auto;
}

.guampa-svg {
  width: 100%;
  height: 100%;
}

.ronda-setup {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: var(--space-md);
}

/* ============================================================
   ESTADOS Y SKELETONS PLANOS
   ============================================================ */
.state-container {
  display: grid;
  gap: var(--space-md);
}

.state-hidden {
  display: none !important;
}

.state-visible {
  display: block;
}

.skeleton-card {
  min-height: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-lg);
  padding: var(--space-md);
}

.skeleton-item {
  background: var(--surface-2);
  border-radius: var(--border-radius-sm);
  animation: pulseOpacity 1.2s infinite ease-in-out;
}

@keyframes pulseOpacity {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.8; }
}

/* ============================================================
   DASHBOARD & DETALLE
   ============================================================ */
.dashboard-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.dashboard-section-title {
  font-size: 1.6rem;
  margin-top: var(--space-md);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gua-claro);
  font-weight: 600;
  font-size: 0.9rem;
}

.detail-card {
  padding: 32px;
  border-radius: var(--border-radius-xl);
  background: var(--background-card);
  border: 1px solid var(--border);
}

.detail-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.detail-logo {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: var(--border-radius-lg);
  display: grid;
  place-items: center;
  background: var(--background-secondary);
  color: var(--gua-claro);
  font-size: 1.8rem;
  font-weight: 700;
  border: 1px solid var(--border-2);
}

.detail-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--border-radius-md);
  background: var(--white);
}

.detail-header h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.detail-description {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.detail-item {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: var(--border-radius-md);
  background: var(--background-secondary);
  border: 1px solid var(--border);
}

.detail-item i {
  color: var(--sol);
  font-size: 1.2rem;
}

.detail-item strong {
  display: block;
  margin-bottom: 2px;
  color: var(--text-primary);
  font-size: 0.88rem;
}

.detail-item span {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* ============================================================
   PANEL DE ADMINISTRACIÓN
   ============================================================ */
.admin-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}

.admin-tab {
  padding: 10px 18px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s var(--ease-smooth);
}

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

.admin-tab.active {
  color: var(--gua-claro);
  border-bottom-color: var(--gua-claro);
}

.admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  margin-bottom: 10px;
  border-radius: var(--border-radius-md);
  background: var(--background-card);
  border: 1px solid var(--border);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.admin-row:hover {
  transform: translateX(4px);
  border-color: var(--border-gua);
}

.admin-row-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.admin-row-info strong {
  color: var(--text-primary);
  font-size: 0.95rem;
}

.admin-row-meta {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.admin-status {
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.7rem;
}

.admin-status-open {
  background: var(--selva-soft);
  color: var(--selva);
}

.admin-status-closed, .admin-status-inactive {
  background: var(--ceibo-soft);
  color: var(--ceibo);
}

.admin-row-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.admin-btn-edit, .admin-btn-delete {
  width: 36px;
  height: 36px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-2);
  background: var(--surface-2);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.95rem;
}

.admin-btn-edit { color: var(--gua-claro); }
.admin-btn-edit:hover { background: var(--gua-soft); border-color: var(--border-gua); }

.admin-btn-delete { color: var(--ceibo); }
.admin-btn-delete:hover { background: var(--ceibo-soft); border-color: var(--ceibo); }

.text-secondary {
  color: var(--text-muted) !important;
}

/* ============================================================
   SCROLLBAR & SELECTION
   ============================================================ */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--yvy);
}
::-webkit-scrollbar-thumb {
  background: var(--surface-2);
  border-radius: var(--border-radius-pill);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gua);
}

::selection {
  background: var(--gua-soft);
  color: var(--gua-claro);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .leady-navbar-toggle {
    display: block;
  }

  .leady-navbar-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 14px var(--space-md);
    background: var(--yvy);
    border-bottom: 1px solid var(--border);
  }

  .leady-navbar-links.open {
    display: flex;
  }

  .nav-link-leady {
    text-align: center;
    width: 100%;
  }

  .detail-card, .hero-card {
    padding: 24px 18px;
  }

  .detail-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }
}

.greeting-animated {
    display: inline-block;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.greeting-fade-out {
    opacity: 0;
    transform: translateY(-6px);
}

/* =========================================================
   FIX GLOBAL DE CENTRADO DE ÍCONOS (PHOSPHOR ICONS)
   ========================================================= */

/* 1. Resetear el comportamiento de alineación de todos los íconos */
i.ph, 
i[class^="ph-"], 
i[class*=" ph-"],
i[class^="ph-fill"],
i[class*=" ph-fill"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
    line-height: 1 !important;
}

/* 2. Forzar centrado perfecto en los círculos del Dashboard y Perfil */
.rounded-circle,
[class*="-icon-container"],
[class*="-avatar"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* 3. Ajuste de alineación en elementos flexibles (Nav, Botones, Badges) */
.nav-link-leady,
.badge,
.badge-leady,
.btn,
.streak-pill {
    display: inline-flex !important;
    align-items: center !important;
    vertical-align: middle !important;
}