/* ============================================================
   RESONUM — Sistema visual independiente
   Paleta: teal #2E6B7C · coral #D4705E · crema #EDEAE2 · navy #1C2B34
   ============================================================ */

/* ── Variables Resonum ──────────────────────────────────────── */
:root {
  --rn-primario:       #2E6B7C;
  --rn-primario-osc:   #1A4555;
  --rn-primario-muy-osc: #102D3A;
  --rn-primario-claro: #3D8097;
  --rn-primario-pale:  #EAF3F6;
  --rn-acento:         #D4705E;
  --rn-acento-osc:     #B8503F;
  --rn-acento-claro:   #F5CEC7;
  --rn-fondo:          #EDEAE2;
  --rn-fondo-claro:    #F5F3EE;
  --rn-superficie:     #FFFFFF;
  --rn-navy:           #1C2B34;
  --rn-navy-medio:     #2E4050;
  --rn-texto:          #1C2B34;
  --rn-texto-suave:    #4A5E6A;
  --rn-texto-tenue:    #7A8F99;
  --rn-borde:          rgba(46, 107, 124, 0.15);
  --rn-borde-suave:    rgba(46, 107, 124, 0.08);
  --rn-sombra-s:       0 1px 3px rgba(28,43,52,0.08), 0 1px 2px rgba(28,43,52,0.04);
  --rn-sombra-m:       0 4px 12px rgba(28,43,52,0.10), 0 2px 4px rgba(28,43,52,0.06);
  --rn-sombra-l:       0 8px 24px rgba(28,43,52,0.12), 0 4px 8px rgba(28,43,52,0.06);
  --rn-radio:          10px;
  --rn-radio-s:        6px;
  --rn-radio-l:        16px;
  --rn-transicion:     0.18s ease;
}

/* ── Sobreescribir paleta de acento de Flora → teal ─────────── */
:root {
  --fl-acento:               #2E6B7C;
  --fl-acento-50:            #EAF3F6;
  --fl-acento-100:           #D3E9EF;
  --fl-acento-200:           #A7D3DF;
  --fl-acento-300:           #7BBDCE;
  --fl-acento-400:           #4FA7BE;
  --fl-acento-500:           #2E6B7C;
  --fl-acento-600:           #255869;
  --fl-acento-700:           #1A4555;
  --fl-acento-800:           #10303E;
  --fl-acento-900:           #081B24;
  --fl-acento-950:           #040E12;
  --fl-acento-hover:         #255869;
  --fl-acento-activo:        #1A4555;
  --fl-acento-suave:         rgba(46,107,124,0.10);
  --fl-acento-suave-hover:   rgba(46,107,124,0.18);
  --fl-acento-borde:         rgba(46,107,124,0.25);
  --fl-acento-borde-fuerte:  rgba(46,107,124,0.55);
  --fl-acento-texto:         #2E6B7C;
  --fl-acento-texto-sobre:   #FFFFFF;
  --fl-acento-foco:          rgba(46,107,124,0.35);
  --fl-acento-fuerte:        #1A4555;
  --fl-acento-enlace:        #2E6B7C;
  /* Info → teal para modales tipo "pregunta" */
  --fl-info:                 #2E6B7C;
  --fl-info-borde:           rgba(46,107,124,0.25);
  --fl-info-suave:           rgba(46,107,124,0.08);
  --fl-info-texto:           #1A4555;
  --fl-info-texto-sobre:     #FFFFFF;
  /* Destaque → teal sólido (botones primarios, badge hoy en calendario) */
  --fl-destaque-fondo:       #2E6B7C;
  --fl-destaque-fondo-hover: #255869;
  --fl-destaque-borde:       #1A4555;
  --fl-destaque-gradiente:   linear-gradient(135deg,#102D3A 0%,#2E6B7C 100%);
  --fl-destaque-texto:       #FFFFFF;
}

/* ── Reset base ─────────────────────────────────────────────── */
body { margin: 0; padding: 0; }
body:has(.rn-app) { background: var(--rn-fondo); }

.rn-app *,
.rn-app *::before,
.rn-app *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.rn-app {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--rn-texto);
  background: var(--rn-fondo);
  min-height: 100vh;
}

.rn-app a { text-decoration: none; }
.rn-app a:not(.rn-btn) { color: inherit; }
.rn-app ul, .rn-app ol { list-style: none; }
.rn-app button { cursor: pointer; font: inherit; }
.rn-app input, .rn-app select, .rn-app textarea { font: inherit; }

/* ── Header ─────────────────────────────────────────────────── */
.rn-header {
  background: linear-gradient(135deg, #102D3A 0%, #1A4555 35%, #2E6B7C 75%, #3D8097 100%);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(16,45,58,0.35);
}

.rn-header-interno {
  max-width: none;
  padding: 0 28px;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.rn-header-marca {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  text-decoration: none;
}

.rn-header-marca img {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.25);
}

.rn-header-marca-texto h1 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.1;
  color: #fff;
}

.rn-header-marca-texto p {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  line-height: 1.2;
}

.rn-header-stats {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}

.rn-header-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}

.rn-header-stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: rgba(255,255,255,0.55);
  line-height: 1;
}

.rn-header-stat-valor {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
}

.rn-header-sep {
  width: 1px;
  height: 28px;
  background: rgba(255,255,255,0.18);
  flex-shrink: 0;
}

.rn-header-usuario {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}

.rn-header-usuario-nombre {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
  text-decoration: none;
}
.rn-header-usuario-nombre:hover {
  text-decoration: underline;
  opacity: 0.9;
}

.rn-header-logout {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: rgba(255,255,255,0.65);
  background: none;
  border: none;
  padding: 0;
  transition: color var(--rn-transicion);
  line-height: 1;
}

.rn-header-logout:hover { color: var(--rn-acento-claro); }

.rn-header-logout svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Header compacto (para formularios) ─────────────────────── */
.rn-header-compacto {
  background: linear-gradient(135deg, #102D3A 0%, #1A4555 50%, #2E6B7C 100%);
  color: #fff;
  box-shadow: 0 2px 12px rgba(16,45,58,0.30);
}

.rn-header-compacto .rn-header-interno {
  height: 56px;
}

/* ── Contenedor principal ────────────────────────────────────── */
.rn-contenedor {
  max-width: none;
  padding: 0 28px 48px;
}

.rn-contenedor-acotado {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px 48px;
}

/* ── Cuerpo de página (fondo contenedor) ─────────────────────── */
.rn-pagina-cuerpo {
  background: var(--rn-fondo);
  min-height: calc(100vh - 68px);
}

/* ── Acceso global (agenda) ─────────────────────────────────── */
.rn-acceso-global {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--rn-superficie);
  border: 1px solid var(--rn-borde);
  border-left: 4px solid var(--rn-primario);
  border-radius: var(--rn-radio);
  padding: 14px 20px;
  margin: 24px 0 0;
  transition: box-shadow var(--rn-transicion), border-color var(--rn-transicion);
  box-shadow: var(--rn-sombra-s);
}

.rn-acceso-global:hover {
  box-shadow: var(--rn-sombra-m);
  border-left-color: var(--rn-acento);
}

.rn-acceso-global-emoji {
  font-size: 24px;
  flex-shrink: 0;
}

.rn-acceso-global-texto {
  flex: 1;
}

.rn-acceso-global-texto strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--rn-texto);
}

.rn-acceso-global-texto span {
  font-size: 12px;
  color: var(--rn-texto-suave);
}

.rn-acceso-global-flecha {
  font-size: 18px;
  color: var(--rn-primario);
  flex-shrink: 0;
  transition: transform var(--rn-transicion);
}

.rn-acceso-global:hover .rn-acceso-global-flecha { transform: translateX(4px); }

/* ── Alertas ─────────────────────────────────────────────────── */
.rn-alerta {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--rn-radio-s);
  font-size: 13px;
  line-height: 1.5;
  margin: 16px 0;
}

.rn-alerta-exito {
  background: #ECFDF5;
  border: 1px solid #6EE7B7;
  color: #065F46;
}
.rn-alerta-exito::before {
  content: '';
  display: block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 1px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23065F46' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/contain no-repeat;
}

.rn-alerta-error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #991B1B;
}
.rn-alerta-error::before {
  content: '';
  display: block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 1px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23991B1B' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='15' y1='9' x2='9' y2='15'/%3E%3Cline x1='9' y1='9' x2='15' y2='15'/%3E%3C/svg%3E") center/contain no-repeat;
}

.rn-alerta-info {
  background: var(--rn-primario-pale);
  border: 1px solid rgba(46,107,124,0.25);
  color: var(--rn-primario-osc);
}
.rn-alerta-info::before {
  content: '';
  display: block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 1px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232E6B7C' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='16' x2='12' y2='12'/%3E%3Cline x1='12' y1='8' x2='12.01' y2='8'/%3E%3C/svg%3E") center/contain no-repeat;
}

.rn-alerta-advertencia {
  background: #FFFBEB;
  border: 1px solid #FCD34D;
  color: #92400E;
}
.rn-alerta-advertencia::before {
  content: '';
  display: block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 1px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2392400E' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'/%3E%3Cline x1='12' y1='9' x2='12' y2='13'/%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ── Sección ─────────────────────────────────────────────────── */
.rn-seccion {
  margin-top: 32px;
}

.rn-seccion-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.rn-seccion-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--rn-texto);
  line-height: 1.2;
}

.rn-seccion-header p {
  font-size: 13px;
  color: var(--rn-texto-suave);
  margin-top: 3px;
}

.rn-etiqueta-propietario {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--rn-primario);
  background: var(--rn-primario-pale);
  border: 1px solid rgba(46,107,124,0.2);
  border-radius: 20px;
  padding: 4px 10px;
  margin-bottom: 6px;
}

/* ── Tarjetas de coros (participaciones) ─────────────────────── */
.rn-coros-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.rn-coro-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--rn-superficie);
  border: 1px solid var(--rn-borde);
  border-radius: var(--rn-radio-l);
  padding: 16px 18px;
  box-shadow: var(--rn-sombra-s);
  transition: box-shadow var(--rn-transicion), transform var(--rn-transicion), border-color var(--rn-transicion);
}

.rn-coro-card:hover {
  box-shadow: var(--rn-sombra-l);
  transform: translateY(-2px);
  border-color: rgba(46,107,124,0.3);
}

.rn-coro-logo {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--rn-primario), var(--rn-primario-claro));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}

.rn-coro-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rn-coro-info {
  flex: 1;
  min-width: 0;
}

.rn-coro-nombre {
  font-size: 15px;
  font-weight: 600;
  color: var(--rn-texto);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rn-coro-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  margin-top: 6px;
}

.rn-coro-flecha {
  color: var(--rn-texto-tenue);
  font-size: 18px;
  flex-shrink: 0;
  transition: color var(--rn-transicion), transform var(--rn-transicion);
}

.rn-coro-card:hover .rn-coro-flecha {
  color: var(--rn-primario);
  transform: translateX(3px);
}

/* ── Emoji en badges (centrado vertical confiable) ───────────── */
.rn-emoji {
  display: inline-block;
  flex-shrink: 0;
  transform: translateY(-2px);
}

/* ── Chips / badges ─────────────────────────────────────────── */
.rn-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  line-height: 1;
  white-space: nowrap;
  vertical-align: middle;
}

.rn-chip-coordinador {
  background: rgba(46,107,124,0.12);
  color: var(--rn-primario-osc);
}

.rn-chip-miembro {
  background: rgba(46,107,124,0.07);
  color: var(--rn-primario);
}

.rn-chip-propietario {
  background: rgba(212,112,94,0.12);
  color: var(--rn-acento-osc);
}

.rn-chip-activo {
  background: #ECFDF5;
  color: #065F46;
}

.rn-chip-inactivo {
  background: #F3F4F6;
  color: #6B7280;
}

.rn-chip-warn {
  background: #FFFBEB;
  color: #92400E;
}

/* ── Tabla de admin ──────────────────────────────────────────── */
.rn-tabla-wrap {
  overflow-x: auto;
  border-radius: var(--rn-radio);
  border: 1px solid var(--rn-borde);
  box-shadow: var(--rn-sombra-s);
}

.rn-tabla {
  width: 100%;
  border-collapse: collapse;
  background: var(--rn-superficie);
}

.rn-tabla thead th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--rn-texto-suave);
  background: var(--rn-fondo-claro);
  padding: 10px 16px;
  text-align: left;
  border-bottom: 1px solid var(--rn-borde);
  white-space: nowrap;
}

.rn-tabla tbody tr {
  border-bottom: 1px solid var(--rn-borde-suave);
  transition: background var(--rn-transicion);
}

.rn-tabla tbody tr:last-child { border-bottom: none; }
.rn-tabla tbody tr:hover { background: var(--rn-fondo-claro); }

.rn-tabla td {
  padding: 12px 16px;
  font-size: 14px;
  color: var(--rn-texto);
  vertical-align: middle;
}

.rn-tabla-coro-celda {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rn-tabla-acciones {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.rn-tabla-acciones form {
  display: inline-flex !important;
  align-items: center;
  margin: 0;
  padding: 0;
}

/* ── Botones ─────────────────────────────────────────────────── */
.rn-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--rn-radio-s);
  border: 1px solid transparent;
  line-height: 1;
  -webkit-appearance: none;
  appearance: none;
  transition: background var(--rn-transicion), box-shadow var(--rn-transicion), transform var(--rn-transicion);
  white-space: nowrap;
  text-decoration: none;
}

.rn-btn:active { transform: scale(0.97); }

.rn-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.rn-btn-primario {
  background: var(--rn-primario);
  color: #fff;
  box-shadow: 0 2px 6px rgba(46,107,124,0.3);
}
.rn-btn-primario:hover {
  background: var(--rn-primario-osc);
  box-shadow: 0 4px 10px rgba(46,107,124,0.4);
}

.rn-btn-secundario {
  background: var(--rn-superficie);
  color: var(--rn-primario);
  border: 1px solid rgba(46,107,124,0.35);
}
.rn-btn-secundario:hover {
  background: var(--rn-primario-pale);
  border-color: var(--rn-primario);
}

.rn-btn-peligro {
  background: var(--rn-superficie);
  color: #991B1B;
  border: 1px solid rgba(153,27,27,0.25);
}
.rn-btn-peligro:hover {
  background: #FEF2F2;
  border-color: #FCA5A5;
}

.rn-btn-sm {
  font-size: 12px;
  padding: 5px 10px;
  height: 30px;
}

.rn-btn-xs {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
}

/* ── Zona propietario ────────────────────────────────────────── */
.rn-zona-admin {
  background: var(--rn-superficie);
  border: 1px solid var(--rn-borde);
  border-top: 3px solid var(--rn-primario);
  border-radius: var(--rn-radio-l);
  padding: 24px;
  margin-top: 32px;
  box-shadow: var(--rn-sombra-m);
}

/* ── Límite de plan ──────────────────────────────────────────── */
.rn-limite-alerta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.rn-limite-alerta .rn-alerta {
  margin: 0;
  padding: 6px 12px;
  font-size: 12px;
}

/* ── Breadcrumb / volver ─────────────────────────────────────── */
.rn-volver {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  transition: color var(--rn-transicion);
  margin-left: 16px;
}

.rn-volver:hover { color: #fff; }

.rn-volver svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Formulario — hero ───────────────────────────────────────── */
.rn-form-hero {
  padding: 28px 0 20px;
  text-align: center;
}

.rn-form-hero h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--rn-texto);
}

.rn-form-hero p {
  font-size: 14px;
  color: var(--rn-texto-suave);
  margin-top: 6px;
}

/* ── Formulario — tarjeta de sección ─────────────────────────── */
.rn-form-card {
  background: var(--rn-superficie);
  border: 1px solid var(--rn-borde);
  border-radius: var(--rn-radio-l);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--rn-sombra-s);
}

.rn-form-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rn-borde-suave);
}

.rn-form-card-icono {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}

.rn-form-card-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--rn-texto);
  line-height: 1.2;
}

.rn-form-card-header p {
  font-size: 12px;
  color: var(--rn-texto-suave);
  margin-top: 3px;
}

/* ── Formulario — campos ─────────────────────────────────────── */
.rn-grupo {
  margin-bottom: 16px;
}

.rn-grupo:last-child { margin-bottom: 0; }

.rn-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--rn-texto-suave);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 5px;
}

.rn-input,
.rn-select,
.rn-textarea {
  width: 100%;
  padding: 9px 12px;
  font-size: 14px;
  color: var(--rn-texto);
  background: #fff;
  border: 1.5px solid rgba(46,107,124,0.2);
  border-radius: var(--rn-radio-s);
  transition: border-color var(--rn-transicion), box-shadow var(--rn-transicion);
  outline: none;
  appearance: none;
}

.rn-input:focus,
.rn-select:focus,
.rn-textarea:focus {
  border-color: var(--rn-primario);
  box-shadow: 0 0 0 3px rgba(46,107,124,0.12);
}

.rn-input::placeholder,
.rn-textarea::placeholder { color: var(--rn-texto-tenue); }

.rn-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234A5E6A' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

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

.rn-ayuda {
  display: block;
  font-size: 11px;
  color: var(--rn-texto-tenue);
  margin-top: 4px;
}

.rn-error {
  display: block;
  font-size: 12px;
  color: #991B1B;
  margin-top: 4px;
}

/* ── Fila 2 columnas ─────────────────────────────────────────── */
.rn-fila-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ── Slug ────────────────────────────────────────────────────── */
.rn-slug-fila {
  display: flex;
  align-items: stretch;
}

.rn-slug-prefijo {
  display: flex;
  align-items: center;
  padding: 9px 12px;
  background: var(--rn-fondo-claro);
  border: 1.5px solid rgba(46,107,124,0.2);
  border-right: none;
  border-radius: var(--rn-radio-s) 0 0 var(--rn-radio-s);
  font-size: 12px;
  color: var(--rn-texto-tenue);
  white-space: nowrap;
  flex-shrink: 0;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rn-slug-fila .rn-input {
  border-radius: 0 var(--rn-radio-s) var(--rn-radio-s) 0;
}

/* ── Logo preview ────────────────────────────────────────────── */
.rn-logo-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--rn-fondo-claro);
  border: 1.5px solid var(--rn-borde);
  border-radius: var(--rn-radio-s);
  margin-bottom: 12px;
}

.rn-logo-preview img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--rn-borde);
}

.rn-logo-preview-info { flex: 1; }

.rn-logo-preview-titulo {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--rn-texto);
}

.rn-logo-preview-ayuda {
  display: block;
  font-size: 11px;
  color: var(--rn-texto-tenue);
  margin-top: 2px;
}

/* ── Voces grid ──────────────────────────────────────────────── */
.rn-voces-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

/* ── Ensayo ──────────────────────────────────────────────────── */
.rn-ensayo {
  position: relative;
  background: var(--rn-fondo-claro);
  border: 1px solid var(--rn-borde);
  border-radius: var(--rn-radio);
  padding: 14px 16px;
  margin-bottom: 10px;
}

.rn-ensayo-etiqueta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--rn-texto-suave);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 10px;
}

.rn-ensayo-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: var(--rn-primario);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
  flex-shrink: 0;
}

.rn-ensayo-fila {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 12px;
}

.rn-ensayo-acciones {
  margin-top: 10px;
}

.rn-quitar-esquina {
  position: absolute;
  top: 10px;
  right: 10px;
}

/* ── Switch toggle ───────────────────────────────────────────── */
.rn-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.rn-switch input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }

.rn-switch-pista {
  position: relative;
  width: 42px;
  height: 24px;
  background: #D1D5DB;
  border-radius: 12px;
  transition: background var(--rn-transicion);
  flex-shrink: 0;
}

.rn-switch-pulgar {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform var(--rn-transicion);
}

.rn-switch input:checked ~ .rn-switch-pista { background: var(--rn-primario); }
.rn-switch input:checked ~ .rn-switch-pista .rn-switch-pulgar { transform: translateX(18px); }

.rn-switch-etiqueta {
  font-size: 14px;
  color: var(--rn-texto);
}

/* ── Red social label ────────────────────────────────────────── */
.rn-red-label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.rn-red-label svg { flex-shrink: 0; }

.rn-red-facebook  { color: #1877F2; }
.rn-red-instagram { color: #E1306C; }
.rn-red-youtube   { color: #FF0000; }
.rn-red-twitter   { color: #1DA1F2; }
.rn-red-tiktok    { color: #000; }
.rn-red-web       { color: var(--rn-primario); }

/* ── Barra de acciones (sticky) ──────────────────────────────── */
.rn-barra-acciones {
  position: sticky;
  bottom: 0;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--rn-borde);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  z-index: 50;
  box-shadow: 0 -4px 12px rgba(28,43,52,0.08);
  margin: 16px -28px -48px;
}

/* ── Separador ───────────────────────────────────────────────── */
.rn-separador {
  height: 1px;
  background: var(--rn-borde);
  margin: 24px 0;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .rn-header-interno { height: auto; padding: 12px 16px; flex-wrap: wrap; gap: 12px; }
  .rn-header-stats { margin-left: 0; flex-wrap: wrap; gap: 12px; }
  .rn-contenedor { padding: 0 16px 48px; }
  .rn-coros-grid { grid-template-columns: 1fr; }
  .rn-fila-2 { grid-template-columns: 1fr; }
  .rn-ensayo-fila { grid-template-columns: 1fr; }
  .rn-tabla-wrap { border-radius: 0; border-left: none; border-right: none; }
  .rn-zona-admin { padding: 16px; }
  .rn-form-card { padding: 16px; }
  .rn-barra-acciones { margin: 16px -16px -48px; padding: 12px 16px; }
  .rn-seccion-header { flex-direction: column; }
}

@media (max-width: 480px) {
  .rn-tabla thead { display: none; }
  .rn-tabla td { display: block; padding: 6px 12px; }
  .rn-tabla td::before {
    content: attr(data-label);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--rn-texto-tenue);
    display: block;
    margin-bottom: 2px;
  }
}

/* ── Auth — páginas de acceso ────────────────────────────── */
.rn-auth-pagina {
  min-height: 100vh;
  background: var(--rn-fondo);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.rn-auth-card {
  background: var(--rn-superficie);
  border: 1px solid var(--rn-borde);
  border-radius: var(--rn-radio-l);
  box-shadow: var(--rn-sombra-l);
  width: 100%;
  max-width: 420px;
  padding: 40px 36px;
}
.rn-auth-card-ancho { max-width: 520px; }
.rn-auth-marca {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  text-decoration: none;
}
.rn-auth-marca img {
  width: 68px;
  height: 68px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: var(--rn-sombra-s);
}
.rn-auth-marca-nombre {
  font-size: 20px;
  font-weight: 800;
  color: var(--rn-primario);
  letter-spacing: -0.3px;
}
.rn-auth-marca-sub {
  font-size: 11px;
  color: var(--rn-texto-tenue);
}
.rn-auth-titulo {
  font-size: 17px;
  font-weight: 700;
  color: var(--rn-texto);
  text-align: center;
  margin: 0 0 20px;
}
.rn-auth-subtitulo {
  font-size: 13px;
  color: var(--rn-texto-suave);
  text-align: center;
  line-height: 1.5;
  margin: -12px 0 20px;
}
.rn-auth-divisor {
  border: none;
  border-top: 1px solid var(--rn-borde);
  margin: 0 0 24px;
}
.rn-auth-status {
  font-size: 13px;
  color: #065F46;
  background: #ECFDF5;
  border: 1px solid #6EE7B7;
  border-radius: var(--rn-radio-s);
  padding: 10px 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.rn-auth-status::before {
  content: '';
  display: block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23065F46' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/contain no-repeat;
}
.rn-auth-error {
  font-size: 12px;
  color: #991B1B;
  margin-top: 4px;
}
.rn-auth-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--rn-texto-suave);
  margin: 4px 0 16px;
  cursor: pointer;
}
.rn-auth-pie {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
}
.rn-auth-pie-derecha { justify-content: flex-end; }
.rn-auth-enlace {
  font-size: 12px;
  color: var(--rn-primario);
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}
.rn-auth-enlace:hover { text-decoration: underline; }

/* ── Perfil — layout ──────────────────────────────────────── */
.rn-perfil-columna {
  max-width: 680px;
  margin: 0 auto;
}
.rn-perfil-columna .rn-form-card + .rn-form-card {
  margin-top: 20px;
}
.rn-peligro-zona {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: var(--rn-radio);
  padding: 24px;
  margin-top: 20px;
}
.rn-peligro-zona-titulo {
  font-size: 15px;
  font-weight: 700;
  color: #991B1B;
  margin: 0 0 6px;
}
.rn-peligro-zona-desc {
  font-size: 13px;
  color: #7F1D1D;
  margin: 0 0 20px;
  line-height: 1.5;
}

/* ── Emoji en hero de formulario ─────────────────────────── */
.rn-form-hero-emoji {
  font-size: 44px;
  line-height: 1;
  margin-bottom: 14px;
}

/* ── Opciones de rol (radio cards) ─────────────────────────── */
.rn-opciones-rol {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.rn-opcion-rol {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--rn-superficie);
  border: 2px solid var(--rn-borde);
  border-radius: var(--rn-radio-l);
  padding: 20px;
  cursor: pointer;
  position: relative;
  transition: border-color var(--rn-transicion), background var(--rn-transicion), box-shadow var(--rn-transicion);
  box-shadow: var(--rn-sombra-s);
}

.rn-opcion-rol input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.rn-opcion-rol:hover {
  border-color: rgba(46,107,124,0.35);
  box-shadow: var(--rn-sombra-m);
}

.rn-opcion-rol:has(input:checked) {
  border-color: var(--rn-primario);
  background: var(--rn-primario-pale);
  box-shadow: var(--rn-sombra-m), 0 0 0 3px rgba(46,107,124,0.1);
}

.rn-opcion-rol-cuerpo {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.rn-opcion-rol-emoji {
  font-size: 32px;
  flex-shrink: 0;
  line-height: 1;
}

.rn-opcion-rol-titulo {
  font-size: 16px;
  font-weight: 700;
  color: var(--rn-texto);
  line-height: 1.2;
  margin-bottom: 4px;
  transition: color var(--rn-transicion);
}

.rn-opcion-rol-desc {
  font-size: 13px;
  color: var(--rn-texto-suave);
  line-height: 1.4;
}

.rn-opcion-rol:has(input:checked) .rn-opcion-rol-titulo {
  color: var(--rn-primario-osc);
}

.rn-opcion-rol-check {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(46,107,124,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--rn-transicion), border-color var(--rn-transicion);
}

.rn-opcion-rol-check svg {
  width: 13px;
  height: 13px;
  stroke: transparent;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke var(--rn-transicion);
}

.rn-opcion-rol:has(input:checked) .rn-opcion-rol-check {
  background: var(--rn-primario);
  border-color: var(--rn-primario);
}

.rn-opcion-rol:has(input:checked) .rn-opcion-rol-check svg {
  stroke: #fff;
}

/* ── Acciones de formulario centradas ────────────────────────── */
.rn-form-acciones-centradas {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 4px 0 32px;
  flex-wrap: wrap;
}

/* ── Flora select dentro de rn-grupo ────────────────────────────────── */
.rn-grupo .fl-campo { width: 100%; margin: 0; }
.rn-grupo .fl-select { position: relative; width: 100%; }

.rn-grupo .fl-select-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 2.5rem 9px 12px;
  font-family: inherit;
  font-size: 14px;
  color: var(--rn-texto);
  background: #fff;
  border: 1.5px solid rgba(46,107,124,0.2);
  border-radius: var(--rn-radio-s);
  transition: border-color var(--rn-transicion), box-shadow var(--rn-transicion);
  outline: none;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
}

.rn-grupo .fl-select[data-fl-abierto="true"] .fl-select-trigger,
.rn-grupo .fl-select-trigger:focus {
  border-color: var(--rn-primario);
  box-shadow: 0 0 0 3px rgba(46,107,124,0.12);
}

.rn-grupo .fl-select-valor {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rn-grupo .fl-select-trigger[data-fl-sin-valor="true"] .fl-select-valor {
  color: var(--rn-texto-tenue);
}

.rn-grupo .fl-select-trigger::after {
  top: 50%;
  margin-top: 0;
  transform: translateY(-50%);
}

.rn-grupo .fl-select[data-fl-abierto="true"] .fl-select-trigger::after {
  transform: translateY(-50%) rotate(180deg);
}

.rn-grupo .fl-select-limpiar {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}
