/* 🎨 Entrar / Criar conta — visual novo (sobrepõe o estilo base de public.css, só dentro de #auth) */
#auth .auth-card { width: min(440px, 100%); padding: 0 0 26px; border-radius: 28px; border: 1px solid var(--line);
  max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  box-shadow: 0 30px 80px rgba(20, 20, 40, .28), 0 2px 8px rgba(20, 20, 40, .08); }
#auth .auth-card > :not(.auth-head):not(.modal-x) { margin-left: 30px; margin-right: 30px; }
#auth .modal-x { z-index: 2; top: 16px; right: 16px; width: 34px; height: 34px; border-radius: 50%; background: rgba(127, 127, 127, .14); }
#auth .modal-x:hover { background: rgba(127, 127, 127, .26); }

/* topo com brilho */
#auth .auth-head { position: relative; margin: 0 0 22px; padding: 34px 30px 4px; text-align: center;
  background: radial-gradient(120% 90% at 50% 0%, rgba(91, 108, 255, .20), rgba(26, 140, 255, .10) 45%, transparent 75%); }
#auth .auth-logo { width: 68px; height: 68px; padding: 13px; margin: 0 auto 14px; border-radius: 22px; object-fit: contain;
  background: linear-gradient(135deg, rgba(91, 108, 255, .16), rgba(25, 194, 181, .16)); box-shadow: inset 0 0 0 1px rgba(91, 108, 255, .22), 0 10px 26px rgba(91, 108, 255, .22); }
#auth .auth-head h2 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
#auth .auth-sub { margin: 8px auto 0; max-width: 330px; font-size: 15px; line-height: 1.45; }
#auth .auth-perks { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 8px; list-style: none; margin: 14px 0 2px; padding: 0; }
#auth .auth-perks li { font-size: 12.5px; font-weight: 550; padding: 5px 10px; border-radius: 999px; color: var(--text); background: rgba(25, 194, 181, .13); }
#auth:has(#form-login:not([hidden])) .auth-perks { display: none; }

/* abas com "pílula" deslizante */
#auth .tabs { position: relative; padding: 5px; margin-bottom: 20px; border-radius: 16px; background: var(--sb); }
#auth .tabs::before { content: ""; position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc(50% - 5px); border-radius: 12px; background: var(--card);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .10); transition: transform .22s cubic-bezier(.4, .1, .2, 1); }
#auth .tabs:has(.tab:last-child.sel)::before { transform: translateX(100%); }
#auth .tab { position: relative; z-index: 1; padding: 11px 8px; font-weight: 600; font-size: 15px; background: none !important; box-shadow: none !important; }
#auth .tab.sel { color: var(--text); }

/* campos com ícone */
#auth .stack { gap: 16px; }
#auth .field > span { font-size: 13px; font-weight: 600; letter-spacing: .01em; }
#auth .field input { padding: 14px 16px 14px 46px; border-radius: 15px; border: 1.5px solid var(--line); background-color: var(--bg); background-repeat: no-repeat; background-position: 15px center; background-size: 19px; }
#auth .field input:hover { border-color: rgba(91, 108, 255, .45); }
#auth .field input:focus { border-color: #5b6cff; box-shadow: 0 0 0 4px rgba(91, 108, 255, .16); background-color: var(--card); }
#auth input[name="login"], #auth input[name="username"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4 3.6-7 8-7s8 3 8 7'/%3E%3C/svg%3E"); }
#auth input[name="name"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='3'/%3E%3Ccircle cx='9' cy='11' r='2'/%3E%3Cpath d='M14 10h4M14 14h3M6 16c.6-1.4 1.8-2 3-2s2.4.6 3 2'/%3E%3C/svg%3E"); }
#auth input[name="email"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='3'/%3E%3Cpath d='m4 7 8 6 8-6'/%3E%3C/svg%3E"); }
#auth input[name="password"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='10' width='16' height='11' rx='3'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E"); }
#auth .row2 .field input { padding-left: 46px; }

/* botão principal */
#auth .btn-primary { margin-top: 6px; padding: 15px; border-radius: 16px; font-size: 16px; font-weight: 650; letter-spacing: .01em; color: #fff;
  background: linear-gradient(135deg, #5b6cff 0%, #1a8cff 55%, #19c2b5 100%); box-shadow: 0 10px 26px rgba(26, 140, 255, .35);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease; }
#auth .btn-primary:hover { transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 14px 32px rgba(26, 140, 255, .42); }
#auth .btn-primary:active { transform: translateY(0) scale(.99); }
#auth .btn-primary.loading::after { border-color: rgba(255, 255, 255, .45); border-top-color: #fff; }
#auth .switch { margin-top: 6px; font-size: 14.5px; }
#auth .switch a { color: #4f5fe8; font-weight: 650; }
#auth .note { border-radius: 14px; border: 1px solid rgba(91, 108, 255, .22); background: rgba(91, 108, 255, .09); }
#auth .err { border-radius: 14px; border: 1px solid rgba(210, 59, 59, .25); }
#auth .eye { right: 8px; }
@media (max-width: 480px) { #auth .auth-card > :not(.auth-head):not(.modal-x) { margin-left: 20px; margin-right: 20px; } #auth .auth-head { padding: 30px 20px 2px; } #auth .row2 { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { #auth .tabs::before, #auth .btn-primary { transition: none; } }

/* ✅ não trava em telas pequenas: o cartão rola dentro da tela (antes o "overflow: hidden" impedia de chegar no botão) */
#auth .auth-card::before { display: none; }
@media (max-width: 820px) {
  #auth .auth-card { width: 100%; max-height: 94vh; max-height: 94dvh; border-radius: 26px 26px 0 0; border-bottom: 0; padding-bottom: max(22px, env(safe-area-inset-bottom)); }
}
@media (max-height: 720px) {
  #auth .auth-logo, #auth .auth-perks { display: none; }
  #auth .auth-head { padding-top: 24px; margin-bottom: 14px; }
  #auth .auth-head h2 { font-size: 22px; }
  #auth .tabs { margin-bottom: 14px; } #auth .stack { gap: 12px; }
  #auth .field input { padding-top: 11px; padding-bottom: 11px; }
}
