/* Layout del panel — CSS propio para no depender de utilidades Tailwind/cache. */

.dash {
  display: flex;
  min-height: 100vh;
  background: #f1f5f9;
  color: #334155;
  font-family: Inter, sans-serif;
}

.dash-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  width: 18rem;
  height: 100vh;
  flex-shrink: 0;
  flex-direction: column;
  overflow: hidden;
  background: #002366;
  color: #cbd5e1;
}

.dash-main {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.dash-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  padding: 0.75rem 1rem;
}

.dash-content {
  flex: 1;
  padding: 1.5rem 1rem;
}

.dash-sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  background: #fff;
  color: #334155;
  cursor: pointer;
}

.dash-sidebar-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
}

.dash-brand-mobile {
  display: none;
  font-family: "Noto Serif", serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: #002366;
  text-decoration: none;
}

.dash-brand-mobile span {
  color: #2d5a27;
}

.dash-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.dash-breadcrumb .muted {
  color: #94a3b8;
}

.dash-breadcrumb .current {
  font-weight: 600;
  color: #334155;
}

.dash-backdrop {
  display: none;
}

/* —— Móvil / tablet: sidebar colapsa lateralmente —— */
@media (max-width: 1023px) {
  .dash-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    height: 100%;
    max-width: 85vw;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: none;
  }

  .dash.is-sidebar-open .dash-sidebar {
    transform: translateX(0);
    box-shadow: 8px 0 24px rgba(0, 0, 0, 0.2);
  }

  .dash-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(15, 23, 42, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .dash.is-sidebar-open .dash-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .dash-sidebar-toggle {
    display: inline-flex;
  }

  .dash-brand-mobile {
    display: inline;
  }

  .dash-breadcrumb {
    display: none;
  }
}

@media (min-width: 640px) {
  .dash-topbar {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .dash-content {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .dash-topbar {
    padding: 1rem 2rem;
  }

  .dash-content {
    padding: 2rem;
  }

  /* En desktop el toggle nunca se muestra */
  .dash-sidebar-toggle {
    display: none !important;
  }

  .dash-brand-mobile {
    display: none !important;
  }

  .dash-breadcrumb {
    display: flex;
  }

  .dash-backdrop {
    display: none !important;
  }

  .dash-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    transform: none !important;
    max-width: none;
    box-shadow: none !important;
  }
}

/* —— Editor de contenido por páginas —— */
.page-editor {
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
}

.page-editor-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .page-editor-layout {
    grid-template-columns: 16rem minmax(0, 1fr);
  }

  .page-editor-nav {
    position: sticky;
    top: 6rem;
  }
}

.page-editor-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: 0.5rem;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  color: #475569;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.page-editor-nav-link:hover {
  background: #f8fafc;
  color: #0f172a;
}

.page-editor-nav-link.is-active {
  background: rgba(0, 35, 102, 0.08);
  color: #002366;
  font-weight: 600;
}

.page-editor-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
  border-radius: 0.375rem;
  background: #f1f5f9;
  color: #94a3b8;
}

.page-editor-nav-link.is-active .page-editor-nav-icon {
  background: #002366;
  color: #fff;
}

.page-editor-nav-text {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.page-editor-nav-label {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-editor-nav-desc {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
  font-weight: 400;
  color: #94a3b8;
}

.page-editor-nav-link.is-active .page-editor-nav-desc {
  color: rgba(0, 35, 102, 0.65);
}

.page-editor-section-summary {
  display: flex;
  cursor: pointer;
  list-style: none;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
}

.page-editor-section-summary::-webkit-details-marker {
  display: none;
}

.page-editor-section-summary::marker {
  content: "";
}

.page-editor-section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  border-radius: 0.5rem;
}

.page-editor-section-icon.is-hero {
  background: rgba(0, 35, 102, 0.1);
  color: #002366;
}

.page-editor-section-icon.is-cta {
  background: rgba(197, 160, 33, 0.15);
  color: #c5a021;
}

.page-editor-section-icon.is-section {
  background: rgba(45, 90, 39, 0.1);
  color: #2d5a27;
}

.page-editor-chevron {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

details[open] > .page-editor-section-summary .page-editor-chevron {
  transform: rotate(180deg);
}

.page-editor-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem 1.25rem;
}

@media (min-width: 1024px) {
  .page-editor-fields.has-image {
    grid-template-columns: 1fr 1fr;
  }
}

.page-editor-preview {
  aspect-ratio: 16 / 10;
  width: 100%;
  background: #f1f5f9;
}

.page-editor-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-editor-savebar {
  position: sticky;
  bottom: 0;
  z-index: 20;
  margin-top: 1.5rem;
  margin-left: -1rem;
  margin-right: -1rem;
  margin-bottom: -1.5rem;
  border-top: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  padding: 0.75rem 1rem;
}

@media (min-width: 640px) {
  .page-editor-savebar {
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .page-editor-savebar {
    margin-left: -2rem;
    margin-right: -2rem;
    margin-bottom: -2rem;
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.page-editor-savebar-inner {
  display: flex;
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .page-editor-savebar-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* Nav del editor de servicios: fila con reorden + selección */
.page-editor-nav [data-svc-row] {
  cursor: default;
  gap: 0.5rem;
}

.page-editor-nav [data-svc-row] > a.page-editor-nav-text {
  text-decoration: none;
  color: inherit;
}

.page-editor-nav [data-svc-row] > a.page-editor-nav-text:focus-visible {
  outline: 2px solid rgba(45, 90, 39, 0.45);
  outline-offset: 2px;
  border-radius: 0.25rem;
}

/* En móvil el catálogo no empuja todo el form: scroll interno */
.page-editor-nav-scroll {
  max-height: 16rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 1024px) {
  .page-editor-nav-scroll {
    max-height: min(28rem, calc(100vh - 22rem));
  }
}

.page-editor-nav-move:disabled {
  pointer-events: none;
}

/* Buscador del catálogo de servicios */
.svc-filter-search {
  position: relative;
  display: block;
}

.svc-filter-search svg {
  position: absolute;
  left: 0.625rem;
  top: 50%;
  width: 0.875rem;
  height: 0.875rem;
  margin: 0;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
  flex-shrink: 0;
}

.svc-filter-search input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: rgba(248, 250, 252, 0.8);
  padding: 0.4rem 0.625rem 0.4rem 1.875rem;
  font-size: 0.75rem;
  line-height: 1.25rem;
  color: #334155;
}

.svc-filter-search input::placeholder {
  color: #94a3b8;
}

.svc-filter-search input:focus {
  border-color: #2d5a27;
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 2px rgba(45, 90, 39, 0.3);
}

/* Resumen de leads: 2 cols en móvil, 3 en desktop */
.dash-lead-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .dash-lead-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Filtros de leads: búsqueda a ancho completo + 3 selects + limpiar */
.dash-lead-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
}

.dash-lead-filters__search {
  min-width: 0;
}

.dash-lead-filters__actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
}

.dash-lead-filters__field {
  min-width: 0;
}

.dash-lead-filters__clear {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.dash-lead-filters__clear-btn {
  width: 100%;
  height: 2.5rem;
  border-radius: 0.5rem;
  border: 1px solid #cbd5e1;
  padding: 0 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  background: #fff;
  transition: background-color 0.15s ease;
}

.dash-lead-filters__clear-btn:hover {
  background: #f8fafc;
}

@media (min-width: 640px) {
  .dash-lead-filters__actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .dash-lead-filters__actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Indicadores: fila principal (etiqueta / clave / valor / eliminar) */
.dash-ind-primary {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  align-items: end;
}

[data-list="indicator"] [data-row].is-filter-hidden {
  display: none;
}

[data-list="testimonial"] [data-row].is-filter-hidden {
  display: none;
}

[data-list="faq"] [data-row].is-filter-hidden {
  display: none;
}

[data-list="category"] [data-row].is-filter-hidden {
  display: none;
}

.dash-ind-primary > label {
  display: block;
  min-width: 0;
  width: 100%;
}

.dash-ind-primary > [data-remove] {
  justify-self: start;
}

@media (min-width: 640px) {
  .dash-ind-primary {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(7.5rem, 9.5rem) auto;
  }

  .dash-ind-primary > [data-remove] {
    justify-self: end;
  }
}

/* —— Testimonios —— */
.dash-tstm-primary {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  align-items: end;
}

.dash-tstm-primary > label {
  display: block;
  min-width: 0;
  width: 100%;
}

.dash-tstm-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .dash-tstm-primary {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto;
  }

  .dash-tstm-actions {
    justify-self: end;
    padding-bottom: 0.125rem;
  }
}

/* —— Configuración SEO —— */
.seo-serp {
  font-family: Arial, sans-serif;
}

.seo-serp-url {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  line-height: 1.4;
  color: #202124;
}

.seo-serp-favicon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  border-radius: 9999px;
  background: #e8f0fe;
  color: #1a73e8;
  font-size: 0.625rem;
  font-weight: 700;
}

.seo-serp-site {
  display: block;
  font-size: 0.875rem;
  color: #202124;
}

.seo-serp-path {
  color: #4d5156;
}

.seo-serp-title {
  margin: 0 0 0.15rem;
  font-size: 1.25rem;
  line-height: 1.3;
  color: #1a0dab;
  cursor: default;
}

.seo-serp-desc {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #4d5156;
}

.seo-og-preview {
  aspect-ratio: 1.91 / 1;
  width: 100%;
  background: #f1f5f9;
}

.seo-og-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Preview logo / favicon en Datos del sitio */
.brand-asset-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 7.5rem;
  padding: 1rem;
  background: #f1f5f9;
}

.brand-asset-preview--favicon {
  min-height: 6.5rem;
}

.brand-asset-preview__img {
  display: block;
  max-width: 100%;
  max-height: 4rem;
  width: auto;
  height: auto;
  object-fit: contain;
}

.brand-asset-preview--favicon .brand-asset-preview__img {
  max-height: 3rem;
  width: 3rem;
  height: 3rem;
}

.brand-asset-preview__img.hidden {
  display: none;
}

.brand-asset-preview__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  max-width: 16rem;
  text-align: center;
  color: #94a3b8;
}

.brand-asset-preview__placeholder.hidden {
  display: none;
}

.brand-asset-preview__placeholder p {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.35;
  color: #94a3b8;
}

.seo-keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.seo-keyword-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  background: #f8fafc;
  padding: 0.35rem 0.35rem 0.35rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #334155;
}

.seo-keyword-chip > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seo-keyword-chip button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
}

.seo-keyword-chip button:hover {
  background: #fee2e2;
  color: #dc2626;
}

.seo-keyword-chip button:focus-visible {
  outline: 2px solid rgba(45, 90, 39, 0.45);
  outline-offset: 1px;
}

/* —— SEO por página —— */
.page-seo-nav {
  display: none;
}

@media (min-width: 1024px) {
  .page-seo-nav {
    display: block;
  }
}

.page-seo-mobile-select {
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
}

.page-seo-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
}

.page-seo-badge {
  flex-shrink: 0;
  border-radius: 9999px;
  padding: 0.125rem 0.45rem;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.4;
}

.page-seo-badge--configured {
  background: rgba(45, 90, 39, 0.12);
  color: #2d5a27;
}

.page-seo-badge--empty {
  background: #f1f5f9;
  color: #94a3b8;
}

.page-seo-badge--noindex {
  background: rgba(180, 83, 9, 0.12);
  color: #b45309;
}

.page-editor-nav-link.is-active .page-seo-badge--configured {
  background: rgba(0, 35, 102, 0.12);
  color: #002366;
}

.page-editor-nav-link.is-active .page-seo-badge--empty {
  background: rgba(0, 35, 102, 0.08);
  color: rgba(0, 35, 102, 0.55);
}

.page-editor-nav-link.is-active .page-seo-badge--noindex {
  background: rgba(180, 83, 9, 0.15);
  color: #b45309;
}

.seo-og-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 100%;
  aspect-ratio: 1.91 / 1;
  padding: 1.5rem;
  color: #94a3b8;
  text-align: center;
  font-size: 0.8125rem;
}

.seo-og-placeholder.hidden {
  display: none;
}

.seo-og-preview img.hidden {
  display: none;
}

.page-seo-noindex {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
  cursor: pointer;
}

@media (min-width: 640px) {
  .page-seo-noindex {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
  }
}

.page-seo-noindex__text {
  min-width: 0;
  flex: 1;
}

.page-seo-switch {
  flex-shrink: 0;
}

.page-seo-switch__track {
  position: relative;
  display: block;
  width: 2.75rem;
  height: 1.5rem;
  border-radius: 9999px;
  background: #cbd5e1;
  transition: background 0.15s ease;
}

.page-seo-switch__thumb {
  position: absolute;
  top: 0.125rem;
  left: 0.125rem;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 9999px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.15);
  transition: transform 0.15s ease;
}

.page-seo-switch input:checked + .page-seo-switch__track {
  background: #b45309;
}

.page-seo-switch input:checked + .page-seo-switch__track .page-seo-switch__thumb {
  transform: translateX(1.25rem);
}

.page-seo-switch input:focus-visible + .page-seo-switch__track {
  outline: 2px solid rgba(45, 90, 39, 0.45);
  outline-offset: 2px;
}

/* —— Métricas / Rendimiento —— */
.dash-metrics-period {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

@media (min-width: 640px) {
  .dash-metrics-period {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    width: auto;
  }
}

.dash-metrics-kpis {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

@media (min-width: 640px) {
  .dash-metrics-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .dash-metrics-kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.dash-metrics-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .dash-metrics-split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.dash-metrics-health {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 768px) {
  .dash-metrics-health {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.dash-metrics-health__item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #f8fafc;
  padding: 0.875rem 1rem;
}

.dash-metrics-health__icon {
  display: flex;
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
}

.dash-metrics-health__icon svg {
  width: 0.875rem;
  height: 0.875rem;
}

.dash-metrics-health__item.is-ok .dash-metrics-health__icon {
  background: rgba(45, 90, 39, 0.12);
  color: #2d5a27;
}

.dash-metrics-health__item.is-warn {
  background: #fffbeb;
  border-color: #fde68a;
}

.dash-metrics-health__item.is-warn .dash-metrics-health__icon {
  background: #fef3c7;
  color: #b45309;
}

.dash-metrics-ga-tables {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

@media (min-width: 1024px) {
  .dash-metrics-ga-tables {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.dash-metrics-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.dash-metrics-table th {
  padding: 0.625rem 1rem;
  text-align: left;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
  background: #f8fafc;
  white-space: nowrap;
}

.dash-metrics-table th.text-right,
.dash-metrics-table td.text-right {
  text-align: right;
}

.dash-metrics-table td {
  padding: 0.75rem 1rem;
  border-top: 1px solid #f1f5f9;
  color: #334155;
  max-width: 14rem;
}

.dash-metrics-table td:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-metrics-table tbody tr:first-child td {
  border-top: 0;
}

.dash-metrics-devices {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 768px) {
  .dash-metrics-devices {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* —— Resumen / Overview —— */
.dash-overview-chart {
  min-width: 0;
}

.dash-overview-chart__svg {
  display: block;
  width: 100%;
  height: 11rem; /* h-44 */
}

@media (min-width: 640px) {
  .dash-overview-chart__svg {
    height: 14rem; /* h-56 */
  }
}

.dash-overview-chart__labels {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.5rem;
  font-size: 11px;
  line-height: 1.25;
  color: #94a3b8;
}

.dash-overview-chart__labels > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-overview-chart__labels > span:first-child {
  text-align: left;
}

.dash-overview-chart__labels > span:nth-child(2) {
  text-align: center;
}

.dash-overview-chart__labels > span:last-child {
  text-align: right;
}

.dash-overview-dot {
  display: block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: #2d5a27;
}

.dash-overview-dot--tertiary {
  background: #2d5a27;
}

.dash-overview-dot--primary {
  background: #002366;
}

.dash-overview-dot--secondary {
  background: #c5a021;
}

/* —— Perfil / Mi información —— */
.profile-summary {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

@media (min-width: 640px) {
  .profile-summary {
    flex-direction: row;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem;
  }
}

.profile-summary-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  flex-shrink: 0;
  border-radius: 9999px;
  background: #002366;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.profile-summary-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1.25rem;
  margin: 0;
  padding-top: 0.75rem;
  border-top: 1px solid #f1f5f9;
}

@media (min-width: 640px) {
  .profile-summary-meta {
    margin-left: auto;
    padding-top: 0;
    padding-left: 1.25rem;
    border-top: 0;
    border-left: 1px solid #f1f5f9;
    text-align: right;
  }
}

.profile-summary-meta dt {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
}

.profile-summary-meta dd {
  margin: 0.125rem 0 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
}

.profile-readonly {
  cursor: default;
  color: #475569;
}

.profile-readonly:focus {
  outline: none;
  box-shadow: none;
}

.profile-password-field {
  position: relative;
}

.profile-password-toggle {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  transform: translateY(-50%);
  border: 0;
  border-radius: 0.375rem;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
}

.profile-password-toggle:hover {
  background: #f8fafc;
  color: #475569;
}

.profile-input-error {
  border-color: #f87171 !important;
}

.profile-strength-track {
  height: 0.375rem;
  overflow: hidden;
  border-radius: 9999px;
  background: #e2e8f0;
}

.profile-strength-bar {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: #94a3b8;
  transition: width 0.2s ease, background 0.2s ease;
}

.profile-strength[data-level="weak"] .profile-strength-bar {
  background: #ef4444;
}

.profile-strength[data-level="fair"] .profile-strength-bar {
  background: #f59e0b;
}

.profile-strength[data-level="good"] .profile-strength-bar {
  background: #84cc16;
}

.profile-strength[data-level="strong"] .profile-strength-bar {
  background: #16a34a;
}

/* —— Login del panel —— */
.dash-login {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background: #f1f5f9;
  color: #334155;
  font-family: Inter, sans-serif;
}

.dash-login-brand {
  position: relative;
  overflow: hidden;
  background: #002366;
  color: #cbd5e1;
  padding: 1.25rem 1.25rem 1.5rem;
}

.dash-login-brand::before {
  content: "";
  position: absolute;
  inset: auto -20% -40% 20%;
  height: 18rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(197, 160, 33, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.dash-login-brand-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 28rem;
}

.dash-login-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: inherit;
  width: fit-content;
}

.dash-login-logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  color: #c5a021;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.dash-login-logo-text {
  font-family: "Noto Serif", serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.dash-login-logo-text span {
  color: #c5a021;
}

.dash-login-brand-copy {
  display: none;
}

.dash-login-eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(203, 213, 225, 0.75);
}

.dash-login-eyebrow.is-accent {
  color: #2d5a27;
}

.dash-login-headline {
  margin: 0;
  font-family: "Noto Serif", serif;
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.25;
  color: #fff;
}

.dash-login-lead {
  margin: 0.75rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: #94a3b8;
  max-width: 22rem;
}

.dash-login-brand-foot {
  display: none;
  align-items: center;
  gap: 0.5rem;
  margin: auto 0 0;
  padding-top: 2rem;
  font-size: 0.75rem;
  color: #64748b;
}

.dash-login-dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 9999px;
  background: #c5a021;
  flex-shrink: 0;
}

.dash-login-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 1.5rem 1rem 2rem;
}

.dash-login-card {
  width: 100%;
  max-width: 24rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.04);
  padding: 1.5rem 1.25rem;
}

.dash-login-card-head {
  margin-bottom: 1.5rem;
}

.dash-login-title {
  margin: 0;
  font-family: "Noto Serif", serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.25;
}

.dash-login-subtitle {
  margin: 0.375rem 0 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #64748b;
}

.dash-login-alerts {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.dash-login-alert {
  margin: 0;
  border-radius: 0.5rem;
  border: 1px solid #fecaca;
  background: #fef2f2;
  padding: 0.75rem 0.875rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #991b1b;
}

.dash-login-alert.is-success,
.dash-login-alert.is-info {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #065f46;
}

.dash-login-alert.is-warning {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.dash-login-form {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}

.dash-login-field {
  display: block;
}

.dash-login-label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #334155;
}

.dash-login-input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  background: #fff;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  color: #1e293b;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dash-login-input.has-toggle {
  padding-right: 2.75rem;
}

.dash-login-input::placeholder {
  color: #94a3b8;
}

.dash-login-input:hover {
  border-color: #94a3b8;
}

.dash-login-input:focus {
  outline: none;
  border-color: #2d5a27;
  box-shadow: 0 0 0 3px rgba(45, 90, 39, 0.25);
}

.dash-login-input.is-invalid {
  border-color: #f87171;
}

.dash-login-input.is-invalid:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.dash-login-field-error {
  display: block;
  margin-top: 0.375rem;
  font-size: 0.75rem;
  color: #b91c1c;
}

.dash-login-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: -0.25rem;
}

.dash-login-check {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: #475569;
  cursor: pointer;
  user-select: none;
}

.dash-login-checkbox {
  width: 1rem;
  height: 1rem;
  margin-top: 0.125rem;
  flex-shrink: 0;
  accent-color: #002366;
  cursor: pointer;
}

.dash-login-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 0.25rem;
  border: 0;
  border-radius: 0.5rem;
  background: #002366;
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.dash-login-submit:hover {
  background: #001a4d;
}

.dash-login-submit:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 35, 102, 0.35);
}

.dash-login-submit:disabled,
.dash-login-submit.is-loading {
  opacity: 0.72;
  cursor: wait;
}

.dash-login-submit-icon {
  flex-shrink: 0;
}

.dash-login-help {
  margin: 1.5rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid #f1f5f9;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #64748b;
}

.dash-login-help-hint {
  display: block;
  margin-top: 0.25rem;
  color: #94a3b8;
}

.dash-login-legal {
  margin: 0;
  font-size: 0.8125rem;
  color: #94a3b8;
}

.dash-login-legal a {
  color: #475569;
  text-decoration: none;
  font-weight: 500;
}

.dash-login-legal a:hover {
  color: #002366;
  text-decoration: underline;
}

@media (min-width: 640px) {
  .dash-login-brand {
    padding: 1.5rem 1.5rem 1.75rem;
  }

  .dash-login-card {
    padding: 2rem 1.75rem;
  }

  .dash-login-main {
    padding: 2rem 1.5rem 2.5rem;
  }

  .dash-login-title {
    font-size: 1.75rem;
  }
}

@media (min-width: 1024px) {
  .dash-login {
    flex-direction: row;
  }

  .dash-login-brand {
    display: flex;
    width: min(42vw, 32rem);
    flex-shrink: 0;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 2.5rem;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .dash-login-brand-inner {
    height: 100%;
    max-width: 22rem;
    margin: 0 auto;
  }

  .dash-login-brand-copy {
    display: block;
    margin-top: 2.5rem;
  }

  .dash-login-brand-foot {
    display: flex;
  }

  .dash-login-headline {
    font-size: 2rem;
  }

  .dash-login-main {
    flex: 1;
    padding: 2.5rem;
  }

  .dash-login-card {
    max-width: 26rem;
  }
}

.demo-readonly-banner {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid #fcd34d;
  background: #fffbeb;
  color: #92400e;
  font-size: 0.875rem;
}
.demo-readonly-banner p {
  margin: 0;
}
.demo-readonly-banner a {
  font-weight: 600;
  color: #001a52;
  margin-left: 0.5rem;
  text-decoration: underline;
}

.is-demo-readonly button[type="submit"]:disabled,
.is-demo-readonly input[type="submit"]:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
