.mpv-track{
  font-family:"Source Sans Pro",system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  min-height:100vh;
  background:#eef2f6;
  color:#1f2a44;
}

/* Topbar azul */
.mpv-topbar{
  background:#1f57b6;
  padding:16px 0;
}
.mpv-brand{
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
}
.mpv-brand__logo{
  width:42px;
  height:42px;
  object-fit:contain;
  border-radius:10px;
  background:rgba(255,255,255,.08);
  padding:6px;
}
.mpv-brand__title{
  color:#fff;
  font-weight:900;
  letter-spacing:.4px;
  font-size:22px;
}

/* Main */
.mpv-main{ padding:18px 0 40px; }

/* Botones */
.mpv-btn{
  border:0;
  border-radius:10px;
  padding:10px 14px;
  font-weight:900;
  transition:.16s ease;
}

.mpv-btn--success{
  background:#34a853;
  color:#fff;
  box-shadow:0 12px 20px rgba(52,168,83,.18);
}
.mpv-btn--success:hover{ transform:translateY(-1px); filter:brightness(1.02); }

.mpv-btn--light{
  background:#f3f6fb;
  color:#1f2a44;
  border:1px solid rgba(31,42,68,.12);
}
.mpv-btn--light:hover{ border-color:rgba(31,42,68,.2); }

.mpv-btn--primary{
  background:linear-gradient(90deg,#2f74ff,#5a8bff);
  color:#fff;
  box-shadow:0 14px 22px rgba(47,116,255,.18);
}
.mpv-btn--primary:hover{ transform:translateY(-1px); filter:brightness(1.02); }

.mpv-btn--danger{
  background:#dc3545;
  color:#fff;
  box-shadow:0 14px 22px rgba(220,53,69,.18);
}
.mpv-btn--danger:hover{ transform:translateY(-1px); filter:brightness(1.02); }

.mpv-btn--purple{
  background:#6f42c1;
  color:#fff;
  box-shadow:0 14px 22px rgba(111,66,193,.18);
}
.mpv-btn--purple:hover{ transform:translateY(-1px); filter:brightness(1.02); }

.mpv-btn--wide{ width:min(520px, 100%); }

/* Card principal */
.mpv-card{
  background:#fff;
  border-radius:14px;
  border:1px solid rgba(31,42,68,.08);
  box-shadow:0 18px 40px rgba(24,39,75,.10);
  overflow:hidden;
}
.mpv-card__header{
  padding:18px 18px;
  background:#f3f6fb;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.mpv-card__header-left{
  display:flex;
  align-items:center;
  gap:10px;
}
.mpv-ico{ color:#2f74ff; font-size:18px; }
.mpv-card__title{
  margin:0;
  font-weight:900;
  font-size:24px;
  color:#1f2a44;
}
.mpv-card__body{ padding:18px; }

/* Panel “Datos del trámite” */
.mpv-panel{
  border-radius:14px;
  border:1px solid rgba(31,42,68,.10);
  overflow:hidden;
  background:#fff;
}
.mpv-panel__head{
  background:#2f8ea0;
  color:#fff;
  padding:12px 14px;
  display:flex;
  align-items:center;
  gap:10px;
}
.mpv-panel__badge{
  width:18px;
  height:18px;
  border-radius:4px;
  background:rgba(255,255,255,.25);
}
.mpv-panel__title{
  margin:0;
  font-weight:900;
  letter-spacing:.3px;
  text-transform:uppercase;
  font-size:14px;
}
.mpv-panel__body{ padding:16px; }

/* Fields estilo “clean” */
.mpv-field{ position:relative; }
.mpv-input{
  width:100%;
  border:1px solid rgba(31,42,68,.14);
  border-radius:12px;
  background:#f7f8ff;
  padding:14px 14px 12px;
  outline:none;
  font-weight:800;
  transition:.16s ease;
}
.mpv-input:focus{
  background:#fff;
  border-color:#2f74ff;
  box-shadow:0 0 0 4px rgba(47,116,255,.16);
}
.mpv-input::placeholder{ color:transparent; }
.mpv-label{
  position:absolute;
  left:12px;
  top:50%;
  transform:translateY(-50%);
  color:rgba(31,42,68,.58);
  font-weight:900;
  font-size:12px;
  padding:0 6px;
  pointer-events:none;
  transition:.14s ease;
  background:transparent;
}
.mpv-input:focus + .mpv-label,
.mpv-input:not(:placeholder-shown) + .mpv-label,
.mpv-select:focus + .mpv-label{
  top:-2px;
  transform:translateY(0);
  background:#fff;
  border-radius:999px;
  color:#2f74ff;
}
.req{ color:#ff4d4d; }

.mpv-note{
  display:inline-block;
  color:rgba(31,42,68,.65);
  font-weight:800;
}

/* Resultados */
.mpv-result{
  margin-top:16px;
  border-radius:14px;
  border:1px solid rgba(31,42,68,.10);
  overflow:hidden;
  background:#fff;
}
.mpv-result__head{
  padding:12px 14px;
  background:#2f8ea0;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.mpv-result__titlewrap{
  display:flex;
  align-items:center;
  gap:10px;
}
.mpv-result__title{
  margin:0;
  font-weight:900;
  letter-spacing:.2px;
  font-size:14px;
  text-transform:uppercase;
}
.mpv-result__actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.mpv-result__body{ padding:16px; }

/* Callouts tipo mockup */
.mpv-callout{
  border-radius:12px;
  border:1px solid rgba(31,42,68,.10);
  background:#fff;
  overflow:hidden;
}
.mpv-callout--green{ border-left:6px solid #2e7d32; }
.mpv-callout--yellow{ border-left:6px solid #c99700; }

/* Tabla */
.mpv-table{
  width:100%;
  border-collapse:collapse;
  margin:0;
}
.mpv-table th{
  width:46%;
  font-weight:900;
  color:#1f2a44;
  background:#fbfcff;
}
.mpv-table td{
  font-weight:800;
  color: rgba(31,42,68,.85);
  text-align:right;
  white-space:nowrap;
}
.mpv-table th{
  white-space:nowrap;
}

.mpv-table td,
.mpv-table th{
  overflow:hidden;
  text-overflow:ellipsis; /* si es muy largo pone ... */
}

.mpv-table tr:last-child th,
.mpv-table tr:last-child td{ border-bottom:0; }

@media (max-width: 991px){
  .mpv-card__header{ flex-direction:column; align-items:stretch; }
  .mpv-btn--light{ width:100%; }
}
@media (max-width:575px){
  .mpv-table tr{
    flex-direction:column;
    align-items:flex-start;
  }
  .mpv-table td{
    text-align:left;
    white-space:normal;
  }
}


/* ==============================
   HISTORIAL / LÍNEA DE TIEMPO
============================== */

/* =========================
   TIMELINE (sin AdminLTE)
   ========================= */

#div_historial{
  margin-top: 16px;
}

/* contenedor timeline */
.timeline{
  position: relative;
  padding: 10px 0 10px 0;
}

/* línea vertical */
.timeline:before{
  content:"";
  position:absolute;
  top:0;
  bottom:0;
  left:22px;
  width:3px;
  background: linear-gradient(to bottom,#e7ecf5,#dde3ef);
  border-radius: 999px;
}

/* cada bloque */
.timeline > div{
  position: relative;
  margin: 0 0 18px 0;
  padding-left: 56px;
}

/* icono de la izquierda */
.timeline > div > i{
  position:absolute;
  left:10px;
  top:6px;
  width:26px;
  height:26px;
  border-radius:999px;
  display:grid;
  place-items:center;
  font-size:12px;
  box-shadow: 0 8px 14px rgba(24,39,75,.12);
  border: 3px solid #fff;
}

/* etiquetas "HISTORIAL..." / "EXPEDIENTE..." */
.time-label{
  margin-bottom: 12px;
  padding-left: 56px;
}

.time-label > span{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .3px;
  box-shadow: 0 10px 18px rgba(24,39,75,.06);
}

/* tarjeta del evento */
.timeline-item{
  background: #ffffff;
  border: 1px solid rgba(31,42,68,.06);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 14px 24px rgba(24,39,75,.06);
  transition:.2s ease;
}
.timeline-item:hover{
  transform: translateY(-2px);
  box-shadow: 0 18px 28px rgba(24,39,75,.08);
}

/* header del evento (texto + hora) */
.timeline-header{
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(31,42,68,.08);
}

/* hora estilo “pill” a la derecha */
.timeline-header .time{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 8px 12px;
  border-radius: 12px;
  background: #f3f4ff;
  border: 1px solid #e0e7ff;
  font-weight: 900;
  color:#4c51bf;
}

/* texto del body */
.timeline-body{
  margin-top:10px;
  padding-top:10px;
  border-top:1px dashed #e5e9f2;
  color: rgba(31,42,68,.85);
  font-weight:700;
  line-height:1.35;
  white-space:pre-line;
}

/* links/strong en azul */
.text-primary{
  color:#2563eb !important;
  font-weight: 900;
}

/* muted */
.text-muted{
  color:#64748b !important;
}

/* bold */
.text-bold{
  font-weight: 900 !important;
}

/* =========================
   BG COLORS (map AdminLTE)
   ========================= */
.bg-red{  background:#ffe7ea !important; color:#c13b45 !important; }
.bg-purple{ background:#ece9ff !important; }
.bg-blue{ background:#dbeafe !important;color:#2563eb !important; }
.bg-green{ background:#dcfce7 !important;color:#16a34a !important; }
.bg-yellow{ background:#fff4d6 !important;color:#b7791f !important; }
.bg-info{ background:#e0f2fe !important; color:#0284c7 !important; }
.bg-gray{ background:#f1f5f9 !important; color:#64748b !important; }

/* el último reloj (cierre) */
.timeline > div:last-child{
  margin-bottom: 0;
}

/* =========================
   CARDS MODERNAS (DATOS)
========================= */

.mpv-callout{
  position: relative;
  border-radius: 16px;
  border: 1px solid rgba(31,42,68,.08);
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 14px 28px rgba(24,39,75,.06);
}

.mpv-callout::before{
  content:"";
  position:absolute;
  left:0; top:0; bottom:0;
  width: 10px;
  background: linear-gradient(180deg,#2f74ff,#7c6cf6);
  opacity:.9;
}

.mpv-callout--green::before{
  background: linear-gradient(180deg,#22c55e,#16a34a);
}

.mpv-callout--yellow::before{
  background: linear-gradient(180deg,#f59e0b,#f97316);
}

/* tabla -> look moderno */
.mpv-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
}

.mpv-table tr{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  padding: 14px 18px 14px 24px;
  border-bottom: 1px solid rgba(31,42,68,.06);
}

.mpv-table tr:last-child{
  border-bottom:0;
}

.mpv-table th,
.mpv-table td{
  border:0 !important;
  padding:0 !important;
  background: transparent !important;
}

.mpv-table th{
  font-weight: 900;
  color:#1f2a44;
  letter-spacing:.2px;
}

.mpv-table td{
  font-weight: 800;
  color: rgba(31,42,68,.78);
  text-align:right;
}

/* valores “importantes” (opcional) */
#tdExpediente,
#tdEstado{
  font-weight: 900;
  color:#111827;
}

/* responsive: en móvil label arriba, valor abajo */
@media (max-width: 575px){
  .mpv-table tr{
    grid-template-columns:1fr;
  }
  .mpv-table td{
    text-align:left;
  }
}
