/* Pemasi — entrada do painel (alinhado ao tema escuro neutro de platform-painel.css) */
:root {
  --pl-canvas: #1a1a1a;
  --pl-sidebar: #0f0f0f;
  --pl-surface: #171717;
  --pl-surface-input: #262626;
  --pl-text: #f5f5f5;
  --pl-heading: #fafafa;
  --pl-muted: #a3a3a3;
  --pl-border: rgba(255, 255, 255, 0.1);
  --pl-border-strong: rgba(255, 255, 255, 0.16);
  --pl-primary: #525252;
  --pl-primary-hover: #737373;
  --pl-error: #f87171;
  --pl-radius: 12px;
  --pl-radius-sm: 10px;
}

html {
  scrollbar-gutter: stable;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

.pl-page {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--pl-text);
  background: var(--pl-canvas);
  position: relative;
  overflow-x: hidden;
}

.pl-canvas-base {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: var(--pl-canvas);
  pointer-events: none;
}

.pl-canvas-logo {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: min(5vh, 2.5rem) 1rem;
  pointer-events: none;
}

.pl-canvas-logo-img {
  display: block;
  width: auto;
  height: min(88vh, 900px);
  max-height: min(88vh, 900px);
  max-width: min(90vw, 560px);
  object-fit: contain;
  object-position: center;
  opacity: 0.96;
  filter: drop-shadow(0 2px 16px rgba(26, 26, 26, 0.65));
}

.pl-canvas-scrim {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(
      105deg,
      rgba(26, 26, 26, 0.34) 0%,
      rgba(26, 26, 26, 0.1) 38%,
      rgba(26, 26, 26, 0) 56%
    ),
    linear-gradient(
      180deg,
      rgba(26, 26, 26, 0.18) 0%,
      rgba(26, 26, 26, 0.07) 28%,
      rgba(26, 26, 26, 0.26) 55%,
      rgba(26, 26, 26, 0.52) 100%
    );
}

.pl-wrap {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  max-width: 1200px;
  margin: 0 auto;
  gap: clamp(1.5rem, 4vw, 3rem);
  padding: clamp(1.25rem, 3vw, 2.5rem);
  align-items: center;
}

@media (max-width: 960px) {
  .pl-wrap {
    grid-template-columns: 1fr;
    align-items: start;
    padding-bottom: 2.5rem;
  }

  .pl-aside {
    order: 2;
  }

  .pl-form-col {
    order: 1;
  }

  /* Cadastro: no mobile, o bloco explicativo fica acima do formulário */
  .pl-wrap.pl-wrap--registro {
    min-height: 0;
    gap: clamp(1rem, 4vw, 1.5rem);
    padding-left: max(1.25rem, env(safe-area-inset-left));
    padding-right: max(1.25rem, env(safe-area-inset-right));
  }

  .pl-wrap.pl-wrap--registro .pl-aside {
    order: 1;
    max-width: 100%;
  }

  .pl-wrap.pl-wrap--registro .pl-form-col {
    order: 2;
    width: 100%;
    min-width: 0;
  }

  .pl-wrap.pl-wrap--registro .pl-brand {
    margin-bottom: 1rem;
  }

  .pl-wrap.pl-wrap--registro .pl-headline {
    font-size: clamp(1.35rem, 5.5vw, 1.95rem);
  }

  .pl-wrap.pl-wrap--registro .pl-lead {
    max-width: none;
    margin-bottom: 0;
    font-size: 0.95rem;
  }
}

.pl-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.pl-brand-mark {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--pl-border);
  flex-shrink: 0;
  background: var(--pl-sidebar);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.pl-brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.06);
}

.pl-brand-name {
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  color: var(--pl-heading);
}

.pl-headline {
  font-size: clamp(1.75rem, 3.5vw, 2.35rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  color: var(--pl-heading);
}

.pl-headline em {
  font-style: normal;
  color: #d4d4d4;
}

.pl-lead {
  margin: 0 0 1.75rem;
  color: var(--pl-muted);
  font-size: 1.02rem;
  line-height: 1.55;
  max-width: 34rem;
}

.pl-lead-highlight {
  display: inline;
  font-weight: 600;
  color: #e5e5e5;
}

.pl-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pl-feature {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.pl-feature-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--pl-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--pl-surface);
  border: 1px solid var(--pl-border);
  color: var(--pl-muted);
}

.pl-feature-icon svg {
  width: 1.15rem;
  height: 1.15rem;
}

.pl-feature-text {
  font-size: 0.98rem;
  line-height: 1.45;
  padding-top: 0.2rem;
  color: var(--pl-text);
}

.pl-feature-em {
  font-weight: 600;
  color: #e5e5e5;
}

/* Coluna do formulário */
.pl-form-col {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
}

.pl-card,
.pl-aside {
  background: var(--pl-surface);
  border: 1px solid var(--pl-border);
  border-radius: var(--pl-radius);
  padding: clamp(1.5rem, 4vw, 2rem);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

.pl-card h1 {
  margin: 0 0 0.35rem;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--pl-heading);
}

.pl-card .pl-sub {
  margin: 0 0 1.5rem;
  color: var(--pl-muted);
  font-size: 0.92rem;
}

.pl-flash {
  padding: 0.65rem 0.85rem;
  border-radius: var(--pl-radius-sm);
  margin-bottom: 1rem;
  font-size: 0.88rem;
}

.pl-flash.error {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fecaca;
}

.pl-field {
  margin-bottom: 1.1rem;
}

.pl-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--pl-muted);
}

.pl-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--pl-surface-input);
  border: 1px solid var(--pl-border);
  border-radius: var(--pl-radius-sm);
  padding: 0.05rem 0.65rem 0.05rem 0.75rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.pl-input-wrap:focus-within {
  border-color: var(--pl-border-strong);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.06);
}

.pl-input-wrap.pl-input-error {
  border-color: rgba(248, 113, 113, 0.55);
}

.pl-input-wrap svg.pl-input-ico {
  flex-shrink: 0;
  color: var(--pl-muted);
  opacity: 0.85;
}

.pl-input-wrap input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--pl-text);
  font-size: 0.95rem;
  padding: 0.75rem 0.25rem;
  outline: none;
}

.pl-input-wrap input::placeholder {
  color: #737373;
}

/* /entrar: o HTML não inclui botão “mostrar senha”; esconde o controlo nativo do Edge/IE quando existir. */
#pl-password::-ms-reveal {
  display: none;
}

/* Chrome/Chromium: ícone automático à direita do campo de senha. */
#pl-password::-webkit-credentials-auto-fill-button {
  visibility: hidden;
  display: none !important;
  pointer-events: none;
  width: 0;
  height: 0;
  margin: 0;
}

.pl-field-error {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: var(--pl-error);
}

.pl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.9rem 1rem;
  border: none;
  border-radius: var(--pl-radius-sm);
  background: var(--pl-primary);
  color: #fafafa;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: none;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.12s ease;
}

.pl-btn:hover {
  background: var(--pl-primary-hover);
  color: #fafafa;
}

.pl-btn:active {
  transform: scale(0.99);
}

.pl-foot {
  margin-top: 1.35rem;
  text-align: center;
  font-size: 0.86rem;
  color: var(--pl-muted);
  line-height: 1.65;
}

.pl-foot a {
  color: var(--pl-muted);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  font-weight: 500;
}

.pl-foot a:hover {
  color: #d4d4d4;
}

.pl-back {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.82rem;
}

.pl-back a {
  color: var(--pl-muted);
  text-decoration: none;
}

.pl-back a:hover {
  color: #d4d4d4;
}

.pl-flash.success {
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #bbf7d0;
}

/* ---------- Cadastro (/registro) ---------- */
.pl-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.pl-wrap--registro {
  max-width: 1100px;
  /* Evita centralizar a coluna do aside na altura do formulário (desktop). */
  align-items: start;
}

.pl-card--registro {
  max-width: 100%;
}

.pl-reg-section {
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--pl-border);
}

.pl-reg-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0.5rem;
  padding-bottom: 0;
}

.pl-reg-section-title {
  margin: 0 0 1rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #737373;
}

.pl-reg-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1rem;
}

@media (max-width: 640px) {
  .pl-reg-grid {
    grid-template-columns: 1fr;
  }
}

.pl-reg-hint {
  margin: 0.65rem 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #737373;
}

.pl-phone-row {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}

.pl-phone-row.pl-input-error .pl-phone-prefix,
.pl-phone-row.pl-input-error .pl-phone-input-wrap {
  border-color: rgba(248, 113, 113, 0.55);
}

.pl-phone-prefix {
  flex-shrink: 0;
}

.pl-phone-select {
  height: 100%;
  min-height: 2.65rem;
  padding: 0 0.65rem;
  border-radius: var(--pl-radius-sm);
  border: 1px solid var(--pl-border);
  background: var(--pl-surface-input);
  color: var(--pl-text);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  outline: none;
}

.pl-phone-select:focus {
  border-color: var(--pl-border-strong);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.06);
}

.pl-phone-input-wrap {
  flex: 1;
  min-width: 0;
}

.pl-secret-wrap {
  position: relative;
  padding-right: 2.5rem;
}

.pl-secret-toggle {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--pl-muted);
  cursor: pointer;
}

.pl-secret-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--pl-text);
}

.pl-pw-rules {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0.75rem 0.9rem;
  border-radius: var(--pl-radius-sm);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--pl-border);
  font-size: 0.8rem;
  color: var(--pl-muted);
}

.pl-pw-rule {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.35rem 0;
}

.pl-pw-ic::before {
  content: "✕";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  font-size: 0.65rem;
  color: #f87171;
}

.pl-pw-rule.is-ok {
  color: #cbd5e1;
}

.pl-pw-rule.is-ok .pl-pw-ic::before {
  content: "✓";
  color: #4ade80;
}

.pl-pw-rule.is-bad .pl-pw-ic::before {
  content: "✕";
  color: #f87171;
}

.pl-foot--reg {
  margin-top: 1.5rem;
}
