/* BuscaEmpleo — mobile-first: columna única, tab bar inferior, botones grandes, texto legible */
:root { --azul: #1f3a5f; --azul2: #2e5a8f; --fondo: #f4f6fa; --borde: #dde3ec; --ok: #1e8e3e; --warn: #c77700; --rojo: #c0392b; --texto: #1f2933; --gris: #6b7785; --tab: 64px; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 17px; }
body { margin: 0; font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; background: var(--fondo); color: var(--texto); line-height: 1.45; padding-bottom: calc(var(--tab) + env(safe-area-inset-bottom)); }
.cabecera { position: sticky; top: 0; z-index: 20; background: var(--azul); color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; gap: 10px; }
.cabecera .logo { color: #fff; text-decoration: none; font-weight: 800; font-size: 1.15rem; }
.estado-worker { display: flex; align-items: center; gap: 8px; font-size: .8rem; opacity: .92; max-width: 55%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.punto { width: 10px; height: 10px; border-radius: 50%; background: #2ecc71; box-shadow: 0 0 6px #2ecc71; flex-shrink: 0; }
.punto.pausa { background: #f39c12; box-shadow: none; }
.aviso-ia { background: #fff3cd; color: #7a5200; padding: 10px 16px; font-size: .9rem; }
main { padding: 18px 16px 24px; max-width: 760px; margin: 0 auto; }
@media (min-width: 1000px) { main { max-width: 980px; } }
h1 { margin: 0 0 6px; font-size: 1.5rem; color: var(--azul); line-height: 1.2; } h2 { font-size: 1.15rem; color: var(--azul); margin: 20px 0 10px; } h3 { font-size: 1rem; margin: 14px 0 6px; }
.sub { color: var(--gris); margin: 0 0 18px; font-size: .98rem; }
.tarjeta { background: #fff; border: 1px solid var(--borde); border-radius: 16px; padding: 18px; margin-bottom: 16px; }
.fila { display: flex; gap: 12px; flex-wrap: wrap; } .fila > * { flex: 1 1 200px; }
label { display: block; font-size: .9rem; color: var(--gris); margin-bottom: 6px; font-weight: 600; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=date], input[type=month], input[type=password], select, textarea {
  width: 100%; padding: 14px; border: 1.5px solid var(--borde); border-radius: 12px; font: inherit; font-size: 1.05rem; background: #fff; color: var(--texto); }
select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231f3a5f' stroke-width='2.5'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid #bcd3f3; border-color: var(--azul2); }
input[type=file] { padding: 10px; font-size: .95rem; }
.campo { margin-bottom: 14px; }
button, .btn { background: var(--azul); color: #fff; border: 0; border-radius: 14px; padding: 15px 20px; font: inherit; font-size: 1.05rem; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; }
button:hover, .btn:hover { background: var(--azul2); }
button.sec, .btn.sec { background: #e8eef7; color: var(--azul); } button.sec:hover, .btn.sec:hover { background: #d9e3f2; }
button.peligro { background: var(--rojo); } button.ok, .btn.ok { background: var(--ok); } button.ok:hover, .btn.ok:hover { background: #187a35; }
button.peq, .btn.peq { padding: 8px 12px; font-size: .9rem; min-height: 38px; border-radius: 10px; }
button.bloque, .btn.bloque { width: 100%; }
button:disabled { opacity: .5; cursor: wait; }
.acciones { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; align-items: center; }
.acciones > button, .acciones > .btn { flex: 1 1 auto; }
.chip { display: inline-block; background: #e8eef7; color: var(--azul); border-radius: 20px; padding: 4px 12px; font-size: .85rem; margin: 2px; }
.chip.ok { background: #e3f5e8; color: var(--ok); } .chip.warn { background: #fff3cd; color: #7a5200; } .chip.rojo { background: #fdecea; color: var(--rojo); } .chip.gris { background: #eee; color: #666; }
.lista-items .item { border: 1px dashed var(--borde); border-radius: 12px; padding: 12px; margin-bottom: 10px; background: #fafbfd; position: relative; }
.lista-items .item .quitar { position: absolute; right: 8px; top: 6px; background: transparent; color: var(--rojo); padding: 4px 8px; min-height: 0; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
@media (min-width: 700px) { .kpis { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); } }
.kpi { background: #fff; border: 1px solid var(--borde); border-radius: 14px; padding: 12px 8px; text-align: center; cursor: pointer; }
.kpi b { display: block; font-size: 1.5rem; color: var(--azul); } .kpi small { color: var(--gris); font-size: .8rem; }
.kpi.activo { outline: 3px solid var(--azul2); }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid var(--borde); font-size: .92rem; vertical-align: top; }
th { background: #eef2f8; color: var(--azul); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
/* Tablas en móvil: cada fila es una tarjeta */
@media (max-width: 700px) {
  table.responsive thead { display: none; }
  table.responsive tr { display: block; border: 1px solid var(--borde); border-radius: 12px; margin-bottom: 10px; padding: 6px 0; background: #fff; }
  table.responsive td { display: block; border: 0; padding: 4px 12px; }
  table.responsive td[data-t]::before { content: attr(data-t) ": "; color: var(--gris); font-size: .8rem; }
  table.responsive td.solo-escritorio { display: none; }
}
.nota { display: inline-block; min-width: 40px; text-align: center; border-radius: 8px; padding: 3px 8px; font-weight: 800; color: #fff; }
.nota.alta { background: var(--ok); } .nota.media { background: var(--warn); } .nota.baja { background: #999; }
.estado { font-size: .8rem; font-weight: 700; padding: 3px 10px; border-radius: 8px; background: #eee; white-space: nowrap; }
.estado.aplicada { background: #e3f5e8; color: var(--ok); } .estado.revisar { background: #fff3cd; color: #7a5200; }
.estado.entrevista, .estado.respondida { background: #e0ecff; color: var(--azul); } .estado.descartada, .estado.rechazada { background: #fdecea; color: var(--rojo); }
.estado.llamar, .estado.manual { background: #f3e8ff; color: #6b21a8; }
#toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tab) + 16px); background: #222; color: #fff; padding: 12px 18px; border-radius: 12px; opacity: 0; transition: .3s; pointer-events: none; max-width: 92vw; z-index: 50; font-size: .95rem; }
#toast.ver { opacity: 1; }
.log { background: #10203a; color: #cfe0ff; font-family: Consolas, monospace; font-size: .8rem; padding: 12px; border-radius: 12px; max-height: 220px; overflow: auto; white-space: pre-wrap; }
.pregunta { background: #fff8e6; border-left: 4px solid var(--warn); padding: 10px 14px; border-radius: 8px; margin-bottom: 8px; }
.grid2 { display: grid; grid-template-columns: 1fr; gap: 14px; } @media (min-width: 800px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.grid4 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } @media (min-width: 800px) { .grid4 { grid-template-columns: repeat(4, 1fr); } }
.plantilla { border: 2px solid var(--borde); border-radius: 14px; padding: 10px; cursor: pointer; text-align: center; background: #fff; }
.plantilla.sel { border-color: var(--azul2); box-shadow: 0 0 0 3px #cfe0ff; }
.plantilla iframe { width: 100%; height: 260px; border: 0; pointer-events: none; }
.opcion { border: 2px solid var(--borde); border-radius: 16px; padding: 16px; cursor: pointer; background: #fff; display: block; }
.opcion.sel { border-color: var(--azul2); background: #f3f7ff; }
.opcion h3 { margin: 0 0 4px; font-size: 1.05rem; } .opcion p { margin: 0; color: var(--gris); font-size: .9rem; }
.opcion input[type=checkbox], .opcion input[type=radio] { width: 22px; height: 22px; vertical-align: middle; margin-right: 8px; }
.ideal { background: linear-gradient(120deg, #1f3a5f, #2e5a8f); color: #fff; border-radius: 18px; padding: 20px; margin-bottom: 16px; }
.ideal h2 { color: #fff; margin: 0 0 8px; font-size: 1.3rem; }
.barra { height: 8px; background: #e8eef7; border-radius: 4px; overflow: hidden; } .barra i { display: block; height: 100%; background: var(--azul2); transition: width .3s; }
.oculto { display: none !important; }
.peq-gris { font-size: .85rem; color: var(--gris); }
details summary { cursor: pointer; font-weight: 600; color: var(--azul); padding: 6px 0; }
.spinner { display: inline-block; width: 18px; height: 18px; border: 3px solid #cfe0ff; border-top-color: var(--azul); border-radius: 50%; animation: g 1s linear infinite; vertical-align: middle; }
@keyframes g { to { transform: rotate(360deg); } }
pre.carta { white-space: pre-wrap; font-family: inherit; background: #fafbfd; border: 1px solid var(--borde); border-radius: 12px; padding: 12px; font-size: .95rem; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs button { background: #e8eef7; color: var(--azul); min-height: 42px; padding: 8px 14px; font-size: .95rem; flex: 1; } .tabs button.sel { background: var(--azul); color: #fff; }
/* Tab bar inferior */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--tab) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: #fff; border-top: 1px solid var(--borde); display: flex; z-index: 30; }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--gris); text-decoration: none; font-size: .72rem; font-weight: 600; }
.tabbar a span { font-size: 1.45rem; line-height: 1; }
.tabbar a.activo { color: var(--azul); }
.tabbar a.activo span { transform: translateY(-2px); }
/* Home */
.home-opcion { display: flex; gap: 16px; align-items: center; background: #fff; border: 2px solid var(--borde); border-radius: 20px; padding: 22px 18px; text-decoration: none; color: var(--texto); margin-bottom: 14px; }
.home-opcion:active { transform: scale(.99); }
.home-opcion .icono { font-size: 2.4rem; } .home-opcion h2 { margin: 0 0 4px; } .home-opcion p { margin: 0; color: var(--gris); }
/* Wizard */
.wizard-paso { display: none; } .wizard-paso.activo { display: block; }
.wizard-pregunta { font-size: 1.35rem; font-weight: 800; color: var(--azul); margin: 6px 0 16px; line-height: 1.25; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips label { display: inline-flex; align-items: center; gap: 6px; border: 2px solid var(--borde); border-radius: 30px; padding: 10px 16px; background: #fff; cursor: pointer; font-weight: 600; color: var(--texto); font-size: 1rem; margin: 0; }
.chips label.sel { border-color: var(--azul2); background: #f3f7ff; color: var(--azul); }
.chips input { display: none; }
.wizard-nav { display: flex; gap: 10px; margin-top: 22px; } .wizard-nav button { flex: 1; }
.progreso-wizard { font-size: .85rem; color: var(--gris); margin-bottom: 6px; display: flex; justify-content: space-between; }
