@layer layout {
/* Puente MVC: login, ghost sections, widgets, modals y scroll dentro del shell */

.hidden,
[hidden] {
  display: none !important;
}

#login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  background: var(--color-shell);
}

.login-card {
  width: 100%;
  max-width: 24rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-container);
  padding: var(--space-6);
  box-shadow: var(--shadow-float);
}

.login-card__title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-1);
}

/* Firma de plataforma al pie del login: lockup monocromo, uno por tema. */
.login-card__firma {
  display: flex;
  justify-content: center;
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}
.login-card__firma-img { height: 20px; width: auto; }
[data-theme="dark"] .login-card__firma-img--light,
[data-theme="light"] .login-card__firma-img--dark { display: none; }

.login-card__sub {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.login-card__field {
  margin-bottom: var(--space-4);
}

.login-card__field label {
  display: block;
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-1);
  color: var(--color-text-muted);
}

.login-card .alert {
  margin-top: var(--space-3);
}

.login-card .alert[hidden] {
  display: none;
}

#app-container.admin-content {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 0;
}

#app-container.admin-content > section[data-ghost-section="true"] {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: auto;
}

#app-container.admin-content > section[data-ghost-section="true"][hidden] {
  display: none;
}

.sidebar__link {
  width: 100%;
  text-align: left;
  color: inherit;
}

#dynamic-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.sidebar__link--disabled {
  opacity: 0.4;
  pointer-events: none;
}

.modal-root {
  position: fixed;
  inset: 0;
  z-index: var(--z-float);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  background: var(--color-overlay);
}

.modal-root.hidden {
  display: none;
}

.modal-panel {
  width: 100%;
  max-height: min(90vh, 720px);
  overflow: auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-container);
  box-shadow: var(--shadow-float);
}

.modal-header,
.modal-body {
  padding: var(--space-4) var(--space-4);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--color-border);
}

.sw-update-banner {
  position: fixed;
  bottom: var(--space-4);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-float);
  z-index: var(--z-float);
}
.sw-update-banner__text {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
}

.admin-header__offline.hidden {
  display: none;
}
} /* @layer layout */
