html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin-bottom: 60px;
  max-width: 100%;
  overflow-x: hidden;
}

/* Evita que los margenes negativos de filas Bootstrap creen scroll horizontal global. */
.main-content {
  max-width: 100%;
  overflow-x: hidden;
}

.main-content > .row {
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.main-content .card,
.main-content .table-responsive {
  min-width: 0;
  max-width: 100%;
}

.main-content .table-responsive {
  overflow-x: auto;
}

/* Colores para grupos de tipos de documento */
.choices__list--dropdown .tipo-doc-group-0 {
  background-color: #eef6ff;
}
.choices__list--dropdown .tipo-doc-group-1 {
  background-color: #f0f9eb;
}
.choices__list--dropdown .tipo-doc-group-2 {
  background-color: #fff5e6;
}
.choices__list--dropdown .tipo-doc-group-3 {
  background-color: #fdeef4;
}

.entity-form-page {
  padding: 1.5rem 1rem 2rem;
}

.entity-form-shell {
  width: min(980px, 100%);
  margin: 0 auto;
}

.entity-form-shell--narrow {
  width: min(720px, 100%);
}

.entity-form-shell--wide {
  width: 100%;
  max-width: none;
}

.entity-form-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.entity-form-title {
  margin-bottom: 0.25rem;
  color: #252f40;
  font-size: 1.4rem;
  line-height: 1.3;
}

.entity-form-subtitle {
  max-width: 680px;
  margin-bottom: 0;
  color: #667085;
  font-size: 0.92rem;
  line-height: 1.5;
}

.entity-form-card {
  overflow: hidden;
  border: 1px solid #e9edf3;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(30, 39, 57, 0.08);
}

.entity-form-card--selects {
  overflow: visible;
}

.entity-form-card--selects .entity-form-body,
.entity-form-card--selects form {
  overflow: visible;
}

.entity-form-card--selects .choices {
  position: relative;
  z-index: 2;
}

.entity-form-card--selects .choices.is-open {
  z-index: 20;
}

.entity-form-card--selects .choices__list--dropdown {
  z-index: 20;
  max-height: none;
  overflow: visible;
  border-color: #d0d5dd;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 18px 34px rgba(30, 39, 57, 0.14);
  word-break: normal;
}

.entity-form-card--selects .choices__list--multiple .choices__item {
  max-width: 100%;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.entity-form-card--selects .choices__list--dropdown .choices__list {
  max-height: 260px;
  overflow-y: auto;
}

.entity-form-card--selects .choices__list--dropdown .choices__item {
  white-space: nowrap;
  word-break: normal;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 640px) {
  .entity-form-card--selects .choices__list--dropdown .choices__item--selectable {
    padding-right: 1rem;
  }

  .entity-form-card--selects .choices__list--dropdown .choices__item--selectable::after {
    display: none;
  }
}

.entity-form-body {
  padding: 1.5rem;
}

.entity-form-readonly {
  background-color: #f8fafc !important;
  color: #667085;
}

.entity-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid #e9edf3;
  background: #fbfcfe;
}

.entity-form-actions--between {
  justify-content: space-between;
}

.entity-form-actions .btn,
.entity-form-actions button,
.entity-form-actions input[type="submit"] {
  margin-bottom: 0;
}

.entity-detail-list {
  margin-bottom: 0;
}

.entity-detail-list dt {
  margin-bottom: 0.75rem;
  color: #667085;
  font-size: 0.88rem;
  font-weight: 700;
}

.entity-detail-list dd {
  margin-bottom: 0.75rem;
  color: #344054;
  font-size: 0.95rem;
  word-break: break-word;
}

.entity-section-title {
  margin-bottom: 1rem;
  color: #252f40;
  font-size: 1.08rem;
  line-height: 1.35;
}

.entity-table-scroll {
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.entity-table--wide {
  min-width: 1180px;
}

.entity-table--words {
  min-width: 1280px;
}

@media (max-width: 575.98px) {
  .entity-form-page {
    padding: 1rem 0.75rem 1.5rem;
  }

  .entity-form-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .entity-form-header .btn {
    width: 100%;
  }

  .entity-form-body {
    padding: 1.25rem;
  }

  .entity-form-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .entity-form-actions--between {
    justify-content: flex-start;
  }

  .entity-form-actions .btn,
  .entity-form-actions button,
  .entity-form-actions input[type="submit"] {
    width: 100%;
  }
}

.identity-status-page {
  min-height: calc(100vh - 150px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
}

.identity-status-card {
  width: min(760px, 100%);
  display: grid;
  grid-template-columns: 215px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid #e9edf3;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(30, 39, 57, 0.12);
}

.identity-status-side {
  display: flex;
  min-height: 245px;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem 1.75rem;
  border-right: 1px solid #e9edf3;
  background: linear-gradient(180deg, #fbfcfe 0%, #f4f8fb 100%);
}

.identity-status-logo {
  width: 128px;
  max-width: 100%;
  height: auto;
}

.identity-status-badge {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #fff;
  font-size: 1.05rem;
}

.identity-status-badge-info {
  background: #11a9d8;
  box-shadow: 0 12px 24px rgba(17, 169, 216, 0.25);
}

.identity-status-badge-success {
  background: #32c766;
  box-shadow: 0 12px 24px rgba(50, 199, 102, 0.24);
}

.identity-status-content {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 2.25rem 2.5rem;
}

.identity-status-eyebrow {
  margin-bottom: 0.65rem;
  color: #8392ab;
  font-size: 0.78rem;
  font-weight: 700;
}

.identity-status-title {
  margin-bottom: 0.75rem;
  color: #252f40;
  font-size: 1.55rem;
  line-height: 1.25;
}

.identity-status-copy {
  max-width: 430px;
  margin-bottom: 1.25rem;
  color: #5f6b7a;
  font-size: 0.95rem;
  line-height: 1.6;
}

.identity-status-note {
  display: flex;
  max-width: 430px;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  padding: 0.9rem 1rem;
  border: 1px solid #e8edf3;
  border-left: 3px solid #11a9d8;
  border-radius: 8px;
  background: #f8fafc;
  color: #5f6b7a;
  font-size: 0.9rem;
  line-height: 1.5;
}

.identity-status-note i {
  margin-top: 0.15rem;
  color: #11a9d8;
}

.identity-status-action {
  align-self: flex-start;
  min-width: 170px;
}

.identity-manage-page {
  min-height: calc(100vh - 150px);
  padding: 2rem 1rem 3rem;
}

.identity-manage-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.identity-manage-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.identity-manage-title {
  margin-bottom: 0.25rem;
  color: #252f40;
  font-size: 1.55rem;
  line-height: 1.25;
}

.identity-manage-subtitle {
  margin-bottom: 0;
  color: #667085;
  font-size: 0.95rem;
}

.identity-manage-card {
  display: grid;
  grid-template-columns: 255px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid #e9edf3;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(30, 39, 57, 0.1);
}

.identity-manage-nav {
  padding: 1rem;
  border-right: 1px solid #e9edf3;
  background: #fbfcfe;
}

.identity-manage-nav-title {
  display: block;
  margin: 0.25rem 0 0.85rem;
  color: #98a2b3;
  font-size: 0.72rem;
  font-weight: 700;
}

.identity-manage-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 42px;
  padding: 0.7rem 0.8rem;
  border-radius: 8px;
  color: #344054;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
}

.identity-manage-link:hover {
  background: #f1f4f8;
  color: #252f40;
}

.identity-manage-link.active {
  background: #fff;
  color: #fb6b10;
  box-shadow: 0 8px 18px rgba(30, 39, 57, 0.08);
}

.identity-manage-link i {
  width: 1rem;
  color: inherit;
  text-align: center;
}

.identity-manage-content {
  min-width: 0;
  padding: 2rem;
}

.identity-manage-content-header {
  margin-bottom: 1.5rem;
}

.identity-manage-content-header h2 {
  margin-bottom: 0.35rem;
  color: #252f40;
  font-size: 1.35rem;
}

.identity-manage-content-header p {
  max-width: 640px;
  margin-bottom: 0;
  color: #667085;
  font-size: 0.95rem;
  line-height: 1.55;
}

.identity-manage-form {
  max-width: 620px;
}

.identity-manage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.identity-manage-muted-field {
  background-color: #f8fafc !important;
  color: #667085;
}

.identity-manage-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.identity-manage-status-item {
  min-width: 0;
  padding: 1rem;
  border: 1px solid #e9edf3;
  border-radius: 8px;
  background: #fbfcfe;
}

.identity-manage-status-item span {
  display: block;
  margin-bottom: 0.35rem;
  color: #98a2b3;
  font-size: 0.72rem;
  font-weight: 700;
}

.identity-manage-status-item strong {
  display: block;
  color: #252f40;
  font-size: 0.95rem;
  word-break: break-word;
}

@media (max-width: 767.98px) {
  .identity-status-page {
    min-height: calc(100vh - 110px);
    padding: 1.5rem 1rem;
  }

  .identity-status-card {
    grid-template-columns: 1fr;
  }

  .identity-status-side {
    min-height: auto;
    flex-direction: row;
    align-items: center;
    padding: 1.5rem;
    border-right: 0;
    border-bottom: 1px solid #e9edf3;
  }

  .identity-status-logo {
    width: 116px;
  }

  .identity-status-badge {
    width: 48px;
    height: 48px;
  }

  .identity-status-content {
    padding: 1.75rem 1.5rem;
  }

  .identity-status-title {
    font-size: 1.35rem;
  }

  .identity-status-action {
    width: 100%;
  }

  .identity-manage-page {
    padding: 1.25rem 1rem 2rem;
  }

  .identity-manage-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .identity-manage-card {
    grid-template-columns: 1fr;
  }

  .identity-manage-nav {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid #e9edf3;
  }

  .identity-manage-nav-title {
    display: none;
  }

  .identity-manage-link {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .identity-manage-content {
    padding: 1.5rem;
  }

  .identity-manage-status-grid {
    grid-template-columns: 1fr;
  }
}
