/* Painel do Cliente — login responsivo (CSS visual apenas) */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

@keyframes pl-auth-fade-slide {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Reset escopo login ── */
#pl-auth-gate,
#pl-auth-gate *,
#pl-auth-gate *::before,
#pl-auth-gate *::after {
  box-sizing: border-box;
}

body.pl-auth-locked .topbar,
body.pl-auth-locked .shell {
  display: none !important;
}

html.pl-auth-checking:not(.pl-auth-locked) .main::before {
  content: 'Carregando painel…';
  display: block;
  padding: 1.25rem 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ── Tokens fluidos ── */
#pl-auth-gate {
  --pl-blue: #005bff;
  --pl-blue-dark: #0045cc;
  --pl-bg: #f6f9ff;
  --pl-text: #0f172a;
  --pl-muted: #64748b;
  --pl-border: #e2e8f0;
  --pl-pad-x: clamp(1rem, 3vw, 1.75rem);
  --pl-pad-y: clamp(1rem, 2.5vw, 1.5rem);
  --pl-radius: 11px;
  --pl-input-h: 42px;
  --pl-btn-h: 42px;
  --pl-gap: 14px;
  --pl-card-r: 18px;

  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: safe center;
  justify-content: center;
  padding: max(0.75rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right)) max(0.75rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  background: radial-gradient(ellipse 120% 80% at 50% 0%, #fff 0%, #edf3ff 100%), var(--pl-bg);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#pl-auth-gate::before {
  content: '';
  position: fixed;
  top: -100px;
  right: -60px;
  width: min(420px, 70vw);
  height: min(420px, 70vw);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 91, 255, 0.14) 0%, transparent 70%);
  pointer-events: none;
}

#pl-auth-gate::after {
  content: '';
  position: fixed;
  left: 0;
  bottom: 0;
  width: min(360px, 60vw);
  height: 140px;
  opacity: 0.12;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 120' fill='none'%3E%3Cpath d='M0 80 C60 40 120 100 180 60 S300 20 400 70' stroke='%23005BFF' stroke-width='1.5'/%3E%3Cpath d='M0 95 C70 55 130 110 200 75 S310 35 400 90' stroke='%23005BFF' stroke-width='1'/%3E%3C/svg%3E");
  background-size: cover;
  background-repeat: no-repeat;
}

/* ── Card base ── */
.pl-auth-gate__card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 880px;
  margin: auto;
  background: #fff;
  border-radius: var(--pl-card-r);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  animation: pl-auth-fade-slide 0.4s ease;
  min-width: 0;
}

/* ── Brand ── */
.pl-auth-gate__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.pl-auth-gate__brand-mark {
  display: block;
  width: clamp(48px, 10vw, 52px);
  height: clamp(48px, 10vw, 52px);
  border-radius: 12px;
  flex-shrink: 0;
  object-fit: contain;
  object-position: center;
  background: #fff;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.pl-auth-gate__brand > div {
  min-width: 0;
}

.pl-auth-gate__brand strong {
  display: block;
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--pl-text);
  letter-spacing: -0.02em;
}

.pl-auth-gate__brand span {
  display: block;
  font-size: clamp(0.7rem, 2vw, 0.78rem);
  color: var(--pl-muted);
  margin-top: 0.1rem;
}

.pl-auth-gate__title {
  margin: 0;
  font-size: clamp(1rem, 3vw, 1.15rem);
  font-weight: 800;
  color: var(--pl-text);
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.pl-auth-gate__lead {
  margin: 0;
  font-size: clamp(0.8rem, 2.5vw, 0.875rem);
  color: var(--pl-muted);
  line-height: 1.5;
}

/* ── Formulário ── */
.pl-auth-gate__grid {
  display: flex;
  flex-direction: column;
  gap: var(--pl-gap);
  min-width: 0;
}

.pl-auth-gate__field {
  display: block;
  min-width: 0;
}

.pl-auth-gate__field span {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  margin-bottom: 0.4rem;
}

.pl-auth-gate__field input {
  display: block;
  width: 100%;
  min-width: 0;
  height: var(--pl-input-h);
  padding: 0 0.875rem 0 2.75rem;
  border: 1px solid var(--pl-border);
  border-radius: var(--pl-radius);
  font: inherit;
  font-size: 0.875rem;
  color: var(--pl-text);
  background-color: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.pl-auth-gate__field input:focus {
  outline: none;
  border-color: var(--pl-blue);
  box-shadow: 0 0 0 3px rgba(0, 91, 255, 0.1);
}

.pl-auth-gate__field input::placeholder {
  color: #94a3b8;
}

.pl-auth-gate__field:has(#pl-auth-email) input {
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M4 7.5A2.5 2.5 0 0 1 6.5 5h11A2.5 2.5 0 0 1 20 7.5v9A2.5 2.5 0 0 1 17.5 19h-11A2.5 2.5 0 0 1 4 16.5v-9Z' stroke='%2394a3b8' stroke-width='1.6'/%3E%3Cpath d='M5.5 8.5 12 13l6.5-4.5' stroke='%2394a3b8' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") 0.875rem center / 18px no-repeat;
}

.pl-auth-gate__field:has(#pl-auth-password) {
  position: relative;
}

.pl-auth-gate__field:has(#pl-auth-password) input {
  padding-right: 2.75rem;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Crect x='5.5' y='10.5' width='13' height='9' rx='2' stroke='%2394a3b8' stroke-width='1.6'/%3E%3Cpath d='M8.5 10.5V8a3.5 3.5 0 1 1 7 0v2.5' stroke='%2394a3b8' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") 0.875rem center / 18px no-repeat;
}

.pl-auth-gate__field:has(#pl-auth-password)::after {
  content: '';
  position: absolute;
  right: 0.875rem;
  bottom: calc((var(--pl-input-h) - 20px) / 2);
  width: 20px;
  height: 20px;
  opacity: 0.5;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M2.5 12s3.5-6.5 9.5-6.5S21.5 12 21.5 12s-3.5 6.5-9.5 6.5S2.5 12 2.5 12Z' stroke='%2394a3b8' stroke-width='1.6'/%3E%3Ccircle cx='12' cy='12' r='2.5' stroke='%2394a3b8' stroke-width='1.6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.pl-auth-gate__inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.pl-auth-gate__inline label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.84rem;
  color: #334155;
}

/* ── Botões ── */
.pl-auth-gate__actions {
  margin: 0;
}

.pl-auth-gate__actions .btn {
  width: 100%;
  min-height: var(--pl-btn-h);
  height: var(--pl-btn-h);
  font-size: clamp(0.875rem, 2.5vw, 0.95rem);
  font-weight: 700;
  border-radius: var(--pl-radius);
}

.pl-auth-gate__actions .btn--primary {
  background: var(--pl-blue);
  border-color: var(--pl-blue);
  color: #fff;
  box-shadow: 0 6px 20px rgba(0, 91, 255, 0.25);
}

.pl-auth-gate__actions .btn--primary:hover {
  background: var(--pl-blue-dark);
  border-color: var(--pl-blue-dark);
}

.pl-auth-gate__actions .btn--primary::after {
  content: '';
  width: 16px;
  height: 16px;
  margin-left: 0.35rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ── Links / opções ── */
.pl-auth-gate__links {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.pl-auth-gate__links button {
  border: 0;
  background: transparent;
  color: var(--pl-blue);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  font-size: clamp(0.8rem, 2.5vw, 0.875rem);
  padding: 0;
}

.pl-auth-gate__links button:hover {
  text-decoration: underline;
}

/* Linha lembrar + esqueci */
.pl-auth-gate__options-row {
  display: none;
}

.pl-auth-gate__grid::after {
  content: 'Lembrar de mim';
  display: flex;
  align-items: center;
  min-height: 1.25rem;
  font-size: clamp(0.78rem, 2.5vw, 0.84rem);
  color: #334155;
  padding-left: 1.45rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none'%3E%3Crect x='1.5' y='1.5' width='15' height='15' rx='3' fill='%23005BFF'/%3E%3Cpath d='M5 9.5l2.5 2.5L13 6.5' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") left center / 16px no-repeat;
}

.pl-auth-gate__links::before {
  content: 'ou';
  display: block;
  text-align: center;
  color: #94a3b8;
  font-size: 0.75rem;
  margin: 0.85rem 0 0.75rem;
  line-height: 1;
  background:
    linear-gradient(var(--pl-border), var(--pl-border)) left center / calc(50% - 1.1rem) 1px no-repeat,
    linear-gradient(var(--pl-border), var(--pl-border)) right center / calc(50% - 1.1rem) 1px no-repeat;
}

#pl-auth-create {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: var(--pl-btn-h);
  border-radius: var(--pl-radius);
  border: 1px solid var(--pl-border);
  background: #fff;
  color: var(--pl-text);
  font-weight: 700;
  font-size: clamp(0.875rem, 2.5vw, 0.9rem);
}

#pl-auth-create::before {
  content: '';
  width: 16px;
  height: 16px;
  margin-right: 0.4rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='12' cy='8' r='4' stroke='%23334155' stroke-width='1.6'/%3E%3Cpath d='M5 20c0-3.3 3.1-6 7-6s7 2.7 7 6' stroke='%23334155' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

#pl-auth-create:hover {
  background: #f8fafc;
  text-decoration: none;
}

.pl-auth-gate__msg {
  margin: 0;
  font-size: 0.82rem;
  color: #b45309;
  line-height: 1.45;
  min-width: 0;
  word-break: break-word;
}

.pl-auth-gate__msg:empty {
  display: none;
}

/* Aside decorativo (desktop) — oculto no mobile/base */
.pl-auth-gate__aside {
  display: none;
}

.pl-auth-gate__features {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pl-auth-gate__feature {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.pl-auth-gate__feature + .pl-auth-gate__feature {
  margin-top: 0.8rem;
}

.pl-auth-gate__feature-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.16);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 12px;
}

.pl-auth-gate__feature-icon--shield {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M7 2.5 3 4.2v4.1c0 2.4 1.8 4.6 4.2 5.2 2.4-.6 4.2-2.8 4.2-5.2V4.2L7 2.5Z' stroke='white' stroke-width='1.1'/%3E%3Cpath d='M5.2 7.6 6.6 9l2.8-2.9' stroke='white' stroke-width='1.1' stroke-linecap='round'/%3E%3C/svg%3E");
}

.pl-auth-gate__feature-icon--track {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Crect x='3.5' y='3.5' width='9' height='10' rx='1.5' stroke='white' stroke-width='1.1'/%3E%3Cpath d='M5.5 6.5h5M5.5 9h3.5' stroke='white' stroke-width='1.1' stroke-linecap='round'/%3E%3C/svg%3E");
}

.pl-auth-gate__feature-icon--support {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M8 2.5a4 4 0 0 1 4 4v1.2c.9.3 1.5 1.1 1.5 2.1V11H2.5V9.8c0-1 .6-1.8 1.5-2.1V6.5a4 4 0 0 1 4-4Z' stroke='white' stroke-width='1.1'/%3E%3Cpath d='M6.5 11v1a1.5 1.5 0 0 0 3 0v-1' stroke='white' stroke-width='1.1'/%3E%3C/svg%3E");
}

.pl-auth-gate__feature strong {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
}

.pl-auth-gate__feature span {
  display: block;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.45;
  margin-top: 0.12rem;
}

.pl-auth-gate__secure-badge {
  margin: 1rem 0 0;
  padding: 0.45rem 0.85rem 0.45rem 1.85rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.96);
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.15) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Crect x='3' y='7' width='10' height='7' rx='1.5' stroke='white' stroke-width='1.2'/%3E%3Cpath d='M5.5 7V5.5a2.5 2.5 0 1 1 5 0V7' stroke='white' stroke-width='1.2'/%3E%3C/svg%3E") 0.75rem center / 12px no-repeat;
  border: 1px solid rgba(255, 255, 255, 0.24);
}

/* ── Dialog ── */
.pl-auth-dialog[hidden] { display: none !important; }

.pl-auth-dialog {
  position: fixed;
  inset: 0;
  z-index: 2147483001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.pl-auth-dialog__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
}

.pl-auth-dialog__card {
  position: relative;
  width: min(520px, calc(100% - 1.5rem));
  max-height: min(88dvh, 760px);
  overflow: auto;
  margin: 0;
  padding: 1.15rem 1.25rem;
  background: #fff;
  border-radius: var(--pl-radius);
  border: 1px solid var(--pl-border);
  box-shadow: 0 16px 48px rgba(2, 6, 23, 0.22);
  font-family: 'Inter', system-ui, sans-serif;
  --pl-input-h: 40px;
  --pl-btn-h: 40px;
  --pl-gap: 10px;
}

.pl-auth-dialog__card .pl-auth-gate__field input {
  padding-left: 0.75rem;
  background-image: none !important;
  font-size: 0.84rem;
}

.pl-auth-dialog__card .pl-auth-gate__field span {
  font-size: 0.65rem;
  margin-bottom: 0.3rem;
}

.pl-auth-dialog__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.pl-auth-dialog__head h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
}


/* ══════════════════════════════════════════
   MOBILE  ≤ 960px
   ══════════════════════════════════════════ */
@media (max-width: 960px) {
  #pl-auth-gate {
    align-items: flex-start;
  }

  .pl-auth-gate__side {
    display: contents;
  }

  .pl-auth-gate__card {
    max-width: min(440px, 100%);
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .pl-auth-gate__card::before {
    display: none;
  }

  .pl-auth-gate__grid::before {
    display: none !important;
  }

  /* Header mobile */
  .pl-auth-gate__brand {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 0 1rem;
    gap: 0;
  }

  .pl-auth-gate__brand-mark {
    order: 1;
    width: clamp(56px, 14vw, 72px);
    height: clamp(56px, 14vw, 72px);
    margin-bottom: 0.75rem;
    padding: 6px;
    background: #fff;
    border: 1px solid rgba(0, 91, 255, 0.12);
    box-shadow: 0 4px 16px rgba(0, 91, 255, 0.1);
    object-fit: contain;
  }

  .pl-auth-gate__brand > div,
  .pl-auth-gate__brand strong,
  .pl-auth-gate__brand span {
    display: none;
  }

  .pl-auth-gate__brand::after {
    content: 'Painel do Cliente';
    order: 2;
    display: block;
    font-size: clamp(1.2rem, 5vw, 1.35rem);
    font-weight: 800;
    color: var(--pl-text);
    letter-spacing: -0.03em;
    line-height: 1.2;
  }

  .pl-auth-gate__brand::before {
    content: 'Acesse sua conta para acompanhar seus pedidos.';
    order: 3;
    display: block;
    margin-top: 0.35rem;
    font-size: clamp(0.85rem, 3.5vw, 0.92rem);
    color: var(--pl-muted);
    line-height: 1.45;
    max-width: 26rem;
    position: static;
  }

  .pl-auth-gate__title,
  .pl-auth-gate__lead {
    display: none;
  }

  /* Card branco do formulário */
  .pl-auth-gate__grid {
    padding: clamp(1.25rem, 5vw, 1.75rem) clamp(1.25rem, 5vw, 1.75rem) 0;
    background: #fff;
    border-radius: var(--pl-card-r) var(--pl-card-r) 0 0;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.08);
  }

  .pl-auth-gate__links {
    padding: 0 clamp(1.25rem, 5vw, 1.75rem) clamp(1.25rem, 5vw, 1.75rem);
    background: #fff;
    border-radius: 0 0 var(--pl-card-r) var(--pl-card-r);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.08);
    margin-top: -1px;
    position: relative;
  }

  #pl-auth-forgot {
    position: absolute;
    right: clamp(1.25rem, 5vw, 1.75rem);
    top: -1.6rem;
    white-space: nowrap;
  }

  /* Bloco segurança */
  .pl-auth-gate__msg {
    margin-top: 1rem;
    padding: 1rem;
    background: #fff;
    border: 1px solid var(--pl-border);
    border-radius: var(--pl-radius);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
  }

  .pl-auth-gate__msg:empty {
    display: block;
    font-size: 0;
    color: transparent;
    padding-top: 2.5rem;
    padding-bottom: clamp(4.5rem, 18vw, 5.5rem);
    background-image:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M10 2.5 3.5 5v5c0 3.6 2.8 6.9 6.5 7.5 3.7-.6 6.5-3.9 6.5-7.5V5L10 2.5Z' stroke='%23005BFF' stroke-width='1.4'/%3E%3Cpath d='M7.5 10.2 9.2 12l3.3-3.4' stroke='%23005BFF' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"),
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 360 80' fill='none'%3E%3Crect x='0' y='4' width='110' height='72' rx='12' fill='%23f8fafc' stroke='%23e2e8f0'/%3E%3Crect x='14' y='18' width='18' height='22' rx='2' stroke='%23005BFF' stroke-width='1.3'/%3E%3Ctext x='55' y='32' fill='%23334155' font-family='Inter,sans-serif' font-size='11' font-weight='600'%3EAcompanhe%3C/text%3E%3Ctext x='55' y='48' fill='%23334155' font-family='Inter,sans-serif' font-size='11' font-weight='600'%3Eseus pedidos%3C/text%3E%3Crect x='125' y='4' width='110' height='72' rx='12' fill='%23f8fafc' stroke='%23e2e8f0'/%3E%3Cpath d='M138 30h36M138 38h28' stroke='%23005BFF' stroke-width='1.3' stroke-linecap='round'/%3E%3Ctext x='180' y='32' fill='%23334155' font-family='Inter,sans-serif' font-size='11' font-weight='600'%3EEnvie seus%3C/text%3E%3Ctext x='180' y='48' fill='%23334155' font-family='Inter,sans-serif' font-size='11' font-weight='600'%3Earquivos%3C/text%3E%3Crect x='250' y='4' width='110' height='72' rx='12' fill='%23f8fafc' stroke='%23e2e8f0'/%3E%3Crect x='264' y='22' width='28' height='20' rx='3' stroke='%23005BFF' stroke-width='1.3'/%3E%3Ctext x='305' y='32' fill='%23334155' font-family='Inter,sans-serif' font-size='11' font-weight='600'%3EVisualize%3C/text%3E%3Ctext x='305' y='48' fill='%23334155' font-family='Inter,sans-serif' font-size='11' font-weight='600'%3Epagamentos%3C/text%3E%3C/svg%3E");
    background-position: 1rem 1rem, 0.75rem 3.75rem;
    background-size: 18px, calc(100% - 1.5rem) auto;
    background-repeat: no-repeat;
  }

  .pl-auth-gate__msg:empty::before {
    content: 'Ambiente seguro';
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--pl-text);
    padding-left: 1.6rem;
    margin-top: -2rem;
  }

  .pl-auth-gate__msg:empty::after {
    content: 'Suas informações são protegidas por criptografia.';
    display: block;
    font-size: 0.82rem;
    color: var(--pl-muted);
    padding-left: 1.6rem;
    margin-top: 0.2rem;
  }

  .pl-auth-gate__msg:not(:empty) {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0.5rem 0 0;
  }

  .pl-auth-gate__msg:not(:empty)::before,
  .pl-auth-gate__msg:not(:empty)::after {
    display: none;
  }

  /* Footer termos mobile */
  .pl-auth-gate__card::after {
    content: 'Termos de Uso • Política de Privacidade';
    display: block;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--pl-blue);
    margin-top: 0.85rem;
    padding-bottom: 0.25rem;
    position: static;
    width: 100%;
    height: auto;
    background: none;
    box-shadow: none;
    border-radius: 0;
  }
}

/* Mobile pequeno */
@media (max-width: 380px) {
  #pl-auth-gate {
    padding: 0.5rem;
  }

  .pl-auth-gate__grid::after {
    font-size: 0.75rem;
  }

  #pl-auth-forgot {
    font-size: 0.75rem;
  }
}


/* ══════════════════════════════════════════
   DESKTOP  ≥ 961px
   ══════════════════════════════════════════ */
@media (min-width: 961px) {
  #pl-auth-gate {
    --pl-pad-x: 2rem;
    --pl-pad-y: 1.65rem;
    --pl-gap: 15px;
    --pl-input-h: 44px;
    --pl-btn-h: 44px;
  }

  .pl-auth-gate__card {
    display: grid;
    grid-template-columns: minmax(250px, 2fr) minmax(300px, 3fr);
    grid-template-rows: auto auto auto auto;
    align-items: stretch;
    overflow: hidden;
  }

  /* Painel azul */
  .pl-auth-gate__card::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 40%;
    background: linear-gradient(135deg, var(--pl-blue), var(--pl-blue-dark));
    z-index: 0;
    pointer-events: none;
  }

  .pl-auth-gate__card::after {
    display: none;
  }

  /* Coluna esquerda unificada */
  .pl-auth-gate__side {
    grid-column: 1;
    grid-row: 1 / -1;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: 100%;
    min-width: 0;
    padding: 1.75rem 1.65rem;
    pointer-events: none;
  }

  .pl-auth-gate__brand {
    display: grid;
    grid-template-columns: 44px 1fr;
    grid-template-rows: auto auto auto;
    align-content: start;
    gap: 0;
    padding: 0;
    min-width: 0;
    pointer-events: none;
    flex-shrink: 0;
  }

  .pl-auth-gate__brand-mark {
    grid-column: 1;
    grid-row: 1;
    width: 44px;
    height: 44px;
    padding: 5px;
    margin: 0;
    align-self: center;
    justify-self: start;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  }

  .pl-auth-gate__brand > div {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    padding-left: 0.75rem;
    min-width: 0;
  }

  .pl-auth-gate__brand strong {
    font-size: 0.9rem;
    color: #fff;
    line-height: 1.25;
  }

  .pl-auth-gate__brand span {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.86);
    margin-top: 0.15rem;
  }

  .pl-auth-gate__brand::after {
    content: 'Bem-vindo ao Painel do Cliente';
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 1.35rem;
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.35;
    letter-spacing: -0.02em;
  }

  .pl-auth-gate__brand::before {
    content: 'Acompanhe seus pedidos, envie arquivos, visualize pagamentos e muito mais.';
    grid-column: 1 / -1;
    grid-row: 3;
    margin-top: 0.65rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.55;
    position: static;
  }

  .pl-auth-gate__grid::before {
    display: none !important;
  }

  .pl-auth-gate__aside {
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
  }

  .pl-auth-gate__lead {
    display: none;
  }

  /* Cadeado no topo do painel branco */
  .pl-auth-gate__title::before {
    content: '';
    display: block;
    width: 44px;
    height: 44px;
    margin: 0 auto 0.85rem;
    border-radius: 50%;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Crect x='5.5' y='10.5' width='13' height='9' rx='2' stroke='%23005BFF' stroke-width='1.8'/%3E%3Cpath d='M8.5 10.5V8a3.5 3.5 0 1 1 7 0v2.5' stroke='%23005BFF' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center / 20px no-repeat;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--pl-border);
  }

  .pl-auth-gate__title {
    grid-column: 2;
    grid-row: 1;
    z-index: 1;
    padding: 1.65rem var(--pl-pad-x) 0.25rem;
    margin: 0;
    align-self: start;
    min-width: 0;
    text-align: center;
    font-size: 1.12rem;
  }

  .pl-auth-gate__title::after {
    content: 'Faça login para acessar o painel do cliente.';
    display: block;
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--pl-muted);
    margin-top: 0.35rem;
    line-height: 1.45;
  }

  .pl-auth-gate__grid {
    grid-column: 2;
    grid-row: 2;
    z-index: 1;
    padding: 0.85rem var(--pl-pad-x) 0;
    align-self: start;
    min-width: 0;
    position: static;
  }

  .pl-auth-gate__links {
    grid-column: 2;
    grid-row: 3;
    z-index: 1;
    padding: 0.15rem var(--pl-pad-x) 0;
    position: relative;
    min-width: 0;
  }

  .pl-auth-gate__msg {
    grid-column: 2;
    grid-row: 4;
    z-index: 1;
    padding: 0.35rem var(--pl-pad-x) 1.5rem;
    min-width: 0;
  }

  #pl-auth-forgot {
    position: absolute;
    right: var(--pl-pad-x);
    top: -1.55rem;
    white-space: nowrap;
    font-size: 0.8rem;
  }

  .pl-auth-gate__msg:empty::after {
    content: 'Ao continuar, você concorda com nossos Termos de Uso e Política de Privacidade.';
    display: block;
    margin-top: 0.5rem;
    padding-left: 1.15rem;
    font-size: 0.68rem;
    color: #94a3b8;
    line-height: 1.4;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M10 2.5 3.5 5v5c0 3.6 2.8 6.9 6.5 7.5 3.7-.6 6.5-3.9 6.5-7.5V5L10 2.5Z' stroke='%23005BFF' stroke-width='1.4'/%3E%3Cpath d='M7.5 10.2 9.2 12l3.3-3.4' stroke='%23005BFF' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") left 0 / 12px no-repeat;
  }

  .pl-auth-gate__msg:not(:empty)::after {
    display: none;
  }

  /* Popup criar conta — 3 colunas no desktop, sem scroll */
  .pl-auth-dialog__card {
    width: min(920px, calc(100% - 2rem));
    max-height: calc(100dvh - 2rem);
    overflow: auto;
    padding: 1rem 1.25rem 1.15rem;
    --pl-input-h: 38px;
    --pl-btn-h: 40px;
    --pl-gap: 10px;
  }

  .pl-auth-dialog #pl-auth-pane-create.pl-auth-gate__grid--create {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem 0.75rem;
    flex-direction: unset;
  }

  .pl-auth-dialog #pl-auth-pane-create .pl-auth-gate__inline,
  .pl-auth-dialog #pl-auth-pane-create .pl-auth-gate__field--wide,
  .pl-auth-dialog #pl-auth-pane-create .pl-auth-gate__actions {
    grid-column: 1 / -1;
  }

  .pl-auth-dialog #pl-auth-pane-create .pl-auth-gate__actions {
    margin-top: 0.25rem;
  }

  .pl-auth-dialog #pl-auth-pane-create .pl-auth-gate__actions .btn {
    max-width: 280px;
    margin: 0 auto;
  }
}

/* Desktop telas baixas — esconder features decorativas */
@media (min-width: 961px) and (max-height: 680px) {
  .pl-auth-gate__brand::after {
    margin-top: 0.75rem;
    font-size: 0.9rem;
  }

  .pl-auth-gate__aside .pl-auth-gate__features {
    display: none;
  }
}

/* Desktop largo */
@media (min-width: 1200px) {
  .pl-auth-gate__card {
    max-width: 900px;
  }

  .pl-auth-gate__card::before {
    width: 42%;
  }

  .pl-auth-dialog__card {
    width: min(940px, calc(100% - 2rem));
  }
}
