.planner.gpe-locked {
  display: block;
}

.planner.gpe-locked > :not(#gpeAuthGate):not(.print-quote) {
  display: none !important;
}

.gpe-auth-gate {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: clamp(22px, 4vw, 42px);
  box-shadow: var(--shadow);
}

.gpe-auth-layout {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(320px, 1.1fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: start;
}

.gpe-auth-copy h3 {
  margin: 10px 0 16px;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.04;
}

.gpe-auth-copy p {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.75;
}

.gpe-auth-benefits {
  display: grid;
  gap: 10px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.gpe-auth-benefits li {
  display: flex;
  gap: 10px;
  align-items: center;
  color: #4f473f;
}

.gpe-auth-benefits li::before {
  content: "✓";
  color: var(--accent-dark);
  font-weight: 800;
}

.gpe-auth-panel {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 22px;
}

.gpe-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
  margin: -2px 0 20px;
}

.gpe-auth-tab {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  padding: 12px 8px;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
}

.gpe-auth-tab[aria-selected="true"] {
  color: var(--ink);
  border-bottom-color: var(--accent-dark);
}

.gpe-auth-form {
  display: grid;
  gap: 14px;
}

.gpe-auth-form[hidden] {
  display: none;
}

.gpe-auth-form label {
  display: grid;
  gap: 6px;
  color: #4f473f;
  font-size: .9rem;
  font-weight: 700;
}

.gpe-auth-form input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  padding: 10px 12px;
  border-radius: 8px;
}

.gpe-auth-form input:focus {
  outline: 2px solid rgba(156, 125, 88, .32);
  border-color: var(--accent);
}

.gpe-auth-form .btn {
  margin-top: 4px;
  width: 100%;
}

.gpe-auth-status {
  min-height: 24px;
  margin-top: 14px;
  color: var(--muted);
  font-size: .92rem;
}

.gpe-auth-status.is-error {
  color: #9b2f2f;
}

.gpe-auth-status.is-success {
  color: #24613d;
}

.gpe-account-bar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  background: var(--paper);
  margin-bottom: 14px;
}

.gpe-account-bar strong,
.gpe-account-bar span {
  display: block;
}

.gpe-account-bar span {
  color: var(--muted);
  font-size: .88rem;
}

.gpe-account-bar button {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
}

.gpe-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1000;
  max-width: min(390px, calc(100vw - 36px));
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 8px;
  background: #201d19;
  color: #fff;
  box-shadow: 0 18px 48px rgba(32, 29, 25, .28);
}

.gpe-toast.is-error {
  background: #7f2828;
}

/* El aviso en pantalla no debe salir dentro del PDF del presupuesto. */
@media print {
  .gpe-toast,
  .gpe-account-bar {
    display: none !important;
  }
}

.gpe-admin-link {
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 760px) {
  .gpe-auth-layout {
    grid-template-columns: 1fr;
  }

  .gpe-auth-panel {
    padding: 18px;
  }

  .gpe-account-bar {
    align-items: flex-start;
  }
}

.gpe-link-button { display: inline-block; margin-top: 2px; padding: 6px 0; border: 0; background: none; color: inherit; opacity: .8; font-size: .88rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.gpe-link-button:hover { opacity: 1; }
.gpe-auth-note { margin: 0 0 4px; font-size: .9rem; opacity: .8; line-height: 1.5; }
