/* ===========================
   BASE WIDGET
   =========================== */
.pjrd-widget {
  width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.pjrd-results { width: 100%; margin: 30px 0 24px 0; }
.pjrd-output  { width: 100%; }

/* ===========================
   FORM CARD
   =========================== */
.pjrd-form {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}
.pjrd-title { margin-bottom: 14px; color: #0D1828; }
.pjrd-field { margin-bottom: 14px; }
.pjrd-label {
  font-weight: 600;
  font-size: 14px;
  color: #333;
  display: block;
  margin-bottom: 8px;
}
.pjrd-input {
  width: 100%;
  padding: 12px 14px !important;
  border-radius: 10px;
  border: 1px solid #ddd;
  font-size: 15px;
  transition: border-color .2s, box-shadow .2s;
  background: #fff;
}
.pjrd-input:focus {
  outline: none;
  border-color: #0D1828;
  box-shadow: 0 0 0 3px rgba(13,24,40,0.15);
}
.pjrd-btn {
  margin-top: 10px;
  width: 100%;
  background: linear-gradient(135deg, #0D1828, #050d19);
  color: #fff;
  border: none;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, opacity .15s;
}
.pjrd-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(13,24,40,.35);
}
.pjrd-btn:disabled { opacity: .6; cursor: not-allowed; }

.pjrd-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 900px) {
  .pjrd-grid-2 { grid-template-columns: 1fr 1fr; }
}

/* ===========================
   MENSAJES
   =========================== */
.resultado-info {
  background: #f5f8ff;
  border-left: 4px solid #0D1828;
  padding: 14px 16px;
  border-radius: 8px;
  margin-bottom: 24px;
  color: #0D1828;
  font-size: 16px;
}
.resultado-error {
  background: #fff5f5;
  border-left: 4px solid #cc0000;
  padding: 14px 16px;
  border-radius: 8px;
  color: #900;
  margin-bottom: 24px;
  font-size: 16px;
}
.nd { color: #94a3b8; font-style: italic; }

/* ===========================
   CASOS (tu diseño)
   =========================== */
.caso-ficha {
  background: #fff;
  border: 1px solid #e6ebf2;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
  overflow: hidden;
  margin-bottom: 24px;
  width: 100%;
}
.caso-ficha__head {
  padding: 31px 31px 14px;
  background: linear-gradient(180deg, #f6f9ff 0%, #ffffff 100%);
  border-bottom: 1px solid #eef2f7;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: flex-start;
}
.caso-ficha__title { display: grid; gap: 6px; min-width: 240px; }
.caso-ficha__title h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 900;
  color: #0f172a;
}
.caso-ficha__subtitle {
  color: #475569;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.caso-label { font-weight: 700; color: #475569; }
.caso-badges { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.caso-badge {
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #e6ebf2;
  background: #f8fafc;
  color: #1f2937;
}
.caso-badge--materia { background: #eef7ff; border-color: #cfe6ff; color: #0b3b73; }
.caso-badge--estado  { background: #f0fdf4; border-color: #bbf7d0; color: #14532d; }
.caso-ficha__body { padding: 16px 18px 18px; display: grid; gap: 14px; }
.caso-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 900px) { .caso-grid { grid-template-columns: 1fr 1fr; } }
.caso-box {
  border: 1px solid #d7d7d9;
  border-radius: 14px;
  padding: 14px 14px 12px;
  background: #fff;
}
.caso-box h4 {
  margin: 0 0 19px 0;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #475569;
}
.caso-kv { display: grid; gap: 10px; }
.kv-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  align-items: stretch;
}
.kv-row .k, .kv-row .v { display: flex; align-items: center; }
.kv-row .k {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: #0D1828;
}
.kv-row .v { color: #0D1828; line-height: 1.2; font-size: 15px; }
.caso-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-variant-numeric: tabular-nums;
  background: #f1f5ff;
  border: 1px solid #dbe6ff;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 14px;
  line-height: 20px;
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.caso-foot {
  padding: 14px 18px;
  border-top: 1px solid #eef2f7;
  background: #0D1828;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  color: #ffffff;
  font-size: 13px;
}

/* ===========================
   ROL AUDIENCIAS (cards)
   =========================== */
.aud-wrap { width: 100%; }
.aud-summary { display: grid; gap: 10px; margin-bottom: 14px; }
.aud-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.aud-pill {
  background: #f1f5ff;
  border: 1px solid #dbe6ff;
  color: #0D1828;
  font-weight: 800;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
}
.aud-cards { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 900px) { .aud-cards { grid-template-columns: 1fr 1fr; } }
.aud-card {
  background: #fff;
  border: 1px solid #e6ebf2;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
  overflow: hidden;
}
.aud-card__head {
  padding: 16px 16px 12px;
  background: linear-gradient(180deg, #f6f9ff 0%, #ffffff 100%);
  border-bottom: 1px solid #eef2f7;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.aud-date { font-weight: 900; color: #0D1828; font-size: 13px; }
.aud-title { font-weight: 900; color: #0f172a; font-size: 16px; line-height: 1.25; margin-top: 4px; }
.aud-sub { color: #475569; font-size: 13px; margin-top: 6px; }
.aud-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  background: #0D1828;
  color: #fff;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 12px;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.aud-card__body { padding: 14px 16px 16px; display: grid; gap: 10px; }
.aud-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px dashed #eef2f7;
  padding-bottom: 8px;
}
.aud-row:last-child { border-bottom: none; padding-bottom: 0; }
.aud-row span {
  color: #64748b;
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.aud-row strong {
  color: #0D1828;
  font-weight: 800;
  font-size: 13px;
  text-align: right;
}
.aud-pager {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.aud-page-btn {
  border: 1px solid #dbe3ee;
  background: #fff;
  color: #0D1828;
  font-weight: 900;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
}
.aud-page-btn:disabled { opacity: .5; cursor: not-allowed; }
.aud-page-info { color: #334155; font-weight: 800; }
/* Fecha/Hora explícitas (Rol) */
.aud-date{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-weight: 900;
  color: #0D1828;
  font-size: 13px;
}
.aud-date__label{
  color: #64748b;
  font-weight: 900;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.aud-date__value{
  background: #f1f5ff;
  border: 1px solid #dbe6ff;
  border-radius: 999px;
  padding: 4px 8px;
  line-height: 1.2;
}
.aud-date__sep{
  color: #94a3b8;
  font-weight: 900;
}

/* Resalta filas de "cuándo" para que se entienda que es texto del rol */
.aud-row--when span{
  color: #475569;
}
.aud-row--when strong{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-variant-numeric: tabular-nums;
}
/* ===========================
   AUDIENCIAS por NUC (timeline)
   =========================== */
.audn-wrap { width: 100%; }
.audn-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  margin-bottom: 14px;
  justify-content: space-between;
}
.audn-summary > div {
  display: flex;
  align-items: center; /* CLAVE */
  gap: 8px;
}
.audn-timeline {
  position: relative;
  padding-left: 18px;
  display: grid;
  gap: 14px;
}
.audn-timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e6ebf2;
}
.audn-item { position: relative; }
.audn-dot {
  position: absolute;
  left: 0;
  top: 18px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #0D1828;
  box-shadow: 0 0 0 4px rgba(13,24,40,.12);
}
.audn-card {
  margin-left: 18px;
  background: #fff;
  border: 1px solid #e6ebf2;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
  overflow: hidden;
}
.audn-head {
  padding: 16px 16px 12px;
  background: linear-gradient(180deg, #f6f9ff 0%, #ffffff 100%);
  border-bottom: 1px solid #eef2f7;
}
.audn-date { font-weight: 900; color: #0D1828; font-size: 13px; }
.audn-title { margin-top: 6px; font-weight: 900; color: #0f172a; font-size: 16px; }
.audn-sub { margin-top: 6px; color: #475569; font-size: 13px; line-height: 1.4; }
.audn-body { padding: 14px 16px 16px; display: grid; gap: 10px; }
.audn-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px dashed #eef2f7;
  padding-bottom: 8px;
}
.audn-row:last-child { border-bottom: none; padding-bottom: 0; }
.audn-row span {
  color: #64748b;
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.audn-row strong {
  color: #0D1828;
  font-weight: 800;
  font-size: 13px;
  text-align: right;
}
.audn-actions {
  padding: 12px 16px 16px;
  border-top: 1px solid #eef2f7;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.audn-btn {
  display: inline-block;
  padding: 10px 12px;
  border-radius: 12px;
  background: #0D1828;
  color: #fff;
  text-decoration: none;
  font-weight: 900;
  font-size: 13px;
}
.audn-btn:hover{
	color:#ffffff;
}
.audn-btn--ghost {
  background: #fff;
  color: #0D1828;
  border: 1px solid #dbe3ee;
}
.audn-btn--ghost:hover{
	color:#0D1828;
}
.audn-muted { color: #64748b; font-weight: 700; font-size: 13px; }

/* Responsive tweak */
@media (max-width: 640px) {
  .pjrd-form { padding: 18px; }
  .caso-ficha__head { padding: 20px 18px 14px; }
}

/* ===========================
   DECISIONES (cards)
   =========================== */
.dec-wrap { width: 100%; }
.dec-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.dec-summary > div { display:flex; align-items:center; gap:8px; }

.dec-cards { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 900px) { .dec-cards { grid-template-columns: 1fr 1fr; } }

.dec-card {
  background: #fff;
  border: 1px solid #e6ebf2;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
  overflow: hidden;
}
.dec-card__head {
  padding: 16px 16px 12px;
  background: linear-gradient(180deg, #f6f9ff 0%, #ffffff 100%);
  border-bottom: 1px solid #eef2f7;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.dec-title { font-weight: 900; color: #0f172a; font-size: 16px; line-height: 1.25; }
.dec-sub { margin-top: 6px; color: #475569; font-size: 13px; line-height: 1.4; }

.dec-meta { display:flex; gap:8px; flex-wrap: wrap; align-items:center; }
.dec-badge {
  font-size: 12px;
  font-weight: 900;
  padding: 8px 10px;
  border-radius: 999px;
  background: #0D1828;
  color: #fff;
  white-space: nowrap;
}
.dec-badge--ghost {
  background: #fff;
  color: #0D1828;
  border: 1px solid #dbe3ee;
}

.dec-card__body { padding: 14px 16px 16px; display: grid; gap: 10px; }
.dec-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px dashed #eef2f7;
  padding-bottom: 8px;
}
.dec-row:last-child { border-bottom: none; padding-bottom: 0; }
.dec-row span {
  color: #64748b;
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.dec-row strong {
  color: #0D1828;
  font-weight: 800;
  font-size: 13px;
  text-align: right;
}

.dec-actions {
  padding: 12px 16px 16px;
  border-top: 1px solid #eef2f7;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.dec-btn {
  display: inline-block;
  padding: 10px 12px;
  border-radius: 12px;
  background: #0D1828;
  color: #fff;
  text-decoration: none;
  font-weight: 900;
  font-size: 13px;
}
.dec-btn:hover { color:#fff; }
.dec-muted { color: #64748b; font-weight: 700; font-size: 13px; }

.dec-pager {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.dec-page-btn {
  border: 1px solid #dbe3ee;
  background: #fff;
  color: #0D1828;
  font-weight: 900;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
}
.dec-page-btn:disabled { opacity: .5; cursor: not-allowed; }
.dec-page-info { color: #334155; font-weight: 800; }