/* MinisterioApp - Sistema de Diseño Único */

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&family=Plus+Jakarta+Sans:wght@600;700;800&family=JetBrains+Mono:wght@600;700;800&display=swap');

:root {
  /* Paleta primaria - Basada en referencias visuales */
  /* El "azul" legacy ahora SIGUE el branding de cada iglesia (regla 3 baldes:
     marca = var(--brand-*)). Fallback al morado por defecto de la plataforma.
     Así Reportes, tablas, KPIs y demás componentes viejos se tiñen con el color
     que elija cada iglesia, en vez de un azul fijo. */
  --primary-blue: var(--brand-primary, #6D5BE5);
  --primary-blue-dark: var(--brand-primary-dark, #4B3FB0);
  --secondary-teal: var(--brand-accent, #FF8A5B);
  --bright-yellow: #FFD470;
  --warm-orange: #FF8A5B;
  --vibrant-green: #64C07F;
  --soft-green: #4EC087;
  --soft-red: #FF7474;
  --coral-red: #FF6B6B;
  
  /* Neutros */
  --bg-white: #FFFFFF;
  --bg-light: #F7F9FA;
  --bg-gray: #E8ECF0;
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-light: #6B7280; /* subido de #999 para pasar contraste AA (legible al sol) */
  --border-color: #E0E0E0;
  
  /* Estados de niño */
  --badge-nuevo-bg: #FFE4B5;
  --badge-nuevo-fg: #D97706;
  --badge-activo-bg: #D1FAE5;
  --badge-activo-fg: #065F46;
  --badge-seguimiento-bg: #FEF3C7;
  --badge-seguimiento-fg: #92400E;
  --badge-inactivo-bg: #E5E7EB;
  --badge-inactivo-fg: #4B5563;
  
  /* Espaciado */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  
  /* Bordes */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  /* Sombras */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.12);
}

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

body {
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--app-bg-base, #F3F4FB);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   FONDO AMBIENTE GLOBAL (2026-09) — base clarita + dos "manchas"
   de color difuminadas (una del branding, otra acento) fijas
   detrás de TODO. Las tarjetas opacas flotan encima; el vidrio
   (glass) deja pasar el color. Aplica a ambos portales.
   ============================================================ */
body::before{
  content:''; position:fixed; inset:0; z-index:0; pointer-events:none;
  background:
    radial-gradient(620px 520px at 100% -6%, rgba(var(--brand-purple-rgb, 123,107,245), .16), transparent 62%),
    radial-gradient(560px 520px at -8% 108%, rgba(77, 221, 202, .13), transparent 60%);
}
/* El contenido va por encima del ambiente (pero es transparente, así el
   ambiente se ve en los espacios; las tarjetas opacas lo tapan localmente). */
.app-container, .fam-shell{ position:relative; z-index:1; }
@media print{ body::before{ display:none; } }

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
}

h1 { font-size: 28px; margin-bottom: var(--spacing-md); }
h2 { font-size: 24px; margin-bottom: var(--spacing-md); }
h3 { font-size: 20px; margin-bottom: var(--spacing-sm); }
h4 { font-size: 18px; margin-bottom: var(--spacing-sm); }

a {
  color: var(--primary-blue);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* Layout */
.app-container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 250px;
  background: linear-gradient(180deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
  color: white;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: var(--spacing-lg) var(--spacing-md);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: 18px;
  font-weight: 700;
}

.sidebar-nav {
  flex: 1;
  padding: var(--spacing-md) 0;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: 12px var(--spacing-md);
  color: rgba(255,255,255,0.85);
  transition: all 0.2s;
  cursor: pointer;
  font-size: 14px;
}

.sidebar-nav-item:hover {
  background: rgba(255,255,255,0.1);
  color: white;
}

.sidebar-nav-item.active {
  background: rgba(255,255,255,0.15);
  color: white;
  font-weight: 600;
  border-left: 3px solid white;
}

.sidebar-footer {
  padding: var(--spacing-lg);
  background: linear-gradient(180deg, rgba(255,180,50,0.3) 0%, rgba(255,100,90,0.3) 100%);
  border-top: 1px solid rgba(255,255,255,0.1);
}

.main-content {
  margin-left: var(--sidebar-pro-width, 240px);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
@media (max-width: 768px) {
  .main-content { margin-left: 0; }
}

.topbar {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
  padding: var(--spacing-md) var(--spacing-xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
/* La PORTADA del usuario como relleno del header (difuminada) */
.topbar.has-banner::before {
  content: "";
  position: absolute; inset: 0;
  background-image: var(--tb-banner);
  background-size: cover; background-position: center;
  filter: blur(15px) saturate(1.3);
  transform: scale(1.15);            /* tapa los bordes que deja el blur */
  opacity: .30;
  z-index: 0;
  pointer-events: none;
}
/* Un velo blanco encima de la portada para que el texto siempre se lea */
.topbar.has-banner::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,.72), rgba(255,255,255,.45));
  z-index: 0;
  pointer-events: none;
}
.topbar-left, .topbar-actions { position: relative; z-index: 1; }

.topbar-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  flex-shrink: 0;
}

/* Chip de usuario en el header: foto de perfil + portada difuminada de fondo */
.topbar-user {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 4px 14px 4px 4px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--text-primary, #2D2D5E);
  overflow: hidden;
  max-width: 230px;
  border: 1px solid rgba(255,255,255,.65);
  background: rgba(255,255,255,.55);
  -webkit-backdrop-filter: blur(8px) saturate(1.1);
  backdrop-filter: blur(8px) saturate(1.1);
  box-shadow: 0 2px 8px rgba(45,45,94,.08);
  transition: box-shadow .15s, transform .12s;
}
.topbar-user:hover { box-shadow: 0 6px 18px rgba(45,45,94,.16); transform: translateY(-1px); }
.topbar-user > * { position: relative; z-index: 1; }
.topbar-user-av {
  width: 34px; height: 34px; flex: none;
  border-radius: 50%; overflow: hidden;
  background: linear-gradient(135deg, #9B8DFB, var(--brand-primary, #6D5BE5));
  color: #fff; font-weight: 800; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.18);
}
.topbar-user-av img { width: 100%; height: 100%; object-fit: cover; }
.topbar-user-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.topbar-user-name {
  font-size: 13.5px; font-weight: 700; line-height: 1.1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.topbar-user-role {
  font-size: 10.5px; font-weight: 700; line-height: 1; text-transform: capitalize;
  color: var(--text-light, #9CA3B5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (max-width: 640px) {
  .topbar-user-meta { display: none; }
  .topbar-user { padding: 4px; }
}

.content-wrapper {
  padding: var(--spacing-xl);
  flex: 1;
}

/* Cards */
.card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--spacing-lg);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--bg-gray);
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.card-body {
  color: var(--text-primary);
}

/* KPI Cards */
.kpi-card {
  background: var(--primary-blue);
  color: white;
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.kpi-card.orange {
  background: linear-gradient(135deg, var(--warm-orange) 0%, var(--bright-yellow) 100%);
}

.kpi-card.green {
  background: linear-gradient(135deg, var(--vibrant-green) 0%, var(--soft-green) 100%);
}

.kpi-card.red {
  background: linear-gradient(135deg, var(--soft-red) 0%, var(--coral-red) 100%);
}

.kpi-card.blue {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-teal) 100%);
}

.kpi-label {
  font-size: 14px;
  opacity: 0.95;
  margin-bottom: var(--spacing-sm);
  font-weight: 600;
}

.kpi-value {
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: var(--spacing-xs);
}

.kpi-subtitle {
  font-size: 12px;
  opacity: 0.85;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary-blue);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-blue-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-success {
  background: var(--vibrant-green);
  color: white;
}

.btn-success:hover {
  background: var(--soft-green);
}

.btn-warning {
  background: var(--warm-orange);
  color: white;
}

.btn-danger {
  background: var(--soft-red);
  color: white;
}

.btn-danger:hover {
  background: var(--coral-red);
}

.btn-secondary {
  background: var(--bg-gray);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--border-color);
}

.btn-ghost {
  background: transparent;
  color: var(--primary-blue);
  border: 1px solid var(--border-color);
}

.btn-ghost:hover {
  background: var(--bg-light);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
}

/* Forms */
.form-group {
  margin-bottom: var(--spacing-md);
}

.label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
}

.input, .select, .textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--text-primary);
  transition: all 0.2s;
  background: var(--bg-white);
}

.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(78, 137, 216, 0.1);
}

.textarea {
  min-height: 100px;
  resize: vertical;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}

.badge-nuevo {
  background: var(--badge-nuevo-bg);
  color: var(--badge-nuevo-fg);
}

.badge-activo {
  background: var(--badge-activo-bg);
  color: var(--badge-activo-fg);
}

.badge-seguimiento {
  background: var(--badge-seguimiento-bg);
  color: var(--badge-seguimiento-fg);
}

.badge-inactivo {
  background: var(--badge-inactivo-bg);
  color: var(--badge-inactivo-fg);
}

/* Table */
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-white);
}

.table thead {
  background: var(--bg-light);
  border-bottom: 2px solid var(--border-color);
}

.table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--bg-gray);
}

.table tbody tr:hover {
  background: var(--bg-light);
}

/* Alerts */
.alert {
  padding: var(--spacing-md);
  border-radius: var(--radius-sm);
  margin-bottom: var(--spacing-md);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.alert-success {
  background: #D1FAE5;
  color: #065F46;
  border-left: 4px solid var(--vibrant-green);
}

.alert-error {
  background: #FEE2E2;
  color: #991B1B;
  border-left: 4px solid var(--soft-red);
}

.alert-warning {
  background: #FEF3C7;
  color: #92400E;
  border-left: 4px solid var(--warm-orange);
}

.alert-info {
  background: var(--brand-primary-soft, #EDEBFC);
  color: var(--brand-primary-dark, #4B3FB0);
  border-left: 4px solid var(--brand-primary, #6D5BE5);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: var(--spacing-xl) var(--spacing-lg);
}

.empty-state-icon {
  font-size: 64px;
  opacity: 0.3;
  margin-bottom: var(--spacing-md);
}

.empty-state-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-sm);
}

.empty-state-subtitle {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: var(--spacing-lg);
}

/* Grid System */
.grid {
  display: grid;
  gap: var(--spacing-lg);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Avatar */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--bg-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-lg {
  width: 60px;
  height: 60px;
}

.avatar-sm {
  width: 32px;
  height: 32px;
  font-size: 12px;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-0 { margin-bottom: 0 !important; }
.mt-lg { margin-top: var(--spacing-lg); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }

/* Responsive */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s;
  }
  
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .topbar {
    padding: var(--spacing-md);
  }
  
  .content-wrapper {
    padding: var(--spacing-md);
  }
}
/* =================================================================
   MINISTERIO V2 — Sistema "Claymorphism" 3D
   Inspirado en estética habit tracker mint + violeta
   ================================================================= */

:root {
  /* Marca principal */
  --brand-purple:        #7B6BF5;
  --brand-purple-dark:   #5D4FE5;
  --brand-purple-shadow: #4838C9;
  --brand-purple-soft:   #E6E2FB;

  /* Acentos vibrantes */
  --brand-mint:          #3DD5C0;
  --brand-mint-dark:     #2BB5A1;
  --brand-mint-shadow:   #1F9586;
  --brand-mint-soft:     #DBF7F1;

  --brand-pink:          #EE5E99;
  --brand-pink-dark:     #D63E80;
  --brand-pink-shadow:   #B92B6A;
  --brand-pink-soft:     #FCE0EC;

  --brand-yellow:        #FFC93C;
  --brand-yellow-dark:   #E5AE1F;
  --brand-yellow-shadow: #C89610;
  --brand-yellow-soft:   #FFF4D1;

  --brand-blue:          #5AB9E0;
  --brand-blue-dark:     #3C9BC3;
  --brand-blue-shadow:   #267FAA;
  --brand-blue-soft:     #DDF0F9;

  --brand-coral:         #FF7A66;
  --brand-coral-dark:    #E55A48;
  --brand-coral-shadow:  #C9402F;
  --brand-coral-soft:    #FFE3DD;

  /* Fondos */
  --bg-page:             #FFFFFF;
  --bg-mint-page:        #E8F9F4;
  --bg-soft:             #F7F9FA;
  --bg-card:             #FFFFFF;

  /* Texto */
  --text-ink:            #2D2D5E;
  --text-soft:           #6B6B8E;
  --text-mute:           #78788F; /* subido de #A0A0B8 para contraste AA */

  /* Sombras 3D */
  --shadow-card:         0 8px 24px rgba(45, 45, 94, 0.08);
  --shadow-card-hover:   0 14px 32px rgba(45, 45, 94, 0.12);
  --shadow-float:        0 20px 50px rgba(45, 45, 94, 0.15);
}

/* =================================================================
   BOTONES 3D — efecto "se hunde al presionar"
   ================================================================= */
.btn3d {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  padding: 14px 26px;
  border-radius: 10px;
  color: white;
  text-decoration: none;
  position: relative;
  transition: transform 0.16s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.16s cubic-bezier(0.4, 0, 0.2, 1),
              filter 0.16s ease;
  user-select: none;
  letter-spacing: 0.01em;
  line-height: 1;
}
.btn3d:focus-visible { outline: 3px solid var(--brand-purple); outline-offset: 3px; }
/* Foco de teclado visible en TODOS los controles interactivos (accesibilidad).
   Los botones custom (reacciones, thumbs de video, tabs, items de sidebar…) son
   <button>/<a>, así que quedan cubiertos. .btn3d gana por especificidad. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
[role="button"]:focus-visible {
  outline: 3px solid var(--brand-primary, #6D5BE5);
  outline-offset: 2px;
  border-radius: 8px;
}

/* Variante grande (CTA principal) */
.btn3d-lg {
  font-size: 16px;
  padding: 18px 32px;
  border-radius: 10px;
}

/* Variante pequeña */
.btn3d-sm {
  font-size: 12px;
  padding: 10px 18px;
  border-radius: 10px;
}

/* Variante solo ícono (cuadrado pequeño, sin texto) */
.btn3d.btn-icon-only {
  padding: 9px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}
.btn3d-sm.btn-icon-only {
  padding: 8px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

/* Variante full width */
.btn3d-full { width: 100%; }

/* COLORES — cada color tiene 3 capas: top (gradient), base (border-bottom), ambient (sombra) */

.btn3d-purple {
  background: linear-gradient(180deg, var(--brand-purple) 0%, var(--brand-purple-dark) 100%);
  box-shadow:
    0 6px 0 var(--brand-purple-shadow),
    0 8px 18px rgba(var(--brand-purple-rgb, 123, 107, 245), 0.32);
}
.btn3d-purple:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 0 var(--brand-purple-shadow),
    0 12px 22px rgba(var(--brand-purple-rgb, 123, 107, 245), 0.4);
}
.btn3d-purple:active {
  transform: translateY(4px);
  box-shadow:
    0 2px 0 var(--brand-purple-shadow),
    0 3px 8px rgba(var(--brand-purple-rgb, 123, 107, 245), 0.25);
}

.btn3d-mint {
  background: linear-gradient(180deg, var(--brand-mint) 0%, var(--brand-mint-dark) 100%);
  box-shadow:
    0 6px 0 var(--brand-mint-shadow),
    0 8px 18px rgba(61, 213, 192, 0.32);
}
.btn3d-mint:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 var(--brand-mint-shadow), 0 12px 22px rgba(61, 213, 192, 0.4);
}
.btn3d-mint:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 var(--brand-mint-shadow), 0 3px 8px rgba(61, 213, 192, 0.25);
}

.btn3d-pink {
  background: linear-gradient(180deg, var(--brand-pink) 0%, var(--brand-pink-dark) 100%);
  box-shadow: 0 6px 0 var(--brand-pink-shadow), 0 8px 18px rgba(238, 94, 153, 0.32);
}
.btn3d-pink:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 var(--brand-pink-shadow), 0 12px 22px rgba(238, 94, 153, 0.4);
}
.btn3d-pink:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 var(--brand-pink-shadow), 0 3px 8px rgba(238, 94, 153, 0.25);
}

.btn3d-yellow {
  background: linear-gradient(180deg, var(--brand-yellow) 0%, var(--brand-yellow-dark) 100%);
  color: #5C4400;
  box-shadow: 0 6px 0 var(--brand-yellow-shadow), 0 8px 18px rgba(255, 201, 60, 0.4);
}
.btn3d-yellow:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 var(--brand-yellow-shadow), 0 12px 22px rgba(255, 201, 60, 0.5);
}
.btn3d-yellow:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 var(--brand-yellow-shadow), 0 3px 8px rgba(255, 201, 60, 0.3);
}

.btn3d-blue {
  background: linear-gradient(180deg, var(--brand-blue) 0%, var(--brand-blue-dark) 100%);
  box-shadow: 0 6px 0 var(--brand-blue-shadow), 0 8px 18px rgba(90, 185, 224, 0.32);
}
.btn3d-blue:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 var(--brand-blue-shadow), 0 12px 22px rgba(90, 185, 224, 0.4);
}
.btn3d-blue:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 var(--brand-blue-shadow), 0 3px 8px rgba(90, 185, 224, 0.25);
}

.btn3d-coral {
  background: linear-gradient(180deg, var(--brand-coral) 0%, var(--brand-coral-dark) 100%);
  box-shadow: 0 6px 0 var(--brand-coral-shadow), 0 8px 18px rgba(255, 122, 102, 0.32);
}
.btn3d-coral:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 var(--brand-coral-shadow), 0 12px 22px rgba(255, 122, 102, 0.4);
}
.btn3d-coral:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 var(--brand-coral-shadow), 0 3px 8px rgba(255, 122, 102, 0.25);
}

/* WhatsApp verde específico */
.btn3d-whatsapp {
  background: linear-gradient(180deg, #25d366 0%, #1da851 100%);
  color: white;
  box-shadow: 0 6px 0 #157039, 0 8px 18px rgba(37, 211, 102, 0.32);
}
.btn3d-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 #157039, 0 12px 22px rgba(37, 211, 102, 0.4);
}
.btn3d-whatsapp:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #157039, 0 3px 8px rgba(37, 211, 102, 0.25);
}

/* Ghost / outline */
.btn3d-ghost {
  background: white;
  color: var(--text-ink);
  box-shadow: 0 4px 0 #C7CDD9, 0 6px 14px rgba(45, 45, 94, 0.1);
  border: 2px solid #EDF0F5;
}
.btn3d-ghost:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #C7CDD9, 0 10px 18px rgba(45, 45, 94, 0.15);
}
.btn3d-ghost:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #C7CDD9, 0 2px 6px rgba(45, 45, 94, 0.08);
}

/* ============================================================
   BOTONES PLANOS — reemplazan el look 3D. Se quita el "labio"
   (sombra sólida 0 6px 0) y el hundido; queda sombra suave +
   leve elevación y brillo. Aplica a TODAS las variantes y roles.
   ============================================================ */
.btn3d-purple, .btn3d-mint, .btn3d-pink, .btn3d-yellow,
.btn3d-blue, .btn3d-coral, .btn3d-whatsapp {
  box-shadow: 0 2px 6px rgba(30, 32, 60, .12);
}
.btn3d-purple:hover, .btn3d-mint:hover, .btn3d-pink:hover, .btn3d-yellow:hover,
.btn3d-blue:hover, .btn3d-coral:hover, .btn3d-whatsapp:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(30, 32, 60, .20);
  filter: brightness(1.05);
}
.btn3d-purple:active, .btn3d-mint:active, .btn3d-pink:active, .btn3d-yellow:active,
.btn3d-blue:active, .btn3d-coral:active, .btn3d-whatsapp:active {
  transform: translateY(0) scale(.98);
  box-shadow: 0 2px 5px rgba(30, 32, 60, .14);
  filter: none;
}
.btn3d-ghost {
  box-shadow: 0 1px 2px rgba(45, 45, 94, .06);
  border-color: #E9E9F1;
}
.btn3d-ghost:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(45, 45, 94, .12);
  border-color: var(--brand-purple, #6D5BE5);
}
.btn3d-ghost:active {
  transform: translateY(0) scale(.98);
  box-shadow: 0 1px 3px rgba(45, 45, 94, .08);
}

/* Disabled */
.btn3d:disabled, .btn3d.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: 0 3px 0 rgba(0,0,0,0.1) !important;
}

/* ============================================================
   BOTONES "CALM" (2026-09) — sin relleno sólido. Fondo translúcido
   tintado con el color del branding + blur + más redondeado; el
   texto toma el tono de la marca. Redondeo suave (12px), intensidad
   media (tinte .12 / hover .2). Este bloque va ÚLTIMO a propósito:
   gana por orden a las definiciones sólidas/gradiente de arriba y
   así TODOS los .btn3d* quedan con el nuevo look de una sola vez.
   ============================================================ */
.btn3d{ color: var(--brand-purple-shadow, #4A3DC2); font-weight: 650; border-radius: 12px; }
.btn3d-sm, .btn3d-lg,
.btn3d.btn-icon-only, .btn3d-sm.btn-icon-only { border-radius: 12px; }

/* Primario (púrpura = color de la iglesia) */
.btn3d-purple{
  background: rgba(var(--brand-purple-rgb, 123,107,245), .12);
  color: var(--brand-purple-shadow, #4A3DC2);
  border: 1px solid rgba(var(--brand-purple-rgb, 123,107,245), .22);
  box-shadow: none;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.btn3d-purple:hover{ background: rgba(var(--brand-purple-rgb,123,107,245), .2); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(var(--brand-purple-rgb,123,107,245), .16); filter: none; }
.btn3d-purple:active{ transform: translateY(0) scale(.985); box-shadow: none; filter: none; }

/* Secundario (ghost) */
.btn3d-ghost{
  background: rgba(var(--brand-purple-rgb,123,107,245), .05);
  color: var(--text-ink, #23233A);
  border: 1px solid #E9E9F1;
  box-shadow: none;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.btn3d-ghost:hover{ background: rgba(var(--brand-purple-rgb,123,107,245), .09); border-color: rgba(var(--brand-purple-rgb,123,107,245), .22); transform: translateY(-1px); box-shadow: none; }
.btn3d-ghost:active{ transform: translateY(0) scale(.985); box-shadow: none; }

/* WhatsApp (verde · se conserva la semántica, en tono calmado) */
.btn3d-whatsapp{ background: rgba(37,177,90,.13); color:#157A3D; border:1px solid rgba(37,177,90,.24); box-shadow:none; -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px); }
.btn3d-whatsapp:hover{ background: rgba(37,177,90,.2); transform:translateY(-1px); box-shadow:0 6px 16px rgba(37,177,90,.16); filter:none; }
.btn3d-whatsapp:active{ transform:translateY(0) scale(.985); box-shadow:none; }

/* Variantes de poco uso — mismo tratamiento translúcido */
.btn3d-coral{ background:rgba(255,122,102,.12); color:var(--brand-coral-shadow,#B23A24); border:1px solid rgba(255,122,102,.24); box-shadow:none; -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px); }
.btn3d-coral:hover{ background:rgba(255,122,102,.2); transform:translateY(-1px); box-shadow:0 6px 16px rgba(255,122,102,.16); filter:none; }
.btn3d-mint{ background:rgba(61,213,192,.14); color:var(--brand-mint-shadow,#0E7A6C); border:1px solid rgba(61,213,192,.26); box-shadow:none; -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px); }
.btn3d-mint:hover{ background:rgba(61,213,192,.22); transform:translateY(-1px); box-shadow:0 6px 16px rgba(61,213,192,.16); filter:none; }
.btn3d-pink{ background:rgba(238,94,153,.12); color:var(--brand-pink-shadow,#B23064); border:1px solid rgba(238,94,153,.24); box-shadow:none; -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px); }
.btn3d-pink:hover{ background:rgba(238,94,153,.2); transform:translateY(-1px); filter:none; }
.btn3d-blue{ background:rgba(90,185,224,.13); color:var(--brand-blue-shadow,#1E6E93); border:1px solid rgba(90,185,224,.24); box-shadow:none; -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px); }
.btn3d-blue:hover{ background:rgba(90,185,224,.2); transform:translateY(-1px); filter:none; }
.btn3d-yellow{ background:rgba(255,201,60,.18); color:#8B6500; border:1px solid rgba(214,163,0,.3); box-shadow:none; -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px); }
.btn3d-yellow:hover{ background:rgba(255,201,60,.28); transform:translateY(-1px); filter:none; }

.btn3d:disabled, .btn3d.disabled{ box-shadow:none !important; filter:none; }

/* Sistema viejo .btn-* — alineado al mismo look calm */
.btn-primary{ background:rgba(var(--brand-purple-rgb,123,107,245),.12) !important; color:var(--brand-purple-shadow,#4A3DC2) !important; border:1px solid rgba(var(--brand-purple-rgb,123,107,245),.22); border-radius:12px; }
.btn-primary:hover{ background:rgba(var(--brand-purple-rgb,123,107,245),.2) !important; box-shadow:none; transform:translateY(-1px); }
.btn-secondary, .btn-ghost{ background:rgba(var(--brand-purple-rgb,123,107,245),.05) !important; color:var(--text-ink,#23233A) !important; border:1px solid #E9E9F1; border-radius:12px; }
.btn-secondary:hover, .btn-ghost:hover{ background:rgba(var(--brand-purple-rgb,123,107,245),.09) !important; border-color:rgba(var(--brand-purple-rgb,123,107,245),.22); }
.btn-success{ background:rgba(37,177,90,.13) !important; color:#157A3D !important; border:1px solid rgba(37,177,90,.24); border-radius:12px; }
.btn-danger{ background:rgba(214,59,59,.12) !important; color:#B02A2A !important; border:1px solid rgba(214,59,59,.24); border-radius:12px; }
.btn-danger:hover{ background:rgba(214,59,59,.2) !important; }
.btn-warning{ background:rgba(255,201,60,.18) !important; color:#8B6500 !important; border:1px solid rgba(214,163,0,.3); border-radius:12px; }

/* =================================================================
   CARDS 3D / Claymorphism
   ================================================================= */
.card3d {
  background: var(--bg-card);
  border-radius: 10px;
  padding: 24px;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(45, 45, 94, 0.04);
}

.card3d-colored {
  border-radius: 10px;
  padding: 24px;
  color: white;
  position: relative;
  overflow: hidden;
}

.card3d-mint   { background: linear-gradient(135deg, #4DDDCA 0%, #2BB5A1 100%); box-shadow: 0 12px 28px rgba(61, 213, 192, 0.3); }
.card3d-pink   { background: linear-gradient(135deg, #F472AB 0%, #D63E80 100%); box-shadow: 0 12px 28px rgba(238, 94, 153, 0.3); }
.card3d-yellow { background: linear-gradient(135deg, #FFD361 0%, #E5AE1F 100%); color: #5C4400; box-shadow: 0 12px 28px rgba(255, 201, 60, 0.35); }
.card3d-blue   { background: linear-gradient(135deg, #6FC4E5 0%, #3C9BC3 100%); box-shadow: 0 12px 28px rgba(90, 185, 224, 0.3); }
.card3d-purple { background: linear-gradient(135deg, #8E80F7 0%, #5D4FE5 100%); box-shadow: 0 12px 28px rgba(var(--brand-purple-rgb, 123, 107, 245), 0.3); }
.card3d-coral  { background: linear-gradient(135deg, #FF8F7E 0%, #E55A48 100%); box-shadow: 0 12px 28px rgba(255, 122, 102, 0.3); }

/* =================================================================
   INPUT 3D
   ================================================================= */
.input3d {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid #EDF0F5;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-ink);
  background: white;
  transition: all 0.15s;
  box-shadow: 0 3px 0 #EDF0F5, 0 4px 10px rgba(45, 45, 94, 0.04);
}
.input3d:focus {
  outline: none;
  border-color: var(--brand-purple);
  box-shadow: 0 3px 0 var(--brand-purple-soft), 0 8px 16px rgba(var(--brand-purple-rgb, 123, 107, 245), 0.15);
}
.input3d::placeholder { color: var(--text-mute); }

.input3d-code {
  text-align: center;
  font-size: 44px;
  font-weight: 800;
  letter-spacing: 12px;
  text-transform: uppercase;
  color: var(--brand-purple);
  padding: 22px 16px;
  border-radius: 10px;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
}

/* =================================================================
   BADGE / PILL
   ================================================================= */
.pill3d {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}
.pill3d-purple { background: var(--brand-purple-soft); color: var(--brand-purple-shadow); }
.pill3d-mint   { background: var(--brand-mint-soft);   color: var(--brand-mint-shadow); }
.pill3d-pink   { background: var(--brand-pink-soft);   color: var(--brand-pink-shadow); }
.pill3d-yellow { background: var(--brand-yellow-soft); color: #8B6500; }
.pill3d-blue   { background: var(--brand-blue-soft);   color: var(--brand-blue-shadow); }
.pill3d-coral  { background: var(--brand-coral-soft);  color: var(--brand-coral-shadow); }

/* =================================================================
   ICON CIRCLE (para iconos dentro de cards)
   ================================================================= */
.icon3d {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  flex-shrink: 0;
}
.icon3d-lg { width: 64px; height: 64px; border-radius: 10px; }
.icon3d-sm { width: 36px; height: 36px; border-radius: 10px; }

.icon3d-mint   { background: var(--brand-mint);   color: white; box-shadow: 0 4px 12px rgba(61, 213, 192, 0.4); }
.icon3d-pink   { background: var(--brand-pink);   color: white; box-shadow: 0 4px 12px rgba(238, 94, 153, 0.4); }
.icon3d-yellow { background: var(--brand-yellow); color: #5C4400; box-shadow: 0 4px 12px rgba(255, 201, 60, 0.4); }
.icon3d-blue   { background: var(--brand-blue);   color: white; box-shadow: 0 4px 12px rgba(90, 185, 224, 0.4); }
.icon3d-purple { background: var(--brand-purple); color: white; box-shadow: 0 4px 12px rgba(var(--brand-purple-rgb, 123, 107, 245), 0.4); }
.icon3d-coral  { background: var(--brand-coral);  color: white; box-shadow: 0 4px 12px rgba(255, 122, 102, 0.4); }

/* Soft variants (background suave, ícono color sólido) */
.icon3d-mint-soft   { background: var(--brand-mint-soft);   color: var(--brand-mint-shadow); }
.icon3d-pink-soft   { background: var(--brand-pink-soft);   color: var(--brand-pink-shadow); }
.icon3d-yellow-soft { background: var(--brand-yellow-soft); color: var(--brand-yellow-shadow); }
.icon3d-blue-soft   { background: var(--brand-blue-soft);   color: var(--brand-blue-shadow); }
.icon3d-purple-soft { background: var(--brand-purple-soft); color: var(--brand-purple-shadow); }
.icon3d-coral-soft  { background: var(--brand-coral-soft);  color: var(--brand-coral-shadow); }

/* =================================================================
   FONTS
   ================================================================= */
.font-display {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.font-mono { font-family: 'JetBrains Mono', 'Courier New', monospace; }

/* =================================================================
   ANIMACIONES
   ================================================================= */
@keyframes pulse-soft {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
.animate-pulse-soft { animation: pulse-soft 2s ease-in-out infinite; }

@keyframes bounce-in {
  0% { transform: scale(0.8); opacity: 0; }
  50% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); }
}
.animate-bounce-in { animation: bounce-in 0.5s cubic-bezier(0.4, 0, 0.2, 1); }

/* =================================================================
   APLICAR estilo 3D claymorphism a las clases .btn-* VIEJAS
   Esto hace que TODO el proyecto herede el efecto sin tocar vistas
   ================================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 22px;
  border-radius: 10px;
  text-decoration: none;
  position: relative;
  transition: transform 0.12s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.12s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  letter-spacing: 0.01em;
  line-height: 1;
}
.btn:focus-visible { outline: 3px solid var(--brand-purple); outline-offset: 3px; }

.btn-sm { font-size: 12px; padding: 9px 16px; border-radius: 10px; }
.btn-lg { font-size: 16px; padding: 16px 28px; border-radius: 10px; }

.btn.btn-primary {
  color: white;
  background: linear-gradient(180deg, var(--brand-purple) 0%, var(--brand-purple-dark) 100%);
  box-shadow: 0 5px 0 var(--brand-purple-shadow), 0 7px 16px rgba(var(--brand-purple-rgb, 123, 107, 245), 0.32);
}
.btn.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 0 var(--brand-purple-shadow), 0 11px 20px rgba(var(--brand-purple-rgb, 123, 107, 245), 0.4);
}
.btn.btn-primary:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--brand-purple-shadow), 0 3px 8px rgba(var(--brand-purple-rgb, 123, 107, 245), 0.25);
}

.btn.btn-success {
  color: white;
  background: linear-gradient(180deg, var(--brand-mint) 0%, var(--brand-mint-dark) 100%);
  box-shadow: 0 5px 0 var(--brand-mint-shadow), 0 7px 16px rgba(61, 213, 192, 0.32);
}
.btn.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 0 var(--brand-mint-shadow), 0 11px 20px rgba(61, 213, 192, 0.4);
}
.btn.btn-success:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--brand-mint-shadow), 0 3px 8px rgba(61, 213, 192, 0.25);
}

.btn.btn-warning {
  color: #5C4400;
  background: linear-gradient(180deg, var(--brand-yellow) 0%, var(--brand-yellow-dark) 100%);
  box-shadow: 0 5px 0 var(--brand-yellow-shadow), 0 7px 16px rgba(255, 201, 60, 0.4);
}
.btn.btn-warning:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 0 var(--brand-yellow-shadow), 0 11px 20px rgba(255, 201, 60, 0.5);
}
.btn.btn-warning:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--brand-yellow-shadow), 0 3px 8px rgba(255, 201, 60, 0.3);
}

.btn.btn-danger {
  color: white;
  background: linear-gradient(180deg, var(--brand-coral) 0%, var(--brand-coral-dark) 100%);
  box-shadow: 0 5px 0 var(--brand-coral-shadow), 0 7px 16px rgba(255, 122, 102, 0.32);
}
.btn.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 0 var(--brand-coral-shadow), 0 11px 20px rgba(255, 122, 102, 0.4);
}
.btn.btn-danger:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--brand-coral-shadow), 0 3px 8px rgba(255, 122, 102, 0.25);
}

.btn.btn-secondary,
.btn.btn-ghost {
  color: var(--text-ink);
  background: white;
  border: 2px solid #EDF0F5;
  box-shadow: 0 4px 0 #C7CDD9, 0 6px 14px rgba(45, 45, 94, 0.1);
}
.btn.btn-secondary:hover,
.btn.btn-ghost:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #C7CDD9, 0 10px 18px rgba(45, 45, 94, 0.15);
}
.btn.btn-secondary:active,
.btn.btn-ghost:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #C7CDD9, 0 2px 6px rgba(45, 45, 94, 0.08);
}

.btn:disabled, .btn.disabled {
  opacity: 0.5; cursor: not-allowed;
  transform: none !important;
  box-shadow: 0 3px 0 rgba(0,0,0,0.1) !important;
}

/* =================================================================
   RESPONSIVE OVERHAUL — botón hamburguesa, backdrop, mobile-first
   ================================================================= */

/* Botón hamburguesa: oculto en desktop, visible en mobile (ver media query) */
.topbar-hamburger {
  display: none !important;
}

/* Backdrop oscuro detrás del sidebar abierto (mobile) */
.sidebar-backdrop {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 60;
  cursor: pointer;
}

/* Topbar layout robusto */
.topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.topbar-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-ink);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* ===== Breakpoint mobile (≤768px) ===== */
@media (max-width: 768px) {
  .topbar-hamburger { display: inline-flex !important; }
  .sidebar-backdrop[style*="display: block"],
  .sidebar-backdrop:not([style*="display: none"]) { display: block; }

  .sidebar {
    width: 280px;
    max-width: 85vw;
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
    z-index: 1000;
  }
  .sidebar.mobile-open { transform: translateX(0); }

  .main-content { margin-left: 0; }
  .topbar-title { font-size: 16px; }
  .topbar { padding: 12px 14px; }
  .content-wrapper { padding: 14px; }

  /* Forzar grids a 1 columna en mobile */
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ===== Tablet (769-1024) ===== */
@media (min-width: 769px) and (max-width: 1024px) {
  .sidebar { width: 220px; }
  .main-content { margin-left: 220px; }
}

/* ===== Mobile pequeño (≤480px) — tipografía y paddings más compactos ===== */
@media (max-width: 480px) {
  .content-wrapper { padding: 12px; }

  /* Cards 3D más compactas */
  .card3d, .card3d-colored { padding: 18px !important; border-radius: 10px !important; }

  /* Botones 3D un pelo más chicos */
  .btn3d-lg { font-size: 15px; padding: 15px 24px; }

  /* Tipografía mobile */
  .font-display { letter-spacing: -0.01em; }

  /* Input código del flujo entrega */
  .input3d-code {
    font-size: 36px;
    letter-spacing: 8px;
    padding: 18px 12px;
  }

  /* Evitar overflow horizontal */
  body, .app-container, .main-content { overflow-x: hidden; max-width: 100vw; }
}

/* ===== Evitar overflow horizontal en cualquier dispositivo ===== */
html, body { overflow-x: hidden; }
img, video, canvas, svg { max-width: 100%; }
table { display: block; overflow-x: auto; max-width: 100%; }

/* ===== Mejorar tappability (botones más grandes en touch) ===== */
@media (hover: none) and (pointer: coarse) {
  .btn, .btn3d {
    min-height: 44px; /* Apple recomienda 44pt mínimo para targets táctiles */
  }
}

/* ===== Safe areas (iPhone con notch) ===== */
@supports (padding: env(safe-area-inset-bottom)) {
  body { padding-bottom: env(safe-area-inset-bottom); }
}

/* =================================================================
   Stream Deck: efecto 3D real para las 4 cards del Servicio
   ================================================================= */

.deck-card {
  position: relative;
  display: block;
  border-radius: 10px;
  padding: 18px;
  min-height: 160px;
  color: white;
  text-decoration: none;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.12s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.12s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
@media (min-width: 640px) {
  .deck-card {
    border-radius: 10px;
    padding: 28px;
    min-height: 200px;
  }
}

.deck-card.deck-yellow {
  background: linear-gradient(135deg, #FFD55C 0%, #FFB323 100%);
  color: #5C4400;
  box-shadow: 0 8px 0 #E69A00, 0 12px 28px rgba(255, 201, 60, 0.45);
}
.deck-card.deck-mint {
  background: linear-gradient(135deg, #4DDDCA 0%, #2BB5A1 100%);
  box-shadow: 0 8px 0 #1F8A7A, 0 12px 28px rgba(61, 213, 192, 0.4);
}
.deck-card.deck-purple {
  background: linear-gradient(135deg, #9B8DFB 0%, #6D5BE5 100%);
  box-shadow: 0 8px 0 #4A3DC4, 0 12px 28px rgba(123, 107, 245, 0.4);
}
.deck-card.deck-pink {
  background: linear-gradient(135deg, #FF8FB3 0%, #F25C8C 100%);
  box-shadow: 0 8px 0 #C73968, 0 12px 28px rgba(255, 143, 179, 0.4);
}

.deck-card:hover {
  transform: translateY(-3px);
}
.deck-card.deck-yellow:hover  { box-shadow: 0 11px 0 #E69A00, 0 16px 32px rgba(255, 201, 60, 0.55); }
.deck-card.deck-mint:hover    { box-shadow: 0 11px 0 #1F8A7A, 0 16px 32px rgba(61, 213, 192, 0.5); }
.deck-card.deck-purple:hover  { box-shadow: 0 11px 0 #4A3DC4, 0 16px 32px rgba(123, 107, 245, 0.5); }
.deck-card.deck-pink:hover    { box-shadow: 0 11px 0 #C73968, 0 16px 32px rgba(255, 143, 179, 0.5); }

.deck-card:active {
  transform: translateY(6px);
}
.deck-card.deck-yellow:active { box-shadow: 0 2px 0 #E69A00, 0 4px 10px rgba(255, 201, 60, 0.3); }
.deck-card.deck-mint:active   { box-shadow: 0 2px 0 #1F8A7A, 0 4px 10px rgba(61, 213, 192, 0.3); }
.deck-card.deck-purple:active { box-shadow: 0 2px 0 #4A3DC4, 0 4px 10px rgba(123, 107, 245, 0.3); }
.deck-card.deck-pink:active   { box-shadow: 0 2px 0 #C73968, 0 4px 10px rgba(255, 143, 179, 0.3); }


/* =================================================================
   Stream Deck: contenido interno responsive
   ================================================================= */
.deck-card .deck-icon-box {
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.3);
  backdrop-filter: blur(10px);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.deck-card .deck-icon-box svg { width: 24px; height: 24px; }

.deck-card .deck-title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.deck-card .deck-desc {
  font-size: 11.5px;
  opacity: 0.9;
  line-height: 1.35;
}
.deck-card .deck-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255,255,255,0.4);
  padding: 4px 9px;
  border-radius: 100px;
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
}
.deck-card.deck-mint .deck-badge,
.deck-card.deck-purple .deck-badge,
.deck-card.deck-pink .deck-badge {
  background: rgba(255,255,255,0.25);
  color: white;
}

@media (min-width: 640px) {
  .deck-card .deck-icon-box { width: 60px; height: 60px; border-radius: 10px; margin-bottom: 14px; }
  .deck-card .deck-icon-box svg { width: 32px; height: 32px; }
  .deck-card .deck-title { font-size: 28px; margin-bottom: 6px; }
  .deck-card .deck-desc { font-size: 14px; opacity: 0.85; }
  .deck-card .deck-badge { top: 28px; right: 28px; padding: 6px 12px; font-size: 11px; letter-spacing: 1.2px; }
}


/* =================================================================
   SIDEBAR PRO — Dashboard moderno (reemplaza al .sidebar viejo)
   ================================================================= */

:root {
  --sidebar-pro-width: 240px;
  --sidebar-pro-width-collapsed: 72px;
  --brand-primary: #7B6BF5;
  --brand-primary-dark: #5D4FE5;
  --brand-primary-soft: #EFEBFF;
}

.sidebar-pro {
  width: var(--sidebar-pro-width);
  /* Acrílico: vidrio esmerilado marcado sobre el contenido */
  background: rgba(250,251,252,0.70);
  -webkit-backdrop-filter: blur(30px) saturate(1.8) brightness(1.04);
  backdrop-filter: blur(30px) saturate(1.8) brightness(1.04);
  border-right: 1px solid rgba(255,255,255,0.55);
  box-shadow: 1px 0 0 rgba(30,32,48,0.04), 8px 0 30px rgba(30,32,48,0.05);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 70;
  transition: transform 0.25s ease;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))){
  .sidebar-pro { background: #FAFBFC; }
}

/* Header con logo + nombre */
.sidebar-pro-header {
  padding: 18px 16px;
  border-bottom: 1px solid #EEF1F5;
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-pro-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(var(--brand-purple-rgb, 123, 107, 245), 0.3);
}
.sidebar-pro-logo img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-pro-logo-default {
  color: white;
  font-weight: 800;
  font-size: 18px;
}
.sidebar-pro-brand { flex: 1; min-width: 0; }
.sidebar-pro-name {
  font-weight: 800;
  font-size: 15px;
  color: #2D2D5E;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-pro-tagline {
  font-size: 11px;
  color: #9CA3B5;
  margin-top: 2px;
}

/* Nav */
.sidebar-pro-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sidebar-pro-section { display: flex; flex-direction: column; gap: 2px; }
.sidebar-pro-section-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #9CA3B5;
  padding: 4px 10px 6px;
}

.sidebar-pro-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #4A5063;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.15s ease;
  position: relative;
}
.sidebar-pro-item:hover {
  background: var(--brand-primary-soft);
  color: var(--brand-primary-dark);
}
.sidebar-pro-item.active {
  background: var(--brand-primary);
  color: white;
  box-shadow: 0 4px 14px rgba(var(--brand-purple-rgb, 123, 107, 245), 0.35);
}
.sidebar-pro-item.active:hover {
  background: var(--brand-primary-dark);
}
.sidebar-pro-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sidebar-pro-label { flex: 1; }

.sidebar-pro-badge {
  background: #FFC93C;
  color: #5C4400;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 100px;
  letter-spacing: 1px;
}

/* Featured (Servicio) — destacado con gradient */
.sidebar-pro-item.sidebar-pro-featured:not(.active) {
  background: linear-gradient(135deg, rgba(var(--brand-purple-rgb, 123, 107, 245), 0.1), rgba(77, 221, 202, 0.1));
}

/* Footer */
.sidebar-pro-footer {
  border-top: 1px solid #EEF1F5;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sidebar-pro-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: #2D2D5E;
  transition: background 0.15s ease;
}
.sidebar-pro-user:hover { background: var(--brand-primary-soft); }
.sidebar-pro-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
}
.sidebar-pro-user-info { flex: 1; min-width: 0; }
.sidebar-pro-user-name {
  font-weight: 700;
  font-size: 13px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-pro-user-role {
  font-size: 11px;
  color: #9CA3B5;
  text-transform: capitalize;
}

.sidebar-pro-logout-form { margin: 0; }
.sidebar-pro-logout {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid #EEF1F5;
  color: #6B7280;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.15s ease;
}
.sidebar-pro-logout:hover {
  background: #FFE5E5;
  color: #C73C3C;
  border-color: #FFE5E5;
}

/* ==== Mobile: el sidebar se vuelve drawer ==== */
@media (max-width: 768px) {
  .sidebar-pro {
    transform: translateX(-100%);
    box-shadow: 0 0 40px rgba(0,0,0,0.15);
  }
  .sidebar-pro.mobile-open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
  }
}

/* =================================================================
   PAGE HEADER — encabezado consistente para todas las vistas
   ================================================================= */

.page-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}
.page-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.page-header-actions .btn3d {
  /* Botones de header NO se estiran nunca */
  width: auto;
  flex: 0 0 auto;
  min-width: 0;
}

/* Tablet+: título y acciones lado a lado */
@media (min-width: 768px) {
  .page-header {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
  }
  .page-header-actions {
    flex-shrink: 0;
  }
}

/* En mobile, los botones del header quedan en grid 2-col (uno al lado del otro, no estirados full) */
@media (max-width: 767px) {
  .page-header-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .page-header-actions:has(> :only-child) {
    grid-template-columns: 1fr;
  }
}

/* Override: cuando no hay :has() soporte, usar fallback simple */
.page-header-actions-single {
  display: flex !important;
  justify-content: flex-start;
}

/* ============================================================
   ICONOS SVG (reemplazan emojis) — helper icon() en iconos.js
   ============================================================ */
.ic {
  width: 1.15em;
  height: 1.15em;
  display: inline-block;
  vertical-align: -0.18em;   /* alinea con el texto */
  flex-shrink: 0;
  transition: transform 0.15s cubic-bezier(.2, 0, .2, 1);
}
/* iconos que van solos (no junto a texto): tamaño por contexto */
.ic-lg { width: 40px; height: 40px; vertical-align: middle; }
.ic-xl { width: 56px; height: 56px; vertical-align: middle; }
/* separación cuando el icono precede a texto */
.ic-start { margin-right: 0.4em; }

/* ---------- micro-animaciones: los iconos reaccionan a la interacción ---------- */
/* IMPORTANTE: apuntamos a CUALQUIER <svg> dentro de algo interactivo, tenga o no
   la clase .ic. Los iconos del menú y de los botones NO tienen .ic (son SVG sueltos). */
.sidebar-pro-item svg, .btn svg, .btn3d svg, .btn-icon svg,
button svg, .topbar svg, [role="button"] svg, .ic {
  transition: transform 0.3s cubic-bezier(.34, 1.56, .64, 1);
}
/* Botones/enlaces (NO el menú): el icono crece al pasar el mouse.
   El menú lateral tiene su propia animación por icono (más abajo). */
.btn:hover svg, .btn3d:hover svg, .btn-icon:hover svg,
button:hover svg, button:focus-visible svg,
.topbar a:hover svg, .topbar button:hover svg,
[role="button"]:hover svg,
a:hover > .ic, label:hover > .ic {
  transform: scale(1.18);
}
/* Al presionar un BOTÓN: leve hundido (sensación táctil, sin rebote).
   El menú NO se toca al clic: su animación es solo al pasar el mouse. */
.btn:active svg, .btn3d:active svg, .btn-icon:active svg,
button:active svg, [role="button"]:active svg {
  transform: scale(0.94);
}

/* El check "se dibuja" en los carteles de éxito (una sola vez). */
.anim-draw path { stroke-dasharray: 44; animation: ic-draw 0.6s ease forwards; }
@keyframes ic-draw { from { stroke-dashoffset: 44; } to { stroke-dashoffset: 0; } }

/* La campana llama la atención al cargar: suena 2 veces y para (sin bucle infinito). */
.anim-ring { transform-origin: top center; animation: ic-ring 0.8s ease-in-out 2; }
@keyframes ic-ring {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(14deg); }
  40% { transform: rotate(-11deg); }
  60% { transform: rotate(7deg); }
  80% { transform: rotate(-4deg); }
}

/* Respeta a quien pide menos movimiento: se apagan las animaciones automáticas. */
@media (prefers-reduced-motion: reduce) {
  .anim-draw path { animation: none; stroke-dashoffset: 0; }
  .anim-ring { animation: none; }
}


/* ============================================================
   MENÚ LATERAL — cada icono con su propia animación al hover
   (estilo Claude). Se apunta por href, sin tocar el HTML.
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  /* origen de rotación al centro del icono para las partes internas */
  .sidebar-pro-icon svg > * { transform-box: view-box; transform-origin: 12px 12px; }

  /* Configuración: el engranaje gira */
  a[href="/configuracion"]:hover .sidebar-pro-icon svg { animation: sic-spin 0.8s cubic-bezier(.4,0,.2,1); }
  @keyframes sic-spin { to { transform: rotate(180deg); } }

  /* Servicio / Horarios: giran las manecillas del reloj */
  a[href="/servicio"]:hover .sidebar-pro-icon svg polyline,
  a[href="/servicios"]:hover .sidebar-pro-icon svg path { animation: sic-hands 0.9s cubic-bezier(.4,0,.2,1); }
  @keyframes sic-hands { to { transform: rotate(360deg); } }

  /* Dashboard: los cuadros aparecen escalonados */
  a[href="/dashboard"]:hover .sidebar-pro-icon svg rect { animation: sic-pop 0.5s ease backwards; transform-box: fill-box; transform-origin: center; }
  a[href="/dashboard"]:hover .sidebar-pro-icon svg rect:nth-child(2){ animation-delay:.06s; }
  a[href="/dashboard"]:hover .sidebar-pro-icon svg rect:nth-child(3){ animation-delay:.12s; }
  a[href="/dashboard"]:hover .sidebar-pro-icon svg rect:nth-child(4){ animation-delay:.18s; }
  @keyframes sic-pop { from { transform: scale(0); opacity:0; } to { transform: scale(1); opacity:1; } }

  /* Reportes: las barras crecen desde abajo */
  a[href="/reportes"]:hover .sidebar-pro-icon svg line { animation: sic-grow 0.5s ease backwards; transform-box: fill-box; transform-origin: center bottom; }
  a[href="/reportes"]:hover .sidebar-pro-icon svg line:nth-child(2){ animation-delay:.08s; }
  a[href="/reportes"]:hover .sidebar-pro-icon svg line:nth-child(3){ animation-delay:.16s; }
  @keyframes sic-grow { from { transform: scaleY(0.15); } to { transform: scaleY(1); } }

  /* Turnos / Asistencia / Entrega / Lista: el check se dibuja */
  a[href="/mis-turnos"]:hover .sidebar-pro-icon svg path:first-child,
  a[href="/asistencia"]:hover .sidebar-pro-icon svg path:first-child,
  a[href="/entrega"]:hover .sidebar-pro-icon svg path:first-child,
  a[href="/lista-dia"]:hover .sidebar-pro-icon svg path:first-child {
    stroke-dasharray: 26; animation: sic-draw 0.55s ease forwards;
  }
  @keyframes sic-draw { from { stroke-dashoffset: 26; } to { stroke-dashoffset: 0; } }

  /* Personas (niños, asistentes, equipo, grupos, asignar): rebotan */
  a[href="/ninos"]:hover .sidebar-pro-icon svg,
  a[href="/asistentes"]:hover .sidebar-pro-icon svg,
  a[href="/voluntarios"]:hover .sidebar-pro-icon svg,
  a[href="/grupos"]:hover .sidebar-pro-icon svg,
  a[href="/asignaciones"]:hover .sidebar-pro-icon svg { animation: sic-bounce 0.6s; }
  @keyframes sic-bounce { 0%,100%{transform:translateY(0);} 35%{transform:translateY(-3px);} 65%{transform:translateY(1px);} }

  /* Salones: el edificio se levanta */
  a[href="/salones"]:hover .sidebar-pro-icon svg { animation: sic-lift 0.5s ease; }
  @keyframes sic-lift { 0%{transform:translateY(0);} 45%{transform:translateY(-3px);} 100%{transform:translateY(0);} }

  /* Materiales / Programación: la hoja se voltea */
  a[href="/materiales"]:hover .sidebar-pro-icon svg,
  a[href="/programaciones"]:hover .sidebar-pro-icon svg { animation: sic-flip 0.65s ease; }
  @keyframes sic-flip { 0%{transform:perspective(70px) rotateY(0);} 100%{transform:perspective(70px) rotateY(360deg);} }

  /* Noticias: el megáfono se inclina */
  a[href="/noticias"]:hover .sidebar-pro-icon svg { animation: sic-shake 0.5s ease; }
  @keyframes sic-shake { 0%,100%{transform:rotate(0);} 25%{transform:rotate(-12deg);} 55%{transform:rotate(8deg);} 80%{transform:rotate(-3deg);} }

  /* Incidentes: la alerta vibra */
  a[href="/incidentes"]:hover .sidebar-pro-icon svg { animation: sic-buzz 0.45s ease; }
  @keyframes sic-buzz { 0%,100%{transform:translateX(0);} 20%{transform:translateX(-2px);} 40%{transform:translateX(2px);} 60%{transform:translateX(-1.5px);} 80%{transform:translateX(1.5px);} }

  /* Zona Segura: el escudo late */
  a[href="/zona-segura"]:hover .sidebar-pro-icon svg { animation: sic-beat 0.6s ease; }
  @keyframes sic-beat { 0%,100%{transform:scale(1);} 30%{transform:scale(1.18);} 55%{transform:scale(0.96);} }

  /* Cerrar sesión: la flecha sale por la puerta */
  .sidebar-pro-logout:hover svg polyline,
  .sidebar-pro-logout:hover svg line { transform-box: view-box; animation: sic-out 0.5s ease; }
  @keyframes sic-out { 0%{transform:translateX(0);} 50%{transform:translateX(3px);} 100%{transform:translateX(0);} }
}

/* ============================================================
   ESTADO "EN VIVO" del servicio (switch tipo OBS)
   ============================================================ */
.live-switch{ display:inline-flex; align-items:center; gap:10px; border:none; cursor:pointer;
  font-size:16px; font-weight:800; letter-spacing:-.2px; color:#fff; padding:14px 24px; border-radius: 10px;
  background:var(--vibrant-green); box-shadow:0 4px 14px rgba(46,158,112,.35); transition:transform .08s, filter .15s; }
.live-switch:hover{ filter:brightness(1.05); }
.live-switch:active{ transform:scale(.98); }
.live-switch svg{ width:20px; height:20px; }

/* barra "en vivo" (en la Cabina) */
.live-bar{ display:flex; align-items:center; gap:12px; padding:14px 18px; border-radius: 10px;
  background:rgba(252,235,235,0.60); border:1px solid rgba(243,201,202,0.95);
  -webkit-backdrop-filter:blur(26px) saturate(1.9) brightness(1.05); backdrop-filter:blur(26px) saturate(1.9) brightness(1.05);
  box-shadow:0 10px 30px rgba(229,72,77,0.14), inset 0 1px 0 rgba(255,255,255,0.5); }
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){ .live-bar{ background:#FCEBEB; } }
.live-bar .live-dot{ width:11px; height:11px; border-radius: 99px; background:#E5484D; flex-shrink:0; }
@media (prefers-reduced-motion:no-preference){ .live-bar .live-dot{ animation:live-blink 1.4s ease-in-out infinite; } }
@keyframes live-blink{ 0%,100%{ opacity:1; box-shadow:0 0 0 0 rgba(229,72,77,.5);} 50%{ opacity:.55; box-shadow:0 0 0 6px rgba(229,72,77,0);} }
.live-bar .live-txt{ flex:1; font-weight:800; color:#B4282C; letter-spacing:-.2px; }
.live-bar .live-txt small{ display:block; font-weight:600; font-size:12px; color:var(--text-secondary); letter-spacing:0; }
.live-stop{ border:none; cursor:pointer; background:#E5484D; color:#fff; font-weight:800; font-size:13.5px;
  padding:9px 16px; border-radius: 10px; transition:transform .08s, filter .15s; }
.live-stop:hover{ filter:brightness(1.05); } .live-stop:active{ transform:scale(.97); }
.live-force{ background:none; border:none; color:#B4282C; font-size:11.5px; font-weight:700; cursor:pointer;
  text-decoration:underline; padding:4px; }

/* banda global (arriba de todas las pantallas) */
.airbar-global{ display:flex; align-items:center; gap:10px; background:#E5484D; color:#fff;
  padding:8px 20px; font-size:13px; font-weight:700; }
.airbar-global .rec{ width:8px; height:8px; border-radius: 99px; background:#fff; }
@media (prefers-reduced-motion:no-preference){ .airbar-global .rec{ animation:live-blink 1.4s ease-in-out infinite; } }
.airbar-global .grow{ flex:1; } .airbar-global b{ font-weight:800; }
.airbar-global form{ margin:0; }
.airbar-global .stop{ background:rgba(255,255,255,.18); border:1px solid rgba(255,255,255,.4); color:#fff;
  font-weight:700; font-size:12px; padding:5px 12px; border-radius: 8px; cursor:pointer; }
.airbar-global .stop:hover{ background:rgba(255,255,255,.3); }

/* Banner "Tu servicio está próximo a iniciar" (in-app, polleado) */
.airbar-soon{ display:flex; align-items:center; gap:10px; padding:8px 20px; font-size:13px; font-weight:700;
  color:#fff; background:linear-gradient(90deg, var(--brand-primary,#6D5BE5), var(--brand-primary-dark,#4B3FB0)); }
.airbar-soon .soon-ico{ display:inline-flex; flex-shrink:0; }
.airbar-soon .grow{ flex:1; } .airbar-soon b{ font-weight:800; }
.airbar-soon .soon-go{ background:#fff; color:var(--brand-primary-dark,#4B3FB0); border:0; font-weight:800; font-size:12.5px; padding:6px 13px; border-radius: 8px; cursor:pointer; white-space:nowrap; }
.airbar-soon .soon-go:hover{ filter:brightness(.97); }
.airbar-soon .soon-cancel{ background:rgba(255,255,255,.16); border:1px solid rgba(255,255,255,.45); color:#fff; font-weight:700; font-size:12px; padding:5px 11px; border-radius: 8px; cursor:pointer; white-space:nowrap; }
.airbar-soon .soon-cancel:hover{ background:rgba(255,255,255,.28); }

/* badge LIVE del menú, latiendo */
@media (prefers-reduced-motion:no-preference){ .sidebar-pro-badge.on{ animation:live-blink 1.6s ease-in-out infinite; } }

/* Aviso de "configuración bloqueada durante el servicio en vivo" */
.lock-note{ display:flex; align-items:center; gap:9px; padding:11px 15px; border-radius: 10px; margin-bottom:16px;
  background:#FDF4E6; border:1px solid #F3DEB8; color:#8A5A12; font-size:13.5px; font-weight:700; }
.lock-note .ic{ width:17px; height:17px; flex-shrink:0; }

/* Accesos de operación dentro de la Cabina (Servicio = hub) */
.op-link{ display:flex; align-items:center; gap:9px; padding:13px 15px; border-radius: 10px;
  background:var(--bg-white); border:1px solid var(--border-color); color:var(--text-primary);
  font-weight:700; font-size:14px; text-decoration:none; transition:border-color .15s, transform .1s, box-shadow .15s; }
.op-link:hover{ border-color:var(--primary-blue); box-shadow:var(--shadow-sm); color:var(--text-primary); }
.op-link:active{ transform:scale(.985); }
.op-link .ic{ width:19px; height:19px; color:var(--primary-blue); flex-shrink:0; }

/* Pestañas de sub-sección (ej: Equipo → Personas / Grupos) */
.subtabs{ display:inline-flex; gap:4px; background:var(--bg-gray); padding:4px; border-radius: 10px; margin-bottom:22px; }
.subtab{ padding:7px 16px; border-radius: 9px; font-weight:700; font-size:13.5px; color:var(--text-secondary); text-decoration:none; transition:background .15s, color .15s; }
.subtab:hover{ color:var(--text-primary); }
.subtab.active{ background:var(--bg-white); color:var(--text-primary); box-shadow:var(--shadow-sm); }

/* Mini-tablero en vivo de la Cabina (números clave del servicio) */
.live-stats{ display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-top:10px; }
@media (max-width:520px){ .live-stats{ grid-template-columns:repeat(2,1fr); } }
.live-stats .ls{ background:#fff; border:1px solid var(--border-color); border-radius: 10px; padding:11px 12px; text-align:center; }
.live-stats .ls .n{ font-size:24px; font-weight:800; line-height:1; color:var(--text-primary); font-variant-numeric:tabular-nums; }
.live-stats .ls .n.live{ color:#E5484D; }
.live-stats .ls .t{ font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:.4px; color:var(--text-light); margin-top:5px; }

/* ============================================================
   Cabina "domada": tarjetas coherentes con la marca (línea de acento).
   Reemplaza el deck multicolor. Solo marca + neutros; semántico aparte.
   ============================================================ */
.svc-deck{ display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:22px 0; }
.svc-card{ background:var(--bg-white); border:1px solid var(--border-color); border-top:3px solid var(--brand-purple);
  border-radius: 10px; padding:16px; box-shadow:var(--shadow-sm); text-decoration:none; color:var(--text-primary);
  position:relative; display:block; transition:transform .12s, box-shadow .15s, border-color .15s; }
.svc-card:hover{ transform:translateY(-2px); box-shadow:var(--shadow-md); border-color:var(--brand-purple); }
.svc-card .svc-tile{ width:46px; height:46px; border-radius: 10px; background:var(--brand-purple-soft); color:var(--brand-purple);
  display:flex; align-items:center; justify-content:center; margin-bottom:12px; }
.svc-card .svc-tile svg{ width:24px; height:24px; }
.svc-card .svc-step{ font-size:11px; font-weight:800; color:var(--brand-purple); letter-spacing:.5px; }
.svc-card .svc-title{ font-size:16px; font-weight:800; margin:2px 0 3px; letter-spacing:-.2px; color:var(--text-primary); }
.svc-card .svc-desc{ font-size:12.5px; color:var(--text-secondary); margin:0; }
.svc-card .svc-count{ position:absolute; top:16px; right:16px; font-size:11px; font-weight:700; color:var(--text-light);
  background:var(--bg-light); border:1px solid var(--border-color); border-radius: 99px; padding:3px 9px; }

/* Stat cards coherentes (reemplazan las KPI de 4 colores). Neutro + acento. */
.stat-card{ background:var(--bg-white); border:1px solid var(--border-color); border-radius: 10px; padding:15px 16px; box-shadow:var(--shadow-sm); }
.stat-card .stat-label{ font-size:11.5px; font-weight:600; color:var(--text-secondary); }
.stat-card .stat-value{ font-size:30px; font-weight:800; letter-spacing:-.5px; margin-top:5px; color:var(--text-primary); font-variant-numeric:tabular-nums; line-height:1; }
.stat-card .stat-value.brand{ color:var(--brand-purple); }
.stat-card .stat-value.good{ color:var(--vibrant-green); }
.stat-card .stat-sub{ font-size:11.5px; color:var(--text-light); margin-top:4px; }

/* Mosaico "Servicios de hoy" en /servicio: sólo se inicia sobre un programado */
.svc-prog{ display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:12px; }
.svc-prog-card{ background:var(--bg-white); border:1px solid var(--border-color); border-top:3px solid var(--brand-purple); border-radius: 10px; padding:16px; box-shadow:var(--shadow-sm); }
.svc-prog-card.done{ border-top-color:var(--vibrant-green); opacity:.9; }
.svc-prog-card .sp-hora{ font-size:12.5px; color:var(--text-secondary); font-weight:600; }
.svc-prog-card h3{ font-size:16px; font-weight:800; margin:3px 0 12px; letter-spacing:-.2px; }
.svc-prog-card .sp-done{ display:inline-flex; align-items:center; gap:6px; font-size:12.5px; font-weight:800; color:var(--vibrant-green); }
.svc-empty{ text-align:center; background:var(--bg-white); border:1px dashed var(--border-color); border-radius: 10px; padding:26px 20px; }
.svc-empty-ic{ width:52px; height:52px; border-radius: 10px; background:var(--brand-purple-soft); color:var(--brand-purple); display:flex; align-items:center; justify-content:center; margin:0 auto 12px; }

/* ===================== GLASS / ACRÍLICO =====================
   Superficies FLOTANTES (sobre color o contenido). Tinte de marca,
   legible, theme-aware y con fallback si no hay backdrop-filter. */
.glass{
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.7);
  box-shadow: 0 12px 40px rgba(30,32,48,0.14), inset 0 1px 0 rgba(255,255,255,0.55);
  -webkit-backdrop-filter: blur(30px) saturate(1.8) brightness(1.05);
  backdrop-filter: blur(30px) saturate(1.8) brightness(1.05);
}
.glass-brand{
  background: rgba(255,255,255,0.55);
  background: color-mix(in srgb, var(--brand-primary, #6D5BE5) 14%, rgba(255,255,255,0.66));
  border: 1px solid color-mix(in srgb, var(--brand-primary, #6D5BE5) 26%, rgba(255,255,255,0.7));
  box-shadow: 0 12px 40px rgba(var(--brand-purple-rgb, 109,91,229), 0.16), inset 0 1px 0 rgba(255,255,255,0.5);
  -webkit-backdrop-filter: blur(30px) saturate(1.9) brightness(1.05);
  backdrop-filter: blur(30px) saturate(1.9) brightness(1.05);
}
/* Fallback: sin backdrop-filter => opaco, nunca se ve "sucio" */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))){
  .glass{ background: rgba(255,255,255,0.95); }
  .glass-brand{ background: var(--brand-primary-soft, #EEEBFB); }
}

/* ===================== PORTAL DE ASISTENTE — shell con sidebar (paridad con staff .sidebar-pro) ===================== */
.fam-shell{ display:flex; min-height:100vh; }
.fam-sidebar{ width:240px; flex:none; position:fixed; top:0; left:0; height:100vh; z-index:60;
  background:rgba(250,251,252,.70); -webkit-backdrop-filter:blur(30px) saturate(1.8) brightness(1.04); backdrop-filter:blur(30px) saturate(1.8) brightness(1.04);
  border-right:1px solid rgba(255,255,255,.55); box-shadow:1px 0 0 rgba(30,32,48,.04), 8px 0 30px rgba(30,32,48,.05);
  display:flex; flex-direction:column; transition:transform .25s ease; }
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){ .fam-sidebar{ background:#FAFBFC; } }
.fam-sb-head{ display:flex; align-items:center; gap:12px; padding:18px 16px; border-bottom:1px solid #EEF1F5; text-decoration:none; color:inherit; }
.fam-sb-logo{ width:40px; height:40px; border-radius: 10px; background:var(--brand-primary,#6D5BE5); display:flex; align-items:center; justify-content:center; color:#fff; flex:none; overflow:hidden; box-shadow:0 4px 14px rgba(var(--brand-purple-rgb,109,91,229),.3); }
.fam-sb-logo img{ width:100%; height:100%; object-fit:cover; } .fam-sb-logo svg{ width:20px; height:20px; }
.fam-sb-brand{ flex:1; min-width:0; }
.fam-sb-name{ font-weight:800; font-size:15px; line-height:1.1; color:var(--text-primary,#2D2D5E); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.fam-sb-tag{ font-size:11px; color:#9CA3B5; margin-top:2px; }
.fam-sb-nav{ flex:1; overflow-y:auto; padding:12px 10px; display:flex; flex-direction:column; gap:16px; }
.fam-sb-section{ display:flex; flex-direction:column; gap:2px; }
.fam-sb-label{ font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:1.2px; color:#9CA3B5; padding:4px 10px 6px; }
.fam-sb-item{ display:flex; align-items:center; gap:12px; padding:10px 12px; border-radius: 10px; text-decoration:none; color:#4A5063; font-weight:600; font-size:14px; transition:all .15s ease; }
.fam-sb-ico{ width:32px; height:32px; border-radius: 9px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.fam-sb-ico svg{ width:20px; height:20px; }
.fam-sb-lbl{ flex:1; }
.fam-sb-item:hover{ background:var(--brand-primary-soft,#EDEBFC); color:var(--brand-primary-dark,#4B3FB0); }
.fam-sb-item.on{ background:var(--brand-primary,#6D5BE5); color:#fff; box-shadow:0 4px 14px rgba(var(--brand-purple-rgb,109,91,229),.35); }
.fam-sb-foot{ margin-top:auto; padding:10px; border-top:1px solid #EEF1F5; }
.fam-sb-logout{ display:flex; align-items:center; gap:12px; padding:10px 12px; border-radius: 10px; color:#C0556B; font-weight:600; font-size:14px; text-decoration:none; background:none; border:none; cursor:pointer; width:100%; font-family:inherit; }
.fam-sb-logout:hover{ background:#FBEEF0; }
.fam-mainwrap{ flex:1; margin-left:240px; min-width:0; display:flex; flex-direction:column; }
.fam-main{ flex:1; width:100%; }
.fam-page{ max-width:1152px; margin:0 auto; padding:24px 16px 52px; }
.fam-page.fam-narrow{ max-width:600px; }
.fam-mobilebar{ display:none; }
/* Header de página en desktop (jerarquía): título de sección + iglesia. */
.fam-topbar{ display:none; }
@media (min-width:821px){
  .fam-topbar{ display:flex; align-items:center; justify-content:space-between; gap:16px;
    padding:14px 32px; position:sticky; top:0; z-index:40;
    background:rgba(255,255,255,.82); -webkit-backdrop-filter:blur(18px) saturate(1.6); backdrop-filter:blur(18px) saturate(1.6);
    border-bottom:1px solid var(--border-color,#E9E9F1); }
  .fam-topbar-h{ font-size:19px; font-weight:800; color:var(--text-primary,#2D2D5E); margin:0; letter-spacing:-.2px; }
  .fam-topbar-ig{ font-size:13px; font-weight:700; color:var(--text-light,#9CA3B5); white-space:nowrap; }
}

/* Bottom-nav de asistente (solo móvil) — acceso al alcance del pulgar */
.fam-bottomnav{ display:none; }
@media (max-width:820px){
  .fam-bottomnav{ display:flex; position:fixed; left:0; right:0; bottom:0; z-index:60;
    background:rgba(255,255,255,.94); -webkit-backdrop-filter:blur(18px) saturate(1.7); backdrop-filter:blur(18px) saturate(1.7);
    border-top:1px solid var(--border-color,#E9E9F1); padding:5px 4px calc(5px + env(safe-area-inset-bottom, 0px)); }
  .fam-bn-item{ flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px;
    min-height:52px; text-decoration:none; color:var(--text-light,#9CA3B5); font-size:10.5px; font-weight:700;
    border-radius: 10px; -webkit-tap-highlight-color:transparent; transition:color .12s ease; }
  .fam-bn-item .fam-bn-ico{ display:inline-flex; padding:3px 12px; border-radius: 99px; transition:background .14s ease; }
  .fam-bn-item svg{ width:23px; height:23px; }
  .fam-bn-item.on{ color:var(--brand-primary,#6D5BE5); }
  .fam-bn-item.on .fam-bn-ico{ background:var(--brand-primary-soft,#EEEBFB); }
  .fam-bn-item:active .fam-bn-ico{ transform:scale(.92); }
  /* que el contenido no quede tapado por la barra */
  .fam-main{ padding-bottom:calc(72px + env(safe-area-inset-bottom, 0px)); }
}

/* Skeleton de carga (shimmer) — reutilizable mientras algo trae datos */
.skeleton{ background:linear-gradient(90deg, #ECECF3 25%, #F5F5FA 37%, #ECECF3 63%); background-size:400% 100%;
  animation:skeleton-shimmer 1.4s ease infinite; border-radius: 10px; }
@keyframes skeleton-shimmer{ 0%{ background-position:100% 50%; } 100%{ background-position:0 50%; } }
@media (prefers-reduced-motion:reduce){ .skeleton{ animation:none; } }
.sk-line{ height:12px; margin:8px 0; }
.sr-only{ position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* Estado vacío reutilizable (partials/_vacio.ejs) */
.vacio{ background:#fff; border:1px solid var(--border-color,#E9E9F1); border-radius: 10px; text-align:center; padding:42px 22px; box-shadow:0 1px 2px rgba(30,32,48,.04); }
.vacio-ic{ width:60px; height:60px; margin:0 auto 14px; border-radius: 10px; background:var(--brand-primary-soft,#EEEBFB); color:var(--brand-primary,#6D5BE5); display:flex; align-items:center; justify-content:center; }
.vacio-ic svg{ width:30px; height:30px; }
.vacio-tit{ font-size:17px; font-weight:800; color:var(--text-primary,#2D2D5E); margin:0 0 6px; }
.vacio-txt{ font-size:13.5px; color:var(--text-secondary,#6B7280); margin:0 auto 16px; max-width:340px; line-height:1.5; }
.vacio-cta{ text-decoration:none; }

/* uiConfirm — diálogo de confirmación in-design (reemplaza confirm() nativo) */
.uic-overlay{ position:fixed; inset:0; z-index:9999; display:none; align-items:center; justify-content:center; padding:20px;
  background:rgba(20,20,45,.5); -webkit-backdrop-filter:blur(4px); backdrop-filter:blur(4px); }
.uic-overlay.open{ display:flex; animation:uic-fade .16s ease; }
@keyframes uic-fade{ from{ opacity:0; } to{ opacity:1; } }
.uic-card{ background:#fff; border-radius: 10px; padding:24px; max-width:390px; width:100%;
  box-shadow:0 20px 60px rgba(20,20,50,.28); animation:uic-pop .18s cubic-bezier(.2,.9,.3,1.25); }
@keyframes uic-pop{ from{ transform:scale(.94); opacity:0; } to{ transform:scale(1); opacity:1; } }
.uic-title{ margin:0 0 8px; font-size:18px; font-weight:800; color:var(--text-primary,#2D2D5E); line-height:1.25; }
.uic-msg{ margin:0 0 20px; font-size:14px; line-height:1.55; color:var(--text-secondary,#5A5A78); }
.uic-actions{ display:flex; gap:10px; justify-content:flex-end; }
.uic-btn{ border:1px solid transparent; border-radius: 12px; padding:11px 18px; font-size:14px; font-weight:650; cursor:pointer; font-family:inherit; transition:background .14s ease, border-color .14s ease; -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px); }
.uic-cancel{ background:rgba(var(--brand-purple-rgb,123,107,245),.05); color:var(--text-primary,#2D2D5E); border-color:#E9E9F1; }
.uic-cancel:hover{ background:rgba(var(--brand-purple-rgb,123,107,245),.09); border-color:rgba(var(--brand-purple-rgb,123,107,245),.22); }
.uic-ok{ background:rgba(var(--brand-purple-rgb,123,107,245),.12); color:var(--brand-purple-shadow,#4A3DC2); border-color:rgba(var(--brand-purple-rgb,123,107,245),.22); }
.uic-ok:hover{ background:rgba(var(--brand-purple-rgb,123,107,245),.2); }
.uic-danger{ background:rgba(214,59,59,.12); color:#B02A2A; border-color:rgba(214,59,59,.24); }
.uic-danger:hover{ background:rgba(214,59,59,.2); }
@media (prefers-reduced-motion:reduce){ .uic-overlay.open, .uic-card{ animation:none; } }

/* toast — avisos flotantes que se desvanecen solos (reemplazan banners flash) */
.tst-wrap{ position:fixed; z-index:10000; top:16px; left:50%; transform:translateX(-50%);
  display:flex; flex-direction:column; gap:10px; width:calc(100% - 32px); max-width:400px; pointer-events:none; }
@media (min-width:821px){ .tst-wrap{ left:auto; right:24px; transform:none; align-items:flex-end; } }
.tst{ pointer-events:auto; display:flex; align-items:flex-start; gap:11px; width:100%;
  background:#fff; border-radius: 10px; padding:13px 14px; box-shadow:0 10px 34px rgba(20,20,50,.18);
  border:1px solid var(--border-color,#EDEDF3); border-left:4px solid var(--tst-c,#6D5BE5);
  opacity:0; transform:translateY(-10px) scale(.98); transition:opacity .22s ease, transform .22s cubic-bezier(.2,.9,.3,1.2); }
.tst.in{ opacity:1; transform:none; }
.tst.out{ opacity:0; transform:translateY(-8px) scale(.98); }
.tst-ic{ flex-shrink:0; width:22px; height:22px; color:var(--tst-c,#6D5BE5); display:inline-flex; }
.tst-ic svg{ width:22px; height:22px; }
.tst-msg{ flex:1; font-size:14px; line-height:1.45; font-weight:600; color:var(--text-primary,#2D2D5E); padding-top:1px; }
.tst-x{ flex-shrink:0; background:none; border:0; cursor:pointer; color:var(--text-light,#9CA3B5); font-size:20px; line-height:1; padding:2px 5px; border-radius: 6px; align-self:flex-start; }
.tst-x:hover{ color:var(--text-primary,#2D2D5E); }
.tst-success{ --tst-c:#1FA97A; }
.tst-error{ --tst-c:#DC3B3B; }
.tst-warning{ --tst-c:#E0952A; }
.tst-info{ --tst-c:var(--brand-primary,#6D5BE5); }
@media (prefers-reduced-motion:reduce){ .tst{ transition:opacity .15s ease; transform:none; } .tst.in, .tst.out{ transform:none; } }

/* Grid de recursos (blog) — compartido staff + asistente */
.rc-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:16px; }
.rc-card{ display:flex; flex-direction:column; background:var(--bg-white,#fff); border:1px solid var(--border-color,#E9E9F1); border-radius: 10px; overflow:hidden; text-decoration:none; color:inherit; box-shadow:var(--shadow-sm); transition:transform .12s, box-shadow .15s, border-color .15s; }
.rc-card:hover{ transform:translateY(-3px); box-shadow:0 10px 26px rgba(30,32,48,.10); border-color:var(--brand-purple,#6D5BE5); }
.rc-img{ height:150px; background:var(--brand-purple-soft,#EEEBFB); background-size:cover; background-position:center; display:flex; align-items:center; justify-content:center; color:var(--brand-purple,#6D5BE5); }
.rc-img svg{ width:34px; height:34px; opacity:.6; }
.rc-body{ padding:14px 16px 16px; display:flex; flex-direction:column; flex:1; }
.rc-title{ font-size:15.5px; font-weight:800; line-height:1.3; color:var(--text-primary); margin:0; }
.rc-excerpt{ font-size:13px; color:var(--text-secondary); line-height:1.5; margin:8px 0 0; }
.rc-more{ display:inline-flex; align-items:center; gap:5px; font-size:12.5px; font-weight:800; color:var(--brand-purple,#6D5BE5); margin-top:12px; }

/* ===================== PERFIL (staff + asistente) — patrón tipo perfil ===================== */
.perfil-hero{ background:var(--bg-card,#fff); border:1px solid rgba(45,45,94,.06); border-radius: 10px; box-shadow:var(--shadow-card,0 8px 24px rgba(45,45,94,.08)); overflow:hidden; }
.perfil-banner{ height:128px; background:linear-gradient(120deg, var(--brand-primary,#6D5BE5), var(--brand-primary-dark,#4B3FB0)); background-size:cover; background-position:center; position:relative; }
.perfil-banner-actions{ position:absolute; top:10px; right:10px; display:flex; gap:8px; z-index:2; }
.perfil-cambtn{ display:inline-flex; align-items:center; gap:5px; cursor:pointer; font-size:12px; font-weight:700; color:#5B5D6E; background:rgba(255,255,255,.92); padding:6px 11px; border-radius: 9px; box-shadow:0 2px 6px rgba(0,0,0,.12); }
.perfil-cambtn:hover{ color:var(--brand-primary,#6D5BE5); }
.perfil-body{ padding:0 22px 20px; position:relative; z-index:1; }
.perfil-avatar{ width:92px; height:92px; border-radius: 50%; border:4px solid var(--bg-card,#fff); margin-top:-46px; background:linear-gradient(135deg,#9B8DFB,var(--brand-primary,#6D5BE5)); display:flex; align-items:center; justify-content:center; color:#fff; font-weight:800; font-size:36px; overflow:hidden; box-shadow:0 6px 18px rgba(30,32,48,.12); }
.perfil-avatar img{ width:100%; height:100%; object-fit:cover; }
.perfil-idrow{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-top:12px; flex-wrap:wrap; }
.perfil-name{ font-size:22px; font-weight:800; color:var(--text-primary,#2D2D5E); line-height:1.15; margin:0; display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.perfil-badge{ display:inline-flex; align-items:center; gap:5px; font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.4px; padding:4px 10px; border-radius: 999px; background:var(--brand-primary-soft,#EDEBFC); color:var(--brand-primary-dark,#4B3FB0); }
.perfil-meta{ display:flex; flex-wrap:wrap; gap:6px 18px; margin-top:10px; }
.perfil-meta span{ display:inline-flex; align-items:center; gap:6px; font-size:13px; color:var(--text-secondary,#6B7280); }
.perfil-meta svg{ width:15px; height:15px; opacity:.75; flex:none; }
.perfil-stats{ display:flex; gap:26px; margin-top:16px; flex-wrap:wrap; }
.perfil-stat{ display:flex; flex-direction:column; }
.perfil-stat b{ font-size:19px; font-weight:800; color:var(--text-primary,#2D2D5E); line-height:1; }
.perfil-stat span{ font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.6px; color:var(--text-light,#9CA3B5); margin-top:4px; }
.perfil-tabs{ display:flex; gap:2px; border-bottom:1px solid var(--border-color,#E9E9F1); margin:22px 0 20px; overflow-x:auto; }
.perfil-tab{ padding:11px 15px; font-size:14px; font-weight:700; color:var(--text-secondary,#6B7280); text-decoration:none; border:none; border-bottom:3px solid transparent; white-space:nowrap; cursor:pointer; background:none; font-family:inherit; }
.perfil-tab:hover{ color:var(--text-primary,#2D2D5E); }
.perfil-tab.on{ color:var(--brand-primary,#6D5BE5); border-bottom-color:var(--brand-primary,#6D5BE5); }

/* ===================== NOTICIAS (feed + composer) — compartido staff + asistente ===================== */
.nt-card{ background:var(--bg-white,#fff); border:1px solid var(--border-color,#E9E9F1); border-radius: 10px; box-shadow:var(--shadow-sm); }
.nt-composer{ padding:16px 18px; margin-bottom:22px; }
.nt-ta{ width:100%; border:none; outline:none; resize:vertical; font-family:inherit; font-size:16px; color:var(--text-primary); background:transparent; min-height:52px; }
.nt-ta::placeholder{ color:var(--text-light); }
.nt-field{ margin-top:12px; }
.nt-flabel{ font-size:12px; font-weight:800; color:var(--text-secondary); margin-bottom:8px; }
.nt-audtrigger{ display:inline-flex; align-items:center; gap:8px; padding:7px 13px; border-radius: 99px; border:1.5px solid var(--border-color,#E0E0EA); background:var(--bg-white,#fff); cursor:pointer; font-family:inherit; font-size:13px; }
.nt-audtrigger:hover{ border-color:var(--brand-purple,#6D5BE5); }
.nt-audtrigger-k{ font-weight:600; color:var(--text-light,#9CA3B5); }
.nt-audtrigger-v{ font-weight:800; color:var(--brand-purple,#6D5BE5); }
.nt-audcaret{ width:15px; height:15px; color:var(--text-light,#9CA3B5); transition:transform .18s; }
.nt-audtrigger.open .nt-audcaret{ transform:rotate(180deg); }
.nt-fieldrow{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.nt-audwrap{ position:relative; }
.nt-audclock{ width:15px; height:15px; color:var(--text-light,#9CA3B5); flex:none; }
.nt-audmenu{ position:absolute; top:calc(100% + 6px); left:0; z-index:60; min-width:230px;
  background:var(--bg-card,#fff); border:1px solid var(--border-color,#E9E9F1); border-radius: 10px;
  box-shadow:0 14px 38px rgba(30,32,48,.18); padding:6px; animation:ntMenu .14s ease; }
.nt-audmenu[hidden]{ display:none; }
@keyframes ntMenu{ from{ opacity:0; transform:translateY(-4px); } to{ opacity:1; transform:none; } }
.nt-audopt{ display:flex; align-items:center; justify-content:space-between; gap:10px; width:100%; text-align:left;
  padding:9px 11px; border:none; background:none; border-radius: 9px; font-family:inherit; font-size:14px; font-weight:600;
  color:var(--text-primary,#2D2D5E); cursor:pointer; }
.nt-audopt:hover{ background:var(--brand-primary-soft,#EDEBFC); }
.nt-audopt.on{ color:var(--brand-purple,#6D5BE5); }
.nt-audopt span{ display:inline-flex; align-items:center; gap:8px; }
.nt-check{ width:16px; height:16px; color:var(--brand-purple,#6D5BE5); flex:none; opacity:0; }
.nt-audopt.on .nt-check{ opacity:1; }
.nt-dot{ width:7px; height:7px; border-radius: 50%; background:var(--vibrant-green,#2E9E70); display:inline-block; flex:none; }
.nt-audgrupos{ margin-top:4px; padding:9px 6px 4px; border-top:1px solid var(--border-color,#EEE); }
.nt-audgrupos[hidden]{ display:none; }
.nt-audgrupos-t{ font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.6px; color:var(--text-light,#9CA3B5); padding:0 5px 7px; }
.nt-chips{ display:flex; flex-wrap:wrap; gap:7px; }
.nt-chip{ font-size:13px; font-weight:700; padding:7px 12px; border-radius: 99px; border:1.5px solid var(--border-color,#E0E0EA); color:var(--text-secondary); background:var(--bg-white,#fff); cursor:pointer; font-family:inherit; }
.nt-chip:hover{ border-color:var(--brand-purple,#6D5BE5); }
.nt-chip.on{ background:var(--brand-purple,#6D5BE5); border-color:var(--brand-purple,#6D5BE5); color:#fff; }
.nt-expiry{ display:inline-flex; width:auto; align-items:center; gap:6px; background:var(--amber-soft,#FBF0DE); border:1px solid #EBD3A6; border-radius: 99px; padding:5px 8px 5px 11px; margin-top:14px; }
.nt-expiry svg{ width:16px; height:16px; color:#C77A1E; flex:none; }
.nt-sel{ font-size:13px; font-weight:800; color:#9A5E12; background:transparent; border:none; outline:none; padding:2px 2px; font-family:inherit; cursor:pointer; }
.nt-composer-foot{ display:flex; align-items:center; justify-content:space-between; margin-top:14px; padding-top:13px; border-top:1px solid var(--border-color,#EEE); }
.nt-count{ font-size:12px; color:var(--text-light); font-variant-numeric:tabular-nums; }
.nt-tool{ width:38px; height:38px; border-radius: 10px; border:1px solid var(--border-color,#E0E0EA); background:var(--bg-white,#fff); color:var(--brand-purple,#6D5BE5); display:flex; align-items:center; justify-content:center; cursor:pointer; }
.nt-tool svg{ width:20px; height:20px; } .nt-tool:hover{ border-color:var(--brand-purple,#6D5BE5); }
.nt-preview{ position:relative; margin-top:12px; }
.nt-preview img{ width:100%; border-radius: 10px; display:block; max-height:320px; object-fit:cover; }
.nt-imgx{ position:absolute; top:8px; right:8px; width:30px; height:30px; border-radius: 99px; border:none; background:rgba(20,20,28,.6); color:#fff; font-size:18px; line-height:1; cursor:pointer; }
.nt-pub{ background:var(--brand-purple,#6D5BE5); color:#fff; border:none; font-weight:800; font-size:14.5px; padding:10px 20px; border-radius: 10px; cursor:pointer; display:inline-flex; align-items:center; gap:7px; font-family:inherit; }
.nt-pub:disabled{ opacity:.5; cursor:not-allowed; }
.nt-err{ margin-top:10px; padding:9px 12px; border-radius: 10px; background:#FBECEF; border:1px solid #F3C9CA; color:#B4282C; font-size:13px; font-weight:600; }
.nt-feed{ display:flex; flex-direction:column; gap:14px; }
.nt-post{ padding:16px 18px; }

/* --- Feed staff HORIZONTAL (solo .nt-feed-h). El portal del asistente usa el .nt-post normal. --- */
.nt-feed-h .nt-post{ padding:0; overflow:hidden; }
.nt-feed-h .nt-main{ padding:16px 18px; }
.nt-feed-h .nt-post.has-media{ display:grid; grid-template-columns:232px 1fr; align-items:stretch; }
.nt-feed-h .nt-post.has-media .nt-main{ display:flex; flex-direction:column; }
.nt-feed-h .nt-post.has-media .nt-foot{ margin-top:auto; }
.nt-feed-h .nt-thumb{ position:relative; aspect-ratio:1080/1350; background-size:cover; background-position:center; background-color:var(--brand-purple-soft,#EEEBFB); }
.nt-feed-h .nt-zoom{ position:absolute; bottom:10px; right:10px; width:34px; height:34px; border-radius: 50%; border:none; cursor:pointer;
  background:rgba(15,12,28,.5); color:#fff; display:flex; align-items:center; justify-content:center;
  -webkit-backdrop-filter:blur(4px); backdrop-filter:blur(4px); transition:background .15s, transform .12s; }
.nt-feed-h .nt-zoom:hover{ background:rgba(15,12,28,.8); transform:scale(1.06); }
.nt-feed-h .nt-zoom svg{ width:17px; height:17px; }
@media (max-width:640px){
  .nt-feed-h .nt-post.has-media{ grid-template-columns:1fr; }
  .nt-feed-h .nt-thumb{ aspect-ratio:16/10; }
}
/* Modal: imagen ampliada al hacer click en la lupa */
.nt-imgmodal{ position:fixed; inset:0; z-index:9999; display:none; align-items:center; justify-content:center; padding:24px;
  background:rgba(12,10,22,.82); -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px); }
.nt-imgmodal.open{ display:flex; }
.nt-imgmodal img{ max-width:min(1080px,92vw); max-height:90vh; border-radius: 10px; box-shadow:0 20px 60px rgba(0,0,0,.55); }
.nt-imgmodal-x{ position:absolute; top:16px; right:18px; width:44px; height:44px; border-radius: 50%; border:none; cursor:pointer;
  background:rgba(255,255,255,.16); color:#fff; font-size:24px; line-height:1; }
.nt-head{ display:flex; align-items:flex-start; gap:11px; }
.nt-av{ width:42px; height:42px; border-radius: 10px; background:var(--brand-purple,#6D5BE5); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:15px; flex:none; }
.nt-who{ flex:1; min-width:0; }
.nt-name{ font-weight:800; font-size:14.5px; display:flex; align-items:center; gap:7px; color:var(--text-primary); }
.nt-role{ font-size:9.5px; font-weight:800; letter-spacing:.4px; text-transform:uppercase; padding:2px 7px; border-radius: 99px; background:var(--brand-purple-soft,#EEEBFB); color:var(--brand-purple-shadow,#4838C9); }
.nt-role.coord{ background:var(--good-soft,#E7F5EE); color:var(--vibrant-green,#2E9E70); }
.nt-meta{ font-size:12px; color:var(--text-light); font-weight:600; margin-top:2px; display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.nt-aud{ display:inline-flex; align-items:center; font-size:11px; font-weight:800; color:var(--brand-purple,#6D5BE5); background:var(--brand-purple-soft,#EEEBFB); padding:2px 8px; border-radius: 99px; }
.nt-del{ background:none; border:none; color:var(--text-light); cursor:pointer; padding:8px; border-radius: 8px; display:inline-flex; align-items:center; justify-content:center; min-width:36px; min-height:36px; }
.nt-del:hover{ color:#B4282C; background:#FBECEF; }
.nt-body{ font-size:15px; color:var(--text-primary); margin:12px 0 0; line-height:1.55; white-space:pre-wrap; word-break:break-word; }
.nt-img{ margin-top:12px; width:100%; border-radius: 10px; display:block; }
.nt-foot{ display:flex; align-items:center; gap:12px; margin-top:14px; padding-top:12px; border-top:1px solid var(--border-color,#EEE); }
.nt-reacs{ display:flex; gap:6px; }
.nt-reac{ position:relative; display:inline-flex; align-items:center; justify-content:center; gap:5px; background:none; border:1px solid var(--border-color,#E9E9F1); border-radius: 99px; padding:5px 12px; min-height:34px; cursor:pointer; color:var(--text-secondary); font-family:inherit; transition:border-color .15s, color .15s, transform .12s; }
.nt-reac svg{ width:16px; height:16px; }
.nt-reac:hover{ border-color:var(--brand-purple,#6D5BE5); color:var(--brand-purple,#6D5BE5); }
.nt-reac:active{ transform:scale(.94); }
.nt-reac.on{ background:var(--brand-purple-soft,#EEEBFB); border-color:var(--brand-purple,#6D5BE5); color:var(--brand-purple,#6D5BE5); }
.nt-reac.on svg{ fill:currentColor; }
.nt-reac[data-tipo="amen"].on svg{ fill:none; }
@media (prefers-reduced-motion:no-preference){
  .nt-reac svg{ transition:transform .18s cubic-bezier(.34,1.56,.64,1); }
  .nt-reac:hover svg{ transform:scale(1.32) rotate(-4deg); }
  .nt-reac.pop svg{ animation:nt-pop .5s cubic-bezier(.34,1.56,.64,1); }
}
@keyframes nt-pop{ 0%{transform:scale(1);} 35%{transform:scale(1.65);} 60%{transform:scale(.85);} 100%{transform:scale(1);} }
.nt-burst{ position:absolute; top:-4px; right:6px; font-size:11px; font-weight:800; color:var(--brand-purple,#6D5BE5); pointer-events:none; animation:nt-float .72s ease-out forwards; }
@keyframes nt-float{ 0%{opacity:0; transform:translateY(2px) scale(.5);} 25%{opacity:1;} 100%{opacity:0; transform:translateY(-18px) scale(1.15);} }
.nt-rc{ font-size:12px; font-weight:800; font-variant-numeric:tabular-nums; }
.nt-ttl{ margin-left:auto; display:inline-flex; align-items:center; gap:5px; font-size:12px; font-weight:700; color:var(--text-light); }
.nt-ttl svg{ width:14px; height:14px; }
.nt-ttl.warn{ color:#C77A1E; }

/* ===================== VIDEOS (YouTube) — compartido staff + asistente ===================== */
.vid-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:18px; }
.vid-card{ background:var(--bg-white,#fff); border:1px solid var(--border-color,#E9E9F1); border-radius: 10px; overflow:hidden; box-shadow:var(--shadow-sm); display:flex; flex-direction:column; transition:transform .12s, box-shadow .15s, border-color .15s; }
.vid-card:hover{ transform:translateY(-3px); box-shadow:0 10px 26px rgba(30,32,48,.10); border-color:var(--brand-purple,#6D5BE5); }
.vid-thumb{ position:relative; width:100%; aspect-ratio:16/9; border:none; padding:0; background:#E7E7F0 center/cover no-repeat; cursor:pointer; display:block; }
.vid-thumb::after{ content:""; position:absolute; inset:0; background:rgba(0,0,0,.12); opacity:0; transition:opacity .15s; }
.vid-thumb:hover::after{ opacity:1; }
.vid-play{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; z-index:1; }
.vid-play svg{ width:58px; height:auto; filter:drop-shadow(0 3px 8px rgba(0,0,0,.35)); transition:transform .15s; }
.vid-thumb:hover .vid-play svg{ transform:scale(1.08); }
.vid-frame{ width:100%; aspect-ratio:16/9; border:none; display:block; }
.vid-body{ padding:12px 14px 14px; }
.vid-title{ font-size:14.5px; font-weight:800; line-height:1.32; color:var(--text-primary); margin:0; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.vid-meta{ font-size:12px; color:var(--text-light); margin-top:6px; display:flex; align-items:center; gap:6px; }
.vid-meta .dotsep{ width:3px; height:3px; border-radius: 50%; background:currentColor; display:inline-block; }
/* Shorts: feed en UNA sola columna, tipo Instagram/TikTok */
.vid-feed{ display:flex; flex-direction:column; align-items:center; gap:18px; }
.vid-shot{ width:100%; max-width:340px; }
.vid-shot-thumb{ position:relative; width:100%; aspect-ratio:9/16; border-radius: 10px; overflow:hidden; border:none; padding:0; cursor:pointer; background:#E7E7F0 center/cover no-repeat; display:block; box-shadow:0 6px 22px rgba(30,32,48,.12); }
.vid-shot-thumb::after{ content:""; position:absolute; inset:0; background:linear-gradient(to top, rgba(0,0,0,.35), transparent 42%); pointer-events:none; }
.vid-reel-play{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; z-index:1; opacity:.95; transition:transform .15s; }
.vid-reel-play svg{ width:58px; height:58px; }
.vid-shot-thumb:hover .vid-reel-play{ transform:scale(1.1); }
.vid-reel-frame{ width:100%; max-width:340px; aspect-ratio:9/16; border:none; border-radius: 10px; display:block; margin:0 auto; }
.vid-more-hidden{ display:none !important; }

/* Visor inmersivo de Shorts (tipo TikTok/Reels): pantalla completa, swipe vertical con snap */
.sv-overlay{ position:fixed; inset:0; z-index:300; background:#000; }
.sv-overlay[hidden]{ display:none; }
.sv-track{ height:100%; height:100dvh; overflow-y:scroll; scroll-snap-type:y mandatory; -webkit-overflow-scrolling:touch; scrollbar-width:none; }
.sv-track::-webkit-scrollbar{ display:none; }
.sv-slide{ height:100%; height:100dvh; scroll-snap-align:start; scroll-snap-stop:always; display:flex; align-items:center; justify-content:center; }
.sv-player{ position:relative; width:100%; height:100%; max-width:min(460px, calc(100dvh * 9 / 16)); max-height:100dvh; aspect-ratio:9/16; background:#000 center/cover no-repeat; }
.sv-player iframe{ position:absolute; inset:0; width:100%; height:100%; border:0; }
.sv-play-hint{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; pointer-events:none; }
.sv-play-hint svg{ width:64px; height:64px; opacity:.9; filter:drop-shadow(0 3px 8px rgba(0,0,0,.4)); }
.sv-btn{ position:fixed; z-index:310; background:rgba(20,20,24,.5); color:#fff; border:none; border-radius: 99px; cursor:pointer; -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px); display:inline-flex; align-items:center; justify-content:center; }
.sv-close{ top:14px; right:14px; width:44px; height:44px; }
.sv-close svg{ width:22px; height:22px; }
.sv-sound{ bottom:22px; right:16px; padding:10px 15px; font-size:13px; font-weight:700; gap:7px; }
.sv-sound svg{ width:18px; height:18px; }
.sv-hintswipe{ position:fixed; left:0; right:0; bottom:78px; z-index:305; text-align:center; color:rgba(255,255,255,.85); font-size:12.5px; font-weight:700; pointer-events:none; text-shadow:0 1px 4px rgba(0,0,0,.5); transition:opacity .4s; }
@media (max-width:820px){
  .fam-sidebar{ width:264px; transform:translateX(-100%); box-shadow:0 0 40px rgba(0,0,0,.18); }
  .fam-sidebar.open{ transform:translateX(0); }
  .fam-mainwrap{ margin-left:0; }
  .fam-page{ padding:18px 16px 44px; }
  .fam-mobilebar{ display:flex; align-items:center; gap:12px; padding:12px 16px; position:sticky; top:0; z-index:40;
    background:rgba(255,255,255,.82); -webkit-backdrop-filter:blur(18px); backdrop-filter:blur(18px); border-bottom:1px solid var(--border-color,#E9E9F1); }
  .fam-hamb{ background:none; border:none; cursor:pointer; color:var(--text-primary,#2D2D5E); padding:4px; display:inline-flex; }
  .fam-hamb svg{ width:24px; height:24px; }
  .fam-scrim{ position:fixed; inset:0; background:rgba(20,20,28,.4); z-index:55; display:none; }
  .fam-scrim.on{ display:block; }
}

/* ===== Mosaico de personas (Equipo + Asistentes) — compartido ===== */
.vol-mosaic { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.vol-tile { transition: transform .12s ease, box-shadow .15s ease; position: relative; }
.vol-tile:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(45,45,94,0.12); }
.vol-tile-banner { height: 76px; background-size: cover; background-position: center; position: relative; }
.vol-tile-av { width: 72px; height: 72px; border-radius: 50%; margin: -38px auto 0; border: 3px solid #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.12); position: relative; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 28px; overflow: hidden; }
.vol-tile-av img { width: 100%; height: 100%; object-fit: cover; }
.vol-tile-body { text-align: center; padding: 10px 16px 18px; }
.vol-tile-name { font-weight: 800; font-size: 16px; color: var(--text-ink, #1E2030); line-height: 1.2; margin-bottom: 6px; }
.vol-tile-estado { position: absolute; top: 10px; right: 10px; font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; padding: 3px 8px; border-radius: 100px; background: rgba(255,255,255,0.92); }
.vol-tile-estado.on { color: #1F8A7A; }
.vol-tile-estado.off { color: #9CA3B5; }
.vol-tile-edit { position: absolute; top: 8px; left: 10px; width: 30px; height: 30px; border-radius: 9px; border: none; background: rgba(255,255,255,0.9); color: #5B5D6E; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,0.12); }
.vol-tile-edit:hover { background: #fff; color: var(--brand-purple, #6D5BE5); }

/* ===== Botón líquido (Uiverse by pandey_saurav_) — teñido con el branding ===== */
.liquid-button{
  --button-color: var(--brand-primary, #6D5BE5);
  --button-outline: var(--brand-primary-dark, #5544c4);
  --button-text: #fff;
  /* Mismo tamaño y tipografía que .btn3d */
  position:relative; display:inline-flex; align-items:center; justify-content:center; gap:8px;
  font-family:inherit; font-weight:700; font-size:14px; letter-spacing:.01em; line-height:1;
  padding:14px 26px; min-height:44px; border:0; outline:none; border-radius: 10px; cursor:pointer;
  color:var(--button-text); background:var(--button-color); overflow:hidden; text-decoration:none;
  box-shadow:0 .3em .6em rgba(0,0,0,.18);
  transition:transform .16s cubic-bezier(.4,0,.2,1), box-shadow .16s cubic-bezier(.4,0,.2,1);
}
/* La letra SIEMPRE blanca (evita que a:hover global la tiña y se pierda). */
.liquid-button, .liquid-button:hover, .liquid-button:focus, .liquid-button:active, .liquid-button:visited{ color:var(--button-text); }
.liquid-button > span, .liquid-button > span svg{ color:var(--button-text); }
.liquid-button:hover, .liquid-button:focus{ transform:translateY(-2px); box-shadow:0 .5em 1em rgba(0,0,0,.26); }
.liquid-button::before, .liquid-button::after{
  content:""; position:absolute; inset:0;
  background:var(--button-outline); z-index:0; transition:.5s ease; border-radius: 10px;
}
/* Radio FIJO grande: cubre el botón completo sea cual sea su ancho (antes en %
   se quedaba corto con textos largos y se veía el "corte"). */
.liquid-button::before{ clip-path:circle(0 at 0% 50%); }
.liquid-button:hover::before, .liquid-button:focus::before{ clip-path:circle(600px at 0% 50%); }
.liquid-button::after{ clip-path:circle(0 at 100% 50%); }
.liquid-button:hover::after, .liquid-button:focus::after{ clip-path:circle(600px at 100% 50%); transition-delay:.18s; }
.liquid-button > span{ position:relative; z-index:2; display:inline-flex; align-items:center; gap:7px; }
.liquid-button:active{ transform:translateY(0); box-shadow:0 .2em .4em rgba(0,0,0,.2); }
.liquid-button .bubble{ position:absolute; background:rgba(255,255,255,.3); border-radius: 50%; transform:scale(0); transition:.5s ease-out; z-index:1; }
.liquid-button .bubble:nth-child(1){ top:10%; left:10%; width:1.5em; height:1.5em; }
.liquid-button .bubble:nth-child(2){ top:40%; left:30%; width:1em; height:1em; transition-delay:.1s; }
.liquid-button .bubble:nth-child(3){ top:20%; right:20%; width:1.2em; height:1.2em; transition-delay:.2s; }
.liquid-button .bubble:nth-child(4){ bottom:15%; left:40%; width:.8em; height:.8em; transition-delay:.3s; }
.liquid-button:hover .bubble, .liquid-button:focus .bubble{ transform:scale(1); }

/* liquid-button -> "calm": tinte translúcido del branding, sin relleno sólido ni efecto líquido */
.liquid-button{ background:rgba(var(--brand-purple-rgb,123,107,245),.12) !important; border:1px solid rgba(var(--brand-purple-rgb,123,107,245),.22) !important; border-radius:12px !important; box-shadow:none !important; -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px); font-weight:650; }
.liquid-button, .liquid-button:hover, .liquid-button:focus, .liquid-button:active, .liquid-button:visited{ color:var(--brand-purple-shadow,#4A3DC2) !important; }
.liquid-button > span, .liquid-button > span svg{ color:var(--brand-purple-shadow,#4A3DC2) !important; }
.liquid-button:hover, .liquid-button:focus{ background:rgba(var(--brand-purple-rgb,123,107,245),.2) !important; transform:translateY(-1px); box-shadow:0 6px 16px rgba(var(--brand-purple-rgb,123,107,245),.16) !important; }
.liquid-button::before, .liquid-button::after, .liquid-button .bubble{ display:none !important; }


/* ===== Lista pro de personas por rol (Equipo + Asistentes) ===== */
  .eq-wrap{ max-width:820px; margin:0 auto; padding:8px 4px 40px; }
  /* Tarjetas de rol */
  .eq-roles{ display:grid; grid-template-columns:1fr; gap:14px; margin-top:6px; }
  @media (min-width:620px){ .eq-roles{ grid-template-columns:repeat(3,1fr); } }
  .eq-role{ --a:var(--brand-primary,#6D5BE5); --as:var(--brand-primary-soft,#EEEBFB); position:relative; text-align:left; background:linear-gradient(135deg, rgba(255,255,255,.72), rgba(255,255,255,.48)); border:1px solid rgba(255,255,255,.6); border-radius: 16px; padding:20px; cursor:pointer; overflow:hidden; box-shadow:0 10px 30px rgba(40,40,80,.10), inset 0 1px 0 rgba(255,255,255,.7); -webkit-backdrop-filter:blur(18px) saturate(1.25); backdrop-filter:blur(18px) saturate(1.25); transition:transform .16s, box-shadow .2s, border-color .2s; font:inherit; color:inherit; }
  .eq-role.coord{ --a:var(--brand-purple,#6D5BE5); --as:var(--brand-purple-soft,#EEEBFB); }
  .eq-role.vol{ --a:var(--brand-mint,#2E9E70); --as:var(--brand-mint-soft,#E4F5EE); }
  .eq-role.asis{ --a:var(--brand-blue,#3B6FD6); --as:var(--brand-blue-soft,#EAF1FE); }
  .eq-role:hover{ transform:translateY(-4px); border-color:color-mix(in srgb, var(--a) 40%, transparent); box-shadow:0 18px 40px rgba(40,40,80,.14), inset 0 1px 0 rgba(255,255,255,.7); }
  /* raya superior EN DEGRADADO (se desvanece hacia la derecha) */
  .eq-role::after{ content:""; position:absolute; inset:0 0 auto 0; height:5px; background:linear-gradient(90deg, var(--a) 0%, color-mix(in srgb, var(--a) 35%, transparent) 60%, color-mix(in srgb, var(--a) 4%, transparent) 100%); }
  .eq-role-top{ display:flex; align-items:center; justify-content:space-between; }
  .eq-role-n{ font-size:34px; font-weight:850; letter-spacing:-.02em; color:var(--text-ink,#242449); font-variant-numeric:tabular-nums; }
  .eq-role-ic{ width:46px; height:46px; border-radius: 10px; display:flex; align-items:center; justify-content:center; background:var(--as); color:var(--a); }
  .eq-role-label{ font-size:16px; font-weight:850; margin-top:10px; color:var(--text-ink,#242449); }
  .eq-role-desc{ font-size:12.5px; color:var(--text-soft,#8A8B99); margin-top:2px; }
  .eq-role-foot{ display:flex; align-items:center; justify-content:space-between; margin-top:16px; }
  .eq-avstack{ display:flex; }
  .eq-mini{ width:28px; height:28px; border-radius: 50%; margin-left:-9px; border:2px solid var(--bg-card,#fff); background-size:cover; background-position:center; display:flex; align-items:center; justify-content:center; font-size:10px; font-weight:800; color:#fff; }
  .eq-mini:first-child{ margin-left:0; }
  .eq-mini.coord{ background-color:#6D5BE5; } .eq-mini.vol{ background-color:#2E9E70; } .eq-mini.asis{ background-color:#3B6FD6; }
  .eq-mini.more{ background:var(--border-color,#ECECF3); color:var(--text-soft,#8A8B99); }
  .eq-go{ display:inline-flex; align-items:center; gap:4px; font-size:12.5px; font-weight:800; color:var(--a); }

  /* Detalle */
  .eq-back{ display:inline-flex; align-items:center; gap:7px; background:var(--bg-card,#fff); border:1px solid var(--border-color,#ECECF3); color:var(--text-ink,#242449); border-radius: 999px; padding:9px 15px; font-size:13px; font-weight:800; cursor:pointer; box-shadow:0 8px 22px rgba(40,40,80,.08); }
  .eq-dhead{ display:flex; align-items:center; gap:14px; margin:18px 0 4px; }
  .eq-dic{ width:44px; height:44px; border-radius: 10px; display:flex; align-items:center; justify-content:center; flex:none; }
  .eq-dhead h2{ font-size:24px; font-weight:850; letter-spacing:-.02em; margin:0; color:var(--text-ink,#242449); }
  .eq-cnt{ color:var(--text-soft,#8A8B99); font-size:13.5px; }
  .eq-search{ display:flex; align-items:center; gap:9px; background:var(--bg-card,#fff); border:1.5px solid var(--border-color,#ECECF3); border-radius: 10px; padding:11px 14px; margin:16px 0 14px; }
  .eq-search input{ border:0; background:none; outline:none; font:inherit; font-size:14.5px; color:var(--text-ink,#242449); width:100%; }
  .eq-search svg{ color:var(--text-soft,#8A8B99); flex:none; }
  .eq-list{ display:flex; flex-direction:column; gap:10px; }
  .eq-row{ position:relative; display:flex; align-items:center; gap:14px; background:linear-gradient(135deg, rgba(255,255,255,.72), rgba(255,255,255,.48)); border:1px solid rgba(255,255,255,.6); border-radius: 16px; padding:13px 16px 13px 20px; box-shadow:0 10px 28px rgba(40,40,80,.10), inset 0 1px 0 rgba(255,255,255,.7); -webkit-backdrop-filter:blur(18px) saturate(1.25); backdrop-filter:blur(18px) saturate(1.25); transition:transform .14s, box-shadow .2s, border-color .2s; cursor:pointer; overflow:hidden; }
  .eq-row:hover{ transform:translateY(-2px); box-shadow:0 16px 34px rgba(40,40,80,.14), inset 0 1px 0 rgba(255,255,255,.7); border-color:color-mix(in srgb, var(--a) 40%, transparent); }
  .eq-row-bg{ position:absolute; inset:-24px; background-size:cover; background-position:center; filter:blur(18px) saturate(1.25); opacity:.32; z-index:0; }
  .eq-row-veil{ position:absolute; inset:0; background:var(--bg-card,#fff); opacity:.45; z-index:0; }
  .eq-row > .eq-rc{ position:relative; z-index:1; }
  /* riel de color EN DEGRADADO (se desvanece hacia abajo) */
  .eq-row::before{ content:""; position:absolute; left:0; top:0; bottom:0; width:5px; background:linear-gradient(180deg, var(--a) 0%, color-mix(in srgb, var(--a) 45%, transparent) 50%, color-mix(in srgb, var(--a) 6%, transparent) 100%); z-index:2; }
  .eq-av{ width:48px; height:48px; border-radius: 10px; background-size:cover; background-position:center; display:flex; align-items:center; justify-content:center; color:#fff; font-weight:850; font-size:17px; flex:none; }
  .eq-main{ flex:1; min-width:0; }
  .eq-name{ font-size:15.5px; font-weight:800; color:var(--text-ink,#242449); display:flex; align-items:center; gap:8px; }
  .eq-lead{ font-size:9.5px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; color:var(--a); background:var(--as); padding:2px 7px; border-radius: 999px; }
  .eq-sub{ font-size:12.5px; color:var(--text-soft,#8A8B99); margin-top:2px; display:flex; align-items:center; gap:6px; }
  .eq-dot{ width:6px; height:6px; border-radius: 50%; display:inline-block; }
  .eq-stat{ text-align:right; flex:none; }
  .eq-stat b{ font-size:17px; font-weight:850; font-variant-numeric:tabular-nums; color:var(--text-ink,#242449); }
  .eq-stat span{ display:block; font-size:10px; color:var(--text-soft,#8A8B99); text-transform:uppercase; letter-spacing:.04em; }
  .eq-chev{ color:var(--text-soft,#8A8B99); flex:none; }
  .eq-empty{ text-align:center; color:var(--text-soft,#8A8B99); padding:40px; }
  #eqDetail[hidden], #eqLanding[hidden]{ display:none; }

/* ============================================================
   BOTÓN FLOTANTE "VERSÍCULO" — botón CIRCULAR con SVG (estilo glass
   del branding). Todo anidado bajo .versiculo-fab; tooltip a la
   derecha para no salirse de pantalla. Accesible + reduced-motion.
   ============================================================ */
.versiculo-fab{
  position:fixed; right:24px; bottom:24px;
  bottom:calc(24px + env(safe-area-inset-bottom, 0px));
  z-index:9999;
}
.versiculo-fab .vf-btn{
  position:relative; isolation:isolate; cursor:pointer;
  width:56px; height:56px; border-radius:50%;
  display:grid; place-items:center;
  color:var(--brand-purple-shadow,#4A3DC2);
  background:color-mix(in srgb, var(--brand-purple,#6D5BE5) 15%, #ffffff);
  border:1px solid color-mix(in srgb, var(--brand-purple,#6D5BE5) 30%, transparent);
  box-shadow:0 8px 22px rgba(40,40,80,.16), inset 0 1px 0 rgba(255,255,255,.6);
  -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px);
  transition:transform .22s cubic-bezier(.23,1,.32,1), box-shadow .22s ease, background .22s ease;
  -webkit-tap-highlight-color:transparent;
}
.versiculo-fab .vf-ic{ width:26px; height:26px; display:block; }
.versiculo-fab .vf-btn:hover,
.versiculo-fab .vf-btn:focus-visible,
.versiculo-fab .vf-btn.is-open{
  transform:translateY(-3px) scale(1.06);
  background:color-mix(in srgb, var(--brand-purple,#6D5BE5) 24%, #ffffff);
  box-shadow:0 14px 30px rgba(var(--brand-purple-rgb,123,107,245),.30), inset 0 1px 0 rgba(255,255,255,.7);
  outline:none;
}
.versiculo-fab .vf-btn:focus-visible{
  box-shadow:0 14px 30px rgba(var(--brand-purple-rgb,123,107,245),.30), 0 0 0 3px rgba(var(--brand-purple-rgb,123,107,245),.35);
}
/* Tooltip con el versículo — alineado a la DERECHA para no salirse */
.versiculo-fab .tooltip{
  --background:#333333; --color:#e8e8e8;
  position:absolute; bottom:calc(100% + 14px); right:0; left:auto;
  width:300px; max-width:80vw; padding:.9em 1.1em; opacity:0; pointer-events:none;
  background:var(--background); color:var(--color); z-index:5; border-radius:12px;
  transform:scale(0); transform-origin:100% 100%;
  transition:all .35s cubic-bezier(.23,1,.32,1);
  text-transform:none; text-align:left; font-weight:400; font-size:15px; line-height:1.55; letter-spacing:0;
  box-shadow:rgba(0,0,0,.25) 0 8px 15px;
}
.versiculo-fab .tooltip::before{
  position:absolute; content:""; height:.7em; width:.7em; bottom:-.32em;
  left:auto; right:20px; transform:rotate(45deg); background:var(--background);
}
.versiculo-fab .cita{ display:block; }
.versiculo-fab .ref{ display:block; margin-top:.6em; font-size:13px; font-weight:600; opacity:.75; }
.versiculo-fab .vf-btn:hover .tooltip,
.versiculo-fab .vf-btn:focus-visible .tooltip,
.versiculo-fab .vf-btn.is-open .tooltip{
  opacity:1; pointer-events:auto; transform:scale(1);
}
/* En el portal del asistente, súbelo por encima del menú inferior (≤820px) */
@media (max-width:820px){
  .versiculo-fab--asis{ bottom:calc(88px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width:480px){
  .versiculo-fab .vf-btn{ width:52px; height:52px; }
  .versiculo-fab .vf-ic{ width:24px; height:24px; }
  .versiculo-fab .tooltip{ max-width:calc(100vw - 48px); }
}
@media (prefers-reduced-motion:reduce){
  .versiculo-fab .vf-btn,
  .versiculo-fab .tooltip{ transition-duration:.01ms; }
}

