/* Botón login estilo chip, igual que Consulta Pública */
.hero-login-btn.chip {
  background: #2563eb;
  color: #fff !important;
  font-weight: 700;
  border-radius: 16px;
  padding: 7px 18px;
  font-size: 1.08em;
  text-decoration: underline;
  border: none;
  box-shadow: 0 2px 8px 0 rgba(0,0,0,0.10);
  letter-spacing: 0.01em;
  transition: background 0.18s, color 0.18s;
  display: inline-block;
}
.hero-login-btn.chip:hover, .hero-login-btn.chip:focus {
  background: #1746a2;
  color: #fff !important;
}

@media (max-width: 900px) {
  .hero-login-btn.chip {
    padding: 7px 12px;
    font-size: 1em;
  }
}
.modal-content h2 {
  color: #13406a !important;
}
.btn-acceso-total {
  background: #fff;
  color: #2563eb;
  border: 2px solid #2563eb;
  font-weight: 900;
  padding: 8px 18px;
  border-radius: 10px;
  font-size: 1.08em;
  box-shadow: 0 2px 8px 0 rgba(0,0,0,0.10);
  transition: background 0.18s, color 0.18s, border 0.18s;
  letter-spacing: 0.01em;
  cursor: pointer;
  margin-left: 8px;
}
.btn-acceso-total:hover, .btn-acceso-total:focus {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
  outline: 2px solid #2563eb;
}

/* Modal Acceso Total */
.modal-acceso-total {
  position: fixed;
  z-index: 9999;
  left: 0; top: 0; width: 100vw; height: 100vh;
  background: rgba(18,32,51,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 24px 0;
}
.modal-content {
  background: #fff;
  border-radius: 16px;
  padding: 32px 24px 24px 24px;
  min-width: 600px;
  width: fit-content;
  max-width: 98vw;
  box-shadow: 0 8px 32px 0 rgba(18,32,51,0.18);
  position: relative;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 2rem;
  color: #2563eb;
  cursor: pointer;
}
.modal-comparacion {
  display: flex;
  flex-direction: row;
  gap: 24px;
  margin-top: 18px;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: stretch;
}

.modal-card {
  background: #f8fafc;
  border-radius: 12px;
  box-shadow: 0 2px 8px 0 rgba(18,32,51,0.08);
  padding: 18px 20px 20px 20px;
  min-width: 220px;
  max-width: 300px;
  flex: 1 1 220px;
  color: #13406a !important;
}
.modal-card *, .modal-card *:not(strong):not(a) {
  color: #13406a !important;
}
.modal-card strong {
  color: #13406a !important;
  font-weight: bold;
}
.modal-card button {
  color: #fff !important;
}
.modal-card h3 {
  color: #2563eb;
  margin-bottom: 10px;
  font-size: 1.18em;
}
.modal-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 10px 0;
}
.modal-card ul li {
  margin-bottom: 7px;
  font-size: 1em;
  color: #13406a !important;
}
.modal-card.acceso-total {
  border: 2px solid #2563eb;
  background: #e8f0fe;
}
.modal-card.acceso-publico {
  border: 2px solid #e5e7eb;
  background: #fff;
}

/* Forzar horizontal en móviles */
@media (max-width: 900px) {
  .modal-content {
    width: 99vw;
    min-width: 0;
    max-width: 99vw;
    padding: 18px 2vw 18px 2vw;
  }
  .modal-comparacion {
    gap: 8px;
    flex-wrap: nowrap;
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 8px;
    width: 100%;
    justify-content: flex-start;
  }
  .modal-card {
    min-width: 220px;
    max-width: 90vw;
    padding: 10px 6px 14px 6px;
    font-size: 0.97em;
    color: #13406a !important;
  }
  .modal-card ul li {
    color: #13406a !important;
  }
}
/* Imagen-botón de detalle y priorización */
.img-detail-btn, .img-star-btn {
  cursor: pointer;
  width: 28px;
  height: 28px;
  vertical-align: middle;
  transition: filter 0.2s, transform 0.2s;
  margin: 0 4px;
}
.img-detail-btn:hover, .img-star-btn:hover {
  filter: brightness(1.2) drop-shadow(0 0 2px #007bff);
  transform: scale(1.08);
}
.img-detail-btn[title], .img-star-btn[title] {
  position: relative;
}
/* Enlace destacado para acciones importantes */
/* Enlace destacado con máximo contraste */
/* Botón destacado menos chillón, azul suave */
.link-accent {
  color: #fff !important;
  background: #2563eb;
  font-weight: 700;
  padding: 7px 18px;
  border-radius: 16px;
  text-decoration: underline;
  box-shadow: 0 2px 8px 0 rgba(0,0,0,0.10);
  transition: background 0.18s, color 0.18s;
  letter-spacing: 0.01em;
  font-size: 1em;
  border: none;
  display: inline-block;
}
.link-accent:hover, .link-accent:focus {
  background: #1746a2;
  color: #fff !important;
}
/* Error visual para inputs */
.input-error {
  color: #b42318;
  font-size: 13px;
  margin-top: 2px;
  margin-left: 2px;
  font-weight: 600;
  display: block;
}
.input-error-border {
  border-color: #b42318 !important;
  box-shadow: 0 0 0 2px #fee2e2 !important;
}
.user-avatar {
  border-radius: 50%;
  background: #fff;
  border: 2px solid #2563eb;
  object-fit: cover;
  width: 32px;
  height: 32px;
  box-shadow: 0 1px 4px rgba(18,32,51,0.10);
}
.user-name-contrast {
  color: #fff !important;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(18,32,51,0.18);
  margin-left: 6px;
  font-size: 1.08rem;
}

/* --- Hero login icon alignment --- */
.hero-title-flex {
  display: flex;
  align-items: center;
  gap: 16px;
}
.user-icon-btn.hero-login-btn {
  background: #e8f0fe;
  color: #2563eb;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(18,32,51,0.08);
  transition: background 0.2s;
  margin-left: 8px;
}
.user-icon-btn.hero-login-btn:hover {
  background: #dbeafe;
}
@media (max-width: 600px) {
  .hero-title-flex {
    font-size: 1.2rem;
    gap: 8px;
  }
  .user-icon-btn.hero-login-btn {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }
}

/* --- Hero privado: usuario y nombre --- */
.hero-title-flex {
  display: flex;
  align-items: center;
  gap: 18px;
}
.user-info-flex {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 18px;
}
.user-icon-btn {
  background: #e8f0fe;
  color: #2563eb;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(18,32,51,0.08);
  transition: background 0.2s;
}
.user-icon-btn:hover {
  background: #dbeafe;
}
.user-name {
  font-weight: 600;
  color: #2563eb;
  font-size: 1.05rem;
}
.user-dropdown {
  background: #fff;
  color: #222;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  min-width: 160px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  padding: 8px 0;
}
.user-dropdown button {
  background: none;
  border: none;
  padding: 10px 18px;
  text-align: left;
  font-size: 1rem;
  color: #222;
  cursor: pointer;
  transition: background 0.2s;
}
.user-dropdown button:hover {
  background: #f3f6fb;
}
/* --- Modal --- */
.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(18,32,51,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal-content {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 32px 28px 24px 28px;
  max-width: 350px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.modal-content h3 {
  margin-top: 0;
  color: var(--accent-2);
}
.modal-content p {
  color: var(--muted);
  margin-bottom: 18px;
}
/* --- Auth (login/registro) --- */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}
.auth-card {
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 36px 32px 28px 32px;
  max-width: 400px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.auth-card h2 {
  margin-top: 0;
  margin-bottom: 18px;
  text-align: center;
  color: var(--accent-2);
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.auth-form label {
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 2px;
}
.auth-form input {
  padding: 10px 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  margin-bottom: 8px;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 0;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.2s;
}
.btn-primary:hover {
  background: var(--accent-2);
}
.auth-divider {
  text-align: center;
  color: var(--muted-2);
  margin: 18px 0 10px 0;
  font-size: 15px;
}
.btn-google, .btn-outlook {
  width: 100%;
  padding: 10px 0;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-google {
  background: #fff;
  color: #222;
  border: 1px solid #e4e7ec;
}
.btn-google:hover {
  background: #f3f6fb;
}
.btn-outlook {
  background: #2563eb;
  color: #fff;
}
.btn-outlook:hover {
  background: #1e40af;
}
.auth-link {
  text-align: center;
  margin-top: 18px;
  color: var(--muted);
  font-size: 15px;
}
.auth-link a {
  color: var(--accent-2);
  text-decoration: none;
  font-weight: 600;
}
.auth-link a:hover {
  text-decoration: underline;
}
/* Asegura ocultamiento robusto de filtros en móvil */
@media (max-width: 768px) {
  .field.hide-mobile,
  .field.hide-mobile * {
    display: none !important;
  }
}
/* Responsive helpers */
.hide-mobile {
  display: block;
}
.hide-desktop {
  display: none !important;
}
@media (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }
  .hide-desktop {
    display: block !important;
  }
  /* Ordenamiento solo móvil */
  .order-control-mobile {
    margin-top: 8px;
    margin-bottom: 0;
  }
  .filters-grid {
    grid-template-columns: repeat(12, 1fr);
  }
}
:root {
  --bg: #f3f6fb;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --ink: #122033;
  --muted: #667085;
  --muted-2: #98a2b3;
  --accent: #0f766e;
  --accent-2: #115e59;
  --accent-3: #0b5d57;
  --line: #e4e7ec;
  --line-2: #d0d5dd;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 12px 24px rgba(16, 24, 40, 0.08);
  --radius: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Tahoma, sans-serif;
  background:
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.08), transparent 26%),
    linear-gradient(180deg, #eef4f8 0%, var(--bg) 20%, var(--bg) 100%);
  color: var(--ink);
}

body.is-loading {
  cursor: progress;
}

.hero {
  padding: 32px 20px 28px;
  background: linear-gradient(135deg, #123c69 0%, #0f766e 100%);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.95);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 14px 0 8px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero p {
  margin: 0;
  max-width: 760px;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.9);
}

.container {
  max-width: 1200px;
  margin: 20px auto 28px;
  padding: 0 14px 20px;
  display: grid;
  gap: 16px;
}

.panel {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-md);
}

.section-title {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.section-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 14px;
}

.stat-card {
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  min-height: 96px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.stat-value {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.filters-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.filters-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.active-filters-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--accent-3);
  border: 1px solid rgba(15, 118, 110, 0.16);
  font-size: 12px;
  font-weight: 800;
}

.is-hidden {
  display: none !important;
}

.filters-toggle {
  display: none;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field.col-4 {
  grid-column: span 4;
}

.field.col-6 {
  grid-column: span 6;
}

.field label {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.input-wrap,
.select-wrap {
  position: relative;
}

input[type="text"],
input[type="number"],
select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input::placeholder {
  color: var(--muted-2);
}

input:focus,
select:focus {
  border-color: rgba(15, 118, 110, 0.65);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.sueldo-group {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 10px;
}

.field-actions .actions {
  height: 48px;
}


.actions {
  display: flex;
  flex-direction: row;
  gap: 10px;
  flex-wrap: nowrap;
}

.field-actions {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

@media (max-width: 600px) {
  .field-actions {
    grid-column: span 12;
    margin-top: 10px;
  }
  .actions {
    flex-direction: row;
    gap: 10px;
    width: 100%;
    justify-content: flex-start;
  }
  .actions button {
    min-width: 120px;
  }
}

button {
  border: 0;
  border-radius: 12px;
  min-height: 44px;
  padding: 0 16px;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.08s ease, background 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
  background: var(--accent-2);
}

button:active {
  transform: translateY(1px);
}

button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

button.ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

button.ghost:hover {
  background: #f8fafc;
}

.results-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}

.results-meta {
  text-align: right;
}

#totalResultados {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}

#resultsRange {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 1180px;
  background: #fff;
}

th,
td {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-size: 14px;
}

th {
  background: #f8fafc;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

tbody tr:hover {
  background: #f9fbfc;
}

th.sortable {
  cursor: pointer;
  user-select: none;
}

th.sortable:hover {
  background: #eff6f7;
}

.sort-ind {
  color: var(--accent);
  font-size: 11px;
  margin-left: 6px;
}

.cell-index {
  width: 56px;
  color: var(--muted);
  font-weight: 800;
}

.cell-puesto {
  font-weight: 700;
  min-width: 220px;
}

.cell-remuneracion {
  text-align: right;
  white-space: nowrap;
}

.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status-ok {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.status-warn {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.table-tags,
.card-tags-row,
.detail-tags-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.table-tags {
  min-width: 160px;
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  border: 1px solid transparent;
}

.tag-danger {
  background: #fee2e2;
  color: #b42318;
  border-color: #fecaca;
}

.tag-warn {
  background: #fef3c7;
  color: #b54708;
  border-color: #fde68a;
}

.tag-info {
  background: #e0f2fe;
  color: #175cd3;
  border-color: #bae6fd;
}

.tag-empty {
  background: #f2f4f7;
  color: var(--muted);
  border-color: #eaecf0;
}

.tag-star {
  background: #fdf4ff;
  color: #6941c6;
  border-color: #e9d7fe;
}

.btn-detail {
  min-height: 38px;
  padding: 0 14px;
}

.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

#pageInfo {
  color: var(--muted);
  font-weight: 700;
}

.cards-results {
  display: none;
  margin-top: 14px;
  gap: 12px;
}

.result-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.result-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.result-index {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f2f4f7;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.result-title {
  margin: 0 0 6px;
  font-size: 17px;
  line-height: 1.25;
}

.result-entity {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.card-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.meta-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.btn-detail.full {
  width: 100%;
  margin-top: 12px;
}

dialog {
  border: 0;
  padding: 0;
  border-radius: 24px;
  width: min(1120px, calc(100vw - 24px));
  max-height: min(90vh, 940px);
  background: transparent;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
}

dialog::backdrop {
  background: rgba(2, 6, 23, 0.45);
  backdrop-filter: blur(3px);
}
#modalAccesoTotal::backdrop {
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(6px);
}

dialog article {
  background: var(--panel);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

dialog article > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 22px 18px;
  background: linear-gradient(135deg, #123c69 0%, #0f766e 100%);
  color: #fff;
}

.dialog-title-wrap {
  min-width: 0;
}

.dialog-eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}

dialog article > header h3 {
  margin: 0;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  word-break: break-word;
}

#cerrarDetalle {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #fff;
}

#btnEditarConvocatoria {
  flex-shrink: 0;
  margin-right: 8px;
  padding: 6px 14px;
  font-size: 0.9em;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #fff;
}

#cerrarDetalle:hover {
  background: rgba(255, 255, 255, 0.22);
}

#btnEditarConvocatoria:hover {
  background: rgba(255, 255, 255, 0.22);
}

#detalleBody {
  padding: 20px 22px 24px;
  overflow: auto;
  background:
    linear-gradient(180deg, #f8fbfc 0%, #ffffff 35%);
}

.detail-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.mini-stat {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  min-height: 92px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mini-stat span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.mini-stat strong {
  margin-top: 8px;
  font-size: 22px;
  line-height: 1.2;
  color: var(--ink);
  word-break: break-word;
}

.detail-tags-bar {
  margin-bottom: 18px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.detail-column {
  min-width: 0;
}

.detail-section-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
}

.detail-section-head {
  margin-bottom: 12px;
}

.detail-section-head h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: var(--accent-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.detail-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-item-full {
  grid-column: 1 / -1;
  min-height: 120px;
}

.detail-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.detail-value {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}

.detail-value a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  word-break: break-all;
}

.detail-value a:hover {
  text-decoration: underline;
}

.detail-accordion {
  display: none;
}

.detail-accordion details {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  margin-top: 12px;
}

.detail-accordion summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 800;
  color: var(--accent-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.detail-accordion summary::-webkit-details-marker {
  display: none;
}

.detail-accordion summary::after {
  content: "+";
  font-size: 18px;
  line-height: 1;
  color: var(--muted);
}

.detail-accordion details[open] summary::after {
  content: "–";
}

.detail-accordion-body {
  padding: 0 14px 14px;
  display: grid;
  gap: 12px;
}

.empty-state {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  border: 1px dashed var(--line-2);
  border-radius: 16px;
  background: #fcfcfd;
}

.empty-state-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #f2f4f7;
  color: var(--muted);
  font-weight: 800;
  flex-shrink: 0;
}

.empty-state strong {
  display: block;
  margin-bottom: 4px;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.skeleton {
  display: inline-block;
  position: relative;
  overflow: hidden;
  background: #eaecf0;
  border-radius: 10px;
  vertical-align: middle;
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.55) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: shimmer 1.3s infinite;
}

.skeleton-text {
  height: 14px;
  border-radius: 999px;
}

.skeleton-pill {
  width: 86px;
  height: 28px;
  border-radius: 999px;
}

.skeleton-pill.small {
  width: 64px;
}

.skeleton-button {
  width: 100px;
  height: 38px;
  border-radius: 12px;
}

.w-24 { width: 24px; }
.w-80 { width: 80px; }
.w-90 { width: 90%; }
.w-120 { width: 120px; }
.w-180 { width: 180px; }
.w-320 { width: 320px; }

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

.btn-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1080px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .field.col-4,
  .field.col-6 {
    grid-column: span 6;
  }

  .detail-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 24px 16px;
  }

  .container {
    padding: 0 10px 20px;
  }

  .panel {
    padding: 14px;
    border-radius: 16px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filters-head {
    align-items: center;
    flex-wrap: wrap;
  }

  .filters-toggle {
    display: inline-flex;
  }

  .filters-card.filters-collapsed .filters-grid {
    display: none;
  }

  .field.col-4,
  .field.col-6 {
    grid-column: span 12;
  }

  .sueldo-group {
    grid-template-columns: 1fr;
  }

  .results-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .results-meta {
    text-align: left;
  }

  .table-wrap {
    display: none;
  }

  .cards-results {
    display: grid;
  }

  .card-meta-grid {
    grid-template-columns: 1fr;
  }

  dialog {
    width: min(100vw - 10px, 1000px);
    border-radius: 18px;
  }

  dialog article > header {
    padding: 18px 16px 16px;
  }

  #detalleBody {
    padding: 16px;
  }

  .detail-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-layout {
    display: none;
  }

  .detail-accordion {
    display: block;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-item,
  .detail-item-full {
    grid-column: auto;
    min-height: auto;
  }

  .mini-stat {
    min-height: auto;
  }

  .mini-stat strong {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 28px;
  }

  .section-title {
    font-size: 22px;
  }

  button,
  input,
  select {
    font-size: 16px;
  }

  .stats-grid,
  .detail-summary-grid {
    grid-template-columns: 1fr 1fr;
  }

  dialog article > header h3 {
    font-size: 24px;
  }

  .filters-head-actions {
    width: 100%;
    justify-content: space-between;
  }
}

.help-icon-btn {
  background: none;
  border: none;
  padding: 0 2px;
  margin-left: 2px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 1rem;
  color: #2563eb;
  transition: background 0.2s;
  position: relative;
  z-index: 10;
}
.help-icon-btn:hover {
  background: #e0e7ff;
}
.help-icon {
  font-weight: bold;
  font-size: 1.1em;
  display: inline-block;
  width: 18px;
  height: 18px;
  text-align: center;
  line-height: 18px;
}
.tooltip {
  visibility: hidden;
  opacity: 0;
  background: #222;
  color: #fff;
  text-align: left;
  border-radius: 6px;
  padding: 8px 12px;
  position: absolute;
  z-index: 100;
  left: 110%;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.98rem;
  min-width: 210px;
  max-width: 320px;
  box-shadow: 0 2px 12px rgba(18,32,51,0.18);
  transition: opacity 0.18s;
  pointer-events: none;
}
.help-icon-btn:hover .tooltip {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.highlight {
  background: #ffe066;
  color: #1a202c;
  padding: 1px 4px;
  border-radius: 4px;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(251,191,36,0.13);
  display: inline;
}

:where(a, button, input, select, textarea, [role="button"], [tabindex]):focus-visible {
  outline: 3px solid #1d4ed8;
  outline-offset: 2px;
}

.help-icon-btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35);
}

.global-alert {
  border-left: 4px solid #b42318;
  background: #fef3f2;
  color: #7a271a;
  font-weight: 600;
}