/* ============================================================================
   MINUTAS GONZAGA — Hoja de estilos institucional (migración cPanel)
   Paleta y tipografía EXACTAS del prompt de migración.
   ============================================================================ */

:root {
  /* ============ 🎨 CAMBIAR COLOR PRINCIPAL AQUÍ ============ */
  --color-primary: #123F85;        /* Azul profundo - principal */
  --color-primary-dark: #0C2F66;   /* Versión oscura del primario */
  --color-accent: #C11734;         /* Rojo - acentos (zonas humanas) */
  --color-accent-light: #E84A66;   /* Rojo claro */
  --color-bg: #FAF7F2;             /* Crema - fondo general */
  --color-bg-alt: #F2EDE3;         /* Crema alternativo */
  --color-text: #2A2A2A;           /* Texto principal */
  --color-text-soft: #5A5A5A;      /* Texto secundario */
  --color-border: #E5DED1;         /* Bordes suaves */
  --color-success: #4A8B6F;        /* Verde para éxito */
  --color-error: #B85450;          /* Rojo para errores */

  /* ============ 📝 CAMBIAR TIPOGRAFÍA AQUÍ ============ */
  --font-display: 'Montserrat', -apple-system, sans-serif;
  --font-body: 'Montserrat', -apple-system, sans-serif;

  /* Semáforo de duración de grabación (heredado del original) */
  --semaforo-verde: #16A34A;  --semaforo-verde-bg: #DCFCE7;
  --semaforo-ambar: #B48A0B;  --semaforo-ambar-bg: #FEF9C3;
  --semaforo-rojo:  #C11734;  --semaforo-rojo-bg:  #FDE3E7;
}

/* ---------------------------------------------------------------- Base */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-dark); }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--color-primary); font-weight: 700; line-height: 1.25; }
img { max-width: 100%; }

/* Animación de aparición suave */
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.fade-in { animation: fade-in .35s ease both; }
/* Listas con aparición escalonada */
.lista-escalonada > * { animation: fade-in .35s ease both; }
.lista-escalonada > *:nth-child(1) { animation-delay: .00s; }
.lista-escalonada > *:nth-child(2) { animation-delay: .05s; }
.lista-escalonada > *:nth-child(3) { animation-delay: .10s; }
.lista-escalonada > *:nth-child(4) { animation-delay: .15s; }
.lista-escalonada > *:nth-child(5) { animation-delay: .20s; }
.lista-escalonada > *:nth-child(n+6) { animation-delay: .25s; }

/* ---------------------------------------------------------------- Layout */
.disposicion { display: flex; min-height: 100vh; }
.contenido { flex: 1; padding: 1.5rem; max-width: 100%; min-width: 0; }
.contenedor-md { max-width: 56rem; margin: 0 auto; }
.contenedor-lg { max-width: 72rem; margin: 0 auto; }

/* Sidebar (288px como el original) */
.sidebar {
  width: 288px; flex-shrink: 0; background: #fff;
  border-right: 1px solid var(--color-border);
  display: flex; flex-direction: column; min-height: 100vh;
}
.sidebar-cabecera { background: var(--color-primary); color: #fff; padding: 1.25rem 1.5rem; }
.sidebar-cabecera .titulo { font-weight: 700; font-size: 1.15rem; }
.sidebar-cabecera .lema { font-style: italic; font-size: .8rem; color: var(--color-accent-light); }
.sidebar-cabecera .sub { font-size: .72rem; opacity: .75; margin-top: .15rem; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 1rem .75rem; }
.sidebar-nav a {
  display: flex; align-items: center; gap: .6rem;
  padding: .55rem .8rem; border-radius: .5rem; margin-bottom: .15rem;
  color: var(--color-text); font-size: .92rem; transition: background .15s;
}
.sidebar-nav a:hover { background: var(--color-bg-alt); }
.sidebar-nav a.activo { background: var(--color-primary); color: #fff; }
.sidebar-nav a svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-separador {
  font-size: .68rem; letter-spacing: .1em; color: var(--color-accent);
  font-weight: 700; margin: 1rem .8rem .4rem; text-transform: uppercase;
  border-top: 1px solid var(--color-border); padding-top: .9rem;
}
.sidebar-usuario { border-top: 1px solid var(--color-border); padding: 1rem 1.5rem; font-size: .85rem; }
.sidebar-usuario .rol { color: var(--color-accent); font-size: .7rem; font-weight: 700; text-transform: uppercase; }
.sidebar-pie { padding: .8rem 1.5rem; font-size: .7rem; color: var(--color-text-soft); font-style: italic; background: var(--color-bg-alt); }
.badge-alertas {
  background: var(--color-accent); color: #fff; font-size: .68rem; font-weight: 700;
  border-radius: 999px; padding: .05rem .45rem; margin-left: auto;
}

/* Responsive: sidebar deslizable en móvil */
.barra-movil { display: none; }
@media (max-width: 1023px) {
  .sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 50;
    transform: translateX(-100%); transition: transform .25s ease;
  }
  .sidebar.abierta { transform: none; }
  .overlay-movil {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 40;
  }
  .overlay-movil.visible { display: block; }
  .barra-movil {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--color-primary); color: #fff; padding: .75rem 1rem;
    position: sticky; top: 0; z-index: 30;
  }
  .barra-movil button { background: none; border: 0; color: #fff; font-size: 1.4rem; cursor: pointer; }
  .contenido { padding: 1rem; }
}

/* ---------------------------------------------------------------- Componentes */
.tarjeta {
  background: #fff; border: 1px solid var(--color-border);
  border-radius: .75rem; box-shadow: 0 1px 3px rgba(18,63,133,.06);
  padding: 1.5rem; margin-bottom: 1.25rem;
}
.titulo-seccion { font-size: 1.5rem; margin-bottom: .25rem; }
.subtitulo { color: var(--color-text-soft); font-size: .9rem; }

.btn {
  display: inline-flex; align-items: center; gap: .45rem; cursor: pointer;
  font-family: var(--font-body); font-weight: 600; font-size: .9rem;
  border-radius: .5rem; padding: .55rem 1.1rem; border: 1px solid transparent;
  transition: background .15s, color .15s; text-decoration: none;
}
.btn-primario { background: var(--color-primary); color: #fff; }
.btn-primario:hover { background: var(--color-primary-dark); color: #fff; }
.btn-secundario { background: #fff; color: var(--color-primary); border-color: var(--color-primary); }
.btn-secundario:hover { background: var(--color-bg-alt); }
.btn-acento { background: var(--color-accent); color: #fff; }
.btn-acento:hover { background: #A01229; color: #fff; }
.btn-peligro { background: var(--color-error); color: #fff; }
.btn-exito { background: var(--color-success); color: #fff; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-chico { padding: .3rem .7rem; font-size: .78rem; }

label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: .3rem; }
.input-base, input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], input[type=datetime-local], select, textarea {
  width: 100%; font-family: var(--font-body); font-size: .95rem;
  padding: .55rem .8rem; border: 1px solid var(--color-border); border-radius: .5rem;
  background: #fff; color: var(--color-text);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--color-primary); outline-offset: 1px; border-color: var(--color-primary);
}
.campo { margin-bottom: 1rem; }

/* Mensajes */
.aviso { border-radius: .5rem; padding: .8rem 1rem; margin-bottom: 1rem; font-size: .9rem; }
.aviso-error { background: #FDF0EF; border: 1px solid var(--color-error); color: #7A3230; }
.aviso-exito { background: #EEF6F1; border: 1px solid var(--color-success); color: #2F5A47; }
.aviso-info  { background: #EFF3FA; border: 1px solid var(--color-primary); color: var(--color-primary-dark); }
.aviso-ambar { background: var(--semaforo-ambar-bg); border: 1px solid var(--semaforo-ambar); color: #6b5309; }

/* Estados vacíos */
.estado-vacio { text-align: center; padding: 3rem 1rem; color: var(--color-text-soft); }
.estado-vacio .icono { font-size: 2.6rem; margin-bottom: .5rem; opacity: .5; }

/* Badges de estado */
.badge { display: inline-block; font-size: .72rem; font-weight: 600; padding: .15rem .6rem; border-radius: 999px; }
.badge-completada    { background: #EEF6F1; color: var(--color-success); }
.badge-transcribiendo, .badge-sintetizando { background: #EFF3FA; color: var(--color-primary); }
.badge-grabando      { background: var(--semaforo-ambar-bg); color: #6b5309; }
.badge-error         { background: #FDF0EF; color: var(--color-error); }
.badge-abierto       { background: #EFF3FA; color: var(--color-primary); }
.badge-en_proceso    { background: var(--semaforo-ambar-bg); color: #6b5309; }
.badge-cumplido      { background: #EEF6F1; color: var(--color-success); }
.badge-pospuesto     { background: var(--color-bg-alt); color: var(--color-text-soft); }
.badge-cancelado     { background: var(--color-bg-alt); color: var(--color-text-soft); text-decoration: line-through; }
.badge-alta  { background: #FDE3E7; color: var(--color-accent); }
.badge-media { background: var(--semaforo-ambar-bg); color: #6b5309; }
.badge-baja  { background: var(--color-bg-alt); color: var(--color-text-soft); }

/* Tablas */
.tabla { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tabla th { text-align: left; color: var(--color-text-soft); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; padding: .5rem .75rem; border-bottom: 2px solid var(--color-border); }
.tabla td { padding: .6rem .75rem; border-bottom: 1px solid var(--color-border); vertical-align: top; }
.tabla tr:hover td { background: var(--color-bg); }
.tabla-envoltura { overflow-x: auto; }
.fila-inactiva { opacity: .5; }

/* Modales */
.modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 60; align-items: center; justify-content: center; padding: 1rem;
}
.modal-overlay.visible { display: flex; }
.modal {
  background: #fff; border-radius: .75rem; max-width: 34rem; width: 100%;
  max-height: 90vh; overflow-y: auto; padding: 1.5rem; animation: fade-in .2s ease;
}
.modal h3 { margin-bottom: 1rem; }

/* Métricas del dashboard */
.grid-metricas { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.metrica { background: #fff; border: 1px solid var(--color-border); border-radius: .75rem; padding: 1.1rem 1.25rem; }
.metrica .valor { font-size: 1.9rem; font-weight: 700; color: var(--color-primary); font-family: var(--font-display); }
.metrica .etiqueta { font-size: .78rem; color: var(--color-text-soft); }

/* Grillas genéricas */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 700px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- Minuta */
/* La crónica se lee en serif, como el original */
.prosa-cronica { font-family: Georgia, 'Times New Roman', serif; font-size: 1.02rem; text-align: justify; }
.prosa-cronica p { margin-bottom: .9rem; }
.etiqueta-origen { font-size: .75rem; color: var(--color-text-soft); font-style: italic; margin-bottom: .6rem; }

/* Apuntes del coordinador (NOVEDAD): zona humana en rojo */
.apunte {
  border-left: 4px solid var(--color-accent); background: var(--color-bg);
  padding: .8rem 1rem; margin: .8rem 0; font-style: italic; border-radius: 0 .5rem .5rem 0;
}
.apunte-firma { font-size: .78rem; color: var(--color-accent); margin-top: .35rem; font-style: normal; font-weight: 600; }
.apunte-acciones { margin-top: .35rem; display: flex; gap: .5rem; }

/* Temas tratados (NOVEDAD) */
.temas-lista { counter-reset: tema; list-style: none; }
.temas-lista li { counter-increment: tema; padding: .45rem 0 .45rem 2.4rem; position: relative; border-bottom: 1px dashed var(--color-border); }
.temas-lista li::before {
  content: counter(tema); position: absolute; left: 0; top: .45rem;
  width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--color-primary);
  color: #fff; font-size: .78rem; font-weight: 700; display: flex; align-items: center; justify-content: center;
}

/* Compromiso cumplido: visible, tachado, con etiqueta verde discreta (NOVEDAD) */
.compromiso-cumplido .descripcion { text-decoration: line-through; color: var(--color-text-soft); }
.sello-cumplido { color: var(--color-success); font-size: .78rem; font-weight: 600; }

/* Vinculaciones */
.vinculacion-plan { background: #EFF3FA; border-left: 3px solid var(--color-primary); padding: .7rem 1rem; margin: .5rem 0; border-radius: 0 .5rem .5rem 0; }
.vinculacion-calidad { background: var(--color-bg-alt); border-left: 3px solid var(--color-accent-light); padding: .7rem 1rem; margin: .5rem 0; border-radius: 0 .5rem .5rem 0; }
.caja-evidencias { background: #FDF3F4; padding: .5rem .8rem; margin-top: .4rem; font-size: .85rem; border-radius: .4rem; }

/* ---------------------------------------------------------------- Grabadora */
.cronometro {
  font-size: 2.6rem; font-weight: 700; font-family: var(--font-display);
  text-align: center; padding: 1rem; border-radius: .75rem; transition: background .3s;
}
.semaforo-verde { color: var(--semaforo-verde); } .semaforo-bg-verde { background: var(--semaforo-verde-bg); }
.semaforo-ambar { color: var(--semaforo-ambar); } .semaforo-bg-ambar { background: var(--semaforo-ambar-bg); }
.semaforo-rojo  { color: var(--semaforo-rojo); }  .semaforo-bg-rojo  { background: var(--semaforo-rojo-bg); }
@keyframes pulso-grabacion { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .75; transform: scale(1.02); } }
.grabando { animation: pulso-grabacion 1.5s ease-in-out infinite; }
.barra-progreso { height: .5rem; background: var(--color-bg-alt); border-radius: 999px; overflow: hidden; margin-top: .6rem; }
.barra-progreso > div { height: 100%; background: var(--color-primary); transition: width .2s; }

/* ---------------------------------------------------------------- Chat */
.chat-disposicion { display: flex; gap: 1rem; height: calc(100vh - 8rem); }
.chat-aside { width: 288px; flex-shrink: 0; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--color-border); border-radius: .75rem; overflow: hidden; }
.chat-aside .lista { flex: 1; overflow-y: auto; }
.chat-aside .item { display: block; padding: .7rem 1rem; border-bottom: 1px solid var(--color-border); font-size: .85rem; position: relative; }
.chat-aside .item:hover { background: var(--color-bg); }
.chat-aside .item.activo { background: var(--color-bg-alt); border-left: 3px solid var(--color-primary); }
.chat-panel { flex: 1; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--color-border); border-radius: .75rem; overflow: hidden; min-width: 0; }
.chat-cabecera { background: var(--color-primary); color: #fff; padding: .8rem 1.2rem; font-weight: 600; }
.chat-mensajes { flex: 1; overflow-y: auto; padding: 1.2rem; display: flex; flex-direction: column; gap: .7rem; }
.burbuja { max-width: 75%; padding: .7rem 1rem; border-radius: .9rem; font-size: .92rem; white-space: pre-wrap; }
.burbuja-usuario { align-self: flex-end; background: var(--color-primary); color: #fff; border-bottom-right-radius: .2rem; }
.burbuja-asistente { align-self: flex-start; background: var(--color-bg); border: 1px solid var(--color-border); border-bottom-left-radius: .2rem; }
.chat-entrada { display: flex; gap: .6rem; padding: .8rem; border-top: 1px solid var(--color-border); }
.escribiendo span { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--color-text-soft); margin-right: 3px; animation: rebote 1s infinite; }
.escribiendo span:nth-child(2) { animation-delay: .15s; }
.escribiendo span:nth-child(3) { animation-delay: .3s; }
@keyframes rebote { 0%,100% { transform: none; } 50% { transform: translateY(-4px); } }
@media (max-width: 800px) { .chat-disposicion { flex-direction: column; height: auto; } .chat-aside { width: 100%; max-height: 200px; } .chat-panel { min-height: 60vh; } }

/* ---------------------------------------------------------------- Login */
.login-fondo { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem;
  background: linear-gradient(160deg, var(--color-bg) 60%, var(--color-bg-alt)); }
/* >>> CAMBIAR FONDO AQUÍ: sustituya el gradiente por una imagen si lo desean <<< */
.login-caja { width: 100%; max-width: 26rem; }
.login-cabecera { text-align: center; margin-bottom: 1.5rem; }
.login-cabecera .lema { color: var(--color-accent); font-style: italic; font-size: .9rem; }
.login-tarjeta { background: #fff; border-radius: .75rem; border-top: 4px solid var(--color-primary);
  box-shadow: 0 4px 16px rgba(18,63,133,.1); padding: 2rem; }
.login-pie { text-align: center; font-size: .78rem; color: var(--color-text-soft); font-style: italic; margin-top: 1.25rem; }

/* Toggle switch (panel de funcionalidades) */
.toggle { position: relative; display: inline-block; width: 48px; height: 28px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle .pista { position: absolute; inset: 0; background: var(--color-border); border-radius: 999px; transition: .2s; cursor: pointer; }
.toggle .pista::before { content: ''; position: absolute; width: 22px; height: 22px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.toggle input:checked + .pista { background: var(--color-primary); }
.toggle input:checked + .pista::before { transform: translateX(20px); }

/* Pastillas de filtro */
.pastillas { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.pastilla { border: 1px solid var(--color-border); background: #fff; border-radius: 999px; padding: .35rem .9rem; font-size: .82rem; cursor: pointer; color: var(--color-text); }
.pastilla.activa { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* Utilidades */
.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-05 { gap: .5rem; } .gap-1 { gap: 1rem; } .wrap { flex-wrap: wrap; }
.mt-1 { margin-top: 1rem; } .mb-05 { margin-bottom: .5rem; } .mb-1 { margin-bottom: 1rem; }
.texto-suave { color: var(--color-text-soft); } .texto-chico { font-size: .8rem; }
.texto-derecha { text-align: right; } .texto-centro { text-align: center; }
.oculto { display: none !important; }
code { background: var(--color-bg-alt); padding: .1rem .4rem; border-radius: .3rem; font-size: .85em; }
