.factura-portal {
  background: #f4f7fb;
  color: #182230;
}

.factura-portal .page {
  min-height: 100vh;
}

.factura-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 16px 34px;
}

.factura-portal .mt-7 {
  margin-top: 0 !important;
}

.factura-portal .factura-panel.mt-5 {
  margin-top: 20px !important;
}

.factura-logo {
  width: 270px;
  max-width: 86vw;
}

.factura-panel {
  background: #fff;
  border: 1px solid #e4e9f2;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.07);
  overflow: hidden;
}

.factura-panel__body {
  padding: 30px;
}

.factura-intro {
  padding-right: 16px;
}

.factura-eyebrow {
  margin-bottom: 8px;
  color: #175cd3;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.factura-title {
  margin-bottom: 12px;
  color: #101828;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.25;
}

.factura-copy {
  color: #5d6b82;
  font-size: 15px;
  line-height: 1.65;
}

.factura-search-box {
  padding: 22px;
  background: #f8fafd;
  border: 1px solid #e5eaf3;
  border-radius: 10px;
}

.factura-search-box .tabs-menu-body {
  padding-top: 0 !important;
}

.factura-form-stack {
  display: grid;
  gap: 14px;
}

.factura-portal .form-control,
.factura-portal .form-select {
  min-height: 44px;
  border-color: #d5dce8;
  border-radius: 8px;
  color: #182230;
}

.factura-portal .form-control:focus,
.factura-portal .form-select:focus {
  border-color: #2e90fa;
  box-shadow: 0 0 0 3px rgba(46, 144, 250, 0.16);
}

.factura-primary-btn {
  min-height: 46px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: #175cd3;
  color: #fff;
  font-weight: 800;
  transition: background .18s ease, transform .18s ease;
}

.factura-primary-btn:hover {
  background: #1849a9;
}

.factura-primary-btn:active {
  transform: translateY(1px);
}

.factura-layout {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 28px;
}

.factura-section {
  padding: 24px;
  background: #fff;
  border: 1px solid #e4e9f2;
  border-radius: 10px;
}

.factura-section--muted {
  background: #f8fafd;
}

.factura-section-title {
  margin: 0 0 18px;
  color: #101828;
  font-size: 18px;
  font-weight: 800;
}

.factura-summary {
  margin: 0;
}

.factura-section .table {
  margin-bottom: 0;
}

.factura-section .table td {
  padding: 10px 0;
  border-bottom: 1px solid #edf1f7;
  color: #667085;
  vertical-align: middle;
}

.factura-section .table tr:last-child td {
  border-bottom: 0;
}

.factura-section .table td:last-child {
  color: #182230;
}

.factura-section .table .fs-18 {
  color: #175cd3;
  font-weight: 800;
}

.factura-section #total_pago {
  color: #0b4ea2;
  font-size: 24px;
}

.factura-summary__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid #edf1f7;
}

.factura-summary__row:last-child {
  border-bottom: 0;
}

.factura-summary__label {
  color: #667085;
  font-size: 14px;
}

.factura-summary__value {
  color: #182230;
  font-size: 14px;
  font-weight: 800;
  text-align: right;
}

.factura-summary__row--discount .factura-summary__value {
  color: #b42318;
}

.factura-total {
  margin-top: 16px;
  padding: 16px;
  background: #eef6ff;
  border: 1px solid #cfe5ff;
  border-radius: 10px;
}

.factura-total .factura-summary__label {
  color: #175cd3;
  font-weight: 800;
}

.factura-total .factura-summary__value {
  color: #0b4ea2;
  font-size: 24px;
}

.factura-payment {
  margin-top: 16px;
  padding: 14px;
  background: #ecfdf3;
  border: 1px solid #abefc6;
  border-radius: 10px;
}

.factura-payment__label {
  margin-bottom: 4px;
  color: #067647;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.factura-payment__value {
  color: #05603a;
  font-size: 15px;
  font-weight: 800;
}

.factura-payment__hint {
  margin-top: 4px;
  color: #3b7c55;
  font-size: 12px;
}

.factura-rfc-search {
  display: flex;
  gap: 10px;
}

.factura-rfc-search .form-control {
  flex: 1;
}

.factura-rfc-search .btn {
  min-width: 110px;
  border-radius: 8px;
  font-weight: 800;
}

.factura-client-grid {
  margin-top: 18px;
}

.factura-actions {
  margin-top: 10px;
}

.factura-alert {
  color: #b42318;
  font-size: 16px;
  line-height: 1.6;
}

@media (max-width: 991.98px) {
  .factura-panel__body {
    padding: 22px;
  }

  .factura-intro {
    padding-right: 0;
    margin-bottom: 22px;
  }

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

@media (max-width: 575.98px) {
  .factura-shell {
    padding: 22px 12px;
  }

  .factura-panel__body,
  .factura-section {
    padding: 18px;
  }

  .factura-rfc-search {
    display: grid;
  }

  .factura-summary__row {
    display: grid;
    gap: 4px;
  }

  .factura-summary__value {
    text-align: left;
  }
}
