/* ═══════════════════════════════════════════════════════
   SIGOF — Vista de tickets
   ═══════════════════════════════════════════════════════ */

/* ─── PESTAÑAS DE ESTADO ─── */
.status-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.status-tab {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px;
    background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 10px;
    color: var(--text-secondary); font: 500 13px var(--font-family);
    cursor: pointer; transition: 0.15s;
}
.status-tab:hover { border-color: var(--border-hover); color: var(--text-primary); }
.status-tab.active { background: var(--accent-bg); border-color: rgba(99,102,241,0.45); color: var(--text-primary); }
.status-tab .dot { width: 8px; height: 8px; border-radius: 50%; }
.status-tab .count {
    min-width: 22px; padding: 0 6px; border-radius: 10px; text-align: center;
    font-size: 11px; font-weight: 700; background: var(--bg-hover); color: var(--text-secondary);
}
.status-tab.active .count { background: var(--accent); color: #fff; }

/* ─── TABLA ─── */
.tickets-table tbody tr { cursor: pointer; }
.tickets-table .cell-main { min-width: 200px; max-width: 300px; }
.tickets-table .cell-main .cell-sub { max-width: 280px; }
.data-table .person { white-space: nowrap; }
.info-item:last-child:nth-child(odd) { grid-column: 1 / -1; }
.row-overdue td:first-child { box-shadow: inset 3px 0 0 var(--danger); }

/* Badges de estado y prioridad */
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.prio { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.prio i { width: 8px; height: 8px; border-radius: 2px; }
.prio-alta  { color: #f87171; } .prio-alta  i { background: #ef4444; }
.prio-media { color: #fbbf24; } .prio-media i { background: #f59e0b; }
.prio-baja  { color: #94a3b8; } .prio-baja  i { background: #64748b; }
.sla-flag {
    margin-left: 6px; padding: 1px 6px; border-radius: 4px;
    font-size: 10px; font-weight: 700; letter-spacing: 0.4px;
    color: #fff; background: var(--danger);
}

/* ─── ESTADO VACÍO ─── */
.empty-icon { font-size: 40px; margin-bottom: 10px; }
.empty-state .btn { margin-top: 16px; }

/* ─── DETALLE ─── */
.detail-layout { display: grid; grid-template-columns: 1fr 280px; gap: 24px; }
.detail-main { min-width: 0; }
.detail-block { margin-bottom: 20px; }
.detail-block h4, .detail-side h4 {
    font-size: 11px; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 10px;
}
.detail-text {
    font-size: 14px; line-height: 1.65; white-space: pre-wrap; word-break: break-word;
    padding: 14px 16px; border-radius: 10px;
    background: var(--bg-card); border: 1px solid var(--border-color);
}
.detail-solution .detail-text { background: var(--success-bg); border-color: rgba(16,185,129,0.25); }
.info-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
    margin-bottom: 20px; border-radius: 10px; overflow: hidden;
    background: var(--border-color); border: 1px solid var(--border-color);
}
.info-item { background: var(--bg-secondary); padding: 10px 14px; font-size: 13px; }
.info-item label {
    display: block; margin-bottom: 3px;
    font-size: 10px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px;
}
.detail-side {
    align-self: start; position: sticky; top: 0;
    padding: 16px; border-radius: 12px;
    background: var(--bg-card); border: 1px solid var(--border-color);
}
.detail-side .form-group { margin-bottom: 12px; }
.side-text { font-size: 13px; color: var(--text-secondary); line-height: 1.55; margin-bottom: 14px; }
.btn-stack { display: flex; flex-direction: column; gap: 8px; }
.btn-stack .btn:disabled { opacity: 0.4; cursor: default; }

/* Progreso para el solicitante */
.progress-steps { list-style: none; display: flex; flex-direction: column; gap: 0; margin-bottom: 14px; }
.progress-steps li {
    position: relative; padding: 0 0 18px 28px; font-size: 13px; color: var(--text-muted);
}
.progress-steps li::before {
    content: ''; position: absolute; left: 0; top: 2px;
    width: 14px; height: 14px; border-radius: 50%;
    border: 2px solid var(--border-hover); background: var(--bg-secondary);
}
.progress-steps li:not(:last-child)::after {
    content: ''; position: absolute; left: 7px; top: 18px; bottom: 0; width: 2px; background: var(--border-hover);
}
.progress-steps li.done { color: var(--text-primary); font-weight: 600; }
.progress-steps li.done::before { background: var(--success); border-color: var(--success); }
.progress-steps li.done:not(:last-child)::after { background: var(--success); }

/* Línea de tiempo del historial */
.timeline { position: relative; padding-left: 4px; }
.tl-item { position: relative; display: flex; gap: 12px; padding: 0 0 16px 0; font-size: 13px; color: var(--text-secondary); }
.tl-item b { color: var(--text-primary); }
.tl-item:not(:last-child)::after {
    content: ''; position: absolute; left: 5px; top: 16px; bottom: 0; width: 2px; background: var(--border-color);
}
.tl-dot { width: 12px; height: 12px; margin-top: 4px; flex-shrink: 0; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.tl-resolver_ticket .tl-dot { background: var(--success); box-shadow: 0 0 0 3px var(--success-bg); }
.tl-cambiar_estado .tl-dot, .tl-cambiar_prioridad .tl-dot { background: var(--warning); box-shadow: 0 0 0 3px var(--warning-bg); }
.tl-cambiar_costo .tl-dot { background: #34d399; }
.tl-time { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

@media (max-width: 900px) {
    .detail-layout { grid-template-columns: 1fr; }
    .detail-side { position: static; order: -1; }
    .info-grid { grid-template-columns: 1fr; }
    .status-tab { padding: 6px 10px; font-size: 12px; }
}

@media (max-width: 1500px) { .hide-lg { display: none !important; } }
