/* ==========================================================================
   VIEWS — estilos específicos de un módulo/vista concreta: Toques (Auditorías),
   Asignaciones, Conmutador, matriz de permisos y Bitácora (Administración).
   ========================================================================== */

/* ============ TOQUES ============ */
.toque-item{ background:var(--surface-alt); border:1px solid var(--border); border-radius:8px; padding:12px 14px; margin-bottom:10px; }
.toque-item .toque-head{ display:flex; justify-content:space-between; font-size:12.5px; font-weight:700; color:var(--danger); margin-bottom:4px; }
.toque-item .toque-meta{ font-size:12px; color:var(--text-dim); margin-bottom:6px; }
.toque-evidencia img{ max-width:160px; border-radius:6px; border:1px solid var(--border); margin-top:6px; display:block; }
.badge-toques{ background:var(--danger-soft); color:var(--danger); font-weight:700; cursor:pointer; }
.badge-toques:hover{ filter:brightness(.95); }
.num-picker{ display:flex; gap:5px; flex-wrap:wrap; }
.num-picker button{ width:34px; height:34px; border-radius:7px; border:1px solid var(--border); background:var(--surface); font-weight:700; font-size:13px; cursor:pointer; color:var(--text-dim); }
.num-picker button.selected{ background:var(--primary); border-color:var(--primary); color:var(--on-primary); }
.num-picker.labeled button{ width:auto; height:auto; padding:8px 14px; white-space:nowrap; font-size:12.5px; }
.paso-card.completo{ border-color:var(--success); }

.score-banner{
  display:flex; align-items:center; justify-content:space-between;
  background:var(--surface-alt); border:1px solid var(--border); border-radius:var(--radius);
  padding:16px 20px; margin:18px 0;
}
.score-banner .big{ font-size:30px; font-weight:800; letter-spacing:-.02em; }


/* ============ ASIGNACIONES ============ */
.assign-hero{
  background:linear-gradient(135deg, var(--navy-900), var(--navy-700));
  border-radius:var(--radius-lg); padding:26px 28px; color:#fff;
  display:flex; align-items:center; justify-content:space-between; gap:20px; flex-wrap:wrap;
  margin-bottom:18px;
}
.assign-hero .stat{ text-align:left; }
.assign-hero .stat .n{ font-size:26px; font-weight:800; }
.assign-hero .stat .l{ font-size:11.5px; color:#BAE6FD; text-transform:uppercase; letter-spacing:.05em; margin-top:2px; }
.assign-hero .stats-row{ display:flex; gap:32px; }
.btn-distribute{
  background:#fff; color:var(--navy-900); border:none; border-radius:10px;
  padding:15px 26px; font-weight:800; font-size:14.5px; cursor:pointer;
  box-shadow:0 8px 20px rgba(0,0,0,.2);
}
.btn-distribute:hover{ filter:brightness(.97); }

.assignee-card{ display:flex; align-items:center; gap:14px; padding:16px; }
.assignee-card .avatar{ width:42px; height:42px; font-size:14px; }
.assignee-card .info .name{ font-weight:700; font-size:13.5px; }
.assignee-card .info .count{ font-size:12px; color:var(--text-dim); margin-top:1px; }
.assignee-card .bar{ flex:1; height:6px; background:var(--border-soft); border-radius:99px; overflow:hidden; margin-top:8px; }
.assignee-card .bar-fill{ height:100%; background:var(--primary); border-radius:99px; }

/* ============ CONMUTADOR ============ */
.calc-result{
  background:var(--surface-alt); border:1px solid var(--border); border-radius:var(--radius);
  padding:16px 18px; text-align:center;
}
.calc-result .n{ font-size:24px; font-weight:800; }
.calc-result .l{ font-size:11.5px; color:var(--text-dim); margin-top:4px; }

/* ============ PERMS MATRIX ============ */
.perm-card h4{ font-size:14px; margin-bottom:2px; }
.perm-card .role-desc{ font-size:12px; color:var(--text-faint); margin-bottom:12px; }
.perm-list{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
.perm-list li{ display:flex; align-items:center; justify-content:space-between; font-size:13px; padding:6px 0; border-bottom:1px solid var(--border-soft); }
.perm-list li:last-child{ border-bottom:none; }
.perm-yes{ color:var(--success); font-weight:700; }
.perm-no{ color:var(--text-faint); }

/* ============ BITACORA ============ */
.timeline{ position:relative; padding-left:26px; }
.timeline::before{ content:''; position:absolute; left:6px; top:4px; bottom:4px; width:2px; background:var(--border); }
.timeline-item{ position:relative; padding-bottom:22px; }
.timeline-item:last-child{ padding-bottom:0; }
.timeline-dot{ position:absolute; left:-26px; top:2px; width:14px; height:14px; border-radius:50%; background:var(--primary); border:3px solid var(--surface); box-shadow:0 0 0 2px var(--primary-soft); }
.timeline-time{ font-family:var(--font-mono); font-size:11.5px; color:var(--text-faint); }
.timeline-text{ font-size:13.5px; margin-top:2px; }
.timeline-text strong{ font-weight:700; }


/* Imprimir / guardar como PDF la ficha de una NC */
@media print {
  #sidebar, #sidebar-overlay, .topbar, header, .breadcrumbs, #toast-container, button, .btn { display: none !important; }
  .main, #content, main { margin: 0 !important; padding: 0 !important; width: 100% !important; }
  .card { break-inside: avoid; box-shadow: none !important; border: 1px solid #ccc !important; }
  body { background: #fff !important; }
}
