/**
 * Compatibilidad Bootstrap 3 → 5 (vistas legacy sin reescribir).
 * Reducir este archivo conforme se migren vistas a clases BS5 nativas.
 */

/* ── Paneles BS3 → aspecto card ───────────────────────────── */
.panel {
  margin-bottom: 1.25rem;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.5rem;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.09);
}

.panel-default > .panel-heading {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border-bottom: 1px solid #e2e8f0;
  color: #1e293b;
  border-radius: 0.5rem 0.5rem 0 0;
  padding: 0.75rem 1.125rem;
}

.panel-heading h4,
.panel-heading h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.panel-body {
  padding: 1.25rem 1.125rem;
}

.panel-footer {
  padding: 0.75rem 1.125rem;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  border-radius: 0 0 0.5rem 0.5rem;
}

/* ── Grid BS3 ─────────────────────────────────────────────── */
[class*="col-xs-"] {
  position: relative;
  min-height: 1px;
  padding-right: calc(var(--bs-gutter-x, 1.5rem) * 0.5);
  padding-left: calc(var(--bs-gutter-x, 1.5rem) * 0.5);
}

.col-xs-1 { flex: 0 0 auto; width: 8.333333%; }
.col-xs-2 { flex: 0 0 auto; width: 16.666667%; }
.col-xs-3 { flex: 0 0 auto; width: 25%; }
.col-xs-4 { flex: 0 0 auto; width: 33.333333%; }
.col-xs-5 { flex: 0 0 auto; width: 41.666667%; }
.col-xs-6 { flex: 0 0 auto; width: 50%; }
.col-xs-7 { flex: 0 0 auto; width: 58.333333%; }
.col-xs-8 { flex: 0 0 auto; width: 66.666667%; }
.col-xs-9 { flex: 0 0 auto; width: 75%; }
.col-xs-10 { flex: 0 0 auto; width: 83.333333%; }
.col-xs-11 { flex: 0 0 auto; width: 91.666667%; }
.col-xs-12 { flex: 0 0 auto; width: 100%; }

.row {
  display: flex;
  flex-wrap: wrap;
}

/* ── Utilidades BS3 ───────────────────────────────────────── */
.pull-right { float: right !important; }
.pull-left { float: left !important; }
.hidden { display: none !important; }
.show { display: block !important; }
.img-responsive { max-width: 100%; height: auto; }

@media (max-width: 575.98px) {
  .hidden-xs { display: none !important; }
}

@media (min-width: 576px) {
  .visible-xs { display: none !important; }
}

/* ── Botones / navbar legacy ──────────────────────────────── */
.btn-default {
  --bs-btn-color: #212529;
  --bs-btn-bg: #f8f9fa;
  --bs-btn-border-color: #ced4da;
  --bs-btn-hover-bg: #e9ecef;
}

.navbar-default {
  background-color: #f8f9fa;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
}

.navbar-default .navbar-brand,
.navbar-default .navbar-nav > li > a {
  color: #374151;
}

/* Toggle BS3 en navbar BS5 */
.navbar-toggle {
  display: none;
}

/* ── Modal close BS3 ──────────────────────────────────────── */
.modal .close {
  box-sizing: content-box;
  width: 1em;
  height: 1em;
  padding: 0.25em;
  color: #fff;
  background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
  border: 0;
  border-radius: 0.375rem;
  opacity: 1;
}

.modal-header .close {
  margin: -0.5rem -0.5rem -0.5rem auto;
}

/* ── Form controls legacy (cedulas) ─────────────────────── */
.form-control {
  display: block;
  width: 100%;
  padding: 0.4375rem 0.75rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #374151;
  background-color: #fff;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
}

.form-control:focus {
  border-color: #3b82f6;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.2);
}

.form-control[readonly] {
  background-color: #e9ecef;
  cursor: default;
}

.form-group {
  margin-bottom: 1rem;
}

label {
  display: inline-block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  font-size: 0.8125rem;
}

/* ── Glyphicon → Bootstrap Icons (fuente) ───────────────── */
.glyphicon {
  display: inline-block;
  font-family: bootstrap-icons !important;
  font-style: normal;
  font-weight: normal !important;
  line-height: 1;
  vertical-align: -0.125em;
  -webkit-font-smoothing: antialiased;
}

.glyphicon-th-large::before { content: "\f3fc"; }
.glyphicon-lock::before { content: "\f47b"; }
.glyphicon-off::before { content: "\f5b1"; }
.glyphicon-remove::before { content: "\f62a"; }
.glyphicon-ok-sign::before { content: "\f26b"; }
.glyphicon-exclamation-sign::before { content: "\f33b"; }
.glyphicon-arrow-left::before { content: "\f12f"; }
.glyphicon-info-sign::before { content: "\f431"; }
.glyphicon-map-marker::before { content: "\f3e8"; }
.glyphicon-credit-card::before { content: "\f2b3"; }
.glyphicon-user::before { content: "\f4e1"; }
.glyphicon-eye-open::before { content: "\f341"; }
.glyphicon-briefcase::before { content: "\f1c6"; }
.glyphicon-home::before { content: "\f424"; }
.glyphicon-file::before { content: "\f38e"; }
.glyphicon-folder-open::before { content: "\f3d7"; }
.glyphicon-plus-sign::before { content: "\f4fe"; }
.glyphicon-minus-sign::before { content: "\f4e5"; }
.glyphicon-refresh::before { content: "\f5a2"; }
.glyphicon-calendar::before { content: "\f1e5"; }
.glyphicon-comment::before { content: "\f249"; }
.glyphicon-upload::before { content: "\f603"; }
.glyphicon-floppy-disk::before { content: "\f7d8"; }
.glyphicon-paperclip::before { content: "\f4e9"; }
.glyphicon-ok-circle::before { content: "\f26b"; }
.glyphicon-remove-circle::before { content: "\f623"; }
.glyphicon-print::before { content: "\f501"; }
.glyphicon-time::before { content: "\f5bc"; }
.glyphicon-inbox::before { content: "\f42c"; }
.glyphicon-list-alt::before { content: "\f479"; }
.glyphicon-play-circle::before { content: "\f4f3"; }
.glyphicon-pause::before { content: "\f4c3"; }
.glyphicon-usd::before { content: "\f636"; }
.glyphicon-trash::before { content: "\f5de"; }
.glyphicon-wrench::before { content: "\f621"; }
.glyphicon-search::before { content: "\f52a"; }
.glyphicon-warning-sign::before { content: "\f33b"; }

/* ── Datepicker sobre BS5 ───────────────────────────────── */
.datepicker.dropdown-menu {
  z-index: 1060 !important;
}
