.pv-wrap { display: grid; gap: 16px; }
.pv-wrap > .card, .pv-detalle-grid > div > .card, .pv-detalle-grid aside > .card { margin: 0; }
.pv-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; background: linear-gradient(135deg, #f7f9fc, #e9eff7); }
.pv-hero h2, .pv-ticket-head h2 { margin: 2px 0 6px; color: var(--primary-900); font-size: 21px; }
.pv-hero p, .pv-ticket-head p { margin: 0; color: var(--text-muted); }
.pv-kicker { color: var(--accent) !important; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.pv-acciones { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pv-acciones-vertical { flex-direction: column; align-items: stretch; }
.pv-tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--border-strong); }
.pv-tabs a { padding: 10px 14px; color: var(--text-muted); text-decoration: none; white-space: nowrap; border-bottom: 3px solid transparent; font-weight: 600; }
.pv-tabs a.active { color: var(--primary); border-bottom-color: var(--accent); }
.pv-filtros { display: grid; grid-template-columns: minmax(220px, 2fr) 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.pv-tabla-wrap { overflow-x: auto; }
.pv-tabla { width: 100%; border-collapse: collapse; font-size: 12px; }
.pv-tabla th { text-align: left; padding: 10px; background: var(--surface-2); color: var(--text-muted); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.pv-tabla td { padding: 12px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.pv-tabla td small { display: block; color: var(--text-muted); margin-top: 4px; max-width: 300px; }
.pv-folio { color: var(--primary); font-family: var(--font-mono); font-weight: 700; text-decoration: none; white-space: nowrap; }
.pv-folio:hover { text-decoration: underline; }
.pv-sla { display: inline-flex; flex-direction: column; gap: 2px; padding: 6px 8px; border-radius: 7px; min-width: 150px; }
.pv-sla small { font-size: 10px; }
.pv-sla-rojo { background: var(--red-bg); color: #991b1b; }
.pv-sla-ambar { background: var(--amber-bg); color: #92400e; }
.pv-sla-verde { background: var(--green-bg); color: #166534; }
.pv-sla-gris { background: var(--gray-bg); color: var(--text-muted); }
.pv-estado, .pv-prioridad { display: inline-block; border-radius: 99px; padding: 3px 8px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.pv-estado-nuevo { background: var(--gray-bg); color: var(--text); }
.pv-estado-asignado { background: #e0e7ff; color: #3730a3; }
.pv-estado-en_curso { background: #dbeafe; color: #1e40af; }
.pv-estado-resuelto { background: var(--green-bg); color: #166534; }
.pv-estado-cerrado { background: #e2e8f0; color: #475569; }
.pv-prioridad-critica { background: var(--red-bg); color: #991b1b; }
.pv-prioridad-alta { background: #ffedd5; color: #9a3412; }
.pv-prioridad-media { background: var(--amber-bg); color: #92400e; }
.pv-prioridad-baja { background: var(--gray-bg); color: var(--text-muted); }
.pv-empty { color: var(--text-muted); padding: 12px 0; }
.pv-empty h2 { color: var(--text); font-size: 17px; margin-bottom: 6px; }
.pv-sitio, .pv-cliente { margin-bottom: 16px; }
.pv-sitio-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.pv-sitio-head h2 { font-size: 17px; margin: 0; }
.pv-sitio-head p { margin: 3px 0 10px; color: var(--text-muted); }
.pv-proxima { padding: 8px 10px; background: var(--surface-2); border-radius: 8px; font-size: 12px; }
.pv-fecha-vencida { color: var(--red); font-weight: 700; }
.pv-sitios { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; list-style: none; padding: 0; margin: 10px 0 0; }
.pv-sitios li { padding: 10px; border: 1px solid var(--border); border-radius: 8px; }
.pv-sitios span { display: block; color: var(--text-muted); font-size: 12px; margin-top: 3px; }
.pv-form { display: grid; gap: 12px; margin-top: 16px; }
.pv-form label { display: grid; gap: 5px; color: var(--text); font-size: 12px; font-weight: 600; }
.pv-form textarea { resize: vertical; }
.pv-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pv-form-error { margin: 0; }
.pv-form-error:empty { display: none; }
.pv-modal { z-index: 11000; }
.pv-modal .modal { max-width: 720px; max-height: 90vh; overflow-y: auto; }
.pv-modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.pv-volver { color: var(--primary); text-decoration: none; font-weight: 600; }
.pv-ticket-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.pv-ticket-badges { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.pv-detalle-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr); gap: 16px; align-items: start; }
.pv-detalle-grid > div, .pv-detalle-grid aside { display: grid; gap: 16px; }
.pv-descripcion { white-space: pre-wrap; line-height: 1.6; }
.pv-datos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0 0; }
.pv-datos div { padding-top: 8px; border-top: 1px solid var(--border); }
.pv-datos dt { color: var(--text-muted); font-size: 11px; }
.pv-datos dd { margin: 3px 0 0; overflow-wrap: anywhere; }
.pv-historial { list-style: none; padding: 0; margin: 18px 0; }
.pv-historial li { display: grid; grid-template-columns: 14px 1fr; gap: 10px; position: relative; padding-bottom: 18px; }
.pv-historial li:not(:last-child)::before { content: ""; position: absolute; width: 1px; background: var(--border-strong); top: 12px; bottom: 0; left: 5px; }
.pv-evento-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--primary); margin-top: 4px; z-index: 1; }
.pv-historial p { margin: 2px 0; color: var(--text-muted); font-size: 11px; }
.pv-historial blockquote { margin: 8px 0 0; padding: 9px 12px; background: var(--surface-2); border-left: 3px solid var(--primary); white-space: pre-wrap; overflow-wrap: anywhere; }

@media (max-width: 900px) {
  .pv-hero, .pv-ticket-head { flex-direction: column; }
  .pv-detalle-grid { grid-template-columns: 1fr; }
  .pv-filtros { grid-template-columns: 1fr 1fr; }
  .pv-filtros input { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .pv-form-grid, .pv-datos, .pv-filtros { grid-template-columns: 1fr; }
  .pv-sitio-head { flex-direction: column; }
  .pv-modal .modal { padding: 18px; }
}
