/* ============================================================
   Auth (login / registro / recuperar contraseña) + menú de
   usuario — TaxCalendarSaleUSA
   Usa las mismas variables de color/tipografía definidas en
   :root dentro del <style> principal de index.html.
   ============================================================ */

/* ── Página dedicada de restablecer contraseña ── */
.reset-page-wrap {
  max-width: 420px;
  margin: 0 auto;
  padding: 60px 20px;
}

/* ── Overlay del modal de auth ── */
.auth-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 600;
  background: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
  padding: 14px;
  overflow-y: auto;
}

.auth-overlay.open {
  display: flex;
}

.auth-box {
  width: 100%;
  max-width: 380px;
  background: var(--ink2);
  border: 1px solid var(--border);
  padding: 32px 28px;
  position: relative;
}

.auth-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  color: var(--slate);
  font-size: 19px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

.auth-close:hover {
  color: var(--cream);
}

.auth-logo {
  text-align: center;
  font-size: 18px;
  color: var(--gold);
  margin-bottom: 20px;
}

.auth-logo small {
  display: block;
  font-family: sans-serif;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--slate);
  margin-top: 3px;
}

.auth-title {
  font-size: 20px;
  font-weight: normal;
  color: var(--cream);
  text-align: center;
  margin-bottom: 6px;
}

.auth-sub {
  font-family: sans-serif;
  font-size: 12px;
  color: rgba(242, 238, 228, 0.6);
  text-align: center;
  line-height: 1.5;
  margin-bottom: 22px;
}

/* ── Tabs (Iniciar sesión / Crear cuenta) ── */
.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 22px;
}

.auth-tab {
  flex: 1;
  text-align: center;
  font-family: sans-serif;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate);
  padding: 0 0 12px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .2s, border-color .2s;
}

.auth-tab:hover {
  color: var(--cream);
}

.auth-tab.active {
  color: var(--gold);
  border-color: var(--gold);
}

/* ── Formulario ── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-input {
  width: 100%;
  padding: 9px 11px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--cream);
  font-family: sans-serif;
  font-size: 13px;
  outline: none;
  transition: border-color .2s;
}

.auth-input:focus {
  border-color: var(--gold);
}

.auth-input::placeholder {
  color: var(--slate);
}

.auth-err {
  display: none;
  font-family: sans-serif;
  font-size: 12px;
  color: var(--red2);
  line-height: 1.4;
}

.auth-ok {
  display: none;
  font-family: sans-serif;
  font-size: 12px;
  color: var(--green2);
  line-height: 1.4;
}

.auth-btn {
  width: 100%;
  padding: 11px;
  margin-top: 4px;
  background: var(--gold);
  color: var(--ink);
  border: none;
  cursor: pointer;
  font-family: sans-serif;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: opacity .2s;
}

.auth-btn:hover {
  opacity: .88;
}

.auth-btn:disabled {
  opacity: .6;
  cursor: default;
}

.auth-divider {
  font-family: sans-serif;
  font-size: 12px;
  color: var(--slate);
  text-align: center;
  margin-top: 6px;
  line-height: 1.5;
}

.auth-forgot {
  font-family: sans-serif;
  font-size: 11px;
  color: var(--slate);
  text-align: center;
  cursor: pointer;
  margin-top: 2px;
  transition: color .2s;
}

.auth-forgot:hover {
  color: var(--gold);
}

/* ── Menú de usuario (nav) ── */
.user-menu {
  position: relative;
}

.user-menu-btn {
  font-family: sans-serif;
  font-size: 10px;
  text-transform: uppercase;
  padding: 6px 12px;
  border: 1px solid rgba(201, 150, 58, 0.4);
  color: var(--gold);
  background: transparent;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}

.user-menu-btn:hover {
  background: rgba(201, 150, 58, 0.1);
}

.user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  background: var(--ink2);
  border: 1px solid var(--border);
  z-index: 250;
  flex-direction: column;
}

.user-dropdown.open {
  display: flex;
}

.user-dropdown-item {
  font-family: sans-serif;
  font-size: 12px;
  color: var(--cream2);
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background .2s;
}

.user-dropdown-item:last-child {
  border-bottom: none;
}

.user-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.user-dropdown-item.danger {
  color: var(--red2);
}

#userPlanItem {
  cursor: default;
  color: var(--slate);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

#userPlanItem:hover {
  background: transparent;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .auth-box { padding: 26px 20px; }
}
