/* =============================================
   AUTH.CSS — Modal de Login/Cadastro
   RV Sport Store
   ============================================= */

/* === OVERLAY === */
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: overlayIn .2s ease;
}

@keyframes overlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* === MODAL CONTAINER === */
.auth-modal {
  background: #0d1118;
  border: 1px solid #1e2535;
  border-radius: 20px;
  width: 100%;
  max-width: 420px;
  padding: 36px 32px 32px;
  position: relative;
  animation: modalIn .25s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 32px 80px rgba(0,0,0,.7), 0 0 0 1px rgba(228,255,0,.06);
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(.96); }
  to   { opacity: 1; transform: translateY(0)    scale(1);   }
}

/* === FECHAR === */
.auth-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255,255,255,.06);
  border: none;
  color: #8899aa;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, color .2s;
}
.auth-modal-close:hover {
  background: rgba(255,255,255,.12);
  color: #fff;
}

/* === LOGO === */
.auth-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 24px;
  letter-spacing: .08em;
  margin-bottom: 12px;
  text-align: center;
}
.auth-logo .logo-rv    { color: #E4FF00; }
.auth-logo .logo-sport { color: #fff;    }

/* === ABAS === */
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #131820;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 28px;
  border: 1px solid #1e2535;
}

.auth-tab {
  background: transparent;
  border: none;
  color: #677080;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 10px;
  border-radius: 9px;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.auth-tab.active {
  background: #E4FF00;
  color: #07090C;
}
.auth-tab:hover:not(.active) {
  color: #aab0bb;
}

/* === TÍTULO E SUBTÍTULO === */
.auth-title {
  font-family: 'Oswald', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
  text-align: center;
  letter-spacing: .02em;
}
.auth-sub {
  font-size: 13px;
  color: #677080;
  text-align: center;
  margin-bottom: 24px;
  line-height: 1.5;
}

/* === FORMULÁRIOS === */
.auth-form {
  display: none;
}
.auth-form.active {
  display: block;
  animation: formIn .2s ease;
}
@keyframes formIn {
  from { opacity: 0; transform: translateX(8px); }
  to   { opacity: 1; transform: translateX(0);   }
}

/* === CAMPOS === */
.auth-field {
  margin-bottom: 16px;
}
.auth-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #8899aa;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 7px;
}
.auth-field input {
  width: 100%;
  background: #131820;
  border: 1.5px solid #1e2535;
  border-radius: 10px;
  padding: 13px 16px;
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
}
.auth-field input:focus {
  border-color: #E4FF00;
  box-shadow: 0 0 0 3px rgba(228,255,0,.12);
}
.auth-field input::placeholder {
  color: #3a4560;
}
.auth-field input:autofill,
.auth-field input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 30px #131820 inset !important;
  -webkit-text-fill-color: #fff !important;
}

/* === WRAPPER COM ÍCONE DE VER SENHA === */
.auth-input-wrap {
  position: relative;
}
.auth-input-wrap input {
  padding-right: 46px;
}
.auth-toggle-pw {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #677080;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  transition: color .2s;
}
.auth-toggle-pw:hover { color: #E4FF00; }

/* === FORÇA DA SENHA === */
.auth-pw-strength {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
}
.pw-fraca { color: #ff5252; }
.pw-media { color: #ffb300; }
.pw-forte { color: #00e676; }

/* === ESQUECI SENHA === */
.auth-forgot {
  background: none;
  border: none;
  color: #E4FF00;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-bottom: 16px;
  display: block;
  text-align: right;
  width: 100%;
  transition: opacity .2s;
}
.auth-forgot:hover { opacity: .75; }

/* === MENSAGENS DE ERRO / SUCESSO === */
.auth-erro {
  background: rgba(255,82,82,.12);
  border: 1px solid rgba(255,82,82,.3);
  color: #ff7070;
  font-size: 13px;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
  min-height: 0;
  transition: all .2s;
}
.auth-erro:empty { display: none; }

.auth-sucesso {
  background: rgba(0,230,118,.1);
  border: 1px solid rgba(0,230,118,.25);
  color: #00e676;
  font-size: 13px;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
}
.auth-sucesso:empty { display: none; }

/* === BOTÃO PRINCIPAL === */
.auth-btn-submit {
  width: 100%;
  background: #E4FF00;
  color: #07090C;
  font-family: 'Oswald', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 15px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: background .2s, transform .15s, box-shadow .2s;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(228,255,0,.2);
}
.auth-btn-submit:hover:not(:disabled) {
  background: #d4ee00;
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(228,255,0,.35);
}
.auth-btn-submit:active { transform: scale(.98); }
.auth-btn-submit:disabled {
  cursor: not-allowed;
  opacity: .7;
}

/* === TROCAR ABA === */
.auth-switch {
  text-align: center;
  font-size: 13px;
  color: #677080;
  margin: 0;
}
.auth-switch button {
  background: none;
  border: none;
  color: #E4FF00;
  font-weight: 600;
  cursor: pointer;
  font-size: 13px;
  padding: 0 2px;
  transition: opacity .2s;
}
.auth-switch button:hover { opacity: .75; }

/* =============================================
   MENU DO USUÁRIO (dropdown quando logado)
   ============================================= */
.user-menu {
  position: fixed;
  background: #0d1118;
  border: 1px solid #1e2535;
  border-radius: 14px;
  padding: 8px;
  min-width: 220px;
  z-index: 9999;
  box-shadow: 0 20px 50px rgba(0,0,0,.7);
  animation: modalIn .18s ease;
}

.user-menu-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 14px;
}
.user-menu-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #E4FF00;
  color: #07090C;
  font-weight: 800;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.user-menu-name {
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  line-height: 1.3;
}
.user-menu-email {
  font-size: 11px;
  color: #677080;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

.user-menu-divider {
  height: 1px;
  background: #1e2535;
  margin: 4px 0;
}
.user-menu-item {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: #c0cce0;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  padding: 10px 12px;
  border-radius: 9px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.user-menu-item:hover {
  background: #131820;
  color: #fff;
}
.user-menu-sair {
  color: #ff7070;
}
.user-menu-sair:hover {
  background: rgba(255,82,82,.1);
  color: #ff5252;
}

/* =============================================
   BOTÃO DE AUTH NO HEADER
   ============================================= */
.btn-auth {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(228,255,0,.1);
  border: 1.5px solid rgba(228,255,0,.3);
  color: #E4FF00;
  font-family: 'Oswald', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .05em;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .15s;
  white-space: nowrap;
}
.btn-auth:hover {
  background: rgba(228,255,0,.18);
  border-color: #E4FF00;
  transform: translateY(-1px);
}
.btn-auth svg { flex-shrink: 0; }

/* === MOBILE === */
@media (max-width: 480px) {
  .auth-modal {
    padding: 28px 20px 24px;
    border-radius: 16px;
  }
  .auth-title { font-size: 20px; }
  .auth-btn-submit { padding: 14px; font-size: 15px; }
  .user-menu { min-width: 190px; }
}
