/* RegioEmpresarios — Identidad institucional (rojo) */
:root {
  --re-primary: #C8102E;
  --re-primary-dark: #9F0D24;
  --re-primary-hover: #A30F23;
  --re-secondary-red: #DC2626;
  --re-accent: var(--re-primary);
  --re-accent-hover: var(--re-primary-hover);
  --re-accent-muted: rgba(200, 16, 46, 0.12);
  --re-hover: rgba(255, 255, 255, 0.12);
  --re-bg-hover-strong: rgba(255, 255, 255, 0.18);
  --re-text-primary: #111827;
  --re-text-secondary: #4B5563;
  --re-text-on-red: #FFFFFF;
  --re-borde: #E5E7EB;
  --re-border-strong: #D1D5DB;

  --re-bg-base: #F8FAFC;
  --re-bg-elevated: #FFFFFF;
  --re-bg-surface: #FFFFFF;
  --re-bg-hover: #F3F4F6;
  --re-gradient-main: #F8FAFC;
  --re-gradient-sidebar: linear-gradient(180deg, #C8102E 0%, #9F0D24 100%);
  --re-card-glass: #FFFFFF;

  --re-blanco: #FFFFFF;
  --re-fondo: var(--re-bg-base);
  --re-texto: var(--re-text-primary);
  --re-texto-suave: var(--re-text-secondary);
  --re-accent-fg: var(--re-text-on-red);
  --re-rojo: var(--re-primary);
  --re-rojo-oscuro: var(--re-primary-dark);
  --re-negro: #111827;
  --re-accent-rgb: 200, 16, 46;

  --re-card-premium-bg: #FFFFFF;
  --re-card-premium-bg-hover: #FFFFFF;
  --re-card-premium-border: var(--re-borde);
  --re-card-premium-shadow: 0 4px 18px rgba(17, 24, 39, 0.08);

  --re-transition: all 0.25s ease;
  --re-transition-sidebar: all 0.3s ease;
  --sidebar-width: 272px;
  --sidebar-width-mobile: 280px;
  --sidebar-width-compact: 76px;
  --shadow-sm: 0 2px 12px rgba(17, 24, 39, 0.06);
  --shadow-card: 0 8px 24px rgba(17, 24, 39, 0.08);
  --shadow-card-hover: 0 12px 28px rgba(200, 16, 46, 0.18);
  --shadow-accent: 0 8px 22px rgba(200, 16, 46, 0.22);
  --radius: 16px;
  --radius-btn: 10px;
  --radius-sm: 12px;
  --space-page: 1.75rem;
  --space-card: 1.35rem;
  color-scheme: light;
}

@import url('responsive.css?v=20260611b');
@import url('theme-institutional-red.css');

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 0.9375rem;
  line-height: 1.55;
  background: var(--re-bg-base);
  color: var(--re-text-primary);
  margin: 0;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  transition: var(--re-transition);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--re-text-primary);
  letter-spacing: -0.02em;
}

.page-body > p,
.page-body .lead {
  color: var(--re-text-secondary);
}

.page-body h6 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--re-text-secondary);
  letter-spacing: 0.01em;
}

/* ----- Login ----- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--re-gradient-main);
  padding: 1.5rem;
}

.login-card {
  background: #ffffff;
  border: 1px solid var(--re-borde);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  max-width: 420px;
  width: 100%;
  padding: 2.5rem 2rem;
  color: var(--re-texto);
  transition: var(--re-transition);
}

.login-logo img { max-width: 200px; height: auto; margin-bottom: 1rem; }
.login-logo h1 { font-size: 1.25rem; font-weight: 700; margin: 0; }
.login-logo p { color: var(--re-texto-suave); font-size: 0.9rem; margin: 0.35rem 0 0; }
.login-logo h1 { color: var(--re-texto); }

.login-card-brand {
  text-align: left;
  margin-bottom: 0.25rem;
}

.login-card-tagline {
  font-size: 0.9rem;
}

.re-brand-wrap--login {
  justify-content: flex-start;
  align-items: flex-start;
  min-height: auto;
  width: 100%;
}

.re-brand-logo--login {
  display: block;
  max-width: 220px;
  width: auto;
  height: auto;
  max-height: 72px;
  object-fit: contain;
  background: transparent;
}

.re-login-logo {
  width: 100%;
}

/* Identidad visual — simulaciones de contexto */
.re-brand-mock-login {
  background: #eef0f3;
  padding: 1.5rem;
  border-radius: 12px;
  min-height: 220px;
}

.re-brand-mock-login__card {
  background: #ffffff;
  border: 1px solid var(--re-borde);
  border-radius: 16px;
  padding: 1.35rem 1.5rem;
  max-width: 380px;
  margin: 0 auto;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.06);
}

.re-brand-mock-sidebar {
  background: var(--re-gradient-sidebar);
  color: var(--re-text-on-red);
  border-radius: 12px;
  padding: 1.35rem 1.15rem 1.15rem;
  max-width: 280px;
  min-height: 200px;
  box-shadow: 4px 0 24px rgba(159, 13, 36, 0.35);
}

.re-brand-mock-email {
  background: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 1.25rem;
  max-width: 420px;
}

.re-brand-mock-favicon {
  background: #f8f9fa;
  min-height: 64px;
}

.re-brand-slot-current,
.re-brand-slot-pending {
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.sidebar {
  width: var(--sidebar-width);
  background: var(--re-gradient-sidebar);
  color: var(--re-text-on-red);
  flex-shrink: 0;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: var(--re-z-sidebar, 1040);
  display: flex;
  flex-direction: column;
  transition: var(--re-transition-sidebar);
  box-shadow: 4px 0 24px rgba(159, 13, 36, 0.35);
  border-right: none;
  will-change: transform, width;
}

.sidebar-brand,
.re-brand-home-link {
  cursor: pointer;
}

.sidebar-brand {
  padding: 1.35rem 1.15rem 1.15rem;
  border-bottom: 1px solid var(--re-borde);
  display: block;
  text-decoration: none;
  flex-shrink: 0;
}

.re-brand-home-link:hover {
  opacity: 0.92;
}

.sidebar-logo-img {
  width: 100%;
  max-width: 200px;
  height: auto;
  max-height: 56px;
  object-fit: contain;
  display: block;
  background: transparent;
}

.sidebar-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0.65rem 0.5rem;
  display: block;
  visibility: visible;
  -webkit-overflow-scrolling: touch;
}

.sidebar-footer,
.sidebar-user-block {
  flex-shrink: 0;
}

.nav-section-label {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.sidebar-nav .nav-link {
  color: rgba(255, 255, 255, 0.92);
  padding: 0.7rem 1rem;
  margin: 0.15rem 0.5rem;
  border-radius: var(--radius-btn);
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--re-transition);
}

.sidebar-nav .nav-link:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--re-text-on-red);
}

.sidebar-nav .nav-link.active {
  background: #ffffff;
  color: var(--re-primary);
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.sidebar-nav .nav-link.active i {
  color: var(--re-primary);
}

.sidebar-nav .nav-link-highlight {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.sidebar-nav .nav-link-highlight.active {
  background: #ffffff;
  color: var(--re-primary);
}

.sidebar-nav .nav-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0.5rem 1rem;
}

.sidebar-footer {
  padding: 1rem 1.15rem;
  font-size: 0.75rem;
  opacity: 0.8;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.main-content {
  flex: 1;
  margin-left: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: var(--re-transition-sidebar);
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Móvil/tablet: sidebar fuera de pantalla hasta abrir menú */
@media (max-width: 1023.98px) {
  .sidebar:not(.open) {
    transform: translate3d(-105%, 0, 0) !important;
    visibility: hidden;
    pointer-events: none;
  }

  .sidebar.open {
    transform: translate3d(0, 0, 0) !important;
    visibility: visible;
    pointer-events: auto;
  }

  .main-content {
    margin-left: 0 !important;
    width: 100%;
    max-width: 100%;
  }
}

@media (min-width: 1024px) {
  .main-content {
    margin-left: var(--sidebar-width);
    width: auto;
  }

  body.re-sidebar-mode-compact .main-content {
    margin-left: var(--sidebar-width-compact);
  }

  body.re-sidebar-mode-hidden .main-content {
    margin-left: 0 !important;
  }
}

.topbar {
  background: var(--re-bg-elevated);
  border-bottom: 1px solid var(--re-borde);
  padding: 1rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  transition: var(--re-transition);
}

.topbar h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.03em;
  color: var(--re-text-primary);
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--re-text-secondary);
}

.topbar-user .avatar.re-avatar,
.topbar-user .re-avatar.re-avatar-sm {
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  border-radius: 50%;
  border: 1px solid var(--re-borde);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.8rem;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.topbar-user .re-avatar.re-avatar-sm:not(.re-avatar-has-img) {
  background-color: var(--re-accent-muted);
  background-image: none;
  color: var(--re-primary);
}

.topbar-user .re-avatar.re-avatar-sm.re-avatar-has-img {
  background-color: #e9ecef;
  color: transparent;
}

.page-body {
  padding: var(--space-page);
  flex: 1;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* ----- Buttons ----- */
.btn-re {
  background: var(--re-primary);
  border: none;
  color: var(--re-text-on-red);
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.6rem 1.35rem;
  transition: var(--re-transition);
  box-shadow: var(--shadow-accent);
}

.btn-re:hover,
.btn-re:focus {
  background: var(--re-primary-hover);
  color: var(--re-text-on-red);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(200, 16, 46, 0.28);
}

.btn-outline-re {
  color: var(--re-primary);
  border: 1px solid var(--re-primary);
  border-radius: var(--radius-btn);
  font-weight: 600;
  background: #ffffff;
  transition: var(--re-transition);
}

.btn-outline-re:hover {
  background: rgba(200, 16, 46, 0.06);
  color: var(--re-primary-dark);
  border-color: var(--re-primary-dark);
}

.btn-lg-re {
  padding: 0.85rem 1.75rem;
  font-size: 1rem;
  border-radius: 12px;
}

/* ----- Cards ----- */
.card-re {
  background: var(--re-card-premium-bg);
  border-radius: var(--radius);
  box-shadow: var(--re-card-premium-shadow);
  border: 1px solid var(--re-card-premium-border);
  margin-bottom: 1.25rem;
  overflow: hidden;
  transition: var(--re-transition);
  color: var(--re-text-primary);
}

.card-re:hover {
  border-color: var(--re-border-strong);
}

.card-re .card-header {
  background: #fafafa;
  border-bottom: 1px solid var(--re-borde);
  padding: 1.15rem var(--space-card);
  font-weight: 600;
  font-size: 1rem;
  color: var(--re-text-primary);
}

.card-re .card-body {
  padding: var(--space-card);
}

.stat-card {
  background: #ffffff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: var(--space-card);
  min-height: 0;
  height: auto;
  border: 1px solid var(--re-borde);
  transition: var(--re-transition);
  color: var(--re-text-primary);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(200, 16, 46, 0.2);
}

.stat-card .stat-value {
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  font-weight: 700;
  color: var(--re-text-primary);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.stat-card .stat-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--re-text-secondary);
  margin-top: 0.35rem;
}

.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--re-accent-muted);
  color: var(--re-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.stat-card .stat-value.text-success {
  color: #34d399 !important;
}

/* ----- Hero Invitar (dashboard) ----- */
.hero-invitar {
  background: linear-gradient(135deg, #c8102e 0%, #9f0d24 100%);
  border-radius: var(--radius);
  padding: 2rem 2.25rem;
  color: #ffffff;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  box-shadow: 0 10px 32px rgba(200, 16, 46, 0.28);
  transition: transform 0.2s, box-shadow 0.2s;
  margin-bottom: 1.75rem;
  border: none;
  width: 100%;
  text-align: left;
}

.hero-invitar:hover {
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(200, 16, 46, 0.35);
}

.hero-invitar .hero-icon {
  width: 64px;
  height: 64px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.hero-invitar h3 { font-size: 1.5rem; font-weight: 700; margin: 0 0 0.35rem; }
.hero-invitar p { margin: 0; opacity: 0.92; font-size: 0.95rem; }

.hero-invitar .hero-cta {
  background: var(--re-blanco);
  color: var(--re-rojo);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-btn);
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
}

/* ----- Hero Asistencia (dashboard) ----- */
.hero-asistencia {
  cursor: pointer;
  background: linear-gradient(135deg, #1F1F1F 0%, #3d3d3d 100%);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  color: var(--re-blanco);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s, box-shadow 0.2s;
  margin-bottom: 1rem;
  width: 100%;
  text-align: left;
  border: 2px solid var(--re-rojo);
}

.hero-asistencia:hover {
  color: var(--re-blanco);
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(var(--re-accent-rgb), 0.25);
}

.hero-asistencia:focus-visible {
  outline: 2px solid var(--re-blanco);
  outline-offset: 3px;
}

.hero-asistencia .hero-icon {
  width: 64px;
  height: 64px;
  background: var(--re-rojo);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
}

.hero-asistencia h3 { font-size: 1.35rem; font-weight: 700; margin: 0 0 0.25rem; }
.hero-asistencia p { margin: 0; opacity: 0.85; font-size: 0.88rem; }

.hero-asistencia .hero-cta {
  background: var(--re-rojo);
  color: var(--re-blanco);
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-btn);
  font-weight: 700;
  font-size: 1rem;
}

.hero-asistencia.hero-asistencia-muted {
  border-color: var(--re-borde);
  background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 100%);
  color: var(--re-texto);
  box-shadow: var(--shadow-card);
}

.hero-asistencia.hero-asistencia-muted .hero-icon {
  background: #999;
}

.hero-asistencia.hero-asistencia-muted .hero-cta {
  background: var(--re-texto-suave);
  color: var(--re-blanco);
}

.meeting-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #2e7d32;
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}

.meeting-live-badge .pulse {
  width: 8px;
  height: 8px;
  background: #a5d6a7;
  border-radius: 50%;
  animation: pulse-live 1.5s infinite;
}

@keyframes pulse-live {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

/* ----- Check-in asistencia ----- */
.checkin-card {
  max-width: 520px;
  margin: 0 auto;
}

.checkin-status {
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  margin-bottom: 1rem;
  display: none;
}

.checkin-status.show { display: block; }

.checkin-status.success {
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  color: #1b5e20;
}

.checkin-status.error {
  background: #ffebee;
  border: 1px solid #ef9a9a;
  color: #b71c1c;
}

.checkin-status.warning {
  background: #fff8e1;
  border: 1px solid #ffe082;
  color: #e65100;
}

.checkin-status.info {
  background: #e3f2fd;
  border: 1px solid #90caf9;
  color: #0d47a1;
}

.geo-map-placeholder {
  height: 180px;
  background: var(--re-fondo);
  border-radius: var(--radius);
  border: 1px dashed var(--re-borde);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--re-texto-suave);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.badge-asistio { background: #e8f5e9; color: #2e7d32; }
.badge-fuera { background: #ffebee; color: #c62828; }
.badge-rechazado { background: #fff3e0; color: #e65100; }
.badge-corregido { background: #e3f2fd; color: #1565c0; }

.attendance-ring {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 6px solid rgba(var(--re-accent-rgb), 0.15);
  border-top-color: var(--re-rojo);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--re-rojo);
  margin: 0 auto 0.5rem;
}

.present-list .present-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--re-borde);
}

.present-list .present-dot {
  width: 10px;
  height: 10px;
  background: #2e7d32;
  border-radius: 50%;
}

.mockup-demo-bar {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

.email-preview-mock .email-preview-body {
  background: var(--re-fondo);
  border-radius: 8px;
  padding: 1rem;
  font-size: 0.8rem;
  white-space: pre-wrap;
  margin: 0;
}

.notification-item {
  transition: box-shadow 0.2s;
}

.notification-item:hover {
  box-shadow: var(--shadow-card-hover);
}

.badge-asistencia-valida { background: #e8f5e9; color: #2e7d32; }
.badge-asistencia-retardo { background: #fff8e1; color: #f57f17; }
.badge-asistencia-invalida { background: #ffebee; color: #c62828; }

.meeting-preview-grid {
  background: rgba(var(--re-accent-rgb), 0.04);
  border-radius: var(--radius-btn);
  padding: 0.85rem 1rem;
  border: 1px solid rgba(var(--re-accent-rgb), 0.12);
}

#inviteEmailPreview .card-body {
  padding: 1.25rem;
}

/* ----- Action grid (dashboard / menú inicio) ----- */
.action-grid { margin-bottom: 1.75rem; }

.action-card {
  background: #ffffff;
  border-radius: var(--radius);
  border: 1px solid var(--re-borde);
  box-shadow: var(--shadow-card);
  padding: 1.35rem 1.15rem;
  text-align: center;
  text-decoration: none;
  color: var(--re-text-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
  height: 100%;
  cursor: pointer;
  transition: var(--re-transition);
  position: relative;
  z-index: 1;
}

.action-card:hover {
  color: var(--re-text-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(200, 16, 46, 0.25);
}

.action-card:focus {
  outline: none;
}

.action-card:focus-visible {
  outline: 2px solid var(--re-primary);
  outline-offset: 3px;
  border-color: rgba(200, 16, 46, 0.4);
}

.action-card.action-card--highlight,
.action-card.action-invitar {
  border-color: var(--re-card-premium-border);
}

.action-card .action-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--re-accent-muted);
  color: var(--re-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  margin-bottom: 0.75rem;
  transition: var(--re-transition);
  flex-shrink: 0;
}

.action-card .action-icon i {
  color: var(--re-accent);
}

.action-card.action-invitar .action-icon,
.action-card.action-card--highlight .action-icon {
  background: rgba(200, 16, 46, 0.14);
  color: var(--re-primary);
  box-shadow: 0 0 0 1px rgba(200, 16, 46, 0.2);
}

.action-card h6 {
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.35;
  margin: 0;
  color: var(--re-text-primary);
}

.action-card span {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--re-text-secondary);
  margin-top: 0.3rem;
  line-height: 1.4;
  max-width: 100%;
}

/* ----- Profile ----- */
.profile-hero {
  background: var(--re-card-premium-bg);
  border-radius: var(--radius);
  box-shadow: var(--re-card-premium-shadow);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--re-card-premium-border);
  color: var(--re-text-primary);
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: flex-start;
}

/* Barra de acciones — Perfil de miembro (ver_perfil.html) */
.profile-action-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.5rem;
  margin: 0.6rem 0 0.75rem;
  max-width: 100%;
}

.profile-action-bar .btn {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  line-height: 1.3;
  white-space: nowrap;
  flex: 0 1 auto;
  max-width: 100%;
}

.profile-photo {
  width: 110px;
  height: 110px;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--re-accent), #0891b2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  flex-shrink: 0;
}

.profile-nav-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.profile-nav-tabs .profile-tab {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--re-text-secondary);
  background: var(--re-secondary);
  border: 1px solid var(--re-borde);
  transition: var(--re-transition);
}

.profile-nav-tabs .profile-tab:hover,
.profile-nav-tabs .profile-tab.active {
  background: #ffffff;
  color: var(--re-primary);
  border-color: #ffffff;
}

.profile-section-card[id^='sec-'],
.profile-notif-prefs,
#sec-reconocimientos {
  scroll-margin-top: 5.5rem;
}

.profile-sections {
  margin-bottom: 0.5rem;
  clear: both;
}

.profile-sections__column {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.profile-section-card {
  background: var(--re-card-premium-bg);
  border-radius: var(--radius);
  box-shadow: var(--re-card-premium-shadow);
  border: 1px solid var(--re-card-premium-border);
  padding: 1.35rem 1.5rem;
  margin-bottom: 1rem;
  color: var(--re-text-primary);
  position: relative;
  overflow: visible;
  clear: both;
}

.profile-section-card__title,
.profile-section-card h5 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--re-primary);
  margin: 0 0 0.75rem;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 1.35;
}

.profile-section-card__body {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--re-text-primary);
  word-break: break-word;
}

/* Preferencias de notificación — tarjeta compacta (solo #userNotifPreferences) */
.profile-notif-prefs {
  margin-top: 2rem;
  margin-bottom: 1.5rem;
  clear: both;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.profile-notif-prefs__header {
  padding: 0.75rem 2.25rem;
}

.profile-notif-prefs__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--re-text-primary);
  line-height: 1.35;
}

.profile-notif-prefs__body {
  padding: 1rem 2.25rem 1.15rem;
}

.profile-notif-prefs__intro {
  margin: 0 0 0.75rem;
  line-height: 1.45;
  max-width: 52rem;
}

.profile-notif-prefs__checks {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin: 0 0 0.85rem;
  padding: 0;
}

.profile-notif-prefs__check {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0 0 0 2.75rem;
  min-height: 1.5rem;
}

.profile-notif-prefs__check .form-check-input {
  width: 2.25rem;
  height: 1.15rem;
  margin: 0 0 0 -2.75rem;
  flex-shrink: 0;
  float: none;
  position: relative;
  top: 0;
}

.profile-notif-prefs__check .form-check-label {
  line-height: 1.35;
  padding: 0;
  margin: 0;
}

.profile-notif-prefs__phone {
  margin: 0 0 0.75rem;
  max-width: 380px;
}

.profile-notif-prefs__phone-label {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.2rem;
  margin-bottom: 0.35rem;
  line-height: 1.35;
}

.profile-notif-prefs__phone-label .re-help-icon {
  margin-top: 0;
  vertical-align: middle;
}

.profile-notif-prefs__phone-input {
  max-width: 380px;
  width: 100%;
}

.profile-notif-prefs__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  gap: 0.5rem 1.25rem;
  margin: 0;
  padding: 0.75rem 0 0;
  border-top: 1px solid var(--re-borde);
}

.profile-notif-prefs__link-all {
  padding-left: 0;
  padding-right: 0;
  white-space: nowrap;
}

@media (min-width: 1024px) {
  .profile-notif-prefs__header,
  .profile-notif-prefs__body {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }

  .profile-notif-prefs__phone,
  .profile-notif-prefs__phone-input {
    max-width: 400px;
  }
}

.profile-badge.inactive {
  background: #e0e0e0;
  color: #666;
}

.profile-badge.active {
  background: #e8f5e9;
  color: #2e7d32;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ----- Directory ----- */
.member-card {
  background: var(--re-card-premium-bg);
  border-radius: var(--radius);
  box-shadow: var(--re-card-premium-shadow);
  border: 1px solid var(--re-card-premium-border);
  padding: 1.35rem;
  text-align: center;
  height: 100%;
  color: var(--re-text-primary);
  transition: var(--re-transition);
}

.member-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}

.member-card .member-photo {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  margin: 0 auto 0.85rem;
  background: rgba(var(--re-accent-rgb), 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--re-rojo);
  font-size: 1.3rem;
}

/* ----- Info box ----- */
.info-box {
  background: rgba(var(--re-accent-rgb), 0.04);
  border: 1px solid rgba(var(--re-accent-rgb), 0.15);
  border-left: 4px solid var(--re-rojo);
  border-radius: var(--radius);
  padding: 1.15rem 1.35rem;
}

.info-box h6 { color: var(--re-rojo); font-weight: 700; margin-bottom: 0.5rem; }

/* ----- Tables ----- */
.table-re thead th {
  background: var(--re-fondo);
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--re-texto-suave);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--re-borde);
  padding: 0.85rem 1rem;
}

.table-re td { padding: 0.85rem 1rem; vertical-align: middle; }

.badge-pendiente { background: #fff8e1; color: #f57f17; }
.badge-confirmado { background: #e3f2fd; color: #1565c0; }
.badge-asistio { background: #e8f5e9; color: #2e7d32; }
.badge-cerrado { background: #eceff1; color: #546e7a; }

.form-control, .form-select {
  border-radius: var(--radius-btn);
  border-color: var(--re-borde);
}

.form-control:focus, .form-select:focus {
  border-color: var(--re-primary);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.15);
}

.ranking-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--re-borde);
}

.ranking-pos {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--re-rojo);
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ----- Avatares / foto de perfil ----- */
.re-avatar {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--re-blanco);
  background: linear-gradient(145deg, var(--re-rojo), var(--re-rojo-oscuro));
  background-size: cover;
  background-position: center;
  overflow: hidden;
  user-select: none;
}

.re-avatar-circle { border-radius: 50%; }

.re-avatar-profile {
  width: 160px;
  height: 160px;
  font-size: 2.75rem;
}

.re-avatar-modal-preview {
  width: 140px;
  height: 140px;
  font-size: 2.25rem;
}

.re-avatar-sidebar {
  width: 44px;
  height: 44px;
  font-size: 0.85rem;
}

.re-avatar-lg {
  width: 84px;
  height: 84px;
  font-size: 1.3rem;
}

.re-avatar-md {
  width: 48px;
  height: 48px;
  font-size: 1rem;
}

.re-avatar-sm {
  width: 38px;
  height: 38px;
  font-size: 0.8rem;
}

.re-avatar-xs {
  width: 36px;
  height: 36px;
  font-size: 0.75rem;
}

.re-avatar-has-img {
  color: transparent;
  background-color: var(--re-borde);
}

.topbar-user .re-avatar.re-avatar-sm {
  width: 38px;
  height: 38px;
}

.member-card .re-avatar.re-avatar-lg {
  margin: 0 auto 0.85rem;
  background: rgba(var(--re-accent-rgb), 0.08);
  color: var(--re-rojo);
}

.member-card .re-avatar.re-avatar-lg.re-avatar-has-img {
  color: transparent;
  background-color: #eee;
}

.profile-photo-block {
  position: relative;
  flex-shrink: 0;
}

.profile-photo-block .re-avatar-profile {
  box-shadow: 0 8px 28px rgba(var(--re-accent-rgb), 0.2);
  border: 4px solid var(--re-blanco);
}

.re-avatar-camera {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--re-rojo);
  color: var(--re-blanco);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  border: 3px solid var(--re-blanco);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  z-index: 2;
}

.re-avatar-profile .re-avatar-camera {
  width: 44px;
  height: 44px;
  right: 8px;
  bottom: 8px;
}

.profile-photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.sidebar-user-block {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  margin: 0.5rem 0.5rem 0;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--re-blanco);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: background 0.2s;
}

.sidebar-user-block:hover {
  background: rgba(255, 255, 255, 0.18);
  color: var(--re-blanco);
}

.sidebar-user-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}

.sidebar-user-text strong {
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-text small {
  font-size: 0.72rem;
  opacity: 0.85;
}

.ranking-item .re-avatar-xs {
  margin-right: 0.15rem;
}

.present-list .present-item .re-avatar-xs {
  flex-shrink: 0;
}

/* ----- help-tooltip (? contextual) ----- */
.re-help-icon,
.help-tooltip,
.help-tip[data-help],
.help-tip[data-re-help] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  border-radius: 50%;
  background: var(--re-rojo, #c8102e);
  border: none;
  color: #fff !important;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  cursor: help;
  vertical-align: middle;
  margin-left: 0.35rem;
  padding: 0;
  flex-shrink: 0;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.15s ease, transform 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.re-help-icon:hover,
.help-tooltip:hover,
.help-tip:hover {
  opacity: 0.92;
  transform: scale(1.05);
}

.re-help-icon:focus-visible,
.help-tooltip:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

.form-label .re-help-icon,
.form-label .help-tooltip {
  margin-top: -2px;
}

.tooltip {
  z-index: 1080;
  pointer-events: none;
}

.tooltip .tooltip-inner {
  max-width: min(280px, calc(100vw - 2rem));
  text-align: left;
  font-size: 0.82rem;
  line-height: 1.4;
  padding: 0.55rem 0.75rem;
  background: #212529;
  color: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.tooltip.bs-tooltip-top .tooltip-arrow::before,
.tooltip.bs-tooltip-auto[data-popper-placement^='top'] .tooltip-arrow::before {
  border-top-color: #212529;
}
.tooltip.bs-tooltip-bottom .tooltip-arrow::before,
.tooltip.bs-tooltip-auto[data-popper-placement^='bottom'] .tooltip-arrow::before {
  border-bottom-color: #212529;
}

@media (max-width: 767.98px) {
  .re-help-icon,
  .help-tooltip {
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
    font-size: 0.8rem;
  }
}

.email-preview-box {
  background: #fafafa;
  max-height: 360px;
  overflow: auto;
}

.mockup-banner {
  display: none !important;
}

.login-demo-accounts a {
  color: var(--re-texto-suave);
  font-size: 0.8rem;
}

.login-demo-accounts a:hover {
  color: var(--re-rojo);
}

.re-sidebar-toggle-group {
  flex-shrink: 0;
}

.sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--re-rojo);
  border: none;
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-btn);
  min-width: 44px;
  min-height: 44px;
  transition: var(--re-transition-sidebar);
  touch-action: manipulation;
}

.sidebar-toggle:hover,
.sidebar-toggle:focus {
  background: var(--re-primary-hover);
  color: #fff;
}

.sidebar-toggle-mode {
  color: var(--re-rojo);
  text-decoration: none;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--re-borde);
  border-radius: var(--radius-btn);
  line-height: 1;
  min-height: 44px;
}

.sidebar-toggle-mode:hover {
  background: var(--re-accent-muted);
  color: var(--re-rojo);
}

.re-sidebar-mode-menu .dropdown-item.active {
  background: var(--re-accent-muted);
  color: var(--re-primary);
  font-weight: 600;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: var(--re-z-sidebar-overlay, 1035);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.sidebar-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

/* ----- Sidebar: modo compacto (solo iconos) ----- */
@media (min-width: 1024px) {
  body.re-sidebar-mode-compact {
    --sidebar-width: var(--sidebar-width-compact);
  }

  body.re-sidebar-mode-compact .sidebar-brand {
    padding: 0.85rem 0.45rem;
    text-align: center;
  }

  body.re-sidebar-mode-compact .sidebar-logo-img {
    max-width: 42px;
    max-height: 42px;
    margin: 0 auto;
  }

  body.re-sidebar-mode-compact .re-nav-label,
  body.re-sidebar-mode-compact .nav-section-label,
  body.re-sidebar-mode-compact .sidebar-footer {
    display: none !important;
  }

  body.re-sidebar-mode-compact .sidebar-nav .nav-link {
    justify-content: center;
    padding: 0.7rem 0.45rem;
    margin: 0.15rem 0.35rem;
    gap: 0;
    position: relative;
  }

  body.re-sidebar-mode-compact .sidebar-nav .nav-link i {
    margin: 0;
    font-size: 1.15rem;
  }

  body.re-sidebar-mode-compact .sidebar-nav .nav-link[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: #1f2937;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0.35rem 0.6rem;
    border-radius: 8px;
    white-space: nowrap;
    z-index: 1100;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
    pointer-events: none;
  }

  body.re-sidebar-mode-compact .sidebar-nav .nav-link[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    left: calc(100% + 4px);
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: #1f2937;
    z-index: 1100;
  }

  body.re-sidebar-mode-hidden .sidebar {
    transform: translateX(-100%);
    pointer-events: none;
  }

  body.re-sidebar-mode-hidden .main-content {
    margin-left: 0 !important;
    width: 100%;
    max-width: 100%;
  }

  body.re-sidebar-mode-hidden .re-brand-wrap--topbar {
    display: inline-flex !important;
  }
}

body.re-sidebar-mode-hidden .re-brand-wrap--topbar,
body.re-sidebar-mode-compact .re-brand-wrap--topbar {
  display: inline-flex !important;
}

@media (min-width: 1024px) {
  body.re-sidebar-mode-expanded .re-brand-wrap--topbar {
    display: none !important;
  }
}

.nav-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
  margin: 0.5rem 1rem;
}

.nav-section-label {
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  opacity: 0.75;
}

/* Presentaciones de negocio */
.pres-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}
.pres-slot-available,
.pres-slot-available-badge { background: rgba(52, 211, 153, 0.18); color: #a7f3d0; }
.pres-slot-pending,
.pres-slot-pending-badge { background: rgba(251, 191, 36, 0.18); color: #fde68a; }
.pres-slot-occupied,
.pres-slot-occupied-badge { background: var(--re-accent-muted); color: var(--re-accent); }
.pres-slot-cancelled,
.pres-slot-cancelled-badge { background: rgba(148, 163, 184, 0.15); color: var(--re-text-secondary); }

.pres-meeting-card {
  border: 1px solid var(--re-borde);
  border-radius: var(--radius-sm);
  padding: 1rem;
  height: 100%;
  background: var(--re-card-premium-bg);
  color: var(--re-text-primary);
}
.pres-selectable {
  cursor: pointer;
  transition: var(--re-transition);
}
.pres-selectable:hover {
  border-color: var(--re-accent);
  box-shadow: 0 4px 16px rgba(200, 16, 46, 0.15);
}
.pres-cal-day {
  border: 1px solid var(--re-borde);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  min-height: 100px;
  background: var(--re-card-premium-bg);
  color: var(--re-text-primary);
}
.pres-cal-num {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--re-text-secondary);
  margin-bottom: 0.25rem;
}
.pres-cal-event {
  margin-top: 0.35rem;
  padding: 0.35rem;
  border-radius: 6px;
  line-height: 1.3;
}

.audit-notice {
  border-left: 4px solid var(--re-accent) !important;
  background: var(--re-accent-muted) !important;
  color: var(--re-text-primary) !important;
}

.re-brand-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  position: relative;
}

.re-brand-fallback {
  width: 48px;
  height: 48px;
  background: var(--re-bg-surface);
  border: 1px solid var(--re-borde);
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.02em;
}

.re-brand-fallback.d-none,
.re-brand-fallback[hidden] {
  display: none !important;
}

.re-brand-logo,
.sidebar-logo-img[data-re-brand],
img[data-re-brand="logo"] {
  object-fit: contain;
  max-height: 56px;
  width: auto;
  max-width: 100%;
}

.login-logo .re-brand-logo,
.login-card-brand .re-brand-logo--login {
  max-height: 72px;
}

.topbar .re-brand-logo,
.topbar-logo[data-re-brand="logo"] {
  max-height: 40px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  background: transparent;
}

.re-brand-fallback--topbar {
  width: 36px;
  height: 36px;
  font-size: 0.85rem;
  margin-right: 0.35rem;
}

.re-brand-wrap--topbar {
  min-height: 40px;
}

.re-brand-wrap--section {
  min-height: auto;
  justify-content: flex-start;
}

.re-brand-logo--section {
  max-height: 44px;
  max-width: 160px;
}

.re-brand-wrap--modal {
  justify-content: flex-start;
  min-height: auto;
}

.re-brand-logo--modal {
  max-height: 40px;
  max-width: 150px;
}

.re-modal-brand {
  padding-top: 0.25rem;
}

.re-brand-wrap--empty {
  justify-content: center;
  min-height: auto;
}

.re-brand-logo--empty {
  max-height: 56px;
  max-width: 180px;
}

.re-brand-wrap--export {
  justify-content: center;
  min-height: auto;
}

.re-brand-logo--export {
  max-height: 52px;
  max-width: 200px;
}

.re-brand-wrap--dashboard {
  min-height: auto;
  justify-content: flex-start;
}

.re-brand-logo--dashboard {
  max-height: 36px;
  max-width: 130px;
}

.re-section-heading__title {
  color: var(--re-negro, #1a1a1a);
  font-weight: 600;
}

.re-empty-state {
  padding: 2rem 1rem;
  text-align: center;
}

.re-export-preview__header .re-brand-wrap {
  justify-content: center;
}

.card-re .card-header.re-card-header-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.card-re .card-header.re-card-header-brand .re-brand-logo--section {
  max-height: 32px;
}

/* ----- Insignias y testimonios ----- */
.re-badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

.re-badge-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.85rem 0.65rem;
  border-radius: var(--radius);
  border: 1px solid var(--re-borde);
  background: var(--re-blanco);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}

.re-badge-chip:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.re-badge-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--re-rojo) 0%, var(--re-rojo-oscuro) 100%);
  color: var(--re-blanco);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.re-badge-chip__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--re-texto);
  line-height: 1.2;
}

.re-badge-chip__meta {
  margin-top: 0.35rem;
  line-height: 1.3;
  font-size: 0.72rem;
}

.re-badge-chip__date {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  margin-top: 0.25rem;
  font-size: 0.65rem;
  font-weight: 500;
  line-height: 1.2;
  color: #8b95a5;
}

.re-badge-chip__date .bi {
  font-size: 0.68rem;
  opacity: 0.9;
  flex-shrink: 0;
}

.re-testimonial-card {
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--re-borde);
  background: var(--re-blanco);
  margin-bottom: 0.65rem;
}

.re-testimonial-card:last-child {
  margin-bottom: 0;
}

.re-section-heading__title {
  color: var(--re-texto);
  font-weight: 700;
}

#recognitionsSection .re-section-heading {
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--re-rojo);
}

/* ----- Pagos y tesorería ----- */
.pay-cal-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 0.35rem;
  vertical-align: middle;
}
.pay-cal-dot--green { background: #198754; }
.pay-cal-dot--yellow { background: #ffc107; }
.pay-cal-dot--red { background: var(--re-rojo); }
.pay-cal-dot--rejected-dark { background: var(--re-rojo-oscuro); }
.pay-cal-dot--gray { background: #adb5bd; }

.pay-calendar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
}

@media (min-width: 576px) {
  .pay-calendar-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1024px) {
  .pay-calendar-grid { grid-template-columns: repeat(6, 1fr); }
}

.pay-cal-month {
  border: 2px solid var(--re-borde);
  border-radius: var(--radius);
  background: var(--re-secondary);
  color: var(--re-text-primary);
  padding: 0.65rem 0.4rem;
  text-align: center;
  cursor: pointer;
  transition: var(--re-transition);
}
.pay-cal-month:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: var(--re-hover);
}
.pay-cal-month:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}
.pay-cal-month--green { border-color: #a3cfbb; background: #d1e7dd; color: #0f5132; }
.pay-cal-month--yellow { border-color: #ffda6a; background: #fff3cd; color: #664d03; }
.pay-cal-month--red { border-color: #f1aeb5; background: #f8d7da; color: #842029; }
.pay-cal-month--rejected-dark { border-color: rgba(248, 113, 113, 0.35); background: rgba(248, 113, 113, 0.08); color: var(--re-text-primary); }
.pay-cal-month--gray { border-color: #dee2e6; background: #e9ecef; color: #495057; }

/* Calendario anual de mensualidades (12 meses) */
.pay-year-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
@media (min-width: 576px) {
  .pay-year-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 768px) {
  .pay-year-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1200px) {
  .pay-year-grid { grid-template-columns: repeat(6, 1fr); }
}

.pay-month-card {
  border: 2px solid var(--re-borde);
  border-radius: var(--radius);
  padding: 0.75rem 0.65rem;
  min-height: 7.5rem;
  display: flex;
  flex-direction: column;
  transition: var(--re-transition);
}
.pay-month-card--clickable { cursor: pointer; }
.pay-month-card--clickable:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}
.pay-month-card--green { border-color: #a3cfbb; background: #d1e7dd; color: #0f5132; }
.pay-month-card--red { border-color: #f1aeb5; background: #f8d7da; color: #842029; }
.pay-month-card--yellow { border-color: #ffda6a; background: #fff3cd; color: #664d03; }
.pay-month-card--gray { border-color: #dee2e6; background: #e9ecef; color: #495057; }

.pay-month-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}
.pay-month-card__name {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
}
.pay-month-card__meta { line-height: 1.45; }
.pay-month-card__ref { max-width: 100%; }

.pay-month-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.pay-month-badge--paid { background: #198754; color: #fff; }
.pay-month-badge--pending { background: #dc3545; color: #fff; }
.pay-month-badge--partial { background: #ffc107; color: #212529; }
.pay-month-badge--future { background: #6c757d; color: #fff; }

.pay-status-badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.3;
}
.pay-status-badge--unpaid { background: var(--re-hover); color: var(--re-text-primary); }
.pay-status-badge--pending { background: #ffc107; color: #212529; }
.pay-status-badge--approved { background: #198754; color: #fff; }
.pay-status-badge--rejected { background: var(--re-rojo-oscuro); color: #fff; }
.pay-status-meta { line-height: 1.35; }
.pay-reject-reason { color: var(--re-rojo); }
.pay-treasury-actions { min-width: 0; max-width: 100%; }
.pay-treasury-actions .btn { margin-bottom: 0.2rem; }

/* ----- Pagar Membresía ----- */
.pay-account-summary .pay-summary-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--re-text-secondary);
  margin-bottom: 0.25rem;
}
.pay-account-summary .pay-summary-value {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--re-text-primary);
}
.pay-account-summary .pay-summary-value--amount {
  font-size: 1.35rem;
  color: var(--re-primary);
}

.pay-dues-table tr.pay-due--paid { background: rgba(25, 135, 84, 0.08); }
.pay-dues-table tr.pay-due--partial { background: rgba(255, 193, 7, 0.12); }
.pay-dues-table tr.pay-due--overdue { background: rgba(200, 16, 46, 0.08); }
.pay-dues-table tr.pay-due--pending { background: rgba(248, 215, 218, 0.35); }
.pay-dues-table tr.pay-due--future { background: #e9ecef; color: #495057; }
.pay-due-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.pay-due--paid .pay-due-badge { background: #198754; color: #fff; }
.pay-due--future .pay-due-badge { background: #6c757d; color: #fff; }
.pay-due--overdue .pay-due-badge { background: #dc3545; color: #fff; }
.pay-due--pending .pay-due-badge { background: #dc3545; color: #fff; }
.pay-due--partial .pay-due-badge { background: #ffc107; color: #212529; }

.pay-amount-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 110px;
  padding: 1rem 0.75rem;
  border: 2px solid var(--re-borde);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--re-transition);
  text-align: center;
}
.pay-amount-card:hover,
.pay-amount-card.is-active {
  border-color: var(--re-primary);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}
.pay-amount-card--custom { cursor: default; }
.pay-amount-card__title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--re-text-primary);
}
.pay-amount-card__amount {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--re-primary);
  margin-top: 0.35rem;
}

.pay-method-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  min-height: 100px;
  padding: 1rem;
  border: 2px solid var(--re-borde);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  transition: var(--re-transition);
  font-weight: 600;
  color: var(--re-text-primary);
}
.pay-method-btn:hover,
.pay-method-btn.is-active {
  border-color: var(--re-primary);
  background: rgba(200, 16, 46, 0.04);
  box-shadow: var(--shadow-card);
}
.pay-method-btn small { font-weight: 400; font-size: 0.7rem; }
.pay-method-icon { font-size: 2rem; }
.pay-method-icon--paypal { color: #003087; }
.pay-method-icon--stripe { color: #635bff; }

.max-w-stripe { max-width: 420px; }

.pay-cal-month__name {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--re-texto);
}
.pay-cal-month__state {
  display: block;
  font-size: 0.65rem;
  color: var(--re-texto-suave);
  margin-top: 0.2rem;
  line-height: 1.2;
}

@media (max-width: 767.98px) {
  .sidebar-logo-img,
  .re-brand-logo[data-re-brand="logo"] {
    max-height: 48px;
  }
  .login-logo .re-brand-logo {
    max-height: 64px !important;
    max-width: 90%;
  }
  .re-badge-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ----- Notificaciones (campana) ----- */
.re-notif-bell-wrap {
  margin-left: auto;
  margin-right: 0.5rem;
}
.re-notif-bell-btn {
  color: var(--re-texto);
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  line-height: 1;
}
.re-notif-bell-btn:hover {
  color: var(--re-accent);
}
.re-notif-badge {
  font-size: 0.65rem;
  min-width: 1.1rem;
  background: var(--re-accent) !important;
  color: var(--re-primary) !important;
}
.re-notif-dropdown {
  min-width: min(280px, 92vw);
  max-width: min(92vw, 380px);
  max-height: 70vh;
  overflow-y: auto;
}
.re-notif-drop-item {
  white-space: normal;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

/* ----- Matriz accesos por rol ----- */
.access-matrix-card .card-body,
.access-matrix-card {
  padding: 0;
}
.access-matrix-scroll {
  max-height: min(70vh, 640px);
  overflow: auto;
}
.access-matrix-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--re-fondo-claro, #f8f9fa);
  vertical-align: top;
}
.access-matrix-table .matrix-module-col {
  min-width: 220px;
}
.access-matrix-table .matrix-role-col {
  min-width: 120px;
}
.access-matrix-table .matrix-module-label {
  font-weight: 500;
  white-space: nowrap;
}
.matrix-role-head {
  font-weight: 600;
  font-size: 0.9rem;
}
.matrix-role-actions {
  font-size: 0.75rem;
  margin-top: 0.25rem;
}
.matrix-role-actions .btn-link {
  text-decoration: none;
  color: var(--re-rojo, #1a1a1a);
}
.matrix-cell-check {
  width: 1.15rem;
  height: 1.15rem;
  cursor: pointer;
}

/* ----- Smart search / autocomplete ----- */
.re-smart-search {
  position: relative;
  width: 100%;
}

.re-smart-search-has-value .re-smart-search-input {
  padding-right: 2.25rem;
}

.re-smart-search-clear {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  border: none;
  background: transparent;
  color: var(--re-texto-suave, #5c5c5c);
  font-size: 1.35rem;
  line-height: 1;
  width: 2rem;
  height: 2rem;
  padding: 0;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.re-smart-search-clear:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--re-rojo, #1a1a1a);
}

.re-smart-search-input {
  width: 100%;
}

.re-smart-search-native-select,
select.re-smart-search-native-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.re-smart-search .re-smart-search-native-select {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
}

.re-member-picker-field {
  position: relative;
  overflow: visible;
}

.re-member-picker-field .re-smart-search {
  width: 100%;
}

.card-re .card-body .re-member-picker-field,
.card-re .card-body #priorReferenceBlock {
  overflow: visible;
}

.re-member-picker-field:focus-within,
#priorReferenceBlock:focus-within {
  z-index: 30;
}

.re-member-picker-field .re-smart-search-dropdown,
#priorReferenceBlock .re-smart-search-dropdown {
  z-index: calc(var(--re-z-autocomplete, 1060) + 5);
}

.pres-cal-cancelled {
  border-top: 1px dashed rgba(0, 0, 0, 0.15);
  padding-top: 0.25rem;
}

.re-smart-search-dropdown {
  position: absolute;
  z-index: var(--re-z-autocomplete, 1060);
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  max-height: min(320px, 50vh);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--re-blanco, #fff);
  border: 1px solid var(--re-borde, #e8e8e8);
  border-radius: var(--radius-btn, 10px);
  box-shadow: var(--shadow-card, 0 8px 24px rgba(0, 0, 0, 0.1));
}

.re-smart-search-option {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 0.65rem 0.85rem;
  cursor: pointer;
  border-bottom: 1px solid var(--re-borde, #f0f0f0);
  min-height: 44px;
}

.re-smart-search-option:last-child {
  border-bottom: none;
}

.re-smart-search-option:hover,
.re-smart-search-option.is-active {
  background: rgba(var(--re-accent-rgb), 0.08);
}

.re-smart-search-title {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--re-texto, #1f1f1f);
  line-height: 1.3;
}

.re-smart-search-subtitle {
  display: block;
  font-size: 0.78rem;
  color: var(--re-texto-suave, #5c5c5c);
  margin-top: 0.15rem;
  line-height: 1.35;
}

.re-smart-search-meta {
  display: inline-block;
  font-size: 0.7rem;
  margin-top: 0.2rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: var(--re-fondo, #f5f5f5);
  color: var(--re-texto-suave, #5c5c5c);
}

.re-smart-search-empty {
  padding: 0.85rem;
  font-size: 0.875rem;
  color: var(--re-texto-suave, #5c5c5c);
  text-align: center;
}

/* Campos de solo lectura en seguimiento de referencias */
.form-control.re-field-readonly,
.form-select.re-field-readonly,
textarea.re-field-readonly {
  background-color: #e9ecef !important;
  cursor: not-allowed;
  pointer-events: none;
  opacity: 1;
}

.re-ref-history-list {
  max-height: 220px;
  overflow-y: auto;
}

.re-ref-history-item {
  border-left: 3px solid var(--re-primario, #8b1538);
  padding-left: 0.75rem;
  margin-bottom: 0.85rem;
}

.re-ref-history-item:last-child {
  margin-bottom: 0;
}

/* Overrides globales: theme-institutional-red.css */
