/* ============================================================
   TECH-BARRIO · Demo del centro de formacion y empleo
   Acento: verde (--c-green). Reutiliza variables de style.css
   ============================================================ */

.tb-demo {
  padding: calc(var(--nav-h) + 40px) 0 80px;
  background:
    radial-gradient(800px 400px at 90% -5%, rgba(52,211,153,.12), transparent 60%),
    var(--c-bg);
  min-height: 100vh;
  --tb: var(--c-green);
  --tb-d: var(--c-green-d);
}

.tb-eyebrow { color: var(--tb); background: rgba(52,211,153,.1); border-color: rgba(52,211,153,.28); }

/* ---- Barra superior ---- */
.tb-topbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 18px; }
.tb-topbar h1 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); margin: 14px 0 6px; }
.tb-topbar p { color: var(--c-text-dim); max-width: 580px; margin: 0; font-size: .96rem; }
.tb-topbar-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.tb-status {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  background: rgba(52,211,153,.12); border: 1px solid rgba(52,211,153,.3);
  color: var(--tb); font-weight: 600; font-size: .85rem;
}
.tb-status.paused { background: rgba(251,191,36,.12); border-color: rgba(251,191,36,.3); color: var(--c-amber); }
.tb-status .tb-dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; animation: tb-pulse 1.6s infinite; }
@keyframes tb-pulse { 0%,100% { opacity: 1; transform: scale(1);} 50% { opacity: .3; transform: scale(.7);} }

.tb-controls { display: flex; gap: 10px; flex-wrap: wrap; }
.tb-btn-sm { padding: 10px 18px; font-size: .88rem; }
.tb-demo .btn--primary { background: linear-gradient(135deg, var(--tb), var(--tb-d)); color: #04120b; box-shadow: 0 12px 30px -12px var(--tb-d); }
.tb-demo .btn--primary:hover { color: #04120b; }

.tb-disclaimer {
  background: rgba(251,191,36,.08); border: 1px solid rgba(251,191,36,.25);
  color: var(--c-amber); border-radius: 10px; padding: 10px 16px; font-size: .85rem; margin-bottom: 26px;
}

/* ---- KPIs ---- */
.tb-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 26px; }
.tb-kpi { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 20px 22px; }
.tb-kpi-label { display: block; color: var(--c-text-mute); font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; }
.tb-kpi-val { display: block; font-size: 2rem; font-weight: 800; color: #fff; margin: 8px 0 6px; font-variant-numeric: tabular-nums; }
.tb-kpi-foot { font-size: .82rem; color: var(--c-text-mute); }
.tb-kpi-foot.tb-up { color: var(--tb); }

/* ---- Paneles ---- */
.tb-panel { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 22px; }
.tb-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.tb-panel-head h2 { font-size: 1.15rem; margin: 0; }
.tb-main { display: grid; grid-template-columns: 1.5fr 1fr; gap: 22px; margin-bottom: 22px; }

.tb-speed { display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--c-text-dim); }
.tb-speed select { background: var(--c-bg); color: var(--c-text); border: 1px solid var(--c-border); border-radius: 8px; padding: 6px 10px; font: inherit; font-size: .85rem; cursor: pointer; }

/* ---- Lista de aprendices ---- */
.tb-trainee-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; max-height: 460px; overflow-y: auto; }
.tb-trainee {
  display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: center;
  background: var(--c-bg); border: 1px solid var(--c-border); border-radius: 12px; padding: 14px 16px;
  animation: tb-in .35s ease;
}
@keyframes tb-in { from { opacity: 0; transform: translateY(10px);} to { opacity: 1; transform: none; } }
.tb-avatar { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; color: #04120b; background: linear-gradient(135deg, var(--tb), #6ee7b7); }
.tb-trainee-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.tb-trainee-name { font-weight: 600; color: #fff; font-size: .96rem; }
.tb-trainee-track { font-size: .76rem; color: var(--tb); font-weight: 600; }
.tb-bar { height: 8px; border-radius: 999px; background: var(--c-surface-2); overflow: hidden; margin-top: 8px; }
.tb-bar span { display: block; height: 100%; width: 0%; border-radius: 999px; background: linear-gradient(90deg, var(--tb), #6ee7b7); transition: width .5s ease; }
.tb-trainee-pct { font-size: .78rem; color: var(--c-text-mute); font-variant-numeric: tabular-nums; }
.tb-trainee.grad .tb-bar span { background: linear-gradient(90deg, #6ee7b7, #a7f3d0); }

/* ---- Bolsa de empleo ---- */
.tb-badge-count { min-width: 26px; text-align: center; padding: 3px 9px; border-radius: 999px; background: var(--c-surface-2); color: var(--tb); font-weight: 700; font-size: .82rem; }
.tb-job-feed { list-style: none; margin: 0; padding: 0; max-height: 460px; overflow-y: auto; display: grid; gap: 10px; }
.tb-empty { color: var(--c-text-mute); font-size: .9rem; padding: 20px 4px; }
.tb-job { background: var(--c-bg); border: 1px solid var(--c-border); border-left: 3px solid var(--tb); border-radius: 10px; padding: 12px 14px; animation: tb-in .35s ease; }
.tb-job.bpo { border-left-color: var(--c-primary); }
.tb-job-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.tb-job-name { font-weight: 600; color: #fff; font-size: .92rem; }
.tb-job-val { font-weight: 700; color: var(--tb); font-size: .86rem; }
.tb-job.bpo .tb-job-val { color: var(--c-primary); }
.tb-job-meta { margin-top: 5px; font-size: .8rem; color: var(--c-text-dim); }
.tb-job-badge { display: inline-block; font-size: .68rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; margin-right: 6px; background: rgba(52,211,153,.15); color: var(--tb); }
.tb-job.bpo .tb-job-badge { background: rgba(56,189,248,.15); color: var(--c-primary); }

/* ---- Graduados por especialidad ---- */
.tb-bottom { display: grid; grid-template-columns: 1.3fr 1fr; gap: 22px; }
.tb-track-bars { display: grid; gap: 14px; }
.tb-track-row { display: grid; grid-template-columns: 150px 1fr 40px; gap: 12px; align-items: center; }
.tb-track-label { font-size: .86rem; color: var(--c-text-dim); }
.tb-track-track { height: 12px; border-radius: 999px; background: var(--c-surface-2); overflow: hidden; }
.tb-track-fill { display: block; height: 100%; width: 0%; border-radius: 999px; background: linear-gradient(90deg, var(--tb), #6ee7b7); transition: width .6s ease; }
.tb-track-num { font-weight: 700; color: #fff; text-align: right; font-variant-numeric: tabular-nums; }

/* ---- Reporte ---- */
.tb-report-body { font-size: .9rem; }
.tb-report-hint { color: var(--c-text-dim); }
.tb-report-generated .tb-rep-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--c-border); }
.tb-report-generated .tb-rep-row span:last-child { color: #fff; font-weight: 600; }
.tb-rep-title { font-weight: 700; color: #fff; margin: 0 0 4px; }
.tb-rep-sub { color: var(--c-text-mute); font-size: .78rem; margin: 0 0 14px; }
.tb-rep-actions { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }
.tb-rep-note { margin-top: 14px; font-size: .78rem; color: var(--c-text-mute); border-top: 1px solid var(--c-border); padding-top: 12px; }
.tb-demo .btn--ghost { border-color: var(--c-border); color: var(--c-text); }

.tb-back { margin-top: 30px; }
.tb-trainee-list::-webkit-scrollbar, .tb-job-feed::-webkit-scrollbar { width: 8px; }
.tb-trainee-list::-webkit-scrollbar-thumb, .tb-job-feed::-webkit-scrollbar-thumb { background: var(--c-surface-2); border-radius: 8px; }

/* ---- Responsive ---- */
@media (max-width: 980px) {
  .tb-kpis { grid-template-columns: repeat(2, 1fr); }
  .tb-main, .tb-bottom { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .tb-kpis { grid-template-columns: 1fr; }
  .tb-track-row { grid-template-columns: 110px 1fr 34px; }
}
