/*
  Encabezado de marca CNTS (mismo look que la página principal).
  Usar en Alta RFC, Consulta, Facturar y listados.
*/
.cnts-header {
  --cnts-header-bg: #123b66;
  --cnts-header-bg-deep: #0d2f52;
  --cnts-gold: #c9a23a;
  --cnts-white: #ffffff;
  --cnts-logo-height: 60px;
  --cnts-logo-max-width: 250px;
  --cnts-header-pad-y: 0.85rem;
  --cnts-font: "Montserrat", "Segoe UI", sans-serif;

  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--cnts-header-bg) 0%, var(--cnts-header-bg-deep) 100%);
  color: #fff;
  padding: var(--cnts-header-pad-y) 1.35rem;
  box-shadow: 0 3px 14px rgba(13, 47, 82, 0.28);
  font-family: var(--cnts-font);
}

.cnts-header__pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 94% 18%, rgba(15, 90, 168, 0.28), transparent 26%),
    radial-gradient(circle at 98% 78%, rgba(201, 162, 58, 0.12), transparent 22%);
  opacity: 0.9;
}

.cnts-header__pattern::before,
.cnts-header__pattern::after {
  content: "";
  position: absolute;
  border: 16px solid rgba(255, 255, 255, 0.08);
  width: 130px;
  height: 130px;
  border-radius: 10px;
  transform: rotate(18deg);
}

.cnts-header__pattern::before {
  right: -24px;
  top: -46px;
}

.cnts-header__pattern::after {
  right: 64px;
  bottom: -72px;
  width: 100px;
  height: 100px;
  border-width: 12px;
  border-color: rgba(15, 90, 168, 0.18);
}

.cnts-header__inner {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.cnts-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.cnts-brand:hover {
  color: inherit;
  text-decoration: none;
}

.cnts-brand__logo {
  display: block;
  height: var(--cnts-logo-height);
  width: auto;
  max-width: var(--cnts-logo-max-width);
  object-fit: contain;
  object-position: left center;
  background: var(--cnts-white);
  border-radius: 8px;
  padding: 0.2rem 0.45rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.cnts-brand__divider {
  width: 1px;
  height: calc(var(--cnts-logo-height) - 8px);
  background: rgba(255, 255, 255, 0.65);
  flex-shrink: 0;
  align-self: center;
}

.cnts-brand__module {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.3;
  color: #fff;
  white-space: nowrap;
}

.cnts-header__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.cnts-header__back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 8px;
  color: #fff;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.cnts-header__back:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
  text-decoration: none;
}

@media (max-width: 991.98px) {
  .cnts-header {
    --cnts-logo-height: 52px;
    --cnts-logo-max-width: 220px;
  }
}

@media (max-width: 767.98px) {
  .cnts-header {
    --cnts-logo-height: 48px;
    --cnts-logo-max-width: 200px;
  }

  .cnts-brand__module {
    font-size: 0.62rem;
  }
}
