/* === ESTILOS GENERALES === */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
  background-color: #F8FAFC;
  color: #1E293B;
  line-height: 1.5;
}

.oculto {
  display: none !important;
}

.contenedor {
  max-width: 1050px;
  margin: 0 auto;
  padding: 20px;
}

/* === BARRA SUPERIOR === */
.navbar {
  background-color: #0F172A;
  color: #FFFFFF;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 800;
  color: #10B981;
}

.logo-img {
  height: 38px;
  width: 38px;
  object-fit: cover;
  border-radius: 8px;
}


.logo span {
  color: #FFFFFF;
  font-size: 0.85rem;
  font-weight: 500;
}

.menu {
  display: flex;
  gap: 8px;
}

.menu button {
  background: transparent;
  border: 1px solid #334155;
  color: #CBD5E1;
  padding: 7px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.menu button.activo,
.menu button:hover {
  background: #10B981;
  border-color: #10B981;
  color: #0F172A;
}

.wallet-box {
  background: #1E293B;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.82rem;
  color: #34D399;
  font-family: monospace;
}

/* === SELECTOR DE ROL (DEMO) === */
.barra-demo {
  background: #EFF6FF;
  border-bottom: 1px solid #BFDBFE;
  padding: 10px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

.barra-demo button {
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid #93C5FD;
  background: #FFFFFF;
  cursor: pointer;
  font-weight: 600;
}

.barra-demo button.activo {
  background: #2563EB;
  color: #FFFFFF;
  border-color: #2563EB;
}

/* === TARJETAS Y GRID === */
.caja {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.fila-entre {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.subtexto {
  color: #64748B;
  font-size: 0.92rem;
}

.verde { color: #059669; }
.rojo { color: #DC2626; }

/* === FORMULARIOS Y BOTONES === */
label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 5px;
  margin-top: 12px;
}

input, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  font-size: 0.95rem;
}

button {
  cursor: pointer;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 0.92rem;
  transition: opacity 0.15s;
}

button:hover {
  opacity: 0.9;
}

.btn-primario { background: #2563EB; color: #FFFFFF; width: 100%; margin-top: 14px; }
.btn-verde { background: #10B981; color: #0F172A; width: 100%; margin-top: 10px; }
.btn-rojo { background: #EF4444; color: #FFFFFF; width: 100%; margin-top: 10px; }
.btn-azul { background: #0284C7; color: #FFFFFF; width: 100%; }
.btn-oscuro { background: #1E293B; color: #FFFFFF; margin-top: 10px; }
.btn-secundario { background: #E2E8F0; color: #1E293B; }

/* === ETIQUETAS DE ESTADO === */
.badge-amarillo { background: #FEF3C7; color: #92400E; padding: 4px 10px; border-radius: 20px; font-size: 0.8rem; font-weight: 700; }
.badge-verde { background: #D1FAE5; color: #065F46; padding: 4px 10px; border-radius: 20px; font-size: 0.8rem; font-weight: 700; }
.badge-azul { background: #DBEAFE; color: #1E40AF; padding: 4px 10px; border-radius: 20px; font-size: 0.8rem; font-weight: 700; }
.badge-rojo { background: #FEE2E2; color: #991B1B; padding: 4px 10px; border-radius: 20px; font-size: 0.8rem; font-weight: 700; }

/* === BARRA DE PROGRESO (4 PASOS) === */
.pasos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 16px 0;
}

.paso {
  background: #F1F5F9;
  color: #64748B;
  text-align: center;
  padding: 10px 6px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
}

.paso.activo {
  background: #10B981;
  color: #0F172A;
}

/* === CHAT MULTIMEDIA === */
.chat-caja {
  height: 310px;
  overflow-y: auto;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.msg {
  max-width: 82%;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.9rem;
}

.msg img, .msg video {
  width: 100%;
  max-width: 260px;
  border-radius: 6px;
  margin-top: 8px;
  display: block;
}

.msg-sistema {
  align-self: center;
  background: #E2E8F0;
  color: #334155;
  font-size: 0.82rem;
  text-align: center;
}

.msg-mio {
  align-self: flex-end;
  background: #DBEAFE;
  color: #1E3A8A;
}

.msg-otro {
  align-self: flex-start;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
}

/* === MODALES (BIENVENIDA Y TUTORIALES) === */
.modal-fondo {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  z-index: 1000;
}

.modal-caja {
  background: #FFFFFF;
  border-radius: 14px;
  max-width: 560px;
  width: 100%;
  padding: 24px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
}

.tarjeta-rol {
  border: 2px solid #E2E8F0;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.tarjeta-rol:hover {
  border-color: #10B981;
  background: #ECFDF5;
}

/* === ADVERTENCIA DE WALLET === */
.alerta-wallet {
  background: #FFFBEB;
  border: 1px solid #F59E0B;
  border-left: 4px solid #D97706;
  color: #92400E;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 8px;
  line-height: 1.4;
}

.alerta-wallet code {
  background: #FEF3C7;
  padding: 1px 4px;
  border-radius: 4px;
  font-weight: 700;
}

.estado-wallet-texto {
  margin-top: 6px;
  font-weight: 700;
  font-size: 0.82rem;
}
