/* Panel de campañas. Sin dependencias. */
:root {
  --fondo: #f5f6f8;
  --panel: #ffffff;
  --texto: #1c2330;
  --suave: #5d6878;
  --borde: #d9dee6;
  --marca: #0b5cad;
  --marca-oscura: #084784;
  --ok: #1a7f4b;
  --ok-fondo: #e6f4ec;
  --error: #b3261e;
  --error-fondo: #fbe9e7;
  --aviso-fondo: #fff4d6;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--marca); }
h1 { font-size: 1.5rem; margin: 0 0 .75rem; }
h2 { font-size: 1.1rem; margin: 1.5rem 0 .5rem; }
h2 small { font-weight: normal; }
small { color: var(--suave); }
code { background: #eef1f5; padding: .1em .35em; border-radius: 4px; font-size: .92em; }

.barra {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem;
  padding: .75rem 1rem; background: var(--texto);
}
.barra a { color: #cfd6e0; text-decoration: none; }
.barra .marca { color: #fff; font-weight: 600; }
.barra nav { display: flex; gap: 1rem; }
.barra nav a.activo { color: #fff; border-bottom: 2px solid #fff; }
.barra .sesion { display: flex; align-items: center; gap: 1rem; margin-left: auto; }
.barra .sesion a.activo { color: #fff; }
.barra .sesion form { margin: 0; }
.barra .sesion .enlace { color: #cfd6e0; text-decoration: none; }
.barra .sesion .enlace:hover { color: #fff; }
.pie { max-width: 1150px; margin: 0 auto; padding: 0 1rem 1.5rem; color: var(--suave); font-size: .82rem; }
.entrada { max-width: 26rem; }
.en-fila { display: flex; gap: .5rem; align-items: center; min-width: 16rem; }

main { max-width: 1150px; margin: 0 auto; padding: 1.25rem 1rem 3rem; }

.fila-titulo, .titulo-campana { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-bottom: .75rem; }
.fila-titulo { justify-content: space-between; }
.fila-titulo h1, .titulo-campana h1 { margin: 0; }

.pestanas { display: flex; flex-wrap: wrap; gap: .25rem; border-bottom: 1px solid var(--borde); margin-bottom: 1rem; }
.pestanas a { padding: .5rem .9rem; text-decoration: none; color: var(--suave); border-bottom: 3px solid transparent; }
.pestanas a.activo { color: var(--marca); border-bottom-color: var(--marca); font-weight: 600; }

.aviso { padding: .65rem .9rem; border-radius: 6px; margin: 0 0 1rem; }
.aviso-ok { background: var(--ok-fondo); color: var(--ok); }
.aviso-error { background: var(--error-fondo); color: var(--error); }
.aviso-pendiente { background: var(--aviso-fondo); color: #7a5600; }
.boton-mini { padding: .2rem .6rem; font-size: .85rem; }
.botones form.primero { margin: 0 .6rem 0 0; }
.barra-acciones { flex-wrap: wrap; margin-bottom: 1rem; }
.cifra strong.pequeno { font-size: 1rem; line-height: 1.8; }
audio { width: 100%; max-width: 32rem; }
.vacio { background: var(--panel); border: 1px dashed var(--borde); border-radius: 8px; padding: 1.25rem; color: var(--suave); }
.ayuda { color: var(--suave); margin: 0 0 .75rem; }

.tabla-scroll { overflow-x: auto; background: var(--panel); border: 1px solid var(--borde); border-radius: 8px; margin-bottom: 1.25rem; }
table { border-collapse: collapse; width: 100%; }
th, td { padding: .55rem .75rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--borde); }
th { font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; color: var(--suave); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tr.en-edicion { background: var(--aviso-fondo); }
.num { text-align: right; }
.nowrap { white-space: nowrap; }
.detalles { max-width: 26rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.botones { white-space: nowrap; text-align: right; }
.botones form { display: inline; margin-left: .6rem; }

.estado { display: inline-block; padding: .05rem .55rem; border-radius: 999px; font-size: .8rem; background: #e7eaef; color: var(--suave); white-space: nowrap; }
.estado-activa, .estado-completado { background: var(--ok-fondo); color: var(--ok); }
.estado-pausada, .estado-en_curso, .estado-sin_respuesta { background: var(--aviso-fondo); color: #7a5600; }
.estado-no_llamar, .estado-fallido { background: var(--error-fondo); color: var(--error); }

.ficha { margin-bottom: 1.25rem; }
fieldset { background: var(--panel); border: 1px solid var(--borde); border-radius: 8px; padding: 1rem; margin: 0 0 .75rem; min-width: 0; }
legend { font-weight: 600; padding: 0 .4rem; }
label { display: block; margin-bottom: .8rem; font-weight: 500; }
label small { font-weight: normal; }
input, select, textarea {
  display: block; width: 100%; margin-top: .25rem; padding: .5rem .6rem;
  border: 1px solid var(--borde); border-radius: 6px; background: #fff; color: inherit; font: inherit;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--marca); outline-offset: 1px; }
input[type=checkbox] { display: inline-block; width: auto; margin: 0 .4rem 0 0; }
input[type=file] { padding: .35rem; }
.casilla { font-weight: normal; }
.columnas { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 1rem; }
[hidden] { display: none !important; }
.en-linea label { max-width: 28rem; }

.acciones { display: flex; align-items: center; gap: 1rem; }
.boton {
  display: inline-block; padding: .5rem 1rem; border: 0; border-radius: 6px; cursor: pointer;
  background: var(--marca); color: #fff; font: inherit; font-weight: 600; text-decoration: none;
}
.boton:hover { background: var(--marca-oscura); }
.boton-secundario { background: #fff; color: var(--marca); border: 1px solid var(--marca); }
.boton-secundario:hover { background: #eef4fb; }
.boton-peligro { background: #fff; color: var(--error); border: 1px solid var(--error); }
.boton-peligro:hover { background: var(--error-fondo); }
.enlace { background: none; border: 0; padding: 0; font: inherit; color: var(--marca); cursor: pointer; text-decoration: underline; }
.peligro { color: var(--error); }
.zona-peligro { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--borde); }

.bloque {
  background: var(--panel); border: 1px solid var(--borde); border-radius: 8px; padding: 1rem;
  white-space: pre-wrap; overflow-wrap: anywhere; font: 13.5px/1.55 ui-monospace, Consolas, monospace; margin: 0;
}

.cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .6rem; margin-bottom: 1.25rem; }
.cifra { background: var(--panel); border: 1px solid var(--borde); border-radius: 8px; padding: .7rem .9rem; }
.cifra strong { display: block; font-size: 1.5rem; line-height: 1.2; }
.cifra span { color: var(--suave); font-size: .85rem; }
