:root {
  --color-primary: #8a1e41;
  --color-primary-dark: #72253d;
  --color-header-cta: #bc955c;
  --color-header-cta-hover: #c9a36c;
  --color-text: #1f2937;
  --color-muted: #6b7280;
  --color-border: #e5e7eb;
  --color-border-soft: #e2e8ef;
  --color-surface-soft: #eef2f6;
  --color-surface-primary: #fbfcfd;
  --color-surface-primary-alt: #f6f8fa;
  --color-bg: #f7f8fa;
  --color-white: #ffffff;
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.08);
}

html {
  scroll-behavior: smooth;
  overflow-anchor: none; /* evita que scroll anchoring interfiera con el sticky header */
}

body {
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
}

a {
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

.topbar {
  background: #5f1a33;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
}

.topbar__inner {
  min-height: 42px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.4rem 0;
}

.topbar a {
  color: rgba(255, 255, 255, 0.92);
}

.topbar a:hover {
  color: #fff;
}

.topbar__left,
.topbar__right {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}

.topbar__divider {
  opacity: 0.5;
}

.brandbar {
  background: linear-gradient(rgba(138, 30, 65, 0.92), rgba(114, 37, 61, 0.92)),
  url('/assets/img/guaymas2124/BANNER PRINCIPAL .png') center/cover no-repeat;
  color: var(--color-white);
}

.brandbar__inner {
  display: grid;
  grid-template-columns: minmax(260px, 420px) 1fr auto;
  align-items: center;
  gap: 1.75rem;
  min-height: 150px;
  padding: 1.5rem 0;
}

.brandbar__logo {
  display: flex;
  align-items: center;
}

.brandbar__logo img {
  width: 100%;
  max-width: 380px;
  height: auto;
  display: block;
  object-fit: contain;
}

.brandbar__content {
  min-width: 0;
}

.brandbar__eyebrow {
  margin: 0 0 0.3rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.9;
}

.brandbar__title {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
}

.brandbar__subtitle {
  margin: 0.65rem 0 0;
  max-width: 760px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1rem;
  line-height: 1.5;
}

.brandbar__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.nav-main {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
}

.nav-main .nav-link {
  color: var(--color-text);
  font-weight: 600;
  padding: 1rem 0.9rem;
}

.nav-main .nav-link:hover,
.nav-main .nav-link.active {
  color: var(--color-primary);
}

.nav-main .dropdown-menu {
  border: 1px solid var(--color-border);
  border-radius: 0.9rem;
  box-shadow: var(--shadow-soft);
  padding: 0.6rem;
}

.nav-main .dropdown-item {
  border-radius: 0.6rem;
  padding: 0.65rem 0.85rem;
}

.nav-main .dropdown-item:hover {
  background: rgba(138, 30, 65, 0.06);
  color: var(--color-primary);
}

.nav-main__cta {
  display: flex;
  align-items: center;
}

.btn-gold {
  background: var(--color-header-cta);
  border: 1px solid var(--color-header-cta);
  color: #fff;
  font-weight: 700;
  padding: 0.72rem 1rem;
  border-radius: 0.8rem;
}

.btn-gold:hover {
  background: var(--color-header-cta-hover);
  border-color: var(--color-header-cta-hover);
  color: #fff;
}

.btn-outline-brand {
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  font-weight: 700;
  border-radius: 0.8rem;
  padding: 0.65rem 1rem;
}

.btn-outline-brand:hover {
  background: var(--color-primary);
  color: #fff;
}

.historico-menu {
  min-width: 320px;
  max-width: 380px;
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  box-shadow: var(--shadow-soft);
  padding: 0.5rem;
}

.historico-menu .dropdown-header {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-muted);
  padding: 0.5rem 0.75rem;
}

.historico-menu .dropdown-item {
  white-space: normal;
  padding: 0.8rem 0.9rem;
  border-radius: 0.8rem;
}

.historico-menu__title {
  display: block;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.2rem;
}

.historico-menu__text {
  display: block;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--color-muted);
}

.topbar-history-toggle {
  color: rgba(255, 255, 255, 0.92);
}

.topbar-history-toggle:hover,
.topbar-history-toggle:focus {
  color: #fff;
}

.topbar,
.brandbar,
.brandbar__inner,
.brandbar__logo img,
.brandbar__title,
.brandbar__subtitle,
.brandbar__eyebrow,
.brandbar__actions {
  transition: all 0.28s ease,
  opacity 0.2s ease,
  transform 0.2s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.site-header.is-scrolled .topbar {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding-top: 0;
  padding-bottom: 0;
}

.site-header.is-scrolled .brandbar {
  background: linear-gradient(rgba(138, 30, 65, 0.96), rgba(114, 37, 61, 0.96));
}

.site-header.is-scrolled .brandbar__inner {
  grid-template-columns: minmax(180px, 280px) 1fr auto;
  min-height: 82px;
  padding: 0.7rem 0;
  gap: 1rem;
}

.site-header.is-scrolled .brandbar__logo img {
  max-width: 220px;
}

.site-header.is-scrolled .brandbar__eyebrow {
  margin-bottom: 0.1rem;
  font-size: 0.72rem;
  opacity: 0.85;
}

.site-header.is-scrolled .brandbar__title {
  font-size: 1.2rem;
}

.site-header.is-scrolled .brandbar__subtitle {
  margin-top: 0.2rem;
  font-size: 0.88rem;
  line-height: 1.35;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
}

.site-header.is-scrolled .brandbar__actions .btn {
  padding: 0.58rem 0.9rem;
  font-size: 0.92rem;
}

.site-header .brandbar__content {
  max-height: 200px;
  opacity: 1;
  overflow: hidden;
  transition: opacity 0.2s ease, max-height 0.25s ease, margin 0.25s ease;
}

.site-header.is-scrolled .brandbar__content {
  max-height: 0;
  opacity: 0;
  margin: 0;
}

.site-header.is-scrolled .brandbar__eyebrow,
.site-header.is-scrolled .brandbar__subtitle {
  display: none;
}

.site-header.is-scrolled .brandbar__title {
  font-size: 1rem;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-footer {
  margin-top: 2.5rem;
  background: var(--color-white);
  border-top: 4px solid var(--color-primary);
  box-shadow: 0 -8px 22px rgba(17, 24, 39, 0.05);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.75rem;
  align-items: center;
  padding: 2rem 0;
}

.site-footer__logo {
  display: flex;
  align-items: center;
}

.site-footer__logo img {
  width: 100%;
  max-width: 320px;
  height: auto;
  display: block;
  object-fit: contain;
}

.site-footer__info {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.site-footer__title {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: none;
  line-height: 1.25;
  color: var(--color-primary);
}

.site-footer__text {
  margin: 0;
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-text);
  line-height: 1.6;
  overflow-wrap: break-word;
  word-break: break-word;
}

.site-footer__text a {
  color: var(--color-primary);
  font-weight: 500;
}

.site-footer__text a:hover {
  color: #5f1a33;
}

.site-footer__legal {
  border-top: 1px solid var(--color-border);
  background: #fafafa;
}

.site-footer__legal-inner {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem 1.2rem;
  padding: 0.75rem 0;
  flex-wrap: wrap;
}

.site-footer__legal-text {
  margin: 0;
  font-size: 0.92rem;
  color: #4b5563;
  line-height: 1.5;
}

.site-footer__legal-text a,
.site-footer__legal-link {
  color: var(--color-primary);
  font-weight: 600;
}

.site-footer__legal-text a:hover,
.site-footer__legal-link:hover {
  color: #5f1a33;
}

.site-footer__legal-link {
  font-size: 0.92rem;
}

/* Home sections */
.home-main {
  background: var(--color-bg);
}

.section-kicker {
  display: inline-block;
  margin-bottom: 0.75rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.section-kicker--light {
  color: rgba(255, 255, 255, 0.86);
}

.section-title {
  font-size: clamp(1.6rem, 2vw, 2.2rem);
  font-weight: 700;
  color: #2a2430;
}

.section-text {
  color: var(--color-muted);
  max-width: 60rem;
}

.home-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #2a2430;
}

.btn-brand-primary {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.btn-brand-primary:hover,
.btn-brand-primary:focus {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: #fff;
}

.btn-outline-brand {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-outline-brand:hover,
.btn-outline-brand:focus {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.info-chip {
  height: 100%;
  padding: 1rem 1.1rem;
  border: 1px solid var(--color-border-soft);
  border-radius: 1rem;
  background: var(--color-surface-primary);
}

.info-chip strong {
  display: block;
  margin-bottom: 0.35rem;
  color: #3b2d35;
}

.info-chip span {
  display: block;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.quick-links {
  display: grid;
  gap: 0.85rem;
}

.quick-link {
  display: block;
  padding: 1rem;
  border: 1px solid var(--color-border-soft);
  border-radius: 1rem;
  background: #fff;
  text-decoration: none;
  transition: all 0.2s ease;
}

.quick-link:hover {
  border-color: var(--color-primary);
  background: var(--color-surface-primary);
  transform: translateY(-1px);
}

.quick-link__title {
  display: block;
  font-weight: 700;
  color: #3b2d35;
  margin-bottom: 0.2rem;
}

.quick-link__text {
  display: block;
  color: var(--color-muted);
  font-size: 0.92rem;
}

.feature-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border-radius: 1.25rem;
  box-shadow: 0 0.125rem 0.75rem rgba(17, 24, 39, 0.06);
  overflow: hidden;
}

.feature-card--accent {
  background: var(--color-surface-primary);
}

.feature-card__body {
  padding: 1.5rem;
  flex: 1;
}

.feature-card__eyebrow {
  display: inline-block;
  margin-bottom: 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
}

.feature-card__title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #2f2830;
  margin-bottom: 0.75rem;
}

.feature-card__text {
  color: var(--color-muted);
  margin-bottom: 0;
}

.feature-card__footer {
  padding: 0 1.5rem 1.5rem;
}

.feature-card__link {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
}

.feature-card__link:hover {
  color: var(--color-primary-dark);
}

.obligation-box {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1rem;
  align-items: start;
  height: 100%;
  text-decoration: none;
  padding: 1.25rem;
  border: 1px solid var(--color-border-soft);
  border-radius: 1rem;
  background: #fff;
  transition: all 0.2s ease;
}

.obligation-box:hover {
  border-color: var(--color-primary);
  background: var(--color-surface-primary);
  transform: translateY(-1px);
}

.obligation-box__icon {
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: .9rem;
  background: rgba(138, 30, 65, 0.06);
  flex-shrink: 0;
}

.obligation-box__icon img {
  width: 1.5rem;
  height: 1.5rem;
  display: block;
  object-fit: contain;
}

.obligation-box__content {
  min-width: 0;
}

.obligation-box__number {
  display: inline-block;
  margin-bottom: 0.7rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: var(--color-surface-soft);
  color: var(--color-primary);
  font-size: 0.8rem;
  font-weight: 700;
}

.obligation-box__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #332b32;
  margin-bottom: 0.6rem;
}

.obligation-box__text {
  color: var(--color-muted);
  margin-bottom: 0;
}

.legal-note {
  padding: 1rem 1.1rem;
  border-left: 4px solid var(--color-primary);
  background: var(--color-surface-primary);
  border-radius: 0.75rem;
  color: #5f5b62;
}

.steps-grid {
  display: grid;
  gap: 1rem;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--color-border-soft);
  border-radius: 1rem;
  background: var(--color-surface-primary-alt);
}

.step-item__number {
  flex: 0 0 auto;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
}

.step-item__title {
  font-size: 1rem;
  font-weight: 700;
  color: #332b32;
  margin: 0 0 0.35rem;
}

.step-item__text {
  margin: 0;
  color: var(--color-muted);
}

.content-list {
  display: grid;
  gap: 1rem;
}

.content-list__item {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border-soft);
}

.content-list__item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.content-list__item h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #332b32;
  margin-bottom: 0.35rem;
}

.content-list__item p {
  margin: 0;
  color: var(--color-muted);
}

.proactive-banner {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  box-shadow: 0 0.125rem 1rem rgba(17, 24, 39, 0.08);
}

.proactive-banner__side {
  background: rgba(255, 255, 255, 0.08);
  height: 100%;
}

.proactive-list {
  list-style: none;
  padding-left: 0;
  color: #fff;
}

.proactive-list li + li {
  margin-top: 0.75rem;
}

.proactive-list li::before {
  content: "•";
  color: rgba(255, 255, 255, 0.78);
  margin-right: 0.5rem;
}

/* ===== Home: grupos normativos ===== */
.portal-group {
  background: #fff;
  border: 1px solid var(--color-border-soft);
  border-radius: 1.25rem;
  padding: 1.25rem;
  height: 100%;
  box-shadow: 0 0.25rem 1rem rgba(17, 24, 39, 0.06);
}

.portal-group__header {
  margin-bottom: 1rem;
}

.portal-group__eyebrow {
  display: inline-block;
  margin-bottom: 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
}

.portal-group__title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: #332b32;
  line-height: 1.25;
}

.portal-group__links {
  display: grid;
  gap: 1rem;
}

.portal-group__link {
  display: grid;
  grid-template-columns: 2.75rem 1fr;
  align-items: start;
  gap: 0.9rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(138, 30, 65, 0.10);
  border-radius: 1rem;
  background: #fff;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.portal-group__link:hover {
  transform: translateY(-2px);
  border-color: rgba(138, 30, 65, 0.22);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.portal-group__link-icon {
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: .85rem;
  background: rgba(138, 30, 65, 0.06);
  flex-shrink: 0;
}

.portal-group__link-icon img {
  width: 1.4rem;
  height: 1.4rem;
  display: block;
  object-fit: contain;
}

.portal-group__link-content {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.portal-group__link-title {
  display: block;
  font-weight: 700;
  color: #8a1e41;
  line-height: 1.2;
}

.portal-group__link-text {
  display: block;
  color: #5b6470;
  line-height: 1.45;
}

/* ===== Home: ruta de navegación ===== */
.route-box {
  height: 100%;
  padding: 1.15rem 1rem;
  border: 1px solid var(--color-border-soft);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 0.125rem 0.75rem rgba(17, 24, 39, 0.04);
}

.route-box--highlight {
  background: var(--color-surface-primary);
  border-color: rgba(138, 30, 65, 0.18);
}

.route-box__step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.65rem;
  margin-bottom: 0.75rem;
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
}

.route-box__title {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  font-weight: 700;
  color: #332b32;
}

.route-box__text {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.5;
  color: var(--color-muted);
}

/* ===== Ajustes visuales de secciones de home ===== */
.home-obligations .section-heading,
.home-general-info .section-heading,
.home-guidance .section-heading,
.home-structure .section-heading {
  max-width: 58rem;
}

.home-intro .bg-white,
.home-obligations .bg-white,
.home-general-info .bg-white,
.home-guidance .bg-white,
.home-structure .bg-white {
  box-shadow: 0 0.125rem 1rem rgba(17, 24, 39, 0.06) !important;
}

.home-obligations .legal-note,
.home-general-info .legal-note {
  margin-top: 1.5rem;
}

.dependencies-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.dependency-logo-card {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid rgba(138, 30, 65, 0.10);
  border-radius: 1rem;
  padding: 1rem;
  aspect-ratio: 5 / 2;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  text-decoration: none;
}

.dependency-logo-card:hover {
  transform: translateY(-2px);
  border-color: rgba(138, 30, 65, 0.25);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.dependency-logo-card img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}
/* ===== Rango lg (992px–1199px): container 960px, sin breakpoint propio ===== */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .brandbar__inner {
    grid-template-columns: minmax(180px, 280px) 1fr auto;
    gap: 1.25rem;
    min-height: 130px;
  }

  .brandbar__logo img {
    max-width: 280px;
  }

  .brandbar__title {
    font-size: 1.55rem;
  }

  .brandbar__subtitle {
    font-size: 0.9rem;
    margin-top: 0.45rem;
  }

  .site-header.is-scrolled .brandbar__inner {
    grid-template-columns: minmax(140px, 220px) 1fr auto;
    gap: 1.1rem;
  }

  .site-header.is-scrolled .brandbar__logo img {
    max-width: 180px;
  }

  .nav-main .nav-link {
    padding: 1rem 0.6rem;
    font-size: 0.9rem;
  }

  .nav-main__cta .btn {
    padding: 0.6rem 0.8rem;
    font-size: 0.88rem;
  }

  .site-footer__inner {
    grid-template-columns: auto 1fr;
    gap: 1.25rem;
  }

  .site-footer__logo img {
    max-width: 280px;
  }
}

/* ===== Mejoras responsivas ===== */
@media (max-width: 991.98px) {
  .portal-group {
    padding: 1.1rem;
  }

  .portal-group__title {
    font-size: 1.1rem;
  }

  .route-box {
    padding: 1rem;
  }
}

@media (max-width: 767.98px) {
  .portal-group__link,
  .route-box,
  .obligation-box,
  .quick-link,
  .feature-card {
    border-radius: 0.9rem;
  }

  .portal-group__title {
    font-size: 1.05rem;
  }

  .portal-group__link-title,
  .route-box__title,
  .obligation-box__title {
    font-size: 0.98rem;
  }

  .portal-group__link-text,
  .route-box__text,
  .obligation-box__text {
    font-size: 0.9rem;
  }
}

@media (max-width: 991.98px) {
  .brandbar__inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.1rem;
    min-height: auto;
  }

  .brandbar__logo {
    justify-content: center;
  }

  .brandbar__logo img {
    max-width: 320px;
  }

  .brandbar__actions {
    justify-content: center;
  }

  .nav-main__cta {
    margin-top: 0.75rem;
  }

  .site-footer__inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.2rem;
  }

  .site-footer__logo {
    justify-content: center;
  }

  .site-footer__logo img {
    max-width: 320px;
  }

  .site-footer__info {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
  }

  .site-footer__legal-inner {
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 767.98px) {
  .topbar {
    display: none;
  }

  .brandbar__logo img {
    max-width: 260px;
  }

  .brandbar__title {
    font-size: 1.55rem;
  }

  .brandbar__subtitle {
    font-size: 0.95rem;
  }

  .site-footer__logo img {
    max-width: 260px;
  }

  .site-footer {
    margin-top: 1.75rem;
  }
}
@media (max-width: 991.98px) {
  .dependencies-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .dependencies-grid {
    grid-template-columns: 1fr;
  }

  .site-footer__info {
    grid-template-columns: 1fr;
  }
}

/* ===== Panel admin (nuevo.php / panel.php) ===== */
body.panel-body {
  min-height: 100vh; display: flex; flex-direction: column;
  background: #f4f5f7;
}

/* ─── Navbar ─────────────────────────────────────────── */
.panel-nav {
  background: linear-gradient(90deg, #8a1e41 0%, #5f1a33 100%);
  box-shadow: 0 2px 12px rgba(17,24,39,.18);
  position: sticky; top: 0; z-index: 100;
}
.panel-nav__inner { display: flex; align-items: center; min-height: 58px; gap: 1rem; }
.panel-nav__brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; flex-shrink: 0; }
.panel-nav__brand img { height: 34px; width: auto; display: block; }
.panel-nav__brand-text { font-size: .9rem; font-weight: 700; color: rgba(255,255,255,.92); line-height: 1.2; }
.panel-nav__brand-sub  { display: block; font-size: .72rem; font-weight: 400; color: rgba(255,255,255,.55); }
.panel-nav__spacer { flex: 1; }
.panel-nav__user {
  display: flex; align-items: center; gap: .6rem;
  padding: .4rem .75rem; border-radius: .75rem;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.12);
  cursor: pointer; transition: background .2s;
}
.panel-nav__user:hover { background: rgba(255,255,255,.16); }
.panel-nav__avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(188,149,92,.35);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.panel-nav__avatar svg { width: 16px; height: 16px; color: #d4b07a; }
.panel-nav__user-info { display: flex; flex-direction: column; line-height: 1.2; }
.panel-nav__user-name { font-size: .85rem; font-weight: 700; color: #fff; }
.panel-nav__user-dept { font-size: .72rem; color: rgba(255,255,255,.55); }
.panel-nav__caret svg { width: 14px; height: 14px; color: rgba(255,255,255,.5); }

/* ─── Wrapper / Sidebar ───────────────────────────────── */
.panel-wrapper { flex: 1; display: grid; grid-template-columns: 230px 1fr; min-height: 0; }
.panel-sidebar { background: #fff; border-right: 1px solid #e5e7eb; padding: 1.5rem 0; display: flex; flex-direction: column; }
.sidebar-section { margin-bottom: 1.5rem; }
.sidebar-label { padding: 0 1.25rem .5rem; font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #b8aab4; }
.sidebar-link {
  display: flex; align-items: center; gap: .75rem;
  padding: .65rem 1.25rem; font-size: .88rem; font-weight: 500; color: #4b3a47;
  text-decoration: none; border-left: 3px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
}
.sidebar-link:hover { background: rgba(138,30,65,.05); color: #8a1e41; border-left-color: rgba(138,30,65,.25); }
.sidebar-link.active { background: rgba(138,30,65,.08); color: #8a1e41; border-left-color: #8a1e41; font-weight: 700; }
.sidebar-link svg { width: 17px; height: 17px; flex-shrink: 0; color: currentColor; opacity: .75; }
.sidebar-divider { margin: .5rem 1.25rem; border: none; border-top: 1px solid #f0eaed; }
.sidebar-link--danger { color: #9b1c1c; }
.sidebar-link--danger:hover { background: rgba(185,28,28,.06); color: #b91c1c; border-left-color: #dc2626; }

/* ─── Main ────────────────────────────────────────────── */
.panel-main { padding: 2rem 2.25rem; min-width: 0; overflow-x: hidden; }

.panel-page-header { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.75rem; }
.panel-page-title  { font-size: 1.35rem; font-weight: 700; color: #1f1520; margin: 0 0 .2rem; }
.panel-page-sub    { font-size: .88rem; color: #6b7280; margin: 0; }

/* ─── Form cards ──────────────────────────────────────── */
.form-card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 1.1rem;
  box-shadow: 0 1px 4px rgba(17,24,39,.05); margin-bottom: 1.5rem;
}
.form-card__header {
  display: flex; align-items: center; gap: .75rem;
  padding: 1rem 1.5rem; border-bottom: 1px solid #f0eaed;
}
.form-card__icon {
  width: 2.2rem; height: 2.2rem; border-radius: .6rem;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.form-card__icon--primary { background: rgba(138,30,65,.08); color: #8a1e41; }
.form-card__icon--gold    { background: rgba(188,149,92,.12); color: #8a6520; }
.form-card__icon--blue    { background: rgba(37,99,235,.08);  color: #2563eb; }
.form-card__icon svg { width: 18px; height: 18px; }
.form-card__title { font-size: .95rem; font-weight: 700; color: #2a1e28; margin: 0; }
.form-card__body  { padding: 1.5rem; }

/* ─── Form elements ───────────────────────────────────── */
.form-label { font-size: .85rem; font-weight: 600; color: #374151; margin-bottom: .4rem; }
.form-label .req { color: #8a1e41; margin-left: .15rem; }
.form-control, .form-select {
  border: 1.5px solid #e5e7eb; border-radius: .65rem;
  padding: .55rem .85rem; font-size: .9rem; color: #1f2937;
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus, .form-select:focus {
  border-color: #8a1e41; box-shadow: 0 0 0 3px rgba(138,30,65,.08); outline: none;
}
.form-control[readonly] { background: #f9fafb; color: #6b7280; }
.form-hint { font-size: .8rem; color: #9ca3af; margin-top: .3rem; }

/* ─── File drop zone ──────────────────────────────────── */
.file-zone {
  display: flex; flex-direction: row; align-items: center;
  padding: .9rem 1.25rem; gap: 1rem;
  border: 2px dashed #e0d5da; border-radius: .85rem;
  background: rgba(138,30,65,.015); cursor: pointer;
  transition: border-color .2s, background .2s;
}
.file-zone:hover, .file-zone.drag-over { border-color: #8a1e41; background: rgba(138,30,65,.04); }
.file-zone__icon {
  width: 2.4rem; height: 2.4rem; border-radius: .7rem; flex-shrink: 0;
  background: rgba(138,30,65,.08); display: inline-flex; align-items: center; justify-content: center;
}
.file-zone__icon svg { width: 17px; height: 17px; color: #8a1e41; }
.file-zone__text { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.file-zone__label { font-size: .9rem; font-weight: 600; color: #374151; }
.file-zone__label span { color: #8a1e41; text-decoration: underline; }
.file-zone__hint { font-size: .78rem; color: #9ca3af; }
.file-zone__name { font-size: .88rem; font-weight: 600; color: #374151; display: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-zone__name.visible { display: block; }
#documento { display: none; }

/* ─── Preview button ─────────────────────────────────────── */
.btn-preview {
  display: none; align-items: center; gap: .45rem;
  margin-top: .85rem; padding: .45rem 1rem;
  border-radius: .6rem; border: 1.5px solid #8a1e41;
  color: #8a1e41; background: transparent; font-size: .83rem; font-weight: 600;
  cursor: pointer; transition: background .15s, color .15s;
}
.btn-preview.visible { display: inline-flex; }
.btn-preview:hover { background: rgba(138,30,65,.07); }
.btn-preview svg { width: 15px; height: 15px; }

/* ─── Preview modal ──────────────────────────────────────── */
.preview-modal-body { padding: 0; min-height: 200px; }
.preview-modal-body iframe { width: 100%; height: 72vh; border: none; display: block; }
.preview-modal-body .xlsx-table-wrap { overflow: auto; max-height: 72vh; padding: .75rem 1rem; }
.preview-modal-body .xlsx-table-wrap table {
  border-collapse: collapse; font-size: .8rem; white-space: nowrap;
}
.preview-modal-body .xlsx-table-wrap td,
.preview-modal-body .xlsx-table-wrap th {
  border: 1px solid #e5e7eb; padding: .25rem .5rem;
}
.preview-modal-body .xlsx-table-wrap tr:first-child td,
.preview-modal-body .xlsx-table-wrap th {
  background: #f3f4f6; font-weight: 600;
}
.preview-modal-body .preview-unavailable {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 200px; color: #9ca3af; font-size: .9rem; gap: .5rem;
}

/* ─── Searchable select ──────────────────────────────────── */
.ss-wrap { position: relative; }
.ss-btn {
  display: block; width: 100%; text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border: 1.5px solid #e5e7eb; border-radius: .65rem;
  padding: .55rem 2rem .55rem .85rem; font-size: .9rem; color: #1f2937;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M4 6l4 4 4-4'/%3E%3C/svg%3E") right .75rem center/12px no-repeat;
  cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.ss-btn:hover:not(:disabled) { border-color: #c0a8b5; }
.ss-btn:focus { border-color: #8a1e41; box-shadow: 0 0 0 3px rgba(138,30,65,.08); outline: none; }
.ss-btn:disabled { background-color: #f9fafb; color: #9ca3af; cursor: not-allowed; opacity: .75; }
.ss-drop {
  position: absolute; top: calc(100% + 3px); left: 0; right: 0; z-index: 300;
  background: #fff; border: 1.5px solid #e5e7eb; border-radius: .65rem;
  box-shadow: 0 8px 28px rgba(17,24,39,.13); display: none; overflow: hidden;
}
.ss-drop.open { display: block; }
.ss-search {
  display: block; width: 100%; padding: .5rem .75rem;
  border: none; border-bottom: 1px solid #f0eaed;
  font-size: .85rem; color: #1f2937; outline: none; background: #fafafa;
}
.ss-search::placeholder { color: #b0b8c1; }
.ss-list { list-style: none; margin: 0; padding: 0; max-height: 220px; overflow-y: auto; }
.ss-list li { padding: .48rem .85rem; font-size: .88rem; color: #374151; cursor: pointer; }
.ss-list li:hover { background: rgba(138,30,65,.05); color: #8a1e41; }
.ss-list li.ss-selected { font-weight: 700; color: #8a1e41; background: rgba(138,30,65,.04); }
.ss-list li.ss-empty { color: #9ca3af; cursor: default; font-style: italic; }

/* ─── Alert de errores ────────────────────────────────── */
.upload-errors {
  background: #fef2f2; border: 1.5px solid #fecaca; border-radius: .85rem;
  padding: 1rem 1.25rem; margin-bottom: 1.5rem;
}
.upload-errors__title { font-size: .88rem; font-weight: 700; color: #991b1b; margin: 0 0 .5rem; }
.upload-errors ul { margin: 0; padding-left: 1.25rem; }
.upload-errors li { font-size: .85rem; color: #b91c1c; }

/* ─── Submit ──────────────────────────────────────────── */
.btn-submit {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .7rem 1.8rem; border-radius: .75rem;
  background: linear-gradient(135deg, #b03060 0%, #8a1e41 100%);
  color: #fff; font-weight: 700; font-size: .95rem; border: none; cursor: pointer;
  box-shadow: 0 4px 14px rgba(138,30,65,.25); transition: transform .15s, box-shadow .15s;
}
.btn-submit:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(138,30,65,.32); }
.btn-submit svg { width: 17px; height: 17px; }
.btn-cancel {
  display: inline-flex; align-items: center;
  padding: .68rem 1.4rem; border-radius: .75rem;
  border: 1.5px solid #e5e7eb; color: #374151;
  font-weight: 600; font-size: .9rem; text-decoration: none;
  transition: background .15s, border-color .15s;
}
.btn-cancel:hover { background: #f9fafb; border-color: #d1d5db; color: #111; }

/* ─── Responsive ──────────────────────────────────────── */
@media (max-width: 860px) {
  .panel-wrapper { grid-template-columns: 1fr; }
  .panel-sidebar { display: none; }
  .panel-main { padding: 1.25rem 1rem; }
}