/*
 * HCM STRUGAL · complementos al kit (hcm.css).
 * Solo piezas que el prototipo no traía (badges en menú, rejilla de equipo, timeline, login).
 * Reutiliza siempre los tokens de :root de hcm.css; no definir colores sueltos aquí.
 */
[x-cloak] { display: none !important; }
.nav-item { position: relative; }
.nav-badge { margin-left: auto; }
.nav-external { margin-left: auto; width: 14px; height: 14px; opacity: .5; }
.notification-row { text-decoration: none; color: inherit; }
.dropdown-menu form button { width: 100%; }

.page-container [wire\:loading] { opacity: .6; }
.is-loading { opacity: .55; pointer-events: none; transition: opacity .15s; }

/* Ficha: pares de datos protegidos */
.masked { color: var(--muted); font-style: italic; }
.sensitive-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); }
.sensitive-tag .lucide { width: 12px; height: 12px; }

/* Timeline de historial (contratos, asignaciones, solicitudes) */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline-item { position: relative; padding: 0 0 18px; }
.timeline-item::before { content: ""; position: absolute; left: -22px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.timeline-item.is-muted::before { background: #b8c2d1; box-shadow: 0 0 0 4px #eef1f6; }
.timeline-item b { display: block; font-size: 14px; }
.timeline-item small { color: var(--muted); }

/* Saldos explicados */
.ledger-table td.num, .ledger-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.amount-pos { color: #2ea95c; font-weight: 600; }
.amount-neg { color: #e5486b; font-weight: 600; }

/* Calendario de equipo (persona × día) */
.team-grid-wrap { overflow-x: auto; }
.team-grid { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 12px; }
.team-grid th, .team-grid td { border-bottom: 1px solid var(--line); padding: 6px 4px; text-align: center; min-width: 26px; }
.team-grid th.person, .team-grid td.person { text-align: left; min-width: 200px; position: sticky; left: 0; background: var(--surface); z-index: 1; }
.team-grid .weekend { background: rgba(136, 150, 172, .08); }
.team-grid .holiday { background: rgba(248, 194, 10, .14); }
.team-grid .today { box-shadow: inset 0 0 0 2px var(--primary); }
.team-cell { display: block; height: 18px; border-radius: 4px; }
.team-cell.approved { background: #2ea95c; }
.team-cell.pending { background: #f8c20a; }
.team-cell.absent { background: #8896ac; }

/* Calendario mensual: festivos */
.cal-event.holiday { background: rgba(248, 194, 10, .18); color: #946c00; }
.cal-event.approved { background: rgba(46, 169, 92, .14); color: #1f7a43; }
.cal-event.pending { background: rgba(248, 194, 10, .18); color: #8a6a00; }
.cal-event.rejected { background: rgba(229, 72, 107, .12); color: #b02a4b; text-decoration: line-through; }

/* Modal Livewire (mismo aspecto que el modal del kit) */
.lw-modal-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(23, 28, 45, .45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.lw-modal-backdrop .modal { max-height: calc(100vh - 32px); overflow: auto; width: min(640px, 100%); }
.field-error { color: #e5486b; font-size: 12px; margin-top: 4px; }
.preview-box { border: 1px dashed var(--line); border-radius: 12px; padding: 14px; background: var(--body); }
.preview-box ul { margin: 6px 0 0 18px; }
.alert-inline { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; font-size: 13px; }
.alert-inline.danger { background: rgba(229, 72, 107, .1); color: #b02a4b; }
.alert-inline.warning { background: rgba(248, 194, 10, .15); color: #7a5d00; }
.alert-inline.info { background: rgba(99, 91, 255, .08); color: #4a43c9; }

/* Organigrama real (árbol anidado) */
.org-tree, .org-tree ul { list-style: none; margin: 0; padding-left: 22px; }
.org-tree > li { padding-left: 0; }
.org-tree li { position: relative; padding: 6px 0; }
.org-tree ul li::before { content: ""; position: absolute; left: -14px; top: 0; bottom: 50%; border-left: 2px solid var(--line); border-bottom: 2px solid var(--line); width: 12px; border-bottom-left-radius: 6px; }
.org-node { display: inline-flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); min-width: 280px; }
.org-node small { display: block; color: var(--muted); }
.org-node .headcount { margin-left: auto; }

/* Login */
.login-shell { min-height: 100vh; display: grid; place-items: center; background: var(--body); padding: 16px; }
.login-card { width: min(460px, 100%); }
.login-card .card-body { display: grid; gap: 14px; }
.dev-users { display: grid; gap: 8px; max-height: 360px; overflow: auto; }
.dev-users form button { width: 100%; text-align: left; }

/* Eventos del calendario como botones (abren el detalle) */
button.cal-event { border: 0; width: 100%; text-align: left; cursor: pointer; font-family: inherit; }
.cal-event + .cal-event { margin-top: 3px; }
/* Modo piloto (App\Services\Auth\PilotAccess): distintivo «Entorno de pruebas · datos ficticios» en la cabecera. */
.pilot-strip { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; flex-shrink: 0; background: #f59e0b; color: #1f1300; }
