/* =========================================
   EXPLORA MIAMI — admin.css
   Panel de administración — Dark Premium Dashboard
   Metodología: ui-ux-pro-max + taste-skill soft
   Dark ocean · glassmorphism · animaciones cinéticas
   Fuentes: Playfair Display + Inter (Google)
   IMPORTANT: No modificar nombres de clases — admin.js los referencia
========================================= */

/* ===== VARIABLES ===== */
:root {
  /* Paleta tropical (debe coincidir con public site) */
  --admin-turquesa:  #00BCD4;
  --admin-coral:     #FF6B6B;
  --admin-verde:     #7CB342;
  --admin-mostaza:   #FFB300;
  --admin-azul:      #42A5F5;
  --admin-purpura:   #AB47BC;

  /* Dark ocean — background principal del dashboard */
  --admin-bg:        #071e2b;
  --admin-bg-mid:    #0a2d3f;
  --admin-bg-fin:    #051822;
  --admin-surface:   rgba(255, 255, 255, 0.055);  /* glass cards */
  --admin-surface-2: rgba(255, 255, 255, 0.038);  /* glass inputs / nested */
  --admin-blanco:    #ffffff;

  /* Bordes y texto en dark */
  --admin-borde:     rgba(255, 255, 255, 0.10);
  --admin-borde-2:   rgba(255, 255, 255, 0.06);
  --admin-texto:     rgba(255, 255, 255, 0.95);
  --admin-medio:     rgba(255, 255, 255, 0.60);
  --admin-suave:     rgba(255, 255, 255, 0.35);

  /* Tokens glass */
  --glass-blur:      blur(20px) saturate(160%);
  --glass-shadow:    0 8px 40px rgba(0, 0, 0, 0.45),
                     inset 0 1px 0 rgba(255, 255, 255, 0.08),
                     inset 0 -1px 0 rgba(0, 0, 0, 0.08);
  --glass-shadow-l:  0 20px 60px rgba(0, 0, 0, 0.55),
                     0 6px 20px rgba(0, 188, 212, 0.12),
                     inset 0 1px 0 rgba(255, 255, 255, 0.12);

  /* Layout */
  --admin-radio:     16px;
  --admin-radio-sm:  10px;
  --admin-sombra:    var(--glass-shadow);
  --admin-sombra-l:  var(--glass-shadow-l);

  /* Timing */
  --ease-out: cubic-bezier(0.2, 0, 0, 1);
}

/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Helvetica Neue', sans-serif;
  background: linear-gradient(160deg, var(--admin-bg) 0%, var(--admin-bg-mid) 50%, var(--admin-bg-fin) 100%);
  background-attachment: fixed;
  color: var(--admin-texto);
  line-height: 1.6;
  min-height: 100vh;
}

/* Luces de ambiente en el fondo — idéntico al dark ocean del sitio público */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 10% 10%,  rgba(0, 188, 212, 0.10) 0%, transparent 55%),
    radial-gradient(ellipse 60% 45% at 90% 85%,  rgba(255, 107, 107, 0.07) 0%, transparent 52%),
    radial-gradient(ellipse 55% 55% at 50% 110%, rgba(0,  60,  90,  0.20) 0%, transparent 60%);
}

/* Todo el contenido sobre la capa de fondo */
body > * { position: relative; z-index: 1; }

a    { text-decoration: none; color: inherit; }
ul   { list-style: none; }
code { font-family: 'Courier New', 'Consolas', monospace; }

/* ===== ANIMACIÓN DE ENTRADA (ScrollTiltedGrid methodology) ===== */
/* Las secciones y cards entran desde abajo con perspectiva — igual que las
   tiles del ScrollTiltedGrid: rises from below, settle into focus */
@keyframes tile-enter {
  from {
    opacity: 0;
    transform: translateY(48px) rotateX(12deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
  }
}

@keyframes slide-down {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes orbs-drift {
  0%   { transform: translate(0, 0)       scale(1);    }
  30%  { transform: translate(-12px, 8px)  scale(1.03); }
  65%  { transform: translate(8px, -10px)  scale(0.97); }
  100% { transform: translate(-6px, 6px)   scale(1.02); }
}

@keyframes badgePulse {
  0%, 100% { box-shadow: 0 2px 8px rgba(255, 107, 107, 0.40); }
  50%       { box-shadow: 0 2px 20px rgba(255, 107, 107, 0.75); }
}

@keyframes bar-grow {
  from { transform: scaleY(0); }
  to   { transform: scaleY(1); }
}

/* ===================================================================
   LOGIN OVERLAY
================================================================= */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: linear-gradient(160deg, #050f17 0%, #071e2b 45%, #0a2d3f 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow: hidden;
}

/* Orbs animados en el login — igual que el hero del sitio público */
.login-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 45% 55% at 20% 25%, rgba(0, 188, 212, 0.20) 0%, transparent 60%),
    radial-gradient(ellipse 38% 48% at 80% 72%, rgba(255, 107, 107, 0.15) 0%, transparent 58%),
    radial-gradient(ellipse 32% 40% at 60% 15%, rgba(255, 179, 0, 0.10) 0%, transparent 52%);
  animation: orbs-drift 14s ease-in-out infinite alternate;
}

.login-card {
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 28px;
  padding: 3.25rem 2.75rem;
  width: 100%;
  max-width: 420px;
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.50),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  text-align: center;
  position: relative;
  animation: tile-enter 0.7s var(--ease-out) both;
}

/* Sheen diagonal en la card de login */
.login-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, transparent 45%);
  pointer-events: none;
}

/* Logo en Playfair italic */
.login-logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 2.35rem;
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.08em;
  position: relative;
}
.login-logo-e { color: var(--admin-turquesa); }
.login-logo-m { color: var(--admin-coral); }

.login-subtitulo {
  font-size: 0.82rem;
  color: var(--admin-medio);
  margin-bottom: 2.25rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  position: relative;
}

.login-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--admin-medio);
  text-align: left;
  margin-bottom: 0.45rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  position: relative;
}

.login-input {
  width: 100%;
  padding: 0.9rem 1.1rem;
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(8px);
  transition: border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
  margin-bottom: 1.35rem;
  position: relative;
}
.login-input::placeholder { color: var(--admin-suave); }
.login-input:focus {
  outline: none;
  border-color: var(--admin-turquesa);
  box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.20),
              0 0 20px rgba(0, 188, 212, 0.12);
}

.login-btn {
  width: 100%;
  padding: 0.95rem;
  background: linear-gradient(135deg, rgba(0, 188, 212, 0.88) 0%, rgba(0, 140, 170, 0.80) 100%);
  border: 1px solid rgba(0, 188, 212, 0.45);
  border-radius: 50px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 24px rgba(0, 188, 212, 0.38),
              inset 0 1px 0 rgba(255, 255, 255, 0.20);
  transition: transform 0.22s var(--ease-out), box-shadow 0.22s var(--ease-out);
  position: relative;
}
.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 188, 212, 0.50),
              inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.login-btn:active { transform: translateY(0); }

.login-error {
  display: none;
  margin-top: 0.85rem;
  font-size: 0.88rem;
  color: var(--admin-coral);
  font-weight: 600;
  position: relative;
}

.login-hint {
  margin-top: 1.75rem;
  font-size: 0.78rem;
  color: var(--admin-suave);
  position: relative;
}
.login-hint code {
  font-size: 0.82rem;
  background: rgba(0, 188, 212, 0.12);
  padding: 0.15rem 0.55rem;
  border-radius: 6px;
  color: var(--admin-turquesa);
  font-weight: 700;
  border: 1px solid rgba(0, 188, 212, 0.25);
}

/* ===================================================================
   HEADER FIJO DEL ADMIN
================================================================= */
.admin-header {
  background: rgba(7, 30, 43, 0.82);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--admin-borde);
  color: #fff;
  padding: 0.85rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.30),
              inset 0 -1px 0 rgba(255, 255, 255, 0.06);
  animation: slide-down 0.5s var(--ease-out) both;
}

.admin-header__izq { display: flex; align-items: center; gap: 0.7rem; }

/* Logo del header en Playfair italic */
.admin-header__logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.4rem;
  display: flex;
  gap: 0.06em;
}
.admin-header__logo span:first-child { color: var(--admin-turquesa); }
.admin-header__logo span:last-child  { color: var(--admin-mostaza); }

.admin-header__tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: rgba(0, 188, 212, 0.18);
  border: 1px solid rgba(0, 188, 212, 0.38);
  color: var(--admin-turquesa);
  padding: 0.18rem 0.75rem;
  border-radius: 50px;
}

.admin-header__der { display: flex; align-items: center; gap: 1rem; }

.admin-header__link {
  font-size: 0.85rem;
  color: var(--admin-medio);
  transition: color 0.2s;
  font-weight: 500;
}
.admin-header__link:hover { color: var(--admin-turquesa); }

.btn-logout {
  padding: 0.38rem 1.15rem;
  border: 1.5px solid rgba(255, 107, 107, 0.38);
  border-radius: 50px;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  font-family: 'Inter', sans-serif;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.btn-logout:hover {
  background: rgba(255, 107, 107, 0.18);
  border-color: var(--admin-coral);
  color: #fff;
}

/* ===================================================================
   LAYOUT PRINCIPAL
================================================================= */
.admin-main {
  max-width: 1300px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 6rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;
  z-index: 1;
}

/* ===================================================================
   SECCIONES — glass cards con entrada cinética (ScrollTiltedGrid)
================================================================= */
.admin-seccion {
  background: var(--admin-surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--admin-borde);
  border-radius: var(--admin-radio);
  padding: 2rem;
  box-shadow: var(--glass-shadow);
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  position: relative;
  overflow: hidden;

  /* Entrada cinética: tiles rise from below tipped forward → settle */
  animation: tile-enter 0.75s var(--ease-out) both;
}

/* Sheen en cada sección */
.admin-seccion::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  pointer-events: none;
}

/* Delay escalonado por sección — mismo concepto que staggered grid */
.admin-seccion:nth-child(1) { animation-delay: 0.05s; }
.admin-seccion:nth-child(2) { animation-delay: 0.15s; }
.admin-seccion:nth-child(3) { animation-delay: 0.25s; }
.admin-seccion:nth-child(4) { animation-delay: 0.35s; }

.admin-seccion__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--admin-borde-2);
}

/* Título de sección en Playfair italic */
.admin-seccion__titulo {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.45rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.admin-seccion__fecha {
  font-size: 0.84rem;
  color: var(--admin-medio);
  font-weight: 500;
  text-transform: capitalize;
}

/* ===================================================================
   TARJETAS DE MÉTRICAS — glass + glow por color
================================================================= */
.metricas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (max-width: 900px) { .metricas-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .metricas-grid { grid-template-columns: 1fr 1fr; } }

.metrica-card {
  background: var(--admin-surface-2);
  backdrop-filter: blur(12px);
  border: 1px solid var(--admin-borde);
  border-radius: var(--admin-radio);
  padding: 1.5rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.30s var(--ease-out),
              box-shadow 0.30s var(--ease-out),
              border-color 0.25s ease;

  /* Entrada escalonada dentro de la sección */
  animation: tile-enter 0.65s var(--ease-out) both;
}

.metrica-card:nth-child(1) { animation-delay: 0.10s; }
.metrica-card:nth-child(2) { animation-delay: 0.17s; }
.metrica-card:nth-child(3) { animation-delay: 0.24s; }
.metrica-card:nth-child(4) { animation-delay: 0.31s; }
.metrica-card:nth-child(5) { animation-delay: 0.38s; }
.metrica-card:nth-child(6) { animation-delay: 0.45s; }

.metrica-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.50);
}

/* Línea de color superior — border-top definida per-color */
.metrica-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--admin-radio) var(--admin-radio) 0 0;
  background: currentColor;
  opacity: 0.80;
}

/* Colores de acento por tipo — currentColor hereda para ::before */
.metrica-card--turquesa { color: var(--admin-turquesa); }
.metrica-card--azul     { color: var(--admin-azul);     }
.metrica-card--verde    { color: var(--admin-verde);     }
.metrica-card--coral    { color: var(--admin-coral);     }
.metrica-card--mostaza  { color: var(--admin-mostaza);   }
.metrica-card--gris     { color: var(--admin-medio);     }

/* Glow en hover por tipo */
.metrica-card--turquesa:hover { box-shadow: 0 20px 50px rgba(0,0,0,0.50), 0 0 28px rgba(0,188,212,0.20); border-color: rgba(0,188,212,0.30); }
.metrica-card--azul:hover     { box-shadow: 0 20px 50px rgba(0,0,0,0.50), 0 0 28px rgba(66,165,245,0.20); border-color: rgba(66,165,245,0.30); }
.metrica-card--verde:hover    { box-shadow: 0 20px 50px rgba(0,0,0,0.50), 0 0 28px rgba(124,179,66,0.20); border-color: rgba(124,179,66,0.30); }
.metrica-card--coral:hover    { box-shadow: 0 20px 50px rgba(0,0,0,0.50), 0 0 28px rgba(255,107,107,0.20); border-color: rgba(255,107,107,0.30); }
.metrica-card--mostaza:hover  { box-shadow: 0 20px 50px rgba(0,0,0,0.50), 0 0 28px rgba(255,179,0,0.20); border-color: rgba(255,179,0,0.30); }

.metrica-card__icono {
  font-size: 1.4rem;
  line-height: 1;
  opacity: 0.90;
  margin-bottom: 0.1rem;
}

.metrica-card__num {
  font-size: 2.4rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.metrica-card__label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--admin-medio);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

/* ===================================================================
   GRÁFICO DE BARRAS CSS — visitas por día
================================================================= */
.grafico-wrap {
  background: var(--admin-surface-2);
  border: 1px solid var(--admin-borde-2);
  border-radius: var(--admin-radio);
  padding: 1.65rem;
}

.grafico-titulo {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1.35rem;
  letter-spacing: -0.01em;
}

.grafico-barras {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  height: 160px;
  gap: 0.5rem;
  padding: 0 0.25rem;
}

.barra-dia {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  flex: 1;
}

.barra-valor {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--admin-medio);
}

.barra-barra {
  width: 100%;
  height: 110px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px 8px 4px 4px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.barra-fill {
  width: 100%;
  background: linear-gradient(180deg, var(--admin-turquesa) 0%, rgba(0,150,170,0.70) 100%);
  border-radius: 6px 6px 3px 3px;
  min-height: 4px;
  transition: height 0.65s var(--ease-out);
  transform-origin: bottom;
  box-shadow: 0 0 12px rgba(0, 188, 212, 0.30);
}

/* Día de hoy: coral con glow */
.barra-dia--hoy .barra-fill {
  background: linear-gradient(180deg, var(--admin-coral) 0%, rgba(220, 80, 80, 0.70) 100%);
  box-shadow: 0 0 16px rgba(255, 107, 107, 0.38);
}
.barra-dia--hoy .barra-etiqueta {
  color: var(--admin-coral);
  font-weight: 700;
}
.barra-dia--hoy .barra-valor {
  color: var(--admin-coral);
}

.barra-etiqueta {
  font-size: 0.72rem;
  color: var(--admin-medio);
  font-weight: 600;
  text-align: center;
}

/* ===================================================================
   TABLA DE CLICS POR DESTINO
================================================================= */
.clics-wrap {
  background: var(--admin-surface-2);
  border: 1px solid var(--admin-borde-2);
  border-radius: var(--admin-radio);
  padding: 1.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.clic-fila {
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  align-items: center;
  gap: 1rem;
}

.clic-nombre {
  font-size: 0.86rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clic-barra-cont {
  height: 8px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 50px;
  overflow: hidden;
}

.clic-barra {
  height: 100%;
  border-radius: 50px;
  min-width: 4px;
  transition: width 0.55s var(--ease-out);
}

.clic-num {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--admin-medio);
  min-width: 2.5rem;
  text-align: right;
}

/* ===================================================================
   BOTONES ADMIN
================================================================= */
.admin-btn {
  padding: 0.42rem 1.05rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.18s var(--ease-out), background 0.2s;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.80);
}
.admin-btn:hover { opacity: 1; transform: translateY(-1px); background: rgba(255,255,255,0.10); }

.admin-btn--edit {
  background: rgba(0, 188, 212, 0.14);
  border-color: rgba(0, 188, 212, 0.25);
  color: var(--admin-turquesa);
}
.admin-btn--edit:hover { background: rgba(0, 188, 212, 0.22); }

.admin-btn--del {
  background: rgba(255, 107, 107, 0.12);
  border-color: rgba(255, 107, 107, 0.22);
  color: var(--admin-coral);
}
.admin-btn--del:hover { background: rgba(255, 107, 107, 0.20); }

.admin-btn--nuevo {
  background: linear-gradient(135deg, rgba(0,188,212,0.80) 0%, rgba(0,140,170,0.72) 100%);
  border-color: rgba(0, 188, 212, 0.40);
  color: #fff;
  border-radius: 50px;
  padding: 0.52rem 1.4rem;
  font-size: 0.88rem;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0, 188, 212, 0.28);
}
.admin-btn--nuevo:hover {
  background: linear-gradient(135deg, rgba(0,188,212,0.95) 0%, rgba(0,150,180,0.88) 100%);
  box-shadow: 0 6px 24px rgba(0, 188, 212, 0.42);
  opacity: 1;
}

.admin-btn--exportar {
  background: linear-gradient(135deg, rgba(124,179,66,0.78) 0%, rgba(85,139,47,0.70) 100%);
  border-color: rgba(124, 179, 66, 0.38);
  color: #fff;
  border-radius: 50px;
  padding: 0.52rem 1.4rem;
  font-size: 0.88rem;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(124, 179, 66, 0.24);
}
.admin-btn--exportar:hover {
  background: linear-gradient(135deg, rgba(124,179,66,0.95) 0%, rgba(85,139,47,0.88) 100%);
  box-shadow: 0 6px 24px rgba(124, 179, 66, 0.38);
  opacity: 1;
}

/* ===================================================================
   FORMULARIO DE DESTINO
================================================================= */
.form-destino-card {
  background: var(--admin-surface-2);
  border: 1px solid var(--admin-borde);
  border-radius: var(--admin-radio);
  padding: 1.85rem;
  margin-bottom: 1.5rem;
  animation: tile-enter 0.55s var(--ease-out) both;
}

.form-destino__titulo {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--admin-medio);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--admin-borde-2);
}

.admin-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 700px) { .admin-form__grid { grid-template-columns: 1fr; } }

.admin-form__grupo       { display: flex; flex-direction: column; gap: 0.38rem; }
.admin-form__grupo--full { grid-column: 1 / -1; }

.admin-form__label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--admin-medio);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.admin-form__input,
.admin-form__select,
.admin-form__textarea {
  padding: 0.68rem 1rem;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.90);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(6px);
  transition: border-color 0.22s var(--ease-out), box-shadow 0.22s var(--ease-out);
  width: 100%;
}
.admin-form__input::placeholder,
.admin-form__textarea::placeholder { color: var(--admin-suave); }

.admin-form__select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.admin-form__select option {
  background: #0a2d3f;
  color: #fff;
}

.admin-form__input:focus,
.admin-form__select:focus,
.admin-form__textarea:focus {
  outline: none;
  border-color: var(--admin-turquesa);
  box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.18),
              0 0 16px rgba(0, 188, 212, 0.10);
}

.admin-form__textarea { resize: vertical; min-height: 90px; }

.admin-form__acciones {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.admin-form__btn-guardar {
  padding: 0.72rem 1.85rem;
  background: linear-gradient(135deg, rgba(0,188,212,0.85) 0%, rgba(0,140,170,0.78) 100%);
  border: 1px solid rgba(0, 188, 212, 0.40);
  border-radius: 50px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 18px rgba(0, 188, 212, 0.30),
              inset 0 1px 0 rgba(255,255,255,0.18);
  transition: transform 0.22s var(--ease-out), box-shadow 0.22s var(--ease-out);
}
.admin-form__btn-guardar:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 188, 212, 0.44),
              inset 0 1px 0 rgba(255,255,255,0.22);
}

.admin-form__btn-cancelar {
  padding: 0.72rem 1.35rem;
  background: transparent;
  color: var(--admin-medio);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: 50px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.admin-form__btn-cancelar:hover {
  border-color: rgba(255, 107, 107, 0.45);
  color: var(--admin-coral);
}

/* ===================================================================
   TABLA DE DESTINOS
================================================================= */
.admin-tabla-cont {
  overflow-x: auto;
  border-radius: var(--admin-radio-sm);
  border: 1px solid var(--admin-borde-2);
  background: var(--admin-surface-2);
}

.admin-tabla {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.admin-tabla th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--admin-medio);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 0.85rem 1.1rem;
  text-align: left;
  border-bottom: 1px solid var(--admin-borde-2);
}

.admin-tabla td {
  padding: 0.95rem 1.1rem;
  border-bottom: 1px solid var(--admin-borde-2);
  color: rgba(255, 255, 255, 0.82);
  vertical-align: middle;
}
.admin-tabla tr:last-child td { border-bottom: none; }
.admin-tabla tr:hover td { background: rgba(0, 188, 212, 0.05); }

.tabla-vacia {
  text-align: center;
  color: var(--admin-medio);
  padding: 2.75rem !important;
  font-size: 0.9rem;
}

/* Badges de tipo en la tabla */
.admin-badge {
  display: inline-block;
  padding: 0.22rem 0.75rem;
  border-radius: 50px;
  font-size: 0.74rem;
  font-weight: 700;
}
.admin-badge--mar    {
  background: rgba(0, 188, 212, 0.16);
  border: 1px solid rgba(0, 188, 212, 0.28);
  color: var(--admin-turquesa);
}
.admin-badge--tierra {
  background: rgba(124, 179, 66, 0.16);
  border: 1px solid rgba(124, 179, 66, 0.28);
  color: var(--admin-verde);
}

/* Toggle activo / inactivo */
.toggle-btn {
  padding: 0.28rem 0.9rem;
  border-radius: 50px;
  border: 1px solid rgba(255, 107, 107, 0.28);
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  background: rgba(255, 107, 107, 0.10);
  color: var(--admin-coral);
  transition: background 0.2s, border-color 0.2s;
}
.toggle-btn--on {
  background: rgba(0, 188, 212, 0.12);
  border-color: rgba(0, 188, 212, 0.28);
  color: var(--admin-turquesa);
}
.toggle-btn:hover { opacity: 0.80; }

/* ===================================================================
   BANDEJA DE MENSAJES
================================================================= */
.bandeja-mensajes {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mensaje-card {
  display: flex;
  gap: 1.1rem;
  background: var(--admin-surface-2);
  border: 1px solid var(--admin-borde-2);
  border-radius: var(--admin-radio);
  padding: 1.3rem 1.5rem;
  transition: box-shadow 0.28s var(--ease-out),
              border-color 0.25s ease,
              transform 0.28s var(--ease-out);
}
.mensaje-card:hover {
  box-shadow: var(--glass-shadow-l);
  border-color: rgba(0, 188, 212, 0.22);
  transform: translateY(-2px);
}

/* Mensaje no leído: acento turquesa */
.mensaje-card:not(.mensaje-card--leido) {
  border-left: 3px solid var(--admin-turquesa);
}

.mensaje-avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.30);
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
}

.mensaje-cuerpo { flex: 1; min-width: 0; }

.mensaje-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.65rem;
}

.mensaje-nombre {
  font-size: 0.94rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
}

.mensaje-empresa {
  font-size: 0.84rem;
  color: var(--admin-medio);
}

.mensaje-badge {
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(0, 188, 212, 0.14);
  border: 1px solid rgba(0, 188, 212, 0.28);
  color: var(--admin-turquesa);
  padding: 0.18rem 0.65rem;
  border-radius: 50px;
}

.mensaje-fecha {
  font-size: 0.78rem;
  color: var(--admin-suave);
  margin-left: auto;
}

.mensaje-texto {
  font-size: 0.9rem;
  color: var(--admin-medio);
  line-height: 1.65;
  margin-bottom: 0.55rem;
}

.mensaje-email {
  font-size: 0.85rem;
  color: var(--admin-turquesa);
  font-weight: 600;
  margin-right: 1rem;
  transition: opacity 0.2s;
}
.mensaje-email:hover { opacity: 0.78; text-decoration: underline; }

.mensaje-tel {
  font-size: 0.85rem;
  color: var(--admin-medio);
}

/* ===================================================================
   NOTIFICACIÓN TOAST
================================================================= */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: rgba(7, 30, 43, 0.92);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(0, 188, 212, 0.28);
  color: #fff;
  padding: 0.82rem 1.85rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 1000;
  box-shadow: 0 8px 36px rgba(0, 0, 0, 0.40),
              0 0 20px rgba(0, 188, 212, 0.12),
              inset 0 1px 0 rgba(255, 255, 255, 0.10);
  transition: transform 0.38s var(--ease-out), opacity 0.38s var(--ease-out);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
}
.toast--visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ===================================================================
   BADGE MENSAJES NO LEÍDOS
================================================================= */
.badge-mensajes {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  border-radius: 50px;
  background: var(--admin-coral);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0 0.4rem;
  margin-left: 0.5rem;
  vertical-align: middle;
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.45);
  animation: badgePulse 2.2s ease-in-out infinite;
}

/* ===================================================================
   SECCIÓN GOOGLE ANALYTICS
================================================================= */
.admin-seccion--ga {
  border-top: 2px solid rgba(0, 188, 212, 0.38);
}

.ga-estado {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--admin-medio);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--admin-borde);
  padding: 0.32rem 0.9rem;
  border-radius: 50px;
}

.ga-intro {
  color: var(--admin-medio);
  font-size: 0.94rem;
  margin-bottom: 0.5rem;
  line-height: 1.65;
}

.ga-pasos {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 2rem;
}

.ga-paso {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--admin-surface-2);
  border: 1px solid var(--admin-borde-2);
  border-radius: var(--admin-radio-sm);
  padding: 1.1rem 1.3rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.ga-paso:hover {
  border-color: rgba(0, 188, 212, 0.28);
  box-shadow: 0 4px 20px rgba(0, 188, 212, 0.08);
}

.ga-paso__num {
  min-width: 2rem; height: 2rem;
  background: linear-gradient(135deg, rgba(0,188,212,0.80) 0%, rgba(0,140,170,0.72) 100%);
  border: 1px solid rgba(0, 188, 212, 0.35);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
  box-shadow: 0 3px 12px rgba(0, 188, 212, 0.28);
  backdrop-filter: blur(6px);
}

.ga-paso__cuerpo strong {
  display: block;
  font-size: 0.94rem;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 0.35rem;
  font-weight: 700;
}
.ga-paso__cuerpo p {
  font-size: 0.87rem;
  color: var(--admin-medio);
  line-height: 1.58;
  margin: 0;
}
.ga-paso__cuerpo code {
  font-family: 'Courier New', 'Consolas', monospace;
  font-size: 0.82rem;
  background: rgba(0, 188, 212, 0.12);
  padding: 0.12rem 0.45rem;
  border-radius: 5px;
  border: 1px solid rgba(0, 188, 212, 0.22);
  color: var(--admin-turquesa);
  font-weight: 600;
}

.ga-code-box {
  margin-top: 0.65rem;
  background: rgba(0, 10, 20, 0.60);
  border: 1px solid rgba(0, 188, 212, 0.18);
  border-radius: 10px;
  padding: 0.7rem 1.1rem;
  backdrop-filter: blur(8px);
}
.ga-code-box code {
  background: transparent;
  border: none;
  color: #4DD0E1;
  font-size: 0.85rem;
  font-weight: 600;
}

.ga-eventos { margin-top: 0.5rem; }
.ga-eventos__titulo {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.80);
  margin-bottom: 0.9rem;
}
.ga-eventos__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.ga-evento-chip {
  font-family: 'Courier New', 'Consolas', monospace;
  font-size: 0.76rem;
  background: rgba(0, 188, 212, 0.10);
  border: 1px solid rgba(0, 188, 212, 0.24);
  color: var(--admin-turquesa);
  padding: 0.28rem 0.8rem;
  border-radius: 50px;
  font-weight: 600;
  transition: background 0.18s, border-color 0.18s;
}
.ga-evento-chip:hover {
  background: rgba(0, 188, 212, 0.18);
  border-color: rgba(0, 188, 212, 0.40);
}

/* ===================================================================
   PREFERS-REDUCED-MOTION — desactiva animaciones de entrada
================================================================= */
@media (prefers-reduced-motion: reduce) {
  .login-overlay::before { animation: none; }
  .admin-seccion,
  .admin-header,
  .login-card,
  .form-destino-card,
  .metrica-card { animation: none; opacity: 1; transform: none; }
  .badge-mensajes { animation: none; }
  .barra-fill { transition: none; }
}

/* ===================================================================
   RESPONSIVE — ajustes móvil (v1 legacy)
================================================================= */
@media (max-width: 640px) {
  .admin-main { padding: 1.5rem 1rem 4rem; }
  .admin-seccion { padding: 1.5rem 1.25rem; }
  .login-card { padding: 2.5rem 1.75rem; }
  .metricas-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .metrica-card__num { font-size: 1.9rem; }
  .clic-fila { grid-template-columns: 1fr auto; }
  .clic-barra-cont { display: none; }
  .mensaje-card { flex-direction: column; gap: 0.75rem; }
  .mensaje-fecha { margin-left: 0; }
}


/* ===================================================================
   ADMIN v2.0 — SIDEBAR LAYOUT
   Centro de Comando: sidebar 260px + main content
================================================================= */

/* Keyframe para slide-in del panel lateral */
@keyframes slide-in-right {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
@keyframes slide-out-right {
  from { transform: translateX(0);    opacity: 1; }
  to   { transform: translateX(100%); opacity: 0; }
}
@keyframes fade-overlay {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ===== DASHBOARD LAYOUT ===== */
.dashboard {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: 260px;
  flex-shrink: 0;
  background: rgba(5, 20, 30, 0.82);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-right: 1px solid var(--admin-borde);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 40;
  transition: transform 0.35s var(--ease-out);
  box-shadow: 2px 0 30px rgba(0, 0, 0, 0.28);
}

/* Logo del sidebar */
.sidebar__logo {
  padding: 1.6rem 1.5rem 1.25rem;
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.5rem;
  display: flex;
  align-items: baseline;
  gap: 0.06em;
  border-bottom: 1px solid var(--admin-borde-2);
  flex-shrink: 0;
}
.sidebar__logo-e { color: var(--admin-turquesa); }
.sidebar__logo-m { color: var(--admin-coral); }
.sidebar__version {
  font-family: 'Inter', sans-serif;
  font-style: normal;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--admin-suave);
  margin-left: auto;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--admin-borde-2);
  padding: 0.12rem 0.55rem;
  border-radius: 50px;
  align-self: center;
}

/* Navegación del sidebar */
.sidebar__nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 0.75rem;
}

.sidebar__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--admin-medio);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.20s, color 0.20s, transform 0.18s var(--ease-out);
  position: relative;
}
.sidebar__item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.88);
  transform: translateX(2px);
}
.sidebar__item--activo {
  background: rgba(0, 188, 212, 0.14);
  border: 1px solid rgba(0, 188, 212, 0.28);
  color: var(--admin-turquesa);
  font-weight: 700;
}
.sidebar__item--activo:hover {
  transform: none;
  background: rgba(0, 188, 212, 0.18);
}

.sidebar__icon { font-size: 1.05rem; line-height: 1; flex-shrink: 0; }
.sidebar__label { flex: 1; }

.sidebar__badge {
  min-width: 1.35rem;
  height: 1.35rem;
  border-radius: 50px;
  background: var(--admin-turquesa);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.35rem;
  box-shadow: 0 2px 8px rgba(0, 188, 212, 0.40);
}
.sidebar__badge--coral {
  background: var(--admin-coral);
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.40);
  animation: badgePulse 2.2s ease-in-out infinite;
}

/* Footer del sidebar */
.sidebar__footer {
  padding: 1rem 1.25rem 1.5rem;
  border-top: 1px solid var(--admin-borde-2);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex-shrink: 0;
}

.sidebar__link-sitio {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.84rem;
  color: var(--admin-medio);
  font-weight: 500;
  transition: color 0.2s;
  padding: 0.42rem 0.75rem;
  border-radius: 8px;
  border: 1px solid transparent;
}
.sidebar__link-sitio:hover {
  color: var(--admin-turquesa);
  border-color: rgba(0, 188, 212, 0.22);
  background: rgba(0, 188, 212, 0.06);
}

.sidebar__logout {
  padding: 0.5rem 1rem;
  border: 1.5px solid rgba(255, 107, 107, 0.32);
  border-radius: 50px;
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  font-family: 'Inter', sans-serif;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  text-align: center;
}
.sidebar__logout:hover {
  background: rgba(255, 107, 107, 0.16);
  border-color: var(--admin-coral);
  color: #fff;
}

/* Overlay móvil detrás del sidebar */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 39;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  animation: fade-overlay 0.25s ease both;
}
.sidebar-overlay--visible { display: block; }

/* ===== ADMIN WRAP (columna principal) ===== */
.admin-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ===== HEADER MÓVIL ===== */
.admin-header {
  background: rgba(7, 30, 43, 0.82);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--admin-borde);
  padding: 0.8rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 30;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.25);
  animation: slide-down 0.5s var(--ease-out) both;
}

/* Botón hamburguesa */
.header-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3rem;
  flex-shrink: 0;
}
.header-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255, 255, 255, 0.75);
  border-radius: 2px;
  transition: background 0.2s;
}
.header-menu-btn:hover span { background: #fff; }

.header-titulo {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.90);
  font-weight: 400;
  flex: 1;
}

.header-fecha {
  font-size: 0.8rem;
  color: var(--admin-medio);
  font-weight: 500;
  text-transform: capitalize;
  white-space: nowrap;
}

/* ===== TAB PANELS ===== */
.tab-panel {
  flex: 1;
  padding: 1.75rem 1.75rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  animation: tile-enter 0.55s var(--ease-out) both;
  overflow-y: auto;
}

/* ===== PANEL CARD (contenedor glass unificado) ===== */
.panel-card {
  background: var(--admin-surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--admin-borde);
  border-radius: var(--admin-radio);
  padding: 1.65rem;
  box-shadow: var(--glass-shadow);
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  position: relative;
  overflow: hidden;
}
.panel-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.10), transparent);
  pointer-events: none;
}

.panel-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--admin-borde-2);
}

.panel-card__titulo {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Botón guardar */
.admin-btn--guardar {
  background: linear-gradient(135deg, rgba(124,179,66,0.85) 0%, rgba(85,139,47,0.78) 100%);
  border-color: rgba(124, 179, 66, 0.40);
  color: #fff;
  border-radius: 50px;
  padding: 0.48rem 1.25rem;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(124, 179, 66, 0.24);
}
.admin-btn--guardar:hover {
  background: linear-gradient(135deg, rgba(124,179,66,0.98) 0%, rgba(85,139,47,0.92) 100%);
  box-shadow: 0 6px 22px rgba(124, 179, 66, 0.38);
  opacity: 1;
}

/* Botón cancelar (texto) */
.admin-btn--cancelar {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.14);
  color: var(--admin-medio);
  border-radius: 50px;
  padding: 0.48rem 1.1rem;
}
.admin-btn--cancelar:hover {
  border-color: rgba(255,107,107,0.40);
  color: var(--admin-coral);
  transform: none;
}

/* ===================================================================
   CHARTS ROW — Gráfico líneas + Donut
================================================================= */
.charts-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 900px) { .charts-row { grid-template-columns: 1fr; } }

.chart-card {
  background: var(--admin-surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--admin-borde);
  border-radius: var(--admin-radio);
  padding: 1.5rem;
  box-shadow: var(--glass-shadow);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}
.chart-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.10), transparent);
  pointer-events: none;
}

.chart-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chart-card__titulo {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.02rem;
  color: rgba(255, 255, 255, 0.85);
}

.chart-fuente {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.2rem 0.7rem;
  border-radius: 50px;
  background: rgba(0, 188, 212, 0.14);
  border: 1px solid rgba(0, 188, 212, 0.28);
  color: var(--admin-turquesa);
}
.chart-fuente--real {
  background: rgba(124, 179, 66, 0.14);
  border-color: rgba(124, 179, 66, 0.28);
  color: var(--admin-verde);
}

/* SVG Line chart */
.chart-svg-wrap {
  width: 100%;
  overflow: hidden;
}
.chart-svg-wrap svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Donut chart */
.donut-wrap {
  display: flex;
  justify-content: center;
}
.donut-wrap svg {
  width: 140px;
  height: 140px;
}

.donut-leyenda {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.donut-leyenda-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.84rem;
  color: var(--admin-medio);
}

.donut-leyenda-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.donut-leyenda-label { flex: 1; }
.donut-leyenda-pct   { font-weight: 700; color: rgba(255,255,255,0.80); }

/* ===================================================================
   SLIDE PANEL — CRUD de destinos
================================================================= */
.slide-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 420px;
  max-width: 96vw;
  background: rgba(7, 22, 35, 0.96);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border-left: 1px solid var(--admin-borde);
  z-index: 200;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 50px rgba(0, 0, 0, 0.50);
  transform: translateX(100%);
  transition: transform 0.38s var(--ease-out);
}
.slide-panel--abierto {
  transform: translateX(0);
}

.slide-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.35rem 1.5rem;
  border-bottom: 1px solid var(--admin-borde-2);
  flex-shrink: 0;
}

.slide-panel__titulo {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.92);
}

.slide-panel__cerrar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--admin-medio);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.slide-panel__cerrar:hover {
  background: rgba(255, 107, 107, 0.18);
  border-color: rgba(255, 107, 107, 0.38);
  color: var(--admin-coral);
}

.slide-panel__body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.slide-panel__body .admin-form__grupo {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
}
.admin-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.slide-panel__acciones {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--admin-borde-2);
}

/* Overlay oscuro detrás del slide panel */
.slide-panel-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 199;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  animation: fade-overlay 0.25s ease both;
}
.slide-panel-overlay--visible { display: block; }

/* ===================================================================
   EDITOR SITIO
================================================================= */
.editor-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 1100px) { .editor-layout { grid-template-columns: 1fr; } }

.editor-form-col,
.editor-preview-col { display: flex; flex-direction: column; gap: 1rem; }

.editor-grupo {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--admin-borde-2);
}
.editor-grupo:last-of-type { border-bottom: none; }

.editor-seccion-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--admin-turquesa);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  margin-bottom: 0.2rem;
}

.color-picker-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.color-picker {
  width: 48px;
  height: 36px;
  border: 1.5px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  background: none;
  cursor: pointer;
  padding: 2px;
}

.color-picker-label {
  font-size: 0.86rem;
  color: var(--admin-medio);
}

.editor-acciones {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 0.5rem;
}

/* Preview iframe */
.editor-preview-card { padding: 1.35rem; }

.preview-frame-wrap {
  border: 1px solid var(--admin-borde);
  border-radius: 10px;
  overflow: hidden;
  background: #071e2b;
  height: 580px;
  position: relative;
}

.preview-frame {
  width: 100%;
  height: 100%;
  border: none;
  /* Scale down para mostrar el sitio completo en el panel */
  transform-origin: top left;
}

/* ===================================================================
   CONFIG TAB
================================================================= */
.config-seccion {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.config-info {
  font-size: 0.9rem;
  color: var(--admin-medio);
  line-height: 1.65;
}
.config-info code {
  font-size: 0.82rem;
  background: rgba(0, 188, 212, 0.12);
  padding: 0.12rem 0.45rem;
  border-radius: 5px;
  border: 1px solid rgba(0, 188, 212, 0.22);
  color: var(--admin-turquesa);
  font-weight: 600;
}

.config-info-box {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--admin-surface-2);
  border: 1px solid var(--admin-borde-2);
  border-radius: var(--admin-radio-sm);
  padding: 0.9rem 1.2rem;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.82);
}
.config-info-box__icon { font-size: 1.3rem; }

.config-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 600px) { .config-info-grid { grid-template-columns: 1fr; } }

.config-info-item {
  background: var(--admin-surface-2);
  border: 1px solid var(--admin-borde-2);
  border-radius: var(--admin-radio-sm);
  padding: 0.85rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.config-info-item__label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--admin-suave);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.config-info-item__val {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.85);
  font-weight: 600;
  font-family: 'Courier New', monospace;
}

.config-acciones {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 0.5rem;
}

/* ===================================================================
   RESPONSIVE v2.0 — SIDEBAR COLAPSABLE EN MÓVIL
================================================================= */
@media (max-width: 860px) {
  /* Sidebar flota como drawer en móvil */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transform: translateX(-100%);
  }
  .sidebar--abierto {
    transform: translateX(0);
  }

  /* Header móvil con hamburger */
  .admin-header { display: flex; }
  .header-menu-btn { display: flex; }

  /* Wrap ocupa todo */
  .admin-wrap { width: 100%; }

  /* Tab panels con menos padding */
  .tab-panel { padding: 1.25rem 1rem 4rem; }

  /* Charts en columna */
  .charts-row { grid-template-columns: 1fr; }

  /* Editor en columna */
  .editor-layout { grid-template-columns: 1fr; }
  .preview-frame-wrap { height: 320px; }

  /* Form row en columna */
  .admin-form__row { grid-template-columns: 1fr; }
}

@media (min-width: 861px) {
  /* En desktop, header solo muestra fecha */
  .admin-header {
    background: transparent;
    border-bottom: none;
    box-shadow: none;
    padding: 1.25rem 1.75rem 0;
    animation: none;
    position: static;
    backdrop-filter: none;
  }
  .header-menu-btn { display: none; }
  .header-titulo    { display: none; }
}

@media (max-width: 480px) {
  .metricas-grid { grid-template-columns: 1fr 1fr; gap: 0.65rem; }
  .metrica-card__num { font-size: 1.85rem; }
  .login-card { padding: 2.25rem 1.5rem; }
  .slide-panel { width: 100vw; max-width: 100vw; }
  .config-info-grid { grid-template-columns: 1fr; }
}

/* ===================================================================
   LIQUID GRADIENT ANIMATION — Botones del panel de administración
   Mismo efecto que MetalButton en index/anunciantes.
   Técnica: background-size 300% + background-position sweep.
   Colores: naranja, azul marino, mostaza según área funcional.
   Override completo (hover incluido) → las reglas anteriores quedan
   sin efecto para `background` gracias a la cascada (este bloque
   aparece al final del archivo).
================================================================= */

@keyframes liq-sweep-admin {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── Login — azul marino + turquesa + mostaza (impactante) ── */
.login-btn,
.login-btn:hover {
  background: linear-gradient(
    -45deg,
    rgba(0,  188, 212, 0.92),
    rgba(7,   30,  43, 0.88),
    rgba(0,  140, 180, 0.90),
    rgba(255, 179,  0,  0.52),
    rgba(0,   67,  79, 0.82),
    rgba(0,  220, 240, 0.90),
    rgba(7,   46,  63, 0.85)
  );
  background-size: 300% 300%;
}
.login-btn {
  animation: liq-sweep-admin 5s ease infinite;
}
.login-btn:hover {
  animation-duration: 2s;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 188, 212, 0.50),
              inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* ── Nuevo — turquesa + azul profundo (acción principal) ── */
.admin-btn--nuevo,
.admin-btn--nuevo:hover {
  background: linear-gradient(
    -45deg,
    rgba(0,  188, 212, 0.92),
    rgba(7,   30,  43, 0.78),
    rgba(0,  210, 240, 0.88),
    rgba(0,   67,  79, 0.82),
    rgba(255, 179,  0,  0.38),
    rgba(0,  140, 180, 0.90)
  );
  background-size: 300% 300%;
}
.admin-btn--nuevo {
  animation: liq-sweep-admin 7s ease infinite;
}
.admin-btn--nuevo:hover {
  animation-duration: 2.2s;
  opacity: 1;
  box-shadow: 0 6px 24px rgba(0, 188, 212, 0.42);
}

/* ── Guardar (panel cards) — verde + mostaza + azul marino ── */
.admin-btn--guardar,
.admin-btn--guardar:hover {
  background: linear-gradient(
    -45deg,
    rgba(124, 179, 66,  0.90),
    rgba(7,   30,  43,  0.72),
    rgba(85,  139, 47,  0.88),
    rgba(255, 179,  0,  0.62),
    rgba(100, 160, 50,  0.90),
    rgba(7,   30,  43,  0.62),
    rgba(124, 179, 66,  0.85)
  );
  background-size: 300% 300%;
}
.admin-btn--guardar {
  animation: liq-sweep-admin 7s ease infinite;
}
.admin-btn--guardar:hover {
  animation-duration: 2.2s;
  opacity: 1;
  box-shadow: 0 6px 22px rgba(124, 179, 66, 0.38);
}

/* ── Guardar (formulario destino) — turquesa + azul marino ── */
.admin-form__btn-guardar,
.admin-form__btn-guardar:hover {
  background: linear-gradient(
    -45deg,
    rgba(0,  188, 212, 0.90),
    rgba(7,   30,  43, 0.75),
    rgba(0,  140, 170, 0.88),
    rgba(255, 179,  0,  0.45),
    rgba(0,   67,  79, 0.80),
    rgba(0,  200, 230, 0.88)
  );
  background-size: 300% 300%;
}
.admin-form__btn-guardar {
  animation: liq-sweep-admin 7s ease infinite;
}
.admin-form__btn-guardar:hover {
  animation-duration: 2.2s;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 188, 212, 0.44),
              inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

/* ── Exportar — verde + mostaza (éxito secundario) ── */
.admin-btn--exportar,
.admin-btn--exportar:hover {
  background: linear-gradient(
    -45deg,
    rgba(124, 179, 66,  0.88),
    rgba(255, 179,  0,  0.65),
    rgba(85,  139, 47,  0.82),
    rgba(255, 140,  0,  0.52),
    rgba(100, 160, 50,  0.88),
    rgba(255, 179,  0,  0.60)
  );
  background-size: 300% 300%;
}
.admin-btn--exportar {
  animation: liq-sweep-admin 7s ease infinite;
}
.admin-btn--exportar:hover {
  animation-duration: 2.2s;
  opacity: 1;
  box-shadow: 0 6px 24px rgba(124, 179, 66, 0.38);
}

/* ── Cancelar (panel) — coral sutil + oscuro ── */
.admin-btn--cancelar,
.admin-btn--cancelar:hover {
  background: linear-gradient(
    -45deg,
    rgba(255, 107, 107, 0.28),
    rgba(7,   30,  43,  0.42),
    rgba(184,  62,  62,  0.22),
    rgba(255, 140,  0,   0.18),
    rgba(7,   30,  43,  0.38),
    rgba(255,  80,  80,  0.26)
  );
  background-size: 300% 300%;
  border: 1.5px solid rgba(255, 107, 107, 0.28);
}
.admin-btn--cancelar {
  animation: liq-sweep-admin 10s ease infinite;
}
.admin-btn--cancelar:hover {
  animation-duration: 3.5s;
  border-color: rgba(255, 107, 107, 0.45);
  color: var(--admin-coral);
}

/* ── Cancelar (formulario) — transparente con coral ── */
.admin-form__btn-cancelar,
.admin-form__btn-cancelar:hover {
  background: linear-gradient(
    -45deg,
    rgba(255, 107, 107, 0.22),
    rgba(7,   30,  43,  0.35),
    rgba(184,  62,  62,  0.18),
    rgba(7,   30,  43,  0.30),
    rgba(255,  80,  80,  0.20)
  );
  background-size: 300% 300%;
}
.admin-form__btn-cancelar {
  animation: liq-sweep-admin 10s ease infinite;
}
.admin-form__btn-cancelar:hover {
  animation-duration: 3.5s;
  border-color: rgba(255, 107, 107, 0.45);
  color: var(--admin-coral);
}

/* ── Eliminar — coral vivo (peligro) ── */
.admin-btn--del,
.admin-btn--del:hover {
  background: linear-gradient(
    -45deg,
    rgba(255, 107, 107, 0.48),
    rgba(184,  62,  62,  0.38),
    rgba(220,  50,   0,  0.42),
    rgba(255,  80,  80,  0.50),
    rgba(184,  62,  62,  0.40),
    rgba(255, 107, 107, 0.48)
  );
  background-size: 300% 300%;
  border-color: rgba(255, 107, 107, 0.35);
}
.admin-btn--del {
  animation: liq-sweep-admin 9s ease infinite;
}
.admin-btn--del:hover {
  animation-duration: 2.5s;
  opacity: 1;
  background-size: 300% 300%;
}

/* ── Accesibilidad ── */
@media (prefers-reduced-motion: reduce) {
  .login-btn,
  .admin-btn--nuevo,
  .admin-btn--guardar,
  .admin-form__btn-guardar,
  .admin-btn--exportar,
  .admin-btn--cancelar,
  .admin-form__btn-cancelar,
  .admin-btn--del {
    animation: none;
  }
}
