/* Visor shell: capçalera fixa + contingut a sota */
html.nexpol-shell-root,
body.nexpol-shell {
  height: 100%;
  overflow: hidden;
}

body.nexpol-shell {
  display: flex;
  flex-direction: column;
  background: var(--navy);
}

.shell-header {
  flex: 0 0 auto;
  background: var(--navy);
  border-bottom: 1px solid rgba(193, 255, 114, 0.2);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  z-index: 10;
}

.shell-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.shell-header-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: #fff;
  flex-shrink: 0;
}

.shell-header-brand img {
  height: 2rem;
  width: auto;
}

.shell-header-brand span {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
}

.shell-back {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 0.88rem;
  white-space: nowrap;
  transition: color 0.2s;
}

.shell-back:hover {
  color: var(--accent);
}

.shell-title {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shell-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.shell-theme-label {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
}

.shell-theme-toggle {
  display: inline-flex;
  border: 1px solid rgba(193, 255, 114, 0.35);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.shell-theme-btn {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.4rem 0.85rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.shell-theme-btn:hover {
  color: #fff;
}

.shell-theme-btn.is-active {
  background: var(--accent);
  color: var(--navy);
}

.shell-theme-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.shell-frame-wrap {
  flex: 1 1 auto;
  min-height: 0;
  background: #f9fafb;
}

.shell-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
  background: #fff;
}

.shell-error {
  max-width: 36rem;
  margin: 3rem auto;
  padding: 1.5rem;
  color: #fca5a5;
  text-align: center;
}

@media (max-width: 640px) {
  .shell-header {
    padding: 0.75rem 1rem;
  }

  .shell-title {
    display: none;
  }

  .shell-theme-label {
    display: none;
  }
}
