*{ box-sizing:border-box; font-family: Arial, Helvetica, sans-serif; }
body{ margin:0; background:#f4f6f8; color:#222; }

.topbar{
  background:#fff;
  border-bottom:1px solid #e5e7eb;
}
.topbar-inner{
  max-width:1200px;
  margin:0 auto;
  padding:14px 16px;
}

.brand{ display:flex; gap:14px; align-items:center; }

/* ✅ LOGO grande */
.brand img{
  width:250px;      /* aprox 300x103 */
  max-width:250px;
  height:auto;
}

.brand-text{ display:flex; flex-direction:column; }
.brand-title{ font-weight:900; letter-spacing:.3px; }
.brand-sub{ color:#0b6b3a; font-weight:800; font-size:13px; margin-top:2px; }

/* ✅ HERO en #B13030 */
.hero{
  background:#B13030;
  color:#fff;
}
.hero-inner{
  max-width:1200px;
  margin:0 auto;
  padding:18px 16px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.hero h1{
  margin:0;
  font-size:22px;
  letter-spacing:.7px;
}

/* ✅ MENÚ debajo del título */
.navbar{
  background:#0B6B3A;
  border-bottom:1px solid #e5e7eb;
}
.nav-inner{
  max-width:1200px;
  margin:0 auto;
  padding:10px 16px;
  display:flex;
  align-items:center;
  gap:12px;
}
.nav-item{
  position:relative;
}

/* ✅ Inicio en BLANCO (fondo verde) */
.nav-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border-radius:10px;
  text-decoration:none;
  font-weight:900;
  color:#ffffff;              /* ✅ blanco */
}

/* ✅ Hover amarillo CAT */
.nav-link:hover,
.nav-link:focus{
  background:#FFD200;         /* ✅ amarillo CAT */
  color:#000;
}

/* ✅ Dropdown a la DERECHA (no abajo) */
.dropdown{
  position:absolute;
  top:0;
  left:100%;
  margin-left:6px;
  min-width:260px;
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:12px;
  box-shadow:0 12px 30px rgba(0,0,0,.15);
  overflow:hidden;
  display:none;
  z-index:50;
}

/* Mostrar dropdown */
.nav-item:hover .dropdown{
  display:block;
}

.dropdown a{
  display:block;
  padding:12px 14px;
  text-decoration:none;
  color:#111827;
  font-weight:800;
}
.dropdown a:hover{
  background:#FFF3BF;         /* amarillo suave */
  color:#000;
}
.dropdown small{
  display:block;
  font-weight:700;
  color:#6b7280;
  margin-top:2px;
}

.wrap{
  max-width:1200px;
  margin:22px auto 54px auto;
  padding:0 16px;
}

/* =========================
   ✅ PANEL BASE
========================= */
.panel{
  background:#fff;
  border-radius:10px;
  box-shadow:0 2px 10px rgba(0,0,0,.08);
  overflow:hidden;
}

/* =========================
   ✅ PANEL CARD (estilo dashboard)
   Borde blanco grueso + sombra elegante
========================= */
.panel.panel-card{
  background: rgba(255,255,255,.92);
  border: 4px solid #ffffff;
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(0,0,0,.10);
  overflow: hidden;
}

/* Header del card */
.panel-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  padding:16px;
  border-bottom:1px solid #eef2f7;
}

/* Header más pro en panel-card */
.panel.panel-card .panel-head{
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  background: linear-gradient(to bottom, rgba(255,255,255,.95), rgba(255,255,255,.85));
}

.panel-left h2{
  margin:0 0 10px 0;
  font-size:22px;
  font-weight:900;
  color:#1f2937;
}

.tabs{ display:flex; gap:8px; flex-wrap:wrap; }
.tab{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid #d1d5db;
  background:#fff;
  color:#374151;
  text-decoration:none;
  font-weight:900;
  font-size:13px;
}
.tab.active{
  background:#e8f5ee;
  border-color:#0b6b3a;
  color:#0b6b3a;
}

.btn-formatos{
  background:#6d28d9;
  color:#fff;
  border:none;
  border-radius:10px;
  padding:10px 14px;
  font-weight:900;
  cursor:pointer;
  box-shadow:0 2px 8px rgba(0,0,0,.12);
  white-space:nowrap;
}
.btn-formatos:hover{ opacity:.92; }

/* ✅ tabla dentro del card con padding */
.table-wrap{
  overflow-x:auto;
  padding: 14px 14px 18px;
}

/* Tabla como “card table” */
.pub-table{
  width:100%;
  min-width:1100px;

  border-collapse: separate;
  border-spacing: 0;

  background:#fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0,0,0,.06);
}

/* Thead */
.pub-table thead th{
  background:#0b6b3a;
  color:#fff;
  padding:12px 10px;
  text-align:center;
  font-size:13px;
  border-right:1px solid rgba(255,255,255,.15);
}

/* Bordes redondeados visibles arriba */
.pub-table thead th:first-child{ border-top-left-radius: 14px; }
.pub-table thead th:last-child{ border-top-right-radius: 14px; border-right:none; }

.pub-table tbody td{
  padding:12px 10px;
  border-bottom:1px solid #eef2f7;
  font-size:13px;
  vertical-align:middle;
}

/* Zebra suave + hover */
.pub-table tbody tr:nth-child(even) td{ background: rgba(0,0,0,.012); }
.pub-table tbody tr:hover td{ background:#f3faf6; }

.col-proc{ width:120px; }
.col-puesto{ width:420px; text-align:left !important; }
.col-vac{ width:90px; }
.col-doc{ width:95px; }
.col-estado{ width:120px; }

.puesto{ text-align:left; }
.vac{ text-align:center; font-weight:900; }
.doc{ text-align:center; }
.estado{ text-align:center; }

/* ✅ N° Proceso en una sola línea + sin romper filas */
.pub-table th.col-proc,
.pub-table td.proc{
  white-space: nowrap;
  word-break: keep-all;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 900;
  text-align:center;
  vertical-align: middle;
}

/* ✅ COLOR del número */
.pub-table td.proc{
  color:#2563eb;
}

/* ✅ Si algún día el número fuera <a> */
.pub-table td.proc a{
  white-space: nowrap;
  display:inline-block;
}

/* ✅ Icono PDF como imagen */
.doc-link{
  display:inline-flex;
  width:40px;
  height:40px;
  align-items:center;
  justify-content:center;
  border-radius:10px;
  text-decoration:none;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.96);
}
.doc-link:hover{ opacity:.92; transform:translateY(-1px); }

.doc-link img{
  width:32px;
  height:32px;
  display:block;
}

.doc-off{
  display:inline-flex;
  width:40px;
  height:40px;
  align-items:center;
  justify-content:center;
  border-radius:10px;
  background:#f3f4f6;
  color:#9ca3af;
  font-weight:900;
  border: 1px solid rgba(0,0,0,.06);
}

.pill{
  display:inline-block;
  padding:7px 12px;
  border-radius:999px;
  font-weight:900;
  font-size:12px;
  text-transform:uppercase;
  min-width:110px;
  border: 2px solid rgba(0,0,0,.06);
}
.pill.ok{ background:#d1fae5; color:#065f46; border-color: rgba(6,95,70,.16); }
.pill.fin{ background:#e5e7eb; color:#374151; border-color: rgba(55,65,81,.16); }
.pill.bad{ background:#fee2e2; color:#991b1b; border-color: rgba(153,27,27,.16); }

.empty{ text-align:center; padding:18px !important; color:#6b7280; font-weight:800; }

tr.focus td{
  background:#fff7ed !important;
  border-bottom:1px solid #fed7aa;
}

/* Modal formatos */
.modal-overlay{
  position:fixed; inset:0;
  background:rgba(0,0,0,.45);
  opacity:0; pointer-events:none;
  transition:.2s;
  z-index:999;
}
.modal-overlay.show{ opacity:1; pointer-events:auto; }

.modal{
  position:fixed; inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  opacity:0; pointer-events:none;
  transition:.2s;
  z-index:1000;
}
.modal.show{ opacity:1; pointer-events:auto; }

.modal-card{
  width:100%;
  max-width:520px;
  background:#fff;
  border-radius:14px;
  overflow:hidden;
  box-shadow:0 12px 30px rgba(0,0,0,.25);
}
.modal-head{
  background:#6d28d9;
  color:#fff;
  padding:14px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.modal-head h3{ margin:0; font-size:18px; font-weight:900; }
.modal-close{
  background:transparent;
  border:none;
  color:#fff;
  font-size:18px;
  cursor:pointer;
  padding:6px 10px;
  border-radius:10px;
}
.modal-close:hover{ background:rgba(255,255,255,.18); }

.modal-body{ padding:14px 16px 16px 16px; }
.muted{ color:#6b7280; font-weight:800; }

.fmt-list{ list-style:none; margin:0; padding:0; }
.fmt-list li{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:10px 0;
  border-bottom:1px solid #eef2f7;
}
.fmt-name{ font-weight:900; color:#111827; }
.fmt-dl{
  background:#0b6b3a;
  color:#fff;
  text-decoration:none;
  padding:8px 12px;
  border-radius:10px;
  font-weight:900;
}
.fmt-dl:hover{ opacity:.92; }

/* =========================
   ✅ TOOLS: BUSCADOR + SELECT ESTADO (en una fila)
========================= */
.panel-right{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:nowrap;
}

.tools{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:nowrap;
}

/* Buscador */
.searchbox{
  position:relative;
  display:flex;
  align-items:center;
  width:360px;
  flex: 1 1 360px;
}

.searchbox input{
  width:100%;
  padding:10px 38px 10px 12px;
  border-radius:10px;
  border:1px solid #d1d5db;
  background:#fff;
  outline:none;
  font-weight:700;
}

.searchbox input:focus{
  border-color:#0b6b3a;
  box-shadow:0 0 0 3px rgba(11,107,58,.12);
}

.btn-clear{
  position:absolute;
  right:8px;
  width:28px;
  height:28px;
  border:none;
  border-radius:8px;
  cursor:pointer;
  background:#f3f4f6;
  color:#111827;
  display:none;
  font-weight:900;
}
.btn-clear:hover{ opacity:.9; }

/* Select estado */
.estado-select{
  padding:10px 12px;
  border-radius:10px;
  border:1px solid #d1d5db;
  background:#fff;
  font-weight:900;
  outline:none;
  min-width:200px;
  flex: 0 0 200px;
}

.estado-select:focus{
  border-color:#0b6b3a;
  box-shadow:0 0 0 3px rgba(11,107,58,.12);
}

/* ✅ Responsive */
@media (max-width: 768px){
  .brand img{ width:220px; max-width:220px; }
  .hero h1{ font-size:18px; text-align:center; }
}

/* ✅ SOLO en pantallas muy pequeñas baja tools */
@media (max-width: 520px){
  .panel-right{ flex-wrap:wrap; justify-content:stretch; }
  .tools{ flex-wrap:wrap; width:100%; }
  .searchbox{ width:100%; flex: 1 1 100%; }
  .estado-select{ width:100%; flex: 1 1 100%; }
}

/* ✅ En móviles el dropdown mejor abajo (para que no se corte a la derecha) */
@media (max-width: 680px){
  .dropdown{
    top:44px;
    left:0;
    margin-left:0;
  }
}

/* =========================
   ✅ FOOTER INSTITUCIONAL
========================= */
.site-footer{
  margin-top: 28px;
  background:#0B6B3A;
  color:#ffffff;
  border-top:4px solid #ffffff;
}

.site-footer-inner{
  max-width:1200px;
  margin:0 auto;
  padding:18px 16px;
  display:grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap:16px;
  align-items:center;
  font-size:13px;
  font-weight:800;
}

/* Columnas */
.footer-col{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.footer-col strong{
  font-weight:900;
  letter-spacing:.3px;
}

/* Centro */
.footer-center{
  text-align:center;
}

/* Derecha */
.footer-right{
  text-align:right;
}

.footer-right a{
  color:#ffffff;
  text-decoration:none;
  font-weight:900;
}

.footer-right a:hover{
  text-decoration:underline;
  opacity:.95;
}

/* Email */
.site-footer a{
  color:#FFD200; /* amarillo institucional */
  text-decoration:none;
}
.site-footer a:hover{
  text-decoration:underline;
}

/* =========================
   ✅ RESPONSIVE
========================= */
@media (max-width: 820px){
  .site-footer-inner{
    grid-template-columns:1fr;
    text-align:center;
  }

  .footer-right{
    text-align:center;
  }
}

/* =========================
   ✅ FOOTER INSTITUCIONAL STICKY
========================= */

/* Estructura base para footer pegado abajo */
html, body{
  height:100%;
}

body{
  display:flex;
  flex-direction:column;
}

/* El contenido principal empuja el footer */
.wrap{
  flex:1;
}

/* FOOTER */
.site-footer{
  background:#C8D0D9;           /* ✅ color solicitado */
  color:#1f2937;
  border-top:2px solid #ffffff;
}

/* Contenido interno */
.site-footer-inner{
  max-width:1200px;
  margin:0 auto;
  padding:16px 16px;
  display:grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap:16px;
  align-items:center;
  font-size:13px;
  font-weight:400;
}

/* Columnas */
.footer-col{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.footer-col strong{
  font-weight:800;
  letter-spacing:.3px;
}

/* Centro */
.footer-center{
  text-align:center;
}

/* Derecha */
.footer-right{
  text-align:right;
}

/* Links */
.site-footer a{
  color:#0B6B3A;
  font-weight:400;
  text-decoration:none;
}

.site-footer a:hover{
  text-decoration:underline;
}

/* Responsive */
@media (max-width: 820px){
  .site-footer-inner{
    grid-template-columns:1fr;
    text-align:center;
  }

  .footer-right{
    text-align:center;
  }
}

/*
--------------------------------------------------

 Accesibilidad (botón oculto) */
.sr-only{
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  padding:0 !important;
  margin:-1px !important;
  overflow:hidden !important;
  clip:rect(0,0,0,0) !important;
  white-space:nowrap !important;
  border:0 !important;
}

/* per_page select (compacto) */
.perpage-select{
  padding:10px 12px;
  border-radius:10px;
  border:1px solid #d1d5db;
  background:#fff;
  font-weight:900;
  outline:none;
  min-width:120px;
  flex: 0 0 120px;
}
.perpage-select:focus{
  border-color:#0b6b3a;
  box-shadow:0 0 0 3px rgba(11,107,58,.12);
}

/* Paginación pública */
.pub-pagination{
  display:flex;
  gap:8px;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  margin:16px 0 6px;
}
.pp-item{
  min-width:40px;
  height:40px;
  padding:0 12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:12px;
  border:1px solid #e5e7eb;
  background:#fff;
  text-decoration:none;
  font-weight:900;
  color:#111827;
}
.pp-item:hover{ transform: translateY(-1px); }
.pp-item.active{
  background:#0b6b3a;
  border-color:#0b6b3a;
  color:#fff;
}
.pp-item.disabled{
  opacity:.45;
  pointer-events:none;
}
.pp-dots{
  font-weight:900;
  opacity:.6;
  padding:0 6px;
}
.pub-meta{
  text-align:center;
  font-weight:800;
  opacity:.7;
  margin-bottom:10px;
}

/* En pantallas pequeñas, que el per_page baje bien */
@media (max-width: 520px){
  .perpage-select{ width:100%; flex: 1 1 100%; }
}

/* =========================
   ✅ CAMBIO: TÍTULO ARRIBA Y FORM DEBAJO
========================= */
.panel-head.panel-head-stack{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:12px;
}

.panel-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.panel-top-left{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.panel-title{
  margin:0;
  font-size:22px;
  font-weight:900;
  color:#1f2937;
}

.panel-bottom{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:nowrap;
}

.panel-bottom .pub-tools-form{
  flex:1;
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:nowrap;
}

@media (max-width: 680px){
  .panel-bottom{
    flex-wrap:wrap;
    justify-content:stretch;
  }
  .panel-bottom .pub-tools-form{
    width:100%;
    flex-wrap:wrap;
  }
  .btn-formatos{
    width:100%;
  }
}
